Repository navigation
Description
Summary
The title-body-tension linter rule from #571 / #586 ships with intentionally tight coverage. Post-merge adversarial audit (/fullsolve 571 → "any gaps?") surfaced three real false-negative classes that should be tightened before relying on the rule for production /spec runs.
All gaps confirmed by running the detector at src/lib/ac-linter.ts against constructed AcceptanceCriterion fixtures.
Confirmed False Negatives
1. Separator narrowness
detectTitleBodyTension splits on description.search(/[.\n]/) only. Common AC styles using colon or em-dash separators are silently passed.
| Input | Should warn? | Detector |
|---|---|---|
"Documentation note: trigger /fullsolve and capture output" |
yes | ❌ no |
"Doc snippet — trigger workflow and capture output" |
yes | ❌ no |
"Smoke test note in PR description. Manually trigger ..." (#562 AC-5 verbatim) |
yes | ✅ yes |
2. Paraphrased motivating-example test fixture
src/lib/ac-linter.test.ts:228-240 uses a one-line paraphrase as the "motivating example from #562 AC-5". The detector fires on the verbatim multi-line text only because line 1 happens to contain trigger — a regression that broke either parser or linter on the verbatim string would still pass this paraphrased test. Memory feedback_motivating_example_regression.md and feedback_synthetic_test_fixture_trap.md cover this anti-pattern.
3. Inflected runtime-imperative forms
RUNTIME_IMPERATIVES items like trigger and capture are matched as \b<word>\b, missing past-tense and gerund forms common in AC body prose:
| Input | Detector |
|---|---|
"Add note to PR description. Output is captured and workflow triggered automatically." |
❌ no |
Acceptance Criteria
- AC-1: Widen separator regex.
detectTitleBodyTensioninsrc/lib/ac-linter.tssplits on/[.\n:—]/(period, newline, colon, em-dash). Existing\bnote\b/\btrigger\betc. lookups remain unchanged. - AC-2: Replace paraphrased fixture with verbatim bug(fullsolve): unqualified Skill("loop") resolves to recurring-prompt skill, breaking quality loop #562 AC-5 source. The "motivating example from bug(fullsolve): unqualified Skill("loop") resolves to recurring-prompt skill, breaking quality loop #562 AC-5" test in
src/lib/ac-linter.test.tsuses the literal multi-line description string as it appears in the issue body, not the current paraphrase. - AC-3: Suffix-tolerant runtime-imperative matching. Update the runtime-imperative regex construction so that
trigger,triggers,triggered,triggeringall match (and likewise forcapture,execute,reproduce). E.g.,\b<verb>(?:s|ed|ing|d)?\bor stem-aware list. - AC-4: Test fixtures for each fixed gap. Three new fixtures in
src/lib/ac-linter.test.tscovering: colon separator, em-dash separator, inflectedcaptured/triggered. Each assertstensionis detected. - AC-5: 3-mirror SKILL.md update.
/spec's AC Quality Check table row for title/body tension reflects the broadened pattern (mention separators and inflections briefly). Sync across.claude/skills/spec/SKILL.md,skills/spec/SKILL.md,templates/skills/spec/SKILL.md.
Non-Goals
- Not widening
DOC_NOUNSbeyond the original 7. False-negative volume in that list isn't yet observed; word-list creep is a known concern (see feat(spec): ac-linter — detect title/body verification-method tension #571 Risks). - Not fixing
parseAcceptanceCriteriamulti-line drop. When the AC body wraps across markdown source lines, the parser only captures line 1; lines 2+ are dropped before the linter sees them. This is a pre-existing limitation that materially caps the linter's coverage on the exact class of multi-line ACs it targets, but is parser-layer concern, not linter-layer. File a separate issue if and when it surfaces in practice.
Risks / Open Questions
- False positives from broadened separator. Colon is also used in identifier prefixes (
AC-3:,feat:) — butparseAcceptanceCriteriastrips the AC ID prefix before the linter sees the description, so the first colon in the parsed description is genuinely a body separator. Verify with a unit test onImplementation: trigger workflow(should warn). - Inflection greediness.
\btrigger(?:s|ed|ing|d)?\bcould matchtriggersin unrelated contexts. Mitigation: warning-only (per AC-2 of feat(spec): ac-linter — detect title/body verification-method tension #571).
Complexity
small — ~20 LOC change in ac-linter.ts + ~30 LOC of tests + 3-mirror SKILL.md row tweak. No new files.
Self-Assessed Workflow
spec → exec → qa — small surface, no UI; testgen optional.
Related
- feat(spec): ac-linter — detect title/body verification-method tension #571 / feat(#571): /spec ac-linter — detect title/body verification-method tension #586 — original linter rule
feedback_motivating_example_regression.md— verbatim issue-body examples are mandatory test fixturesfeedback_synthetic_test_fixture_trap.md— synthetic fixtures hide false negatives
Activity
admarble commentedon May 8, 2026
Complexity: Standard (5 ACs, 1 logical directory + 3 SKILL.md mirrors)
AC Quality Check
\bnote\b/\btrigger\betc. lookups remain unchanged."→ Open-ended: "etc." leaves scope undefined
→ Suggest: trivial — "etc." here references the existing word-list which is unchanged by this AC. Acceptable as-is; flagged for transparency.
✅ AC-2, AC-3, AC-4, AC-5: Clear and testable.
Summary: 1/5 flagged (false positive — "etc." refers to unchanged code, not new scope).
Scope Assessment
Non-Goals: Present in issue body (not widening
DOC_NOUNS; not fixing parser multi-line drop). ✅Verdict: ✅ SCOPE_OK (analyzer reports SCOPE_WARNING; the "3 directories" are
src/lib/plus 3 SKILL.md mirrors that must stay byte-identical, so logically a single change site. Feature-count "2" is a false split between linter code and SKILL.md doc — both serve one feature: tightened tension detection.)Acceptance Criteria
AC-1: Widen separator regex
Verification: Unit Test
Scenario: Given an AC description
"Documentation note: trigger /fullsolve and capture output"→ WhenlintAcceptanceCriterion(ac)runs → Then result includes atitle-body-tensionissue. Same for em-dash separator.Assumptions: Confirmed —
parseAcceptanceCriteriastrips theAC-N:prefix before the linter sees the description (regex captures(.+)after the:in patterns 1/2/4 and inside**...**for pattern 3, ac-parser.ts:45-54). So the first colon in the parsed description is genuinely a body separator, not an AC ID delimiter.AC-2: Replace paraphrased fixture with verbatim #562 AC-5 source
Verification: Unit Test
Scenario: Given the literal multi-line description from #562 AC-5 (verbatim, including
Smoke test note in PR description.** Manually trigger \/fullsolve` ...) → WhenlintAcceptanceCriterion(ac)runs → Thentitle-body-tensionis detected. **Assumptions:** The fixture bypassesparseAcceptanceCriteria(which would drop lines 2+ per the Non-Goal in #597) and constructs theAcceptanceCriteriondirectly with the multi-line string. Verbatim source fromgh issue view 562 --json body`.AC-3: Suffix-tolerant runtime-imperative matching
Verification: Unit Test
Scenario: Given
"Add doc note. Output is captured and workflow triggered automatically."→ When linter runs → Then tension detected via inflectedtriggered/captured.Assumptions: Multi-word entry
"verify by running"cannot use(?:s|ed|ing|d)?blindly (would produceverify by runnings/runninged). Implementation must apply suffixes only to single-word stems — either (a) split the list into single-word verbs (build with suffix regex) and multi-word phrases (literal\b<phrase>\b), or (b) maintain a single list of objects{stem, allowSuffix}.AC-4: Test fixtures for each fixed gap
Verification: Unit Test
Scenario:
src/lib/ac-linter.test.tsadds three newit(...)blocks underdescribe("title-body-tension patterns"): (i) colon separator, (ii) em-dash separator, (iii) inflected runtime imperative. Each assertsresult.issues.find(i => i.type === "title-body-tension")is defined.AC-5: 3-mirror SKILL.md update
Verification: Manual Test (diff)
Scenario: The Title/body tension row at line 89 of all three
SKILL.mdmirrors mentions the broadened pattern (separators and inflections, briefly).diff .claude/skills/spec/SKILL.md skills/spec/SKILL.mdanddiff .claude/skills/spec/SKILL.md templates/skills/spec/SKILL.mdproduce no output.Assumptions: Suggested wording: replace "doc-noun title (...) + runtime-imperative body (..., `run /`)" with "doc-noun title (...) + runtime-imperative body (matches inflections like
triggered/capturedand separators./\n/:/—)" — keep concise.Implementation Plan
Phase 1: Linter changes (
src/lib/ac-linter.ts)description.search(/[.\n]/)todescription.search(/[.\n:—]/). No other change todetectTitleBodyTension.RUNTIME_IMPERATIVESas-is (mixed single-word + multi-word), inside the.find()callback build the regex as:imp.includes(" ") ? new RegExp("\\b" + imp + "\\b", "i") : new RegExp("\\b" + imp + "(?:s|ed|ing|d)?\\b", "i"). Trivial heuristic — multi-word entries get literal match, single-word entries get inflected match.Phase 2: Tests (
src/lib/ac-linter.test.ts)gh issue view 562 --json body --jq .body | sed -n '/AC-5/,/AC-6\|^## /p'and embed with template literal.it(...)blocks to thedescribe("title-body-tension patterns")group covering colon separator, em-dash separator, and inflectedtriggered/captured. Each constructs anAcceptanceCriteriondirectly and assertstensionissue is present.Phase 3: SKILL.md mirror sync (3 files)
diffpairs to confirm byte-identical.Phase 4: Verify
npx vitest run src/lib/ac-linter.test.ts— all tests pass, including new fixtures.diff .claude/skills/spec/SKILL.md skills/spec/SKILL.md && diff .claude/skills/spec/SKILL.md templates/skills/spec/SKILL.md— empty output.Design Review
detectTitleBodyTensioninsrc/lib/ac-linter.ts. The fix is local — same function, same file. No new abstraction warranted.:—) and add per-entry inflection branching (1 ternary in the existing.find()callback). Reject: building a stems-tagged data structure ({stem, allowSuffix}) — overkill for ~5 entries with a clean single-word/multi-word split.DEFAULT_LINT_PATTERNSstyle (per-entry regex), but built dynamically from string lists. Same warning-only contract.—(U+2014) and not also en-dash–(U+2013)?" → Defensible answer: issue feat(spec): ac-linter title/body tension — coverage tightening #597 only enumerates em-dash; en-dash is rare in AC prose; if it surfaces, file-and-add. Avoid scope creep. Flag in Open Questions below.Feature Quality Planning
All standard checks pass. Notable items:
parseAcceptanceCriteriamulti-line drop. AC-2 fixture must bypass the parser — call out in test comment so future readers don't "fix" it by routing through the parser.ac-linter.tsadversarially for sibling code sharing the same root cause.detectTitleBodyTensionis the only function with title/body split logic; the\b<word>\bpattern inDEFAULT_LINT_PATTERNSis for word-list matching (vague/unmeasurable/etc.) where suffix tolerance is not desired (e.g., flagging "fast" should not also flag "faster"… actually the existing patterns do hand-roll suffixes —/\bwork(?:s|ing)?/,/\bfast(?:er)?\b/. So the codebase already has the inflection pattern; AC-3 just brings runtime-imperatives in line. No additional sibling work.Open Questions
–, U+2013) — include alongside em-dash? Recommendation: skip — issue feat(spec): ac-linter title/body tension — coverage tightening #597 only enumerates em-dash, en-dash is rare in AC prose, file follow-up if observed. Impact if wrong: occasional false-negative on an exotic separator (low).Recommended Workflow
Phases: spec → exec → qa
Quality Loop: disabled (small surface, all ACs unit-testable)
Reasoning: Pure code + test + 3-mirror doc edit. No UI. ACs all map to Unit Test or trivial diff verification. No
testgenphase — the test file already exists with establisheddescribestructure, AC-4 is "add 3it(...)blocks", which is faster to author directly than via stub generation. Matches issuer's own self-assessed workflow.Label Review
Current:
enhancementRecommended:
enhancement,simple-fix(optional — borderline; ~50 LOC across 5 files)Reason: Standard tier with clean ACs. No quality-loop trigger.
Quality Loop: Will not auto-enable (scope is logically green; analyzer's SCOPE_WARNING is a false positive driven by directory-spread heuristic counting
src/test/specsubstring matches).→ Optional:
gh issue edit 597 --add-label simple-fixadmarble commentedon May 8, 2026
Exec Phase — Progress Update
PR: #600
AC Coverage Summary
src/lib/ac-linter.ts:318— split on/[.\n:—]/src/lib/ac-linter.test.ts:228-243— literal multi-line description, parser bypass commentedsrc/lib/ac-linter.ts:333-342— stem-aware:\b<stem>(?:s|ed|ing)?\bfor non-everbs,\b<stem>(?:e|es|ed|ing)\bfore-ending verbs (handles gerunds likecapturing/reproducingtoo)src/lib/ac-linter.test.ts:246-282— colon, em-dash, inflected.claude/skills/spec/SKILL.md:89+ 2 mirrors (verified byte-identical)Files Changed
src/lib/ac-linter.ts(+15/-9): widened separator class, stem-aware suffix construction, JSDoc updatedsrc/lib/ac-linter.test.ts(+41/-1): replaced paraphrase fixture, added 3 new tests.claude/skills/spec/SKILL.md(+1/-1),skills/spec/SKILL.md(+1/-1),templates/skills/spec/SKILL.md(+1/-1): broadened pattern rowCHANGELOG.md(+1):### Fixedentry under[Unreleased]Test/Build/Lint Results
npx vitest run src/lib/ac-linter.test.tsnpx vitest run src/lib/ac-parser.test.tsnpm run buildnpm run lintQuality Plan Alignment
N/A — no
Feature Quality Planningsection in issue body. Spec comment's quality notes were honored:// Verbatim source from #562 AC-5 issue body (bypasses parser per #597 Non-Goals))detectTitleBodyTensionis the only function with title/body split logic; no other call sites needed changesLive Detection Verification
Ran the updated linter against the three "❌ no" rows from the issue body's confirmed-false-negatives table, plus an extra gerund case to confirm the stem-aware approach exceeds the spec's
(?:s\|ed\|ing\|d)?recommendation:All five cases now warn.
Pre-PR Confidence Check
e-ending verbs (\b<stem>(?:e|es|ed|ing)\b) is slightly more aggressive than the spec comment's recommendation ((?:s|ed|ing|d)?). I chose the broader pattern because AC-3 wording explicitly requires "trigger, triggers, triggered, triggering all match (and likewise for capture, execute, reproduce)" —capturing/executing/reproducingneed thee-drop handling that simple suffixing can't do. The broader regex could in principle matchcaptureretc., but those don't appear in the runtime-imperative semantic field, and the rule is warning-only per feat(spec): ac-linter — detect title/body verification-method tension #571 AC-2.ac-linter.ts(the stem-aware ternary) is exercised by both the existing bug(fullsolve): unqualified Skill("loop") resolves to recurring-prompt skill, breaking quality loop #562 AC-5 verbatim fixture and the new inflected fixture. SKILL.md byte-identity is verified bydiffrather than test, but the diff check is part of every CI run vialint:skill-callsprecedent.Next Steps
/qa 597to validate AC coverage and run final review.Documentation Reminder
CHANGELOG entry added under
[Unreleased] → ### Fixed. Nodocs/updates required (the user-facing surface is the existing/specAC Quality Check table, which is already mirrored across the three SKILL.md copies updated in AC-5).admarble commentedon May 8, 2026
QA Review for Issue #597 (Simple Fix)
Size Gate
AC Coverage
/[.\n:—]/src/lib/ac-linter.ts:319matches AC text literallysrc/lib/ac-linter.test.ts:228-232includes the trailing**markdown artifact (parser strips ID prefix, leaves bold-close); cross-checked againstgh issue view 562bodyac-linter.ts:334-343chose stem-aware path (\b<stem>(?:e|es|ed|ing)\bfore-ending verbs,\b<imp>(?:s|ed|ing)?\botherwise) — AC explicitly allows "or stem-aware list". Multi-word phrases keep literal matchingac-linter.test.ts:243-280adds three tests, each assertingtensionis detected.claude/skills/spec/,skills/spec/,templates/skills/spec/) updated identically with broadened pattern + separator noteCoverage: 5/5 AC items fully met
Quality Metrics
any)tscexit 0)CI Status
build (20.x)build (22.x)typecheckvalidate-skillsvalidate-pluginPlugin Structure ValidationHooks ValidationSetup Directory CreationCI Summary: All checks passing on PR #600. Mergeable: MERGEABLE.
Code Review
Strengths:
ac-linter.ts:334-343) is more linguistically correct than the AC-suggested(?:s|ed|ing|d)?— handlescapture/captures/captured/capturingcleanly without false-positive surface from a bare trailingd.if (imp.includes(" "))) preserved literal matching forverify by running/confirm at runtime— correctly avoids applying inflection to phrases.feedback_motivating_example_regression.mdandfeedback_synthetic_test_fixture_trap.md.### Fixedis detailed and references the issue.Issues:
Suggestions (non-blocking):
Implementation: trigger workflow (should warn)as a verification target, butImplementationis not inDOC_NOUNS— this is in Risks (not an AC), so not blocking. If the intent wasDocumentation: trigger workflow, that case is already covered by thedocumentationdoc-noun + colon split.Test Coverage Analysis
src/lib/ac-linter.tssrc/lib/ac-linter.test.ts(42 tests, +3 new)Coverage: 1/1 changed source files have corresponding tests
Anti-Pattern Detection
No anti-patterns detected:
anytypes added\bword boundaries (no over-greedy matching)Risk Assessment
—U+2014) in non-AC contexts (e.g., numeric ranges) could split incorrectly, but the doc-noun gate prevents false-positive warnings since ranges don't containnote/comment/etc. in the title slice. En-dash (–U+2013) and ASCII hyphens are intentionally NOT included per AC text.Implementation: trigger workflow) isn't a unit test, but it's not in ACs either. The order-of-separator behavior (which separator wins when multiple are present) isn't explicitly tested but is correctly handled byString.prototype.searchreturning the first match index.description.search(/[.\n:—]/)insrc/; no cross-file siblings using the same separator-split + inflection-regex pattern.detectTitleBodyTensionis the sole detector function inac-linter.tsusing this pattern; the regex-basedDEFAULT_LINT_PATTERNSuse a different approach (literal regex match) so no intra-file siblings share the root cause.Verdict: READY_FOR_MERGE
All 5 ACs met literally. 42/42 tests pass. Build clean. All CI checks green. Three SKILL.md mirrors are byte-identical. CHANGELOG entry present. Implementation is small, focused, and well-tested with verbatim motivating-example fixtures.
Documentation
[Unreleased] / ### FixedNext Steps
Implementation:Risks-section edge case as a potential future tightening (not blocking).test(#597): close adversarial-reread gaps in ac-linter tests
feat(#597): /spec ac-linter title/body tension — coverage tightening (#…
fix(#552): close remaining gaps — inflections, inverse noise, cap con…
feat(#552): detect behavior-rule implementations across skill+runtime…