From 643d21a07f7b951f6fc1bb3bd4cef3762ad6d9de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Teemu=20P=C3=A4tsi?= Date: Sat, 30 May 2026 00:46:37 +0300 Subject: [PATCH 1/2] docs: remove unreproducible pitfalls guide --- AGENTS.md | 1 - docs/agents/pitfalls.md | 20 -------------------- 2 files changed, 21 deletions(-) delete mode 100644 docs/agents/pitfalls.md diff --git a/AGENTS.md b/AGENTS.md index 0b3bf3e..514f9f0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -39,7 +39,6 @@ Always load the relevant doc when the matching workflow comes up: - **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. From 742b52aa6e6c8b7b172f9aea9c2c4713c7e49ae5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Teemu=20P=C3=A4tsi?= Date: Sat, 30 May 2026 00:47:39 +0300 Subject: [PATCH 2/2] docs: tidy principles and agent skills sections --- AGENTS.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 514f9f0..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,6 +32,9 @@ 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`