fix(skills): name the diagnosis precondition in idd-plan's description (#276)#279
Draft
kiki830621 wants to merge 1 commit into
Draft
fix(skills): name the diagnosis precondition in idd-plan's description (#276)#279kiki830621 wants to merge 1 commit into
kiki830621 wants to merge 1 commit into
Conversation
#276) A skill's frontmatter `description` is the only surface an AI reads when choosing which skill to invoke — the SKILL.md body loads only after the skill has already been selected. idd-plan's description named no precondition, so an AI advised a user to skip `/idd-diagnose` and run `/idd-plan` directly; that inference was correct on the information visible to it. The hard abort at skills/idd-plan/SKILL.md:62 stays exactly as-is (implementation is authoritative) — this corrects the machine-facing surface only. Measuring all 17 skills against the house pattern (`Use when:` + `防止的失敗:`) found 5 off it, not 1 as the diagnosis predicted. All 5 are corrected together per the shared-abstraction contract: idd-plan precondition + remedy + failure mode (root cause) idd-clarify Use when + failure mode idd-comment Use when idd-all-chain failure mode idd-report failure mode idd-plan and idd-clarify were also the only two skills carrying a bare single-line description rather than a `description: |` block — the format itself acted as an affordance for under-specification. Both now use the block form. New drift-guard suite scripts/tests/skill-description-contract asserts A1 field present, A2 `Use when`, A3 `防止的失敗`, A4 diagnosis precondition for an explicit allowlist (idd-plan, idd-implement). Auto-discovered by run-all-tests.sh. RED 8 failing -> GREEN 56/0; reverting idd-plan alone re-reds exactly 3, so the assertions are not placebos. Aggregator: 41 suites, 0 failed. Phase 1 of two. The wiki flowchart generated from docs/workflows.md is deliberately not in this change, and the issue stays open.
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.
Refs #276 — Phase 1 of two. This PR does not close the issue.
The root cause
Three surfaces carry the
idd-plan↔idd-diagnoseordering. Only one of them is readable at the moment an AI decides which skill to invoke:docs/workflows.md:49— theP-plan-gatedchainskills/idd-plan/SKILL.md:62— the hard abortidd-planfrontmatterdescriptionSo when a user's AI advised them to skip
/idd-diagnoseand run/idd-plandirectly, that inference was correct on the information visible to it. The routing error was structural, not incidental.The hard abort is unchanged — implementation stays authoritative (maintainer ruling, 2026-07-26). This PR fixes the machine-facing surface only.
Scope correction found while planning
The diagnosis predicted one file. Measuring all 17 skills against the house pattern (
Use when:+防止的失敗:) found five off it, so all five are corrected together per the shared-abstraction contract:idd-planidd-clarifyUse when+ failure modeidd-commentUse whenidd-all-chainidd-reportidd-planandidd-clarifywere also the only two skills carrying a bare single-linedescriptioninstead of adescription: |block — the format itself acted as an affordance for under-specification. Both now use the block form.The new
idd-planwording gives the remedy, not just a warning ("run/idd-diagnose #Ninstead"), so the fix does not over-correct into teaching AIs to avoid the skill entirely.Drift-guard
New suite
scripts/tests/skill-description-contract/test.sh, auto-discovered byrun-all-tests.sh:descriptionUse when防止的失敗Two limits are documented in the file's header rather than papered over:
Use when: 需要時would pass. Same self-declared stance asscripts/tests/docs-catalog-sync./idd-diagnosefirst") was tried and rejected: it also matchesskills/idd-close/SKILL.md, where the string sits in a meeting-deliverable fallback, not as a precondition of its own (close is gated on verify). A derived rule would forceidd-closeto advertise a precondition it does not have.Test plan
idd-plan/SKILL.mdre-reds exactly 3, restoring returns 56/0Not in this PR
docs/workflows.md, plus theREADME.md:52pipeline diagram that depends on it. Bundling it would keep the mis-routing live while the generator gets designed; it also has three open decision points and writes to a second git repo.idd-planhard abort logic.