Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
7ee0c19
fix(bin): verify the real GitHub merge outcome instead of reporting a…
wjkawecki-jt Aug 27, 2026
4f89f5b
fix(pi): prevent duplicate captain outcome reports (#3184)
kunchenguid Aug 27, 2026
bca584a
fix(bin): prioritize active pipeline-owned crew runs (#3194)
kunchenguid Aug 27, 2026
c651b59
fix(pi): surface requested outcomes without replaying fleet events (#…
kunchenguid Aug 28, 2026
1fd7ea2
feat(bin): add concurrent bounded remote transport lanes (#3210)
kunchenguid Aug 28, 2026
4207214
fix(bin): accelerate and bound changed test runs (#3250)
kunchenguid Aug 28, 2026
a390659
feat(bin): publish per-home summary ledgers (#3222)
kunchenguid Aug 29, 2026
52b59a1
fix(pi): gate first provider call on startup context (#3158)
M00NLIG7 Aug 29, 2026
f66be0f
fix(pi): restore Pi 0.84.4 renderer compatibility (#3261)
stanzhang Aug 29, 2026
5f31097
fix(bin): keep home-summary publication from starving supervision (#3…
kunchenguid Aug 29, 2026
4eb587d
fix(bin): prevent routine updates from hiding actionable status (#3268)
kunchenguid Aug 29, 2026
c731c36
docs(skills): split harness adapter operations reference (#3289)
M00NLIG7 Aug 29, 2026
0ace60a
test: centralize shared shell fixtures (#3296)
kunchenguid Aug 29, 2026
9e3df47
refactor: retire legacy PR-check migration machinery (#3299)
kunchenguid Aug 29, 2026
1fbc7bb
feat(bin): add trusted process-event extension bindings (#3247)
M00NLIG7 Aug 29, 2026
c7fdef9
fix(bin): deliver safety rules to promoted workers (#3269)
kunchenguid Aug 30, 2026
debe4bf
fix(bin): present Lavish feedback as structured output (#3321)
kunchenguid Aug 30, 2026
1260adc
fix: keep task records and backlog transitions atomic (#3322)
kunchenguid Aug 30, 2026
d71f4b9
fix(bin): contain promote and Relay metadata publishing (#3342)
kunchenguid Aug 30, 2026
a56a78a
fix(bin): absorb turn-end wakes during bounded pane churn (#2877)
karotkriss Aug 30, 2026
0866a77
fix(bin): safely unregister custom checks (#3369)
kunchenguid Aug 31, 2026
4ad8cba
refactor(quota): extract mid-task polling and candidate selection int…
0x7067 Aug 31, 2026
6c1d2db
fix: surface comments on Lavish annotations (#3371)
kunchenguid Aug 31, 2026
a5f3cbe
fix: support first public-followup registration on Bash 3.2 (#3420)
kunchenguid Sep 1, 2026
355f46f
fix(bin): isolate new Herdr server environments (#2792)
RooseveltAdvisors Sep 1, 2026
41d0ab3
fix: surface inbound Relay media to responding agents (#3442)
kunchenguid Sep 1, 2026
f2ee922
fix(bin): defer inactive reconciliation during startup (#3480)
kunchenguid Sep 2, 2026
f42a629
fix(bin): bound wake drain presentation lock waits (#3475)
kunchenguid Sep 2, 2026
ee58e39
fix(bin): retire public follow-ups in remote homes (#3479)
kunchenguid Sep 2, 2026
7d4b517
fix(bin): support process events under symlinked homes (#3484)
kunchenguid Sep 2, 2026
5466394
fix(pi): deliver captain outcomes as deterministic transcript entries…
FocalFactotum Sep 2, 2026
3b891c8
feat: add bounded concurrent Bearings ledger collection (#3481)
kunchenguid Sep 2, 2026
1459c4d
ci: rebalance portable serial test shards (#3489)
kunchenguid Sep 2, 2026
714da64
fix(pi): fall back on incomplete supervision branch prompts (#3491)
kunchenguid Sep 2, 2026
1c41029
fix(pi): re-probe supervision branch after cooldown (#3497)
kunchenguid Sep 2, 2026
521de54
fix(bin): remove legacy remote snapshot reads (#3501)
kunchenguid Sep 2, 2026
84c01b4
fix(pi): preserve watcher continuity across session replacement (#3498)
kunchenguid Sep 2, 2026
d977128
fix(bin): resurface task statuses missed by wake handling (#3495)
kunchenguid Sep 2, 2026
56b4c15
fix(bin): collect follow-up results from remote work homes (#3503)
kunchenguid Sep 2, 2026
763f597
fix(bin): exclude secondmates from home-summary validity (#3504)
kunchenguid Sep 2, 2026
88fb3c0
fix(bin): self-heal outcome indexes on first drain (#3509)
kunchenguid Sep 2, 2026
8988af2
fix(bearings): keep active children underway during captain holds (#3…
kunchenguid Sep 2, 2026
77ee3c8
fix(pi): settle watcher delivery on Pi accepting the follow-up (#3513)
kunchenguid Sep 2, 2026
d2b3fe2
docs(verification): record Pi provider context/cache-continuity findings
Valentino-Sole Aug 31, 2026
84ecde3
docs(verification): add Pi-core auto-compact trigger divergence finding
Valentino-Sole Aug 31, 2026
94671f1
docs(verification): trace spawn claude ENOENT to claude-code-cli's PA…
Valentino-Sole Aug 31, 2026
ff5bd1a
docs(verification): reproduce the auto-compact trigger/footer divergence
Valentino-Sole Aug 31, 2026
64c4a65
docs(verification): confirm no persistent 'hot' trigger state in Pi core
Valentino-Sole Aug 31, 2026
05228b6
docs(verification): confirm merged Pi-core fixes, root-cause the live…
Valentino-Sole Sep 2, 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
22 changes: 11 additions & 11 deletions .agents/skills/afk/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,17 @@ The daemon still clears its buffer only on the backend's `empty` success verdict
The daemon wraps `fm-watch.sh`, runs the watcher as a child, presents every durable wake after each actionable watcher close, classifies each presented record in bash, and acknowledges the presented generation only after routing completes.
It self-handles the routine majority without consuming a firstmate turn.
Captain-relevant events, plus a bounded recheck of a declared wait that is still declared, escalate to firstmate's context as one pre-read, single-line, batched digest.
The classification predicates (the captain-relevant verb set, declared-wait vocabulary, signal/stale tests, and fleet-scan) live in the shared `bin/fm-classify-lib.sh`, the same library the always-on watcher uses for its own triage when afk is off, so the two modes apply one identical policy.
The captain-relevant verb set, declared-wait vocabulary, status-span classifier, and presentation-marker contract live in shared `bin/fm-classify-lib.sh`, while each supervisor owns its routing and fleet scan as a consumer of that policy.
While `state/.afk` exists the daemon owns the watcher, so the watcher reverts to one-shot and lets the daemon do the triage - the two never run their triage at the same time.

Classify each wake this way:

- `signal` with a terminal captain verb (`done:`, `needs-decision:`, `blocked:`, or `failed:`) -> escalate.
- `signal` whose newly classified status span contains captain-relevant events -> escalate every event in source order.
A nonterminal progress verb remains nonterminal even when its prose contains a legacy free-text token such as `PR ready`, `checks green`, `ready in branch`, or `merged`; only a bare legacy line with such a token escalates.
Other signals with no captain-relevant status -> self-handle.
- `signal` or `stale` for a declared wait, either a `paused:` external wait or a verified `captain-held` transfer -> self-handle and track the pause rather than a wedge, whether its pane reads idle or busy.
That outranks an enriched possible-wedge reason, so a declared wait never escalates on the `FM_STALE_ESCALATE_SECS` cadence.
Other signals with no captain-relevant event in the span -> self-handle.
- `signal` or `stale` whose latest status declares a wait, either a `paused:` external wait or a verified `captain-held` transfer, tracks the pause rather than a wedge whether its pane reads idle or busy.
An unreported captain-relevant event in the newly classified span still escalates immediately while the current declaration independently keeps the pause cadence.
With no unreported actionable event, the wake self-handles, and the current declaration outranks an enriched possible-wedge reason so it never escalates on the `FM_STALE_ESCALATE_SECS` cadence.
If it is still declared past `FM_PAUSE_RESURFACE_SECS` (default 3600s), housekeeping sends one recheck and resets the pause window.
The window ages against the crew's own latest status line, so only a status append that stops declaring the wait ends this routing and restores wedge detection.
That recheck names which human the wait is on: the external dependency for `paused:`, and the captain themself for a `captain-held` transfer, who can answer the held decision or release the hold.
Expand All @@ -154,10 +155,9 @@ Classify each wake this way:
If the pane is still idle past `FM_STALE_ESCALATE_SECS` (default 240s), housekeeping escalates it as a possible wedge.
This bounds wedge-detection latency to the threshold plus a tick: a delay, never a loss.
Healthy crewmates are autonomous and do not wait on firstmate mid-task.
- `heartbeat` -> self-handle. The daemon runs its own cheap bash fleet scan
every `FM_HEARTBEAT_SCAN_SECS` (default 300s) as the catch-all for a
captain-relevant status line the per-wake classifier might miss.
- Unknown reason, or any uncertainty -> escalate fail-safe.
- `heartbeat` -> self-handle.
The daemon runs its own cheap bash fleet scan every `FM_HEARTBEAT_SCAN_SECS` (default 300s) as the catch-all for captain-relevant events still unread by the per-wake classifier.
- An unknown wake reason escalates fail-safe, while status-read uncertainty follows the shared one-report-without-position-advance contract referenced under Dedupe below.

Escalations are buffered up to `FM_ESCALATE_BATCH_SECS` (default 90s; 0 =
immediate) and flushed as one single-line digest prefixed with the current
Expand Down Expand Up @@ -199,8 +199,8 @@ the operational prefix lets firstmate distinguish it from a real captain message
text firstmate sees is clean.
- **Portable singleton lock** - the daemon uses the repo's portable lock helper
(`fm-wake-lib.sh`) instead of `flock`, which is absent on macOS.
- **Dedupe across signal/stale/scan** - `classify_signal` and terminal `classify_stale` paths check the seen-status marker before escalating, so a captain-relevant status escalated by one path is not re-escalated by another in the same digest.
The marker does not clear or suppress possible-wedge aging for a nonterminal progress line.
- **Dedupe across signal/stale/scan** - all three paths use the shared status presentation markers defined by `bin/fm-classify-lib.sh`, so a successfully classified span is not re-escalated by another path in the same digest.
Never treat a reported unreadable state as classified; the shared library header owns that marker contract, and the marker does not clear or suppress possible-wedge aging for a nonterminal progress line.
- **Auto-discovered supervisor pane** - the daemon resolves its own BACKEND
(tmux vs herdr) and TARGET independently, mirroring
`bin/fm-backend.sh`'s own runtime auto-detection. Backend: `FM_SUPERVISOR_BACKEND`
Expand Down
30 changes: 17 additions & 13 deletions .agents/skills/bearings/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Generate a complete current snapshot from the fleet's current state, so the capt
Plain `/bearings` returns only the concise four-section chat digest.
Only `/bearings file` writes the dated markdown report artifact and then returns the concise four-section chat digest linked to that report.
Only `/bearings lavish` builds the interactive fleet board beside that digest, through `bin/fm-bearings-board.sh` (its header owns every board mechanic and the fm-bearings-board.v1 payload contract).
A digest/build invocation is operationally read-only apart from the cooldown-limited reconcile instruction and its `state/<id>.reconcile-nudged` record, plus the explicit per-mode artifacts: the dated report in file mode, and in lavish mode the board file plus the answer binding and source registration that `bin/fm-bearings-board.sh build` records through their own owners.
During that invocation it never tears down a task, merges a PR, dispatches new work, steers a worker except through that reconcile hook, answers a decision, cleans up work, or mutates backlog or task state beyond the reconcile record.
A digest/build invocation is operationally read-only apart from observational remote-ledger cache refreshes, durable per-target reconcile-notify requests when the captured state needs them, plus the explicit per-mode artifacts: the dated report in file mode, and in lavish mode the board file plus the answer binding and source registration that `bin/fm-bearings-board.sh build` records through their own owners.
During that invocation it never tears down a task, merges a PR, dispatches new work, steers a worker, answers a decision, cleans up work, or mutates backlog or task state.
Board answers are acted on later under the normal authority rules; this skill's board-wake section explicitly owns the guarded routing at that time.

## Invocation modes
Expand All @@ -38,7 +38,8 @@ Board answers are acted on later under the normal authority rules; this skill's
It is the single bounded, deterministic fleet-state source for Bearings.
Do not create or consult a second fleet-state reader, parser contract, status-event-tail interpretation, visible-session recap, ad-hoc project probe, or ad-hoc `gh-axi`/`gh` query.
The command's header and `--help` output own its exact fields, bounds, opt-ins, and output contract.
Keep the default local-only read unless the captain asks to include PRs.
The default performs bounded concurrent remote-ledger reads for registered remote homes under one shared snapshot budget and may refresh the parent-side cache.
Only pass `--include-prs` when the captain asks for live GitHub PR enrichment.
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.
A decision is simply a task held for the captain (`captain-hold-lifecycle`); every due, unblocked captain-held task appears under `decisions_open`, whatever its kind.
Expand All @@ -50,13 +51,15 @@ Board answers are acted on later under the normal authority rules; this skill's
Render it under Charted Next with the related `omitted` disclosure, never invent an Underway row from backlog-only state, and never move it into Captain's Call.
The same holds for a secondmate home whose current state is unavailable, and for a readable home whose `invalidity` reports a backlog-vs-metadata mismatch: the mismatch is a repair notice about that home's own books, not a reason to drop its separately projected decisions, queued, landed, or live work.

2. **Ask any home whose own books disagree to reconcile them.**
2. **Record a later reconcile notification for any home whose own books disagree.**
When the snapshot reports a secondmate home whose `invalidity` is `orphan_in_flight`, `unowned_current`, or `terminal_in_flight`, that home's backlog and its own task metadata disagree and only that home may fix it.
Run `printf '%s\n' "$snapshot" | bin/fm-secondmate-reconcile.sh notify --snapshot -` inline immediately after gathering the snapshot, so the durable fire-and-forget enqueue finishes before digest composition without spawning any child or second snapshot.
The script header owns the cooldown window, non-blocking lock skips, stale-endpoint checks, retry, and fire-and-forget delivery contract; this hook arms no reply recovery or inbox escalation.
If the hook reports a skip or failure, continue composing the digest from the captured snapshot; a lock skip or known-undelivered send leaves the cooldown unset for a later recap.
A home is asked at most once per four-hour window, so running this on every recap costs nothing and cannot nag, while a mismatch still sitting there after the window earns one gentle re-nudge.
Never edit another home's backlog or metadata from here, and never expect or wait on a reply: the mate acts asynchronously from its durable inbox while the digest is composed from the snapshot already in hand.
Run `printf '%s\n' "$snapshot" | bin/fm-secondmate-reconcile.sh request --snapshot -` immediately after gathering the snapshot.
This atomically records one local one-shot request per mismatched target and returns without sending, taking a mate lifecycle lock, or waiting behind a local or remote delivery queue.
The supervision loop later claims the requests and runs the cooldown-limited fire-and-forget deliveries; the script header owns per-target coalescing, request durability, retries, cooldown, identity checks, and retirement.
Continue composing the digest from the captured snapshot as soon as the local requests are recorded.
If local request publication fails, continue composing, report that durability blocker, and never fall back to an inline send.
A home is still asked at most once per four-hour window, while a skipped or failed later delivery leaves the request durable for another supervision pass.
Never edit another home's backlog or metadata from here, and never expect or wait on a reply.

3. **Compose the four-section chat digest from the fresh snapshot.**
The gather step is deterministic; your judgment is scoped to ranking the command's facts by what matters right now and writing scannable captain-facing prose.
Expand Down Expand Up @@ -135,9 +138,10 @@ Rules that keep the contract unambiguous:
- Every section ALWAYS renders, even when empty, with its short empty-state sentence; never omit a section.
- Every chat digest and file-mode report 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, and not-yet-started work or an action-free fleet-integrity warning is Charted Next.
- The four buckets are mutually exclusive per item: needs-your-action is Captain's Call, done is Recently Landed, self-progressing is Underway, and not-yet-started work or an action-free fleet-integrity warning is Charted Next.
- A secondmate home can contribute to more than one section at once. Each active child is an Underway row regardless of the home-level `bearings_state`, while that same home's due captain hold is Captain's Call and its queued or external holds stay Charted Next. Do not hide active children because the home also has an open captain hold.
- 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.
- A secondmate's own row 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.
- A secondmate's own home-level row is not an Underway unit: `externally_held` belongs in Charted Next, and `unknown` belongs there as an unavailable-state gate unless its reason requires the captain's action.
- Do not suppress separately projected decisions, landed records, or gates from a `partial-structured` home merely because that secondmate's own row is `unknown` or its `invalidity` reports an inventory mismatch.
- Include the required direct address to the captain inside one item or empty-state sentence.
- Every PR appears as the full `https://...` URL; a shorthand `#number` is fine only as a back-reference after the full URL has already appeared in the same digest.
Expand All @@ -155,7 +159,7 @@ Rules that keep the contract unambiguous:

## Supervision discipline

During a digest/build invocation, this skill changes no fleet state beyond its reconcile instruction and cooldown record, explicit report or board artifacts, binding, and source registration.
Do not tear down a task, merge a PR, dispatch queued work, steer a worker except through the reconcile hook, answer a queued decision, clean up work, or mutate any other `state/` or `data/` file during that invocation.
During a digest/build invocation, this skill changes no fleet state beyond observational remote-ledger cache refreshes, durable local per-target reconcile-notify requests, explicit report or board artifacts, binding, and source registration.
Do not tear down a task, merge a PR, dispatch queued work, steer a worker, answer a queued decision, clean up work, or mutate any other `state/` or `data/` file during that invocation.
If the state gathered for the digest suggests an action, name it in its section and leave it to the normal lifecycle and configured authority.
On a later board wake, this read-only invocation rule yields to "Handling a board wake" and its guarded authority for captain-selected dispatches and merges.
Loading
Loading