Repository navigation
feat(#571): /spec ac-linter — detect title/body verification-method tension - #586
Merged
Merged
Conversation
…ension
Adds a new ACLintIssueType variant `title-body-tension` to warn when an AC's
head (text up to first `.` or `\n`) contains a documentation noun ("note",
"comment", "documentation", "description", "snippet", "entry", "mention")
while the body contains a runtime imperative ("execute", "trigger", "capture",
"verify by running", "reproduce", "confirm at runtime", or a `run /<slash>`
pattern). Two different verification bars in one AC silently pass /spec, get
implemented to the looser bar, and surface as gaps post-merge — the linter
now flags the divergence so the reviewer can either tighten the title to match
the runtime body, or split the runtime requirement into a separate AC.
Implementation lives next to DEFAULT_LINT_PATTERNS as a small helper
`detectTitleBodyTension(ac)` that runs after the regex pattern loop. Helper
is structural (needs the title/body split) rather than another regex row, so
it stays a function rather than expanding the LintPattern shape. Same
warning-only return convention as the existing four issue types.
5 new tests in describe("title-body-tension patterns"):
- positive: AC-5 from #562 verbatim ("Smoke test note... trigger /fullsolve...")
- negative-1: consistent docs ("Add CHANGELOG entry. Write a single bullet...")
- negative-2: consistent runtime ("Run end-to-end test, capture output.")
- suggestion contains both (a) and (b) resolutions
- emits warning, does not throw
SKILL.md AC Quality Check table mirrored across .claude/skills/spec/,
skills/spec/, and templates/skills/spec/.
Closes #571
This was referenced May 6, 2026
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.
Summary
Adds a new
title-body-tensionrule to the/specAC quality linter (src/lib/ac-linter.ts). Warns when an AC's title implies a documentation bar (head text up to first./\ncontainsnote/comment/documentation/description/snippet/entry/mention) while its body specifies a runtime/execution bar (execute/trigger/capture/verify by running/reproduce/confirm at runtime, or arun /<slash-command>pattern). Suggestion offers two resolutions: (a) tighten the title to match the body, or (b) split the runtime requirement into a separate AC.Closes the gap motivated by #562 AC-5: title said "note in PR description" while body required runtime evidence capture; exec implemented to the title, QA marked MET, the gap surfaced post-merge.
Changes
src/lib/ac-linter.ts— extendACLintIssueTypewith"title-body-tension"; adddetectTitleBodyTension()helper; wire after the regex pattern loop inlintAcceptanceCriterion.src/lib/ac-linter.test.ts— newdescribe("title-body-tension patterns")block with 5 tests: positive (bug(fullsolve): unqualified Skill("loop") resolves to recurring-prompt skill, breaking quality loop #562 AC-5 verbatim), 2 negatives (consistent docs / consistent runtime), suggestion-text contract, does-not-throw..claude/skills/spec/SKILL.md,skills/spec/SKILL.md,templates/skills/spec/SKILL.md— new row in the AC Quality Check table (3-dir sync).CHANGELOG.md—[Unreleased]→### Addedentry.Test plan
npm run buildpassesnpm run lintpasses (0 errors, 0 warnings)npx vitest run src/lib/ac-linter.test.ts— 39/39 passed (34 existing + 5 new)/speclinter does NOT fire on this issue's own ACs (correct — title and body agree on the bar in each)matchedPattern = title="note" + body="trigger", suggestion contains both(a)and(b)grep -c "Title/body tension"returns 1 per file)Verdict from /qa
READY_FOR_MERGE— all 5 ACs MET, no scope creep, warning-only convention preserved, word-list philosophy ("start small, expand as false-negatives surface") honoured.Closes #571