Skip to content

docs: state each agent rule once and point to it - #1632

Merged
vivek7405 merged 4 commits into
mainfrom
docs/skill-dedupe
Oct 8, 2026
Merged

vivek7405 merged 4 commits into
mainfrom
docs/skill-dedupe

Conversation

@vivek7405

Copy link
Copy Markdown
Collaborator

Every build agent reads the scaffold AGENTS.md (with its playbook), CLAUDE.md, CONVENTIONS.md, .agents/rules/workflow.md and the skill's SKILL.md. The same rules were restated across them: the typing rule, the two .server.ts kinds, the data rule, the npm run ci gate list, the form-binding rules, the git contract. This keeps each rule in one canonical place and points to it from the others.

  • Typing and the .server.ts boundary: SKILL.md (Default Workflow 8, Core Rules 1 and 2); the scaffold AGENTS.md points there. The two facts only AGENTS.md had (no 'use server' on server-only infra, nothing enforces the typing rule) moved into SKILL.md.
  • Data rule: AGENTS.md "Data". The ci gate details: workflow.md. Git contract: workflow.md (CLAUDE.md keeps the Claude-specific override).
  • CONVENTIONS.md becomes an index of where each rule lives.
  • SKILL.md "Common Mistakes" drops the entries that restated a Core Rule, folding their reasons into the rule.

The skill structure is unchanged (SKILL.md plus the 15 references, none merged, renamed or deleted), and the dark/light theme guidance is untouched.

Quality gate (identical prompt, fresh scaffold from main vs this branch): results posted below.

https://claude.ai/code/session_01SZ72LSPAo4NvYvBDSD6RLo

The scaffold's agent docs restated the same rules (typing, the .server.ts
boundary, the data rule, the ci gate list, the form-binding rules, the git
contract) across AGENTS.md, CONVENTIONS.md, workflow.md, CLAUDE.md, both
playbooks and SKILL.md. Every build agent reads all of them, so each copy
was paid for on every run. Each rule now lives in one canonical place and
the others point to it; the two facts that existed only in the scaffold
AGENTS.md (no 'use server' on server-only infra, nothing enforces the
typing rule) moved into the skill.

Claude-Session: https://claude.ai/code/session_01SZ72LSPAo4NvYvBDSD6RLo
@pilots-run

pilots-run Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Preview for 793235f was not built: compose file has unsupported keys

Next: fix the listed keys in the compose file

vivek7405 and others added 2 commits October 8, 2026 10:19
A first quality-gate build wrote half the tests once the step only named
the gates; the per-feature wording is what asks for them.

Claude-Session: https://claude.ai/code/session_01SZ72LSPAo4NvYvBDSD6RLo
@vivek7405

Copy link
Copy Markdown
Collaborator Author

Quality gate, identical prompt (habit tracker with streaks, weekly overview, dark and light theme) via claude -p on a fresh scaffold from main vs this branch:

main branch
pair 1 cost / turns $8.62 / 123 $8.26 / 131
pair 2 cost / turns $6.56 / 106 $9.10 / 147
webjs check, typecheck, npm run ci pass, pass, pass (both pairs) pass, pass, pass (both pairs)
light-dark tokens + theme toggle yes yes
features (check-off, current + longest streak, week view, detail, list) all all
test cases (pair 2) 31 36

Pair 1 on the first commit wrote half the tests (24 vs 47); the verify step had lost "the server, browser, and e2e test layers for the features you built". Restored in the second commit, and pair 2 used it. The always-read agent docs shrink by about 6 KB (about 1.6k tokens). The per-run cost difference is inside run-to-run variance (turn count dominates), so there is no measurable cost change in either direction.

https://claude.ai/code/session_01SZ72LSPAo4NvYvBDSD6RLo

@vivek7405
vivek7405 merged commit 7d4f627 into main Oct 8, 2026
10 of 11 checks passed
@vivek7405
vivek7405 deleted the docs/skill-dedupe branch October 8, 2026 05:49
vivek7405 pushed a commit that referenced this pull request Oct 8, 2026
#1632 reduced the "Type everything" section to a pointer. Typing is the
one rule check and tsc cannot enforce, so the concrete forms belong where
an agent reads first: the row type, action input and result, routing
props, the typed Route union and prop<T>(). The rule itself stays in the
skill's Default Workflow step 8.
vivek7405 added a commit that referenced this pull request Oct 8, 2026
#1632 reduced the "Type everything" section to a pointer. Typing is the
one rule check and tsc cannot enforce, so the concrete forms belong where
an agent reads first: the row type, action input and result, routing
props, the typed Route union and prop<T>(). The rule itself stays in the
skill's Default Workflow step 8.

Co-authored-by: t <t@t>
vivek7405 pushed a commit that referenced this pull request Oct 8, 2026
Restores every rule #1632 collapsed into a pointer, in AGENTS.md,
CONVENTIONS.md, workflow.md, CLAUDE.md, both playbooks and the skill,
including the design-token bullet in workflow.md. The saving was about
1,500 tokens per build, small next to a visible drop in how apps look.
The partial type-list restore from #1635 is replaced by the original
text.
vivek7405 added a commit that referenced this pull request Oct 8, 2026
Restores every rule #1632 collapsed into a pointer, in AGENTS.md,
CONVENTIONS.md, workflow.md, CLAUDE.md, both playbooks and the skill,
including the design-token bullet in workflow.md. The saving was about
1,500 tokens per build, small next to a visible drop in how apps look.
The partial type-list restore from #1635 is replaced by the original
text.

Co-authored-by: t <t@t>
vivek7405 pushed a commit that referenced this pull request Oct 8, 2026
Reverts #1637. The agent docs return to the state after #1632 and #1635:
each rule stated once and pointed to, with the concrete type list in the
scaffold AGENTS.md.
vivek7405 added a commit that referenced this pull request Oct 8, 2026
Reverts #1637. The agent docs return to the state after #1632 and #1635:
each rule stated once and pointed to, with the concrete type list in the
scaffold AGENTS.md.

Co-authored-by: t <t@t>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant