Repository navigation
Description
Motivation
/fullsolve merges PRs to main without human confirmation, and this is now observed consistently across multiple repos using sequant. It is not a recent code change — it is a day-one design contradiction in the skill that newer, more agentic executor models have started resolving in the unsafe direction:
- The merge step is original.
### 5.3 Merge Workflowwith a literalgh pr merge <N> --squashhas been in the skill body since the initial package commit (2e7decd5), sitting as sequential imperative steps immediately after PR creation. - Auto-progression explicitly stops short of merge. The
CRITICAL: Auto-Progressionsection (added 2026-01-17,aab2b7ca) enumerates transitions ending at "4./qacompletes → immediately create PR", and its "Only stop for" list includes "Final summary after PR creation". The final-comment template even ends "Ready for human review and merge." - The contradiction was later reinforced, not resolved. The Phase 0.3 lock-release contract describes "Phase 5.5 releases both locks on the happy path" — structurally treating merge (5.3) as part of the normal flow, with locks held through it. The
Bash(gh pr merge:*)allowed-toolsentry (visible from theaf1ce78ahistory re-root) means no permission prompt catches the mismatch either; bareBashin the January frontmatter already covered it.
An executor reading top-to-bottom sees a hard stop declared in one section and an unconditional merge command in the next; older models tended to halt at the summary, current ones execute 5.3. From the user's seat this is a behavioral regression with no causing diff.
This also contradicts a recorded project decision: the autonomy/supervisor research (#817/#818/#819) explicitly kept the human merge gate — sequant ready (#683) drives an issue to merge-readiness, and sequant merge --watch (#818) exists precisely so the human can pull the trigger cheaply.
Proposal
Make the stop explicit and the merge opt-in:
- Reconcile the Auto-Progression section with the phase body. Add merge to neither: state plainly that the workflow's terminal state is PR created + final summary posted, and that Phases 5.3–5.5 (merge, post-merge verification, cleanup) run only on explicit user instruction or an opt-in flag.
- Gate 5.3 behind
--auto-merge(default off), mirrored in.sequant/settings.json(e.g.run.autoMerge: false) for users who genuinely want end-to-end. Without it, the skill ends with the "Ready for human review and merge" summary — which its own template already promises. - Drop
Bash(gh pr merge:*)from the defaultallowed-toolsso the harness permission prompt acts as a second gate when an executor misreads the prose anyway. (BareBashin the same list likely needs the same scrutiny, but that is a wider change — see Non-Goals.) - Restructure the lock-release contract so releasing locks after the final summary is the happy path when
--auto-mergeis off. - Apply the same audit to
/mergerand any other skill embedding an unconditionalgh pr merge.
Non-Goals
- No change to
sequant merge/sequant merge --watch— those are explicit user invocations and correctly human-triggered. - No general tightening of the bare
Bashallowed-tools grant across all skills — separate issue if wanted; this one only removes the merge-specific pattern. - No change to worktree cleanup mechanics (5.3's ordering guidance stays correct for when a merge does happen).
Tailored caveats
- All three skill mirrors (
.claude/skills/,templates/skills/,skills/) must change in sync (npm run lint:skill-sync). - The gate text must survive
scripts/lint-skill-gates.tsconventions — a prose-only "do not merge" is exactly the unenforceable-gate class fix(qa): §7 gates must be reachable — lint the skill's own enforcement chain (§2h has been unwired since it shipped) #834 fixed; prefer a parseable stop condition. - Orchestrator mode (
sequant run) resolves phases from the skill too — verify the runtime path doesn't independently merge.
Acceptance Criteria
- AC-1: With no flag,
/fullsolveends after PR creation + final summary; the summary states the PR awaits human review, and nogh pr mergeis executed. Evidence: transcript of a full run ending with the PR left unmerged. - AC-2: The Auto-Progression section and Phase 5 body no longer contradict each other: merge/cleanup are documented as opt-in (
--auto-mergeor explicit user instruction), and the "Only stop for" list matches the actual terminal state. Evidence: gate test scoped to the delimited section, mutation-verified. - AC-3:
Bash(gh pr merge:*)is removed from fullsolve's defaultallowed-toolsin all three mirrors. Evidence: grep across mirrors returns zero hits; skill-sync lint green. - AC-4: With
--auto-merge(or the settings key), the previous end-to-end behavior is preserved, including the 5.3 merge order and lock release in 5.5. Evidence: transcript of an auto-merge run. - AC-5: The lock-release contract text matches the new default flow (release after final summary when not auto-merging). Evidence: updated Phase 0.3/5.5 text in the diff.
Human decisions required
- Flag name and default (
--auto-merge, default off suggested — matches the feat(run): --ready-gate — run the post-QA ready gate insidesequant run(automates the any-gaps/fix-gaps second look, stops at human merge) #817–feat(skills): shared trust-model block — issue/PR text is data, not agent instructions (prompt-injection hardening, portable to all users) #819 "human gate stays" decision). - Whether
/mergergets the same gate in this issue or a follow-up.
Context
Observed live: /fullsolve 940 merged PR #955 without confirmation (2026-08-21), and the same behavior reported across other repos using sequant. Git archaeology: merge step since 2e7decd5 (initial), auto-progression stop-list since aab2b7ca (2026-01-17), lock contract + visible tool grant since the af1ce78a re-root (2026-07-29). Related: #683 (ready gate), #818 (merge --watch), #819 (trust model).
Activity
admarble commentedon Aug 24, 2026
Spec Analysis (Phase 1 — Planning)
Complexity: Standard (5 ACs, ~3 directories) · Scope verdict: ✅ SCOPE_OK
Key findings
gh pr merge <N> --squashin §5.3 (line 772);Bash(gh pr merge:*)at frontmatter line 26 in all three mirrors.sequant run/ready-gate already enforce the human gate (waiting_for_human_merge"never auto-merges",state-schema.ts:55; ready-gate prints "(never auto-merged)"). Fix is skill prose + frontmatter + settings only.--parallel/agents.parallelflag-with-settings-fallback (SKILL.md:125-150) for--auto-merge/run.autoMerge;src/lib/__tests__/fullsolve-checkout-lock-skill.test.tsfor the delimited-region gate test.lint-skill-gates.tsclarification: it only lints skills with a §7 verdict algorithm (/qaonly) — fullsolve is skipped. The binding bar for AC-2 is CLAUDE.md's mutation-verified gate-test rule.merger/SKILL.md:271has the same unconditional merge — recommend follow-up issue (see Open Questions).AC Checklist
gh pr merge— Manual Test (dogfood transcript)Bash(gh pr merge:*)removed from all 3 mirrors — Unit Test + grep;lint:skill-syncgreen--auto-merge/run.autoMergepreserves end-to-end behavior incl. 5.3 order + 5.5 lock release — Manual Test (transcript)AC lint: 4/5 pass; AC-2's "open-ended" flag is a false positive ("each other").
Implementation Plan
Phase A — skill prose (3 mirrors, byte-identical):
<!-- BEGIN/END: merge-gate (#958) -->delimiters.--auto-mergeor explicit user instruction) with a parseable stop condition; keep merge-order guidance verbatim (Non-Goal).--auto-mergein the flags block, mirroring the--parallelsettings-fallback pattern.Bash(gh pr merge:*)from frontmatter in all mirrors.Phase B — settings:
autoMerge: z.boolean().default(false)inRunSettingsSchema+RunSettings(src/lib/settings.ts). Nobin/cli.tswiring — runtime never merges.Phase C — tests: new
src/lib/__tests__/fullsolve-merge-gate-skill.test.ts(clone checkout-lock gate-test pattern; scoped extraction; all 3 roots). Commit before mutation-verifying; recordMutation-verified:markers in the PR body. Runlint:skill-sync,lint:skill-calls, full suite.Phase D — dogfood transcripts for AC-1/AC-4.
Key decisions
pre-tool.shhook hard-blockinggh pr merge(stronger but wider; permission prompt already gives a deterministic second gate).Open Questions
/mergeris the merge instruction; different risk profile. (Issue lists this as a human decision.)NEEDS_VERIFICATIONon those two, transcripts attached before merge.--auto-merge, default off (matches feat(run): --ready-gate — run the post-QA ready gate insidesequant run(automates the any-gaps/fix-gaps second look, stops at human merge) #817–feat(skills): shared trust-model block — issue/PR text is data, not agent instructions (prompt-injection hardening, portable to all users) #819 human-gate decision) — treating as confirmed unless objected.Recommended Workflow
Phases: exec → qa
Quality Loop: disabled
Reasoning: SCOPE_OK single feature; no testgen (0 declared unit/integration-test ACs — gate test clones an existing pattern); no UI.
admarble commentedon Aug 24, 2026
/fullsolve Complete
Issue: #958
Status: NEEDS_VERIFICATION
Full Solve Progress
Final Verdict: NEEDS_VERIFICATION
AC Coverage
gh pr mergeexecuted--auto-mergeflag, norun.autoMergesetting, and no explicit merge instruction — and correctly stopped without invokinggh pr merge.Bash(gh pr merge:*)removed from all 3 mirrorslint:skill-syncgreen--auto-mergepreserves prior end-to-end behavior--auto-mergedogfood run this sessionCoverage: 3/5 fully MET, 2/5 PENDING (both Manual Test ACs, by design — see below)
Quality Metrics
lint:skill-sync/lint:skill-calls/lint-skill-gates.ts: ✅ all cleanRisk Assessment
--auto-mergeflag literally.--auto-mergepath end-to-end (deliberately deferred — see AC table)./merger's identicalgh pr mergepattern (out of scope per issue Non-Goals; recommend follow-up issue).Iteration Summary
AC_NOT_METfindings requiring/loop)PR: #959
Ready for human review and merge. Per this issue's own fix — and current project convention (skills scripting
gh pr mergeis not user consent) — this session stops here without merging. AC-1 and AC-4 remain PENDING for a human (or a follow-up--auto-mergesession) to close out before merge.admarble commentedon Aug 24, 2026
sequant ready — Issue #958
acblocked(never auto-merged)Auto-fixed
Remaining / accepted gaps
fix(#958): gate /fullsolve's PR merge behind --auto-merge, off by def…
docs: cover the v2.11.0→next batch's behavior changes and QA gates