{
  "markdown": "# PGE Orchestrator\n\n**Autonomous Planner → Generator → Evaluator build pipeline for Claude Code.**\n\nOne sentence prompt. Full product. No manual intervention.\n\n## Table of Contents\n\n- [What is PGE?](#what-is-pge)\n- [Quick Start](#quick-start)\n- [Pipeline Modes](#pipeline-modes)\n  - [pge — Standard](#pge--standard-pipeline)\n  - [pge-strict — Strict](#pge-strict--strict-pipeline)\n  - [pge-quality — Quality](#pge-quality--quality-pipeline)\n  - [pge-ultra — Ultra Consensus](#pge-ultra--ultra-consensus-pipeline)\n  - [pge-orchestrator — Adaptive](#pge-orchestrator--adaptive-pipeline-agent)\n  - [pge-idontcaretokenanymore — Unlimited](#pge-idontcaretokenanymore--premium-unlimited-pipeline)\n  - [pge-god — God Mode](#pge-god--god-mode)\n- [Pipeline Diagram](#pipeline-diagram)\n- [Evaluation Criteria](#evaluation-criteria)\n- [pge-workspace/ Layout](#pge-workspace-layout)\n- [Escalation](#escalation)\n- [Resuming an Interrupted Session](#resuming-an-interrupted-session)\n- [Terminal Tools](#terminal-tools)\n- [Design Principles](#design-principles)\n- [Changelog](#changelog)\n\n---\n\n## What is PGE?\n\nPGE is a Claude Code plugin that turns a single prompt into a complete, tested product. It coordinates three specialist agents across multiple sprints — a **Planner** that writes a product spec, a **Generator** that implements each sprint, and an **Evaluator** that tests the running application via Playwright. Sprints that fail evaluation are automatically retried with extracted feedback until they pass or escalate to you.\n\nEvery agent runs in a **fully isolated subprocess**. Communication happens through files only — no shared context, no hallucination bleed-through between roles.\n\n---\n\n## Quick Start\n\n**Step 1: Install**\n\nThese are Claude Code slash commands — enter them **one at a time** (pasting both lines at once will fail):\n\n```\n/plugin marketplace add https://github.com/orion-gz/Claude-Trinity\n```\n\nThen:\n\n```\n/plugin install pge-orchestrator\n```\n\nRestart Claude Code. All 16 skills and 10 agents are installed automatically.\n\n> **Alternative (manual install)**\n> ```bash\n> git clone https://github.com/orion-gz/Claude-Trinity.git\n> cd Claude-Trinity\n> bash install.sh\n> ```\n\n**Step 2: Add Playwright MCP**\n\nThe Evaluator uses Playwright for live browser testing. If you don't have it yet:\n\n```\n/mcp-setup\n```\n\nSelect Playwright from the list, or add it manually to your MCP config:\n\n```json\n{\n  \"mcpServers\": {\n    \"playwright\": {\n      \"command\": \"npx\",\n      \"args\": [\"@playwright/mcp@latest\"]\n    }\n  }\n}\n```\n\n**Step 3: Build something**\n\n```\n/pge \"build a habit tracker with streaks and reminders\"\n```\n\nPGE writes a full product spec, implements sprint by sprint, and tests each sprint in a real browser. Failing sprints are retried automatically with extracted feedback — no manual intervention needed.\n\n### Pick a mode\n\n| What you need | Command |\n|---------------|---------|\n| Fast prototype | `/pge` |\n| Production-safe (FAIL-biased evaluator) | `/pge-strict` |\n| Client-facing quality (≥ 4/5 threshold) | `/pge-quality` |\n| All 3 evaluators must agree | `/pge-ultra` |\n| Token cost irrelevant, max quality | `/pge-idontcaretokenanymore` |\n| Absolute ceiling (godmode × 10 rounds) | `/pge-god` |\n\nNot sure which to pick? Use `/pge-orchestrator` — it analyzes your prompt and assigns the right evaluator per sprint automatically.\n\n### Switch the evaluator backend\n\nBy default, the Evaluator runs as a Claude agent with full Playwright browser testing. You can switch to **Codex** or **Gemini CLI** for static code-review evaluation:\n\n```\n/pge-eval-backend codex    # use Codex CLI (no Playwright — static analysis only)\n/pge-eval-backend gemini   # use Gemini CLI (no Playwright — static analysis only)\n/pge-eval-backend claude   # restore full Playwright evaluation (default)\n```\n\nOr as a one-time flag:\n```\n/pge \"build a habit tracker\" --eval-backend codex\n```\n\n---\n\n## Pipeline Modes\n\nFive modes are available. Choose based on the complexity and quality bar of your project.\n\n| Mode | Command | Evaluator | Pass threshold | Best for |\n|------|---------|-----------|----------------|----------|\n| **Standard** | `pge` | `evaluator-standard` | ≥ 3/5 all criteria | Prototypes, internal tools |\n| **Strict** | `pge-strict` | `evaluator-strict` | ≥ 3/5, FAIL-biased | Production code, APIs |\n| **Quality** | `pge-quality` | `evaluator-quality` | ≥ 4/5 all criteria | Client-facing products |\n| **Ultra** | `pge-ultra` | All 3 evaluators, consensus | Majority (or unanimous) | High-stakes builds |\n| **Adaptive** | `pge-orchestrator` | Auto-selected per sprint | Varies per sprint | When you're not sure |\n| **idontcaretokenanymore** | `pge-idontcaretokenanymore` | `evaluator-quality` × 5, unanimous | 5/5 rounds, ≥ 4/5 each | Token cost irrelevant, max quality |\n| **God** | `pge-god` | `evaluator-godmode` × 10, unanimous | 10/10 rounds, ≥ 4.5/5 each | Absolute perfection |\n\n---\n\n## Examples\n\n```bash\n# Simplest — standard evaluator\npge \"build a habit tracker with streaks and reminders\"\n\n# Higher quality bar\npge-quality \"build a SaaS invoice generator with PDF export\"\n\n# Maximum rigor — all 3 evaluators must agree\npge-ultra \"build a multi-tenant auth system with RBAC\"\n\n# Let the pipeline decide (recommended when unsure)\npge-orchestrator \"build a real-time collaborative whiteboard\"\n\n# Token cost is irrelevant — quality × 5 unanimous rounds\npge-idontcaretokenanymore \"build a customer-facing analytics dashboard\"\n\n# Absolute ceiling — godmode × 10 unanimous rounds, ≥ 4.5/5\npge-god \"build a production-grade payment processing system\"\n```\n\n---\n\n## `pge` — Standard Pipeline\n\nThe baseline mode. A single `evaluator-standard` grades each sprint. Pass threshold is ≥ 3/5 on all four criteria.\n\n### Syntax\n\n```\npge \"prompt\"\npge \"prompt\" --evaluator [standard|strict|quality]\npge \"prompt\" --eval-backend [claude|codex|gemini]\npge \"prompt\" --dry-run\npge \"prompt\" --sprint N\npge --resume\n```\n\n### Flags\n\n| Flag | Description |\n|------|-------------|\n| _(none)_ | Start a new pipeline with standard evaluator |\n| `--evaluator strict` | Use strict (FAIL-biased) evaluator |\n| `--evaluator quality` | Use quality evaluator (≥ 4/5 threshold) |\n| `--eval-backend codex` | Use Codex CLI evaluator for this run (not persisted) |\n| `--eval-backend gemini` | Use Gemini CLI evaluator for this run (not persisted) |\n| `--dry-run` | Run planning + contract negotiation only, skip implementation |\n| `--sprint N` | Begin at sprint N after planning |\n| `--resume` | Continue an interrupted session from last checkpoint |\n\n### Examples\n\n```bash\npge \"build a Pomodoro timer with session history\"\npge \"build a REST API for a book library\" --evaluator strict\npge \"build a kanban board\" --dry-run          # inspect the plan before building\npge --resume                                   # continue after a crash\n```\n\n---\n\n## `pge-strict` — Strict Pipeline\n\nShortcut for `pge \"...\" --evaluator strict`. Uses `evaluator-strict` which starts every criterion at 2/5 (FAIL) and requires evidence to move up. Edge cases are mandatory, not optional.\n\n```bash\npge-strict \"build a payment processing module\"\npge-strict \"build a JWT authentication service\"\n```\n\n---\n\n## `pge-quality` — Quality Pipeline\n\nShortcut for `pge \"...\" --evaluator quality`. Requires ≥ 4/5 on all criteria. Includes mandatory code review, performance observation, and visual audit passes.\n\n```bash\npge-quality \"build a customer-facing dashboard with charts\"\npge-quality \"build a multi-step onboarding flow\"\n```\n\n---\n\n## `pge-ultra` — Ultra Consensus Pipeline\n\nRuns multiple evaluators per sprint. A sprint only passes when the configured consensus threshold is met. Two strategies:\n\n- **All-evaluator mode** (default): `standard` + `strict` + `quality` each run once (or N rounds each)\n- **Single-evaluator repeated mode**: one evaluator runs N rounds, majority of rounds decides\n\n### Syntax\n\n```\npge-ultra \"prompt\"\npge-ultra \"prompt\" --mode [majority|unanimous]\npge-ultra \"prompt\" --rounds N\npge-ultra \"prompt\" --evaluator [standard|strict|quality] --rounds N\npge-ultra \"prompt\" --dry-run\npge-ultra --resume\n```\n\n### Flags\n\n| Flag | Values | Default | Description |\n|------|--------|---------|-------------|\n| `--evaluator` | `all`, `standard`, `strict`, `quality` | `all` | Which evaluator(s) to use |\n| `--mode` | `majority`, `unanimous` | `majority` | Consensus threshold |\n| `--rounds` | integer ≥ 1 | `1` | How many times each evaluator runs per sprint |\n| `--dry-run` | — | off | Plan + contracts only |\n| `--sprint N` | integer | `1` | Start at sprint N |\n| `--resume` | — | — | Resume from checkpoint |\n\n### Examples\n\n```bash\n# All 3 evaluators, majority wins (2/3 must pass)\npge-ultra \"build a fintech dashboard\"\n\n# All 3 must agree — maximum consensus\npge-ultra \"build an e-commerce checkout\" --mode unanimous\n\n# Strict evaluator × 3 rounds — majority of rounds must pass\npge-ultra \"build a real-time chat\" --evaluator strict --rounds 3\n\n# Quality evaluator × 5 rounds — all 5 must pass\npge-ultra \"build a medical records viewer\" --evaluator quality --rounds 5 --mode unanimous\n```\n\n### Ultra evaluation file layout\n\n```\npge-workspace/\n├── sprint_1_eval_standard.md         # Standard evaluator result\n├── sprint_1_eval_strict.md           # Strict evaluator result\n├── sprint_1_eval_quality.md          # Quality evaluator result\n├── sprint_1_eval_aggregate.md        # Consensus verdict + merged Required Fixes\n└── sprint_1_feedback.md              # Unified feedback written to Generator\n```\n\n---\n\n## `pge-orchestrator` — Adaptive Pipeline (Agent)\n\nThe most intelligent mode. Analyzes your prompt, selects a base evaluation strategy automatically, reads the Planner's complexity assessment, assigns a different evaluator per sprint based on risk, and escalates evaluator strictness dynamically when sprints fail repeatedly.\n\nUnlike the other modes (which are **skills** running in your current conversation), `pge-orchestrator` is a **standalone agent** — it runs in a fully isolated subprocess and can also be invoked programmatically by other agents.\n\n### Syntax\n\n```\npge-orchestrator \"prompt\"\npge-orchestrator \"prompt\" --mode [auto|standard|quality|strict|ultra]\npge-orchestrator \"prompt\" --dry-run\npge-orchestrator \"prompt\" --sprint N\npge-orchestrator --resume\n```\n\n### Automatic complexity analysis\n\nWhen `--mode auto` (default), the orchestrator scores your prompt across 5 dimensions:\n\n| Dimension | 0 | 1 | 2 |\n|-----------|---|---|---|\n| Scope | Single feature | 2–3 features | Full product / multi-role |\n| Data sensitivity | No user data | Basic accounts | Auth, payments, PII |\n| Integration complexity | None | Internal only | External APIs / real-time |\n| UI complexity | Static display | Interactive CRUD | Complex state / animations |\n| Domain risk | Toy / demo | Standard app | Finance, health, enterprise |\n\nScore → tier → base evaluator mode:\n\n| Score | Tier | Base mode |\n|-------|------|-----------|\n| 0–3 | Simple | `standard` |\n| 4–6 | Standard | `quality` |\n| 7–8 | Complex | `strict` |\n| 9–10 | Critical | `ultra` |\n\n### Per-sprint evaluator assignment\n\nThe Planner writes a **Complexity Assessment** and **Evaluator Recommendation** section into `product_spec.md`. The orchestrator reads these signals and builds a per-sprint mode map:\n\n```\n[PLAN] Per-sprint evaluator assignment:\n  Sprint 1: standard   [low risk]\n  Sprint 2: quality    [medium risk]\n  Sprint 3: strict     [HIGH RISK: auth, payments]\n  Sprint 4: quality    [medium risk]\n```\n\n### Adaptive retry escalation\n\nWhen a sprint fails, the orchestrator escalates the evaluator on each retry:\n\n| Failure count | Retry evaluator | Rationale |\n|---------------|-----------------|-----------|\n| 1st fail | Same mode | Give the Generator another chance |\n| 2nd fail | One tier stricter | Catch what the first evaluator missed |\n| 3rd fail | `ultra` | Maximum scrutiny before human escalation |\n\n### Invoking as a subagent\n\n`pge-orchestrator` can be called from other agents (e.g., OMC autopilot, ralph, team pipelines):\n\n```\nsubagent_type: \"pge-orchestrator\"\nprompt: |\n  USER_PROMPT: build a SaaS analytics dashboard\n  MODE_HINT: auto\n  START_SPRINT: 1\n  DRY_RUN: false\n  EVAL_BACKEND: codex\n```\n\n---\n\n## `pge-idontcaretokenanymore` — Premium Unlimited Pipeline\n\nToken cost is irrelevant. Quality is the only priority. `evaluator-quality` runs 5 independent rounds per sprint — all 5 must pass unanimously (≥ 4/5 on all criteria). Up to 5 retries per sprint.\n\n```bash\npge-idontcaretokenanymore \"build a customer analytics dashboard\"\npge-idontcaretokenanymore \"build a multi-step onboarding flow\" --dry-run\npge-idontcaretokenanymore --resume\n```\n\n**Per-sprint cost:** 5 isolated Evaluator runs + up to 5 Generator retries. Each round is a fully independent Playwright session — no shared context.\n\n**Aggregate report per sprint** (`sprint_N_eval_aggregate.md`):\n- Round-by-round verdicts (R1–R5)\n- Merged Required Fixes from all failing rounds\n- Round Variance Analysis — flags criteria with inconsistent scores across rounds\n\n---\n\n## `pge-god` — God Mode\n\nThe absolute ceiling. Uses `evaluator-godmode` — a new evaluator with **half-point scoring (0–5 in 0.5 increments)** and a **≥ 4.5/5 pass threshold** on all four criteria. Runs 10 unanimous rounds per sprint. Up to 10 retries.\n\n```bash\npge-god \"build a production-grade payment processing system\"\npge-god \"build a HIPAA-compliant patient records viewer\"\npge-god --resume\n```\n\n### `evaluator-godmode` — What makes it different\n\n| | `evaluator-quality` | `evaluator-godmode` |\n|--|--|--|\n| Scoring | Integer (1–5) | Half-point (1.0–5.0) |\n| Pass threshold | ≥ 4/5 | ≥ 4.5/5 |\n| Edge cases | Recommended | **Mandatory battery** |\n| Code review | Yes | **Deep review — reads source files** |\n| Performance | Noted | **Flagged if > 2s load / > 100ms interaction** |\n| Visual audit | Yes | **Pixel-level + responsive breakpoints** |\n| Path to 5.0 | No | **Required for every non-5.0 criterion** |\n\n### Mandatory testing protocol (every round)\n1. Core flow exhaustion — all branches including failure paths\n2. Edge case battery — empty states, boundaries, rapid actions, session persistence, concurrent ops\n3. Error handling audit — every error state must show a user-facing message\n4. Visual perfection audit — responsive, loading states, hover/focus/active states\n5. Performance observation — load time, interaction lag, memory leaks\n6. Code quality deep review — reads implementation files directly\n\n### God Mode aggregate report\nEach sprint produces a `sprint_N_eval_aggregate.md` with:\n- 10-round score table (all four criteria per round)\n- Score Distribution Analysis — min/max/avg per criterion, variance flagging\n- Required Fixes (Union) across all failing rounds\n- **Path to 10/10** — improvement roadmap even on passing sprints\n\n---\n\n## Pipeline Diagram\n\n```\nUser Prompt\n    │\n    ▼\n┌─────────────────────────────────┐\n│  PLANNING                       │\n│  Planner → product_spec.md      │\n│  (+ Complexity Assessment       │\n│   + Evaluator Recommendation)   │\n└────────────────┬────────────────┘\n                 │\n    ┌────────────▼────────────────────────────────────────┐\n    │  SPRINT LOOP  (repeats for each sprint)             │\n    │                                                     │\n    │  CONTRACTING                                        │\n    │  Generator → sprint_N_contract.md                  │\n    │  Evaluator → sprint_N_contract_ratified.md          │\n    │        │                                            │\n    │        ▼                                            │\n    │  IMPLEMENTING                                       │\n    │  Generator → code + git commit                      │\n    │           → sprint_N_handoff.md                    │\n    │        │                                            │\n    │        ▼                                            │\n    │  EVALUATING  (Playwright browser testing)           │\n    │  Evaluator → sprint_N_evaluation.md                 │\n    │        │                                            │\n    │      PASS ──────────────────────► next sprint ──────┘\n    │      FAIL                                           │\n    │        │                                            │\n    │        ▼                                            │\n    │  FIXING                                             │\n    │  Extract Required Fixes → sprint_N_feedback.md      │\n    │  [adaptive: escalate evaluator mode]                │\n    │  Retry → IMPLEMENTING (max 3 attempts)              │\n    │        │                                            │\n    │   3 fails → ESCALATE to user                        │\n    └─────────────────────────────────────────────────────┘\n                 │\n                 ▼\n           DONE — pge_summary.md\n```\n\n---\n\n## Evaluation Criteria\n\nAll evaluators grade on the same four criteria. Pass thresholds differ by mode.\n\n| Criterion | What it measures |\n|-----------|-----------------|\n| **Functionality** | All specified user flows work end-to-end |\n| **Product Depth** | Interactions produce real, meaningful outcomes — not cosmetic |\n| **Visual Design** | UI matches the spec's visual language; no placeholder or lorem ipsum UI |\n| **Code Quality** | No stubs, no critical errors, no unhandled exceptions in hot paths |\n\n### Pass thresholds by evaluator\n\n| Evaluator | Threshold | Notes |\n|-----------|-----------|-------|\n| `evaluator-standard` | ≥ 3/5 on all four | Default |\n| `evaluator-strict` | ≥ 3/5, FAIL-biased | Starts at 2/5. Requires evidence to score up. Edge cases mandatory. |\n| `evaluator-quality` | ≥ 4/5 on all four | Includes code review, performance, visual audit passes |\n\n---\n\n## `pge-workspace/` Layout\n\nAll pipeline artifacts are written to `pge-workspace/` in your working directory. Application code is committed to your working directory by the Generator.\n\n```\npge-workspace/\n├── pge_state.json                        # Pipeline state (Orchestrator only)\n├── pge_summary.md                        # Final report (written on DONE)\n├── product_spec.md                       # Full product specification (Planner)\n│\n├── sprint_1_contract.md                  # Contract proposal (Generator)\n├── sprint_1_contract_ratified.md         # Ratified contract (Evaluator)\n├── sprint_1_handoff.md                   # Implementation summary + startup commands\n├── sprint_1_evaluation.md                # Playwright test results + scores\n├── sprint_1_feedback.md                  # Required fixes (written on FAIL)\n│\n├── sprint_2_contract.md\n├── sprint_2_contract_ratified.md\n│   ...\n│\n# pge-ultra only:\n├── sprint_1_eval_standard.md\n├── sprint_1_eval_strict.md\n├── sprint_1_eval_quality.md\n├── sprint_1_eval_aggregate.md            # Consensus verdict + merged Required Fixes\n│\n# pge-limit (usage guard):\n├── .pause-signal                         # Written by guard when threshold is reached\n└── pge_checkpoint.md                     # Compact resume context (written on PAUSED)\n```\n\n### `pge_state.json` fields\n\n```json\n{\n  \"mode\": \"standard | strict | quality | ultra | orchestrator\",\n  \"phase\": \"PLANNING | CONTRACTING | IMPLEMENTING | EVALUATING | FIXING | DONE | ESCALATED | PAUSED\",\n  \"eval_backend\": \"claude | codex | gemini\",\n  \"sprint_num\": 2,\n  \"total_sprints\": 5,\n  \"fail_count\": 1,\n  \"max_retries\": 3,\n  \"sprint_modes\": { \"1\": \"standard\", \"2\": \"quality\", \"3\": \"strict\" },\n  \"sprint_results\": { \"1\": \"PASS\" },\n  \"last_checkpoint\": \"2026-04-16T10:00:00Z\"\n}\n```\n\n---\n\n## Escalation\n\nIf a sprint fails `max_retries` (default: 3) times, the pipeline halts and presents options:\n\n```\n============================================================\n  PGE ESCALATION — HUMAN INTERVENTION REQUIRED\n============================================================\n  Sprint 3 has failed 3 times.\n  Last evaluation: pge-workspace/sprint_3_evaluation.md\n  Last feedback:   pge-workspace/sprint_3_feedback.md\n\n  Option 1 — Fix manually, then: pge --resume\n  Option 2 — Revise the contract, delete sprint_3_contract_ratified.md, then: pge --resume\n  Option 3 — Skip sprint: pge --sprint 4\n  Option 4 — Abort: delete pge-workspace/pge_state.json\n============================================================\n```\n\n---\n\n## Resuming an Interrupted Session\n\nAny mode supports `--resume`. It reads `pge_state.json`, restores all configuration, and picks up from the last recorded phase. File existence takes priority over state — if `sprint_2_handoff.md` exists but the state says `IMPLEMENTING`, the orchestrator skips to `EVALUATING`.\n\n```bash\npge --resume\npge-ultra --resume\npge-orchestrator --resume\n```\n\n---\n\n## Terminal Tools\n\nNine slash commands for monitoring and managing pipelines directly from Claude Code, plus raw Node.js scripts for use in a separate terminal pane.\n\n### `/pge-update` — Update from inside Claude Code\n\nUpdates PGE to the latest version without leaving Claude Code. Runs git pull + reinstalls all skills and agents.\n\n```\n/pge-update\n```\n\n### `/pge-autolaunch` — Auto-launch toggle\n\nEnables or disables automatic terminal indicator launch when `/pge` is invoked. When enabled, a new Terminal window opens automatically with the live agent indicator.\n\n```\n/pge-autolaunch        # enable (default)\n/pge-autolaunch on     # enable\n/pge-autolaunch off    # disable\n/pge-autolaunch status # show current state\n```\n\nAuto-launch opens the indicator terminal and starts the macOS notification watcher automatically — no manual `node bridge/pge-indicator.cjs` needed.\n\n### `/pge-statusline` — Claude Code status bar integration\n\nEnables or disables the PGE state display in the Claude Code status bar.\n\n```\n/pge-statusline        # enable (default)\n/pge-statusline on     # enable\n/pge-statusline off    # disable\n/pge-statusline status # show current state\n```\n\nWhile a pipeline is active, the status bar shows:\n\n```\n⚙️  PGE quality · sprint 2/5 · evaluator-quality\n```\n\nSilent (empty output) when no pipeline is running.\n\n### `/pge-preflight` — Pre-flight check\n\nVerifies all dependencies before starting a pipeline. Catches missing Playwright MCP, uninitialized git repo, and missing agents/skills before they cause a mid-sprint failure.\n\n```\n/pge-preflight\n```\n\n```\nPGE Pre-flight Check\n\n  ✓  Claude Code found\n  ✓  Node.js v22.x\n  ✓  Git found\n  ✓  Working directory is a git repository\n  ✗  Playwright MCP not found\n     → Add to MCP config: npx @playwright/mcp@latest\n  ✓  PGE agents installed  (planner, generator, evaluator)\n  ✓  PGE skills installed  (/pge, /pge-strict, /pge-quality ...)\n```\n\n### `/pge-clean` — Workspace cleanup\n\nDeletes `pge-workspace/` in the current project to start fresh.\n\n```\n/pge-clean\n```\n\n### `/pge-summary` — Sprint results summary\n\nPretty-prints the pipeline results — sprint-by-sprint pass/fail, evaluator used, scores, and the full `pge_summary.md` report.\n\n```\n/pge-summary\n```\n\n### `/pge-indicator` — Live agent indicator\n\nOpens a new Terminal window with the live agent indicator for the current project.\n\n```\n/pge-indicator\n```\n\n```\n┌─────────────────────────────────────────────────────┐\n│ PGE Orchestrator   quality                          │\n├─────────────────────────────────────────────────────┤\n│ Sprint   2 / 5  ████░░░░░░░░░░░░░░░░░░  20%        │\n│ Phase    Evaluating                                 │\n│ Agent    ● evaluator-quality  (sprint 2)            │\n│ Retries  1 / 3                                      │\n│ Updated  10:42:05 AM                                │\n└─────────────────────────────────────────────────────┘\n  watching pge-workspace/pge_state.json  ·  ctrl+c to exit\n```\n\n### `/pge-eval-backend` — Switch evaluator backend\n\nSelect which AI backend runs the evaluation phase. Persists per-project or globally.\n\n```\n/pge-eval-backend                          → show current backend and config paths\n/pge-eval-backend claude                   → full Playwright evaluation  [default]\n/pge-eval-backend codex                    → Codex CLI via tmux (static code review)\n/pge-eval-backend gemini                   → Gemini CLI via tmux (static code review)\n/pge-eval-backend codex --global           → set global default\n/pge-eval-backend --clear                  → remove project-level override\n```\n\n**Backend comparison:**\n\n| Backend | Testing method | Playwright | Pass threshold |\n|---------|---------------|-----------|----------------|\n| `claude` (default) | Interactive browser + code review | ✅ Full | Per-mode |\n| `codex` | Static code analysis via Codex CLI | ❌ None | Per-mode |\n| `gemini` | Static code analysis via Gemini CLI | ❌ None | Per-mode |\n\nRequires: `tmux` + `codex` or `gemini` CLI in PATH for external backends.\n\nConfig is stored at `pge-workspace/.eval-backend` (project) or `~/.claude/pge-eval-backend` (global).\n\n### `/pge-notify` — macOS notifications\n\nStarts a background notification watcher that fires a system notification when a sprint passes, fails, or the pipeline finishes.\n\n```\n/pge-notify\n```\n\nFires on: **sprint pass**, **sprint fail / retry**, **pipeline done**, **escalation** (human intervention needed).\n\n### `/pge-limit` — Usage-based auto-pause\n\nSet a token usage threshold. When Claude Code usage reaches the specified percentage of the 5-hour or weekly limit, PGE saves a compact checkpoint and stops gracefully at the next phase boundary. Resume after your limit resets with `pge --resume` — no extra context re-read overhead.\n\n```\n/pge-limit <percentage>                   # pause at N% of 5h limit (auto-detect max)\n/pge-limit <percentage> --type weekly     # weekly window\n/pge-limit <percentage> --max <tokens>    # explicit token ceiling (e.g. --max 45000000)\n/pge-limit off                            # disable\n/pge-limit status                         # show current config\n```\n\n**Examples:**\n```\n/pge-limit 80                             # stop at 80% of 5h token limit\n/pge-limit 75 --type weekly               # stop at 75% of weekly limit\n/pge-limit 80 --max 45000000             # explicit 45M token ceiling, stop at 80%\n```\n\n**What happens when the threshold is reached:**\n\n1. Background guard (`pge-usage-guard.cjs`) detects usage ≥ threshold\n2. Writes `pge-workspace/.pause-signal`\n3. Orchestrator picks it up at the next phase boundary (never mid-execution)\n4. Compact checkpoint saved to `pge-workspace/pge_checkpoint.md`\n5. State written as `PAUSED` in `pge_state.json`\n6. macOS notification fires\n7. Resume after limit resets: `pge --resume`\n\nIf `--max` is omitted, the guard falls back to `ccusage` (if installed) to determine usage percentage. Install with: `npm i -g ccusage`\n\n---\n\n### Running tools directly from a terminal\n\nAll tools are also available as Node.js scripts in `bridge/`:\n\n```bash\nnode bridge/pge-indicator.cjs [/path/to/project]\nnode bridge/pge-notify.cjs    [/path/to/project]\nnode bridge/pge-summary.cjs   [/path/to/project]\nnode bridge/pge-preflight.cjs\nnode bridge/pge-clean.cjs [--force]\nnode bridge/pge-statusline.cjs   # outputs status bar line to stdout\n```\n\n---\n\n## Design Principles\n\n**File-based IPC only.**\nAgents communicate exclusively through files in `pge-workspace/`. No shared conversational context. Each agent invocation is a fully isolated subprocess.\n\n**Producer-judge separation.**\nThe Generator and Evaluator for the same sprint are always separate Agent calls — never the same instance. This prevents the Evaluator from rationalizing Generator mistakes.\n\n**State is ground truth.**\nPhase files on disk override `pge_state.json`. The pipeline is resilient to crashes, partial writes, and mid-sprint interruptions.\n\n**Adaptive escalation never de-escalates.**\nWithin a sprint's retries, evaluator strictness can only increase. Once `fail_count` rises, the retry evaluator moves toward stricter — never back.\n\n**Only the Orchestrator writes `pge_state.json`.**\nSubagents (Planner, Generator, Evaluator) write only their designated output files. State management is centralized.\n\n---\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md) for full version history.\n\n| Version | Summary |\n|---------|---------|\n| **2.7.0** | Added `/pge-limit` — usage-based auto-pause with compact checkpoint/resume; background `pge-usage-guard.cjs` monitors token usage and signals pipeline to stop gracefully at the next phase boundary; new `PAUSED` state with `pge --resume` support |\n| **2.6.0** | Added evaluator backend selection (`/pge-eval-backend`) — run evaluation via Codex or Gemini CLI using tmux; added `evaluator-codex` and `evaluator-gemini` agents; `--eval-backend` flag for all pipeline modes |\n| **2.5.0** | Added 8 slash commands (`/pge-statusline`, `/pge-preflight`, `/pge-clean`, `/pge-summary`, `/pge-indicator`, `/pge-notify`, `/pge-update`, `/pge-autolaunch`), MCP server with 11 tools, status bar integration, auto-launch hook |\n| **2.2.0** | Added `pge-orchestrator` adaptive agent with complexity analysis, per-sprint evaluator assignment, and retry escalation |\n| **2.1.0** | Renamed evaluator variants (`evaluator-standard/strict/quality`), added single-evaluator repeated mode in `pge-ultra` |\n| **2.0.0** | Added `pge-strict`, `pge-quality`, `pge-ultra` modes |\n| **1.0.0** | Initial release — core PGE pipeline |\n",
  "bytes": 29046,
  "sha": "daba022494b91e92f3079197ffa5b10f6e5f9d88cbe22aae70eb3d835a391917",
  "repo_slug": "orion-gz/claude-trinity",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_orion_gz_claude_trinity_claude_trinity_7b4ebc0f/readme"
}