Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,6 @@
]
}
]
}
},
"autoCompactEnabled": true
}
2 changes: 1 addition & 1 deletion .pi/extensions/fm-calm.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Firstmate's home-persistent Pi transcript presentation toggle.
//
// Compatibility boundary: Pi 0.81.1 and 0.82.0 expose built-in ToolDefinitions, per-slot
// Compatibility boundary: Pi 0.81.1 through 0.82.1 expose built-in ToolDefinitions, per-slot
// renderers, renderShell: "self", session_start replacement reasons,
// ExtensionUIContext.setToolsExpanded(), setWorkingVisible(), and
// setHiddenThinkingLabel(). The focused tests pin those assumptions. Version-bounded
Expand Down
2 changes: 1 addition & 1 deletion .pi/extensions/lib/fm-calm-operational-user-layout.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Pi 0.81.1 and 0.82.0 add the ordinary-user spacer and row together.
// Pi 0.81.1 through 0.82.1 add the ordinary-user spacer and row together.
// This version-bounded adapter changes only that presentation and never message delivery.
import {
InteractiveMode,
Expand Down
8 changes: 7 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ Use light nautical seasoning only when it fits: the occasional "aye", "on deck",
Keep that seasoning optional and never let it obscure technical content; never use it in commits, briefs, PRs, or anything crewmates or other tools read; drop the playful flavor entirely when delivering bad news or relaying serious findings.
For captain-facing escalation style and outcome phrasing, see section 9.

Voice is opted in for this home and carries the interaction, not chat text (captain's explicit preference, 2026-07-19, reinforced 2026-07-20 with "I need to hear you or else I won't use you that much" - take that at face value, this is a retention-critical preference, not a nice-to-have): the captain should know what's going on from the spoken line alone, and only read chat for detail, a reminder, or a reference.
Run Alfred's global NATIVE-mode voice protocol (`~/.claude/CLAUDE.md`, acknowledge / update / conclude) on every response even while operating as first mate. Bias toward speaking: fire a spoken line, written like a standalone CONCLUDE (self-sufficient, no "read the text for context"), on every turn that carries any real content - a wake handled, a PR opened, a merge landed, a worker dispatched or blocked, a decision surfaced, a finding, a plan, an answer to a question. Only skip the voice call on a genuinely contentless re-arm cycle (an idle-pane flag with zero news, back to back with the last one) - when in doubt, speak.
Every spoken line still passes through this file's own rules first: address the captain as above, and translate through section 9's outcome language before speaking it, exactly as if it were chat text.
Never speak an internal term section 9 would forbid in chat.

## 1. Identity and prime directives

You are the captain's only point of contact for all software work across all of their projects.
Expand All @@ -37,7 +42,7 @@ Hard rules, in priority order:
If work failed, say so plainly with the evidence.

You may maintain this repo's private operational state directly.
Shared tracked material is `AGENTS.md`, `README.md`, `CONTRIBUTING.md`, `.tasks.toml`, `.github/workflows/`, `bin/`, `.agents/skills/`, and public `skills/`.
Shared tracked material is `AGENTS.md`, `README.md`, `CONTRIBUTING.md`, `.tasks.toml`, `.github/workflows/`, `bin/`, `.agents/skills/`, `evals/`, and public `skills/`.
When any crewmate is live, delegate changes to shared tracked material rather than competing with supervision; when the fleet is empty, firstmate may change it directly.
This repo is a shared template, while `.env`, `data/`, `state/`, `config/`, `projects/`, and `.no-mistakes/` are captain-private and gitignored.
Ship shared tracked changes through this repo's no-mistakes pipeline and PR path, with the same merge authority as any other project.
Expand All @@ -62,6 +67,7 @@ README.md public overview and development notes
.claude/skills symlink to .agents/skills for claude compatibility
skills/ standalone public installer-facing skills, committed; not loaded by firstmate
bin/ helper scripts, committed; read each script's header before first use
evals/ shared crewmate self-grading checks, committed; ported from the Modern AI Productivity Pack (resources/modern-ai-productivity-pack/03-evals/ in the command-center repo); see evals/README.md; run_eval.sh works standalone and bin/fm-brief.sh's ship-mode scaffold wires the relevant eval(s) into the generated Definition of done
.env optional X-mode pairing token; LOCAL, gitignored; presence-gates section 14
config/crew-harness crewmate harness override; LOCAL, gitignored; absent or "default" = same as firstmate. Inherited as the literal file: a concrete primary adapter value also controls a secondmate home's own crewmates (section 4)
config/crew-dispatch.json optional crewmate dispatch profiles; LOCAL, gitignored; firstmate-maintained but human-editable natural-language rules that choose a per-task harness/model/effort profile (section 4). Inherited by secondmate homes
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ See the [no-mistakes quick start](https://kunchenguid.github.io/no-mistakes/star

- This repo is a template for running a firstmate orchestrator agent.
`AGENTS.md` is the agent's main job description and names when to load bundled firstmate skills; `CLAUDE.md` is a symlink to it, and `.claude/skills` is a symlink to `.agents/skills`.
- Only shared material is tracked: `AGENTS.md`, `README.md`, `CONTRIBUTING.md`, `.tasks.toml`, `.github/workflows/`, `bin/`, `.agents/skills/`, and `skills/`.
- Only shared material is tracked: `AGENTS.md`, `README.md`, `CONTRIBUTING.md`, `.tasks.toml`, `.github/workflows/`, `bin/`, `.agents/skills/`, `evals/`, and `skills/`.
`.agents/skills/` holds agent-loaded skills that assume a live firstmate home and carry `metadata.internal: true` so installers such as [skills.sh](https://skills.sh) hide them from discovery; `skills/` holds standalone, installer-facing public skills with no firstmate dependency (see the README's "Two-tier skill layout").
Everything personal to one captain's fleet (`.env`, `data/`, `state/`, `config/`, `projects/`, `.no-mistakes/`) is gitignored; never commit it.
The root `.tasks.toml` is tracked `tasks-axi` config for `data/backlog.md`; compatible `tasks-axi` is the default backend for routine backlog mutations, with the compatibility definition owned by [`docs/configuration.md`](docs/configuration.md) ("Backlog backend").
Expand All @@ -56,7 +56,7 @@ See the [no-mistakes quick start](https://kunchenguid.github.io/no-mistakes/star

## Development

Tracked changes to firstmate itself - `AGENTS.md`, `README.md`, `CONTRIBUTING.md`, `.tasks.toml`, `.github/workflows/`, `bin/`, `.agents/skills/`, and `skills/` - ship through the `no-mistakes` pipeline on a feature branch and require an explicit merge approval.
Tracked changes to firstmate itself - `AGENTS.md`, `README.md`, `CONTRIBUTING.md`, `.tasks.toml`, `.github/workflows/`, `bin/`, `.agents/skills/`, `evals/`, and `skills/` - ship through the `no-mistakes` pipeline on a feature branch and require an explicit merge approval.
Before making any such change, load the agent-only `firstmate-coding-guidelines` skill (`.agents/skills/firstmate-coding-guidelines/SKILL.md`).
It has the knowledge-placement rules that keep `AGENTS.md` from regrowing after each diet pass.
There is no reliable way for `bin/fm-brief.sh`'s scaffold to detect that a task's repo is firstmate itself, so firstmate adds this skill's load line to firstmate-repo briefs by hand.
Expand Down
45 changes: 45 additions & 0 deletions Plans/bubbly-stargazing-quilt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Merge firstmate's operating discipline into Alfred (global)

## Status: COMPLETE (verified 2026-07-27)

All four items shipped, confirmed by directly reading the live files rather than trusting memory:
- `~/.claude/SOUL.md` #9 — captain-facing translation rule, broadened to cover both delegated work and Alfred's own tool use.
- `~/.claude/SOUL.md` #10 — "Investigation is evidence, not authorization" (diagnostic-reasoning discipline).
- `~/.claude/SOUL.md` #11 — "Never let an open decision go silent" (decision-hold-lifecycle).
- `~/.claude/CLAUDE.md` — "KNOWLEDGE-PLACEMENT DISCIPLINE" rule, correctly cross-referencing SOUL.md rather than duplicating the behavioral commitments.

## Context

Brandon has been running this session with me acting *as* firstmate — a separate persona/repo (`ops/firstmate/`, loaded from its own `AGENTS.md`) that orchestrates a fleet of crewmate agents with heavy operational discipline: supervision loops, receipt-on-done rigor, plain-language escalation, project-write boundaries, decision tracking. He liked how that discipline felt and wants Alfred — his always-on assistant across every project — to run with "all of firstmate's best and most vital systems and logic," permanently, not just inside this repo.

I read Alfred's actual global files (`~/.claude/IDENTITY.md`, `SOUL.md`, `USER.md`) to see what's already there before proposing changes. Finding: **a lot of firstmate's discipline is already ported.** Command-center's project `CLAUDE.md` already has "DEFINITION OF DONE — TWO GATES" (Schema-First + Receipt-on-Done, mirroring firstmate's Ground-Truth-Contract), "NO BLIND TURN-END" (mirrors firstmate's "no turn ends blind while work is under way"), full git safety rules, and a structured memory system (mirrors firstmate's `learnings.md`/`captain.md`/`captain-shared.md`). SOUL.md commitment #9 ("Report delegated work in outcomes and decisions, never in watcher/queue/task-id mechanics") is already a condensed version of firstmate's section 9 translation contract.

So this isn't a wholesale import — it's identifying the **genuine gaps**: firstmate discipline that is *not yet* codified anywhere in Alfred's global behavior, cleanly portable (doesn't depend on firstmate's fleet-specific infrastructure — worktrees, herdr/treehouse backends, tasks-axi, crewmate spawn/supervise loop, which have no equivalent surface for Alfred and shouldn't be cargo-culted in without the underlying tech).

## What NOT to port (and why)

- Crew/task lifecycle mechanics (`fm-spawn.sh`, worktree isolation, herdr/treehouse backends, tasks-axi backlog) — this is fleet-orchestration tooling. Alfred's closest equivalent is the `Agent`/`Workflow` tools, which already have their own dispatch/verification conventions (see the Agent tool's "Trust but verify" guidance already in Alfred's system prompt).
- The full "captain etiquette" jargon-translation table verbatim — firstmate's list translates firstmate-specific terms (worktree, herdr, tasks-axi). Alfred needs the *principle*, not that literal table.
- Watcher/supervision loop (`fm-watch-arm.sh`) — this exists because firstmate runs a fleet with async background completion the primary session must not miss. Alfred's analogous risk is background `Agent`/`Workflow` dispatch, and command-center's CLAUDE.md **already** has "NO BLIND TURN-END" covering exactly this. No new mechanism needed.

## What to actually add (the real gaps)

1. **Diagnostic-reasoning discipline** — firstmate's rule that a scout/investigation/audit finding is evidence, never authorization to implement; a separate go-ahead is required before code changes. Alfred's global files have nothing like this today — worth a short, universal addition since Alfred routinely produces analyses/audits across every project.

2. **Decision-hold-lifecycle** — firstmate never lets an unresolved decision discovered mid-task quietly vanish; it's recorded and tracked to resolution. Alfred has no equivalent principle stated anywhere. Worth adding as a short universal rule: any open question/decision surfaced mid-task gets explicitly named to Brandon before the task is considered done, not buried in a wall of text or silently dropped.

3. **Sharpen the captain-facing translation contract** — SOUL.md commitment #9 already exists but is narrowly scoped to "delegated work." Broaden it into a general rule: never surface tool/infra mechanics (background task IDs, internal hook names, raw file paths unless needed to act) in conversation with Brandon — always translate to outcome + consequence + next decision. This is the one piece of firstmate's section 9 genuinely worth generalizing.

4. **Knowledge-placement discipline for Alfred's own memory system** — firstmate's `firstmate-coding-guidelines` skill has a real, useful meta-system: a decision tree for where a new fact belongs (inline in the always-loaded file vs. a skill vs. docs vs. script help), plus a "one-owner rule" (state a contract once, cross-reference everywhere else, never duplicate). Alfred's own auto-memory system (described in this session's system prompt) doesn't yet state this discipline explicitly. Worth adding as a short principle so Alfred's memory files stay lean as they accumulate, instead of the CLAUDE.md-bloat problem firstmate had to fix.

## Files to change

- **`~/.claude/SOUL.md`** — extend commitment #9 into the broader translation-contract rule (item 3); add diagnostic-reasoning (item 1) and decision-hold (item 2) as new short commitments (10, 11, 12).
- **`~/.claude/CLAUDE.md`** — add a short "Knowledge placement discipline" note near the memory-system instructions (item 4), pointing back to SOUL.md for the behavioral commitments so the rule isn't duplicated in two places (practicing the one-owner rule while adding it).

Each addition will be **short** (2-4 lines, matching the existing terse style of SOUL.md's numbered commitments) — not a copy of firstmate's much longer prose, since Alfred's files are deliberately compact and firstmate's own discipline says don't bloat the always-loaded file.

## Verification

- Read back the edited `SOUL.md` and `CLAUDE.md` in full to confirm the new commitments read naturally alongside existing ones, use Alfred's existing voice/style, and don't duplicate content already covered by "DEFINITION OF DONE — TWO GATES" / "NO BLIND TURN-END" in command-center's project CLAUDE.md.
- No code changes, no repo behavior changes — this is a persona/instruction-file edit only, so "testing" means confirming the files parse as clean markdown and the numbering/cross-references are consistent.
4 changes: 2 additions & 2 deletions bin/backends/herdr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2333,8 +2333,8 @@ fm_backend_herdr_events_capable() { # <session>
case "$protocol" in ''|*[!0-9]*) return 1 ;; esac
[ "$protocol" -ge "$FM_BACKEND_HERDR_MIN_EVENTS_PROTOCOL" ] || return 1
schema=$(herdr api schema --json 2>/dev/null) || return 1
printf '%s' "$schema" | grep -Fq 'events.subscribe' || return 1
printf '%s' "$schema" | grep -Fq 'pane.agent_status_changed' || return 1
case "$schema" in *events.subscribe*) ;; *) return 1 ;; esac
case "$schema" in *pane.agent_status_changed*) ;; *) return 1 ;; esac
return 0
}

Expand Down
11 changes: 11 additions & 0 deletions bin/fm-brief.sh
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,14 @@ read -r MODE _ <<EOF
$("$FM_ROOT/bin/fm-project-mode.sh" "$REPO")
EOF

RUN_EVAL=$(shell_quote "$FM_ROOT/evals/run_eval.sh")
IFS= read -r -d '' EVAL_STEP <<EOF || true
Before reporting done, run the relevant eval(s) against your deliverable, e.g. \`$RUN_EVAL completeness <path>\`.
\`completeness\` applies to every task before Done; add \`tov\` for anything written in Brandon's voice, \`principles\` for a plan/research/recommendation deliverable, \`visual-asset\` for generated imagery, and \`publish-safety\` (last) for anything customer-facing or public.
A FAIL means loop and fix - never report done anyway.
EOF
EVAL_STEP=${EVAL_STEP%$'\n'}

case "$MODE" in
direct-PR)
SETUP2=""
Expand All @@ -289,6 +297,7 @@ case "$MODE" in
# Definition of done
This project ships **direct-PR**: you raise the PR yourself, without the no-mistakes pipeline.
The task is complete only when committed on your branch.
$EVAL_STEP
When it is implemented and committed, push your branch and open a PR with \`gh-axi\`, then append \`done: PR {url}\` to the status file and stop.
Do NOT run /no-mistakes. The configured merge authority decides whether to merge the PR; firstmate relays the outcome.
EOF
Expand All @@ -301,6 +310,7 @@ EOF
This project ships **local-only**: no remote, no PR, no pipeline.
The task is complete only when committed on your branch \`fm/$ID\`. Do NOT push, do NOT open a PR, do NOT merge.
Keep your branch a clean fast-forward onto the current default branch - if \`main\` has advanced, rebase onto it so the eventual merge stays a fast-forward.
$EVAL_STEP
When it is implemented and committed, append \`done: ready in branch fm/$ID\` to the status file and stop.
The configured merge authority approves the ready branch, then firstmate merges it into local \`main\` through the guarded fast-forward path.
EOF
Expand All @@ -312,6 +322,7 @@ EOF
IFS= read -r -d '' DOD <<EOF || true
# Definition of done
The task is complete only when committed on your branch.
$EVAL_STEP
When you believe it is complete, append \`done: {summary}\` to the status file and stop.
Firstmate will then instruct you to run /no-mistakes to validate and ship a PR.

Expand Down
Loading