Skip to content

docs: resolve five contract contradictions across AGENTS.md, README, and skills - #736

Merged
kunchenguid merged 2 commits into
kunchenguid:mainfrom
ICGNU3:fm/fix-doc-contradictions
Jul 19, 2026
Merged

kunchenguid merged 2 commits into
kunchenguid:mainfrom
ICGNU3:fm/fix-doc-contradictions

Conversation

@ICGNU3

@ICGNU3 ICGNU3 commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Intent

Fix exactly the five confirmed documentation contradictions in section A of the evidence log, with minimal documentation and skill-frontmatter changes only. Remove the stale Orca node prerequisite; narrow the configuration ownership claim while leaving the detailed state map in AGENTS.md; attribute the emitted supervision block to bin/fm-supervision-instructions.sh rendering from docs/supervision-protocols while keeping session-start composition ownership with fm-session-start.sh; include all five away-mode skill load triggers; and align the README project-write exception with AGENTS.md hard rule 1. Retain the safe branch-pruning mention only because bin/fm-fleet-sync.sh genuinely performs that operation as part of fleet sync. Preserve the one-owner rule, one sentence per line, plain dashes, and existing scope; do not change behavior or address the intentional section B divergences, C1 bearings gap, supervision-protocol coverage gap, or section D.

What Changed

  • Reworded ownership claims in AGENTS.md: docs/configuration.md now owns only the top-level operational-home layout and configuration schemas, and the emitted supervision block is attributed to bin/fm-supervision-instructions.sh rendering from docs/supervision-protocols/ while bin/fm-session-start.sh keeps composition ownership.
  • Aligned the README "Guarded by construction" bullet with AGENTS.md hard rule 1 (retaining the fleet-sync safe branch-pruning mention), expanded the afk skill description to list all five away-mode load triggers, and removed the stale node prerequisite from docs/orca-backend.md.
  • Updated tests/fm-instruction-owners.test.sh assertions to match the reworded owner pointers, and made tests/fm-cd-pretool-check.test.sh skip its shellcheck-clean check when shellcheck is not installed.

Risk Assessment

✅ Low: Documentation-only wording fixes plus matching test-assertion updates; every changed claim was verified against the actual scripts and the test skip pattern mirrors an existing precedent.

Testing

Ran the two modified test files (both pass, with the new shellcheck-absent skip path genuinely exercised) on top of the already-green baseline full suite, then manually verified each of the five documentation fixes in the shipped files — including a live render proving fm-supervision-instructions.sh emits the supervision block from docs/supervision-protocols/ — and captured a verification transcript and test log as evidence; no visual artifact applies since the change is plain-text documentation with no rendered UI surface.

Evidence: Five-fixes verification transcript (each fix shown in the shipped docs, plus live supervision-block render)
### Fix 1: Orca doc no longer requires node (docs/orca-backend.md prerequisites)
Prerequisites:

- The Orca app installed at `/Applications/Orca.app`, and **running**.
- The `orca` CLI: `brew install orca`.
- The universal firstmate prerequisites - a verified crew harness plus the required toolchain, owned by [`docs/configuration.md`](configuration.md) ("Harness support", "Toolchain") - with `orca` as the only backend-specific tool, since Orca replaces both the session multiplexer CLI and the `treehouse` worktree provider that the other backends require.

Select Orca by putting `orca` in a local `config/backend` file - the durable way to pick it - or by exporting `FM_BACKEND=orca` when you launch your harness for a one-off session; telling the first mate in chat to use Orca also works.

grep -c 'node' docs/orca-backend.md prerequisites block: 0

### Fix 2: narrowed configuration ownership claim (AGENTS.md section 2, line 48)
48:`docs/configuration.md` is the single owner of the top-level operational-home layout and configuration schemas; each producing script's header and help own exact child fields and mutation mechanics.
detailed state map still present in AGENTS.md (code block starts):
56:AGENTS.md            this file (CLAUDE.md is a symlink to it)

### Fix 3: supervision block attributed to fm-supervision-instructions.sh (AGENTS.md section 3)
118:`bin/fm-supervision-instructions.sh` renders the emitted supervision block from `docs/supervision-protocols/`.
117:Its header is the single owner of composed commands, ordering, and digest contents.
script really renders from docs/supervision-protocols/:
11:DOC_DIR="$REPO_ROOT/docs/supervision-protocols"
live render (first lines of emitted block for harness=claude):

### Fix 4: afk skill description lists all five load triggers (.agents/skills/afk/SKILL.md)
---
name: afk
description: >-
  Enter away-mode supervision when the captain invokes /afk, says they are going afk, `state/.afk` exists, an incoming message starts with `FM_INJECT_MARK`, or any `state/.subsuper-*` marker is involved.
  It sets a durable away-mode flag so the sub-supervisor daemon can self-handle routine wakes and escalate captain-relevant events plus bounded declared-external-wait rechecks as batched digests during walk-away stretches, then exits automatically when any real unmarked message returns firstmate to full per-wake responsiveness.
user-invocable: true
metadata:
  internal: true
matching AGENTS.md away-mode stub:
348:Invoke the `/afk` skill when the captain says `/afk`, says they are going afk, `state/.afk` exists, an incoming message starts with `FM_INJECT_MARK`, or any `state/.subsuper-*` marker is involved.

### Fix 5: README project-write exception aligned with AGENTS.md hard rule 1
52:- **Guarded by construction** - the first mate is read-only over your projects except for the guarded paths authorized by [hard rule 1](AGENTS.md#1-identity-and-prime-directives), with fleet sync's safe branch pruning remaining part of the fleet-sync exception; crewmates make every project change behind the configured merge authority.
25:   The only exceptions are the guarded project initialization, fleet sync, secondmate sync and inherited local-material propagation, self-update, and approved `local-only` merge paths owned by their referenced skills and scripts.
### live render: bash bin/fm-supervision-instructions.sh --harness claude (first 10 lines)
================================================================================
SUPERVISION OPERATING INSTRUCTIONS - primary harness: claude
================================================================================
Current state:
- Lock: held by this session; this session owns normal supervision unless away mode says otherwise.
- Away mode: inactive.
- X mode: inactive; use the default watcher cadence.
- After every handled wake, resume this emitted harness protocol instead of following a hardcoded background-arm recipe.

Mode: Claude background-notify supervision.
Evidence: Modified test files run (fm-instruction-owners, fm-cd-pretool-check) — all pass incl. new shellcheck skip path
== tests/fm-instruction-owners.test.sh ==
ok - new internal skills have one precise AGENTS.md trigger each
ok - diagnostic-reasoning owns the approved evidence procedure
ok - project-management owns registry, delivery posture, consent, initialization, and removal safety
ok - generic effort fallback applies only below captain and standing configuration
ok - firstmate-coding-guidelines owns compatibility review and deterministic enforcement
ok - secondmate registry guidance keeps concise routes and points to the charter
ok - state, startup, and ordinary recovery have focused owners and triggers
ok - compressed AGENTS.md records the approved one-owner map
ok - compressed AGENTS.md retains authority, supervision, AFK, and X safety
rc=0

== tests/fm-cd-pretool-check.test.sh ==
ok - cd-guard acceptance matrix: 63 cases x 5 harness entry forms, block/allow all correct
ok - cd-guard: fires in a secondmate home (its own primary session is a primary)
ok - cd-guard: inert in a crewmate/scout task worktree (linked git worktree)
ok - cd-guard: inert in a non-firstmate repo (no AGENTS.md)
ok - cd-guard: inert when not inside a git repo
ok - cd-guard: reproduces the cwd leak and denies the exact command that causes it
ok - cd-guard: fails open on empty stdin
ok - cd-guard: fails open on unparseable stdin JSON
ok - cd-guard: fails open (never blocks) when node is missing
ok - cd-guard: fails open on the stdin path when jq is missing
ok - cd-guard: prefilter fast-allows (skips node) when no cd/pushd/popd substring is present
ok - cd-guard: fm-cd-command-policy.mjs CLI honors the deny/allow output contract
ok - .claude/settings.json: PreToolUse invokes the cd-guard alongside the arm guard
ok - .codex/hooks.json: PreToolUse invokes the cd-guard alongside the arm guard
ok - .grok primary cd hook: PreToolUse invokes the cd-guard
ok - .opencode cd plugin: tool.execute.before invokes the cd-guard and blocks by throwing
ok - .pi primary extension: tool_call runs the cd-guard alongside the watcher-arm check
ok - shellcheck not installed, skipping
rc=0

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; exit "$rc"
  • Baseline full e2e suite for t in tests/*.test.sh; do bash "$t"; done (ran successfully before this validation)
  • bash tests/fm-instruction-owners.test.sh — updated owner-pointer assertions pass against reworded AGENTS.md
  • bash tests/fm-cd-pretool-check.test.sh — passes; new shellcheck-absent skip path genuinely exercised (shellcheck not installed here)
  • Manual check: docs/orca-backend.md prerequisites block contains zero mentions of node
  • Manual check: AGENTS.md line 48 narrowed ownership claim + detailed state map still present at line 56
  • Manual check: AGENTS.md section 3 attributes the emitted supervision block to bin/fm-supervision-instructions.sh and docs/supervision-protocols/; script's DOC_DIR confirmed and bash bin/fm-supervision-instructions.sh --harness claude renders the block live
  • Manual check: .agents/skills/afk/SKILL.md description lists all five load triggers, matching AGENTS.md line 348 verbatim
  • Manual check: README 'Guarded by construction' bullet defers to AGENTS.md hard rule 1 and retains the fleet-sync safe branch-pruning mention
  • git status --porcelain — worktree clean, no transient artifacts left
✅ **Document** - passed

✅ No issues found.

⚠️ **Lint** - 1 warning
  • ⚠️ linter found issues (exit code 127)

🔧 Fix: verify lint clean under pinned ShellCheck 0.11.0; no fixes needed
1 warning still open:

  • ⚠️ linter found issues (exit code 127)

🔧 Fix: confirm full lint clean under pinned ShellCheck 0.11.0
1 warning still open:

  • ⚠️ linter found issues (exit code 127)

🔧 Fix: lint clean under pinned ShellCheck 0.11.0; no fixes needed
1 warning still open:

  • ⚠️ linter found issues (exit code 127)
✅ **Push** - passed

✅ No issues found.

@kunchenguid
kunchenguid merged commit 7a9b4dd into kunchenguid:main Jul 19, 2026
5 checks passed
@kunchenguid

Copy link
Copy Markdown
Owner

Thanks @ICGNU3 - merged! Really appreciate the contribution.

kirubeltadesse added a commit to kirubeltadesse/firstmate that referenced this pull request Jul 20, 2026
* fix: restore fleet snapshots on stock macOS Bash (kunchenguid#578)

* fix: restore stock macOS snapshot parsing

* no-mistakes(document): Clarify Linux gate and macOS CI coverage

* fix(afk): make Pi escalation and return catch-up reliable (kunchenguid#587)

* fix: close away-mode blocker supervision gap

* no-mistakes(review): Gate teardown retries and verify U+2063 dedupe

* no-mistakes(test): Fail closed on incomplete Pi composer separators

* no-mistakes(document): Document Pi composer recognition and return gating

* feat: support Pi max reasoning profiles (kunchenguid#537)

* support Pi max thinking profiles

* no-mistakes(review): Captain, allow Pi max dispatch profiles

* chore: no-mistakes(document): Clarify yolo response ownership (kunchenguid#595)

* Clarify validation response ownership

* no-mistakes(document): Clarify yolo response ownership

* feat: establish instruction ownership foundation (kunchenguid#619)

* Add instruction owners foundation

* no-mistakes(document): Refresh project-management owner pointers

* fix: compress Firstmate contract and enforce delivery rigor ownership (kunchenguid#626)

* docs: compress firstmate operating contract

* docs: make delivery rigor single-owner

PR B already removed personal and stacked review requirements, but it did not explicitly assign rigor to the selected delivery path or forbid risk-based manual clean gates. That gap still permitted the Hi Bit inversion.

* no-mistakes(review): Honor configured merge authority across faster delivery paths

* no-mistakes(document): Align docs with compressed operating contract

* feat: add durable captain decision holds (kunchenguid#593)

* Add durable captain decision holds

* no-mistakes(review): Validate decision hold retries and origin paths

* no-mistakes(review): Enforce durable decision lifecycle boundaries

* no-mistakes(review): Harden decision display and partial retry recovery

* no-mistakes(test): Update scout teardown fixtures for decision inventory

* no-mistakes(document): Align decision lifecycle and scout teardown documentation

* no-mistakes: apply CI fixes

* no-mistakes(review): Reconcile terminal decision holds

* no-mistakes(document): Align captain decision-hold documentation

* fix(bin): harden PR check artifacts (kunchenguid#556)

* fix: harden PR check artifacts

* fix: close PR check migration gaps

* fix: close PR check retry gaps

* fix: clarify migration outcomes and ESM boundary

* fix: keep failed migrations authoritative

* test: use inert PR validation fixtures

* no-mistakes(review): Reserve noncanonical PR quarantine namespace

* no-mistakes(review): Prevalidate final PR-check teardown artifacts

* no-mistakes(review): Preserve X metadata and validate teardown IDs

* no-mistakes(review): Initialize migration state before watcher exclusion

* no-mistakes(review): Isolate failed poll migrations from bootstrap recovery

* no-mistakes(review): Allow safe polling during incomplete private repairs

* no-mistakes(review): Authenticate watcher checks at execution time

* no-mistakes(review): Preserve custom checks with hash-bound registration

* no-mistakes(review): Clean custom check snapshots on watcher signals

* no-mistakes(review): Stop watcher checks promptly on signals

* no-mistakes(review): Terminate watcher check groups before cleanup

* no-mistakes(document): Correct stale X-mode watcher documentation

* fix: drain returned watcher check groups

* no-mistakes(review): Harden quarantine links and recover validated replacement polls

* no-mistakes(review): Preserve X mode across shim version transitions

* no-mistakes(review): Refresh legacy X shims before marker short-circuits

* no-mistakes(document): Correct persisted PR-check artifact documentation

* no-mistakes(document): Correct stale PR-check documentation

* fix: bind PR poll repair provenance

* no-mistakes(review): Enforce single-link ownership for custom check artifacts

* no-mistakes(review): Preserve private checks, X polling, and lifecycle IDs

* no-mistakes(review): Separate task creation and legacy teardown validation

* no-mistakes(review): Restore safe legacy operations and teardown validation

* no-mistakes(review): Disambiguate migration obligations and preserve legacy retries

* no-mistakes(review): Preserve fail-closed diagnostics and legacy quarantine evidence

* no-mistakes(review): Reconcile legacy migration retries and teardown collisions

* no-mistakes(review): Force legacy namespace reconciliation before marker short-circuits

* no-mistakes(document): Document private poll artifact safety contracts

* no-mistakes(lint): Suppress intentional literal-dollar lint finding

* fix: migrate historical X poll identity

* fix: harden PR check artifacts

* no-mistakes(review): Preserve fail-closed diagnostics and legacy quarantine evidence

* no-mistakes(review): Reconcile legacy migration retries and teardown collisions

* fix: migrate historical X poll identity

* no-mistakes(review): Harden X-mode artifact publication against symlink corruption

* no-mistakes(review): Guard X artifact publication

* no-mistakes(review): Enforce private X artifact reads

* no-mistakes(test): Fix backend compatibility fixture dependencies

* no-mistakes(document): Refresh PR-check documentation

* no-mistakes(lint): Remove unused x-mode test locals

* no-mistakes: apply CI fixes

* fix(bin): compact session-start backlog digest (kunchenguid#636)

* fix: compact session-start backlog digest

* no-mistakes(test): Fix legacy backend fixture helper

* no-mistakes(test): Fix watcher exit wait helper

* no-mistakes(document): Document compact backlog digest

* fix: dedupe stale watcher guard banners (kunchenguid#637)

* fix: dedupe stale watcher guard banner

* no-mistakes(review): Keep read-only guard state nonmutating

* no-mistakes(document): Clarify stale watcher docs

* fix(bin): balance bearings landed baseline (kunchenguid#640)

* fix: balance bearings landed defaults

* no-mistakes(document): Document balanced landed baseline

* no-mistakes: apply CI fixes

* fix: clarify captain-facing translation contract (kunchenguid#644)

* docs: clarify captain-facing translation contract

* no-mistakes(review): Restore runtime fallback mandate

* no-mistakes(document): Align Bearings translation wording

* fix(bin): make bootstrap output and nudges deterministic (kunchenguid#646)

* fix: make bootstrap nudges deterministic

* no-mistakes(review): Honor state override for bootstrap nudges

* no-mistakes(review): Update benign bootstrap documentation labels

* no-mistakes(review): Validate bootstrap nudge retry markers

* no-mistakes(document): Align bootstrap nudge documentation

* no-mistakes: apply CI fixes

* docs(secondmate-provisioning): clarify concise registry ownership (kunchenguid#649)

* Clarify concise secondmate registry contract

* no-mistakes(review): Expand secondmate registry boilerplate coverage

* no-mistakes(document): Point route docs to owner

* fix(bin): strip quoted blocked_by values during decision hold resolve (kunchenguid#654)

* fix(bin): strip quotes on blocked_by in decision-hold resolve

tasks-axi quotes multi-entry blocked_by as "a,b,c", so the comma-boundary
membership test only matched middle elements. Strip surrounding quotes
before matching so first and last hold ids resolve correctly.

* no-mistakes(document): Refresh decision-hold regression evidence

* feat(secondmate): inherit shared captain preferences (kunchenguid#656)

* feat(secondmate): inherit shared captain preferences

* no-mistakes(review): Honor shared captain data overrides

* no-mistakes(review): Honor bootstrap data override registry

* no-mistakes(document): Refresh shared inheritance docs

* no-mistakes(document): Clarify inherited local-material docs

* feat: gate local agent secret injection (kunchenguid#658)

* feat(spawn): gate local agent secret injection

* fix(spawn): align final Keychain slot

* no-mistakes: apply CI fixes

* test: isolate Herdr autodetect smoke sessions (kunchenguid#662)

* test: isolate herdr autodetect smoke session

* no-mistakes(review): Restored autodetect smoke gate bypass

* no-mistakes(test): Harden Herdr lab provisioning

* no-mistakes(document): Refresh Herdr lab docs

* docs: adopt under way for active work (kunchenguid#666)

* Revert "feat: gate local agent secret injection (kunchenguid#658)" (kunchenguid#668)

This reverts commit c27135c.

* fix(pi): distinguish stale locks when arming watcher (kunchenguid#681)

* fix(pi): distinguish stale locks when arming watcher

* no-mistakes(test): Stabilize watcher extension async waits

* no-mistakes(document): Document Pi lock recovery

* fix: accept secondmate house vocabulary (kunchenguid#685)

* fix: accept secondmate as house vocabulary

* no-mistakes(test): Update captain vocabulary contract test

* no-mistakes(document): Align secondmate documentation vocabulary

* fix(bin): parse handoff homes after registry parentheticals (kunchenguid#686)

* fix: parse secondmate home after pre-field parentheses

Registry summaries often include parentheticals before the structured
(home: ...) field. Match that field with a greedy prefix so handoff
no longer reports "has no home" for those entries.

* no-mistakes(document): Refresh handoff test comments

* feat: add native session-start nudges (kunchenguid#687)

* feat: add native session-start nudges

* no-mistakes(document): Document nudge script inventory

* docs: call built-in defaults the firstmate repo, not template (kunchenguid#688)

Relabel absent-captain and related domain defaults wording so it names
the firstmate repo rather than treating "template" as this domain's
identity label. Keep the design-tenet "shared template" statements and
unrelated launch/PR-poll template uses unchanged.

* fix(bin): repair fm-brief.sh parse error and harden set -u array expansion (kunchenguid#205)

* fix(bin): use set -u-safe empty-array expansion in pr-merge and spawn

Expanding "${arr[@]}" on an empty array under set -u fails on bash < 4.4
(notably macOS bash 3.2). Quote the portable "${arr[@]+"${arr[@]}"}" idiom
in fm-pr-merge and fm-spawn batch dispatch so empty arrays expand to nothing.

Co-authored-by: Cursor <[email protected]>

* test(brief): harden fm-brief regression coverage for parse and scaffolds

Tighten bash -n checking, pin literal backtick rendering in the no-mistakes
DOD wording assertion, and keep a scout/secondmate scaffold smoke test so the

Co-authored-by: Cursor <[email protected]>
kunchenguid#166 apostrophe regression cannot return unnoticed.

---------

Co-authored-by: Cursor <[email protected]>

* fix(bin): keep watcher supervision continuous across child cycles (kunchenguid#693)

* fix: make watcher supervision continuous

* no-mistakes(review): Bound watcher retries and log attached signals

* no-mistakes(review): Add bounded successor-recovery wake fallbacks

* no-mistakes(review): Prevent overlapping successor-arm retries

* no-mistakes(review): Resume supervision after late arm closes

* no-mistakes(review): Bind OpenCode recovery to attempted arm

* no-mistakes(test): Synchronize peer beacon regression fixture

* no-mistakes(test): Synchronize Pi and OpenCode late-close lifecycle fixtures

* no-mistakes(document): Captain: document watcher successor protocol behavior

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* fix: fetch current PR head for review diffs (kunchenguid#722)

* fix: always fetch PR head for review diffs

Prefer a freshly fetched refs/pull/<n>/head over a reachable recorded
pr_head= so reviewers never hold a merge over a "missing" fix that already
landed on the remote PR. Recorded SHA is offline fallback only; local branch
is last resort with a warning. Store the tip under refs/fm-review/ so a later
base-branch fetch cannot clobber the compare tip via FETCH_HEAD.

* no-mistakes(test): Isolate session-start nudge tests from gate state

* no-mistakes(document): Correct review-diff documentation

* docs: resolve five contract contradictions across AGENTS.md, README, and skills (kunchenguid#736)

* docs: resolve five contract contradictions

* no-mistakes(test): align owner-pointer assertions with reworded docs; skip absent shellcheck

* docs(harness): correct Grok exit guidance (kunchenguid#742)

* docs(harness): reverify grok exit command

* no-mistakes(test): Correct Grok exit resume attribution

* fix(watcher): bound stale wakes for parked crew (kunchenguid#743)

* fix(watcher): bound stale wakes for exited paused crew

* no-mistakes(review): Gate pause suppression on confirmed agent death

* no-mistakes(test): Fixed stale pause cadence

* no-mistakes(document): Document dead-agent hold cadence

* fix(supervision): distinguish ordinary wakes from recovery (kunchenguid#744)

* fix(supervision): distinguish ordinary wakes from repair

* no-mistakes(review): Make passive guard follow-ups recovery-only

* no-mistakes(document): Clarify recovery-only turn-end guard documentation

* fix(x-mode): dedupe pending mention wakes (kunchenguid#745)

* fix(x-mode): dedupe pending mention wakes

* no-mistakes(review): fix x-poll claim error deduplication

* no-mistakes(review): separate claim diagnostics from relay recovery

* no-mistakes(document): Document X-mode once-only mention wakes

* refactor: slim AGENTS.md to ~200 lines, reference files for details

* docs: use canonical expanded reference files from main repo

---------

Co-authored-by: Kun Chen <[email protected]>
Co-authored-by: Korallis <[email protected]>
Co-authored-by: Johans Ballestar <[email protected]>
Co-authored-by: Cursor <[email protected]>
Co-authored-by: Israel Wilson <[email protected]>
quinnbot-ai added a commit to quinnbot-ai/firstmate that referenced this pull request Jul 20, 2026
…15)

* fix(bin): keep watcher supervision continuous across child cycles (kunchenguid#693)

* fix: make watcher supervision continuous

* no-mistakes(review): Bound watcher retries and log attached signals

* no-mistakes(review): Add bounded successor-recovery wake fallbacks

* no-mistakes(review): Prevent overlapping successor-arm retries

* no-mistakes(review): Resume supervision after late arm closes

* no-mistakes(review): Bind OpenCode recovery to attempted arm

* no-mistakes(test): Synchronize peer beacon regression fixture

* no-mistakes(test): Synchronize Pi and OpenCode late-close lifecycle fixtures

* no-mistakes(document): Captain: document watcher successor protocol behavior

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* docs: resolve five contract contradictions across AGENTS.md, README, and skills (kunchenguid#736)

* docs: resolve five contract contradictions

* no-mistakes(test): align owner-pointer assertions with reworded docs; skip absent shellcheck

* docs(harness): correct Grok exit guidance (kunchenguid#742)

* docs(harness): reverify grok exit command

* no-mistakes(test): Correct Grok exit resume attribution

* fix(spawn): tolerate transient worktree cwd

* no-mistakes(review): Guard leased worktree CWD resolution

* no-mistakes(test): Captain: synchronize secondmate charter role assertion

* no-mistakes(test): Stabilize Herdr heartbeat test waits

* no-mistakes(document): Document spawn isolation safeguards

* test: include lease helper in teardown fixture

---------

Co-authored-by: Kun Chen <[email protected]>
Co-authored-by: Israel Wilson <[email protected]>
Co-authored-by: QuinnBot <[email protected]>
LoneExile added a commit to LoneExile/firstmate that referenced this pull request Jul 20, 2026
kunchenguid#736)

- docs/configuration.md owns the TOP-LEVEL operational-home layout and
  schemas; per-script headers own child fields (AGENTS.md section 2).
- fm-session-start.sh header owns composed commands/ordering/digest;
  fm-supervision-instructions.sh renders the emitted supervision block
  from docs/supervision-protocols/ (AGENTS.md section 3).
- afk skill description states its full trigger set (matches the AGENTS.md
  away-mode stub) and the automatic exit.
- drop the redundant orca-backend 'node' prereq bullet; node is owned as
  universal toolchain in docs/configuration.md.
- align fm-instruction-owners assertions to the reworded AGENTS.md; skip
  the shellcheck-clean check when shellcheck is absent.

README 'Guarded by construction' bullet intentionally not ported (fork
wording diverged and is already accurate). Grok exit-guidance (kunchenguid#742)
skipped (no grok section in this omp-only fork).
raywest added a commit to raywest/firstmate that referenced this pull request Jul 20, 2026
* fix(bin): keep watcher supervision continuous across child cycles (kunchenguid#693)

* fix: make watcher supervision continuous

* no-mistakes(review): Bound watcher retries and log attached signals

* no-mistakes(review): Add bounded successor-recovery wake fallbacks

* no-mistakes(review): Prevent overlapping successor-arm retries

* no-mistakes(review): Resume supervision after late arm closes

* no-mistakes(review): Bind OpenCode recovery to attempted arm

* no-mistakes(test): Synchronize peer beacon regression fixture

* no-mistakes(test): Synchronize Pi and OpenCode late-close lifecycle fixtures

* no-mistakes(document): Captain: document watcher successor protocol behavior

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* no-mistakes: apply CI fixes

* fix: fetch current PR head for review diffs (kunchenguid#722)

* fix: always fetch PR head for review diffs

Prefer a freshly fetched refs/pull/<n>/head over a reachable recorded
pr_head= so reviewers never hold a merge over a "missing" fix that already
landed on the remote PR. Recorded SHA is offline fallback only; local branch
is last resort with a warning. Store the tip under refs/fm-review/ so a later
base-branch fetch cannot clobber the compare tip via FETCH_HEAD.

* no-mistakes(test): Isolate session-start nudge tests from gate state

* no-mistakes(document): Correct review-diff documentation

* docs: resolve five contract contradictions across AGENTS.md, README, and skills (kunchenguid#736)

* docs: resolve five contract contradictions

* no-mistakes(test): align owner-pointer assertions with reworded docs; skip absent shellcheck

* docs(harness): correct Grok exit guidance (kunchenguid#742)

* docs(harness): reverify grok exit command

* no-mistakes(test): Correct Grok exit resume attribution

* fix(watcher): bound stale wakes for parked crew (kunchenguid#743)

* fix(watcher): bound stale wakes for exited paused crew

* no-mistakes(review): Gate pause suppression on confirmed agent death

* no-mistakes(test): Fixed stale pause cadence

* no-mistakes(document): Document dead-agent hold cadence

* fix(supervision): distinguish ordinary wakes from recovery (kunchenguid#744)

* fix(supervision): distinguish ordinary wakes from repair

* no-mistakes(review): Make passive guard follow-ups recovery-only

* no-mistakes(document): Clarify recovery-only turn-end guard documentation

* no-mistakes(document): Document stale-wake liveness cadence

---------

Co-authored-by: Kun Chen <[email protected]>
Co-authored-by: Israel Wilson <[email protected]>
Co-authored-by: Ray West <[email protected]>
quinnbot-ai added a commit to quinnbot-ai/firstmate that referenced this pull request Jul 20, 2026