Skip to content

feat(assess): default spec phase ON, remove bug/docs auto-skip #533

Closed

Description

@admarble

Summary

.claude/skills/assess/SKILL.md currently skips the spec phase when an issue has bug or docs labels and no domain label (security/auth/ui/frontend). Real-world batches (see today's /assess 528-532) show this skip rule is too aggressive — bug and docs issues often contain meaningful design decisions in their ACs that spec is meant to catch.

Motivation

Acceptance Criteria

  • AC-1: Remove the "Skip spec when (bug/docs label AND no domain labels)" rule from .claude/skills/assess/SKILL.md "Step 4: Workflow Detection"
  • AC-2: Default rule becomes: always include spec unless a prior spec phase marker already exists on the issue
  • AC-3: Update the "Labels → Workflow" table so bug/fix/hotfix/patch and docs/documentation/readme rows show spec → exec → qa (not exec → qa)
  • AC-4: Update all batch/single-mode examples in the skill so bug/docs issues show spec → exec → qa
  • AC-5: Sync the change across all three skill directories (.claude/skills/, templates/skills/, skills/)
  • AC-6: Update CHANGELOG.md under [Unreleased]

Additional context

Complexity

simple — rule flip + table update + example refresh + 3-dir sync

Activity

  1. added
    enhancement
    on Apr 17, 2026
  2. admarble commented on Apr 23, 2026

    @admarble
    ContributorAuthor

    → PROCEED — Flip spec-ON default in /assess skill; remove bug/docs auto-skip. 3-dir sync.

    Workflow: spec → exec → qa · 6 ACs

    ```
    npx sequant run 533 -q
    ```

    ⚠ 3-dir SKILL.md sync (known pitfall) + CHANGELOG [Unreleased] merge risk
    ⚠ Self-referential: changes the very rule that would have skipped spec here

  3. admarble commented on Apr 23, 2026

    @admarble
    ContributorAuthor

    QA Review for Issue #533

    Implementation Status: NOT FOUND

    No implementation detected for this issue:

    Check Result
    Commits on feature branch None (HEAD matches origin/main @ 6648085)
    Uncommitted changes in worktree None
    Open PR None
    Prior phase markers (spec / exec) None

    Feature worktree exists (../worktrees/feature/533-feat-assess-default-spec-phase-on-remove-bug-docs-) but no work has been committed to it yet.

    Verdict: AC_NOT_MET

    No code changes found to review. The 6 acceptance criteria (spec-ON default flip, bug/docs auto-skip removal, 3-dir SKILL.md sync, CHANGELOG entry, etc.) cannot be evaluated without an implementation.

    Next Steps

    1. Run /spec 533 to review the plan against ACs (spec-ON is the point of this issue, so this step is self-referential — proceed carefully).
    2. Run /exec 533 to implement across all three skill directories (.claude/skills/, templates/skills/, skills/).
    3. Re-run /qa 533 once commits land on the feature branch.

    QA skipped: No implementation to review

  4. added
    needs-work
    on Apr 23, 2026
  5. admarble commented on Apr 23, 2026

    @admarble
    ContributorAuthor

    Plan — #533: Default spec phase ON, remove bug/docs auto-skip

    Complexity: Standard (6 ACs, 3 mirrored skill dirs)

    AC Checklist

    • AC-1: Remove "Skip spec when (bug/docs label AND no domain labels)" rule — .claude/skills/assess/SKILL.md line 127
    • AC-2: Default rule: always include spec unless a prior spec phase marker exists
    • AC-3: Labels → Workflow table: bug/fix/hotfix/patch and docs/documentation/readme rows → spec → exec → qa
    • AC-4: Refresh all batch/single examples (Run col, Commands block, HTML markers); update Run Column Symbols meaning for exec → qa
    • AC-5: Sync identical edits across .claude/skills/, templates/skills/, skills/
    • AC-6: CHANGELOG [Unreleased] → ### Changed bullet referencing feat(assess): default spec phase ON, remove bug/docs auto-skip #533

    Plan

    1. Edit canonical .claude/skills/assess/SKILL.md: rule flip (line 127), Labels→Workflow table (120–121), Label priority paragraph (123), Run Column Symbols meaning (211).
    2. Refresh examples 1, 3, 4: flip bug/docs Run values, drop --phases exec,qa from default commands, update HTML markers. Leave resume (◂) cases untouched.
    3. Copy canonical file over templates/skills/assess/SKILL.md and skills/assess/SKILL.md (currently byte-identical; cp guarantees zero drift).
    4. Add CHANGELOG [Unreleased] / ### Changed bullet.
    5. Verify: diff -q on all three pairs empty; grep confirms no remaining "bug/docs AND no domain" language.

    Risks / Open Questions

    Proceeding to /exec.

  6. admarble commented on Apr 23, 2026

    @admarble
    ContributorAuthor

    Exec Complete — PR #548

    AC Verification

    AC Status Evidence
    AC-1: Remove auto-skip rule ✅ grep "bug/docs label AND no domain" → no match
    AC-2: New skip rule (spec marker only) ✅ .claude/skills/assess/SKILL.md:127
    AC-3: Labels table rows ✅ Lines 120–121 → spec → exec → qa
    AC-4: Examples refreshed ✅ 3 batch examples + warnings/flags blocks; resume cases preserved
    AC-5: 3-dir sync ✅ scripts/check-skill-sync.ts → assess/SKILL.md — 3/3 match
    AC-6: CHANGELOG entry ✅ [Unreleased] / ### Changed bullet referencing #533

    Files Changed (4)

    • .claude/skills/assess/SKILL.md — canonical rule flip + examples
    • templates/skills/assess/SKILL.md — synced (byte-identical)
    • skills/assess/SKILL.md — synced (byte-identical)
    • CHANGELOG.md — [Unreleased] / ### Changed entry

    Quality Gates

    Check Result
    npm run build ✅ tsc passes
    npm run lint ✅ eslint passes, 0 warnings
    src/lib/__tests__/assess-skill.test.ts ✅ 5/5 pass
    scripts/check-skill-sync.ts ✅ 3/3 match

    Pre-PR Confidence Check

    • Weakest part: Example refresh across 4 locations; a reviewer could still spot a stray exec → qa or assess:phases=exec,qa comment I missed. Mitigation: grep confirmed only the intentional feat(#390): MCP server SSE multi-client rejection #411 resume case remains.
    • Coverage gaps: None — assess-skill.test.ts already covers phase vocabulary, CLI flag accuracy, and 3-dir sync. This PR strengthens those tests' guarantees (no new phases introduced; existing flags unchanged).

    Proceeding to /qa.

  7. admarble commented on Apr 23, 2026

    @admarble
    ContributorAuthor

    QA Review for Issue #533

    AC Coverage

    AC Source Description Status Notes
    AC-1 Original Remove "Skip spec when (bug/docs label AND no domain labels)" rule ✅ MET grep "bug/docs label AND no domain" returns zero matches in SKILL.md
    AC-2 Original Default rule: always include spec unless prior spec phase marker exists ✅ MET .claude/skills/assess/SKILL.md:127 now reads: "Skip spec when: a prior spec phase marker already exists on the issue. Otherwise, always include spec…"
    AC-3 Original Labels → Workflow table rows for bug/fix/hotfix/patch and docs/documentation/readme show spec → exec → qa ✅ MET Lines 120–121 updated literally; table preamble and Valid phases line untouched
    AC-4 Original All batch/single examples refreshed to new default ✅ MET 3 batch examples updated (mixed states, all clean, large batch); Run Column Symbols meaning updated to "Prior spec marker exists"; warnings reworded for #412/#500/#499; commands regrouped; HTML markers updated; #411 resume case preserved intentionally (prior spec marker implied)
    AC-5 Original Sync across .claude/skills/, templates/skills/, skills/ ✅ MET scripts/check-skill-sync.ts reports synced assess/SKILL.md — 3/3 match
    AC-6 Original CHANGELOG [Unreleased] entry ✅ MET ### Changed subsection added with #533 reference, motivation (bug/docs design decisions, #515 compression cost), and summary of updated sections

    Coverage: 6/6 AC items fully met
    Original ACs: 6/6 met
    Derived ACs: 0 (no quality plan existed for this issue)

    Quality Plan Verification

    N/A — No quality plan found in issue comments (issue was single-step enhancement with self-evident AC).

    CI Status

    Check State Conclusion Impact
    build (20.x) COMPLETED SUCCESS ✅ MET
    build (22.x) COMPLETED SUCCESS ✅ MET
    typecheck COMPLETED SUCCESS ✅ MET
    validate-skills COMPLETED SUCCESS ✅ MET
    validate-plugin COMPLETED SUCCESS ✅ MET
    Plugin Structure Validation COMPLETED SUCCESS ✅ MET
    Hooks Validation COMPLETED SUCCESS ✅ MET
    Setup Directory Creation COMPLETED SUCCESS ✅ MET

    CI Summary: 8 passed, 0 pending, 0 failed

    Quality Metrics

    Metric Value Status
    Type issues (any) 0 ✅ OK
    Deleted tests 0 ✅ OK
    Files changed 4 ✅ OK
    Lines added +118 -
    Lines deleted −120 -

    Test Coverage Analysis

    No .ts/.tsx source files changed — this is a documentation/prompt-only PR.

    Changed File Tier Has Tests? Test File
    .claude/skills/assess/SKILL.md Optional (prompt) ✅ Yes (indirect) src/lib/__tests__/assess-skill.test.ts — 5 tests verify phase vocabulary, CLI flag accuracy, and 3-dir sync; all pass
    templates/skills/assess/SKILL.md Optional (prompt) ✅ Yes (sync-check) scripts/check-skill-sync.ts
    skills/assess/SKILL.md Optional (prompt) ✅ Yes (sync-check) scripts/check-skill-sync.ts
    CHANGELOG.md Optional N/A Manually reviewed

    Coverage: Indirect — skill content behavior is LLM-interpreted, so assess-skill.test.ts covers the structural invariants (valid phases, real CLI flags, 3-dir sync) that this change must preserve. All 5 tests still pass.

    Code Review

    Strengths:

    • Clean, surgical rule flip — single authoritative edit on line 127; no collateral changes to unrelated logic (Resume detection, PR review detection, Testgen detection, Chain detection all untouched).
    • Canonical file → cp sync → 3-dir byte-identical. Zero drift risk, per feedback_verify_bulk_replacements.md.
    • Run Column Symbols meaning text updated for consistency ("Prior spec marker exists"). A common miss that would have made the skill self-contradictory.
    • Example 1 warning for fix(#395): generate per-client MCP configs with cwd and env #412 ("auth (domain) adds security-review phase") is strictly more accurate than the prior "takes priority over bug" framing — describes the mechanism, not just the ordering.
    • Example 4 commands block regrouped sensibly under Rule 7 (6 + 3 issues), preserving the split-line rule without fabricating filler.
    • CHANGELOG entry cites motivation (#515 compression, batch assessment observations) rather than just stating what changed.

    Issues:

    • None blocking.

    Suggestions:

    • Consider a follow-up to update the "Testgen detection" Skip when clause (line 139): "only bug/fix labels present, only docs label present" still appears as a skip axis. Under the new spec-default, testgen skip-for-bugs still makes sense (no Unit/Integration Test ACs), but the parallel structure with the old spec-skip rule is now inconsistent at the glance. Not blocking — just worth considering in a future cleanup.

    Anti-Pattern Detection

    Category Finding
    Dependency audit N/A — no package.json changes
    Code patterns N/A — no .ts/.tsx changes
    Hardcoded secrets / eval / SQL concat N/A — markdown-only

    Call-Site Review

    N/A — no new exported functions.

    Execution Evidence

    N/A — no scripts/ or CLI files modified.

    Skill Command Verification

    Skill files changed: 1 (mirrored 3x)

    File Commands Found Verification Status
    .claude/skills/assess/SKILL.md ~15 example npx sequant run commands ✅ Passed

    Commands Verified (via existing assess-skill.test.ts):

    • -q, --phases, --chain, --qa-gate, --base — all registered in bin/cli.ts (verified by assess skill CLI flag accuracy test)
    • No new CLI flags introduced by this PR

    Verification Status: Passed

    Skill Change Review

    • Command verified: Example commands use only flags that assess-skill.test.ts already validates against bin/cli.ts
    • Fields verified: No JSON field changes in the diff
    • Patterns complete: Resume case (◂) preserved; spec,exec,qa, spec,security-review,exec,qa, spec,exec,test,qa patterns all represented in examples
    • Dependencies explicit: No new external CLI dependencies; only gh and git as before

    Smoke Test

    Test Command Result Notes
    Build npm run build ✅ tsc passes
    Lint npm run lint ✅ 0 warnings
    Targeted vitest npx vitest run src/lib/__tests__/assess-skill.test.ts ✅ 5/5 pass Phase vocabulary, CLI flag accuracy, 3-dir sync
    Sync check npx tsx scripts/check-skill-sync.ts ✅ 3/3 match on assess/SKILL.md

    Smoke Test Status: Complete

    CHANGELOG Verification

    Check Status
    CHANGELOG.md exists ✅ Found
    User-facing changes ✅ Yes (behavior change in /assess default recommendation)
    [Unreleased] entry ✅ Present under ### Changed
    Entry format ✅ Valid (includes #533, motivation, scope of examples updated)

    Result: CHANGELOG requirements met

    Risk Assessment

    • Likely failure mode: Users running /assess on trivial bug fixes now receive spec → exec → qa by default, adding ~60s per issue vs the prior exec → qa shortcut. If users consistently override (edit the Commands line or pass --phases exec,qa), that's a signal the default is wrong — but the motivation (bug/docs often contain design decisions) has been validated in recent real-world batches. Revertable in a one-line diff.
    • Not tested: No behavioral test for "the LLM now actually includes spec for bug/docs issues." The skill is LLM-interpreted, so regression protection relies on assess-skill.test.ts structural invariants (valid phases, real CLI flags, 3-dir sync) plus the updated documentation itself. Functional correctness is observable in the next /assess invocation.

    Verdict: READY_FOR_MERGE

    All 6 ACs verified literally; build, lint, targeted tests, skill-sync check, and all 8 CI checks pass. The diff is content-only (markdown), mirrored cleanly across 3 directories, and carries a clear CHANGELOG entry with issue reference and motivation. The one follow-up suggestion (line 139 parallel-structure consistency) is cosmetic and non-blocking.

    Documentation

    • README updated — N/A (behavior change is in the skill itself; no user-facing CLI changes)
    • docs/ updated — N/A (assess workflow doc conventions unchanged)
    • CHANGELOG entry added under [Unreleased] / ### Changed (feat(assess): default spec phase ON, remove bug/docs auto-skip #533)
    • Skill content is self-documenting (Labels → Workflow table, Run Column Symbols, and examples all reflect the new default)

    Next Steps

    1. Merge PR feat(#533): default /assess spec phase ON, remove bug/docs auto-skip #548
    2. Worktree cleanup: ./scripts/dev/cleanup-worktree.sh feature/533-feat-assess-default-spec-phase-on-remove-bug-docs-
    3. Optional follow-up (non-blocking): refresh Testgen detection "Skip when" wording (line 139) for parallel-structure consistency with the updated spec-skip rule
  8. added a commit that references this issue on Apr 24, 2026
  9. admarble commented on Apr 24, 2026

    @admarble
    ContributorAuthor

    QA Update — Scope Extended to Runtime Layer

    Post-verdict adversarial sweep surfaced that the initial PR fixed only the /assess skill recommendation, while the runtime CLI (sequant run) still short-circuited bug/docs issues via phase-mapper.detectPhasesFromLabels and batch-executor's auto-detect branch. The skill promised spec; the runtime silently stripped it. Extending scope in commit 2e79778 to close that gap.

    Additional Changes

    File Change
    src/lib/workflow/phase-mapper.ts detectPhasesFromLabels: drop isBugFix || isDocs → ["exec","qa"] branch; always return spec → exec → qa (or spec → exec → test → qa for UI). JSDoc on BUG_LABELS/DOCS_LABELS clarified as metadata categories.
    src/lib/workflow/batch-executor.ts Drop "Bug fix detected" / "Docs issue detected" shortcuts from autoDetectPhases block. Spec now runs unconditionally. Unused BUG_LABELS import removed. issueType: "docs" propagation to post-spec phases preserved.
    src/lib/workflow/phase-mapper.test.ts Updated describe titles + expectations for bug/docs blocks to spec → exec → qa.
    src/lib/workflow/batch-executor.test.ts Renamed AC-1 shortcut blocks to "#533: … includes spec by default"; updated all phase expectations. AC-2/AC-4 issueType assertions filter out the spec call (spec runs with base config; issueConfig is built after). AC-4 "bug precedence" reframed — precedence no longer applies to phase selection.
    src/commands/run.test.ts bug label now asserts spec. bug + security now asserts spec → security-review → exec → qa (security-review inserts after spec, which now runs).
    docs/concepts/workflow-phases.md Label → Phases table rows for bug/docs updated to spec → exec → qa.
    docs/features/exact-label-matching.md Drop stale "(skip spec)" parentheticals; BUG_LABELS/DOCS_LABELS effect column rewritten to describe the new metadata-only role.
    CHANGELOG.md Reordered [Unreleased] to Keep a Changelog convention (Added → Changed). Rewrote the #533 entry to cover both skill and runtime layers.

    Quality Gates (Post-Extension)

    Check Result
    npm run build ✅ tsc passes
    npm run lint ✅ eslint passes, 0 warnings
    Targeted vitest (4 files: phase-mapper, batch-executor, assess-skill, run) ✅ 194/194 pass
    CI checks on PR #548 ✅ 8/8 SUCCESS (build 20.x, build 22.x, typecheck, validate-skills, validate-plugin, Plugin Structure Validation, Hooks Validation, Setup Directory Creation)

    AC Re-verification

    All 6 original ACs remain MET; AC-2 is now behaviorally satisfied (not just documented):

    AC Status Evidence
    AC-1 ✅ MET Skill rule removed + phase-mapper branch removed
    AC-2 ✅ MET Skill text updated + detectPhasesFromLabels(["bug"]) → spec,exec,qa + batch-executor auto-detect runs spec unconditionally
    AC-3 ✅ MET Skill table rows + docs/concepts/workflow-phases.md Label→Phases table
    AC-4 ✅ MET Skill examples + docs/features/exact-label-matching.md stale annotations removed
    AC-5 ✅ MET check-skill-sync.ts → 3/3 match
    AC-6 ✅ MET CHANGELOG reordered + rewritten to cover both layers

    Verdict: READY_FOR_MERGE

    Ready for human merge. The runtime flip is the most consequential part — users running sequant run --auto-detect on bug/docs issues will now see spec execute by default, matching the /assess skill recommendation.

  10. added a commit that references this issue on Apr 25, 2026
  11. admarble commented on Apr 25, 2026

    @admarble
    ContributorAuthor

    Documentation Generated

    File: docs/features/spec-by-default.md

    Sections Included

    • Quick Start summary
    • Prerequisites (Sequant version, autoDetectPhases setting)
    • What Changed — before/after table covering all label combinations
    • Why — motivation (real-world batch evidence + perf(spec): prompt compression and tiered context — reduce spec skill token cost by ~60% #515 cost reduction)
    • What You Can Do — new default, single-run override, assess override, resume behavior
    • What to Expect — runtime impact, spec-output visibility, lighter QA still applies, assess output changes
    • Reference — settings + detection function locations
    • Troubleshooting — 3 common scenarios (slower bug fix, /assess override, ◂ resume symbol)
    • Related Documentation — links to workflow-phases.md, exact-label-matching.md, docs-pipeline.md

    Why a New Page

    Three existing docs were updated in the PR (docs-pipeline.md, exact-label-matching.md, workflow-phases.md), but none of them is a central reference for the new default. This page is the landing point users can be directed to when they ask "why is spec running on my bug fix now?"

    Next Steps

    1. Review for accuracy
    2. Consider adding cross-links from the docs in Related Documentation section
    3. Already merged to main on commit 243221f; this doc landing as a follow-up is fine

    Generated post-merge as a follow-up to PR #548.

  12. added a commit that references this issue on Apr 25, 2026
  13. added 3 commits that reference this issue on May 9, 2026
  14. added 3 commits that reference this issue on Jul 28, 2026
  15. added a commit that references this issue on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementneeds-work

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions