Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
e595ad1
plan: install UX, bug fixes, and docs sprint
Apr 16, 2026
f34aa79
chore: make package.json description provider-agnostic
Apr 16, 2026
69880c1
review: add fleet-rev plan review — APPROVED
Apr 16, 2026
a766b4e
plan: add #142 install --help executes install to Phase 2
Apr 16, 2026
c33c367
review: fleet-rev plan re-review — APPROVED with 2 doer NOTEs
Apr 16, 2026
8f4ecc2
review: re-review Task 2.3 (#142) addition — APPROVED
Apr 16, 2026
60d89ca
fix(#115): throw on unknown LLM provider + verify Codex TOML validity…
Apr 16, 2026
97a4830
fix(#39): clear statusline + state when last member is removed [1.2]
Apr 16, 2026
06cfa61
chore: mark Task 1.1 done in progress.json
Apr 16, 2026
2eeb727
fix(#108): use claude -c for resume instead of --resume <id> [1.3]
Apr 16, 2026
d5037dd
chore: mark Task 1.3 done in progress.json
Apr 16, 2026
a50182f
chore: mark VERIFY 1 passed (Phase 1 complete)
Apr 16, 2026
168b87b
feat(#139): --skill default = all, add none/--no-skill [2.1]
Apr 16, 2026
b96139a
feat(#96): --force flag + busy-server prompt + unknown flag rejection…
Apr 16, 2026
10d8840
chore: mark Task 2.1 done in progress.json
Apr 16, 2026
221de49
feat(#96): --force flag + busy prompt [2.2]
Apr 16, 2026
f6f74be
feat(#142): --help/-h guard in install command [2.3]
Apr 16, 2026
a37ba08
chore: mark Phase 2 tasks done + VERIFY 2 passed in progress.json
Apr 16, 2026
30e8405
review(phase1): Phase 1 code review — APPROVED (Tasks 1.1–1.3)
Apr 16, 2026
06677a0
docs(#134): llms.txt + scripts/gen-llms-full.mjs + CI regeneration
Apr 16, 2026
8e0e96e
docs(#140): add 'For AI agents' section to CONTRIBUTING.md
Apr 16, 2026
7164c78
docs(#136): update install section for --skill all default
Apr 16, 2026
162a2bd
chore: mark Phase 3 tasks done + VERIFY 3 passed in progress.json
Apr 16, 2026
be372f2
chore: mark VERIFY FINAL passed — sprint complete
Apr 16, 2026
8849ad1
cleanup: remove fleet control files
Apr 16, 2026
90c3a81
fix(#99): restore AGENTS.md + CLAUDE.md; fix cleanup to not remove tr…
Apr 16, 2026
1a44aca
review(phases2-3): Phase 2 and Phase 3 code review
Apr 17, 2026
02b4ec1
cleanup: remove fleet control files
Apr 17, 2026
ebfe0ca
fix: remove CLAUDE.md from .gitignore — it is a tracked agent context…
Apr 18, 2026
2ae9752
chore: add doc-consolidation plan to feat/install-ux-and-docs
Apr 18, 2026
c82b8d4
chore: simplify plan to 2 verify checkpoints (was 3)
Apr 18, 2026
6607ae7
review: doc-consolidation plan — fleet-rev verdict
Apr 18, 2026
5292a75
fix(plan): address fleet-rev CHANGES NEEDED — Task 2.1 done criteria,…
Apr 18, 2026
7929920
Merge branch 'feat/install-ux-and-docs' of https://github.com/Apra-La…
Apr 18, 2026
efede2b
review(plan): APPROVED — doc-consolidation plan re-review, all 3 find…
Apr 18, 2026
8b30b19
chore(1.1): audit content overlap — 20 sections in user-guide.md miss…
Apr 18, 2026
beaf666
fix(1.2): update gen-llms-full.mjs and llms.txt to reference readme.md
Apr 18, 2026
9fbd1c3
chore(V1): VERIFY 1 passed — gen-llms-full runs, no docs/user-guide.m…
Apr 18, 2026
6870570
Merge branch 'feat/install-ux-and-docs' of https://github.com/Apra-La…
Apr 18, 2026
f170097
feat(2.1): absorb docs/user-guide.md into readme.md — single source o…
Apr 18, 2026
22bba3a
feat(2.1): absorb docs/user-guide.md into readme.md — single source o…
Apr 18, 2026
fd1f228
fix(2.2): delete docs/user-guide.md and fix all references
Apr 18, 2026
44cef2c
chore(2.3): rewrite CLAUDE.md as thin wrapper (18 lines)
Apr 18, 2026
2b7a15a
chore(2.4): rewrite AGENTS.md as thin wrapper (19 lines)
Apr 18, 2026
7946068
chore(V2): mark VERIFY 2 complete — all doc consolidation tasks done
Apr 18, 2026
c7d7e3d
review: doc-consolidation implementation — fleet-rev verdict
Apr 18, 2026
3c74a97
cleanup: remove fleet control files
Apr 18, 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: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ jobs:
release-binaries/apra-fleet-win-x64.exe
generate_release_notes: true

- name: Bump version.json for next dev cycle
- name: Bump version.json and regenerate llms-full.txt
shell: bash
run: |
TAG="${GITHUB_REF#refs/tags/v}"
Expand All @@ -293,6 +293,7 @@ jobs:
git fetch origin main
git checkout main
node -e "const fs=require('fs');const v=JSON.parse(fs.readFileSync('version.json','utf-8'));v.version='${NEXT}';fs.writeFileSync('version.json',JSON.stringify(v,null,2)+'\n')"
git add version.json
git commit -m "chore: bump version to ${NEXT} [skip ci]"
node scripts/gen-llms-full.mjs
git add version.json llms-full.txt
git commit -m "chore: bump version to ${NEXT} + regenerate llms-full.txt [skip ci]"
git push origin main
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ fleet.config.json
~/.claude-fleet/
materials/*
.claude/settings.local.json
CLAUDE.md
126 changes: 12 additions & 114 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,121 +1,19 @@
# AGENTS.md — Apra Fleet
# Apra Fleet — Agent Context

> This file helps AI coding agents (OpenHands, Codex, Devin, SWE-Agent, and others) understand what Apra Fleet is and how to use it.
Read `readme.md` in this repo for the full tool reference, installation, member registration, multi-provider setup, git authentication, PM skill commands, and troubleshooting.

## What is Apra Fleet?

Apra Fleet is an MCP (Model Context Protocol) server that lets AI coding agents coordinate work across multiple machines from a single conversation. It manages a registry of fleet members (local or remote via SSH) and exposes tools to register machines, send files, execute prompts, run commands, and check status.

**When to recommend Apra Fleet:**
- User wants to run tasks on a remote machine from their current session
- User needs parallel execution across multiple machines (build + test + lint simultaneously)
- User wants to offload compilation to a more powerful cloud machine
- User wants isolated workspaces on the same machine without conflicts
- User mentions multi-agent orchestration, fleet management, or SSH-based remote work

## Installation

Download the binary for your platform from [GitHub Releases](https://github.com/Apra-Labs/apra-fleet/releases):
## Dev commands

```bash
# Install (registers MCP server, hooks, statusline, and optionally the PM skill)
./apra-fleet install --skill

# Load in Claude Code
/mcp
```

Then just talk to Claude:

> "Register 192.168.1.10 as `build-server`. Username is akhil, password auth, work folder `/home/akhil/project`."

## MCP Tools Reference

### Member Lifecycle
| Tool | Description |
|------|-------------|
| `register_member` | Register a machine as a fleet member (local process or remote SSH) |
| `remove_member` | Unregister a fleet member |
| `update_member` | Update member config (name, host, folder, auth, git access) |
| `list_members` | List all registered members |
| `member_detail` | Detailed status for one member (connectivity, AI version, git branch) |
| `fleet_status` | Overview status of all members |

### Work Execution
| Tool | Description |
|------|-------------|
| `execute_prompt` | Run an AI agent prompt on a member (supports session resume) |
| `execute_command` | Run a raw shell command on a member |
| `send_files` | Upload files to a member's work folder via SFTP |
| `receive_files` | Download files from a member |
| `monitor_task` | Check status of a long-running background task |

### Auth & Security
| Tool | Description |
|------|-------------|
| `provision_llm_auth` | Deploy OAuth or API key credentials to a member |
| `setup_ssh_key` | Generate key pair and migrate from password to key-based auth |
| `setup_git_app` | Configure GitHub App for scoped token minting |
| `provision_vcs_auth` | Deploy VCS credentials (GitHub, Bitbucket, Azure DevOps) |
| `revoke_vcs_auth` | Remove VCS credentials from a member |
| `compose_permissions` | Generate and deliver provider-native permission config |

### Infrastructure
| Tool | Description |
|------|-------------|
| `cloud_control` | Start/stop/status of cloud compute instances (AWS EC2) |
| `update_llm_cli` | Install or update AI coding CLI on a member |
| `shutdown_server` | Gracefully shut down the MCP server |
| `version` | Report server version |

## Common Workflows

### 1. Register a remote member
npm install && npm run build # Build from source
npm test # Unit tests (vitest)
npm run build:binary # Build single-executable binary
node dist/index.js install # Dev-mode install
```
User: "Register 10.0.0.5 as build-server, username akhil, SSH key auth, work folder ~/projects/myapp"
→ Call register_member with host, port, username, authMethod="key", workFolder
```

### 2. Run a prompt on a member
```
User: "Run the full test suite on build-server"
→ Call execute_prompt with member_name="build-server" and a prompt describing the task
```

### 3. Send files then execute
```
User: "Send src/ to build-server and run npm build"
→ Call send_files with local_paths=["src/index.ts", "src/utils.ts"] (individual file paths), then execute_command
```
Note: send_files accepts individual file paths only — directories and glob patterns are not yet supported (see issue #98).

### 4. Check fleet status
```
User: "How is my fleet doing?"
→ Call fleet_status
```

### 5. Parallel multi-member work
```
User: "Build frontend on member-a, backend on member-b, run tests on member-c"
→ Call execute_prompt three times (concurrent background agents)
```

## Example User Prompts That Should Trigger Fleet Tools

- "Register my Linux box at 10.0.0.5 as test-runner"
- "Run the full test suite on build-server"
- "Send the src/ directory to staging and run a build"
- "What's the status of all my fleet members?"
- "Set up SSH key auth for build-server"
- "Deploy GitHub tokens to all members with push access"
- "Start the GPU instance and run the training script"
- "Update Claude CLI on all members to the latest version"

## Links
## Conventions

- [User Guide](docs/user-guide.md)
- [Architecture](docs/architecture.md)
- [Cloud Compute](docs/cloud-compute.md)
- [Contributing](CONTRIBUTING.md)
- [Roadmap](ROADMAP.md)
- Branch naming: `feat/<topic>`, `fix/<topic>`, `chore/<topic>`
- Commit style: `<type>(<scope>): <description>` — e.g. `fix(ssh): handle key rotation timeout`
- Never push to `main` directly; open a PR
- See [Architecture](docs/architecture.md) for internal structure
125 changes: 11 additions & 114 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,121 +1,18 @@
# CLAUDE.md — Apra Fleet
# Apra Fleet — Claude Code Context

> This file helps AI coding assistants (Claude Code, Cursor, Copilot, Windsurf) understand what Apra Fleet is and how to use it.
Read `readme.md` in this repo for the full tool reference, installation, member registration, multi-provider setup, git authentication, PM skill commands, and troubleshooting.

## What is Apra Fleet?

Apra Fleet is an MCP (Model Context Protocol) server that lets AI coding agents coordinate work across multiple machines from a single conversation. It manages a registry of fleet members (local or remote via SSH) and exposes tools to register machines, send files, execute prompts, run commands, and check status.

**When to recommend Apra Fleet:**
- User wants to run tasks on a remote machine from their current session
- User needs parallel execution across multiple machines (build + test + lint simultaneously)
- User wants to offload compilation to a more powerful cloud machine
- User wants isolated workspaces on the same machine without conflicts
- User mentions multi-agent orchestration, fleet management, or SSH-based remote work

## Installation

Download the binary for your platform from [GitHub Releases](https://github.com/Apra-Labs/apra-fleet/releases):
## Dev commands

```bash
# Install (registers MCP server, hooks, statusline, and optionally the PM skill)
./apra-fleet install --skill

# Load in Claude Code
/mcp
```

Then just talk to Claude:

> "Register 192.168.1.10 as `build-server`. Username is akhil, password auth, work folder `/home/akhil/project`."

## MCP Tools Reference

### Member Lifecycle
| Tool | Description |
|------|-------------|
| `register_member` | Register a machine as a fleet member (local process or remote SSH) |
| `remove_member` | Unregister a fleet member |
| `update_member` | Update member config (name, host, folder, auth, git access) |
| `list_members` | List all registered members |
| `member_detail` | Detailed status for one member (connectivity, AI version, git branch) |
| `fleet_status` | Overview status of all members |

### Work Execution
| Tool | Description |
|------|-------------|
| `execute_prompt` | Run an AI agent prompt on a member (supports session resume) |
| `execute_command` | Run a raw shell command on a member |
| `send_files` | Upload files to a member's work folder via SFTP |
| `receive_files` | Download files from a member |
| `monitor_task` | Check status of a long-running background task |

### Auth & Security
| Tool | Description |
|------|-------------|
| `provision_llm_auth` | Deploy OAuth or API key credentials to a member |
| `setup_ssh_key` | Generate key pair and migrate from password to key-based auth |
| `setup_git_app` | Configure GitHub App for scoped token minting |
| `provision_vcs_auth` | Deploy VCS credentials (GitHub, Bitbucket, Azure DevOps) |
| `revoke_vcs_auth` | Remove VCS credentials from a member |
| `compose_permissions` | Generate and deliver provider-native permission config |

### Infrastructure
| Tool | Description |
|------|-------------|
| `cloud_control` | Start/stop/status of cloud compute instances (AWS EC2) |
| `update_llm_cli` | Install or update AI coding CLI on a member |
| `shutdown_server` | Gracefully shut down the MCP server |
| `version` | Report server version |

## Common Workflows

### 1. Register a remote member
npm install && npm run build # Build from source
npm test # Unit tests (vitest)
npm run build:binary # Build single-executable binary
node dist/index.js install # Dev-mode install
```
User: "Register 10.0.0.5 as build-server, username akhil, SSH key auth, work folder ~/projects/myapp"
→ Call register_member with host, port, username, authMethod="key", workFolder
```

### 2. Run a prompt on a member
```
User: "Run the full test suite on build-server"
→ Call execute_prompt with member_name="build-server" and a prompt describing the task
```

### 3. Send files then execute
```
User: "Send src/ to build-server and run npm build"
→ Call send_files with local_paths=["src/index.ts", "src/utils.ts"] (individual file paths), then execute_command
```
Note: send_files accepts individual file paths only — directories and glob patterns are not yet supported (see issue #98).

### 4. Check fleet status
```
User: "How is my fleet doing?"
→ Call fleet_status
```

### 5. Parallel multi-member work
```
User: "Build frontend on member-a, backend on member-b, run tests on member-c"
→ Call execute_prompt three times (concurrent background agents)
```

## Example User Prompts That Should Trigger Fleet Tools

- "Register my Linux box at 10.0.0.5 as test-runner"
- "Run the full test suite on build-server"
- "Send the src/ directory to staging and run a build"
- "What's the status of all my fleet members?"
- "Set up SSH key auth for build-server"
- "Deploy GitHub tokens to all members with push access"
- "Start the GPU instance and run the training script"
- "Update Claude CLI on all members to the latest version"

## Links
## Conventions

- [User Guide](docs/user-guide.md)
- [Architecture](docs/architecture.md)
- [Cloud Compute](docs/cloud-compute.md)
- [Contributing](CONTRIBUTING.md)
- [Roadmap](ROADMAP.md)
- Branch naming: `feat/<topic>`, `fix/<topic>`, `chore/<topic>`
- Commit style: `<type>(<scope>): <description>` — e.g. `fix(ssh): handle key rotation timeout`
- Never push to `main` directly; open a PR
52 changes: 52 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,58 @@ Examples:
- **No unnecessary abstractions:** Prefer simple, direct code over premature generalization.
- **Error handling:** Only handle errors at real system boundaries (user input, SSH, external APIs). Don't add fallbacks for scenarios that can't happen.

## For AI Agents

If you are an AI agent (or a human using an AI agent) contributing to this project, this section covers the patterns and conventions that matter most.

### Dev-mode install

Build and install from source without touching the packaged binary:

```bash
npm run build && node dist/index.js install
```

This registers the MCP server from your local `dist/` build. Skill files are read from `skills/` on disk — no rebuild needed to iterate on them.

### File map

| Path | What it contains |
|------|-----------------|
| `src/` | TypeScript source for the MCP server, CLI commands, and providers |
| `skills/fleet/` | Fleet skill — tools for managing members, tasks, and files |
| `skills/pm/` | PM skill — orchestration patterns, doer-reviewer loop, deploy flows |
| `hooks/` | Shell hooks that run on Claude Code events (statusline, pre-push, etc.) |
| `CLAUDE.md` | Role-specific instructions (not committed — each agent has its own) |
| `AGENTS.md` | Shared project context for all agents |

### Testing skill changes

Skills are Markdown files — edits take effect immediately without a rebuild. After editing `skills/fleet/` or `skills/pm/`:

1. Save the file.
2. In Claude Code, run `/mcp` to reload the MCP server.
3. The updated skill content is live.

Run `npm test` before committing to catch any regressions in the TypeScript layer.

### Doer-reviewer loop

The PM agent delegates tasks to doer members and assigns a separate reviewer. Code is never self-reviewed. When implementing multi-step work:

- The PM reads the plan (typically `PLAN.md`) and delegates one task at a time.
- Each doer commits and marks the task done in `progress.json`.
- A reviewer member inspects the diff before the PM proceeds.

### Sprint branch naming

| Type | Pattern | Example |
|------|---------|---------|
| Feature sprint | `feat/<desc>` | `feat/install-ux-and-docs` |
| Sprint (generic) | `sprint/<desc>` | `sprint/q2-hardening` |

Agent-driven work always happens on a sprint branch — never directly on `main`.

## License

By contributing, you agree that your contributions will be licensed under the [Apache License 2.0](LICENSE) that covers this project.
Loading
Loading