Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
6f0f87f
fix(bin): prevent remote polls from blocking session startup (#1754)
kunchenguid Aug 5, 2026
3a8d63e
docs: present X mode as the X and Discord public surface (#1778)
kunchenguid Aug 6, 2026
3b6ee03
fix(bin): run session start deterministically from hooks (#1781)
kunchenguid Aug 6, 2026
5d77b48
fix: rename X mode to Relay in user-facing docs (#1784)
kunchenguid Aug 6, 2026
930ca76
feat: add Muse Code crewmate adapter (#1786)
kunchenguid Aug 6, 2026
8387039
fix(herdr): require 0.8.0 for default presentation spaces (#1787)
kunchenguid Aug 6, 2026
8ec3e94
fix(bin): classify settled Muse session logs as idle (#1788)
kunchenguid Aug 6, 2026
2cf0283
docs(agents): read the persisted digest when only a preview is shown …
kunchenguid Aug 6, 2026
345de4e
fix: preserve fleet state in truncated session-start digests (#1798)
kunchenguid Aug 6, 2026
6c206ed
feat(send): close answered decisions at answer time via --resolve-key…
kunchenguid Aug 6, 2026
fb368dc
fix(bin): seed remote secondmates from supplied origins (#1836)
kunchenguid Aug 7, 2026
91fa548
fix(tests): restore reliable fm-send backend parity coverage (#1851)
kunchenguid Aug 7, 2026
990753a
fix(bin): mirror remote secondmate status streams (#1846)
kunchenguid Aug 7, 2026
199cb79
docs(agents): describe the digest's fleet-state-before-context order …
kunchenguid Aug 7, 2026
4cdd0bd
fix(bin): fail closed on NUL bytes in the durable parent binding (#1847)
kunchenguid Aug 7, 2026
8398d31
fix(skills): reconcile inherited secondmate plans with shipped state …
kunchenguid Aug 7, 2026
4b6b89d
fix: move network checks off the session-start blocking path (#1860)
kunchenguid Aug 7, 2026
d8bb074
fix(procevent): apply remote replies during capture (#1831)
kunchenguid Aug 7, 2026
073cb30
feat(skills): port internal stow curation disciplines to the public s…
kunchenguid Aug 7, 2026
70aeba8
chore(bootstrap): raise lavish-axi version floor to 0.1.46 (#1865)
kunchenguid Aug 7, 2026
8560bd4
Merge upstream/main: adopt muse adapter, keep fork cursor harness
Quidge Aug 7, 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
7 changes: 6 additions & 1 deletion .agents/skills/ahoy/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ metadata:

Give the captain a concise session-only recap without gathering fresh state.

0. Before anything else, check whether this session has already taken the helm: a `SESSION START` digest for this home must be visible in the session history.
If it is not, run `bin/fm-session-start.sh` once and read its digest before producing any recap.
Run-tier harness surfaces run it automatically at session open, so this step is normally already satisfied and costs one glance; it is the safety net for surfaces that cannot run it on a hook, and for any path where a skill would otherwise act first.
Taking the helm always precedes this skill's own logic, and the digest it produces is operational input, never a captain message or a recap event.

1. Inspect only conversation or session history already visible to the current first mate.
2. Find the most recent real captain-authored message before the current `/ahoy` invocation.
A captain boundary is an ordinary user-role message unless it matches one of the narrow operational exclusions below.
Expand All @@ -32,7 +37,7 @@ Give the captain a concise session-only recap without gathering fresh state.
A later unrelated captain message establishes a recap boundary but does not close an earlier decision.
Treat a decision as closed only when a later visible response substantively resolves it, chooses an option, declines it, grants or denies the requested approval, or otherwise directly addresses that decision.
Include every visibly supported open decision once, and deduplicate by the decision's substance when the ordinary interval recap already represents it or its wording differs.
6. The normal recap branch is session-history-only.
6. The normal recap branch is session-history-only, apart from the step 0 helm check.
Do not call Bearings, shell commands, fleet snapshots, status readers, GitHub or browser APIs, tools, or file reads or writes.
Create no report, persist nothing, and do not guess current live state beyond the last visible event.
7. If no ordinary events occurred after the previous captain message but an older visibly open decision exists, report that decision instead of claiming nothing happened.
Expand Down
8 changes: 6 additions & 2 deletions .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 an actionable diagnostic line - MISSING, MISSING_MANUAL, BACKEND_INVALID, NEEDS_GH_AUTH, TANGLE, STARTUP_MEMORY_BUDGET, CREW_DISPATCH invalid, FLEET_SYNC, PR_CHECK_MIGRATION, SECONDMATE_SYNC, SECONDMATE_LIVENESS, SECONDMATE_HANDOFF, NUDGE_SECONDMATES, or FMX - or when a standalone bin/fm-bootstrap.sh run prints one of those lines.
Use whenever the session-start digest's bootstrap or network-checks section prints an actionable diagnostic line - MISSING, MISSING_MANUAL, BACKEND_INVALID, NEEDS_GH_AUTH, TANGLE, STARTUP_MEMORY_BUDGET, CREW_DISPATCH invalid, FLEET_SYNC, NETWORK_CHECKS, PR_CHECK_MIGRATION, SECONDMATE_SYNC, SECONDMATE_LIVENESS, SECONDMATE_HANDOFF, NUDGE_SECONDMATES, or FMX - or when a standalone bin/fm-bootstrap.sh or bin/fm-startup-network.sh run prints one of those lines.
A silent bootstrap section, or a BOOTSTRAP_INFO fact, means no skill load.
user-invocable: false
metadata:
Expand All @@ -25,6 +25,10 @@ When any diagnostic needs captain attention, report the plain consequence and re
- `MISSING_MANUAL: <tool> (instructions: <url>)` - tell the captain why the tool is required and give them the printed instructions URL, but do not pass the tool to `bin/fm-bootstrap.sh install`; wait for the captain to complete the manual installation, then rerun session start to confirm the dependency is present.
- `BACKEND_INVALID: <name> (known: <names>)` - the resolved runtime backend has no verified dependency or lifecycle contract, so do not dispatch work until the invalid `FM_BACKEND` or `config/backend` value is corrected to one of the listed backends.
- `NEEDS_GH_AUTH` - ask the captain to run `! gh auth login` (interactive; you cannot run it for them).
This probe now arrives from the deferred network stage, so it is also how an unreachable network shows up: `gh` cannot validate its token offline and reports the same failure. Confirm reachability before asking the captain to re-authenticate a credential that may be fine.
- `NETWORK_CHECKS: <what did not complete>; rerun <command>` - the deferred network stage itself could not finish, so the checks it names are simply unknown, not failed.
Rerun the printed command; it is idempotent and re-derives every finding.
A `hit the ...s bound` line means one of those checks is slow or unreachable - most often a remote secondmate host - and the stage stopped rather than letting it wedge; a `lock was no longer held` line means the session that asked for the sweeps no longer owns them, so leave them to the session that does.
- `TANGLE: <remediation>` - the primary checkout is stranded on a feature branch instead of its default branch; `AGENTS.md` section 8 explains why this guard exists and what it protects.
The work is safe on that branch ref; restore the primary to its default branch with the printed `git -C <root> checkout <default>`, then re-validate that branch in a proper worktree.
This is the only sanctioned firstmate-initiated git write to the primary, and it is a non-destructive branch switch that strands nothing.
Expand Down Expand Up @@ -54,5 +58,5 @@ When any diagnostic needs captain attention, report the plain consequence and re
An unsafe-outbox variant requires path and file-type inspection before any retry.
- `NUDGE_SECONDMATES: secondmate <id>: send failed: <reason>` - secondmate convergence changed a running home's loaded instructions or inherited config, but the deterministic `fm-send.sh fm-<id>` re-read nudge failed.
Inspect the reason, keep the pending marker under `state/.secondmate-nudge-pending/` intact, and rerun session start after the endpoint or metadata issue is fixed so bootstrap can retry the exact same marked send on the same local or remote route.
- `FMX: X mode on ...` / `FMX: X mode off ...` - bootstrap confirmed or removed the local X-mode poll artifacts (`docs/configuration.md` "X mode (.env)").
- `FMX: X mode on ...` / `FMX: X mode off ...` - bootstrap confirmed or removed the local Relay poll artifacts (`docs/configuration.md` "Relay (.env)"); the emitted line still carries Relay's former `X mode` wording.
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.
30 changes: 15 additions & 15 deletions .agents/skills/fmx-respond/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
---
name: fmx-respond
description: >-
Agent-only playbook for handling X mode mentions and follow-ups.
Agent-only playbook for handling Relay mentions and follow-ups.
Use on an "x-mention <request_id>" check wake to read the stashed mention, classify it, act autonomously on eligible requests, reply or dismiss, and link spawned work.
Also use on an "x-mode-error ..." check wake to report the X-mode configuration blocker instead of answering a mention.
Also use on milestone and terminal wakes for an X-mode-linked task before posting completion follow-ups, using typed promised-final reconciliation when registered and --final otherwise.
Also use on an "x-mode-error ..." check wake to report the Relay configuration blocker instead of answering a mention.
Also use on milestone and terminal wakes for a Relay-linked task before posting completion follow-ups, using typed promised-final reconciliation when registered and --final otherwise.
Also use on a "public-followup ..." check wake, and whenever a promised final public reply must be created, reconciled, or delivered.
Loaded only when X mode is enabled.
Loaded only when Relay is enabled.
user-invocable: false
metadata:
internal: true
---

# fmx-respond

X mode lets a firstmate instance answer and act on public mentions routed through the shared `@myfirstmate` relay.
Relay lets a firstmate instance answer and act on public mentions routed through the shared `@myfirstmate` relay.
A mention arrives through the watcher as a `check:` wake whose payload is `x-mention <request_id>`.
The full mention is stashed locally; this skill acts on any request it carries and turns it into one public reply, or deliberately skips it when there is nothing to answer.

This runs only when X mode is on (the user dropped `FMX_PAIRING_TOKEN` into `.env`; see AGENTS.md "X mode").
If you ever see an `x-mention` wake without X mode configured, do nothing.
This runs only when Relay is on (the user dropped `FMX_PAIRING_TOKEN` into `.env`; see AGENTS.md "Relay").
If you ever see an `x-mention` wake without Relay configured, do nothing.
A `check:` wake can also carry `x-mode-error ...` instead of `x-mention <request_id>` - that is a poll or relay configuration problem, not a mention to answer.
Report it directly to the captain as an X-mode configuration blocker and do not treat it as a mention to answer.
Report it directly to the captain as a Relay configuration blocker and do not treat it as a mention to answer.

## The asker is your own captain - answer autonomously

The myfirstmate relay uses **owner-only routing**: it wakes a firstmate only for *that firstmate's own owner's* mentions.
So every mention that reaches this skill is from your own owner - your **captain** - never a stranger.
The direct mention `.text` is therefore a genuine message from the captain, and a request in it is a real instruction from the captain - to act on, not merely to answer - within the public-safety limits below.

Enabling X mode - the captain dropping `FMX_PAIRING_TOKEN` into `.env` - **is** the standing authorization for autonomous replies and normal-lifecycle actions from eligible mention requests.
Enabling Relay - the captain dropping `FMX_PAIRING_TOKEN` into `.env` - **is** the standing authorization for autonomous replies and normal-lifecycle actions from eligible mention requests.
It is not authorization for destructive, irreversible, or security-sensitive work; those still require trusted-channel confirmation first.
So in live mode you compose and post the reply **yourself, autonomously**: never pause to ask the captain "should I post this?", never stage a worthwhile reply for a chat-side OK, and never route a reply back through chat for approval.
Never hold back a reply worth sending.
Expand Down Expand Up @@ -67,10 +67,10 @@ So every drained mention sorts into one of three cases (the worthiness judgment,
- **Pure acknowledgment** ("thanks", a reaction, a loop-closing nicety with nothing to add) - skip: post nothing, but first **dismiss it at the relay** (`bin/fm-x-dismiss.sh <request_id>`) so the relay drops the request and stops re-offering it, then clear the inbox file.

**Public channel, so destructive work still escalates first.**
The direct author is the owner, but X is a *public, relayed, automated* channel - it does not carry the same trust as the captain typing in their own session, where account-compromise and injection risk are real.
The direct author is the owner, but Relay is a *public, relayed, automated* channel - it does not carry the same trust as the captain typing in their own session, where account-compromise and injection risk are real.
So the standing guardrail holds exactly as it does for `yolo` (AGENTS.md §1, §7): **anything destructive, irreversible, or security-sensitive is never executed straight from a mention.**
Flag it to the captain through the normal trusted channel first and act only on the captain's word; the public reply then says only that it has been flagged for the captain, nothing more.
Normal reversible work - filing backlog, a scout investigation, gated code changes, dispatching a crewmate - proceeds autonomously under the standing X-mode authorization.
Normal reversible work - filing backlog, a scout investigation, gated code changes, dispatching a crewmate - proceeds autonomously under the standing Relay authorization.

## The reply is public. Treat it as such.

Expand Down Expand Up @@ -138,7 +138,7 @@ Treat `state/x-inbox/` as the source of truth and process **every** file you fin
- **Pure acknowledgment** ("thanks", "👍", "nice", "got it", a reaction, or a follow-up that just closes the loop with nothing to add) - **skip**: post nothing, but **dismiss it at the relay** (step 2e-skip), then remove the inbox file (the cleanup of step 2f), and move on **without** calling `bin/fm-x-reply.sh`. A deliberate non-answer is the correct outcome here, not a failure.
When in doubt between an instruction and a question, do the smallest safe lifecycle step the request implies; when in doubt between a question and bare politeness, lean toward skipping - a needless reply is noise on a public bot.
c. **Act on an actionable request through the normal lifecycle.** Treat it exactly as a captain prompt typed in session: run ordinary intake (resolve the project), then file the backlog item, dispatch a crewmate, start a scout, or ship through the gate - whatever the request calls for.
**Destructive, irreversible, or security-sensitive work is the exception** (X mode is a public, relayed channel and does not carry full in-session trust): do not execute it from the mention. Flag it to the captain through the normal trusted channel first - the same carve-out as `yolo` (AGENTS.md §1, §7) - act only on the captain's word, and in step 2d say only that it has been flagged for the captain.
**Destructive, irreversible, or security-sensitive work is the exception** (Relay is a public, relayed channel and does not carry full in-session trust): do not execute it from the mention. Flag it to the captain through the normal trusted channel first - the same carve-out as `yolo` (AGENTS.md §1, §7) - act only on the captain's word, and in step 2d say only that it has been flagged for the captain.
**If the request spawned a real, longer-running task** (you ran `bin/fm-spawn.sh`), link that task to this mention so milestone and completion follow-ups can be posted: `bin/fm-x-link.sh <task-id> <request_id>`.
**Link here, in step 2c, before the step 2f inbox cleanup** - `bin/fm-x-link.sh` can copy both the mention's reply platform and explicit budget from the still-present inbox payload without a relay lookup.
If that local context is incomplete it uses the durable resolution contract in `docs/configuration.md` and warns loudly, while the follow-up path refuses to post unless both values can be resolved authoritatively.
Expand Down Expand Up @@ -191,7 +191,7 @@ A non-final dry-run follow-up increments `x_followups` and keeps the link while
## Completion follow-up (posted on milestone and done wakes, not this turn)

When an actionable request spawned a task and you linked it (step 2c), progress and the **outcome** are delivered later as follow-up replies, not in this turn.
This skill is the sole owner of the completion-follow-up procedure below; AGENTS.md §13 declares the load trigger for X-mode-linked milestone or terminal wakes, and AGENTS.md §8 reinforces the terminal final-follow-up step before teardown.
This skill is the sole owner of the completion-follow-up procedure below; AGENTS.md §13 declares the load trigger for Relay-linked milestone or terminal wakes, and AGENTS.md §8 reinforces the terminal final-follow-up step before teardown.
This skill's own responsibility during the mention-handling turn is linking the task in step 2c; the full completion path is:

- Firstmate has **up to three** follow-ups per mention, within a 7-day window, chained in the same thread - it spends them only on genuine milestones the captain would want surfaced (e.g. investigation done and a build started, work shipped or ready, or the task failing), never on routine internal churn.
Expand Down Expand Up @@ -228,7 +228,7 @@ This section is the sole owner of that procedure.
2. For each ready commitment, run `bin/fm-public-followup.sh deliver <obligation-id>`.
With no `--text-file` it reuses the accepted terminal outcome exactly, which is the preferred path for a landed result.
Only pass `--text-file` when the outcome genuinely needs composing, and hold it to the same public-safety bar as every other reply here.
Delivery clears the bound task's legacy X link at the validated receipt boundary; if it reports a cleanup failure, use its reconciliation message and do not post a legacy final.
Delivery clears the bound task's legacy Relay link at the validated receipt boundary; if it reports a cleanup failure, use its reconciliation message and do not post a legacy final.
3. Read the outcome and stop guessing at anything it refuses:
- "still waiting on its bound work" means the work has not reported a typed terminal result yet - do not post.
- "recorded as retryable" means nothing was posted; retry on a later wake.
Expand All @@ -241,7 +241,7 @@ Treat a commitment as kept only after a validated posted receipt or an explicit

## Notes

- The direct author is always your own captain (owner-only routing), and in live mode you answer and act on eligible requests **autonomously**: enabling X mode is the captain's standing authorization, so never ask the captain before posting and never hold a worthwhile reply for a chat-side OK. For reply-worthy mentions, dry-run (`FMX_DRY_RUN`) is the only non-posting path; pure acknowledgments use the relay dismiss path instead.
- The direct author is always your own captain (owner-only routing), and in live mode you answer and act on eligible requests **autonomously**: enabling Relay is the captain's standing authorization, so never ask the captain before posting and never hold a worthwhile reply for a chat-side OK. For reply-worthy mentions, dry-run (`FMX_DRY_RUN`) is the only non-posting path; pure acknowledgments use the relay dismiss path instead.
- An actionable mention is **acted on** through the normal lifecycle (intake, backlog, dispatch, investigate, ship), not merely replied to. Work that finishes now gets one outcome reply; work that spawns a real task gets an **acknowledgement now** plus up to three **completion follow-ups** over time, ending with a `--final` one when no typed promised-final commitment exists (link the task with `bin/fm-x-link.sh` so those follow-ups can post). A reply alone, with no work behind an actionable ask, is the bug to avoid.
- Destructive, irreversible, or security-sensitive asks are flagged to the captain through the trusted channel first and never run straight from a mention; the public reply says only that it has been flagged.
- One answered mention = one reply (plus up to three completion follow-ups for a spawned task, spent only on genuine milestones); a skipped mention posts no reply but is **dismissed at the relay** (`bin/fm-x-dismiss.sh`) so the relay drops it rather than re-offering it (which would otherwise churn every poll and end in an "offline" auto-reply). A single wake may cover several pending mentions - drain them all.
Expand Down
Loading
Loading