Repository navigation
Description
Epic: graph-2026-11-simplify (F-10 cluster of #1501) Tier: mechanical Execution: sequant_run Blocked by: #1647 (both edit bin/cli.ts, KNOWN_KEYS in settings.ts, types.ts and src/commands/run.ts)
Problem
D-1. In 453 recorded runs --stacked, --reflect and --full-qa were each used 0 times. --reflect is read once (run-display.ts:297) and calls run-reflect.ts (291 lines). --stacked implies --chain (run.ts:67-74) and threads a predecessor base through worktree-manager.ts and batch-executor.ts:1406. --full-qa exists as a flag, the run.fullQa setting (#982) and a fullQa parameter on MCP sequant_run (src/mcp/tools/run.ts:655). D-3 keeps --chain, so the stacked-only paths go and the chain paths stay. Founding doc §4, OQ-1.
Decisions
| ID | Decision | Rejected |
|---|---|---|
| X-1 | ExecutionConfig.fullQa (#683) stays: sequant ready forces it on every gate pass (settings.ts:383-389). Only the opt-in surfaces go: --full-qa, run.fullQa, the MCP fullQa parameter |
removing the config field (breaks sequant ready) |
| X-2 | The MCP input schema strips unknown keys (no .strict() in src/mcp/tools/run.ts), so a caller still passing fullQa is ignored, not refused. OQ-1's grep is the check; no new warning surface |
a strict schema for one removed key |
Prior fixes / producers
- Prior removals: arch: extract RunOrchestrator — decouple execution engine from CLI wiring #503–arch: in-process MCP engine — eliminate subprocess indirection and enable real-time streaming #508.
--stackedlanded in feat(cli): --stacked flag — set chain-mode PR base to predecessor branch #605;--full-qain feat(run): fresh-session QA — never resume the exec session into qa; expose run.fullQa (setting + --full-qa + MCP param) #982. - Producers:
bin/cli.ts,src/lib/settings.ts(KNOWN_KEYS.run, schema, generated table),src/mcp/tools/run.ts,src/commands/run.ts,src/commands/run-display.ts,src/lib/workflow/{types,batch-executor,worktree-manager,run-reflect}.ts,docs/reference/run-command.md,docs/features/. Class: outcome per named surface.
Acceptance Criteria
- AC-1: None of the three flags appears on
runorready. Evidence:for c in run ready; do npx tsx bin/cli.ts $c --help; done | grep -cE -- '--stacked|--reflect|--full-qa'→0 - AC-2:
run-reflect.tsis gone and nothing imports it. Evidence:grep -rl 'run-reflect' src bin --include='*.ts' | wc -l | tr -d ' '→0 - AC-3: The MCP tool no longer accepts
fullQaand the setting is gone. Evidence:{ grep -c 'fullQa' src/mcp/tools/run.ts; awk '/^const REMOVED_KEYS/,/^};/{next} {print}' src/lib/settings.ts | grep -c 'fullQa'; } | awk '{s+=$1} END{print s}'→0(the REMOVED_KEYS block is excluded, because AC-4's warning names the key there; rewritten 2026-11-09 with the owner's consent) - AC-4: A settings file that sets
run.fullQaloads with one warning naming the removal in 3.0. Evidence:npx vitest run src/lib/settings.removed-keys.test.ts -t "fullQa"→≥ 1 passed, 0 failed - AC-5:
--chainstill provisions, rebases and resumes. Evidence:npx vitest run src/lib/workflow/chain-preflight.test.ts src/lib/workflow/chain-resume.test.ts src/lib/workflow/chain-rebase.integration.test.ts→0 failed(constraint) - AC-6: User docs no longer offer them. Evidence:
grep -rlE -- '--stacked|--reflect|--full-qa|fullQa' README.md docs/reference docs/features docs/guides docs/getting-started | wc -l | tr -d ' '→0 - AC-7: The changelog records the removal. Evidence:
awk '/^## \[Unreleased\]/,/^## \[[0-9]/' CHANGELOG.md | grep -cE -- '--stacked|--reflect|--full-qa'→≥ 1 - AC-8: No skill-directory edits. Evidence:
git diff --name-only $(git merge-base origin/main HEAD)..HEAD | grep -cE '^(plugin/|\.claude/skills/|templates/skills/)'→0(constraint)
OQ-1 (does any MCP caller pass fullQa): exec greps ~/Projects/harness and docs/internal/graph-*/HANDOFF.md and records the count in the PR body; no AC depends on it.
May touch
bin/cli.ts (the three .option( blocks only), src/lib/settings.ts, src/mcp/tools/run.ts and test, src/commands/run.ts, src/commands/run-display.ts, src/lib/workflow/run-reflect.ts and test (deleted), full-qa.test.ts (deleted), types.ts, batch-executor.ts and worktree-manager.ts (stacked branches only), their tests, docs/reference/run-command.md (flag rows only), CHANGELOG.
Non-Goals
- The
/reflectskill text (frozen; §10). --chain, multi-issue runs (feat(run):--chainand multi-issue runs print an "experimental" warning with their measured success rates — fixed, dated counts; the code stays #1651),sequant ready.
Done when
No flag, setting, MCP parameter or user doc offers stacked PRs, reflection or full-weight QA, and the chain suite is green.
Activity
admarble commentedon Nov 10, 2026
Runner context, 2026-11-09: repo state since this issue was written
#1647 merged as
fad6b401e(PR #1664). Readmainatfad6b401e.grep -c 'fullQa' src/mcp/tools/run.ts src/lib/settings.ts | awk -F: '{s+=$2} END{print s}'→0, could not pass alongside AC-4. AC-4's warning puts a"run.fullQa"entry inREMOVED_KEYS. The new Evidence skips that block, and it returns 12 onmaintoday.--model-ladderand--escalate-efforton run and ready, their settings and docs; old logs and settings still load #1647 addedREMOVED_KEYS(src/lib/settings.ts:840) andsrc/lib/settings.removed-keys.test.ts. Add"run.fullQa"to that map in the same message style, and add a test whose name containsfullQa(AC-4 filters with-t "fullQa"). Don't build a second mechanism.ExecutionConfig.fullQa(types.ts:218) stays. It's read byphase-executor.ts:1679and set byready-gate.ts:726. Remove the run-options field (types.ts:697,--full-qa's target),RunSettings.fullQaand its schema, default andKNOWN_KEYSentry insettings.ts, the MCP parameter, and therunresolution atconfig-resolver.ts:571.sequant readymust still force full QA.fad6b401e:run.ts:67-74(--stackedimplies--chain),run-display.ts:28and:297(--reflect),batch-executor.ts:1383(the stacked predecessor base), andworktree-manager.ts(stack manifest andprBaseunder--stacked). Keep the chain paths (D-3).CHANGELOG.md[Unreleased]anddocs/reference/run-command.mdcarry feat(run): the quality loop halts on a second consecutive AC_NOT_MET — its own counter, no ladder needed; maxIterations stays 3 #1646's, fix(run)!: no label adds thetestphase to a phase list the user or detection chose — remove the UI-label insertion indeterminePhasesForIssue(closes #1631) #1649's and chore(cli)!: remove the model ladder and effort escalation — modules,--model-ladderand--escalate-efforton run and ready, their settings and docs; old logs and settings still load #1647's entries. Add yours beside them. PR feat(#1351): improve(release): changelog fragments instead of a shared [Unreleased] block — 121/192 main commits touch CHANGELOG.md #1370 (changelog fragments) is still open.~/Projects/sequant.vitest.global-setup.tsrunsnpm run buildbefore every vitest run. In the main checkout that rebuilds thedist/the harness executes (gate(owner): pin the harness and matcha-maps to sequant 2.20.0 before 3.0 is published #1656, comment of 2026-11-08). Spec phases run in the main checkout, so read there and test in the worktree.admarble commentedon Nov 10, 2026
Complexity: Standard (8 ACs, ~9 directories)
AC Quality Check
bin/cli.ts:363,423,459). Notereadyhas no such options today, so that half passes vacuously; therunhalf gates the work.maintoday (run-reflect imported atrun-display.ts:28; AC-3 returns 12 per runner context; docs hit in README, run-command.md, features/stacked-prs.md; no changelog entry).fullQainsrc/lib/settings.removed-keys.test.ts. AC-5, AC-8 are constraints, not gates.docs/features, sodocs/features/stacked-prs.mdmust be deleted, and any links to it fixed.Scope Assessment
Non-Goals: present (
/reflectskill text,--chain, #1651,sequant ready).Verdict:⚠️ SCOPE_WARNING (many files, mechanical)
Acceptance Criteria
AC-1 — flags gone from
run/readyVerification: Integration Test (CLI help grep). Scenario: Given the CLI → When
run --help→ Then no--stacked|--reflect|--full-qa.AC-2 —
run-reflect.tsdeleted, no importersVerification: Integration Test (grep). Remove
run-display.ts:28import and the:297block.AC-3 — MCP
fullQaandrun.fullQasetting goneVerification: Integration Test (the rewritten grep; 12 today). Keep the
REMOVED_KEYSentry.AC-4 —
run.fullQain a settings file warns onceVerification: Unit Test. Add
"run.fullQa"toREMOVED_KEYS(settings.ts:840) and afullQatest. Reuse the #1647 mechanism.AC-5 — chain still works
Verification: Unit/Integration Test (the three chain suites). Constraint.
AC-6 — user docs clean
Verification: Integration Test (grep).
AC-7 — changelog entry
Verification: Integration Test (awk/grep) under
[Unreleased].AC-8 — no skill-dir edits
Verification: Integration Test (git diff grep). Constraint.
Implementation Plan
Phase 1: Remove surfaces
bin/cli.ts: delete the three.option(blocks (363, 423, 459).src/commands/run.ts:67-74: delete the--stackedimplies---chainblock and the--no-chainrejection.run-display.ts: drop the import (28) and the--reflectblock (297). Deleterun-reflect.tsandrun-reflect.test.ts.settings.ts: removeRunSettings.fullQa(365), schema (621),KNOWN_KEYSentry (793), default (1076), and doc comments (361-363, 619). Add"run.fullQa"toREMOVED_KEYS.src/mcp/tools/run.ts: remove thefullQaschema (659), type, destructure, the--full-qapush (695), and the passthrough (728-759).config-resolver.ts:571: setfullQatofalseor drop it. Per X-1,ExecutionConfig.fullQa(types.ts:218) stays;ready-gate.ts:726still sets it.Phase 2: Stacked-only paths (keep chain)
types.ts: removestacked(543),reflect(610), run-optionsfullQa(697), and thestackManifestfield (863) plus the predecessor-base fields that only stacked sets (~854-861). Check whetherpredecessorBranchhas chain-only users before removing.run-orchestrator.ts: deletebuildStackManifest(125) and theoptions.chain && options.stackedblock (2097-2115). Keep the chain rebase and resume code at ~2029-2071.batch-executor.ts:1383-1391andworktree-manager.ts(resolvePrBase'sstackPrBase,stackManifest,stackOptions): remove the stacked branches, keeping thebaseBranchand--baselogic from fix(run): --base creates the worktree from the branch but opens the PR against the repo default branch #1386.Phase 3: Tests, docs, changelog
full-qa.test.ts. Updaterun.test.ts,mcp/tools/run.test.ts,worktree-manager.test.ts,run-options-dead-surface.test.ts,run-preflight-exit.test.ts.ready-gate.test.tsandassess-collision-detect.test.tslikely stay (check; the latter's "reflect" is the skill name).run-command.md:54,69, the "Stacked PRs" section (~497-550), and thefullQasnippets (818, 835). EditREADME.md:199-202and:332. Deletedocs/features/stacked-prs.mdand fix inbound links.[Unreleased]: one entry beside feat(run): the quality loop halts on a second consecutive AC_NOT_MET — its own counter, no ladder needed; maxIterations stays 3 #1646/chore(cli)!: remove the model ladder and effort escalation — modules,--model-ladderand--escalate-efforton run and ready, their settings and docs; old logs and settings still load #1647/fix(run)!: no label adds thetestphase to a phase list the user or detection chose — remove the UI-label insertion indeterminePhasesForIssue(closes #1631) #1649 (names all three flags and therun.fullQawarning).~/Projects/harnessanddocs/internal/graph-*/HANDOFF.mdforfullQa, and record the count in the PR body.Design Review
ExecutionConfig.fullQastays (X-1).--model-ladderand--escalate-efforton run and ready, their settings and docs; old logs and settings still load #1647'sREMOVED_KEYS. No new mechanism and no strict schema (X-2). Rejected: removing the config field, which would breaksequant ready.--model-ladderand--escalate-efforton run and ready, their settings and docs; old logs and settings still load #1647. The removed-key warning follows the same pattern, so it is not a re-patch.ExecutionConfig.fullQaremain?" Becausereadyneeds it.fullQais set byconfig-resolver,ready-gateand MCP, and read byphase-executor.ts:1679.stackManifestandprBaseare produced only byrun-orchestratorand consumed bybatch-executorandworktree-manager. No divergence from the issue's prescription.Feature Quality Planning
REMOVED_KEYSblock, so keep thefullQastring out of any comment elsewhere insettings.ts.fullQain docs. Check thatdocs/reference/run-command.mddoes not describeExecutionConfig.fullQaorsequant readyusing that word.--stacked(e.g.worktree-manager.ts:899).Open Questions
predecessorBranchremoval. Recommendation: remove it if only stacked sets it. Impact if wrong: breaks the chain base path. Confirm with the chain tests (AC-5).Recommended Workflow
Phases: exec → qa
Quality Loop: disabled
Reasoning: Mechanical removal with explicit ACs. No UI. Evidence is grep-based, so no testgen. AC-4 is a single test that exec writes.
Label Review
Current: graph-2026-11-simplify. Recommended: add
planned. Quality Loop: won't auto-enable.chore(#1648): format and fix comment indexes
admarble commentedon Nov 10, 2026
QA Verdict: AC_MET_BUT_NOT_A_PLUS
AC coverage: 8/8 met
Gaps:
/assessstill recommends a flag that no longer exists..claude/skills/assess/SKILL.md:217andtemplates/skills/assess/SKILL.md:217describe--stacked, andsequant run 1 --stackednow printserror: unknown option '--stacked'./merger(SKILL.md:630, 667, 672) still describes how to detectsequant run --stackedPRs. It is harmless, but it is dead guidance.Suggestions:
run-orchestrator.ts:2011run-orchestrator.ts:2051-2052worktree-manager.ts:2740fullQain~/Projects/harnessand 0 indocs/internal/graph-*/HANDOFF.md.docs/adr/0004-…md:14,28still mentions--stacked. That is acceptable, because an ADR is a historical record.Reviewed in a separate session by claude-code (claude-opus-5-5); the change was written by claude-code (claude-sonnet-5-5).