Metadata-Version: 2.4
Name: admiralty
Version: 2.5.7
Summary: Fleet Command System — AI-powered multi-agent Claude Code orchestration framework
License: Proprietary
Project-URL: Homepage, https://github.com/tavisbasing/Admiralty
Project-URL: Repository, https://github.com/tavisbasing/Admiralty
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: pytest-cov>=5.0; extra == "dev"
Requires-Dist: pytest-mock>=3.14; extra == "dev"
Provides-Extra: azure-secrets
Requires-Dist: azure-keyvault-secrets>=4.7; extra == "azure-secrets"
Requires-Dist: azure-identity>=1.15; extra == "azure-secrets"
Provides-Extra: azure-anchor
Requires-Dist: azure-storage-blob>=12.19; extra == "azure-anchor"
Requires-Dist: azure-identity>=1.15; extra == "azure-anchor"
Provides-Extra: aws-secrets
Requires-Dist: boto3>=1.34; extra == "aws-secrets"
Provides-Extra: aws-anchor
Requires-Dist: boto3>=1.34; extra == "aws-anchor"
Dynamic: license-file

# Admiralty — Fleet Command System

[![CI](https://github.com/tavisbasing/Admiralty/actions/workflows/ci.yml/badge.svg)](https://github.com/tavisbasing/Admiralty/actions/workflows/ci.yml)

> AI-powered multi-agent orchestration for Claude Code. Coordinate up to 5 parallel AI crews across complex software projects — with role-based specialisation, dependency ordering, token tracking, backup/restore, and full audit trails.

**Site:** [admiraltyai.com](https://admiraltyai.com) · **Docs:** [docs.admiraltyai.com](https://docs.admiraltyai.com) · **Install:** `pip install admiralty --extra-index-url https://tavisbasing.github.io/admiralty-dist/simple/`

---

## What It Does

Admiralty turns Claude Code into a coordinated fleet. You define work as **Orders** (discrete tasks), group them into **Voyages** (sprints), and the Fleet Admiral dispatches up to 5 specialised **Crews** in parallel — each running as an independent Claude Code session in its own role.

```
Captain (You)  →  Quartermaster (Claude, interactive)  →  Fleet Admiral (script)  →  5 Crews
```

**Roles:**

| Role | Focus | Model |
|------|-------|-------|
| Navigator (NAV) | Planning & architecture | Sonnet 4.6 |
| Shipwright (SHP) | Development & implementation | Sonnet 4.6 |
| Bosun (BOS) | QA & testing | Sonnet 4.6 |
| Scribe (SCR) | Documentation | Sonnet 4.6 |
| Lookout (LKT) | Security & investigation | Haiku 4.5 |
| Coxswain (COX) | Integration & deployment | Opus 4.7 |

---

## Installation

```bash
# 1. Install — no GitHub credentials needed; ships from a public wheel index
pip install admiralty --extra-index-url https://tavisbasing.github.io/admiralty-dist/simple/

# 2. Activate your licence (issued via Polar; see https://admiraltyai.com/pricing)
adm licence activate <YOUR-KEY>

# 3. Verify
adm version
adm licence status
```

The wheel itself is openly distributed; the runtime licence check is the gate. Source remains private under proprietary licence; see [LICENSE](LICENSE) for the full terms. **Air-gapped / restricted-egress environments:** see [docs/AIR-GAPPED.md](docs/AIR-GAPPED.md) for the staging-machine activation pattern and the egress allowlist.

Then scaffold a workspace:

```bash
adm init --project MYPROJECT --directory my-workspace
cd my-workspace
adm dispatch --max-crews 3
```

To enable the Slack bridge for mobile control, run the setup wizard before starting the bridge:

```bash
adm bridge setup    # interactive configuration wizard (first-time setup)
adm bridge start    # start after setup is complete
```

---

## Quickstart

```bash
pip install admiralty --extra-index-url https://tavisbasing.github.io/admiralty-dist/simple/
adm quickstart
```

`adm quickstart` verifies your environment, scaffolds a demo workspace, dispatches a three-order demo voyage, and prints a summary — all in one command. Full guide: [docs/QUICKSTART.md](docs/QUICKSTART.md).

---

## CLI Reference

```
adm dispatch      [--max-crews N] [--cleanup] [--stagger-delay S] [--timeout M]
adm cleanup
adm status        [--once] [--compact]
adm usage         [--voyage VOY-ID | --order ORDER-ID | --report [--output PATH]]
adm estimate      [--voyage VOY-ID | --order ORDER-ID | --all] [--queue QUEUE-NAME]
adm approve       (--voyage VOY-ID | --plan FILE | --requirement FILE) [--note TEXT]
adm reject        (--voyage VOY-ID | --plan FILE | --requirement FILE) [--reason TEXT]
adm pause         [--crew N | --all]
adm resume        [--crew N | --all]
adm crew          --crew {1-5} [--status | --watch | --cleanup]
adm verify        [--voyage VOY-ID] [--skip-tests]
adm backup        [--project ACRONYM] [--output PATH] [--list]
adm restore       BACKUP_FILE [--project ACRONYM] [--force] [--merge] [--dry-run]
adm init          --project ACRONYM [--directory PATH] [--force]
adm update        [--dry-run] [--force] [--directory PATH]
adm setup         [--check]
adm create-order  [--interactive | --template NAME] [--project ACRONYM] [--title TEXT] ...
adm create-voyage [--interactive] [--project ACRONYM] [--title TEXT] ...
adm diagnose
adm requirement   <create|list|show|edit|plan|status> [flags]
adm licence       <activate|status|deactivate> [KEY]
adm mcp           <list|add|remove|validate|show> [flags]                 # v2.3.0
adm security      scan [--order|--voyage|--since|--json|--severity-threshold] # v2.3.0
adm docs          [TOPIC]
adm version
```

See [docs/CLI-REFERENCE.md](docs/CLI-REFERENCE.md) for full documentation.

---

## V6 Enterprise Hardening — foundation merged (v3.0.0 release-gated)

A voyage targeting **v3.0.0** has shipped its foundation: identity + ACL, immutable audit trail with external anchoring, secrets-provider abstraction (Azure Key Vault / AWS Secrets Manager / HashiCorp Vault / 1Password / OS keyring / env), data-residency egress filter (permissive / restrictive / air-gapped / proxied), GDPR-aligned identity privacy + Article 15/17/18 rights tooling, and operator role separation (Captain / Fleet Operator / Contributor / Auditor). Foundation merged in [PR #24](https://github.com/tavisbasing/Admiralty/pull/24); voyage report at [VOY-ADM-2026-0026.md](.adm/reports/voyage/VOY-ADM-2026-0026.md).

The post-implementation pen-test ([SEC-FTR-ADM-2026-0064.md](.adm/reports/security/SEC-FTR-ADM-2026-0064.md)) found **2 CRITICAL + 2 HIGH** open findings (audit-log truncation, print/subprocess secrets exfil, raw-socket egress bypass). The COX release gate **BLOCKS v3.0.0** until those are resolved in a v3.0.x patch voyage.

See:
- [docs/ENTERPRISE-SECURITY.md](docs/ENTERPRISE-SECURITY.md) — operator + buyer guide
- [docs/COMPLIANCE-MAPPING.md](docs/COMPLIANCE-MAPPING.md) — SOC2 + ISO27001 control mapping
- [docs/TRUST.md](docs/TRUST.md) — public-facing trust posture + open findings + SLAs

## What's New in v2.5.0

**v2.5.0 — Licence backend (Polar.sh) + public wheel distribution + branch discipline**

- **`adm licence` CLI** — `activate <KEY>` / `status` / `deactivate` / `revalidate`. Replaces the GitHub-collaborator auth gate. HMAC-signed local store at `~/.admiralty/licence.json` (mode 0600); per-customer signing secret in OS keychain (Keychain / Credential Manager / libsecret). 14-day offline grace from each successful online validation. Cross-machine theft mitigation via the keychain-bound signature. Full guide: [docs/LICENCE.md](docs/LICENCE.md).
- **Polar.sh as the single licence integration.** Selected over Lemon Squeezy / Paddle / Keygen-self-host on take rate, OSS alignment, and AU-tax MoR coverage. The CLI talks to `api.polar.sh` directly — Admiralty operates no licence-server infrastructure; Polar handles billing, key issuance, and key state.
- **Public wheel distribution** at [`tavisbasing/admiralty-dist`](https://github.com/tavisbasing/admiralty-dist). The source repo stays private; the dist repo ships built wheels via a GitHub Pages PEP 503 simple/ index. Customers `pip install` without any GitHub credentials. The runtime licence check is the IP gate.
- **Branch discipline enforcement (BUG-0004).** `voyageBranch` is now load-bearing across three layers — dispatcher's `_verify_dispatcher_branch`, pretool `branch_guard.py`, and a "Branch discipline (mandatory)" section in every role prompt template. Stops cross-voyage contamination at runtime. See [docs/BRANCH-DISCIPLINE.md](docs/BRANCH-DISCIPLINE.md).
- **Domain:** [admiraltyai.com](https://admiraltyai.com) (live); customer email: `admiralty@tech127.com`.

## What's New in v2.3.0

**v2.3.0 — Security tooling + engineering foundations**

Sourced from the comparator-recon voyage against `affaan-m/everything-claude-code` (see [docs/COMPARATOR-everything-claude-code.md](docs/COMPARATOR-everything-claude-code.md)).

- **Secret detection in pretool** — `admiralty/hooks/secret_patterns.py` scans every `Edit`/`Write`/`MultiEdit`/`NotebookEdit` for AWS keys, GitHub PATs, OpenAI / Anthropic / Slack tokens, JWTs, RSA/SSH private keys, and high-entropy strings. Fails closed; per-workspace allowlist at `.adm/config/secret-allowlist.json`.
- **MCP server registry** — canonical `.adm/config/mcp-servers.json` with per-server `risk_level`, `allowed_roles`, and `env_required`. Fleet Admiral refuses to launch crews that request unregistered servers or whose role is denied. New `adm mcp list|add|remove|validate|show` CLI; `adm update` migrates existing `.claude/settings.json mcpServers` entries.
- **OWASP/CWE scanning + COX security gate** — `admiralty/security/owasp_patterns.py` runs in `posttool` for LKT crews, writing `.adm/reports/security/SEC-*.json`. COX merge gate refuses on unresolved HIGH/CRITICAL; MEDIUM requires acknowledged waiver. New `adm security scan` CLI for manual runs. Credential snippet matches are redacted before being written to reports.
- **Unit test suite + GitHub Actions CI** — 55 pytest tests covering `fleet_runner.py`, `crew.py`, `fleet_monitor.py`. CI matrix on Python 3.11 / 3.12 / 3.13 via `pip install -e .[dev]`. 70% coverage gate scaffolded with `continue-on-error: true` until follow-up tests raise actual coverage above the bar.

## What's New in v2.2.0

**v2.2.0 — Coxswain role expansion**
- **COX is the terminal role** for every voyage — opens the PR, monitors `gh pr checks --watch`, fetches Copilot review comments, applies/regresses/declines each, resolves review threads via GraphQL, writes the `COX-to-QM.md` handoff, and notifies the Captain via the bridge
- **Default COX model bumped to Opus 4.7** (`claude-opus-4-7`); Opus 4.6 retained in pricing tables for historical transcripts
- **One voyage = one branch = one PR** — bundling forbidden by the branching policy

## What's New in v2.1.0

**v2.1.0 — Quality gates + workspace updates**
- **Quality gates** — structured `acceptanceCriteria` in orders; BOS validates, COX enforces. Three validation types: `manual`, `command`, `file-exists`. Two severity levels: `blocking` and `advisory`
- **`adm update`** — new command to propagate schema and template changes from the installed pip package into an existing `.adm/` workspace without overwriting user data. Supports `--dry-run` and `--force`
- **Role prompt upgrades** — BOS and COX role prompts updated to include AC validation and gate logic phases

## What's New in v2.0.0

**v2.0.0 — Architecture separation + `adm` CLI**
- **`adm` command** — CLI renamed from `admiralty` to `adm` for brevity
- **`.adm/` folder** — project artefacts live in `.adm/` (not `.admiralty/`) in user projects
- **CLAUDE.md layering** — three-layer context system: project CLAUDE.md → `.adm/claude.md` → pip docs
- **`adm init`** scaffolds `.adm/` with pre-filled `CLAUDE.md` layers from templates
- **Clean separation** — engine code lives only in pip package; repos contain only project artefacts

See [VERSIONING.md](admiralty/docs/VERSIONING.md) for full version history and scheme.

---

## Repo Structure

| Repository | Visibility | Purpose |
|---|---|---|
| [`tavisbasing/Admiralty`](https://github.com/tavisbasing/Admiralty) | private | Source — framework code + ADM project state. Single `main` branch; voyage / bug branches PR back to it. |
| [`tavisbasing/admiralty-dist`](https://github.com/tavisbasing/admiralty-dist) | public | Distribution — built wheels + PEP 503 simple/ index served via GitHub Pages. Auto-populated by the publish workflow on every `v*.*.*` tag-push. |

The wheel is openly downloadable; runtime use requires a valid licence key (see [docs/LICENCE.md](docs/LICENCE.md)).

In user projects, Admiralty artefacts live under `.adm/` (scaffolded by `adm init`):

```
my-project/
├── .adm/             # Fleet Command artefacts
│   ├── claude.md     # Layer 2: Fleet Command integration context
│   ├── config/       # workspace.json, role-paths.json
│   ├── orders/       # active/, complete/, failed/
│   ├── voyages/      # active/, complete/
│   └── queues/       # orders/, bugs/, security/, ...
└── CLAUDE.md         # Layer 1: project architecture, stack, conventions
```

---

## Glossary

Admiralty uses nautical terms throughout. Here is a plain-English mapping:

| Nautical term | Plain English | Description |
|---------------|--------------|-------------|
| **Captain** | You | The human directing the fleet |
| **Quartermaster** | Claude (interactive) | Your AI assistant in the main session — plans, delegates, and advises |
| **Fleet Admiral** | Dispatcher script | The automation layer that launches and manages crews |
| **Crew** | AI worker | An independent Claude Code session executing a single order |
| **Navigator (NAV)** | Planner | Writes plans, breaks requirements into voyages and orders |
| **Shipwright (SHP)** | Developer | Implements features and fixes bugs |
| **Bosun (BOS)** | QA engineer | Tests, reviews, and validates work |
| **Scribe (SCR)** | Docs writer | Creates and updates documentation |
| **Lookout (LKT)** | Security reviewer | Audits code for vulnerabilities and risks |
| **Coxswain (COX)** | Integration engineer | Handles deployment, CI/CD, and release |
| **Order** | Task | A single unit of work assigned to one crew |
| **Voyage** | Sprint | A group of related orders, tracked together |
| **Requirement** | PRD / feature request | High-level description of what needs to happen |
| **Dispatch** | Launch | Starting the fleet to process queued orders |
| **Fleet Command** | Orchestration system | The framework itself |

---

## Documentation

| Document | Audience |
|----------|----------|
| [docs/QUICKSTART.md](docs/QUICKSTART.md) | New users — 5-minute guide to first dispatch |
| [docs/GETTING-STARTED.md](docs/GETTING-STARTED.md) | New users — full installation and setup walkthrough |
| [docs/LICENCE.md](docs/LICENCE.md) | All users — `adm licence` activate / status / deactivate / revalidate, offline grace, tamper recovery |
| [docs/AIR-GAPPED.md](docs/AIR-GAPPED.md) | Restricted-egress / offline operators — staging-machine activation pattern + egress allowlist |
| [docs/CLI-REFERENCE.md](docs/CLI-REFERENCE.md) | All users — complete command reference |
| [docs/OPERATOR-GUIDE.md](docs/OPERATOR-GUIDE.md) | All users — daily operations, scaling, cost management, notifications, reporting |
| [docs/ROLES-GUIDE.md](docs/ROLES-GUIDE.md) | All users — understanding crew roles |
| [docs/ORDERS-AND-VOYAGES.md](docs/ORDERS-AND-VOYAGES.md) | All users — creating and managing work |
| [docs/BRANCH-DISCIPLINE.md](docs/BRANCH-DISCIPLINE.md) | Operators — voyageBranch enforcement (BUG-0004) |
| [docs/TRUST.md](docs/TRUST.md) | Security buyers — trust posture, threat model, open findings, SLAs |
| [docs/SECURITY-QUESTIONNAIRE.md](docs/SECURITY-QUESTIONNAIRE.md) | Security buyers — SIG / CAIQ Lite pre-fill |
| [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) | Security / infra — diagram, data flow, egress inventory, air-gapped guide |
| [docs/OWNER-GUIDE.md](docs/OWNER-GUIDE.md) | Framework owners — development and releases |
| [admiralty/docs/CHAIN-OF-COMMAND.md](admiralty/docs/CHAIN-OF-COMMAND.md) | Technical — full system specification |
| [admiralty/docs/VERSIONING.md](admiralty/docs/VERSIONING.md) | Release notes — version-by-version changelog |
| [docs/COMPARATOR-everything-claude-code.md](docs/COMPARATOR-everything-claude-code.md) | Positioning — Admiralty vs `affaan-m/everything-claude-code` (12-dimension matrix) |

---

## Requirements

- Python 3.9+
- [Claude Code](https://claude.ai/code) CLI installed and authenticated
- Anthropic API key with access to Sonnet 4.6, Haiku 4.5, and Opus 4.7

---

## License

Proprietary — All Rights Reserved.

The Admiralty Framework is commercial software, owned and operated by **Tech 127 Pty Ltd** (Australia). Use is governed by the terms of the [LICENSE](LICENSE) file included in this repository. In summary:

- You may use the software for internal business purposes under the terms of a valid licence (issued at activation via Polar — see [admiraltyai.com/pricing](https://admiraltyai.com/pricing)).
- Redistribution, resale, sublicensing, and reverse engineering are strictly prohibited.
- All intellectual property rights remain with Tech 127 Pty Ltd.

The wheel published at [admiralty-dist](https://github.com/tavisbasing/admiralty-dist) is openly downloadable; the **runtime licence check** is the gate. Runtime use without a valid key is unauthorised and a breach of the licence.

For licensing enquiries, billing, or sales:
- Email: [admiralty@tech127.com](mailto:admiralty@tech127.com)
- Website: [admiraltyai.com](https://admiraltyai.com)
- Docs: [docs.admiraltyai.com](https://docs.admiraltyai.com)
