@@ -71,17 +71,42 @@ the installation block without making remote writes. Keep its markers intact.
7171 installation. ` examples/ ` contains configuration examples; ` test/ ` contains
7272 automated tests. ` package.json ` defines build and validation commands.
7373
74- ## Keeping documentation accurate
75-
76- Treat the implementation as the source of truth for current behavior. If code
77- and documentation disagree, inspect the relevant code and tests and make the
78- discrepancy explicit rather than assuming the documented behavior is implemented.
79- When changing behavior, update the relevant reference page and any affected
80- workflow diagrams. Keep the architecture page concise; put detailed execution
81- paths in ` docs/bot-workflow.md ` and user-facing runtime guidance in ` docs/runtime.md ` .
82-
83- Validate changed Mermaid diagrams with a Mermaid parser when available; checking
84- Markdown fences alone does not validate diagram syntax. Avoid literal semicolons
85- in sequence-diagram message labels because they can be parsed as statement
86- separators. For documentation-only changes, check links and formatting; application
87- tests are not needed unless executable behavior also changes.
74+ ## Keeping documentation accurate — required for every change
75+
76+ Documentation is part of the implementation, not a later cleanup task. ** If a code
77+ change affects anything already described, update that description and every
78+ affected diagram in the same change and PR.** A change is not complete while its
79+ code and documentation disagree. Do not defer documentation to a later release,
80+ follow-up issue, or another agent.
81+
82+ For every code, configuration, CLI/RPC, prompt, or workflow change:
83+
84+ 1 . Read the affected reference pages and compare their claims with the source and
85+ relevant tests. Use the documentation map above to find all entry points.
86+ 2 . Update affected behavior, defaults, commands, examples, prerequisites, limits,
87+ failure/retry paths, and recovery instructions. Check README and cross-linked
88+ pages as well as the primary reference; fixing only one mention is insufficient.
89+ 3 . For automation changes, review all eight sections of ` docs/bot-workflow.md `
90+ for impact and update every affected Mermaid diagram and its surrounding text.
91+ Show actual ordering, phase/status transitions, durable checkpoints, questions,
92+ verification/publication gates, and restart paths. Do not draw desired behavior
93+ as if it were implemented. Keep architecture concise and detailed paths in the
94+ workflow/runtime references.
95+ 4 . Validate modified Mermaid with a parser, and check local links, headings,
96+ examples and Markdown formatting. Fences alone do not prove valid diagrams.
97+ Avoid literal semicolons in sequence-diagram messages. Report any validation
98+ that could not be run; do not claim it passed.
99+ 5 . Before finishing, review the complete diff for code/documentation agreement.
100+ In the PR description, identify the documentation updated, or state why the
101+ change has no documented or user-visible behavior impact. Add accurate
102+ ` Unreleased ` notes for changes that enter the next release.
103+
104+ Treat implementation and verified tests as evidence of current behavior. If an
105+ existing discrepancy is discovered, correct the affected documentation within the
106+ authorized scope and make any remaining mismatch explicit. Distinguish model
107+ instructions from enforced runtime behavior, and branch/unreleased features from
108+ features already present in a published package. Do not change an unrelated
109+ runtime behavior merely to make an old description true.
110+
111+ For documentation-only changes, check links, formatting and diagram syntax;
112+ application tests are not needed unless executable behavior also changes.
0 commit comments