Repository navigation
feat(implement): load coding principles on demand from reference files - #37
Merged
Merged
Conversation
SKILL.md keeps the design, build, and check steps, the outside-contract rule, and the report, plus a table saying when to read each principle. Each of the 14 principles is now a short file in references/ with its rule and a test the change is checked against, so a run loads only the ones its change triggers. The reference files add what the inline version lacked: the two imagined edits for judging tests, pairing "never happens" with a case where it does, passing the clock and other outside systems in as fakes, the crash-at-every-point check for reruns, "instructions are not concurrency control", and scaffolding shared types and fakes first. Two eval cases cover principles the suite didn't: discount-code-expiry (tests pinned to internals and message text) and report-json-flag (smallest change, one decision point, no speculative options).
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Approach: sound — moves each coding principle into its own references/ file and keeps SKILL.md as the steps plus a "read when" table, so a run loads only what its change triggers.
Reviewed changes
Read the full diff and checked the result against implement-issue's references to implement. I also ran both new fixture suites.
SKILL.mdrestructure — the inline principles become a trigger table. Steps 1–3, the outside-contract rule, and the report shape are kept, and step 3 now checks the diff against each loaded principle's test.- 14 principle files — each has a rule and a closing Test: line. The new guidance is in
test-behavior-not-implementation.md,make-operations-idempotent.md, andseparate-before-serializing-shared-state.md. - Two eval cases —
discount-code-expiryandreport-json-flag, each with a fixture, prompt, and graders.python3 -m unittest discover -s tests -t .passes on both starting trees (7 and 1 tests). - Version bump to 0.17.1 — matches in
.claude-plugin/plugin.json,plugin.json,gemini-extension.json, and the README badge. implement-issuestill holds — its "subtraction" reference now resolves tosubtract-before-you-add.md, whichSKILL.mdlists in the table.
claude-sonnet-5-5 | 𝕏
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Why
The implement skill packed every coding principle into SKILL.md, so each run carried all of them whether the change needed them or not, and several principles were only half there: how to judge a test, how a rerun should behave after a crash, why a lock is the last resort for shared state.
What
Each principle now lives in its own short file with its rule and a test the change is checked against. SKILL.md keeps the steps and a table that says which file to read for which kind of change, so a run loads only what it needs.
New guidance the inline version lacked: judging each test against "break the behavior" and "change the internals", pairing a "never happens" test with one where it does, passing the clock and other outside systems in as fakes, checking a rerun after a crash at every point, "instructions are not concurrency control", and laying shared types and fakes before the feature.
Measured against the old skill on 8 cases, 2 runs each, with a grader per case ranking the four runs without knowing which version made which:
Runs read 6 to 9 of the 14 files, matched to the change (the rerun file only on rerun cases, the shared-state file only on the parallel sync case). The old skill's three misses were all on
discount-code-expiry, where it kept tests that patch internals and compare message text. A first draft madeorder-cancel-statusruns add an unrequested error class; the test file now asks for error-type assertions only where the code already has one, and a rerun confirmed the class no longer appears.Merge danger
Reversible: yes. The change is skill text and eval fixtures; a revert restores the old SKILL.md.
Blast radius: contained. Every code change that loads implement, directly or through implement-issue, now reads the principle files its change triggers. implement-issue's references to implement's first check run and subtraction still hold: SKILL.md keeps the first check run, and the subtraction rule is in
subtract-before-you-add.md, which every measured run read. Version bumped to 0.17.1 in every manifest and the README badge.How to test
Automated: the Manifests workflow checks the versions match. Both new fixtures pass their own suites on the starting code (
python3 -m unittest discover -s tests -t .infiles/tillandfiles/tally).Manual
main, and compare.