Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
cd7d204
fix(spawn): isolate docker-compose project names per worktree
Jul 5, 2026
9adc1d3
no-mistakes(test): waiting for background test run to complete
Jul 5, 2026
9bfe192
no-mistakes(test): fix(tests): make herdr fake CLI counter race-safe …
Jul 5, 2026
24c35a7
no-mistakes(document): docs: document per-worktree docker-compose pro…
Jul 5, 2026
b4c1b51
no-mistakes(document): docs already fully synced; added missing docke…
Jul 5, 2026
4f2f3d4
no-mistakes(lint): Fix unused $out variable flagged by shellcheck in …
Jul 5, 2026
6a58fc0
feat(spawn): auto-compact claude crewmates around 200k tokens
Jul 10, 2026
06ada80
no-mistakes(test): fix environment-fragile test failures (jq, git, ha…
Jul 10, 2026
c3917be
feat(spawn): raise claude auto-compact window to 300000
Jul 11, 2026
93c3174
fix(teardown): recognize work fast-forwarded into local main as landed
Jul 11, 2026
677f2ba
test(teardown): drop stale git-2.38 skip gate for content-in-default …
Jul 11, 2026
bb70fd4
feat(dispatch): add model/effort tiers and mechanical quality guardrails
Jul 9, 2026
299a575
no-mistakes(review): scope risk-tripwire brief scan, narrow bin path,…
Jul 9, 2026
92dd7c9
no-mistakes(review): harden risk-tripwire scans and mechanically wire…
Jul 9, 2026
fef34b6
no-mistakes(review): make risk-tripwire grep portable, give tier-guar…
Jul 9, 2026
2bde3fd
no-mistakes(review): set exec bit on new tests, fix ultracode marker doc
Jul 10, 2026
5c95dca
no-mistakes(test): fix jq/git-version and test-env portability in fai…
Jul 10, 2026
4983bd9
no-mistakes(document): sync docs with new resource-tiering guardrail …
Jul 10, 2026
b934233
no-mistakes(review): exclude herdr-lab brief block from risk-tripwire…
Jul 10, 2026
3acee60
no-mistakes(review): clean up orphan .ultracode state marker on teardown
Jul 10, 2026
9423511
no-mistakes(review): stop tiering guardrails passing silently when di…
Jul 10, 2026
e5811cc
no-mistakes(review): pass ultracode through dispatch, tighten tiering…
Jul 10, 2026
1b75fd2
no-mistakes(test): skip handoff tests on incompatible tasks-axi; fix …
Jul 10, 2026
5058b86
no-mistakes: apply CI fixes
Jul 10, 2026
1ce2f14
fix(teardown): check both origin and local ref for landed content
Jul 11, 2026
2a5feed
feat: auto-sync live NAS deployments after a landed ship task
Jul 12, 2026
5d46b6f
no-mistakes(review): docs: document fm-nas-deploy-sync.sh script and …
Jul 12, 2026
0883a49
no-mistakes(review): Sandbox teardown tests' NAS deploy sync lookup file
Jul 12, 2026
5c9b4f1
no-mistakes(review): Aggregate pm2 cluster status and stub NAS sync i…
Jul 12, 2026
05abc0e
no-mistakes(review): Bound NAS deploy sync git/fs calls with a timeout
Jul 12, 2026
e334ca3
no-mistakes(review): Guard NAS sync fetch race, document timeout knob…
Jul 12, 2026
85419ff
no-mistakes(test): placeholder - awaiting background test run completion
Jul 12, 2026
3bc89a9
no-mistakes(document): Synced AGENTS.md and docs/architecture.md/cmux…
Jul 12, 2026
9b5f3b9
feat: surface failed critical systemd services at bootstrap
Jul 13, 2026
2330850
keep firstmate repo in sync with upstream template
Jul 14, 2026
9dc5476
clarify /updatefirstmate converges to the fork, not the upstream temp…
Jul 14, 2026
f5a5026
fix(turnend-guard): poll for a re-arming watcher before blocking
Jul 15, 2026
9784d90
no-mistakes(test): fix stale packed-refs-lock recovery and backlog-ha…
Jul 15, 2026
3d5673b
no-mistakes(test): Waiting on full test suite run to verify fm-afk-la…
Jul 15, 2026
c41ac4f
no-mistakes(document): Sync docs/configuration.md and docs/turnend-gu…
Jul 15, 2026
02a2d8d
feat(watch): surface autodeploy-log failures on the periodic sweep
Jul 15, 2026
38aa0d9
feat(bootstrap): add session-start check for autodeploy-log failures
Jul 15, 2026
3cf8a8e
fix(watch): bound autodeploy log reads with a timeout
Jul 15, 2026
782a4e0
no-mistakes(review): bootstrap: warn when autodeploy alerting is iner…
Jul 15, 2026
59c65b5
no-mistakes(document): Doc-synced fm-merge-local push behavior, fm-au…
Jul 16, 2026
9d6ba4a
docs: reconcile AGENTS.md with the compressed upstream contract
Jul 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .agents/skills/bootstrap-diagnostics/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: bootstrap-diagnostics
description: >-
Agent-only handling playbook for session-start bootstrap diagnostics.
Use whenever the session-start digest's bootstrap section prints any diagnostic or capability line - MISSING, MISSING_MANUAL, BACKEND_INVALID, NEEDS_GH_AUTH, TANGLE, CREW_HARNESS_OVERRIDE, CREW_DISPATCH, FLEET_SYNC, SECONDMATE_SYNC, SECONDMATE_LIVENESS, TASKS_AXI, NUDGE_SECONDMATES, or FMX - or when a standalone bin/fm-bootstrap.sh run prints one.
Use whenever the session-start digest's bootstrap section prints any diagnostic or capability line - MISSING, MISSING_MANUAL, BACKEND_INVALID, NEEDS_GH_AUTH, TANGLE, CREW_HARNESS_OVERRIDE, CREW_DISPATCH, FLEET_SYNC, SECONDMATE_SYNC, SECONDMATE_LIVENESS, TASKS_AXI, NUDGE_SECONDMATES, FMX, SERVICE_FAILED, AUTODEPLOY_FAILED, AUTODEPLOY_INERT, or UPSTREAM_DRIFT - or when a standalone bin/fm-bootstrap.sh run prints one.
A silent bootstrap section means all good and needs no skill load.
user-invocable: false
metadata:
Expand Down Expand Up @@ -47,3 +47,17 @@ The inline rules in `AGENTS.md` section 3 still bind: detect, then consent, then
A secondmate that was skipped, already current, or whose advance changed no instructions is not listed and must not be disturbed.
- `FMX: X mode on ...` / `FMX: X mode off ...` - bootstrap confirmed or removed the local X-mode poll artifacts (`docs/configuration.md` "X mode (.env)").
Only when a running watcher needs the cadence transition applied immediately, restart the home-scoped watcher through the emitted harness supervision protocol; bootstrap deliberately never restarts the watcher itself.
- `SERVICE_FAILED: <unit> - failed since <timestamp>` - a systemd unit named in the optional local `config/critical-services` file is in the failed state (`docs/configuration.md` "Critical service watch"); a pure read-only detection (`systemctl is-failed`, no root), so a read-only session still surfaces it.
Report it to the captain in plain language; never restart the unit yourself - a unit that failed may be unsafe to restart without knowing why.
An absent or empty config file, a host without `systemctl`, or no failed unit all print nothing.
- `AUTODEPLOY_FAILED: <label> - <last line>` - the last line of a status log named in the optional local `config/autodeploy-logs` file reports failure (`bin/fm-watch.sh`'s `autodeploy_scan` owns the failure convention; `bin/fm-bootstrap.sh`'s `autodeploy_logs_check` is its session-start counterpart, a pure read-only detection that catches a deploy that failed while no watcher was armed to sweep it).
Tell the captain plainly that the live deploy for `<label>` is failing, relaying the log line; firstmate never touches the deploy itself.
An absent or empty config file, a missing or transiently unreadable log (a NAS hiccup), or a healthy last line all print nothing.
- `AUTODEPLOY_INERT: config/autodeploy-logs is set but no timeout mechanism (timeout, gtimeout, or perl) is on PATH; autodeploy-alert checks cannot run` - the host has none of the three mechanisms `fm-autodeploy-lib.sh`'s `fm_autodeploy_read_last_line` needs to bound a log read, so every autodeploy check silently no-ops on both the bootstrap check and the watcher's periodic sweep.
Tell the captain plainly that autodeploy alerting is disabled on this host until `timeout` (coreutils), `gtimeout` (macOS via Homebrew's coreutils), or `perl` is installed; this is a one-time-per-session capability gap, not a deploy failure.
- `UPSTREAM_DRIFT: local main is <ahead> ahead / <behind> behind upstream/main, last reconciled <days>d ago (<date>)` - the always-on FYI variant: firstmate's OWN repo tracking how far it has drifted from its read-only upstream template (`kunchenguid/firstmate`, the `upstream` remote after the remote swap).
It prints every session; record it silently like any capability fact and take no action while the wording stays FYI.
It only reports - the network fetch that refreshes the ref runs in the locked fleet-sync sweep, and reconciling upstream is never a bootstrap side effect.
- `UPSTREAM_DRIFT: this repo's upstream sync needs attention - ...` - the escalated variant (local main more than ~30 commits behind `upstream/main`, or the merge-base older than 10 days).
Surface it to the captain in plain outcome language and, on their go-ahead, dispatch a deliberately-reviewed firstmate-repo reconciliation ship task - fetch `upstream`, merge it into local `main`, resolve conflicts, and land local-only (`AGENTS.md` section 1) - the same shape that reconciled the divergence before.
Never automate the merge; keeping the gap small also keeps the pipeline's opportunistic upstream PR's diff clean (`AGENTS.md` section 1).
7 changes: 7 additions & 0 deletions .agents/skills/harness-adapters/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ Its broader dark-TRUECOLOR placeholder handling and dark-theme tradeoff are docu
That styled capture is internal to the boolean detector only.
`fm-peek` and every other human or LLM-facing capture path stays plain `tmux capture-pane` with no escape codes.

**Auto-compaction fact (verified 2026-07-09, Claude Code 2.1.206; shipped constant raised to 300000 2026-07-11).**
`bin/fm-spawn.sh` launches every claude crewmate and secondmate with `CLAUDE_CODE_AUTO_COMPACT_WINDOW=300000`, scoped the same way as `CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false` above, so these separately-launched processes auto-compact around 300k tokens the way the primary already does via its own `.claude/settings.local.json` (which they never inherit).
The var is read once at process startup and is capped at the model's real context window, so it can only lower the effective trigger, never raise it past the real ceiling: `min(300000, window)` is `300000` once `window` exceeds it, but a no-op (stays at `window`) below that.
This is not a universal guarantee for every possible future model choice - a differently-configured account/model capped at the plain ~200k window would see no change - but it is true for the window tier crew actually runs on today: `--model sonnet` on this account, the standard crewmate spawn, resolves to the ~1M-context beta, well above 300000.
Verified live in a tmux pane at the original 200000 value (the mechanism is unchanged, only the shipped constant moved to 300000): `claude --model sonnet` on this account resolves to a ~967k-token auto-compact window with no override (`/context` reported `Auto-compact window: 967k tokens`, i.e. the 1M-context beta, not the 200k a plain Sonnet window would imply); relaunched with `CLAUDE_CODE_AUTO_COMPACT_WINDOW=200000` set, `/context` reported `39.5k/200k tokens (20%)` and `Auto-compact window: 200k tokens` - the window pinned to the override as expected.
This is why the primary's own two-var form (`CLAUDE_CODE_AUTO_COMPACT_WINDOW=1000000` + `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=20`) is not copied here: that pair assumes a 1M window, and would silently cap a smaller-window model/account combination to a far more aggressive trigger.

**Primary-session guard fact (verified 2026-07-04, Claude Code 2.1.201; preserved 2026-07-08, Claude Code 2.1.204).**
This is separate from the per-task crewmate turn-end hook above (that one just `touch`es a marker file in a task's own `.claude/settings.local.json`).
The firstmate PRIMARY's own `.claude/settings.json` registers `bin/fm-turnend-guard.sh` as a Stop hook, and exiting with status 2 plus stderr reliably forces the model to continue.
Expand Down
3 changes: 3 additions & 0 deletions .agents/skills/updatefirstmate/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ It never forces, never creates a merge commit, never stashes, and advances a tar
A tracked-files fast-forward leaves the gitignored operational dirs (data/, state/, config/, projects/, .no-mistakes/) untouched, so a secondmate's in-flight work is never disrupted.
This touches only the firstmate repo and its own worktrees, never anything under `projects/`.

Post-swap, this pull follows `origin`, which is the captain's fork, so `/updatefirstmate` converges the whole fleet onto that fork and does nothing on the primary checkout, which is itself the source every fork tracks.
It deliberately never reaches for the read-only `upstream` template: folding template improvements into local `main` is a separate, reviewed reconciliation ship task, the one the `UPSTREAM_DRIFT:` bootstrap diagnostic surfaces, and it never rides in on a self-update.

## What it does

1. **Run the updater:**
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ config/backlog-backend
config/backend
config/x-mode.env
config/cmux-socket-password
config/critical-services
config/autodeploy-logs
config/wedge-alarm
Loading
Loading