Skip to content

feat(assess): emit minimal command flags — drop default --phases, prefer additive flags #554

Closed

Description

@admarble

Summary

/assess emits verbose --phases flags in command output even when the resulting workflow matches the CLI default (spec,exec,qa) or could be expressed via a shorter additive flag like --testgen. The skill's own Flags: annotation example uses additive notation (--testgen, --phases ...,test), but the actual Commands: block examples consistently restate the full phase list. Result: noisy commands and an internal inconsistency between docs and examples.

Motivation — concrete recent example

Today's /assess 532 543 551 552 produced:

npx sequant run 532
npx sequant run 551 -q
npx sequant run 552 -q --phases spec,testgen,exec,qa

The third command is verbose. Since --phases defaults to spec,exec,qa (bin/cli.ts:186) and --testgen exists as a standalone additive flag (bin/cli.ts:208), the cleaner form is:

npx sequant run 552 -q --testgen

Same applies to skill example commands at templates/skills/assess/SKILL.md:279, :322, :386 — all restate spec,exec,qa unnecessarily, and --phases spec,testgen,exec,qa should be --testgen.

Acceptance Criteria

  • AC-1: Skill emits --phases only when phases differ from default. When the recommended workflow equals the CLI default (spec,exec,qa), /assess omits --phases from the command. The skill references bin/cli.ts as the source of truth for the default rather than embedding spec,exec,qa literally in instructions.
  • AC-2: Prefer additive flags when available. /assess emits --testgen instead of --phases spec,testgen,exec,qa. Document the additive-flag preference in SKILL.md "Commands Block Rules". Currently only --testgen qualifies; the rule applies to any future additive flags (see AC-5).
  • AC-3: SKILL.md examples updated. All Commands: block examples in SKILL.md use the new minimal form across all three skill directories. Specifically the examples currently around lines 279, 322, 385–386 in .claude/skills/assess/SKILL.md and equivalents in templates/skills/ and skills/.
  • AC-4: Test asserts minimization in src/lib/__tests__/assess-skill.test.ts. Add a test that scans example sequant run lines in SKILL.md and fails when:
    • (a) a line contains --phases spec,exec,qa (the default — should be omitted)
    • (b) a line contains --phases ...,testgen,... (should use --testgen additive flag instead)
      Mirrors the structure of the existing "should only reference valid CLI flags in example commands" test at line 127.
  • AC-5: (Optional / out-of-scope by default) CLI gains --security-review additive flag for symmetry with --testgen. Lets the security-review case (spec,security-review,exec,qa) drop --phases. If deferred, document the asymmetry in SKILL.md (additive flag exists for testgen but not security-review).
  • AC-6: 3-dir sync. Edits applied identically across .claude/skills/, templates/skills/, skills/. Existing test "should have identical content across all 3 skill directories" (assess-skill.test.ts:143) covers this.
  • AC-7: CHANGELOG entry under [Unreleased] / ### Changed noting the more concise output format.
  • AC-8: Order: annotation rule clarification. SKILL.md "Annotation Rules" currently says: "Avoid bare filenames when a reason is clearer." Add a one-line exception: when the sequencing reason is a file collision (e.g., two issues both modify qa/SKILL.md), the filename is the reason and is acceptable verbatim. Apply across all three skill directories.

Non-Goals

  • Not changing the actual phases that run — output ergonomics only.
  • Not removing --phases from the CLI — power users still need full control for non-default combinations (e.g., --phases exec,qa for resume).
  • Not changing posted issue-comment markers — <!-- assess:phases=spec,exec,qa --> should keep recording the full workflow, since parsers consume markers (not command text) and the marker documents the workflow itself.

Risks / Open Questions

  • Marker/command divergence. After this change, the displayed command may omit phases that the marker still records. This is intentional (markers are machine-readable, commands are human-shorthand) but worth a one-line note in SKILL.md to prevent confusion in future audits.
  • AC-5 scope creep. Adding a CLI flag pulls in unrelated work (CLI option, RunOptions field, plumb-through). Prefer to defer to a separate issue and ship AC-1 through AC-4. The fallback clause in AC-5 covers the asymmetry case.

Complexity

medium — skill output rules + 3-dir sync + one test + CHANGELOG. Single PR if AC-5 deferred.

Self-assessed workflow

spec → exec → qa with -q (multi-file: skill changes across 3 dirs + test + CHANGELOG)

Activity

  1. added
    enhancement
    cli
    on Apr 26, 2026
  2. admarble commented on Apr 26, 2026

    @admarble
    ContributorAuthor

    Complexity: Standard (8 ACs declared, 7 in-scope, 4 directories)

    AC Quality Check

    All ACs are clear and measurable. AC-5 is explicitly marked deferrable in the issue's own "Risks / Open Questions" section — recommend deferring to a follow-up issue at exec time. AC-6 is already covered by an existing test (assess-skill.test.ts:143).


    Scope Assessment

    Non-Goals (from issue):

    • Not changing actual phases that run — output ergonomics only
    • Not removing --phases from the CLI
    • Not changing posted issue-comment markers (<!-- assess:phases=... -->)
    Metric Value Status
    Feature count 1 (skill output minimization) + AC-8 unrelated rule clarification ⚠️
    AC items (in-scope) 7 ✅
    Directory spread 4 (3 skill dirs + tests + CHANGELOG) ✅

    Verdict: ✅ SCOPE_OK — single PR is correct. AC-8 bundles cleanly because separating it would double 3-dir-sync churn.


    Conflict Risk Analysis

    Two sibling worktrees touch the same SKILL.md files:

    Branch State Overlap
    feature/555-... (#555 supersession detection) No commits Edits Step 4 of SKILL.md
    feature/556-... (#556 file collision prediction) No commits Touches Order: annotation — overlaps with AC-8

    Recommendation: Ship #554 first (smallest, mostly mechanical). #555/#556 rebase onto the new rules. Coordinate at merge time via /merger.


    Acceptance Criteria

    AC-1: Skill emits --phases only when phases differ from default

    Verification: Unit Test
    Scenario: Given assess-skill.test.ts scans every sequant run line in SKILL.md → When any line contains --phases spec,exec,qa (literal default) → Then test fails.
    Assumptions: SKILL.md text references bin/cli.ts:186 as source of truth rather than embedding the literal default.

    AC-2: Prefer additive flags when available

    Verification: Unit Test
    Scenario: Given the same test → When a line contains --phases <list> where <list> includes testgen → Then test fails (must use --testgen instead).
    Assumptions: --testgen is purely additive (src/lib/workflow/phase-mapper.ts:174); ui label auto-adds test (phase-mapper.ts:182), so for ui issues --testgen alone resolves to spec,testgen,exec,test,qa. Verify this before rewriting line :322/:329 — if false, keep --phases for those examples and document the edge case.

    AC-3: SKILL.md examples updated

    Verification: Unit Test (covered by AC-1 + AC-2)
    Scenario: Examples at ~:279, :322, :329, :385, :386 rewritten using minimal form. Test guards content, not line numbers.

    AC-4: Test asserts minimization

    Verification: Unit Test
    Scenario: New test in src/lib/__tests__/assess-skill.test.ts (after the flag-validity test at line 127). Two assertions: (a) reject --phases spec,exec,qa, (b) reject --phases <any>,testgen,<any>.

    AC-5: ⚠️ DEFERRED — --security-review CLI flag

    Defer to a separate issue per the issue body's own recommendation. Pulls in CLI option + RunOptions + plumb-through (phase-mapper.ts, batch executor, metrics schema) — orthogonal to skill-output minimization. Document the asymmetry in SKILL.md per the AC-5 fallback clause. File follow-up at exec time.

    AC-6: 3-dir sync

    Verification: Unit Test (existing assess-skill.test.ts:143)
    Scenario: Apply edits via per-file Edit to each of .claude/skills/, templates/skills/, skills/ (per feedback_read_each_mirrored_file.md).

    AC-7: CHANGELOG entry

    Verification: Manual Test
    Scenario: One-line entry under [Unreleased] / ### Changed referencing #554.

    AC-8: Order: annotation rule exception

    Verification: Manual + 3-dir sync test
    Scenario: Append one line to Annotation Rules block (~SKILL.md:240): when sequencing reason is a file collision, the filename is the reason.
    Assumptions: Coordinate text with #556 if it lands first.


    Implementation Plan

    Phase 1: SKILL.md rule + example changes (3-dir sync)

    For each of .claude/skills/assess/SKILL.md, templates/skills/assess/SKILL.md, skills/assess/SKILL.md:

    1. Commands Block Rules (~line 220): append rule 8: omit --phases when equal to default; prefer additive flags (--testgen); reference bin/cli.ts:186 as source of truth for the default.
    2. Annotation Rules (~line 240): append AC-8 filename-as-reason exception under the Order: bullet.
    3. One-line note: marker (<!-- assess:phases=... -->) records full workflow; displayed command may omit defaults/additive-resolved phases. Intentional divergence.
    4. Rewrite example commands:
      • :279 --phases spec,security-review,exec,qa — keep (no additive flag exists, defer until AC-5)
      • :280 --phases exec,qa — keep (resume case, power-user)
      • :322 --phases spec,testgen,exec,test,qa — simplify to --testgen IFF phase-mapper.ts confirms ui label adds test
      • :329 Chain command — same simplification as :322
      • :385 --phases spec,exec,test,qa — simplify to default IFF Add QA skill check for three-directory skill sync #499 is implicitly ui-labelled (chart bug)
      • :386 --phases spec,security-review,exec,qa — keep (no additive until AC-5)

    Phase 2: Test addition

    1. Add test in src/lib/__tests__/assess-skill.test.ts after line 139:
    it("should not restate default phases or non-additive testgen in example commands", () => {
      const exampleLines = skillContent.split("\n").filter(l => /sequant\s+run\b/.test(l));
      for (const line of exampleLines) {
        expect(line).not.toMatch(/--phases\s+spec,exec,qa\b/);
        expect(line).not.toMatch(/--phases\s+\S*\btestgen\b/);
      }
    });

    Phase 3: CHANGELOG

    1. Append to [Unreleased] / ### Changed: one-line entry crediting feat(assess): emit minimal command flags — drop default --phases, prefer additive flags #554.

    Phase 4: AC-5 follow-up

    1. File follow-up issue for --security-review additive flag at exec time.

    Design Review

    1. Where does this logic belong? Rule lives in SKILL.md (LLM instruction). Enforcement lives in assess-skill.test.ts alongside existing flag-validity tests. No src/ code change needed for AC-1..AC-4.
    2. What's the simplest correct approach? Two-line test addition + targeted text edits in 3 mirrored files. Rejected: building a phase-resolver helper for the skill — the LLM handles the instruction.
    3. What existing pattern does this follow? Mirrors the existing "valid CLI flags" test at line 127 — same regex-scan structure. Same 3-dir sync pattern as everything in this skill.
    4. What would a senior reviewer challenge? "Why not parse bin/cli.ts to extract the literal default?" — Answer: brittle (regex over CLI definition), and the rule is human-readable. The test asserts on the output (no --phases spec,exec,qa), which is what we care about.

    Feature Quality Planning

    All standard checks pass. Notable items:

    • Mixed --testgen + UI label edge case: Must verify phase-mapper.ts:182 behavior before simplifying lines :322/:329. If --testgen alone + ui label produces spec,testgen,exec,test,qa, simplify; otherwise keep --phases and document.
    • Marker/command divergence note is required to prevent future audit confusion (covered by Phase 1 step 3).
    • Test coverage gap: the new test guards example lines but not the rule text itself. Low priority; 3-dir sync test catches drift.

    Derived ACs

    Source Derived AC Priority
    Mixed flag handling AC-D1: Verify phase-mapper.ts:174,182 resolution before rewriting :322/:329/:385 High
    Marker/command divergence AC-D2: One-line note in SKILL.md (covered by Phase 1 step 3) Medium

    Open Questions

    1. Does --testgen + ui label resolve to spec,testgen,exec,test,qa? Need to confirm against phase-mapper.ts:174,182. Recommendation: verify at exec time before rewriting :322/:329. Impact if wrong: test passes but examples are misleading.
    2. Is example issue Add QA skill check for three-directory skill sync #499 (line :385) implicitly ui-labelled? ("Dashboard chart rendering bug" suggests yes.) If so, --phases spec,exec,test,qa collapses entirely. Recommendation: rewrite as default -q group entry.
    3. AC-8 vs feat(assess): predict file-collision between PROCEED issues from body content #556 Order: rewrites: If feat(assess): predict file-collision between PROCEED issues from body content #556 also rewrites this rule, last merger wins. Recommendation: keep our edit minimal (one sentence appended); resolve at /merger time.

    Recommended Workflow

    Phases: spec → exec → qa
    Quality Loop: enabled (-q)
    Reasoning: Multi-file mirrored edits historically drift (feedback_read_each_mirrored_file.md). No UI/auth/testgen-eligible new code logic — added test is small enough to write inline.


    Label Review

    Current: enhancement, cli
    Recommended: no change
    Reason: CLI-output ergonomics; existing labels correct.
    Quality Loop: Auto-enabled by -q rationale (multi-file mirrored edits).

    → No label edit needed beyond planned.

  3. added
    planned
    on Apr 26, 2026
  4. admarble commented on Apr 26, 2026

    @admarble
    ContributorAuthor

    Implementation Update — /exec complete

    PR: #557

    AC Coverage

    AC Status Notes
    AC-1 ✅ Implemented Rule 8 in Commands Block Rules; #499 ui example folded into default group
    AC-2 ✅ Implemented --testgen preferred; documented in rule 8
    AC-3 ✅ Implemented Examples at :322, :329, :385 rewritten in all 3 dirs
    AC-4 ✅ Implemented assess-skill.test.ts rejects --phases spec,exec,qa and --phases …,testgen,…
    AC-5 🔄 Deferred Per issue's own recommendation; asymmetry documented in rule 8
    AC-6 ✅ Implemented 3-dir sync test (assess-skill.test.ts:143) passes
    AC-7 ✅ Implemented CHANGELOG [Unreleased] / ### Changed entry
    AC-8 ✅ Implemented Order: filename-as-reason exception in all 3 SKILL.md
    AC-D1 ✅ Verified phase-mapper.ts:174-189 confirms --testgen + ui → spec,testgen,exec,test,qa
    AC-D2 ✅ Implemented Marker/command divergence documented in rule 8

    Files Changed

    • .claude/skills/assess/SKILL.md (+8 / -7)
    • skills/assess/SKILL.md (+8 / -7)
    • templates/skills/assess/SKILL.md (+8 / -7)
    • src/lib/__tests__/assess-skill.test.ts (+13 minimization assertion)
    • CHANGELOG.md (+1 entry)

    Quality Plan Alignment

    Quality Dimension Items Addressed Notes
    Error Handling N/A Documentation-only change; no runtime paths
    Test Coverage 1/1 New minimization test added
    Code Quality 2/2 3-dir sync; types unchanged
    Best Practices 1/1 Source-of-truth reference (bin/cli.ts:186) embedded in rule text

    Derived ACs: 2/2 addressed (D1 verified, D2 implemented).

    Test/Build/Lint Results

    • npm run build — ✅ passes (0 errors)
    • npm run lint — ✅ passes (0 errors, 0 warnings)
    • npm test (assess-skill.test.ts) — ✅ 6/6 tests pass, including new minimization assertion

    Pre-PR Confidence Check

    • Weakest part: The --testgen simplification at lines :322/:329 depends on phase-mapper.determinePhasesForIssue auto-adding test from the ui label. Verified against phase-mapper.ts:174-189, but if that auto-detect logic is ever removed/changed, the example becomes misleading. Mitigation: rule 8 documents the dependency explicitly.
    • Coverage gaps: No tests guard the rule text itself, only the example commands. Acceptable — 3-dir sync test catches drift across mirrors, and the rule text is human-readable LLM instruction.

    Follow-ups

    Documentation Reminder

    Documentation already updated (CHANGELOG entry added). /qa will verify whether README/docs need additional updates.

    Next Steps

    • Run /qa 554 to verify against AC and check for gaps.
    • Manual smoke test recommended: run /assess against a mix of issue types (default / testgen / ui / security-review) to verify emitted commands use the minimal form.
  5. admarble commented on Apr 26, 2026

    @admarble
    ContributorAuthor

    QA Review for Issue #554 (Simple Fix)

    Size Gate

    Check Value
    Diff size 59 lines (threshold: 100)
    package.json changed No
    Security-sensitive paths No
    Decision Inline checks

    AC Coverage

    AC Source Description Status Notes
    AC-1 Original Skill emits --phases only when phases differ from default MET Rule 8 grounds the default in code (DEFAULT_PHASES in src/lib/workflow/types.ts); all default-case examples now omit --phases. Minor nuance: AC text said "references bin/cli.ts", impl points at types.ts instead — arguably better since that's where the constant lives. Rule still includes "currently spec,exec,qa" parenthetically; this is a hint, not the canonical source. Functional contract met.
    AC-2 Original Prefer additive flags when available MET Rule 8 documents the additive-flag preference and explicitly calls out the asymmetry (--testgen exists, --security-review does not). Examples updated accordingly.
    AC-3 Original SKILL.md examples updated MET :324, :331 → --testgen. :384 → folded #499 into default group (relies on phase-mapper.determinePhasesForIssue auto-adding test from ui label — verified). :386 retains --phases spec,security-review,exec,qa per AC-2/AC-5 (no additive flag).
    AC-4 Original Test asserts minimization MET New it("should not restate default phases or non-additive testgen…") at assess-skill.test.ts:141; rejects --phases spec,exec,qa and --phases <any>,testgen,<any>. 6/6 tests pass.
    AC-5 Original --security-review additive flag DEFERRED Per issue's own fallback clause; asymmetry documented in rule 8.
    AC-6 Original 3-dir sync MET Identical Rule 8 + Order: exception across .claude/skills/, skills/, templates/skills/. Existing 3-dir sync test passes.
    AC-7 Original CHANGELOG entry MET Added under [Unreleased] / ### Changed with #554 reference and divergence note about markers vs displayed commands.
    AC-8 Original Order: filename-as-reason exception MET One-line exception added under Order: bullet across all 3 mirrors with a concrete example.
    AC-D1 Derived (Mixed flag handling) Verify phase-mapper.ts:174,182 resolution MET Confirmed: --testgen + ui label resolves to spec,testgen,exec,test,qa via determinePhasesForIssue. Rule 8 documents the dependency.
    AC-D2 Derived (Marker/command divergence) One-line note in SKILL.md MET Rule 8 final sentence covers it: "markers are machine-readable, displayed commands are human shorthand."

    Coverage: 9/9 in-scope ACs met (AC-5 deferred per issue's own recommendation)


    Quality Metrics

    Metric Value Status
    Type issues (any) 0 (in changed files) OK
    Deleted tests 0 OK
    Files changed 5 OK
    Lines added +35 -
    Lines deleted -24 -
    Security patterns 0 OK

    CI Status

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

    CI Summary: 8 passed, 0 pending, 0 failed


    Code Review

    Strengths:

    • Rule 8 is comprehensive: covers default-omission, additive-flag preference, the --testgen + ui edge case, the --security-review asymmetry, and the marker/command divergence — all in one paragraph. No reader needs to hunt for context.
    • References the actual constant (DEFAULT_PHASES) rather than a CLI description string. More durable across refactors.
    • AC-3 example rewrites are surgical: line 384's Add QA skill check for three-directory skill sync #499 collapse correctly relies on label-driven auto-detection in phase-mapper.ts:182, keeping runtime behavior identical while shortening the displayed command.
    • Test mirrors the existing flag-validity test structure (assess-skill.test.ts:127) — same regex-scan pattern, low cognitive overhead for future maintainers.
    • AC-8 example (Order: 460 → 461 (qa/SKILL.md)) is concrete and self-explanatory.

    Issues:

    • None blocking.

    Suggestions:

    • (Optional) The AC-1 spec text said "references bin/cli.ts"; impl points at types.ts. The substitution is defensible (and arguably correct), but if a future reader cross-references the AC literally they may be momentarily confused. Consider mentioning both in the rule (e.g., "default registered at bin/cli.ts:186, constant at src/lib/workflow/types.ts:38") — non-blocking.
    • (Optional) Rule 8 is dense (one long paragraph). If it grows further, consider sub-bullets. Acceptable as-is.

    Test Coverage Analysis

    Changed File Tier Has Tests? Test File
    .claude/skills/assess/SKILL.md Standard ✅ Yes src/lib/__tests__/assess-skill.test.ts
    skills/assess/SKILL.md Standard ✅ Yes (same — 3-dir sync test)
    templates/skills/assess/SKILL.md Standard ✅ Yes (same — 3-dir sync test)
    src/lib/__tests__/assess-skill.test.ts Test file N/A self
    CHANGELOG.md Optional N/A docs

    Coverage: 3/3 changed source files covered by assess-skill.test.ts (flag validity + 3-dir sync + new minimization test)


    Anti-Pattern Detection

    No anti-patterns detected. Changes are documentation (skill .md) + one declarative test addition + CHANGELOG entry. No new TypeScript logic, no dependencies, no security-sensitive paths.


    Risk Assessment

    • Likely failure mode: If phase-mapper.determinePhasesForIssue is ever refactored to stop auto-adding test for ui labels, the simplified npx sequant run 499 -q example would silently mis-document the runtime behavior. Mitigation: rule 8 explicitly names phase-mapper.determinePhasesForIssue as the dependency, so a future refactorer will grep this skill before changing the function.
    • Not tested: The new test guards example commands but not the rule text itself. If the rule text drifts (e.g., a copy-paste regression that re-introduces --phases spec,exec,qa in the rule's example), the test won't catch it. Low priority — 3-dir sync test catches divergence across mirrors, and the rule is human-readable LLM instruction.

    Verdict: READY_FOR_MERGE

    All in-scope ACs (AC-1 through AC-4, AC-6 through AC-8) met. AC-5 deferred per the issue's own fallback clause with the asymmetry explicitly documented in rule 8. Both derived ACs (D1 verification, D2 divergence note) addressed. All 8 CI checks pass, all 6 unit tests pass, no anti-patterns detected, no security/type concerns.

    The implementation is tight: minimal text changes across 3 mirrored files, one new test mirroring an existing pattern, and a CHANGELOG entry that captures the user-facing behavior change. The marker-vs-command divergence is documented to prevent future audit confusion.

    Documentation

    Next Steps

    1. Merge PR feat(#554): emit minimal command flags in /assess output #557.
    2. (Optional, post-merge) File follow-up issue for AC-5 (--security-review additive flag) if symmetry with --testgen is desired.
    3. (Optional) Coordinate with feat(assess): detect prior assess markers — supersession note + re-assessment churn warning #555 / feat(assess): predict file-collision between PROCEED issues from body content #556 at /merger time — both touch SKILL.md Order: rule and Step 4 area; this PR's AC-8 exception should be preserved.
  6. added
    ready-for-review
    on Apr 26, 2026
  7. admarble commented on Apr 27, 2026

    @admarble
    ContributorAuthor

    QA Review for Issue #554 (Simple Fix — forced re-run)

    Re-run requested via /qa 554 --force at same commit (47f6ca76ba6352b3e58c44dc1a18fd0c23139539); content matches prior verdict.

    Size Gate

    Check Value
    Diff size 59 lines (threshold: 100)
    package.json changed No
    Security-sensitive paths No
    Decision Inline checks

    AC Coverage

    AC Description Status Notes
    AC-1 Skill emits --phases only when phases differ from default MET Rule 8 grounds default in DEFAULT_PHASES (src/lib/workflow/types.ts:38); #499 example collapsed into default group at SKILL.md:384. Spec text said "references bin/cli.ts"; impl points at types.ts (where the constant lives) and parenthetically restates "currently spec,exec,qa". Functional contract met.
    AC-2 Prefer additive flags when available MET Rule 8 documents --testgen preference; --security-review asymmetry called out explicitly. SKILL.md:322,329 rewritten to use --testgen.
    AC-3 SKILL.md examples updated MET :322/:329 → --testgen. :384 folded #499 into default group (relies on phase-mapper.determinePhasesForIssue ui→test auto-add — verified at phase-mapper.ts:182). :386 retains --phases spec,security-review,exec,qa (no additive flag).
    AC-4 Test asserts minimization MET New it("should not restate default phases or non-additive testgen…") at assess-skill.test.ts:141. Two assertions guard --phases spec,exec,qa and --phases <any>,testgen,<any>. 6/6 tests pass.
    AC-5 --security-review additive flag DEFERRED Per issue's own fallback clause; asymmetry documented in rule 8.
    AC-6 3-dir sync MET diff -q confirms identical content across .claude/skills/, skills/, templates/skills/. Existing 3-dir sync test passes.
    AC-7 CHANGELOG entry MET [Unreleased] / ### Changed entry references #554 and notes marker-vs-displayed-command divergence.
    AC-8 Order: filename-as-reason exception MET One-line exception added under Order: bullet across all 3 mirrors with concrete (qa/SKILL.md) example.
    AC-D1 Verify phase-mapper.ts resolution MET Confirmed: hasUILabels + determinePhasesForIssue (lines 24, 158, 182) inserts test before qa when ui label present, so --testgen + ui → spec,testgen,exec,test,qa.
    AC-D2 Marker/command divergence note MET Rule 8 final sentence: "markers are machine-readable, displayed commands are human shorthand."

    Coverage: 9/9 in-scope ACs met (AC-5 deferred per issue's fallback)


    Quality Metrics

    Metric Value Status
    Type issues (any) 0 OK
    Deleted tests 0 OK
    Files changed 5 OK
    Lines added +35 -
    Lines deleted -24 -
    Security patterns 0 OK

    CI Status (PR #557)

    8 passed, 0 pending, 0 failed: build (20.x), build (22.x), typecheck, validate-skills, validate-plugin, Hooks Validation, Plugin Structure Validation, Setup Directory Creation.


    Code Review

    Strengths:

    • Rule 8 is dense but self-contained: covers default-omission, additive-flag preference, the --testgen + ui edge case, the --security-review asymmetry, and the marker/command divergence in one paragraph.
    • References DEFAULT_PHASES constant rather than a CLI .option() description string — more durable across CLI-flag refactors.
    • The :384 collapse of Add QA skill check for three-directory skill sync #499 into the default group is the correct read of phase-mapper.determinePhasesForIssue — runtime behavior is preserved.
    • Test mirrors the structure of the existing flag-validity test (assess-skill.test.ts:127); low maintenance overhead.
    • AC-8 example (Order: 460 → 461 (qa/SKILL.md)) is concrete and matches the convention used elsewhere in the skill.

    Issues:

    • None blocking.

    Suggestions:

    • (Optional, non-blocking) AC-1 spec text said "references bin/cli.ts"; impl points at types.ts. The substitution is defensible — that's where the constant actually lives — but a future cross-reference of the literal AC text may briefly confuse. Consider mentioning both locations in rule 8 (e.g., "registered at bin/cli.ts:186, constant at src/lib/workflow/types.ts:38").

    Test Coverage Analysis

    Changed File Tier Has Tests? Test File
    .claude/skills/assess/SKILL.md Standard ✅ Yes src/lib/__tests__/assess-skill.test.ts (flag validity + 3-dir sync + new minimization)
    skills/assess/SKILL.md Standard ✅ Yes (same — covered by 3-dir sync test)
    templates/skills/assess/SKILL.md Standard ✅ Yes (same — covered by 3-dir sync test)
    src/lib/__tests__/assess-skill.test.ts Test file N/A self
    CHANGELOG.md Optional N/A docs

    Coverage: 3/3 changed source files covered. Critical paths without tests: None.


    Anti-Pattern Detection

    No anti-patterns detected on added lines: no any types, no eval/innerHTML/secrets/passwords. Changes are skill markdown + one declarative test + CHANGELOG entry. No new TypeScript logic, no dependency changes.


    Risk Assessment

    • Likely failure mode: If phase-mapper.determinePhasesForIssue is ever refactored to stop auto-adding test for ui labels, the simplified npx sequant run 499 -q example at SKILL.md:384 would silently mis-document runtime behavior. Mitigation: rule 8 names phase-mapper.determinePhasesForIssue as the dependency, so a future refactorer is steered to grep this skill.
    • Not tested: New test guards example commands but not the rule text itself. If a copy-paste regression re-introduces --phases spec,exec,qa inside rule 8's prose, the test won't catch it. Low priority — 3-dir sync test catches divergence, and the rule text is human-readable LLM instruction.

    Verdict: READY_FOR_MERGE

    All 9 in-scope ACs met (original + 2 derived). AC-5 deferred per the issue's own fallback clause with the asymmetry documented in rule 8. All 8 CI checks pass, 6/6 unit tests pass, no anti-patterns, no security/type concerns, 3-dir sync verified.

    The implementation is tight: minimal text changes across 3 mirrored files, one new test mirroring an existing pattern, and a CHANGELOG entry that captures the user-facing behavior change. Marker-vs-command divergence is documented to prevent future audit confusion.

    Documentation

    Next Steps

    1. Merge PR feat(#554): emit minimal command flags in /assess output #557.
    2. (Optional, post-merge) File follow-up issue for AC-5 (--security-review additive flag) if symmetry with --testgen is desired.
    3. (Optional) Coordinate at /merger time with feat(assess): detect prior assess markers — supersession note + re-assessment churn warning #555 / feat(assess): predict file-collision between PROCEED issues from body content #556 — both touch SKILL.md near the Order: rule and Step 4; this PR's AC-8 exception should be preserved.
  8. added 2 commits that reference this issue on Apr 28, 2026
  9. admarble commented on Apr 29, 2026

    @admarble
    ContributorAuthor

    Documentation Generated

    File: docs/features/assess-minimal-flags.md

    Sections Included

    • What you see (three output rules)
    • Examples (old vs new display per issue type)
    • What runs at runtime (phase-mapper resolution, ui-label auto-add, chain mode)
    • Markers vs displayed commands (intentional divergence)
    • Troubleshooting (resolved phases not visible; persistent --phases for security-review)

    Why a doc page despite skill-internal scope

    The change is skill-internal (output ergonomics), but two facts now matter to anyone reading /assess output: (a) the displayed command no longer matches the resolved workflow when ui labels auto-add test, and (b) <!-- assess:phases=... --> markers are the source of truth for full resolution. The doc captures both so future readers don't have to grep phase-mapper.ts to figure out why npx sequant run 499 -q runs four phases.

    Next Steps

    1. Review docs/features/assess-minimal-flags.md
    2. Merge PR feat(#554): emit minimal command flags in /assess output #557

    Ready to merge!

  10. added a commit that references this issue on Apr 29, 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

    clienhancementplannedready-for-review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions