feat: coding standard durable references#79
Conversation
6561808 to
c72e0e5
Compare
|
this looks great! i ran it through a small project i've been working on, and the output was a significant improvement over the prior versions of the skill. thank you for this! i also wanted to note that i ran this through the Review summary:
|
c72e0e5 to
1fb9796
Compare
…t go stale Generated coding standards cited bare file:line references and snapshot rosters of current consumers, both of which go stale as the code they describe evolves. Standards now cite a durable anchor (an exported symbol or a stable doc heading) and state applicability as a membership criterion, with an opt-in exception that matches a project's established line-number house style. The rule lives in references/durable-references.md and is enforced across the skill's research mode (Step 4 evidence gathering) and authoring mode (Step 6 drafting and Step 10 verification). The standard template now models anchored references, and the long-form operator doc is refreshed to match. Closes testdouble#73 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1fb9796 to
028d11a
Compare
|
Fixed, with two caveats:
|
Test runs showed durable anchors landing cleanly but temporal wording still leaking into generated standards through two idioms a flat word scan misses: narrating a cited anti-pattern by its momentary backlog status, and conditioning a rule on a roadmap or version state. Rule 4 now names both idioms and teaches the timeless reframe, and the Step 10 verification scans the whole prose against the rule rather than only the citations. Neutralized the behavior-paired worked example so the rule file carries no domain-specific reference. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
One more caveat, completely removing duplication re-introduced temporal wording, so I had to add back a bit of enumeration in step 10. Overall, my experience is that some duplication is necessary even if it deludes context, especially with 1M variant. Also, expanded durable reference rules with new failure modes spotted in recent runs. |
Summary
This PR changes the
/coding-standardskill so the standards it generates cite code by durable anchors (an exported symbol or a stable doc heading) instead of barefile:linereferences and snapshot consumer lists, so that a generated standard stays accurate as the code it describes evolves instead of going stale./coding-standardskill only. No other skill, agent, or already-generated standard file is touched. Closescoding-standardskill generates standards that cite volatile codebase state, so produced standards go stale #73.Behavior changes
When you run
/coding-standardafter this PR:Applies Toas a membership criterion, and removes temporal words like "today" / "currently" / "existing."What to look at first
durable-references.mdis the core design decision: a researcher gathering evidence applies Rules 1-2 and is allowed to report line ranges, while the author applies all four and may not. Confirm that boundary reads cleanly, since the whole anti-staleness guarantee rests on the author never pasting the range through.durable-references.md(Step 6 authoring and Step 10 verification apply it rather than restating it). It is the one place a line number survives, and the constraint that it must always ride alongside an anchor — never anchorless — is the load-bearing rule.How this was tested
git worktree, and compared the two generatedserver-background-jobs.mdfiles.Applies Toas a membership criterion.Files of interest
han-coding/...references/durable-references.md— the new rule; defines the two reader modes and all four rules.han-coding/skills/coding-standard/SKILL.md— wires the rule into Step 4 (research), Step 6 (authoring), and Step 10 (verification).han-coding/...standard/references/template.md— example reference reshaped topath, anchor — note.docs/skills/han-coding/coding-standard.md— operator doc refreshed to describe the anchored-citation behavior.Notes
I did not include research docs and implementation specs/plans. Let me know if you want them.