fleet-commander AGENTS.md

Repository instructions for Fleet Commander, a Go and React application that manages repositories, agent sessions, tmux terminals, and Git worktrees. They describe how to build, run, test, and install the project.

In plain words
What is it for?
Building the Go command-line program, running its tests, building the React web interface, creating the combined application, and installing it.
Why use it?
They give a coding agent the project-specific commands and conventions needed to work safely in the repository.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/mrbenj/fleet-commander/agents-md
Clone the repo
git clone --depth 1 https://github.com/MrBenJ/fleet-commander

Made for: Codex, OpenCode.

Per session 2,560 This file is loaded in full into every session.
When invoked 2,560 The same file — it is already loaded in full.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.02560 $0.02560
Opus 5 $0.01280 $0.01280
Sonnet 5 $0.00512 $0.00512
Haiku 4.5 $0.00256 $0.00256

Measured 2d ago against content hash 436846a7781d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

fleet-commander AGENTS.md scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

└─> rm -rf cmd/fleet/webdist
AGENTS.md · 236 lines

How it starts

The opening of the file, as written. The whole thing — 236 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

Guidance for AI coding agents working in the Fleet Commander repository.

For Claude-specific conventions, see CLAUDE.md. This file is intended to be self-contained for any agent.


Build & Run

# Build the CLI binary
go build -o fleet ./cmd/fleet/

# Run without building
go run ./cmd/fleet/ <command>

# Install to PATH
go install ./cmd/fleet/

# Run all Go tests
go test ./...

# Run a specific package's tests
go test ./internal/squadron/...

# Build the React SPA only
make build-web

# Build SPA + embed into Go binary + install to PATH
make build-all

The binary must be placed alongside fleet.tmux.conf for the tmux config to be auto-sourced (it looks for the conf file relative to the executable path).

Tech stack: Go 1.21+ (backend), React 18 + TypeScript + Vite (frontend), tmux (session management), git worktrees (isolation).


Data Model

A Fleet represents a managed repository. It stores:

  • RepoPath — absolute path to the repo root
  • ShortName — human-readable alias (defaults to directory basename)
  • Agents — list of Agent structs
  • Fleet metadata is persisted in .fleet/config.json inside the managed repo

An Agent represents one coding agent session:

  • Name — unique identifier (used for tmux session name: fleet-<Name>)
  • Branch — git branch the agent works on
  • WorktreePath — path to the git worktree
  • Driver — which agent CLI drives this session (claude-code, codex, aider, kimi-code, antigravity, generic)
  • StateFile — path to .fleet/states/<Name>.json (used by hooks)
  • Persona — optional built-in personality key
  • FightMode — whether the agent roasts squadron mates

Global index: ~/.fleet/repos.json tracks all registered repos for multi-repo commands like fleet queue --all.


Package Layout

Package Responsibility
cmd/fleet/ Cobra CLI commands, go:embed for the web SPA, main.go entrypoint
internal/fleet/ Fleet/Agent structs, JSON config persistence, Load() / Init()
internal/tmux/ tmux session creation, attachment, killing; session names are fleet-<agent>
internal/monitor/ Agent state detection: hook-based primary, tmux pane-scrape fallback
internal/tui/ Bubble Tea TUI for fleet queue and the hangar terminal overlay
internal/worktree/ Git worktree CRUD: Create, CreateFromExisting, Remove, Move, List, Exists
internal/context/ Shared JSON store (.fleet/context.json) with file locking; channels, logs, agent sections
internal/state/ Atomic read/write of .fleet/states/<agent>.json; IsStale(ttl) helper
internal/hooks/ Inject/remove fleet signal hooks in .claude/settings.json per worktree
internal/driver/ Driver interface + implementations for each supported agent CLI
internal/squadron/ Squadron launch logic, prompt suffix assembly (consensus, merger, fight mode, personas)
internal/hangar/ Web server, REST API, WebSocket hub, terminal proxy, embedded SPA serving
web/ React SPA source. Built to web/dist, copied to cmd/fleet/webdist for embedding

Read the full file on GitHub · 236 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 236 lines · 2,560 tokens per session scan C 436846a7781d

Subscribe to this mod's changes

fleet-commander AGENTS.md is an instructions file published in the GitHub repository MrBenJ/fleet-commander (11 stars, last pushed 1mo ago), licensed MIT. It adds 2,560 tokens to every session, about $0.0128 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,345 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

next.js AGENTS.md

Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens