diff --git a/AGENTS.md b/AGENTS.md index 0b3bf3e..6690634 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,12 +4,11 @@ See [README.md](./README.md) for basic info, language docs, and examples. ## General principles -- The codebase is the source of truth — verify against current code before asserting. +- The codebase is the source of truth. Verify against current code before asserting. - Don't web-search Casa specifics; this repo is the only authoritative source. - When language features or stdlib functions change, update the corresponding documentation, examples, and tests. - Never mention Claude or AI usage -- Always use caveman skill ## Code conventions @@ -33,13 +32,15 @@ See [README.md](./README.md) for basic info, language docs, and examples. ## Agent skills +- Always use `caveman` skill +- Use `tdd` skill whenever making new features or functionality changes + Always load the relevant doc when the matching workflow comes up: - **Git** — `docs/agents/git.md` - **Testing** — `docs/agents/testing.md` - **Review** — `docs/agents/review.md` - **Examples** — `docs/agents/examples.md` -- **Pitfalls** — `docs/agents/pitfalls.md` (known Casa gotchas with workarounds) - **Issue tracker** — `docs/agents/issue-tracker.md` - **Triage labels** — `docs/agents/triage-labels.md` - **Domain docs** — `docs/agents/domain.md` diff --git a/docs/agents/pitfalls.md b/docs/agents/pitfalls.md deleted file mode 100644 index 8892269..0000000 --- a/docs/agents/pitfalls.md +++ /dev/null @@ -1,20 +0,0 @@ -# Pitfalls - -Known Casa gotchas that aren't yet captured as fixes. Each entry has a one-line -description, a workaround, and a link to the tracking issue. Remove an entry when its -issue closes. - -## Type enum methods may consume the value (context-dependent) - -Casa enum values (`Type`, `Option[T]`) are usually safe to call methods on multiple -times — `t.format` twice on a named `Type` var works in isolation, for-loop iteration -works, list re-iteration works. But there are reported patterns that crash stage2 with -"unwrap on None" after an enum method call, especially when chained `.get.typ` -extractions feed into multiple methods. - -- **Default:** write the cleaner reuse-the-value code. -- **If you hit a stage2 crash** after an enum method call: bind the intermediate - result to a fresh variable, or fall back to formatting once and threading the - string through. Then verify with `tests/test_compiler.sh` and `tests/test_examples.sh`. -- No tracking issue yet — root cause unconfirmed. File one if you reproduce a - specific crash pattern.