Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
8934c17
fix: derive bearings from authoritative secondmate state (#555)
kunchenguid Jul 14, 2026
eb9ee2f
fix: restore fleet snapshots on stock macOS Bash (#578)
kunchenguid Jul 14, 2026
1811b89
fix(afk): make Pi escalation and return catch-up reliable (#587)
kunchenguid Jul 15, 2026
f8c5941
feat: support Pi max reasoning profiles (#537)
korallis Jul 15, 2026
e063ca5
chore: no-mistakes(document): Clarify yolo response ownership (#595)
kunchenguid Jul 15, 2026
fcb9e8a
feat: establish instruction ownership foundation (#619)
kunchenguid Jul 15, 2026
71db4be
fix: compress Firstmate contract and enforce delivery rigor ownership…
kunchenguid Jul 16, 2026
cd218f2
feat: add durable captain decision holds (#593)
kunchenguid Jul 16, 2026
064aa67
fix(bin): harden PR check artifacts (#556)
kunchenguid Jul 16, 2026
815f7af
fix(bin): compact session-start backlog digest (#636)
kunchenguid Jul 16, 2026
2406354
fix: dedupe stale watcher guard banners (#637)
kunchenguid Jul 16, 2026
c115561
fix(bin): balance bearings landed baseline (#640)
kunchenguid Jul 16, 2026
a5d3652
fix: clarify captain-facing translation contract (#644)
kunchenguid Jul 16, 2026
1346ff7
fix(bin): make bootstrap output and nudges deterministic (#646)
kunchenguid Jul 16, 2026
508a6b7
docs(secondmate-provisioning): clarify concise registry ownership (#649)
kunchenguid Jul 16, 2026
024b96b
fix(bin): strip quoted blocked_by values during decision hold resolve…
kunchenguid Jul 17, 2026
e6f240c
feat(secondmate): inherit shared captain preferences (#656)
kunchenguid Jul 17, 2026
c27135c
feat: gate local agent secret injection (#658)
kunchenguid Jul 17, 2026
85643ee
test: isolate Herdr autodetect smoke sessions (#662)
kunchenguid Jul 17, 2026
5bf59ba
docs: adopt under way for active work (#666)
kunchenguid Jul 17, 2026
6de9278
Revert "feat: gate local agent secret injection (#658)" (#668)
kunchenguid Jul 17, 2026
46e4201
fix(pi): distinguish stale locks when arming watcher (#681)
kunchenguid Jul 17, 2026
9f99ce5
Merge upstream/main
mielyemitchell Jul 18, 2026
bd12109
no-mistakes(document): Restore docs dropped by upstream-sync merge: s…
mielyemitchell Jul 18, 2026
51b13ba
docs: restore dispatch ack guidance
mielyemitchell Jul 18, 2026
068f181
no-mistakes(document): docs: restore dispatch-ack mentions in README …
mielyemitchell Jul 18, 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
23 changes: 11 additions & 12 deletions .agents/skills/afk/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,19 @@ batched digest rather than per-wake injections.
3. **Do not separately arm `fm-watch.sh`.** The daemon manages the watcher as
its child; the singleton lock no-ops a stray arm harmlessly.

4. **Acknowledge** to the captain that away-mode is active.
The daemon will self-handle routine wakes, escalate captain-relevant events and bounded declared-external-wait rechecks, and let the captain exit by sending any real message.
4. **Acknowledge** in `AGENTS.md` section 9 language: "Captain, away mode is active; I will batch routine updates and surface only decisions, failures, credentials, or review-ready work until you return."

## How to exit afk

No `/back` is needed. The first genuine message is the return signal:

- A message **without** the sentinel marker and **not** starting with `/afk` -> the captain is back.
Run `bin/fm-afk-launch.sh stop`: it stops the daemon in the correct order - it SIGTERMs the daemon so its shutdown flush runs **while `state/.afk` is still present** (clearing the flag first makes that flush a no-op via the daemon's presence gate, stranding undelivered escalations), then closes the daemon's own terminal by exact id, then clears `state/.afk` last.
Then flush one distilled "while you were out" catch-up (drain `state/.wake-queue`, summarize any pending escalations from `state/.subsuper-escalations` and any `state/.subsuper-inject-wedged` marker), and resume full per-wake responsiveness through the emitted primary-harness supervision protocol from session start.
- A message **with** the sentinel marker (`FM_INJECT_MARK`, ASCII 0x1f) -> it
is a daemon escalation; stay afk and process it.
Run `bin/fm-afk-return.sh` before acting on the message that brought the captain back.
That script owns correct-ordered daemon shutdown, durable wake draining, escalation and wedge evidence, and the return-catch-up gate.
If it reports a firstmate-actionable `blocked:` event, remediate it immediately through the normal lifecycle, or explicitly reclassify it with a durable reason and close its decision key with `resolved [key=...]`, then run `bin/fm-afk-return.sh check`.
Once the daemon stops, resume full per-wake responsiveness through the emitted primary-harness supervision protocol while blocker handling proceeds, so the gate never creates a blind wait.
Do not answer a Bearings request or perform any other ordinary captain work until the check exits successfully.
- A message **with** the sentinel marker (`FM_INJECT_MARK`, U+2063 INVISIBLE SEPARATOR) -> it is a daemon escalation; stay afk and process it.
- Re-invoking `/afk` while already away -> stay afk (refresh the flag); this
does **not** trigger an exit.

Expand All @@ -77,12 +78,9 @@ explicit word - the daemon just batches the notification.

## Sentinel marker contract

The daemon prefixes every injection with `FM_INJECT_MARK` (ASCII unit
separator, 0x1f), invisible and untypable. This is how firstmate tells a
daemon escalation apart from a real message in the same pane. The marker
travels with the message text; it does not rely on harness-level
typed-vs-injected detection (which is not portable across claude, codex,
opencode, pi, and grok).
The daemon prefixes every injection with `FM_INJECT_MARK` (U+2063 INVISIBLE SEPARATOR), which has no normal keyboard keystroke and survives terminal transport as UTF-8 text.
This is how firstmate tells a daemon escalation apart from a real message in the same pane.
The marker travels with the message text; it does not rely on harness-level typed-vs-injected detection, which is not portable across claude, codex, opencode, pi, and grok.

## Busy-guard and composer guard

Expand All @@ -103,6 +101,7 @@ In afk mode the composer guard is belt-and-suspenders (no human is typing), but
**Max-defer escape (the daemon must never silently wedge).**
If anything stays buffered past `FM_MAX_DEFER_SECS` (default 300), the daemon
attempts one normal flush, which still requires an idle pane and an affirmatively empty composer.
The alarm is defense in depth rather than a substitute for keeping every genuinely idle supported composer injectable.
If that submit cannot be confirmed, it raises a loud, rate-limited wedge alarm:
an ERROR in the daemon log, a durable
`state/.subsuper-inject-wedged` marker (surface it on the "while you were out"
Expand Down
27 changes: 16 additions & 11 deletions .agents/skills/bearings/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ metadata:

# bearings

Generate a "pick up where I left off" report from the fleet's live state, so the captain can resume in one read after a break, a night, or a context reset.
The deliverable is a dated markdown file plus a concise chat summary; this is the reusable version of the worked example at `data/status-report-2026-07-06.md` when that file is present in this home.
Generate a complete standalone snapshot from the fleet's current state, so the captain can resume in one read after a break, a night, or a context reset.
The deliverable is a dated markdown file plus a concise chat summary that each stand on the current snapshot rather than an earlier report.
This skill is read-mostly.
It reads fleet state and writes exactly one report file.
It never tears down a task, merges a PR, dispatches new work, or mutates any task state as a side effect of producing the brief - those belong to the captain's explicit word and the normal task lifecycle.
Expand All @@ -23,23 +23,25 @@ It never tears down a task, merges a PR, dispatches new work, or mutates any tas
The command's header and `--help` output own its exact fields, bounds, opt-ins, and output contract.
When the captain asks to include PRs, use the command's live-PR opt-in; otherwise keep the default local-only read.
If the command is unavailable, fall back to `bin/fm-fleet-snapshot.sh --json` and `bin/fm-crew-state.sh <id>`; never infer current state from a raw `tail` of `state/<id>.status`, which is append-only wake-event history whose last line goes stale.
For registered secondmates, use the snapshot's structured-home classification and provenance; a parent event or bounded terminal contradiction is fallback evidence, never authority over readable structured home state.
Structured captain-held decisions come from `decision-hold-lifecycle` and appear under `decisions_open`; do not scrape reports or visual-review artifacts to supplement them.
A queued item under `gates` only becomes "next work" when its blocker is gone and its time/date gate has arrived; until then it stays queued with the reason.

2. **Compose the detailed report file around the four-section spine, adding the richer detail the chat leaves out.**
The gather step is deterministic; your judgment is scoped to the last mile only - ranking the command's facts by what matters right now and writing the scannable prose.
The exemplar is `data/status-report-2026-07-06.md` in this home's `data/` when present; match its scannability, not a raw state dump.
The report uses the same four sections as the chat (see the chat-response contract below), in the same order, each always present, and adds the detail the chat omits:
Never read an earlier `data/status-report-*.md` to decide what to omit, include, describe as changed, or call current.
The report uses the same four complete sections as the chat (see the chat-response contract below), in the same order, each always present, and adds the detail the chat omits:
- **Title** - `# Bearings - <day> <YYYY-MM-DD>` (use "Morning status" only when the captain specifically asks for a morning brief), followed by two or three sentences framing where things stand.
- **Captain's Call** - every open decision relayed verbatim with its options, plus each PR ready to merge and each needed credential or login, every PR with the full `https://...` URL, never a bare `#number`.
- **Recently Landed** - merged PRs, completed scouts, and finished local-only work since the last report, across the main fleet and every registered secondmate home.
- **Captain's Call** - every open decision summarized with its options from the structured decision record, plus each PR ready to merge and each needed credential or login, every PR with the full `https://...` URL, never a bare `#number`.
- **Recently Landed** - the bounded current recent-completions baseline from structured state across the main fleet and every registered secondmate home, rendered in full on every run.
- **Underway** - each live direct report making progress, with its current state, and the plans / main pickup pointers worth reopening (`data/<id>/report.md` files, `.lavish/*.html` boards).
- **Charted Next** - queued or gated next work, with each item's blocker or date reason.

3. **Write the dated report file so it persists, then surface the mandatory four-section digest in chat.**
- Write the full report to `data/status-report-<YYYY-MM-DD>.md` using today's date.
This is the required artifact; it lives in gitignored `data/` alongside the worked example.
This is the required artifact; it lives in gitignored `data/`.
If today's file already exists, delete it first, then create a new file from scratch.
- The chat response is the concise four-section digest defined by the contract below: materially shorter than the report file, and it links to that file for the full picture.
- The chat response is the concise four-section digest defined by the contract below: materially shorter than the report file, complete as a current snapshot, internally consistent with the file, and linked to that file for the full picture.
- For a richer review surface, optionally offer a Lavish board with `lavish-axi` when the report has enough structure to deserve one, but the markdown file is the required artifact and the four-section chat digest is the required minimum.

## Chat-response contract
Expand All @@ -49,8 +51,8 @@ Every `/bearings` chat response renders EXACTLY these four sections, in THIS ord

1. **Captain's Call** - ONLY items that need the captain's own action now: a decision to make, a PR to approve or merge, a credential or login to provide, or a blocker only the captain can clear.
Empty-state: "Nothing needs your action right now."
2. **Recently Landed** - work completed since the prior report: merged PRs, completed scouts, and finished local-only merges, across the main fleet and every registered secondmate home.
Empty-state: "Nothing has landed since your last report."
2. **Recently Landed** - the bounded current recent-completions baseline: merged PRs, completed scouts, and finished local-only merges across the main fleet and every registered secondmate home.
Empty-state: "No recent completions are in the current baseline."
3. **Underway** - live work progressing on its own, one line of current state per direct report.
Empty-state: "Nothing is underway."
4. **Charted Next** - queued or gated work waiting on the fleet or a date, never on the captain.
Expand All @@ -59,9 +61,12 @@ Every `/bearings` chat response renders EXACTLY these four sections, in THIS ord
Rules that keep the contract unambiguous:

- Every section ALWAYS renders, even when empty, with its short empty-state sentence; never omit a section.
- Every report and chat digest is a complete current snapshot, never a delta against a prior report.
- Recently Landed always renders the bounded current baseline, even when the same completions appeared in an earlier report.
- The four buckets are mutually exclusive, so every item is forced into exactly one: needs-your-action is Captain's Call, done is Recently Landed, self-progressing is Underway, not-yet-started is Charted Next.
- The strict boundary keeps action-free items OUT of Captain's Call: a working or validating task, a queued item blocked on another task or a date, landed work, a completed scout's report pointer, a declared `paused:` external wait, and a bare recorded PR with no merge-ready signal each belong to one of the other three sections, never Captain's Call.
- The chat carries one scannable line per item, each PR as the full `https://...` URL; the verbatim decisions, plans, full gate reasons, and evidence live only in the report file, which the chat links to, so the chat stays materially shorter than that file.
- A secondmate appears Underway only for `active_child_work`; `externally_held` belongs in Charted Next, and `unknown` belongs there as an unavailable-state gate unless its reason requires the captain's action.
- The chat follows `AGENTS.md` section 9 and carries one scannable line per item, each PR as the full `https://...` URL; detailed decisions, plans, full gate reasons, and evidence live only in the report file, which the chat links to, so the chat stays materially shorter than that file.

## Tone and content rules

Expand Down
Loading