Skip to content

docs: document worker auto-approve posture - #3

Merged
Hozzy02 merged 3 commits into
mainfrom
fm/autoapprove-guarantee
Aug 18, 2026
Merged

Hozzy02 merged 3 commits into
mainfrom
fm/autoapprove-guarantee

Conversation

@Hozzy02

@Hozzy02 Hozzy02 commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Intent

Document in AGENTS.md that worker auto-approve is the default intentional launch posture for every verified harness, reference the specific flags from bin/fm-spawn.sh, and clarify the distinction between auto-approve and one-time trust dialogs.

What Changed

  • Document worker auto-approve as the intentional default across every verified harness, including each launch flag or permission posture.
  • Clarify that routine auto-approval is separate from one-time trust, hooks-review, and Claude bypass-permissions confirmations handled after spawn.

Risk Assessment

✅ Low: The focused documentation change now accurately matches every verified harness launch flag and distinguishes one-time first-run confirmations from routine tool approval.

Testing

No baseline test command was supplied; focused documentation-owner checks, generated spawn-command tests, and direct parity checks all passed, with a reviewer-visible Markdown artifact capturing the instruction surface and authoritative launch flags.

Evidence: Worker auto-approve documentation and executable parity evidence
# Worker auto-approve documentation evidence

## End-user instruction surface (`AGENTS.md`)

`` `text
   171	7. **Context digest and next step** - last of the bulk sections, the full contents of `data/projects.md`, `data/secondmates.md`, `data/captain.md`, `data/captain-shared.md`, and `data/learnings.md`, each clearly delimited, followed by the closing reminder.
   172	   A file that does not exist prints an explicit `ABSENT` marker, never confused with an empty-but-present file: absence is meaningful (`captain.md` absent means use the firstmate repo's built-in defaults, `projects.md` absent means rebuild it from the clones under `projects/`, etc.).
   173	   The closing reminder points back to the emitted supervision block and preserves only the lock, afk, Relay, and read-once reminders.
   174	
   175	Bootstrap detects first, asks for consent, and installs only after the captain approves in the current session.
   176	Do not dispatch until the required tools are present and GitHub authentication is good.
   177	Use `gh-axi` for GitHub, `chrome-devtools-axi` for browser work, and `lavish-axi` for structured decisions or reports; consult current help rather than memorizing flags.
   178	A silent bootstrap section needs no action; for any printed actionable diagnostic line, load `bootstrap-diagnostics` and follow its owner procedure.
   179	`BOOTSTRAP_INFO:` lines are completed no-action facts and do not require loading a skill.
`` `

## Executable launch posture (`bin/fm-spawn.sh`)

`` `text
  1115	    claude) printf '%s' 'CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false claude --dangerously-skip-permissions __MODELFLAG____EFFORTFLAG__"$(__OPINPUT__ encode launch-brief < __BRIEF__)"' ;;
  1116	    codex)
  1117	      if [ "$kind" = secondmate ]; then
  1118	        printf '%s' 'codex __MODELFLAG____EFFORTFLAG__--dangerously-bypass-approvals-and-sandbox "$(__OPINPUT__ encode launch-brief < __BRIEF__)"'
  1119	      else
  1120	        printf '%s' 'codex __MODELFLAG____EFFORTFLAG__--dangerously-bypass-approvals-and-sandbox -c "notify=[\"bash\",\"-c\",\"touch __TURNEND__\"]" "$(__OPINPUT__ encode launch-brief < __BRIEF__)"'
  1121	      fi
  1122	      ;;
  1123	    opencode) printf '%s' 'OPENCODE_CONFIG_CONTENT='\''{"permission":{"*":"allow"}}'\'' opencode __MODELFLAG__--prompt "$(__OPINPUT__ encode launch-brief < __BRIEF__)"' ;;
  1124	    pi|pi-signed)
  1125	      printf '%s' '__PIBIN____PITUIMODE__'
  1126	      if [ "$kind" = secondmate ]; then
  1127	        printf '%s' ' __MODELFLAG____EFFORTFLAG__-e __PITURNEND__ -e __PIWATCH__ "$(__OPINPUT__ encode launch-brief < __BRIEF__)"'
  1128	      else
  1132	    # grok (Grok Build TUI): a positional prompt starts the supervised interactive
  1133	    # session. --always-approve auto-approves every tool execution (verified: the
  1134	    # crewmate runs fully autonomously, no permission gate), which an unattended
  1135	    # crewmate needs; it is the targeted equivalent of claude's
  1136	    # --dangerously-skip-permissions. grok's turn-end signal does NOT ride the
  1137	    # launch command - it is a Stop-event hook installed below (global hook +
  1138	    # per-task pointer), so the template is identical for ship/scout/secondmate.
  1139	    grok) printf '%s' 'grok --always-approve __MODELFLAG____EFFORTFLAG__"$(__OPINPUT__ encode launch-brief < __BRIEF__)"' ;;
  1140	    # Cursor Agent CLI. --trust suppresses the workspace-trust prompt, which
  1141	    # --yolo does NOT cover and which would otherwise block every spawn, since
  1142	    # each task gets a fresh worktree path cursor has never seen. --yolo is the
  1143	    # --force alias whose TUI label is "Run Everything". --workspace pins the
  1144	    # exact worktree. -w/--worktree is deliberately never passed: it allocates a
  1145	    # SECOND worktree under ~/.cursor/worktrees and would break firstmate's
  1146	    # isolation contract. The binary is resolved rather than named because
  1147	    # `cursor` is not the CLI (the installed names are cursor-agent and the
  1148	    # legacy alias agent), and the foreign primary markers are cleared so an
  1149	    # inherited CLAUDECODE cannot outrank cursor's own marker in a process that
  1150	    # only reads the environment. Cursor exposes no effort flag, so the shared
  1151	    # effort axis is deliberately omitted and stays in task metadata only.
  1152	    cursor) printf '%s' 'env -u CLAUDECODE -u PI_CODING_AGENT -u GROK_AGENT -u FM_PI_HARNESS -u CURSOR_INVOKED_AS __CURSORBIN__ --trust --yolo __MODELFLAG__--workspace __WORKTREE__ "$(__OPINPUT__ encode launch-brief < __BRIEF__)"' ;;
  1153	    # Kimi Code rejects a positional prompt, so it launches bare and receives
  1154	    # only an absolute brief pointer after the TUI readiness gate below.
  1155	    # Its turn-end signal is a globally configured Stop hook plus a guarded
  1156	    # per-task worktree token, so no launch placeholder belongs here.
  1157	    kimi) printf '%s' '__KIMIBIN__ __MODELFLAG__--auto' ;;
  1158	    # muse (Muse Code): a positional prompt starts the supervised interactive
  1159	    # session. --yolo is the single flag that makes a crewmate pane viable: muse
  1160	    # ships approval prompts AND a filesystem/network sandbox ON by default
  1161	    # (--sandbox-network defaults to proxy-only, which refuses outright without a
  1162	    # managed proxy), and it gates a fresh workspace behind a trust dialog. One
  1163	    # --yolo disables approval, disables the sandbox so git and network work, and
  1164	    # trusts the workspace for the run, so no dialog appears on the fresh
  1165	    # per-task worktree (verified, muse 0.1.0-R708.1).
  1166	    # MUSE_EXPERIMENTAL_FOREIGN_PERSONAL_CONTEXT_KILL=on is the privacy control:
  1167	    # muse otherwise loads the OPERATOR's foreign personal rules from ~/.claude
  1168	    # into every run and ships them to Meta-hosted inference, even under an
  1169	    # isolated XDG_CONFIG_HOME. exec mode's --no-foreign-personal-context flag is
  1170	    # NOT accepted by the interactive TUI (it exits with "unexpected argument"),
  1171	    # so this env var is the only control that reaches a pane worker. Verified to
  1172	    # drop the foreign rules_file context block while KEEPING the project's own
  1173	    # AGENTS.md rules, which the crewmate contract depends on.
  1174	    # muse's turn-end signal rides neither the launch command nor a hook: its
  1175	    # plugin engine is off in the default build, so firstmate folds muse's own
  1176	    # session event log instead (bin/fm-busy-lib.sh), bound by the sidecar
  1177	    # written below. Nothing to place in the template for it.
  1178	    # codex, opencode, and kimi are also markerless and share this inherited-marker hazard; changing their verified launch boundaries belongs in follow-up work.
  1179	    muse) printf '%s' 'env -u CLAUDECODE -u PI_CODING_AGENT -u GROK_AGENT -u FM_PI_HARNESS XDG_CONFIG_HOME=__MUSECONFIG__ XDG_DATA_HOME=__MUSEDATA__ MUSE_EXPERIMENTAL_FOREIGN_PERSONAL_CONTEXT_KILL=on __MUSEBIN__ --yolo __MODELFLAG____EFFORTFLAG__"$(__OPINPUT__ encode launch-brief < __BRIEF__)"' ;;
`` `

## Focused validation result

`` `text
fm-doc-audience-check: ok surfaces=68 local_links=256
fm-documentation-audiences.test.sh: passed
fm-spawn-dispatch-profile.test.sh: passed; generated launch commands include Claude, Codex, Grok, and Cursor autonomy flags plus Cursor --trust
fm-kimi-harness.test.sh: passed; generated Kimi launch includes --auto
`` `

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 1 issue found → auto-fixed ✅
  • ⚠️ AGENTS.md:187 - The exclusive prompt list omits Claude's documented one-time bypass-permissions confirmation (harness-adapters lines 192-194). A fresh Claude launch can therefore reach a prompt that this sentence says cannot occur. Name that confirmation separately while preserving the distinction from routine per-tool approval.

🔧 Fix: Document Claude first-run bypass confirmation
✅ Re-checked - no issues remain.

✅ **Test** - passed

✅ No issues found.

  • git diff --unified=80 4e21728fd3d59409c4d58589a2e43a0a1d820d01..af7c2a4998c8020465709a29f239293a2ab8bf6e -- AGENTS.md
  • bin/fm-doc-audience-check.sh
  • tests/fm-documentation-audiences.test.sh
  • tests/fm-spawn-dispatch-profile.test.sh
  • tests/fm-kimi-harness.test.sh
  • Focused rg -F parity checks mapping every documented harness posture to bin/fm-spawn.sh and Pi’s no-permission-system contract
  • Generated worker-autoapprove-documentation.md from the actual AGENTS.md instruction surface and executable launch templates
  • git status --short after testing confirmed no transient worktree artifacts
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@Hozzy02
Hozzy02 merged commit 2ceebc6 into main Aug 18, 2026
13 checks passed
@Hozzy02
Hozzy02 deleted the fm/autoapprove-guarantee branch September 26, 2026 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant