Repository navigation
refactor(aidd-pm): rewrite the spec skill in the generator's format and check the spec it writes - #1338
Merged
Conversation
…nd check the spec it writes The router keeps only its diagram and transversal rules, each action step is one sentence, and build and refine run validate-spec.cjs on the spec they write. SPEC-01 holds spec.md to its template; the aidd-pm turn-end hook applies it too. The weighted spec-validator.yml, read by no file, is removed. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RY5w5YEbGF6DpKkbU9uyJS
… respects A spec now carries status: draft or locked in its front matter, and SPEC-01 refuses any other value. Refine reads it first and writes nothing on a locked spec; only the person who approves a spec locks it. Build maps a PRD's headings to the spec's sections and takes a hard constraint only from its Dependencies. The vague "few acceptance criteria" rule is dropped, and the argument hint names the findings refine needs. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RY5w5YEbGF6DpKkbU9uyJS
…ailure case A locked spec must have no open question left, checked by SPEC-02. Build asks at most three questions on the gaps that change the target most, and goes on with the gaps when no user can answer. Every hard constraint is proven by a Done-when condition, Done-when covers a refused or failed case, and a request holding several outcomes keeps one and lists the others as Non-goals. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RY5w5YEbGF6DpKkbU9uyJS
…ne content reference The description names both modes, build writes the spec first and asks its open questions after, and the per-section judgment moves to references/spec-content.md, replacing the TBD marker reference. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A model wrote the empty marker as a bullet, `- None`, which a locked spec then failed on. Omitting the section leaves nothing to spell. A refine now answers with each changed line as a diff and names any other section that breaks the content reference, without changing it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A refine trial added a bare question to Open Questions and the contract let it through, since the template checks headings, not lines. SPEC-03 holds every line of that section to `- TBD: <question>`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
An SDLC trial on a small model wrote `node --test` passes as a Done-when condition. SPEC-04 refuses a test runner or a tests-pass phrase there: the plan and the assert step own how a condition is checked. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XeK3mDBqVCeeSgD36xKnAf
A list of test runners can never be complete. The contract checks only a spec's shape; whether Done-when names a command stays a judgment in spec-content.md. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XeK3mDBqVCeeSgD36xKnAf
…answer template Build no longer maps a PRD's headings: spec-content.md says what each section holds, whatever the source calls it. Refine fills assets/refine-answer.md, a diff of the changed lines. The gap definition moves into the Open Questions row, and the locked-spec sentence goes, since SPEC-02 checks it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XeK3mDBqVCeeSgD36xKnAf
… one The skill no longer tells a request from a document, or review findings from answers: build reads the need wherever it is written, and refine applies the changes it is given. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XeK3mDBqVCeeSgD36xKnAf
Build asks only when no outcome can be named, and writes to the first folder that exists in an ordered list. Refine stops before writing when no change applies, and its answer template carries the open questions the transversal rule asks for. The template's title slot holds one name, and a non-goal is decided, while an undecided item is a gap. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XeK3mDBqVCeeSgD36xKnAf
Both trial models refused to rewrite a locked spec, then offered to flip its status on confirmation. The rule now forbids changing that status or offering to. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XeK3mDBqVCeeSgD36xKnAf
…r, already listed as a gap Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XeK3mDBqVCeeSgD36xKnAf
… rechecks it Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XeK3mDBqVCeeSgD36xKnAf
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.
🎯 What & why
aidd-pm:04-specis rewritten in the skill generator's format, and the spec it writes is checked against its contract: its shape by a script, its content by one reference.🛠️ How it works
SKILL.md: a diagram and three transversal rules. Two modes, named in the description: create (build) and update (refine).assets/refine-answer.md: the path, a diff of the changed lines, any other section that breaks the content reference, unchanged.spec-content.mdsays what each section holds. A ticket is fetched by the caller, as the SDLC does.references/spec-content.md: one table, what each section holds and never holds. Replacestbd-marker.mdandspec-validator.yml, which nothing read.status: draftorstatus: locked. Refine writes nothing on a locked spec; only its approver sets that status.scripts/contract.jsonchecks shape only, never content:SPEC-01SPEC-02SPEC-03- TBD: <question>Nonemarker a model wrote as- None.🧪 How to verify
node --test scripts/__tests__/check/spec-contract.test.js: 8 pass. Each rule's test failed before its code and fails again when the check is disabled.node scripts/check/run.cjsandvalidate-skill.cjs plugins/aidd-pm/skills/04-specexit 0.haikudeepseek-v4.1-flash-freenpm testDone-when it leftaidd-orchestrator:01-sdlconhaiku, "Let users delete a todo" in an empty repo: frame, spec, plan, implement, assert, review, challenge, four commits. It stopped only at the pull request, the repo having no remote. The spec held no test command in Done-when, and the choices made without an answer went to Context.SPEC-03), wrote one exclusion in two sections, and ignored refine's- old/+ newanswer form.🔗 Linked issue
Part of #1164
🤖 Generated with Claude Code
https://claude.ai/code/session_01XeK3mDBqVCeeSgD36xKnAf