Repository navigation
Description
Problem
npx sequant stats (56 runs locally) reports:
Chain mode: 29% (vs 92% single issue)
Multi-issue runs less successful (51%)
Chain-mode success has stayed well below single-issue performance even after #452's reliability work (which observed 50% chain-mode success at the time). The current 29% number is on a small sample (~16 chain runs out of 56), so this is partly a "do we have enough signal" question and partly a forensic one.
This blocks confident recommendation of --chain from /assess collision detection (src/lib/assess-collision-detect.ts) — we currently suggest chain mode for ≥3 file collisions, but if the success rate is this low, the suggestion itself may be net-negative.
Strategy
Mirror the #437 pattern: investigation first, no implementation until findings drive it.
Phase A — Confirm the signal
- AC-1: Pull all chain-mode runs from
.sequant/metrics.jsonandruns/*.json. Confirm the success-rate gap holds across the longer history, not just the most-recent 16-run window. - AC-2: Segment by issue count: are 2-issue chains better than 3+? Is failure concentrated in a specific link position (last issue most often, or first)?
Phase B — Failure forensics
- AC-3: For each failed chain run, classify the failure:
- Cross-issue mock gap (cf. Add Aider as second agent backend #369/Expose Sequant workflow as MCP server #372 pattern)
- Rebase / lockfile drift (cf. fix: Rebase worktrees onto main before PR to prevent lockfile drift #295, fix(checkpoint): scope chain-mode checkpoint to feature paths, don't sweep dirty tree #528)
- Checkpoint commit issue
- QA-gate timeout /
--qa-gateinteraction - Something else specific to chain mode
- AC-4: Identify whether failures are chain-specific (would have succeeded as independent runs) or just regular failures that happen to have run in chain mode.
Phase C — Output
- AC-5: Report top 3 failure modes with frequency, plus a recommendation: keep
--chainas suggested workflow, deprecate, or restrict to specific patterns. - AC-6: If the data says
--chainis structurally lower-success, update/assesscollision-detection guidance to reflect that.
Non-Goals
- New tooling. Use existing
sequant stats,sequant logs, and the run-log JSON. - Re-litigating the chain-mode design itself — focus is "what's failing and why."
References
- Data-driven workflow optimization: systematic analysis of run logs and conversation data #437 — data-driven workflow analysis pattern
- Improve multi-issue reliability: default to parallel worktrees and add spec retry logic #452 — prior chain-mode reliability work (50% → ?)
- feat(assess): predict file-collision between PROCEED issues from body content #556 /
src/lib/assess-collision-detect.ts— where chain is recommended today feedback_cross_pr_mock_gaps.md— one known cross-PR failure class
Activity
admarble commentedon May 9, 2026
→ PROCEED — Investigation issue mirroring #437 pattern (data first, no implementation until findings). 6 ACs phased A→B→C; existing tooling (
sequant stats,sequant logs,runs/*.json).Workflow:
spec → exec → qawith quality loop⚠ Investigation only; AC-6 update to
/assesscollision-detect guidance is conditional on data.⚠ Unblocks #605 once keep/deprecate recommendation lands.
admarble commentedon May 10, 2026
Supersedes prior assess from 2026-05-09 (PROCEED)
→ PROCEED — Investigation issue mirroring #437 pattern (data first, no implementation until findings). 6 ACs phased A→B→C; existing tooling (
sequant stats,sequant logs,runs/*.json).Workflow:
spec → exec → qawith quality loop⚠ AC-1 must confirm signal holds beyond the current ~16-run window before Phase B forensics.
⚠ AC-6 update to
/assesscollision-detect guidance is conditional on data.⚠ Unblocks #605 once keep/deprecate recommendation lands.
admarble commentedon May 10, 2026
Plan (spec)
Standard complexity — 6 ACs in investigation pattern (mirrors #437).⚠️ Scope at AC-count threshold; acceptable since ACs are sub-questions of one investigation.
Acceptance Criteria with verification
--chainruns from.sequant/metrics.json+.sequant/logs/run-*.json(96 logs); confirm gap holds across full history with N reported. Manual Test.docs/reference/chain-mode-analysis-2026-05.md. Manual Test./assesscollision-detect rule across runtime + 3 skill mirrors + 2 user docs (see Rule Touchpoints). Manual Test → Unit Test if logic changes.Implementation outline
Rule Touchpoints (for AC-6, if it fires)
src/lib/assess-collision-detect.ts:264if (r.issues.length >= 3 && !chainSuggestion){.claude,templates,}/skills/assess/SKILL.mdChain: npx sequant run … --chain --qa-gate -q(×3 mirrors)**/assess/references/predicted-collision-detection.mdonly when ≥3 issues collide(×3 mirrors)docs/guides/git-workflows.md:126Chain (--chain) 50% n=4— already stale from #452 eradocs/features/parallel-execution.mdKey risks
runs/*.json; only.sequant/logs/run-*.jsonexists. Resolve before Phase A.docs/guides/git-workflows.md:126even if verdict = keep; the50% n=4line is misleading as written.Open questions
runs/*.jsonas.sequant/logs/run-*.json? (recommended)Workflow: spec → exec → qa with quality loop. No
test/testgen(no browser surface; all Manual Test ACs).admarble commentedon May 10, 2026
Progress Update — /exec
PR: #621
AC Coverage
.sequant/metrics.json; 28.6% chain vs 80% single-issue (spec+exec+qa). See analysis doc §Headline./assessrule across mirrorsparallel-execution.md,run-command.md); runtime + 6 skill mirrors deferred per spec note "update in lockstep or skip entirely" given n=7 sample. Proposed change documented in analysis doc §"Suggested/assesscollision-detect change".Forensic findings (from logs)
Per-issue success when chain reached the issue: 8/13 = 61.5% (closer to single-issue 80% than headline 28.6% suggests). Whole-chain accounting marks all downstream issues as failed when issue 1 halts.
Files changed
docs/reference/chain-mode-analysis-2026-05.md(new, 105 lines) — full forensic doc.docs/features/parallel-execution.md— replace50% n=4with29% n=7and length breakdown.docs/reference/run-command.md— replace~50%performance warning with current data.Quality gates
npm run build: ✅ Passnpm run lint: ✅ Passnpm test: not run (pure doc changes)Stale-branch note
Branch is 5 commits behind
origin/main(info-level, no rebase needed for doc-only changes).Next steps
If AC-6 runtime + skill-mirror update is desired, file a follow-up issue. The analysis doc §"Suggested
/assesscollision-detect change" provides the precise proposal: emit chain suggestion only at length=2, or annotate with historical rate at length≥3. Sample size (n=7) suggests waiting for more data before flipping the rule.admarble commentedon May 10, 2026
QA Review for Issue #604
Implementation Status
Investigation issue, docs-only PR (#621). Three files: new
docs/reference/chain-mode-analysis-2026-05.md(116 lines), trade-off table refresh indocs/features/parallel-execution.md, performance-warning refresh indocs/reference/run-command.md. 122 insertions / 4 deletions.AC Coverage
.sequant/metrics.json.c20fcde6halted at issue 1). Per-issue counterfactual (8/13 = 61.5%) is a strong addition.f317530c,058048af,e7d3212d,b0349697,c20fcde6) and root-cause buckets./assesscollision-detect guidancerestrict→ AC-6 fires per spec. Spec listed 6 touchpoints (runtime + 3 skill mirrors + 2 user docs); only the 2 user docs were updated. The runtime (src/lib/assess-collision-detect.ts:264) and 3 mirrors ofpredicted-collision-detection.mdstill emit the chain suggestion atlength >= 3unchanged. Spec explicitly said "update in lockstep or skip entirely" — the implementation did neither.Coverage: 5/6 AC items fully met; AC-6 partial.
CI Status
validate-skillstypecheckvalidate-pluginbuild (20.x)build (22.x)Markdown-only diff detected — pending build-matrix checks treated as informational. Relaxed: build (20.x), build (22.x).
CI Summary: 3 passed, 0 failed, 2 pending (relaxed). No gating pending.
Quality Metrics
.md)npm run build)Code Review
Strengths:
.sequant/metrics.json: chain 2/7 = 28.6%, length 2 = 1/1, length 3 = 1/4, length 4 = 0/2, multi-issue (no chain) 20/38 = 52.6%. Independently verifiable.Issues:
src/lib/assess-collision-detect.ts:264(if (r.issues.length >= 3 && !chainSuggestion)) still emits chain at length≥3, contradicting the verdict. The 3 mirrors ofpredicted-collision-detection.mdstill say "only when ≥3 issues collide on the same file (suggest-only)" unchanged.docs/guides/git-workflows.md:126is the stale50% n=4location. That line ingit-workflows.mdis actually about base-branch resolution. The stale50% n=4text is indocs/features/parallel-execution.md:126— which is the file being updated in this PR. The spec author made the same error in Rule Touchpoints. Cosmetic but should be corrected so future readers don't chase a non-existent line.metrics.jsongives 11/14 = 78.6% with the filterlen(issues)==1 AND no '--chain' AND phases ⊇ {spec, exec, qa}. Difference is small and doesn't change any conclusion, but the round number 80% in the doc may be propagating a slight filter discrepancy. Worth a one-line check before the doc is cited externally.Suggestions:
Chain:suggestion at length≥3 (e.g.# alternative — N issues modify <path> (chain length≥3 historically 1/6 = 17%)). Touches:src/lib/assess-collision-detect.ts+ 3 mirrors ofpredicted-collision-detection.md. Lower risk than changing the threshold given n=7.length === 2if you want the threshold change. Both options are documented in the analysis doc itself — the verdict text is good enough that "completing AC-6" is a small mechanical follow-on, not a redesign.Risk Assessment
/assesskeeps suggesting chain atlength >= 3despite the analysis recommending against it — the doc and the code disagree, which is the worst outcome of an "investigate, then decide" issue.docs/,.claude/skills/assess/,templates/skills/assess/,skills/assess/. The 4 unmodified mirrors are explicitly named in the spec's Rule Touchpoints.docs/reference/workflow-analysis-2026-03.mdretains the older 50% number; that's a dated historical analysis (March 2026) and shouldn't be retroactively edited.Adversarial Re-Read
npx sequant statsoutput: "Chain mode: 29% (vs 92% single issue)" and "Multi-issue runs less successful (51%)". Doc reproduces 28.6% (≈29%) and 52.6% (≈51%) cleanly. The 92% single-issue figure from the issue body is not reproduced — doc reports 80% (or 78.6% by my recount). The discrepancy is plausible (differentsequant statsfilters), but the doc doesn't address why the 92% figure differs from the 80% they computed. Worth a one-line bridge.Findings: AC-6 partial implementation is the principal gap. The 92%/80% bridge and the wrong-file pointer to
git-workflows.md:126are minor.Status: Gaps Found.
Verdict: AC_NOT_MET
AC-6 is
PARTIALLY_MET: the conditional fires (AC-5 verdict = restrict), and the spec listed 6 touchpoints to sync. Two were updated (user docs), four were not (runtime + 3 skill mirrors). The spec's risk note explicitly named the third path ("partial") as the one to avoid — "update in lockstep or skip entirely". Per the QA literal-verification rule, this cannot be marked MET without rationalizing the divergence.The investigation work itself (AC-1–AC-5) is high-quality and verifiable; the gap is purely the AC-6 follow-through.
Next Steps
Pick one of:
feedback_fill_gaps_in_pr.md) — the lowest-risk option is annotation rather than threshold flip:src/lib/assess-collision-detect.ts:264— append historical rate to chain suggestion at length≥3.predicted-collision-detection.md(.claude/,templates/,skills/) — match the runtime annotation.npx tsx scripts/check-skill-sync.ts --fixafterward to confirm three-directory parity./qa 604.While here, also fix:
git-workflows.md:126reference inchain-mode-analysis-2026-05.mdline 110 — the stale50% n=4text is inparallel-execution.md:126, notgit-workflows.md:126.Documentation: Before merging, run
/docs 604if any user-facing guidance lands in the final commit.fix(#604): complete AC-6 — annotate chain suggestion with historical …
admarble commentedon May 10, 2026
Progress Update — /exec (resume after QA AC_NOT_MET)
PR: #621 (commit
dc59f78)Picks up from the QA review at 04:25 UTC, which flagged AC-6 as
PARTIALLY_METplus two minor doc gaps. All three issues are addressed indc59f78(already on the branch and pushed).AC Coverage (re-stated)
/assessrule across mirrorsResume actions (
dc59f78)src/lib/assess-collision-detect.ts:264Chain:suggestion at length≥3 now appends(chain length≥3 historically 1/6 = 17%; see docs/reference/chain-mode-analysis-2026-05.md). Doc-comment onCollisionAnnotationsupdated to reference #604..claude/skills/assess/references/predicted-collision-detection.mdskills/assess/references/predicted-collision-detection.md.claude/.templates/skills/assess/references/predicted-collision-detection.md.claude/.src/lib/__tests__/assess-collision-detect.test.tschainSuggestioncontains both the1/6 = 17%annotation and the analysis-doc reference. Existing 15-test suite still green.docs/reference/chain-mode-analysis-2026-05.md(L110)git-workflows.md:126→parallel-execution.md:126(the file actually refreshed in this PR).docs/reference/chain-mode-analysis-2026-05.md(Note added)sequant statssnapshot at filing) vs 80% (this analysis,phases ⊇ {spec, exec, qa}filter on a 62-run snapshot) gap; citessrc/commands/stats.ts:422forstats's permissive filter.Three-mirror parity verified by
diff(all three.mdfiles byte-identical).Quality gates
npm run build: ✅ Passnpm run lint: ✅ Pass (0 errors, 0 warnings,--max-warnings 0)npx vitest run src/lib/__tests__/assess-collision-detect.test.ts: ✅ 15/15 pass (incl. new AC-6 annotation test)CI on PR #621
3 checks completed (typecheck, validate-skills, validate-plugin, plus 4 plugin-test jobs);
build (20.x)andbuild (22.x)in progress at time of writing.Stale-branch note
Branch is 7 commits behind
origin/main(info-level, default threshold 5). No rebase needed for the small TS + 3 mirror changes; conflict probability low. Will rebase on QA re-run if any of the 7 commits touchassess-collision-detect.tsor the predicted-collision-detection mirrors.Pre-PR Confidence Check
1/6 = 17%) is hard-coded into the suggestion string. If the metrics shift over time (more chain runs land), the annotation will go stale and need a manual bump. This is intentional — the alternative (computing the rate at runtime) would couple/assessto metrics-file parsing and was out of scope. Followup-tracker-worthy if chain volume picks up.src/lib/assess-collision-detect.tsis code; it has tests. The 3 markdown mirrors and the analysis doc are content-only and don't have unit tests (they're lockstep-verified by the existing skill-mirror sync rule and adiffcheck).Next steps
PR #621 is ready for
/qa 604re-run. AC-6 is now MET on all spec-listed touchpoints; the two minor QA findings are also closed.docs(#604): close QA gaps — CHANGELOG entry, strict-success footnote,…
docs(#604): chain-mode 29% success rate — failure forensics (#621)
feat(#625): per-issue concurrency lock prevents concurrent sequant se…
fix(#762): anchor blocker markers to line start; document --strict-pr…
feat(#762): lightweight content pre-flight for --chain (#764)
feat(#762): lightweight content pre-flight for --chain
fix(#762): anchor blocker markers to line start; document --strict-pr…