diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-31 11:11:08 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-31 11:11:08 -0500 |
| commit | 0f0905fe6635751edd9ad7e9e02b36e8b8e4dbc4 (patch) | |
| tree | 13a202ea401239b38724c5f15ed2b3bf185674be /claude-templates | |
| parent | 58434f406068887291342dece24a55b0887dd86b (diff) | |
| download | rulesets-0f0905fe6635751edd9ad7e9e02b36e8b8e4dbc4.tar.gz rulesets-0f0905fe6635751edd9ad7e9e02b36e8b8e4dbc4.zip | |
feat(aiignore): add .aiignore and the recursive-read convention
Agents (and any future inventory tool) doing a naive recursive read of a project pick up node_modules, __pycache__, build output, and token artifacts even when those are gitignored, because a recursive read sees the disk, not git. I added a gitignore-syntax .aiignore at the repo root with the default skip list, and a protocols.org "Recursive Reads" subsection documenting the convention, the defaults to assume absent a file, and the lockfile policy (skip on agent reads, independent of git-tracking).
I did not wire the walking scripts (audit.sh, diff-lang.sh, sync-language-bundle.sh): they do targeted finds over .ai/.claude/bundle dirs, never whole-tree walks, so honoring .aiignore there would be dead code. That belongs in a future catalog tool.
Diffstat (limited to 'claude-templates')
| -rw-r--r-- | claude-templates/.ai/protocols.org | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/claude-templates/.ai/protocols.org b/claude-templates/.ai/protocols.org index 25e634a..cf1b7f6 100644 --- a/claude-templates/.ai/protocols.org +++ b/claude-templates/.ai/protocols.org @@ -190,6 +190,14 @@ Check =inbox/= at every task boundary (after finishing a unit of work, before re Exit 1 means handoffs are pending — process them per =process-inbox.org=. For each accepted handoff, the act-vs-file rule: *act now* when it's clear, bounded, low-risk, in-scope, and cheaper than deferring — just do it, no asking; *file* otherwise — ask first, with filing as option 1 and "do it now" as option 2; *ask* if unsure. Always reply to a handoff's sender (confirm on accept, the why on reject). Full process, the reply discipline, and the opt-in background-monitor =/loop= recipe live in =monitor-inbox.org=. +** Recursive Reads — Honor =.aiignore= + +Before a naive recursive read or glob of a project tree (file inventories, "what's in this repo", broad greps), skip the noise: dependency trees (=node_modules/=, =.venv/=), build output (=dist/=, =build/=, =coverage/=), language caches (=__pycache__/=, =.pytest_cache/=, =*.pyc=), editor/OS cruft, and generated token/OAuth artifacts. These waste tokens and skew project summaries even when gitignored — a recursive read sees the disk, not git. + +If the project root has a =.aiignore= (gitignore syntax), honor its patterns; it carries project-specific additions. rulesets ships one as the canonical example. Absent a file, assume the defaults above. + +Lockfile policy: skip lockfiles on agent reads (large and low-signal). That's about what agents read, not what git tracks for reproducibility. + * Important Terminology ** "Let's run the [X] workflow" vs "I want to create an [X] workflow" |
