Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .agents/skills/updatefirstmate/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ This touches only the firstmate repo and its own worktrees, never anything under

2. **Re-read AGENTS.md if your own instructions changed.**
When the updater printed `reread-firstmate: yes`, the tracked instruction surface (`AGENTS.md`, `bin/`, or `.agents/skills/`) just advanced under you.
**Read `AGENTS.md` now** (CLAUDE.md is a real `@AGENTS.md` pointer to it) to refresh your operating instructions before doing anything else, so you are acting on the new instructions rather than the stale ones you were started with.
**Read `AGENTS.md` now** to refresh your operating instructions before doing anything else, so you are acting on the new instructions rather than the stale ones you were started with.
When it printed `reread-firstmate: no`, nothing changed for you - skip the re-read.

3. **Restart every second mate the updater named.**
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -487,13 +487,6 @@ jobs:
- name: Compatibility pointers must stay intact
run: |
set -eu
[ ! -L CLAUDE.md ] || { echo "::error::CLAUDE.md must be a real @AGENTS.md pointer file, not a symlink"; exit 1; }
tmp=$(mktemp)
trap 'rm -f "$tmp"' EXIT
printf '%s\n' \
'<!-- Points Claude at AGENTS.md via import; edit AGENTS.md, not this file. -->' \
'@AGENTS.md' >"$tmp"
cmp -s CLAUDE.md "$tmp" || { echo "::error::CLAUDE.md must be the canonical @AGENTS.md pointer"; exit 1; }
[ "$(readlink .claude/skills)" = "../.agents/skills" ] || { echo "::error::.claude/skills must be a symlink to ../.agents/skills"; exit 1; }
- name: Personal fleet paths must not be tracked
run: |
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Each secondmate has a persistent isolated `FM_HOME`, including its own state, ba
Tracked files hold shared instructions and tooling; `data/` holds durable private fleet records; `state/` holds runtime records and append-only status events; `config/` holds local operating choices; and `projects/` contains clones that are read-only to firstmate except under hard rule 1's concrete captain-approved project operation exception.

```
AGENTS.md this file (CLAUDE.md is a real @AGENTS.md pointer to it)
AGENTS.md this file
CONTRIBUTING.md contributor workflow and repo conventions
README.md public overview and development notes
.github/workflows/ shared CI and PR enforcement, committed
Expand Down
2 changes: 0 additions & 2 deletions CLAUDE.md

This file was deleted.

6 changes: 1 addition & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Coordinate any workflow rollback with its required-check names so a retired chec
## Repo conventions

- This repo is a template for running a firstmate orchestrator agent.
[`AGENTS.md`](AGENTS.md) owns the supervisor contract, role boundary, and bundled firstmate skill triggers; `CLAUDE.md` is a real `@AGENTS.md` pointer to it, and `.claude/skills` is a symlink to `.agents/skills`.
[`AGENTS.md`](AGENTS.md) owns the supervisor contract, role boundary, and bundled firstmate skill triggers, 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/`.
`.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").
`.claude/mods/` holds Claude Code mods, plugins whose behavior lives in one function-hooks module; each is reached through an `.agents/skills/<mod>` symlink because Claude Code adopts project plugins only from `.claude/skills`, carries no `SKILL.md` so every other harness's skill loader ignores that entry, and imports only files physically inside its own folder because Claude Code refuses anything else.
Expand Down Expand Up @@ -114,10 +114,6 @@ bin/fm-test-run.sh --all # deliberate complete regression (optional local full
bin/fm-test-isolation-proof.sh --list # proven portable parallel candidate set
bin/fm-test-isolation-proof.sh --jobs 4 --json /tmp/fm-isolation-proof.json # re-run the portable candidate proof
bin/fm-test-isolation-proof.sh --pool watcher-wake-lock --jobs 4 # re-run an admitted family proof
[ ! -L CLAUDE.md ] && cmp -s CLAUDE.md - <<'EOF'
<!-- Points Claude at AGENTS.md via import; edit AGENTS.md, not this file. -->
@AGENTS.md
EOF
[ "$(readlink .claude/skills)" = "../.agents/skills" ]
tmp=$(mktemp -d) && printf 'done: smoke\n' > "$tmp/smoke.status" && FM_STATE_OVERRIDE="$tmp" FM_SIGNAL_GRACE=1 FM_POLL=1 FM_HEARTBEAT=999999 bin/fm-watch-arm.sh # watcher re-arm smoke test (prints arm status, then an actionable signal)
```
Expand Down
2 changes: 1 addition & 1 deletion bin/fm-brief.sh
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ $ASK_USER_BLOCK
$INBOX_SECTION

# Project memory
If \`AGENTS.md\` or \`CLAUDE.md\` already exists, or if this task produced durable project-intrinsic knowledge, run \`$FM_ROOT/bin/fm-ensure-agents-md.sh .\` in the worktree.
If \`AGENTS.md\` already exists, or if this task produced durable project-intrinsic knowledge, run \`$FM_ROOT/bin/fm-ensure-agents-md.sh .\` in the worktree.
Record only project knowledge useful to almost every future session.
For anything the codebase already shows, prefer a pointer to the authoritative file, command, or doc over copying the detail.
If you touch a project \`AGENTS.md\`, follow \`$FM_ROOT/bin/fm-ensure-agents-md.sh\`'s self-governance contract in the same pass.
Expand Down
2 changes: 1 addition & 1 deletion bin/fm-dod-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ EOF
printf "Your steering inbox is \`%s/%s.inbox\`; this exact path belongs to your current task even when it is outside the worktree or under the supervising firstmate home, so read and acknowledge its messages and do not reject it as another home's state.\n" "$state" "$task_id"
cat <<'EOF'
Never inspect or change any other home's endpoint namespace; this authorization is limited to the exact task paths named by this brief.
When this task works on Firstmate itself, the repository root `AGENTS.md` (also imported by `CLAUDE.md`) is project content and the supervisor contract for the firstmate managing you: follow this brief instead of that supervisor contract.
When this task works on Firstmate itself, the repository root `AGENTS.md` is project content and the supervisor contract for the firstmate managing you: follow this brief instead of that supervisor contract.
Project instructions still govern the work wherever they do not conflict with this worker identity, including `CONTRIBUTING.md` and `firstmate-coding-guidelines` for Firstmate changes.
EOF
}
Expand Down
25 changes: 5 additions & 20 deletions bin/fm-ensure-agents-md.sh
Original file line number Diff line number Diff line change
Expand Up @@ -243,19 +243,10 @@ if [ -e "$AGENTS" ]; then
fi
if [ ! -e "$CLAUDE" ]; then
ensure_maintenance_section
if claude_supports_native_agents_md; then
if [ "$MAINT_INJECTED" -eq 1 ]; then
echo "updated: added ## Maintaining this file to AGENTS.md in $DIR"
else
echo "unchanged: AGENTS.md in $DIR"
fi
if [ "$MAINT_INJECTED" -eq 1 ]; then
echo "updated: added ## Maintaining this file to AGENTS.md in $DIR"
else
install_claude_pointer
if [ "$MAINT_INJECTED" -eq 1 ]; then
echo "updated: added ## Maintaining this file to AGENTS.md and wrote CLAUDE.md @AGENTS.md pointer in $DIR"
else
echo "wrote: CLAUDE.md @AGENTS.md pointer in $DIR"
fi
echo "unchanged: AGENTS.md in $DIR"
fi
exit 0
fi
Expand Down Expand Up @@ -296,18 +287,12 @@ if [ -e "$CLAUDE" ]; then
fi
mv "$CLAUDE" "$AGENTS"
ensure_maintenance_section
install_claude_pointer
echo "promoted: moved CLAUDE.md to AGENTS.md and wrote CLAUDE.md @AGENTS.md pointer in $DIR"
echo "promoted: moved CLAUDE.md to AGENTS.md in $DIR"
exit 0
fi
echo "conflict: CLAUDE.md exists in $DIR but is not a regular file or symlink" >&2
exit 1
fi

write_skeleton
if claude_supports_native_agents_md; then
echo "created: AGENTS.md in $DIR"
else
install_claude_pointer
echo "created: AGENTS.md and CLAUDE.md @AGENTS.md pointer in $DIR"
fi
echo "created: AGENTS.md in $DIR"
2 changes: 1 addition & 1 deletion bin/fm-ff-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ fetch_once() {

# Which watched instruction paths changed between HEAD and BASE (comma list).
# These are the files a running agent actually reads or runs: its instructions
# (AGENTS.md, which CLAUDE.md imports via @AGENTS.md), its agent-loaded skills
# (AGENTS.md), its agent-loaded skills
# (.agents/skills/), and its tooling (bin/). Public skills/ is installer-facing
# and intentionally not part of this watched instruction surface.
changed_instr() {
Expand Down
2 changes: 1 addition & 1 deletion bin/fm-test-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1601,7 +1601,7 @@ families_for_changed_path() {
docs/fm-test-isolation-proof.json)
printf '%s\n' pure-contract-unit
;;
.github/*|.gitattributes|.tasks.toml|AGENTS.md|CLAUDE.md|CONTRIBUTING.md|\
.github/*|.gitattributes|.tasks.toml|AGENTS.md|CONTRIBUTING.md|\
docs/configuration.md|docs/supervision-protocols/*)
printf '%s\n' pure-contract-unit
;;
Expand Down
4 changes: 2 additions & 2 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -411,10 +411,10 @@ The [Relay configuration reference](configuration.md#promised-public-replies-sta

## Project memory belongs to projects

Durable project-intrinsic agent knowledge lives in each project's committed `AGENTS.md`, with `CLAUDE.md` as a real `@AGENTS.md` import pointer.
Durable project-intrinsic agent knowledge lives in each project's committed `AGENTS.md`.
Ship briefs prompt crewmates to create or update those files through the normal delivery path; `data/projects.md` stays a thin private registry.
Each project `AGENTS.md` carries self-governance guidance; [`bin/fm-ensure-agents-md.sh`](../bin/fm-ensure-agents-md.sh) owns the canonical wording and idempotent insertion, while its header and help document the explicit mark for equivalent project-owned guidance.
It refuses a case-variant real memory file such as a lowercase `agents.md`, so the pointer's `@AGENTS.md` import resolves to a real `AGENTS.md` on a case-sensitive filesystem, and surfaces the mismatch for manual reconciliation.
It refuses a case-variant real memory file such as a lowercase `agents.md`, and surfaces the mismatch for manual reconciliation.
The full ownership rule - what is project-intrinsic versus fleet-private, and how firstmate keeps the two apart without writing into project clones - is owned by [`AGENTS.md`](../AGENTS.md) (project and knowledge management).

## Operational memory routing
Expand Down
4 changes: 0 additions & 4 deletions docs/documentation-audiences.json
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,6 @@
"path": "AGENTS.md",
"audience": "agent-runtime"
},
{
"path": "CLAUDE.md",
"audience": "agent-runtime"
},
{
"path": "CONTRIBUTING.md",
"audience": "maintainer-architecture"
Expand Down
2 changes: 1 addition & 1 deletion docs/scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The shared no-mistakes gate refusal for fleet lifecycle entrypoints is summarize
| `fm-herdr-ci-cleanup.sh` | Snapshot and tear down only job-owned `fm-lab-*` sessions in the Herdr CI lane |
| `fm-test-run.sh` | Behavior-test runner: selection, portable lanes, bounded concurrency, budgets, coverage guard, timing/JSON; refuses to execute in the repository primary checkout when `FM_TASK_ID` marks a task worker |
| `fm-test-isolation-proof.sh` | Concurrent isolation harness and portable candidate set owner |
| `fm-ensure-agents-md.sh` | Ensure a project's real `AGENTS.md`, its `CLAUDE.md` `@AGENTS.md` pointer, and self-governance guidance (explicit project mark documented in the helper's header and help) |
| `fm-ensure-agents-md.sh` | Ensure a project's real `AGENTS.md` and self-governance guidance (explicit project mark documented in the helper's header and help) |
| `fm-guard.sh` | Warn on primary-checkout tangles, main-session pending wakes, and unhealthy supervision |
| `fm-primary-scope-lib.sh` | Shared marker-or-plain-checkout primary-home predicate for tracked hooks |
| `fm-session-lock-lib.sh` | Shared session-lock harness identity (ancestry walk and holder liveness) for fm-lock.sh and the Claude Stop auto-arm |
Expand Down
Loading
Loading