Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
48fa676
fix: hash_pane() md5 fallback chain for restricted PATH on macOS
trillium Jul 12, 2026
8b7b3cd
feat: herdr->firstmate spur bridge prototype
trillium Jul 15, 2026
a8b99f2
feat: fm-groom proactive ideas-store work generator
trillium Jul 15, 2026
1e917ec
feat(review-page): render review-store items to visitable Pulse pages
trillium Jul 15, 2026
8c8d912
test(review-page): hermetic behavior tests for fm-review-page
trillium Jul 15, 2026
527a5d3
fix(review-page): eliminate code-span placeholder leak in markdown re…
trillium Jul 15, 2026
61532ff
Add fm-idea-mine.ts: mine chat history for uncaptured ideas, re-evalu…
trillium Jul 15, 2026
a9616b5
fm-idea-mine: pass generous --timeout to default Inference.ts cmd for…
trillium Jul 15, 2026
92e52e6
Add hermetic tests for fm-idea-mine: generate/evaluate/file, dedup, d…
trillium Jul 15, 2026
bdee128
fm-review-decision.sh: route a captain's review decision to firstmate
trillium Jul 15, 2026
61b1ea2
fm-review-page: interactive decision panel + single top bar
trillium Jul 15, 2026
8fc743f
wip: local firstmate customizations snapshot before upstream merge
trillium Jul 20, 2026
ee07a2e
Add fm-isolated-launch.sh for HOME-isolated claude sessions
trillium Jul 27, 2026
3429e03
Document fm-isolated-launch.sh in README
trillium Jul 27, 2026
b0cdd76
fm-isolated-launch: mirror cwd outside $HOME tree, seed keychain cred…
trillium Jul 27, 2026
041bbb3
fm-isolated-launch: force bypass-permissions mode, matching crewmate …
trillium Jul 27, 2026
deb22ed
fm-isolated-launch: symlink real data/ for federated bd store access
trillium Jul 27, 2026
c905f60
feat(bin): beads dispatch lifecycle via spawn/brief hook extension po…
trillium Jul 28, 2026
90407ee
no-mistakes(review): Fix bead-close detection false positives, align …
trillium Jul 28, 2026
52e35e3
no-mistakes(document): Sync docs/AGENTS.md with beads dispatch hook f…
trillium Jul 28, 2026
1aecf54
Add per-account Claude Code launcher and fm-spawn --account flag
trillium Jul 28, 2026
768e473
feat(skills): add herdr-navigation internal skill; gitignore CHANGELO…
trillium Jul 28, 2026
c9e8dd9
Add night-ops-directive and coderabbit-pr-gate skills
trillium Jul 31, 2026
3e33d78
Merge origin/main into fm/night-ops-directive-skill: resolve conflicts
trillium Aug 1, 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
56 changes: 56 additions & 0 deletions .agents/skills/coderabbit-pr-gate/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
name: coderabbit-pr-gate
description: >-
Agent-only policy for reacting to CodeRabbit's PR review advice, beyond a bare pass/fail
check, and for handling CodeRabbit's rate-limiting without treating it as review failure.
Load before treating a public registered repo's PR as ready to merge or teardown when
CodeRabbit is enabled on it, and whenever a CodeRabbit review comment or rate-limit response
needs a reaction.
user-invocable: false
metadata:
internal: true
---

# CodeRabbit review-gate routine

This skill applies to every public registered repo with CodeRabbit enabled. It covers reacting
to CodeRabbit's actual review content, not just whether its check reports pass or fail.

## Policy

A green CodeRabbit check is necessary but not sufficient: CodeRabbit can pass a PR while still
leaving actionable suggestion comments (bugs, security notes, missed edge cases) that a bare
status check does not surface. Before treating a PR as merge-ready on a CodeRabbit-enabled repo:

1. Read CodeRabbit's review comments on the PR (via `gh-axi`), not just its check conclusion.
2. Classify each comment: a genuine actionable finding (correctness, security, a real bug) versus
style-only or already-addressed noise.
3. Route actionable findings the same way any other review finding is routed under section 7 and
`ask-user-authority`: a routine, reversible fix within accepted task criteria is autonomous
under `yolo`; anything that would expand scope, or is destructive, irreversible, or
security-sensitive, escalates to the captain as a decision rather than being silently applied
or silently ignored.
4. Do not merge past an unresolved actionable CodeRabbit finding without either fixing it or
getting an explicit captain or `yolo`-authorized decision to proceed anyway.
Comment on lines +33 to +34

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Constrain the yolo exception to the documented authority boundary.

Lines 29-32 require captain escalation for security-sensitive actions. Line 34 also permits a yolo-authorized merge past an unresolved actionable finding without repeating the routine, reversible, and in-scope conditions. This can bypass the security-sensitive escalation rule.

Limit the exception to a standing yolo posture for a routine, reversible merge within accepted task criteria.

Based on the PR objective, reversibility is the yolo qualification for routine gates, including PR merges.

Proposed policy change
-4. Do not merge past an unresolved actionable CodeRabbit finding without either fixing it or
-   getting an explicit captain or `yolo`-authorized decision to proceed anyway.
+4. Do not merge past an unresolved actionable CodeRabbit finding without either fixing it,
+   getting explicit captain approval, or using a standing `yolo` posture that qualifies the
+   merge as routine, reversible, and within accepted task criteria. `yolo` does not override
+   captain escalation for security-sensitive findings.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
4. Do not merge past an unresolved actionable CodeRabbit finding without either fixing it or
getting an explicit captain or `yolo`-authorized decision to proceed anyway.
4. Do not merge past an unresolved actionable CodeRabbit finding without either fixing it,
getting explicit captain approval, or using a standing `yolo` posture that qualifies the
merge as routine, reversible, and within accepted task criteria. `yolo` does not override
captain escalation for security-sensitive findings.
🧰 Tools
🪛 SkillSpector (2.4.4)

[info] 30: [EA3] Scope Creep: Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Remediation: Limit the skill's scope to its documented purpose. Remove instructions that enable the agent to perform actions outside its stated functionality.

(Excessive Agency (EA3))

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.agents/skills/coderabbit-pr-gate/SKILL.md around lines 33 - 34, Revise the
unresolved actionable CodeRabbit finding rule so the `yolo` exception applies
only to a standing `yolo` posture for routine, reversible merges within accepted
task criteria. Preserve the requirement for captain escalation on
security-sensitive actions, preventing this exception from bypassing that
authority boundary.


## Rate-limit handling

CodeRabbit rate-limits review requests on busy repos or accounts. A rate-limited or
not-yet-reviewed state is not a failure and not silence to route around:

- Treat a CodeRabbit rate-limit or pending-review response as a `paused:`-class external wait
(section 8's distinction between `paused:` and `blocked:`), not a `blocked:` or `failed:` one.
- Re-check on a bounded backoff rather than polling tightly or repeatedly re-requesting a review,
which extends the rate limit; let the watcher's own wake cadence carry the recheck instead of
arming a dedicated poll loop for it.
- If CodeRabbit still has not produced a review after a reasonable number of backoff cycles,
do not block merge readiness on it indefinitely - report the stalled review to the captain as
evidence rather than silently merging without it or silently waiting forever.
- Never spam re-requests at CodeRabbit to work around a rate limit; that worsens the limit for
every repo sharing the account.

## Scope

Applies to every public registered repo, including non-owned repos dispatched to via a fork
(see `AGENTS.md` section 7 and `night-ops-directive`). A private or `local-only` project without
CodeRabbit enabled is unaffected; this routine only activates where CodeRabbit review is live.
91 changes: 91 additions & 0 deletions .agents/skills/herdr-navigation/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
name: herdr-navigation
description: Herdr workspace navigation for agents — how to find your own pane, open panes in a direction, and read or send to other panes.
user-invocable: false
metadata:
internal: true
---

# herdr-navigation

You are running inside a herdr pane. Your pane ID is in the environment as `$HERDR_PANE_ID`. This skill covers how to navigate, open new panes, and interact with neighboring panes.

## Your own position

```bash
# Who am I?
herdr pane current --current

# Get full layout context (your position in the workspace grid)
herdr pane layout --current
```

Your pane ID is also available as `$HERDR_PANE_ID` (injected by fm-spawn). Use either.

## Open a pane relative to yourself

```bash
# Split to the right (new pane appears to your right)
herdr pane split --current --direction right

# Split below (new pane appears below you)
herdr pane split --current --direction down

# Split with a specific command running in the new pane
herdr pane split --current --direction right --cwd "$PWD"

# Split and focus the new pane
herdr pane split --current --direction right --focus
```

## Find neighboring panes

```bash
# What's to my right?
herdr pane neighbor --direction right --current

# What's below me?
herdr pane neighbor --direction down --current

# What's to my left?
herdr pane neighbor --direction left --current
```

`neighbor` returns the neighbor's pane ID if one exists, or an error if the edge is empty.

## Read another pane's content

```bash
# Read the last 20 lines of a neighboring pane
NEIGHBOR=$(herdr pane neighbor --direction right --current --json | jq -r '.pane_id')
herdr pane read "$NEIGHBOR" --lines 20
```

## Send text or keys to another pane

```bash
# Send a command to run in a neighboring pane
herdr pane send-text "$NEIGHBOR" "echo hello"

# Send a key sequence
herdr pane send-keys "$NEIGHBOR" Enter
```

## List all panes in your workspace

```bash
herdr pane list --workspace "$HERDR_WORKSPACE_ID"
```

## Move yourself to a new tab

```bash
# Move this pane to a new tab (opens it as the only pane in a fresh tab)
herdr pane move "$HERDR_PANE_ID" --new-tab --label "my-work"
```

## Rules

- Always use `--current` (or `$HERDR_PANE_ID`) rather than hardcoding a pane ID — your ID is stable for your session but not across respawns.
- `herdr pane split` creates a NEW shell in the new pane; the new pane is empty until you send it commands or run it with `--cwd`.
- If `herdr` is not on PATH, check `~/.local/bin/herdr` or ask firstmate.
66 changes: 66 additions & 0 deletions .agents/skills/night-ops-directive/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
name: night-ops-directive
description: >-
Agent-only policy for a captain-authorized autonomous work session across a federated task
store or backlog with no captain present to answer routine questions.
Load when the captain authorizes autonomous, unattended, or overnight work across a backlog
or federated task store, or when reconciling that a standing autonomous-dispatch directive
is still active.
user-invocable: false
metadata:
internal: true
---

# Autonomous overnight dispatch

This skill is the standing policy for a captain-authorized stretch of unattended work: work
through a federated task store or backlog without pausing for questions that section 7's
`yolo` authority already answers, and without collapsing into hands-on implementation.

## Standing directive

- Firstmate stays a delegator for the whole session, including overnight: read state, decide
routing, write briefs, spawn crewmates, supervise, and report; do not personally hand-edit
project files, grind through binary or database debugging, or `git diff` a project clone to
do a crewmate's job. If a bounded, low-risk edit to firstmate's own shared tracked material
is genuinely faster to author directly than to brief, treat that as the exception, not the norm.
Comment on lines +22 to +26

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Restrict direct edits to shared firstmate material.

The exception allows firstmate to edit shared tracked material whenever a direct edit is faster. It does not require an empty fleet or firstmate-coding-guidelines. It can include policy, skill, hook, and launcher files that enforce unattended-session safety. Add the fleet-empty guard, require the guidance skill for ship tasks, and delegate otherwise.

Proposed wording
-  If a bounded, low-risk edit to firstmate's own shared tracked material
-  is genuinely faster to author directly than to brief, treat that as the
-  exception, not the norm.
+  Direct edits to firstmate's shared tracked material are allowed only when
+  the fleet is empty. For a ship task that touches this material, load
+  `firstmate-coding-guidelines` before editing; otherwise delegate the change
+  to a crewmate.

As per coding guidelines, direct edits require an empty fleet, and ship tasks require firstmate-coding-guidelines before editing.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- Firstmate stays a delegator for the whole session, including overnight: read state, decide
routing, write briefs, spawn crewmates, supervise, and report; do not personally hand-edit
project files, grind through binary or database debugging, or `git diff` a project clone to
do a crewmate's job. If a bounded, low-risk edit to firstmate's own shared tracked material
is genuinely faster to author directly than to brief, treat that as the exception, not the norm.
- Firstmate stays a delegator for the whole session, including overnight: read state, decide
routing, write briefs, spawn crewmates, supervise, and report; do not personally hand-edit
project files, grind through binary or database debugging, or `git diff` a project clone to
do a crewmate's job. Direct edits to firstmate's shared tracked material are allowed only when
the fleet is empty. For a ship task that touches this material, load
`firstmate-coding-guidelines` before editing; otherwise delegate the change
to a crewmate.
🧰 Tools
🪛 SkillSpector (2.4.4)

[error] 14: [RA1] Self-Modification: Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Remediation: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime.

(Rogue Agent (RA1))

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.agents/skills/night-ops-directive/SKILL.md around lines 22 - 26, Update the
direct-edit exception in the Firstmate delegation policy to require an empty
fleet and the firstmate-coding-guidelines skill for ship tasks before editing
shared tracked material. Preserve delegation as the default, including for
policy, skill, hook, and launcher files, and allow direct edits only when these
conditions are satisfied and the change is bounded and low risk.

Source: Coding guidelines

- Prefer stacked PRs for multi-step work over delaying a wave of dispatch; do not hold otherwise
ready work waiting for an unrelated PR to land unless section 7's serialization test is met.
- Firstmate owns its own wake cadence for this directive. `ScheduleWakeup` and `CronCreate` are
blocked for the primary session by `bin/fm-subagent-pretool-check.sh`; do not attempt either.
The watcher heartbeat (`bin/fm-watch.sh`, `FM_HEARTBEAT` default 600s, doubling per idle
heartbeat up to `FM_HEARTBEAT_MAX` default 7200s, resetting on any actionable wake) is the
durable wake mechanism and needs no separate timer.
- Infra and migration work discovered in the task store is in scope for this directive; do not
gate it away as out-of-scope by default.
- On a project whose default branch is not captain-writable, push and open the PR from the
captain's own fork per section 7; never push a branch to the upstream owner's remote.
- Pace dispatch waves against CI and review-bot rate limits (see `coderabbit-pr-gate` for the
CodeRabbit-specific reaction routine) rather than firing every ready item at once.

## Yolo scope for this directive

Section 7's `yolo` redefinition applies: the qualifying test for a routine `yolo`-covered gate,
including a PR merge, is reversibility - can it be undone if it turns out wrong. This directive
does not expand `yolo` past section 7's boundaries: destructive, irreversible, and
security-sensitive choices remain captain-only regardless of how autonomous the session is.

## Human-only task triage and the promotion path

A federated task-store item that names a physical, financial, credential, interpersonal, or
otherwise non-code action is not crewmate work. Route it to a dedicated human-tasks-only
federated store rather than leaving it mixed into the code-mappable backlog or attempting to
work it. Move a qualifying item with `bd transfer <id> <human-tasks-store>` (not `bd promote`,
which only promotes a wisp to a permanent bead within the same store); `bd transfer` closes the
source row with a pointer to the destination, creates the new row in the destination store, and
links the two with a `supersedes` edge so the move stays queryable from either side.

If the destination human-tasks store is not yet functional, do not hand-debug its provisioning
personally beyond one bounded verification attempt; file the blocker as a backlog item and keep
triaging code-mappable work through the normal task lifecycle instead.

## Session-boundary notes

This directive persists across restarts because it lives in tracked `AGENTS.md` and this skill,
not in conversation memory. A restart mid-directive is a non-event: reconcile fleet state per
section 5 and resume dispatch, it does not require the captain to re-issue the directive.
9 changes: 9 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
"command": "\"$CLAUDE_PROJECT_DIR\"/bin/fm-sessionstart-nudge.sh"
}
]
},
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "bd prime --hook-json"
}
]
}
],
"PreToolUse": [
Expand Down
45 changes: 45 additions & 0 deletions .codex/hooks.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@
"timeout": 10
}
]
},
{
"matcher": "startup|resume|clear",
"hooks": [
{
"type": "command",
"command": "bd codex-hook SessionStart",
"statusMessage": "Loading Beads context"
}
]
}
],
"PreToolUse": [
Expand All @@ -28,6 +38,41 @@
]
}
],
"PreCompact": [
{
"matcher": "manual|auto",
"hooks": [
{
"type": "command",
"command": "bd codex-hook PreCompact",
"statusMessage": "Checking Beads context"
}
]
}
],
"PostCompact": [
{
"matcher": "manual|auto",
"hooks": [
{
"type": "command",
"command": "bd codex-hook PostCompact",
"statusMessage": "Scheduling Beads context refresh"
}
]
}
],
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "bd codex-hook UserPromptSubmit",
"statusMessage": "Refreshing Beads context"
}
]
}
],
"Stop": [
{
"hooks": [
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ data/
.no-mistakes/
.lavish/
.fm-secondmate-home
.fm-isolated-home
.DS_Store
__pycache__/
*.pyc
.env
config/
CHANGELOG.md
Loading
Loading