feat(dx): enforce documentation upkeep in /create-issue and /work skills - #1769
feat(dx): enforce documentation upkeep in /create-issue and /work skills#1769norbert-kulus-blockydevs wants to merge 3 commits into
Conversation
Add a mandatory documentation step to the two fast-path workflow skills so reference docs, package-local docs, ADRs, and stale why-comments stop drifting out of sync with the code. /create-issue: diagnose doc impact in Step 2, emit a `## Docs impact` section (central docs + package-local docs + ADR) in the issue format, add a docs acceptance criterion, and add Step 5 to self-assign the requesting user. The in-progress label is intentionally NOT applied at issue-creation time - it marks active work and is applied by /work when implementation starts. /work: add a mandatory Phase 4.5 - Documentation between Implement and Review & Ship that classifies impact across four levels, edits what applies, and carries a `## Docs` statement into the PR body. Add a behavior rule forbidding a silent skip. Closes #1768 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>
a55dde1 to
5fb06b8
Compare
norbert-kulus-blockydevs
left a comment
There was a problem hiding this comment.
Review — enforce documentation upkeep in /create-issue and /work skills
Reviewed across three lenses (skill-instruction correctness, contributor/DX experience, domain-documentation-taxonomy consistency). This is a well-targeted DX change: the three-level doc classifier (central docs/ → package-local → ADR → in-code comments) is grounded in the repo's real layout — every one of the ~11 central docs and the package-local example paths it references actually exists — routes each change kind to the right doc, and ships a sensible None — <reason> escape hatch so trivial fixes don't force stale-doc churn. Verdict: Approve with changes — no blockers; two cross-file inconsistencies worth reconciling before merge, the rest polish.
🟡 IMPORTANT — --assignee @me (gh CLI) contradicts work.md's "gh CLI is not installed"
Flagged independently by two lenses. create-issue.md:54 Step 5 instructs --assignee @me, which is gh CLI syntax, but its sibling work.md:25 states "All GitHub operations use the MCP GitHub tools (gh CLI is not installed)" and does everything via MCP (add_issue_comment, issue_write, get_label). Within one skill suite the two files now disagree on whether gh even exists — whoever runs /create-issue will reach for a tool the sibling skill says isn't there. Reconcile onto one GitHub tooling path (name the MCP update_issue/equivalent, or make it tool-neutral: "assign it to the requesting user").
🟡 IMPORTANT — ship.md left divergent, providing a silent bypass of the new enforcement
/ship (.claude/commands/ship.md) is a third PR-producing skill that also branches, commits Closes #N, and opens the PR — but its Phase 4 — Documentation (ship.md:73-83) is the old, thinner version: only 5 central docs, no package-local/ADR/in-code-comment levels, no mandatory doc-impact statement, and its PR template (ship.md:87-116) has ## Summary/## Changes/## Test plan/## Tech review but no ## Docs section. So an author who runs /ship instead of /work silently escapes the "mandatory, do-not-skip" gate this PR adds — the suite now carries two contradictory doc-upkeep standards. Arguably outside the PR's literal "in /create-issue and /work" scope, but it directly undercuts the stated goal of enforcing upkeep. Either update ship.md Phase 4 + PR template to match (or have it defer to work.md Phase 4.5), or explicitly scope it out in the PR body.
🟢 SUGGESTION items (non-blocking)
- "Enforce"/"mandatory" is self-attested, not enforced — there's no lint/CI check for the
## DocsPR section (grep ofscripts/and.github/finds none); theNone — <reason>escape is trivially satisfiable and the assistant both writes and judges its own statement. Reasonable for a prompt-based skill, but the word "enforce" oversells a soft convention. If a hard gate is wanted, a CI check asserting the PR body contains a## Docssection is the way; otherwise consider softening the wording. - Promote the anti-padding guardrail — the strong "must produce a statement / a silent skip is a defect" framing, combined with an assistant's compliance bias, can nudge toward padding docs to look compliant. The mitigations are already written in ("Update intent and current state, not a changelog of your diff. Do not add docs for things already covered") but buried in step 3 — promote that line directly under the Phase 4.5 heading so "don't over-document" is as prominent as "don't skip."
lessons.mdroute omits its own graduate-don't-duplicate rule — a change that alters a naming convention hits bothengineering-standards.mdandlessons.md, and the classifier gives no precedence hint, leaving a narrow path to write an architectural rule into the regression ledger. One clause ("record empirical gotchas here; if it's an actual rule, put it in the canonical doc and leave only a pointer") closes it — matcheslessons.md's own preamble.- Classifier is duplicated across
create-issue.md(issue-time "Docs impact" prose) andwork.md(Phase 4.5 table) with slightly different phrasings (e.g.capabilities.mddescribed differently in each) — they agree today but will drift; consider pointing both at the canonicalCLAUDE.mdreference-doc table as the single source. capabilities.md's "authoritative full inventory" status isn't surfaced — the classifier pairs port/capability changes with "architecture-overview.md (+ capabilities.md)" but a contributor may update the curated highlight and skip the code-synced full list; a half-line ("capabilities.md is the authoritative full list — always update it; architecture-overview is a curated subset") prevents it going stale.- Scope creep in the PR body — Step 5 also adds self-assignment +
in-progress-label timing, unrelated to doc upkeep; a one-line note in the PR body makes that policy change reviewable on its own terms. - Near-identical artifact names — the issue's
## Docs impact(prediction) vs the PR's## Docs(outcome) are deliberately different, and work.md correctly calls the issue section "the hypothesis, not the final answer," but a one-line "the PR## Docsis the realized version of the issue's## Docs impact" removes any conflation. - Vague lint-rerun hedge — work.md:160's "re-run lint if any doc has a linked invariant (rare)" has no concrete referent today (
check:invariantstargets code, not docs); drop it or make it concrete.
What's solid
- All references are grounded — every central doc, the ADR README, and the package-local examples (
ksefFA3 notes, setup-guide, root README) verified to exist; the(#NNN)annotation guidance matches the actual convention inarchitecture-overview.md. - Taxonomy-faithful routing — ADR "when to write / skip" mirrors
adrs/README.mdverbatim (no ADR spam), the three-level model maps cleanly onto the repo's docs-live-close-to-code layout, and the in-code-comment clause stays within CLAUDE.md's "keep why comments truthful, never add what comments" rule. - Proportionate friction — the
None — <reason>escape on both the issue side and the/workside means a trivial fix costs two one-line statements, not a doc-editing detour; the/create-issue → /workdiagnose-then-verify handoff reduces rediscovery rather than duplicating effort. - Good cross-file coherence on the
in-progresslabel —create-issue.md:58correctly defers label application to work.md Phase 1.5, exactly where it lives.
…soften enforce framing Address the consolidated review on PR #1769: - create-issue.md: drop `gh` CLI `--assignee @me` (contradicted work.md's "gh CLI not installed"); route issue create/assign through MCP tools. - ship.md: replace the thinner Phase 4 doc step with the /work Phase 4.5 standard (three levels + doc-impact statement) and add a `## Docs` section to its PR template, closing the silent-bypass path. - work.md: soften "mandatory/enforce" to an honest self-attested convention with a CI-check follow-up note; promote the anti-padding guardrail under the Phase 4.5 heading. - Both skills: point the doc classifier at the canonical CLAUDE.md Reference Documentation table as single source; note capabilities.md is the authoritative full inventory; add the lessons.md graduate-don't-duplicate clause; clarify `## Docs impact` (prediction) vs `## Docs` (realized); drop the vague lint-rerun hedge. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>
Review findings addressedThanks for the thorough three-lens review. All items addressed in IMPORTANT1. 2. SUGGESTION3. "Enforce"/"mandatory" oversells a self-attested convention. 4. Promote the anti-padding guardrail. 5. 6. Classifier duplicated across the two skills (drift risk). 7. 8. Scope creep (self-assignment + 9. Near-identical 10. Vague lint-rerun hedge (work.md:160). No quality gate was run: the change is markdown/skill files only, no script or config touched. |
/pr-review - post-fix verification passRe-reviewed the PR in its current state (head Verification of the 10 previously-claimed fixesAll 10 items from the prior review comment are genuinely fixed in the current diff:
New/independent findings[IMPORTANT] -
[IMPORTANT] -
[SUGGESTION] -
[SUGGESTION] -
Documentation-taxonomy alignment (this PR's own subject matter)
Merge readinessApprove with changes. The prior review's 10 findings are genuinely resolved. However, this fix round introduced one new, self-inflicted inconsistency (the Priority fixes (if any)
|
…ool names Close the self-contradiction introduced by the docs-upkeep classifier: add a docs/capabilities.md row to CLAUDE.md's Reference Documentation table so the "CLAUDE.md is the single source of truth" rule no longer silently drops the capabilities.md requirement the classifier declares authoritative. Swap the nonexistent GitHub MCP tool references in work.md Phase 1.5 / Phase 5 (issue_read, issue_write, get_label, search_pull_requests) for the real tools (get_issue, update_issue, list_pull_requests), matching create-issue.md Step 5. Document the new ## Docs PR-body section convention in engineering-standards.md § Pull Requests so non-AI contributors see it too. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: norbert-kulus-blockydevs <norbert.kulus@blockydevs.com>
Post-fix findings addressedAll findings from the post-fix verification pass are addressed in IMPORTANT - capabilities.md / CLAUDE.md divergenceAdded a IMPORTANT - nonexistent MCP tool names in work.mdVerified the real GitHub MCP toolset before renaming (
work.md is now consistent with create-issue.md Step 5's SUGGESTION - search_pull_requests in Phase 1.5 step 1Dropped. The line now references only SUGGESTION - engineering-standards.md § Pull RequestsAdded a one-line bullet to the PR-description list noting the new Note on adjacent stale references (not addressed - out of scope)
Markdown/skill files only - no quality gate run. Commit |
Summary
/create-issue,/work) so reference docs stop drifting out of sync with the code. This is a self-attested convention in the AI instructions, not a hard CI gate (per request).docs/*.md, package-local docs (integration READMEs + theirdocs/,apps/web/README.md, rootREADME.md, in-tree notes), ADRs, and stalewhycomments in the code./ship(the third PR-producing skill) is aligned to the same standard so it isn't a silent bypass.Changes
.claude/commands/create-issue.md## Docs impactsection in the issue format (central docs + package-local docs + ADR) - a pointer/workconsumes, not an edit.update_issuetool (noghCLI). Thein-progresslabel is intentionally not applied here -/workapplies it (Phase 1.5) when work actually starts..claude/commands/work.md## Docs impact, runs a classifier across four levels, edits what applies in each doc's existing style, and produces an explicit doc-impact statement.## Docssection..claude/commands/ship.md/workPhase 4.5 (four levels + doc-impact statement); PR template gains a## Docssection.Scope note
Step 5 of
/create-issuealso sets issue self-assignment and defers thein-progresslabel to/workPhase 1.5. That is a workflow/policy tweak adjacent to - but distinct from - the documentation-upkeep goal of this PR; called out here so it can be reviewed on its own terms.Test plan
/create-issuecreated [TASK] DX — enforce documentation upkeep in /create-issue and /work skills #1768 with a## Docs impactsection and assigned it;/workappliedin-progressand produced this## Docsstatement).Docs
None - this change edits the workflow skills themselves. It introduces no port, capability, cross-context edge, schema change, or FE pattern, so no central
docs/*.md, package-local doc, or ADR is affected, and no in-codewhycomment is contradicted. The edited files are the process definition, not documentation of the system.Closes #1768
🤖 Generated with Claude Code