Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/ai/writing-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ Read this before changing root `AGENTS.md`, `.agents/skills/`, nested `AGENTS.md
- Keep root `AGENTS.md` under 100 lines unless the user explicitly approves growth.
- Keep activation text separate from reference content so agents load the source doc instead of guessing from summaries.
- Write contracts as action + reason + verification. Models follow direct instructions better when the why is visible.
- Keep compact rationale for judgment-heavy rules. A model must generalize the rule to unlisted cases; without the why, it satisfies only the literal surface form.
- Keep failure-mode rationale alongside safety-critical rules. Name the required behavior and what goes wrong otherwise. Bare imperatives are easier to rationalize around than imperatives paired with a concrete failure description.
- When compressing instructions, remove redundancy without reducing enforcement force. Imperative wording and explicit fallback paths guard against known failure modes; preserve them even when shortening for context budget.
- Lead with the positive action. Use negative wording for known cliff edges, then immediately state the safe path. Reserve `NEVER` or all-caps wording for data-loss, security, or guardrail-bypass risks.
- Keep one source of truth per concept. Point to it instead of restating it.
- Move enforceable rules into tooling. Docs are for judgment calls and routing.
Expand Down