# ATV Phoenix

> Self-healing, self-learning harness for intent engineering. Turns a one-line intent into a demonstrated outcome: formalize an objective check, self-heal failures, derive 'done' from a tamper-evident red->green trace — never self-reported. Wraps GitHub Copilot + Microsoft Scout. Silent failures 40%->0% live. Rust core, MCP + CLI, MIT.

- **Type:** MCP server
- **Install:** `agentstack add mcp-all-the-vibes-atv-phoenix`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [All-The-Vibes](https://agentstack.voostack.com/s/all-the-vibes)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [All-The-Vibes](https://github.com/All-The-Vibes)
- **Source:** https://github.com/All-The-Vibes/ATV-Phoenix

## Install

```sh
agentstack add mcp-all-the-vibes-atv-phoenix
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# ATV-Phoenix

## One line in. A demonstrated outcome out.

Point Phoenix at a one-line idea and walk away. It **interviews** you into a crystal intent, **formalizes**
it into a runnable acceptance check, then runs the full **think â†’ plan â†’ build â†’ test â†’ review â†’ ship**
lifecycle on autopilot â€” **healing every failure** and **re-checking its own work** at every step.

For **long-horizon work** â€” multi-hour, many-step jobs â€” Phoenix's autonomous trio takes over:
[`phoenix-goal`](skills/phoenix-goal/SKILL.md) sets a persistent definition of done,
[`phoenix-ralph`](skills/phoenix-ralph/SKILL.md) grinds the backlog across fresh-context iterations
(filesystem as memory), and [`phoenix-auto`](skills/phoenix-auto/SKILL.md) routes dynamically. It's the
same long-running-agent design **OpenAI Codex** (`/goal` mode) and **Anthropic** (a goal condition
re-checked every turn) converge on â€” but their loops still end in an *opinion* (an LLM grading output, a
diff for you to review). **Phoenix ends in evidence:** it doesn't stop when the model *says* it's done â€”
it stops when a **tamper-evident trace *proves*** the acceptance check went red â†’ green, or it doesn't
ship. That's the property you actually need before you walk away from an unattended loop.

The difference, measured: silent failures **40% â†’ 0%**, zero regressions, completion you can audit.

**â†’ Full greenfield walkthrough: [`docs/developer-journey.md`](docs/developer-journey.md) Â· long-horizon design + lab alignment: [`docs/autonomous-workflows.md`](docs/autonomous-workflows.md)**

---

## The results that justify it

Three hypotheses, all tested on **live GitHub Copilot sessions**, scored by hidden checkers (ground truth):

| Question | Result |
|---|---|
| **Does objective verification beat self-judgment?** (H2) | Silent-failure rate **40% â†’ 0%** across 20 sessions â€” vanilla Copilot shipped broken code with false confidence; Phoenix caught and healed every one. **Zero regressions.** |
| **Does formalizing intent into a check first help?** (H1) | **+0.125** mean verified-outcome lift, **replicated 3/3 runs** (criteria-first perfect every run). |
| **Does injecting the right context/memory help?** (H3) | **0% â†’ 100%** â€” without a project's convention, Copilot produced a plausible-but-wrong default every time; with it injected, correct every time. |
| **Does it hold up on a SWE-bench-style contract?** | Underspecified resolved-rate **50% â†’ 100%** (overall **78% â†’ 100%**, **0 regressions**) â€” both vanilla misses were *silent failures* the enforced test-gate caught. |

And it isn't just fault-recovery on broken files â€” under the loop, live Copilot **built a real project
end-to-end** (a working Space Invaders game) gated by an objective check + a hardened Playwright
interaction gate. Full method + raw data per experiment under [`evals/`](evals/).

---

## What Phoenix gives the agent (5 tools)

| Tool | What it does |
|---|---|
| `phoenix_sense` | Objectively check success â€” a command's exit code, a file hash, or a regex. **No self-grading.** |
| `phoenix_snapshot` | Save a known-good state â€” but **only if a check passes** (never blesses broken state). |
| `phoenix_heal` | Bounded recovery (rollback to a snapshot, or retry â‰¤3Ã—), **confirmed by an external recheck**. |
| `phoenix_verify_trace` | Audit a tamper-evident, hash-chained trace of everything sensed and healed. |
| `phoenix_accept` | **The gate ledger** â€” returns ok only if the trace proves a check went **redâ†’green** (failure-first) and is green now. |

The loop: **baseline-green â†’ snapshot â†’ edit â†’ sense â†’ heal if red â†’ confirm green** â€” all on
*objective* signals, all traced.

---

## Install

### GitHub Copilot CLI (recommended)
```powershell
git clone https://github.com/All-The-Vibes/ATV-Phoenix
cd ATV-Phoenix
python .copilot-plugin/skills/phoenix-setup/setup.py --repo .
```
The setup script is idempotent: it builds the Rust binary if needed, registers the `phoenix` MCP
server in `~/.copilot/mcp-config.json`, and installs the `phoenix` agent. Restart Copilot, then ask it
to verify + heal a task. (Requires [Rust](https://rustup.rs) + Python. `dist/install.ps1` is a
PowerShell equivalent.)

### Microsoft Scout (CLI adapter)
Scout doesn't take external MCP servers, so Phoenix ships a **CLI** the Scout agent calls via its
shell tool, plus a Scout skill that teaches the verify-heal loop:
```powershell
phoenix-mcp sense   '{"kind":"command_exit","target":["pytest","-q"],"expect":0}'   # exit 0 = pass
phoenix-mcp snapshot src/app.py '{"kind":"command_exit","target":["pytest","-q"]}'
phoenix-mcp heal    rollback '{"path":"src/app.py","snap_id":"...","recheck":{...}}'
phoenix-mcp verify-trace
```
See [`dist/scout/`](dist/scout/). Same Rust binary, both hosts.

### Using it (after install)
Phoenix is a **harness, not a background daemon** â€” it doesn't watch your repo or act on its own. It
shapes how Copilot works *while you work*, and you stay in the driver's seat.

- **Automatic:** just work normally. Ask Copilot to build, fix, or ship something and the matching
  Phoenix skill engages by itself â€” running an objective check, healing failures, and refusing to call a
  task "done" until a check actually goes **red â†’ green**.
- **To be sure it's engaged:** start a task with **`/phoenix`** (loads the router + the laws), or select
  the installed **`phoenix` agent**.
- **Hands-off / autonomous:** say **"go"** or **`/phoenix-goal ""`** â€” it FORMALIZES an
  objective done-check first, then runs the whole lifecycle to completion (see
  [autonomous workflows](docs/autonomous-workflows.md)).
- **If it won't load** â€” `copilot --agent phoenix` says *"No such agent"*, a skill is missing, or things
  feel off after a Copilot/Phoenix update â€” run **`phoenix-mcp doctor --fix`** (or `/phoenix-doctor`): it
  compares your install against this build and re-syncs any drift. (The installer self-checks with it too.)

Quick smoke test: ask it to fix a failing test and watch it **sense â†’ heal â†’ confirm green**.

---

## Open knowledge (OKF)

Phoenix implements the [Open Knowledge Format](https://github.com/GoogleCloudPlatform/knowledge-catalog/tree/main/okf)
(OKF v0.1) â€” a directory of markdown + YAML frontmatter, graph-shaped via links, with `index.md` for
progressive disclosure. The `phoenix-okf` skill closes the full loop:

- **Produce** â€” export the code graph to a browsable, git-diffable OKF bundle (one concept per source file).
- **Validate / sense** â€” Â§9 conformance is a `phoenix_sense` gate; bundles are sensed through the spine.
- **Consume** â€” ingest any OKF bundle index-first as token-cheap context (`okf_ingest`).
- **Interop** â€” ingest *foreign* bundles authored by other tools; broken-link-tolerant under `--strict-links`.

**See it run:** [`demo/okf/run-demo.ps1`](demo/okf/run-demo.ps1) is a narrated 5-beat community demo with a
real redâ†’green heal. Token receipts in [`evals/m4-okf/`](evals/m4-okf/RESULT.md) and
[`evals/m5-okf-live/`](evals/m5-okf-live/RESULT.md).

---

## What's in the box

- **18 verification-gated skills** â€” a meta-router, the `think â†’ ship` lifecycle, craft skills
  (Karpathy / Pocock / Emil), the self-heal + OKF spine, a `doctor` that verifies and repairs the install
  itself, and the autonomous `goal`/`ralph`/`auto` trio. Every stage gates on an objective `phoenix_sense`
  check. Full catalog: **[`docs/skills.md`](docs/skills.md)**.
- **TokenMasterX** (bundled, MIT) â€” graph-routed code navigation, **âˆ’73% tokens**; `phoenix-context`
  routes structural questions here instead of grepping whole directories.
- **`phoenix-learn` â€” the measured-gain adoption gate** (new in 0.4.0): the first connector built *by*
  Phoenix, under its own redâ†’green trace. A learned skill/prompt diff is adopted only when a **held-out
  split proves a real, regression-free gain** (n â‰¥ 20, +10pp, zero rightâ†’wrong) â€” never on a self-graded
  hunch. The gate **decides eligibility; it never adopts** (adoption stays human-gated). First slice â€” the
  gate core â€” shipped; the optimizer that *proposes* candidates is next.
  [`evals/c3-phoenix-learn`](evals/c3-phoenix-learn/RESULT.md).
- **One-command install** â€” `setup.py` installs the whole stack; nothing else to fetch.
- **The long-horizon engine** â€” for multi-hour, many-step jobs, the autonomous trio
  [`phoenix-goal`](skills/phoenix-goal/SKILL.md) + [`phoenix-ralph`](skills/phoenix-ralph/SKILL.md) +
  [`phoenix-auto`](skills/phoenix-auto/SKILL.md) runs the whole lifecycle to completion unattended,
  stopping only on a trace-demonstrated outcome. The same long-running-agent design as OpenAI Codex / Anthropic
  â€” but completion is *demonstrated*, not judged. See the [developer journey](docs/developer-journey.md) and
  [autonomous workflows](docs/autonomous-workflows.md).

**Why it works:** the orchestration layer â€” not the model â€” determines agent success. Most "the model
failed" problems are *harness* failures: no objective completion signal, no recovery, no evidence.
Two principles Phoenix proves: **enforce, don't offer** (unprompted Copilot self-verified 0/10 times),
and **evidence over self-grading** (a fabricated "done!" is the failure mode Phoenix exists to kill).
The bigger bet â€” Intent-to-Outcome â€” is in **[`docs/intent-to-outcome.md`](docs/intent-to-outcome.md)**.

---

## Status (v0.4.0)

Every milestone has a measured eval + a screenshot.

| Milestone | Demonstrated | Evidence |
|---|---|---|
| M0 | token/retrieval pillar (TokenMasterX/graphify) validated | [result](evals/m0-install-path/RESULT.md) Â· [shot](evals/screenshots/m0-graph-viz.png) |
| M1 | self-healing spine in Rust (`cargo test`) | [result](evals/m1-self-heal/RESULT.md) Â· [shot](evals/screenshots/m1-self-heal.png) |
| M2 | works over real MCP protocol | [result](evals/m2-mcp/RESULT.md) Â· [shot](evals/screenshots/m2-mcp-session.png) |
| M3 | heals a fault **live inside Copilot** | [result](evals/m3-live-copilot/RESULT.md) Â· [shot](evals/screenshots/m3-live-copilot.png) |
| E2E | builds a **real project end-to-end** live in Copilot â€” Space Invaders, gated by an objective check + a **hardened Playwright interaction gate** | [result](evals/e2e-sandbox/RESULT.md) Â· [shot](evals/screenshots/e2e-space-invaders.png) |
| Autonomy | **gate ledger** (failure-first, trace-derived completion) + Ralph loop driver | [result](evals/autonomous-workflows/RESULT.md) Â· [shot](evals/screenshots/autonomous-workflows.png) |
| OKF | produce / validate / sense / consume / interop, 12 pytest + 3 Rust spine tests, CI | [result](evals/m4-okf/RESULT.md) Â· [live](evals/m5-okf-live/RESULT.md) |
| C3 | **`phoenix-learn`** measured-gain adoption gate â€” held-out split (nâ‰¥20 / +10pp / zero rightâ†’wrong), built failure-first under Phoenix's own **redâ†’green trace**; gate core shipped, optimizer in progress | [result](evals/c3-phoenix-learn/RESULT.md) |
| H1 | criteria-first lift +0.125 mean, replicated 3/3 | [method + backlog](docs/intent-to-outcome.md#5-the-research-backlog-falsifiable-hypotheses) |
| H2 | silent failures **40%â†’0%** | [result](evals/h2-experiment/RESULT.md) Â· [shot](evals/screenshots/h2-results.png) |
| H3 | context/memory lift **0%â†’100%** | [result](evals/h3-experiment/RESULT.md) Â· [shot](evals/screenshots/h3-results.png) |
| SWE-bench-lite | resolved-rate, underspecified tier **50%â†’100%** (overall 78%â†’100%, **0 regressions**) | [result](evals/swe-bench-lite/RESULT.md) Â· [shot](evals/screenshots/swe-bench-result.png) |

**Honest limits:** results are directional (small n, single model, deterministic checkers). Recovery is
"bounded objective recovery," not broad self-healing. Command timeouts aren't yet enforced in-process.
`copilot plugin install ` (marketplace path) is scaffolded but not yet verified end-to-end â€”
install via `setup.py` today. See [`BUILDLOG.md`](BUILDLOG.md) for the full honest engineering record.

## License
MIT â€” see [LICENSE](LICENSE). Phoenix bundles its **16-skill verification-gated pack** (MIT) and
**vendors TokenMasterX** (MIT Â© 2026 Shyam Sridhar) under [`vendor/token-master`](vendor/token-master),
both installed automatically. Every skill is original, written from scratch for Phoenix.

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [All-The-Vibes](https://github.com/All-The-Vibes)
- **Source:** [All-The-Vibes/ATV-Phoenix](https://github.com/All-The-Vibes/ATV-Phoenix)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-all-the-vibes-atv-phoenix
- Seller: https://agentstack.voostack.com/s/all-the-vibes
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
