Skip to content

feat(prompts): add documentation maintenance instructions to agent prompts#1074

Merged
aaight merged 1 commit intodevfrom
feature/documentation-maintenance-agent-prompts
Apr 2, 2026
Merged

feat(prompts): add documentation maintenance instructions to agent prompts#1074
aaight merged 1 commit intodevfrom
feature/documentation-maintenance-agent-prompts

Conversation

@aaight
Copy link
Copy Markdown
Collaborator

@aaight aaight commented Apr 2, 2026

Summary

  • New documentation-maintenance.eta partial — reusable instructions covering when/what/how to update docs (CLAUDE.md, README, docs/, JSDoc) when code changes affect documented behavior
  • 5 code-modifying agent prompts updated — implementation, respond-to-review, respond-to-ci, respond-to-pr-comment, resolve-conflicts all include the new partial after test-protocol
  • Review agent gets a new "Documentation" subsection under "What to Verify" (not the partial — reports gaps rather than fixing them)
  • Planning agent gets step 6 in Codebase Pattern Analysis to check documentation before writing the plan, with guidance to include doc update steps for changes that affect documented behavior
  • Tests — 127 tests pass; new describe blocks cover the partial, all 5 code-modifying agents, the review agent's doc section, and the planning agent's doc guidance

Key decisions

  • The partial is action-oriented ("update docs") for code-modifying agents; the review agent gets separate read-only wording ("report gaps, don't fix them") to keep roles clean
  • Instructions are framed as "check IF changes affect docs" to avoid unnecessary iterations on internal refactors or test-only changes
  • Partial follows the concise style of existing partials (≈35 lines vs test-protocol's 8 lines) with a brief checklist at the end

Test plan

  • npm test -- tests/unit/agents/prompts.test.ts — all 127 tests passing
  • npm run lint — 0 new errors (2 pre-existing warnings unrelated to this PR)
  • npm run typecheck — 0 type errors
  • resolve-conflicts added to mock agent types list and all relevant test lists

Trello card: https://trello.com/c/3d75QVrc/589-add-documentation-maintenance-instructions-to-agent-prompts

🤖 Generated with Claude Code

🕵️ claude-code · claude-sonnet-4-6 · run details

Copy link
Copy Markdown
Collaborator

@nhopeatall nhopeatall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

LGTM — Well-structured addition of documentation maintenance instructions to agent prompts with clean role separation.

The implementation is sound:

  • Correct agent targeting: The partial is included only in the 5 code-modifying agents (implementation, respond-to-review, respond-to-ci, respond-to-pr-comment, resolve-conflicts). Non-code-modifying agents (splitting, planning, debug, backlog-manager, respond-to-planning-comment) are correctly excluded.
  • Role-appropriate wording: The review agent gets read-only "report gaps" instructions separate from the action-oriented partial, maintaining the read-only agent contract. The planning agent gets a single step (step 6) to check docs during pattern analysis, which is the right scope for a planning-only agent.
  • Consistent placement: The partial is placed after test-protocol and before verification-protocol in all 5 templates — same ordering pattern.
  • Conditional framing: Instructions are framed as "check IF changes affect docs" with explicit skip conditions (internal refactors, test-only changes, bug fixes restoring existing behavior), avoiding unnecessary doc-update churn.
  • Tests are thorough: 127 tests covering the partial content, all 5 code-modifying agents, the review agent's doc section, planning agent guidance, and negative assertions (review/planning prompts do NOT contain the partial's checklist).
  • CI all green: All 7 checks passing.

Minor note (not blocking): respond-to-pr-comment.eta lacks a trailing newline — this is a pre-existing issue, not introduced by this PR.

🕵️ claude-code · claude-opus-4-6 · run details

@aaight aaight merged commit 211f012 into dev Apr 2, 2026
9 checks passed
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.

2 participants