Skip to content

Stop agents documenting helper exports and implementation details - #1603

Merged
cristianrgreco merged 2 commits into
mainfrom
claude/scope-docs-to-user-facing
Oct 13, 2026
Merged

cristianrgreco merged 2 commits into
mainfrom
claude/scope-docs-to-user-facing

Conversation

@cristianrgreco

@cristianrgreco cristianrgreco commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Agent-written PRs keep adding two things to docs/ that don't belong there: sections for helpers that are exported only so modules can import them, and explanations of how a feature is implemented. They also add lines about their own feature to AGENTS.md and the skills.

Three things in the rules cause it:

  • "Public API" was the docs trigger. AGENTS.md said to update the docs when a public API changes, and defines public API as whatever index.ts exports. Modules can only import core through that entry point, so every helper a module needs counts as public API and, by that rule, needs docs. review-pr checked the same thing.
  • Nothing said what docs are for. With no bar for content, behaviour notes that belong in a PR body ended up in the docs.
  • "Incomplete" was read as "doesn't mention my feature". AGENTS.md says to update a skill or the file in the same PR when it is wrong or incomplete.

Examples: #1594 added a "Polling" docs section for the poll helper and a line about it to the add-module skill. #1584 adds a line about its startup signal to the same skill.

Changes:

  • AGENTS.md "API and docs": docs are required for user-facing API changes, not for helpers exported for modules. Docs say how to use a feature, and implementation detail goes in the PR body.
  • AGENTS.md "Purpose": says what "wrong or incomplete" means, and that adding a feature is not a reason to add a line.
  • write-code: a "Before touching docs" section states the rule at the point the docs get written, and the line about exporting a helper from core says it gets no docs. That line called the export "public API", which is what led to the docs.
  • open-pr: the pre-commit checks include checking any docs/, AGENTS.md or skill changes in the diff against the rule.
  • review-pr: the Docs check matches the new rule and flags the two kinds of docs above. The Scope check flags AGENTS.md or skill lines that only describe the PR's own feature.

Verification

npm run format, npm run lint and npm run knip pass. The change is Markdown outside docs/, so there are no tests to run and the docs build is unaffected.

Not breaking

Only AGENTS.md and three skills change. No package code, docs or workflows are touched.

Scope the docs rule in AGENTS.md to user-facing API changes, say that docs describe how to use a feature rather than how it is implemented, and say that adding a feature is not a reason to add a line to AGENTS.md or a skill. Update the review-pr checklist to match.
@cristianrgreco cristianrgreco added maintenance Improvements that do not change functionality patch Backward compatible bug fix labels Oct 13, 2026
Put the rule where docs get written and where the diff is checked before committing, so it is not only caught at review.
@cristianrgreco
cristianrgreco marked this pull request as ready for review October 13, 2026 17:09
@cristianrgreco
cristianrgreco merged commit 325cfc2 into main Oct 13, 2026
15 checks passed
@cristianrgreco
cristianrgreco deleted the claude/scope-docs-to-user-facing branch October 13, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Improvements that do not change functionality patch Backward compatible bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant