Skip to content

feat(cli): add --security-review additive flag for symmetry with --testgen #559

Closed

Description

@admarble

Summary

/assess still emits --phases spec,security-review,exec,qa for security-review issues because no --security-review additive flag exists. PR #557 (issue #554) added --testgen symmetry and rule 8 in assess/SKILL.md explicitly documents this asymmetry. Add --security-review to close the loop — same pattern, mechanical replication.

Motivation

Today, after #557:

npx sequant run 500 -q --phases spec,security-review,exec,qa

After this issue:

npx sequant run 500 -q --security-review

Same runtime behavior, shorter display. Removes the only --phases line /assess is still forced to emit for non-resume / non-power-user cases.

Acceptance Criteria

  • AC-1: --security-review flag registered in bin/cli.ts near --testgen (currently line 208). Option text mirrors --testgen: "Run security-review phase after spec".
  • AC-2: RunOptions.securityReview?: boolean added to src/lib/workflow/batch-executor.ts and plumbed through mergedOptions like --testgen.
  • AC-3: phase-mapper.determinePhasesForIssue inserts security-review after spec when options.securityReview is set. Mirror the existing testgen branch (phase-mapper.ts:174-189).
  • AC-4: SKILL.md Rule 8 updated in all 3 skill directories. Remove the "asymmetry: no --security-review additive flag exists yet" clause; list --security-review as the second additive flag.
  • AC-5: SKILL.md example at :386 switches to npx sequant run 500 -q --security-review. The Cleanup: block's --phases ...,security-review annotation simplifies to --security-review accordingly.
  • AC-6: Test in src/lib/__tests__/assess-skill.test.ts extended to reject --phases <any>,security-review,<any> patterns — mirrors the existing testgen assertion.
  • AC-7: CHANGELOG entry under [Unreleased] / ### Added referencing this issue.

Non-Goals

  • Not changing how the security-review phase runs at runtime — same phase-executor.ts path.
  • Not renaming the phase. Internal name stays security-review.
  • Not adding label-driven auto-detection beyond what phase-mapper.ts already does for auth/security labels (verify at /spec time; preserve existing behavior).

Risks / Open Questions

  • Existing auto-detection: phase-mapper.ts may already auto-add security-review for certain labels. /spec must verify and preserve current label-driven behavior — --security-review is the explicit-override path.
  • Mirror sync drift: 3-dir sync test (assess-skill.test.ts:143) catches this.
  • Documentation: docs/features/assess-minimal-flags.md (added in feat(#554): emit minimal command flags in /assess output #557) needs a one-line update once --security-review ships.

Complexity

small — one CLI option + ~5 lines in phase-mapper + skill examples + test extension. Single PR.

Self-assessed workflow

`spec → exec → qa` with `-q` (multi-file: CLI + interface + phase-mapper + 3-dir skill sync + test + CHANGELOG)

Origin

Deferred from #554 / PR #557 per the issue body's own AC-5 fallback clause.

Activity

  1. added
    enhancement
    cli
    on Apr 29, 2026
  2. admarble commented on May 3, 2026

    @admarble
    ContributorAuthor

    → PROCEED — --security-review additive flag, mechanical mirror of #557's --testgen pattern, 7 ACs

    Workflow: spec → exec → qa with -q

    npx sequant run 551 559 -q
    

    Can run in parallel with #551 (no file overlap). Must land before #556 — both modify assess/SKILL.md across 3 skill dirs.

  3. admarble commented on May 3, 2026

    @admarble
    ContributorAuthor

    Complexity: Standard (7 ACs, ~6 directories)

    AC Quality Check

    All 7 ACs passed lint (no vague/unmeasurable/incomplete patterns). Each AC names a specific file path or line number — verification targets are concrete.


    Scope Assessment

    Non-Goals: Present — runtime behavior unchanged, no rename, no new label-driven auto-detection.

    Metric Value Status
    Feature count 3 (heuristic) ❌
    AC items 7 ⚠️
    Directory spread 4 ⚠️

    Verdict: ❌ SCOPE_SPLIT_RECOMMENDED (analyzer) — Override: ✅ SCOPE_OK

    Override rationale: Analyzer over-splits because the change touches 6 directories (bin/, src/lib/workflow/, src/lib/tests/, 3× skill mirrors, CHANGELOG). All 7 ACs implement a single change — adding --security-review CLI flag — and are tightly coupled (CLI option ↔ interface ↔ phase-mapper ↔ docs ↔ test). Splitting would create non-atomic PRs that ship a half-wired flag. /assess already verified single-PR via PROCEED action.


    Acceptance Criteria

    AC-1: --security-review flag registered in bin/cli.ts

    Verification: Integration Test
    Scenario: Given bin/cli.ts is parsed → When inspecting Commander options → Then --security-review exists with help text "Run security-review phase after spec"
    Assumptions: Place adjacent to --testgen (currently bin/cli.ts:208). Existing assess-skill.test.ts:128-138 collects --[a-z][a-z-]* flags from bin/cli.ts lines starting with .option( — new flag will be picked up automatically.

    AC-2: RunOptions.securityReview?: boolean plumbed end-to-end

    Verification: Integration Test
    Scenario: Given --security-review passed on CLI → When batch executor reads merged options → Then options.securityReview === true reaches determinePhasesForIssue
    Assumptions: Add field to RunOptions in src/lib/workflow/types.ts:180-220 (alongside testgen?: boolean at line 190). Mirror env-var override in batch-executor.ts:296-298 (SEQUANT_SECURITY_REVIEW === "true" → config.securityReview = true). Spread through mergedOptions follows existing testgen pattern.

    AC-3: phase-mapper.determinePhasesForIssue inserts security-review after spec

    Verification: Unit Test
    Scenario: Given basePhases = ["spec","exec","qa"] and options.securityReview = true → When determinePhasesForIssue called → Then result contains security-review immediately after spec, idempotent on repeat
    Assumptions: Mirror testgen branch at phase-mapper.ts:174-179. Also extend PhaseMapperOptions interface (phase-mapper.ts:17-19) with securityReview?: boolean. Verify idempotency — auto-detection from security labels (phase-mapper.ts:84-88) already inserts security-review; manual flag must not duplicate.

    AC-4: SKILL.md Rule 8 updated across all 3 skill directories

    Verification: Integration Test
    Scenario: Given Rule 8 prose at assess/SKILL.md:251 → When updated → Then "asymmetry: no --security-review additive flag exists yet" clause is removed and --security-review is listed as the second additive flag (alongside --testgen)
    Assumptions: 3-dir sync test (assess-skill.test.ts:155-164) enforces byte-identical content across .claude/skills/, templates/skills/, skills/. Suggest single edit applied with replace_all per file, or use sed -i across all 3.

    AC-5: SKILL.md example at :386-415 switches to --security-review

    Verification: Integration Test
    Scenario: Given the 13-issue batch example → When updated → Then line at :406 reads npx sequant run 500 -q --security-review and the Flags: annotation at :414 simplifies from --phases ...,security-review to --security-review
    Assumptions: Apply across all 3 skill dirs. Marker at :423 (assess:phases=spec,security-review,exec,qa) stays unchanged — it records resolved workflow.

    AC-6: Test in assess-skill.test.ts extended

    Verification: Unit Test
    Scenario: Given assess-skill.test.ts:141-152 testgen rejection → When extended → Then test also asserts expect(line).not.toMatch(/--phases\s+\S*\bsecurity-review\b/) for every example sequant run line in SKILL.md
    Assumptions: Add as a sibling assertion in the existing it() block, OR rename the test to "should not restate default phases or non-additive testgen/security-review in example commands". Single line addition.

    AC-7: CHANGELOG entry under [Unreleased] / ### Added

    Verification: Manual Test
    Scenario: Given CHANGELOG.md → When opened → Then [Unreleased] / ### Added contains a one-line entry referencing #559 (e.g., - \--security-review` additive CLI flag for symmetry with `--testgen` (#559)) **Assumptions:** Match existing CHANGELOG style — check what #557 (--testgen` PR) wrote and mirror format.


    Implementation Plan

    Phase 1: TypeScript wiring (CLI → phase-mapper)

    1. src/lib/workflow/types.ts:190 — add securityReview?: boolean; to RunOptions (next to testgen?: boolean).
    2. src/lib/workflow/phase-mapper.ts:17-19 — extend PhaseMapperOptions interface with securityReview?: boolean;.
    3. src/lib/workflow/phase-mapper.ts:174-179 — add branch mirroring testgen: if (options.securityReview && phases.includes("spec")) { … phases.splice(specIndex + 1, 0, "security-review"); }. Guard against duplicate when label-based auto-detection already inserted it.
    4. bin/cli.ts:208 — add .option("--security-review", "Run security-review phase after spec") immediately after --testgen.
    5. src/lib/workflow/batch-executor.ts:296-298 — add env-var override: if (process.env.SEQUANT_SECURITY_REVIEW === "true") { config.securityReview = true; }.
    6. src/lib/workflow/batch-executor.ts:641-656 — verify whether the runtime testgen-injection block needs a parallel securityReview branch, OR whether determinePhasesForIssue already covers both flag-driven insertion paths. Pick one consistent location; do not split.

    Phase 2: Skill prose sync (3 mirrors)

    1. {.claude,templates,/}skills/assess/SKILL.md:251 — rewrite Rule 8: replace "currently --testgen is the only additive flag" with "additive flags: --testgen (bin/cli.ts:208) and --security-review"; delete the asymmetry sentence; keep marker/displayed-command divergence note.
    2. Same files, :406 — change npx sequant run 500 -q --phases spec,security-review,exec,qa → npx sequant run 500 -q --security-review.
    3. Same files, :414 — simplify --phases ...,security-review annotation to --security-review.

    Phase 3: Tests + changelog

    1. src/lib/__tests__/assess-skill.test.ts:141-152 — add expect(line).not.toMatch(/--phases\s+\S*\bsecurity-review\b/) and rename test to cover both flags.
    2. CHANGELOG.md — add entry under [Unreleased] / ### Added.

    Sequencing: Phase 1 → Phase 2 → Phase 3. Phase 2 edits must apply to all 3 mirrors atomically (3-dir sync test will fail otherwise).


    Design Review

    1. Where does this logic belong? CLI option in bin/cli.ts (Commander layer); flag-to-phase mapping in phase-mapper.ts (domain layer); env-var bridge in batch-executor.ts (orchestration layer). Mirrors existing --testgen exactly — no new architecture.

    2. What's the simplest correct approach? Mechanical mirror of --testgen. Reject any temptation to refactor "the additive-flag mechanism" into a generic registry — premature abstraction with N=2.

    3. What existing pattern does this follow? The --testgen additive-flag pattern, fully implemented in feat(#554): emit minimal command flags in /assess output #557. Same shape: option → RunOptions field → PhaseMapperOptions field → phases.splice insertion → env-var override → SKILL.md doc.

    4. What would a senior reviewer challenge? Three plausible pushbacks:

      • "Why two insertion sites in batch-executor?" — determinePhasesForIssue (line 174) and the runtime-injection block (line 641). Audit whether testgen needs both because of resume-after-spec semantics; security-review may need the same. Document in PR.
      • "What about label-driven auto-detection?" — auth/security labels already insert security-review (phase-mapper.ts:84-88). The flag is the explicit-override path; ensure idempotent insertion (don't duplicate).
      • "Why not deprecate --phases ...,security-review?" — Out of scope; --phases remains the power-user/resume escape hatch.

    Feature Quality Planning

    All standard checks pass. Notable items:

    • Idempotency check (AC-3): Manual flag + auto-detection from auth/security labels can both fire. Test must verify security-review appears exactly once.
    • Resume semantics (Phase 1, step 6): Mirror whichever testgen handling exists in batch-executor.ts:641-656 — getting this wrong silently breaks --security-review for resumed workflows.
    • 3-mirror sync (AC-4, AC-5): All edits must hit .claude/skills/, templates/skills/, skills/. The existing 3-dir-sync test (assess-skill.test.ts:155-164) is the safety net.

    Derived ACs

    Source Derived AC Priority
    Idempotency AC-3.1: determinePhasesForIssue is idempotent when securityReview=true AND security labels present High

    Open Questions

    1. Single insertion site or two? — batch-executor.ts:641-656 has its own testgen-injection block separate from determinePhasesForIssue. Recommendation: mirror exactly whatever --testgen does; do not refactor in this PR. Impact: if missed, --security-review won't apply to resumed workflows.
    2. Help text wording? — Issue body specifies "Run security-review phase after spec". Recommendation: use verbatim. Impact: low.

    Recommended Workflow

    Phases: spec → exec → qa
    Quality Loop: enabled (per /assess marker)
    Reasoning: Matches /assess recommendation. ACs are largely Integration/Unit — testgen skipped because the test extension is a one-line addition to an existing test (not a stub-needing greenfield). No UI; no test phase. Not security-sensitive code; no security-review phase.


    Label Review

    Current: enhancement, cli
    Recommended: enhancement, cli, planned
    Reason: Labels accurately describe scope. Adding planned to mark spec completion.
    Quality Loop: Enabled per /assess marker (<!-- assess:quality-loop=true -->); not auto-triggered by labels (no complex/refactor/breaking present).

    → gh issue edit 559 --add-label planned


    Conflict Risk Analysis

    --- DRAFT GITHUB ISSUE COMMENT (PLAN) ---

    Plan: --security-review additive flag

    Workflow: spec → exec → qa (quality loop enabled). Single PR.

    Acceptance Criteria

    • AC-1: --security-review registered in bin/cli.ts:208 next to --testgen. (Integration Test — Commander option present; help text "Run security-review phase after spec")
    • AC-2: RunOptions.securityReview?: boolean added in src/lib/workflow/types.ts:190; env override SEQUANT_SECURITY_REVIEW mirrored in batch-executor.ts:296-298. (Integration Test — flag reaches determinePhasesForIssue)
    • AC-3: phase-mapper.determinePhasesForIssue inserts security-review after spec when options.securityReview set. Idempotent vs label-based auto-detection. (Unit Test)
    • AC-3.1 (derived): Idempotency test — flag + auth label → exactly one security-review phase. (Unit Test)
    • AC-4: SKILL.md Rule 8 (:251) updated across all 3 mirrors — list --security-review as second additive flag, drop asymmetry clause. (Integration Test — 3-dir sync test enforces)
    • AC-5: SKILL.md example at :406 and :414 annotation switch to --security-review. (Integration Test)
    • AC-6: assess-skill.test.ts:141-152 extended with expect(line).not.toMatch(/--phases\s+\S*\bsecurity-review\b/). (Unit Test)
    • AC-7: CHANGELOG entry under [Unreleased] / ### Added referencing feat(cli): add --security-review additive flag for symmetry with --testgen #559. (Manual)

    Implementation Order

    Phase 1 (TS wiring): types.ts → phase-mapper.ts (interface + branch) → bin/cli.ts → batch-executor.ts (env override + verify resume-injection block).
    Phase 2 (3-mirror docs): Edit Rule 8 + example + annotation across .claude/skills/, templates/skills/, skills/. 3-dir sync test = safety net.
    Phase 3 (tests + CHANGELOG).

    Key Decisions

    • No abstraction. N=2 additive flags is too few to warrant a registry — mirror --testgen mechanically.
    • Idempotent insertion. auth/security labels already auto-insert security-review via phase-mapper.ts:84-88. Flag must not duplicate when both present.
    • Resume semantics. Whatever --testgen does in batch-executor.ts:641-656 (runtime injection during resume), --security-review must do the same — audit before mirroring.

    Open Questions

    1. Single vs dual insertion site for the flag — determinePhasesForIssue (line 174) vs runtime-injection block (line 641). Default: mirror whatever --testgen does today.
    2. Conflict warning: This PR must merge before feat(assess): predict file-collision between PROCEED issues from body content #556 — both edit assess/SKILL.md Rule 8 across 3 mirrors.
  4. added
    planned
    on May 3, 2026
  5. admarble commented on May 3, 2026

    @admarble
    ContributorAuthor

    --- DRAFT GITHUB ISSUE COMMENT (PROGRESS UPDATE) ---

    /exec Progress Update

    PR: #567

    AC Coverage

    AC Description Status Evidence
    AC-1 --security-review registered in bin/cli.ts ✅ Implemented bin/cli.ts:209, verified via --help
    AC-2 RunOptions.securityReview plumbed end-to-end ✅ Implemented types.ts:191, env override batch-executor.ts:300-302
    AC-3 phase-mapper.determinePhasesForIssue inserts after spec ✅ Implemented phase-mapper.ts:184-190
    AC-3.1 (derived) Idempotent vs label-based auto-detection ✅ Implemented Test in phase-mapper.test.ts:170-178
    AC-4 SKILL.md Rule 8 updated across 3 mirrors ✅ Implemented All 3 mirrors at :251; 3-dir sync test passes
    AC-5 SKILL.md example + Flags annotation switch ✅ Implemented :301, :313, :406, :414 (also covered earlier #412 example)
    AC-6 assess-skill.test.ts extended ✅ Implemented :151 — caught my missed :301 example on first run
    AC-7 CHANGELOG entry under [Unreleased]/Added ✅ Implemented Top of section

    Files Changed

    • bin/cli.ts — register --security-review next to --testgen
    • src/lib/workflow/types.ts — add RunOptions.securityReview
    • src/lib/workflow/phase-mapper.ts — extend PhaseMapperOptions, insert phase after spec
    • src/lib/workflow/phase-mapper.test.ts — 5 new tests (insertion, idempotency, composition, no-spec, control)
    • src/lib/workflow/batch-executor.ts — env override + runtime-injection block (resume after spec already ran)
    • src/lib/__tests__/assess-skill.test.ts — extend rejection regex for --phases ...,security-review
    • .claude/skills/assess/SKILL.md, skills/assess/SKILL.md, templates/skills/assess/SKILL.md — Rule 8 rewrite + 2 example switches in each
    • docs/features/assess-minimal-flags.md — table row + troubleshooting copy updated
    • CHANGELOG.md — [Unreleased]/Added entry

    Quality Plan Alignment

    Quality Dimension Status Notes
    Idempotency check (AC-3.1) ✅ Covered by !phases.includes("security-review") guard + dedicated test
    Resume semantics ✅ Mirrored testgen's runtime-injection block (batch-executor.ts:660-674)
    3-mirror sync ✅ All 3 SKILL.md files byte-identical; 3-dir sync test passes

    Derived ACs: 1/1 addressed (AC-3.1)

    Build / Lint / Test Results

    • npm run build — passes (no TypeScript errors)
    • npm run lint — passes (0 warnings, 0 errors, --max-warnings 0)
    • npx vitest run src/lib/workflow/ src/lib/__tests__/ — 832 passed across 34 test files
    • npx tsx bin/cli.ts run --help — shows --security-review Run security-review phase after spec
    • Manual end-to-end trace confirmed: idempotent vs auth label, composes with --testgen, no-op when spec absent

    Pre-PR Confidence Check

    • Weakest part: Composition order with --testgen is spec → security-review → testgen → exec → qa (security-review inserted at index 1 after testgen lands there, pushing testgen down). Test asserts both phases appear once and security-review is at index 1, but this ordering is incidental rather than designed — if a future change reorders insertion, the composition test will catch it but no doc states the intent.
    • Coverage gaps: No integration test for the env override (SEQUANT_SECURITY_REVIEW=true), but it's a 3-line mirror of the existing testgen env override which has identical structure and no integration test either. Acceptable per existing pattern.

    PR Status

    Created: #567

    Notes

  6. admarble commented on May 3, 2026

    @admarble
    ContributorAuthor

    QA Review for Issue #559

    PR: #567 — c2ddf72

    AC Coverage

    AC Source Description Status Notes
    AC-1 Original --security-review flag in bin/cli.ts MET bin/cli.ts:209, help text "Run security-review phase after spec" verbatim per spec; verified via npx tsx bin/cli.ts run --help
    AC-2 Original RunOptions.securityReview plumbed end-to-end MET types.ts:191; env override SEQUANT_SECURITY_REVIEW=true at batch-executor.ts:300-302 mirrors testgen
    AC-3 Original phase-mapper.determinePhasesForIssue inserts after spec MET phase-mapper.ts:182-188; !phases.includes("security-review") guard for idempotency
    AC-3.1 Derived (Idempotency) Idempotent vs label-based auto-detection MET phase-mapper.test.ts:170-178 — flag + auto-detected phases → exactly one security-review
    AC-4 Original SKILL.md Rule 8 across 3 mirrors MET assess/SKILL.md:251 rewritten in all 3 mirrors; asymmetry clause removed; --security-review listed as second additive flag; 3-dir sync diff -q passes
    AC-5 Original SKILL.md examples switched MET Lines 301, 313, 406, 414 in each mirror; Flags: annotations simplified from --phases ...,security-review to --security-review
    AC-6 Original assess-skill.test.ts extended MET :151 adds expect(line).not.toMatch(/--phases\s+\S*\bsecurity-review\b/); test renamed to cover both flags
    AC-7 Original CHANGELOG entry under [Unreleased]/Added MET Detailed entry referencing #559, idempotency, env var, resume semantics

    Coverage: 8/8 AC items fully met (7 original + 1 derived)
    Original ACs: 7/7 met
    Derived ACs: 1/1 met


    Quality Plan Verification

    Dimension Items Planned Items Addressed Status
    Idempotency check 1 (AC-3.1) 1 ✅ Complete
    Resume semantics 1 (Phase 1 step 6) 1 ✅ Complete (mirrored testgen runtime-injection block at batch-executor.ts:662-674)
    3-mirror sync 1 (AC-4, AC-5) 1 ✅ Complete (3-dir sync test enforces; verified manually)

    Quality Plan Status: Complete


    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
    Setup Directory Creation COMPLETED success ✅ MET
    Hooks Validation COMPLETED success ✅ MET

    CI Summary: 8 passed, 0 pending, 0 failed


    Stale Branch Check

    Check Value
    Commits behind main 2
    Threshold 5
    Status ✅ OK

    Quality Metrics

    Metric Value Status
    Type issues (any) 0 OK
    Deleted tests 0 OK
    Files changed 11 OK
    Lines added +103 -
    Lines deleted -20 -

    Test Coverage Analysis

    Changed File Tier Has Tests? Test File
    bin/cli.ts Standard ✅ Yes assess-skill.test.ts (regex-based flag presence checks)
    src/lib/workflow/types.ts Optional N/A Type-only
    src/lib/workflow/phase-mapper.ts Critical ✅ Yes phase-mapper.test.ts:148-193 (5 new tests)
    src/lib/workflow/batch-executor.ts Critical ⚠️ No direct test Env-override + runtime-injection mirrors testgen, which itself has no integration test (existing pattern)
    src/lib/__tests__/assess-skill.test.ts Standard self -
    .claude/skills/assess/SKILL.md (×3) Standard ✅ Yes 3-dir sync test enforces parity
    docs/features/assess-minimal-flags.md Optional N/A Docs
    CHANGELOG.md Optional N/A Docs

    Coverage: Critical paths covered. The env-override + resume-injection in batch-executor.ts is a 3-line/12-line mirror of identical testgen blocks — accepting same coverage posture as the existing testgen pattern (acknowledged in /exec progress note).


    Code Review

    Strengths:

    • Clean mechanical mirror of feat(#554): emit minimal command flags in /assess output #557's --testgen pattern — same shape across all 5 layers (CLI option → RunOptions field → PhaseMapperOptions field → phase-mapper splice → batch-executor env override + runtime injection).
    • Idempotency guard is explicit and tested (!phases.includes("security-review") in both phase-mapper.ts:186 and batch-executor.ts:665).
    • Resume semantics correctly handled: when specAlreadyRan, phases.unshift("security-review") puts the phase at the front of the remaining list — symmetric with the testgen handling 17 lines above.
    • Test additions go beyond the bare AC-6: 5 new unit tests cover insertion, no-op, no-spec, idempotency, and composition with --testgen.
    • 3-mirror sync verified byte-identical via diff -q.
    • Composition test correctly documents the spec → security-review → testgen → exec → qa ordering (security-review at index 1, testgen pushed to index 2) — incidental but pinned by test.

    Issues:

    • None blocking.

    Suggestions:

    • None for this PR. The duplicate insertion logic across phase-mapper.ts (planning) and batch-executor.ts (resume runtime) is an established pattern with --testgen. If future changes drift one without the other, the existing tests should catch it.

    Test Quality Review

    Category Status Notes
    Behavior vs Implementation ✅ OK Tests assert on output array shape, not internal state
    Coverage Depth ✅ OK 5 scenarios: insertion, unset flag, no-spec, idempotency, composition with testgen
    Mock Hygiene ✅ OK No mocks — pure-function tests
    Test Reliability ✅ OK Deterministic; no timing or filesystem dependencies

    Anti-Pattern Detection

    Code Patterns

    No critical patterns detected. Diff is small, no any casts, no empty catches, no hardcoded secrets, no SQL.

    Critical Issues: 0
    Warnings: 0


    Call-Site Review

    New exported functions detected: 0 (only added a property to existing RunOptions interface and PhaseMapperOptions interface; modified existing determinePhasesForIssue and runIssueWithLogging paths)

    N/A — no new exported functions to call-site review.


    Execution Evidence

    Test Type Command Exit Code Result
    Smoke test npx tsx bin/cli.ts run --help | grep security-review 0 Shows --security-review Run security-review phase after spec
    Build npm run build 0 Pass
    Targeted tests npx vitest run src/lib/workflow/phase-mapper.test.ts src/lib/__tests__/assess-skill.test.ts 0 33/33 pass
    Broader tests npx vitest run src/lib/workflow/ src/lib/__tests__/ 0 832/832 pass
    3-mirror sync diff -q .claude/skills/assess/SKILL.md skills/assess/SKILL.md && diff -q .claude/skills/assess/SKILL.md templates/skills/assess/SKILL.md 0 Identical

    Evidence status: Complete


    Skill Command Verification

    Skill files changed: 3 (all assess/SKILL.md mirrors)

    File Commands Found Verification Status
    .claude/skills/assess/SKILL.md 4 example npx sequant run ... --security-review ✅ Passed (flag verified via --help)
    skills/assess/SKILL.md (mirror) ✅ Passed
    templates/skills/assess/SKILL.md (mirror) ✅ Passed

    Commands Verified:

    • npx sequant run 412 -q --security-review → flag valid (verified via npx tsx bin/cli.ts run --help)
    • npx sequant run 500 -q --security-review → flag valid (same)

    Verification Status: Passed


    CLI Registration Verification

    Option files modified: Yes (bin/cli.ts, src/lib/workflow/types.ts, src/lib/workflow/batch-executor.ts)

    Interface Field Runtime Usage CLI Registered Status
    securityReview mergedOptions.securityReview flow → phase-mapper.ts:184, batch-executor.ts:663 --security-review at bin/cli.ts:209 ✅ OK

    Verification Status: Passed


    Skill Change Review

    • Command verified: Executed npx tsx bin/cli.ts run --help; --security-review shows up with correct text.
    • Fields verified: N/A — no JSON commands in changed skill content.
    • Patterns complete: Rule 8 prose now lists both additive flags symmetrically; old asymmetry note removed; --phases fallback retained for power-user workflows.
    • Dependencies explicit: No new CLI dependencies.

    Smoke Test

    Test Command Result Notes
    Happy path npx tsx bin/cli.ts run --help | grep security-review ✅ Flag present
    Build npm run build ✅ Compiles
    Unit tests npx vitest run src/lib/workflow/ src/lib/__tests__/ ✅ 832/832 pass

    Smoke Test Status: Complete


    CHANGELOG Verification

    Check Status
    CHANGELOG.md exists ✅ Found
    User-facing changes ✅ Yes (new CLI flag)
    [Unreleased] entry ✅ Present
    Entry format ✅ Valid (references #559, describes behavior incl. idempotency, env var, resume)

    Result: CHANGELOG requirements met


    Self-Evaluation

    • Verified working: Yes — ran --help, build, and full test suite in the worktree; verified 3-mirror byte-identical sync; verified 8/8 CI checks green on PR feat(#559): add --security-review additive CLI flag #567.
    • Test efficacy: High — 5 new unit tests covering insertion, no-op, no-spec, idempotency, composition. Idempotency case directly verifies AC-3.1 (derived). Composition test pins behavior under --testgen --security-review.
    • Likely failure mode: Drift between testgen and security-review blocks in batch-executor.ts:645-674 if a future change updates one without the other. Mitigated by adjacent placement in code and parallel test coverage.
    • Verdict confidence: High. Mechanical mirror of an established (feat(#554): emit minimal command flags in /assess output #557) pattern, all ACs literally met, comprehensive test coverage, clean docs, and all CI green.

    Verdict: READY_FOR_MERGE

    All 8 ACs (7 original + 1 derived) are MET. CI is green (8/8). Build passes, full test suite passes (832/832), 3-mirror SKILL.md sync verified, CHANGELOG present, help text matches spec verbatim, env override and resume injection mirror testgen exactly.

    Documentation: Before merging, run /docs <issue> to generate feature documentation (or note that docs/features/assess-minimal-flags.md is already updated as part of this PR — no additional docs needed).

    Conflict reminder: Per /spec, this PR must merge before #556 (both edit assess/SKILL.md Rule 8 across the 3 mirrors).

    Next Steps

    1. Merge PR feat(#559): add --security-review additive CLI flag #567.
    2. Land before feat(assess): predict file-collision between PROCEED issues from body content #556 to avoid 3-mirror SKILL.md merge conflicts.
  7. added
    ready-for-review
    on May 3, 2026
  8. added a commit that references this issue on Sep 9, 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