Open-source skills for designing and reviewing software with AI agents
Python agent-skillsai-agentsantigravityclaude-codeclaude-code-pluginclaude-skillscodexcodex-plugincoding-agentscontext-engineeringdeveloper-toolsgeminillmmulti-agentprompt-engineeringspec-driven-development
feat: Claude Code, Claude Cowork, Codex, and ChatGPT harness support (#103)
n3wthdbce39ce229c
diff --git a/.agents/plugins/marketplace.json b/.agents/plugins/marketplace.jsonnew file mode 100644index 0000000..f2d8d4e--- /dev/null+++ b/.agents/plugins/marketplace.json@@ -0,0 +1,17 @@+{+ "name": "egm",+ "interface": {+ "displayName": "Elephant-Goldfish Model"+ },+ "plugins": [+ {+ "name": "egm",+ "source": "./",+ "policy": {+ "installation": "AVAILABLE",+ "authentication": "ON_INSTALL"+ },+ "category": "Productivity"+ }+ ]+}diff --git a/.claude-plugin/agents/bootstrap_orchestrator.md b/.claude-plugin/agents/bootstrap_orchestrator.mdnew file mode 100644index 0000000..3d757b8--- /dev/null+++ b/.claude-plugin/agents/bootstrap_orchestrator.md@@ -0,0 +1,15 @@+---+name: egm-bootstrap-orchestrator+description: Orchestrates directory README documentation, partitions subtrees, and coordinates worker subagents.+license: Apache-2.0+model: inherit+---++Read `${CLAUDE_PLUGIN_ROOT}/agents/bootstrap_orchestrator.md` before acting.+Follow that canonical persona's instructions. This adapter keeps all tools,+because the bootstrap skill uses the shell.+When your prompt says to run `egm-bootstrap`, read+`${CLAUDE_PLUGIN_ROOT}/skills/egm_bootstrap/SKILL.md` and follow it. Do not+use the `Skill` tool for EGM skills. When started as a worker+(`is_worker=true`), return the JSON `subtree_index` payload that the skill+specifies, not prose.diff --git a/.claude-plugin/agents/codebase_details.md b/.claude-plugin/agents/codebase_details.mdnew file mode 100644index 0000000..ae2f1f1--- /dev/null+++ b/.claude-plugin/agents/codebase_details.md@@ -0,0 +1,16 @@+---+name: egm-codebase-details+description: Technical accuracy and code reuse reviewer.+license: Apache-2.0+tools: [Read, Grep, Glob]+model: inherit+omitClaudeMd: true+---++Read `${CLAUDE_PLUGIN_ROOT}/agents/codebase_details.md` before reviewing.+Follow that canonical persona's instructions. This adapter defines your Claude+tool and context restrictions. Resolve bundled standards against+`${CLAUDE_PLUGIN_ROOT}`. Remain read-only and use only the task and explicitly+supplied review context.+Before returning findings, read the target and every supplied standard. If a+required file cannot be read, report an incomplete review instead of a verdict.diff --git a/.claude-plugin/agents/comprehension.md b/.claude-plugin/agents/comprehension.mdnew file mode 100644index 0000000..65edd82--- /dev/null+++ b/.claude-plugin/agents/comprehension.md@@ -0,0 +1,16 @@+---+name: egm-comprehension+description: Naive reader and comprehension reviewer.+license: Apache-2.0+tools: [Read, Grep, Glob]+model: inherit+omitClaudeMd: true+---++Read `${CLAUDE_PLUGIN_ROOT}/agents/comprehension.md` before reviewing.+Follow that canonical persona's instructions. This adapter defines your Claude+tool and context restrictions. Resolve bundled standards against+`${CLAUDE_PLUGIN_ROOT}`. Remain read-only and use only the task and explicitly+supplied review context.+Before returning findings, read the target and every supplied standard. If a+required file cannot be read, report an incomplete review instead of a verdict.diff --git a/.claude-plugin/agents/design_critic.md b/.claude-plugin/agents/design_critic.mdnew file mode 100644index 0000000..26a1073--- /dev/null+++ b/.claude-plugin/agents/design_critic.md@@ -0,0 +1,16 @@+---+name: egm-design+description: Architecture and design critic.+license: Apache-2.0+tools: [Read, Grep, Glob]+model: inherit+omitClaudeMd: true+---++Read `${CLAUDE_PLUGIN_ROOT}/agents/design_critic.md` before reviewing.+Follow that canonical persona's instructions. This adapter defines your Claude+tool and context restrictions. Resolve bundled standards against+`${CLAUDE_PLUGIN_ROOT}`. Remain read-only and use only the task and explicitly+supplied review context.+Before returning findings, read the target and every supplied standard. If a+required file cannot be read, report an incomplete review instead of a verdict.diff --git a/.claude-plugin/agents/implementation_readiness.md b/.claude-plugin/agents/implementation_readiness.mdnew file mode 100644index 0000000..08bdc18--- /dev/null+++ b/.claude-plugin/agents/implementation_readiness.md@@ -0,0 +1,16 @@+---+name: egm-implementation-readiness+description: Implementation readiness reviewer.+license: Apache-2.0+tools: [Read, Grep, Glob]+model: inherit+omitClaudeMd: true+---++Read `${CLAUDE_PLUGIN_ROOT}/agents/implementation_readiness.md` before reviewing.+Follow that canonical persona's instructions. This adapter defines your Claude+tool and context restrictions. Resolve bundled standards against+`${CLAUDE_PLUGIN_ROOT}`. Remain read-only and use only the task and explicitly+supplied review context.+Before returning findings, read the target and every supplied standard. If a+required file cannot be read, report an incomplete review instead of a verdict.diff --git a/.claude-plugin/agents/structural.md b/.claude-plugin/agents/structural.mdnew file mode 100644index 0000000..bd978f6--- /dev/null+++ b/.claude-plugin/agents/structural.md@@ -0,0 +1,16 @@+---+name: egm-structural+description: Document structure reviewer.+license: Apache-2.0+tools: [Read, Grep, Glob]+model: inherit+omitClaudeMd: true+---++Read `${CLAUDE_PLUGIN_ROOT}/agents/structural.md` before reviewing.+Follow that canonical persona's instructions. This adapter defines your Claude+tool and context restrictions. Resolve bundled standards against+`${CLAUDE_PLUGIN_ROOT}`. Remain read-only and use only the task and explicitly+supplied review context.+Before returning findings, read the target and every supplied standard. If a+required file cannot be read, report an incomplete review instead of a verdict.diff --git a/.claude-plugin/agents/style.md b/.claude-plugin/agents/style.mdnew file mode 100644index 0000000..9d55d5e--- /dev/null+++ b/.claude-plugin/agents/style.md@@ -0,0 +1,16 @@+---+name: egm-style+description: Technical writing reviewer.+license: Apache-2.0+tools: [Read, Grep, Glob]+model: inherit+omitClaudeMd: true+---++Read `${CLAUDE_PLUGIN_ROOT}/agents/style.md` before reviewing.+Follow that canonical persona's instructions. This adapter defines your Claude+tool and context restrictions. Resolve bundled standards against+`${CLAUDE_PLUGIN_ROOT}`. Remain read-only and use only the task and explicitly+supplied review context.+Before returning findings, read the target and every supplied standard. If a+required file cannot be read, report an incomplete review instead of a verdict.diff --git a/.claude-plugin/agents/synthesizer.md b/.claude-plugin/agents/synthesizer.mdnew file mode 100644index 0000000..a9a29a3--- /dev/null+++ b/.claude-plugin/agents/synthesizer.md@@ -0,0 +1,15 @@+---+name: egm-synthesizer+description: Intermediate Swarm Compiler and Aggregator coordinating parallel Goldfish reviewers, deduplicating findings, and compiling deliverable reports.+license: Apache-2.0+tools: [Agent, Read, Grep, Glob, Write]+model: inherit+---++Read `${CLAUDE_PLUGIN_ROOT}/agents/synthesizer.md` before acting.+Follow that canonical persona's instructions. This adapter defines your Claude+tool restrictions: spawn reviewers with the Agent tool using the plugin's+registered reviewer types (for example `egm:egm-zoom-out`), read files, and+write the consolidated report. You cannot run shell commands or use MCP+connectors. Resolve bundled personas and standards against+`${CLAUDE_PLUGIN_ROOT}` and pass absolute paths to each reviewer.diff --git a/.claude-plugin/agents/zoom_out.md b/.claude-plugin/agents/zoom_out.mdnew file mode 100644index 0000000..b6866c1--- /dev/null+++ b/.claude-plugin/agents/zoom_out.md@@ -0,0 +1,16 @@+---+name: egm-zoom-out+description: Simplicity and scope reviewer.+license: Apache-2.0+tools: [Read, Grep, Glob]+model: inherit+omitClaudeMd: true+---++Read `${CLAUDE_PLUGIN_ROOT}/agents/zoom_out.md` before reviewing.+Follow that canonical persona's instructions. This adapter defines your Claude+tool and context restrictions. Resolve bundled standards against+`${CLAUDE_PLUGIN_ROOT}`. Remain read-only and use only the task and explicitly+supplied review context.+Before returning findings, read the target and every supplied standard. If a+required file cannot be read, report an incomplete review instead of a verdict.diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.jsonnew file mode 100644index 0000000..19bee74--- /dev/null+++ b/.claude-plugin/marketplace.json@@ -0,0 +1,13 @@+{+ "name": "egm",+ "owner": {+ "name": "Google LLC"+ },+ "plugins": [+ {+ "name": "egm",+ "source": "./",+ "description": "Elephant-Goldfish Model: spec-driven development with deep-context drafting and zero-context Goldfish reviews."+ }+ ]+}diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.jsonnew file mode 100644index 0000000..260d531--- /dev/null+++ b/.claude-plugin/plugin.json@@ -0,0 +1,22 @@+{+ "name": "egm",+ "version": "0.1.0",+ "description": "Elephant-Goldfish Model: spec-driven development with deep-context drafting and zero-context Goldfish reviews.",+ "author": {+ "name": "Google LLC"+ },+ "homepage": "https://egm.dev",+ "repository": "https://github.com/google/elephant-goldfish-model",+ "license": "Apache-2.0",+ "agents": [+ "./.claude-plugin/agents/bootstrap_orchestrator.md",+ "./.claude-plugin/agents/codebase_details.md",+ "./.claude-plugin/agents/comprehension.md",+ "./.claude-plugin/agents/design_critic.md",+ "./.claude-plugin/agents/implementation_readiness.md",+ "./.claude-plugin/agents/structural.md",+ "./.claude-plugin/agents/style.md",+ "./.claude-plugin/agents/synthesizer.md",+ "./.claude-plugin/agents/zoom_out.md"+ ]+}diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.jsonnew file mode 100644index 0000000..0ee3fb3--- /dev/null+++ b/.codex-plugin/plugin.json@@ -0,0 +1,15 @@+{+ "name": "egm",+ "version": "0.1.0",+ "description": "Elephant-Goldfish Model: spec-driven development with deep-context drafting and zero-context Goldfish reviews.",+ "homepage": "https://egm.dev",+ "repository": "https://github.com/google/elephant-goldfish-model",+ "license": "Apache-2.0",+ "skills": "./skills/",+ "interface": {+ "displayName": "Elephant-Goldfish Model",+ "shortDescription": "Spec-driven development with Goldfish reviews",+ "developerName": "Google LLC",+ "category": "Productivity"+ }+}diff --git a/README.md b/README.mdindex cc3693a..184ec64 100644--- a/README.md+++ b/README.md@@ -3,41 +3,28 @@[](LICENSE)[](https://egm.dev)-Elephant-Goldfish Model is an open-source framework and methodology for Spec-Driven Development (SDD) with autonomous AI coding agents.+Elephant-Goldfish Model (EGM) is an open-source plugin for Spec-Driven Development with AI coding agents. Deep-context Elephant sessions draft specifications, and isolated zero-context Goldfish subagents stress-test them before you write code.-It anchors development in context-rich system descriptions and adversarial multi-agent reviews, making complex codebases easier for both humans and AI to navigate, verify, and evolve.+## Install----+| Harness | Install |+| :--- | :--- |+| **Any AI agent** | Ask your agent: `Install https://github.com/google/elephant-goldfish-model` |+| **Antigravity** | `agy plugin install https://github.com/google/elephant-goldfish-model` (or `/plugin` in IDE) |+| **Claude Code** | `claude plugin marketplace add google/elephant-goldfish-model && claude plugin install egm@egm` |+| **Codex** | `codex plugin marketplace add google/elephant-goldfish-model && codex plugin add egm@egm` |+| **Claude Cowork / ChatGPT** | See [Harnesses](docs/harnesses.md) for desktop and workspace setup |-## Philosophy--EGM uses two animal metaphors to describe how to prompt, constrain, and structure AI agents at different stages of the software development lifecycle:--* π **The Elephant (Remembers Everything)**:- Deep-context agents loaded with system history, architecture diagrams, component boundaries, and user journeys. The Elephant conducts structured brainstorming, probes operational limits, and drafts comprehensive specifications.-* π **The Goldfish (Zero-Context Memory)**:- Stateless, isolated subagents that read only the draft design specification and live source code without access to conversational bias. The Goldfish swarm subjects designs to adversarial stress-testing across multiple conflicting perspectives (Design Critic, Naive Reader, Tech Lead, Codebase Auditor, Structural Validator, Style Editor, and Zoom Out Architect; defined under `agents/`).-* π§βπ» **The Human (Owns the Outcomes)**:- AI is an exploration partner and automated auditor, but human engineers own architectural decisions, trade-offs, and final outcomes.--For the foundational essay introducing this methodology, see Dave Rensin's article: [Elephants, Goldfish, and the New Golden Age of Software Engineering](https://medium.com/@drensin/elephants-goldfish-and-the-new-golden-age-of-software-engineering-c33641a48874).-----+## Quickstart-## Repo Structure+1. **Ideate & Stress-Test**: Run `/egm-brainstorm` to explore problem boundaries and test early concepts with a Goldfish swarm.+2. **Draft**: Run `/egm-draft` to convert the concept brief into a living design document under `docs/designs/<feature>.md`.+3. **Review & Resolve**: Run `/egm-review docs/designs/<feature>.md` to run the multi-stage Goldfish reviewer swarm.+4. **Submit & Implement**: Submit the verified design doc via pull request and implement code against the approved specification.-```-βββ agents/ # Stateless reviewer and orchestrator persona prompts-βββ docs/ # Documentation, guides, and FAQ-β βββ designs/ # Living technical design specifications-βββ resources/-β βββ document_standards/ # Quality evaluation rubrics and standards-βββ skills/ # Modular agent skills (Brainstorm, Draft, Review, etc.)-βββ tests/- βββ evals/ # Automated YAML evaluation benchmarks-```+In Claude Code, commands use the `/egm:` prefix (for example `/egm:egm-brainstorm`).----+For detailed setup guides and walkthroughs, see [Getting Started](docs/getting_started.md), [Harnesses](docs/harnesses.md), and [Framework Architecture](docs/designs/architecture.md).## Skills@@ -45,28 +32,21 @@ For the foundational essay introducing this methodology, see Dave Rensin's artic| :---- | :------ | :---------- || **Brainstorm** | `/egm-brainstorm` | Zero-doc ideation tool using a multi-lens Goldfish shootdown swarm to stress-test early concepts. || **Draft** | `/egm-draft` | Iterative, section-by-section markdown design specification compiler. |-| **Review** | `/egm-review` | Multi-stage verification pipeline orchestrator (Zoom Out β Comprehension β Critic β Readiness). |+| **Review** | `/egm-review` | Multi-stage verification pipeline orchestrator (Zoom Out -> Comprehension -> Critic -> Readiness). || **Review Loop** | `/egm-review-loop` | Concurrent review subagent dispatch engine supporting direct and hierarchical dispatch. || **Review Resolve** | `/egm-resolve` | Interactive triage and automated patch application engine for review findings. || **Drift Report** | `/egm-drift-report` | Sequential AST scanner detecting divergence between checked-in specs and live code. || **Bootstrap** | `/egm-bootstrap` | Recursive bottom-up codebase documentation generator and sentinel-block upserting engine. |------## Quickstart+## Philosophy-1. **Ideate & Stress-Test**:- Run `/egm-brainstorm` to explore problem boundaries and subject raw concepts to a multi-lens Goldfish shootdown swarm.-2. **Draft**:- Run `/egm-draft` to convert the egm-brainstorm output (a concept brief) into a living design document under `docs/designs/<feature>.md` (or user designated directory).-3. **Review & Resolve**:- Run `/egm-review docs/designs/<feature>.md` to launch the multi-stage Goldfish reviewer swarm on the design document produced by egm-draft (interactive resolution via `/egm-resolve` is integrated directly into the review loop).-4. **Submit & Implement**:- Submit the verified design doc via Pull Request, and implement code against the approved specification.+EGM uses two animal metaphors to structure AI agents across the software development lifecycle:-For detailed setup, supported harnesses (**Antigravity** and **Gemini CLI**), and walkthroughs, see [Getting Started](docs/getting_started.md), [Harnesses](docs/harnesses.md), and the [Framework Architecture](docs/designs/architecture.md).+* π **The Elephant (Remembers Everything)**: Deep-context agents load system history, architecture diagrams, component boundaries, and user journeys. The Elephant runs structured brainstorming, probes operational limits, and drafts comprehensive specifications.+* π **The Goldfish (Zero-Context Memory)**: Stateless, isolated subagents read only the draft spec and live source code, without conversational bias. The Goldfish swarm stress-tests designs from conflicting perspectives. Personas in `agents/` include Design Critic, Naive Reader, Tech Lead, Codebase Auditor, Structural Validator, Style Editor, and Zoom Out Architect.+* π§βπ» **The Human (Owns the Outcomes)**: AI is an exploration partner and automated auditor, while human engineers own architectural decisions, trade-offs, and final outcomes.----+For the foundational essay introducing this methodology, see Dave Rensin's article: [Elephants, Goldfish, and the New Golden Age of Software Engineering](https://medium.com/@drensin/elephants-goldfish-and-the-new-golden-age-of-software-engineering-c33641a48874).## Contributing@@ -74,6 +54,6 @@ We welcome community contributions! Please review [Harnesses](docs/harnesses.md)## License-This project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details.+Apache 2.0 License applies to this project - see the [LICENSE](LICENSE) file for details.This is not an officially supported Google product.diff --git a/TESTING.md b/TESTING.mdindex d866ef6..e784e0b 100644--- a/TESTING.md+++ b/TESTING.md@@ -29,7 +29,8 @@ pip install -r requirements-dev.txtUnit tests run offline without network access, API keys, or modeldependencies. They validate YAML frontmatter schemas and relative link-integrity.+integrity, the portable plugin manifest, shared metadata consistency, and+marketplace/component paths.```bash# Run all unit tests@@ -42,3 +43,59 @@ pytest tests/unit -vpytest tests/unit/test_frontmatter.py -vpytest tests/unit/test_link_integrity.py -v```+---++## Native Claude Reviewer Probe (Opt-in)++With an authenticated Claude Code 2.1.271+ installation, run:++```bash+EGM_CLAUDE_LIVE=1 pytest tests/integration/test_claude.py+```++This uses the account's model quota. It loads a copy of the plugin, invokes+the review skill, and checks that a native reviewer reads only its persona and+sees no parent or project `CLAUDE.md` context. See [Claude integration](docs/claude.md).+---++## Native Codex Integration Tests (Opt-in)++Opt-in integration tests run the live candidate through a temporary Codex marketplace:++```sh+EGM_CODEX_LIVE=1 pytest tests/integration/test_codex.py -v+```++Tests verify candidate installation, fresh-context reviewer isolation, and workflow artifacts.+Each test runs with an authenticated Codex CLI in an isolated sandbox.+See [Codex integration](docs/codex.md).++---++## Harness Test Record++A harness counts as supported after `/egm-brainstorm`, `/egm-draft`, and+`/egm-review` run end to end through its plugin install (see+[Harnesses](docs/harnesses.md)). Add a row for each run.++| Harness | Version | Date | Install | Brainstorm | Draft | Review | Notes |+| --- | --- | --- | --- | --- | --- | --- | --- |+| Antigravity CLI | 1.4.5 | 2026-10-22 | Pass; validator warnings | Pass (fixture) | Pass (fixture) | Pass (fixture) | Temporary HOME with no hooks, MCP servers, or other plugins. The isolation probe passed on the native child transcript. 16 native reviewers ran. Stages 5 to 9 ran in sequence by timestamp. All required reads occurred. Five stage reports exist. No code was written. The final design differs from the draft in one `Status` line. Not tested: interactive approvals, `egm-bootstrap`, and synthesizer nesting. The bootstrap skill is larger than the load limit. |+| Claude Code | 2.1.308 | 2026-10-22 | Pass (`--plugin-dir`) | Pass (fixture) | Pass (fixture) | Pass after fix (fixture) | Isolation probe passed. Initial stage-order failure retained; focused nine-reviewer rerun verifies sequential stages and required reads. Process shutdown and parent no-shell fixture limits remain in the full report. |+| Claude Cowork | Opus 5.5 Medium, connected cloud task | 2026-10-22 | Pass (ZIP) | Completed with direct-dispatch recovery | Completed | Partial: stages 5β7 | Usage limit interrupted stage 8. Final artifacts, stage 9 and actual isolation-child output remain unverified; #105. Earlier complete run is reported separately. |+| OpenAI Codex | 0.163.0 | 2026-10-22 | Pass | Pass (fixture) | Pass (fixture) | Pass (fixture) | Two live tests passed in 573.13s; isolation, 15 native reviewers, ordered stages and required reads verified. |+| ChatGPT Work | GPT-6.1 Sol, Light | 2026-10-22 | Pass; installed hashes verified | Completed | Completed | Nine native reviewers completed | Fresh probe returned UNKNOWN. Artifact download/final audit and full child tool traces remain outstanding; #106. |++### Interpreting native test results++Keep full run reports in the [PR description](https://github.com/google/elephant-goldfish-model/pull/103).+This table is a summary. Record the tested commit, client version, commands,+native evidence, and limitations in each report. Parse JSONL on literal LF;+Python `splitlines()` also splits valid Unicode characters inside JSON strings.++Track open cloud verification gaps in [#105 (Cowork)](https://github.com/google/elephant-goldfish-model/issues/105) and [#106 (ChatGPT Work)](https://github.com/google/elephant-goldfish-model/issues/106).++- Inspect native tool traces for reviewer launches, completion, and intended resource reads.+- Verify sequential stage execution and persona lenses in addition to artifact existence.+- Distinguish fixture design findings from execution failures of the review workflow.+- Keep installation, execution, and transcript isolation results recorded separately.diff --git a/docs/claude.md b/docs/claude.mdnew file mode 100644index 0000000..57b889f--- /dev/null+++ b/docs/claude.md@@ -0,0 +1,105 @@+<!--+Copyright 2026 Google LLC.+SPDX-License-Identifier: Apache-2.0+-->++# Claude Code integration++Use Claude Code 2.1.271 or later for `omitClaudeMd` support. Older versions+must not be treated as verified Goldfish isolation environments.++## Invocation and resources++```sh+claude plugin marketplace add google/elephant-goldfish-model+claude plugin install egm@egm+```++Enable the installed plugin with `claude plugin enable egm@egm`.+Start messages with `/egm:egm-brainstorm`, `/egm:egm-draft`, or `/egm:egm-review`.+Skills retain `disable-model-invocation: true`: their absence from automatic+skill discovery is expected. The `Skill` tool refuses these skills, so to run+another EGM skill (for example `egm-review-loop` or `egm-resolve` during review+Stages 7 and 9), read its `SKILL.md` and follow it in the same thread. Do not+use the `Skill` tool for EGM skills. Keep drafting and orchestration in the+main context.+Claude Code has no artifact comments. To request draft revisions, edit+`design_draft.md` directly or add `<!-- -->` comments in it, or give the notes+in chat; the model reads the draft again before each revision.+Write briefs, drafts, and reports to the user's working directory. The+per-session scratchpad is not the artifact directory: it belongs to one+session, and the deliverables must outlive it.+In Claude Code, `egm:egm-synthesizer` may spawn reviewers (nesting is allowed+up to 3 levels by default), or the main context may dispatch reviewers directly.+In Claude Cowork, subagents cannot spawn further subagents, so dispatch+reviewers directly from the main context instead of launching a synthesizer+child. In both cases the main context collects findings and writes the report.+Keep review stages 5, 6, 7, 8, and 9 sequential. Parallelize only reviewers+within the current stage. Wait for every reviewer in that stage, write its+report, and complete required remediation before dispatching the next stage.+Uninterrupted mode skips human checkpoints, not these stage dependencies.++Claude substitutes `${CLAUDE_PLUGIN_ROOT}` in plugin skill and agent bodies. Use that+resolved absolute root for `agents/`, `resources/`, and `docs/`; use the invoked+skill's directory for its `references/`. This standalone guide is read as a file,+so placeholders here are explanatory: use the root already resolved in the+invoked skill. Never guess a cache version or search another installed copy.+Review targets and generated artifacts belong to the user's workspace, not the+plugin cache. Pass absolute resource and target paths to each reviewer.++Personas and standards live in the plugin cache, outside the project. Reading+them is not pre-approved: in an interactive session each read prompts the user,+and in a headless session with no permission rules the read fails and the+reviewer reports an incomplete review. For headless runs pass+`--allowedTools Read,Grep,Glob` or add equivalent `permissions.allow` rules+for the plugin root. Approve these prompts in interactive sessions; a+reviewer that cannot read its persona or standard has not reviewed.++## Reviewer isolation++Spawn a new native Agent of the plugin's registered reviewer type for each+independent review, for example `egm:egm-zoom-out`. Do not fork the conversation+or resume a previous reviewer. Provide only the task, target, persona/standard+paths, and explicitly supplied Goldfish context; do not copy parent deliberation.++Claude adapters in `.claude-plugin/agents/` declare `tools: [Read, Grep, Glob]`,+`model: inherit`, and `omitClaudeMd: true`. Each adapter reads its canonical+persona from `agents/` through `${CLAUDE_PLUGIN_ROOT}`. Keep Claude tool names+out of shared persona frontmatter: other hosts can interpret `tools` themselves.+Reviewers cannot edit files or run shell commands, and no persistent `memory`+is configured. The synthesizer adapter declares+`tools: [Agent, Read, Grep, Glob, Write]` so it can spawn reviewers and write+reports but cannot run shell commands or use the session's MCP connectors.+The bootstrap orchestrator adapter keeps all tools because the bootstrap+skill uses the shell; it routes workers to the bootstrap `SKILL.md` so they+return the JSON `subtree_index` instead of prose. The parent handles fixes.+Reviewers cannot open URLs. Do not pass documentation URLs in+`GoldfishContext` to Claude reviewers: save the raw page as a file in the+workspace and pass that path instead.++Normal subagents exclude parent conversation history. `omitClaudeMd` additionally+excludes user/project/local instruction files, but managed policies still apply.+This is context and tool isolation, not filesystem isolation: reviewers can read+accessible files. Pass any required review constraints explicitly and keep+unrelated history, logs, and memory out of the review task.++For local testing, load a uniquely named copy with `claude --plugin-dir <copy>`+to avoid confusion with an already installed `egm` plugin. Validate it with+`claude plugin validate <copy>/.claude-plugin/plugin.json`.++## Claude Cowork++Claude Cowork uses the same `.claude-plugin` package as Claude Code.+Install the plugin from claude.ai/plugins or the Cowork plugin panel via marketplace `google/elephant-goldfish-model`.+For a candidate package, Customize > Plugins > Add plugin > Upload plugin+accepts a ZIP containing the Claude manifest, adapters, and shared runtime files.+Install it and choose **Try in chat**. Record whether the resulting task runs+locally or in the cloud; the tested desktop surface used cloud tasks.+Verify resource resolution and reviewer tools in the actual Cowork session.+Installation alone does not establish that Claude Code's subagent settings or+`${CLAUDE_PLUGIN_ROOT}` substitution work on that surface.+Local testing with `claude --plugin-dir` is supported in Claude Code only.++References: [plugin paths](https://code.claude.com/docs/en/plugins-reference),+[skill invocation](https://code.claude.com/docs/en/skills), and+[subagent context and tools](https://code.claude.com/docs/en/sub-agents).diff --git a/docs/codex.md b/docs/codex.mdnew file mode 100644index 0000000..a2bb4b5--- /dev/null+++ b/docs/codex.md@@ -0,0 +1,105 @@+<!--+Copyright 2026 Google LLC.+SPDX-License-Identifier: Apache-2.0+-->++# Codex integration++## Install and locate the plugin++Install the whole plugin, including its personas and standards:++```sh+codex plugin marketplace add google/elephant-goldfish-model+codex plugin add egm@egm+```++Start a fresh session after installation. Select the installed `egm` skill+from the available skills. Use its discovered absolute `SKILL.md` path;+do not assume a particular cache directory, version, or checkout location.++From `<plugin>/skills/<skill>/SKILL.md`, the plugin root is three parent+directories above the file. Resolve bundled `agents/`, `resources/`, and+`docs/` paths against that root. Resolve `references/` against the active+skill's directory. Resolve user documents and generated artifacts against+the user's working directory. Never substitute similarly named files in the+user's project for bundled personas or standards.++In ChatGPT Work, a skill may be exposed through a cloud resource identifier+while supporting files live in the installed local bundle. Use the installed+path supplied by the skill inventory or installation metadata for those files;+do not construct cloud resource identifiers for arbitrary supporting paths.+If no installed path is available, report the missing capability instead of+guessing a cache location. Read reviewer filenames and frontmatter from the+bundle: a role such as `egm-design` maps to `agents/design_critic.md`, not+`agents/design.md`. Confirm each resolved path before dispatch.++## Fresh-context reviewers++Inspect the available native subagent tool schema. Tool names can be+namespaced and vary by Codex version. When `spawn_agent` exposes+`fork_context`, explicitly set `fork_context: false` for every Goldfish.+When the schema instead exposes `fork_turns`, use `fork_turns: "none"`.+This applies to reviewers launched by a synthesizer too. Use a general-purpose agent+and pass absolute paths to the persona, standards, target document, and+explicitly selected reading list. Do not pass the parent transcript, private+reasoning, or answers the document is supposed to explain.++Require the reviewer to read its persona, target, and every supplied standard+before returning findings. A missing read or inaccessible file is an incomplete+review, not a clean result. Verify native tool results when the host exposes+them; a parent-written completion summary is not equivalent evidence.++Wait for actual reviewer completion before synthesizing findings. Propagate+failures and timeouts; a launched reviewer is not a completed review. If+nesting is unavailable, dispatch reviewers directly from the parent while+preserving the same isolation. If the available tool cannot establish a fresh+context, stop the Goldfish review and report that limitation.++Fresh conversation context does not isolate the filesystem, configured memory+services, or project instructions. Do not retrieve conversation history or+memory to supply missing design context. An isolation test should use a unique+parent-only marker and check the actual child result, not the parent's claim.++## Questions and artifacts++The shared skills' question payloads describe the intended interaction, not a+literal Codex API. Use a structured question tool only when it is available+and permitted in the current mode, mapping to its actual schema. Otherwise+ask one plain-text question and wait for the answer. Preserve the skill's+readiness and section approval gates; tool unavailability is not approval.++Link generated artifacts with absolute-path Markdown links such as+`[design draft](/absolute/project/design_draft.md)`. For paths containing+spaces use `[design draft](</absolute/my project/design_draft.md>)`.+Do not use `file://` links in Codex chat.++## Verification++Run the offline packaging checks with `pytest tests/unit`. The opt-in native+workflow tests are documented in [TESTING.md](../TESTING.md). They require+an authenticated Codex CLI and consume model usage. Installing or discovering+the plugin alone does not establish end-to-end workflow support.++## ChatGPT++For personal testing, open Plugins > Add > Upload plugin archive in ChatGPT.+Package the runtime files from the repository root:++```sh+zip -r egm-chatgpt.zip plugin.json .codex-plugin skills agents resources docs LICENSE README.md+```++Upload the archive, install the plugin, and use **Try in chat** in a new Work+chat. This path was exercised separately from workspace marketplace import.+Keep repository marketplace catalogs and development files outside this archive.++Enterprise, Business, and Edu workspaces can import the plugin via Admin > Plugins > Add > Import marketplace.+Set the repository URL to `https://github.com/google/elephant-goldfish-model` and marketplace path to `.agents/plugins`.+Skills are accessible via `@egm` for direct interaction.+Check the native tools in the current chat before starting a Goldfish review.+Some ChatGPT Work sessions expose native `spawn_agent` with `fork_turns: "none"`.+Use the fresh-context instructions above when those tools are available. If+they are absent, stop and report that isolation is unavailable; never simulate+reviewers in the parent context. Availability in one Work session does not+establish support across every ChatGPT mode or account.diff --git a/docs/designs/architecture.md b/docs/designs/architecture.mdindex 7876f4e..0207b1b 100644--- a/docs/designs/architecture.md+++ b/docs/designs/architecture.md@@ -75,12 +75,9 @@ Stateless system prompt instructions for isolated Goldfish reviewer subagentsStructural Validator, Style Editor, and Synthesizer).### 3. Document Standards (`resources/document_standards/`)-Objective evaluation rubrics used by Goldfish reviewers to grade specifications:-* `heilmeier-standard.md`: Problem clarity and value proposition.-* `zoom-out-standard.md`: Simplicity, YAGNI, and codebase reuse.-* `feature-spec-standard.md`: Architecture completeness and scale limits.-* `implementation-readiness-standard.md`: Path verification and test readiness.-* `re-implementation-standard.md`: Codebase state documentation bar.+Goldfish reviewers load the versioned rubrics listed in the+[shared runtime resources](../../resources/README.md). Those files own the+evaluation requirements; this design describes how the layers use them.### 4. Living Documentation (`docs/`)User guides (`getting_started.md`, `faq.md`) and technical design specificationsdiff --git a/docs/designs/draft.md b/docs/designs/draft.mdindex abb3576..b20bed0 100644--- a/docs/designs/draft.md+++ b/docs/designs/draft.md@@ -177,11 +177,13 @@ To support lightweight provenance tracking and human inspection, all design## Standards Alignment-| Authoring Step | Governing Standard | Focus Area |-| :------------- | :----------------- | :--------- |-| Architecture Outline | [`zoom-out-standard.md`](../../resources/document_standards/zoom-out-standard.md) | Simplicity, YAGNI, existing infrastructure reuse |-| Document Structure | [`feature-spec-standard.md`](../../resources/document_standards/feature-spec-standard.md) | Standard heading hierarchy, CUJs, failure modes |-| Detailed Plan | [`implementation-readiness-standard.md`](../../resources/document_standards/implementation-readiness-standard.md) | Exhaustive file listing, test strategies, no code dumps |+Read the linked standard for its requirements.++| Authoring Step | Governing Standard |+| :------------- | :----------------- |+| Architecture Outline | [Zoom-out standard](../../resources/document_standards/zoom-out-standard.md) |+| Document Structure | [Feature specification standard](../../resources/document_standards/feature-spec-standard.md) |+| Detailed Plan | [Implementation readiness standard](../../resources/document_standards/implementation-readiness-standard.md) |--------------------------------------------------------------------------------diff --git a/docs/designs/review.md b/docs/designs/review.mdindex 2b52332..8559c56 100644--- a/docs/designs/review.md+++ b/docs/designs/review.md@@ -120,20 +120,10 @@ All reviewer persona prompts reside under [`agents/`](../../agents/):## Document Standards & Rubrics (`resources/document_standards/`)-Reviewers evaluate drafts against versioned markdown standards:--* **`zoom-out-standard.md`**: Enforces root-problem focus, simplicity, YAGNI,- anti-weeds altitude control, and platform infrastructure reuse.-* **`heilmeier-standard.md`**: Evaluates objectives, existing limitations,- novelty, impact, risks, costs, and quantifiable verification metrics.-* **`feature-spec-standard.md`**: Mandates standard feature specification- sections (CUJs, architecture diagrams, error handling, telemetry).-* **`implementation-readiness-standard.md`**: Sets the bar for actionable- implementation plans (complete file targets, explicit rationale, testing- matrices, no code blocks).-* **`re-implementation-standard.md`**: Evaluates whether a specification is- sufficiently clear and self-contained that a clean-room implementation can- reproduce the system without author guidance.+Reviewers evaluate drafts against the versioned standards listed in the+[shared runtime resources](../../resources/README.md). Read the actual standard+for its requirements. The stage breakdown above maps each review to its+standards; it does not replace those rubrics.--------------------------------------------------------------------------------diff --git a/docs/getting_started.md b/docs/getting_started.mdindex 2634052..688b4d0 100644--- a/docs/getting_started.md+++ b/docs/getting_started.md@@ -24,10 +24,7 @@ emerging patterns and tried to make it easier to get started with fewer steps.## Runtime Setup-In our first release, the EGM skills and personas are packaged for-**Antigravity** and **Gemini CLI** (see [Harnesses](harnesses.md) for-installation instructions). We welcome contributors who want to help add-support for other agent harnesses!+The EGM skills and personas are packaged as a plugin for **Antigravity**, **Claude Code**, **Claude Cowork**, **OpenAI Codex**, and **ChatGPT Work** (see [Harnesses](harnesses.md) for installation instructions).1. **Skills**: The skills in `skills/` can be installed via the plugin/extensionmanifest or invoked via slash commands (e.g. `/egm-brainstorm`,diff --git a/docs/harnesses.md b/docs/harnesses.mdindex 2555651..512126a 100644--- a/docs/harnesses.md+++ b/docs/harnesses.md@@ -8,8 +8,11 @@ text.| Harness | Install || --- | --- |-| Antigravity | `/plugin`, then install from `https://github.com/google/elephant-goldfish-model` |-| Gemini CLI | `gemini extensions install https://github.com/google/elephant-goldfish-model` |+| Antigravity | `agy plugin install https://github.com/google/elephant-goldfish-model` (or `/plugin` in the IDE) |+| Claude Code | `claude plugin marketplace add google/elephant-goldfish-model && claude plugin install egm@egm` |+| Claude Cowork | Install from claude.ai/plugins or the Cowork plugin panel via marketplace `google/elephant-goldfish-model` |+| Codex | `codex plugin marketplace add google/elephant-goldfish-model && codex plugin add egm@egm` |+| ChatGPT | Personal testing: Plugins > Add > Upload plugin archive; see [packaging](codex.md#chatgpt). Workspace import: Admin > Plugins > Add > Import marketplace, repo URL `https://github.com/google/elephant-goldfish-model`, path `.agents/plugins` |Install the whole plugin. Skill-only installers that copy `skills/` alonebreak EGM, because the skills read `agents/` and@@ -17,16 +20,35 @@ break EGM, because the skills read `agents/` and## Manifests+Root `plugin.json` is the canonical source for plugin identity, version,+description, and publisher metadata. It declares the portable Agent Plugins+1.0.0 schema. Update shared values there first, then update the compatibility+manifests; unit tests reject metadata drift. Keep platform-specific fields in+their existing manifests until installation tests justify removing them.++Marketplace files are discovery catalogs pointing to this package, not copies+of its skills. In particular, `.agents/plugins/` contains the Codex catalog,+while `agents/` contains reviewer personas. All hosts share the same `skills/`,+`agents/`, and `resources/` content.+| Harness | Manifest | Skills | Subagents || --- | --- | --- | --- || Antigravity | `plugin.json` | `skills/` (default) | `agents/` (default) |-| Gemini CLI | `gemini-extension.json` | `skills/` (default) | `agents/` (default) |+| Claude Code | `.claude-plugin/plugin.json`, `.claude-plugin/marketplace.json` | `skills/` (default) | Claude adapters and orchestrators listed in `plugin.json` `agents` |+| Claude Cowork | `.claude-plugin/plugin.json`, `.claude-plugin/marketplace.json` | `skills/` (default) | Subagents run inside Cowork; hooks n/a |+| Codex | `.codex-plugin/plugin.json`, `.agents/plugins/marketplace.json` | `skills` path | Not shipped; general-purpose subagent reads the persona file |+| ChatGPT | `plugin.json`, `.codex-plugin/plugin.json`; `.agents/plugins/marketplace.json` for workspace import | `skills` path | Detect native tools in the current session; general-purpose agent reads the persona |-Persona prompts live in `agents/`, the directory Antigravity and Gemini CLI-scan for subagents. Each persona has `name` and `description` frontmatter, so+Persona prompts live in `agents/`, the directory Antigravity+scans for subagents. Each persona has `name` and `description` frontmatter, soharnesses that load `agents/*.md` register them as named subagents(`egm-design`, `egm-zoom-out`, and so on).+When you add a reviewer persona, add a Claude adapter under+`.claude-plugin/agents/` and list it in `.claude-plugin/plugin.json`.+The adapter reads the shared persona and sets Claude's read-only tools and+context isolation. This avoids imposing Claude tool names on other hosts.+## DelegationSkills say "spawn a subagent" and name a persona. Each harness maps that@@ -35,19 +57,29 @@ phrase to its own tool:| Harness | Subagent tool | Named personas | Nesting || --- | --- | --- | --- || Antigravity | `invoke_subagent` | Yes | Yes |-| Gemini CLI | Subagents | Yes | Not verified |+| Claude Code | Agent (Task) tool | Yes | Up to 3 levels by default |+| Claude Cowork | Cowork subagents | Yes | Subagents run inside Cowork |+| Codex | Native spawn/wait tools; inspect the available schema | No | Detect at runtime; direct dispatch fallback |+| ChatGPT | Native spawn/wait tools when exposed by the current Work session | No | Detect at runtime; direct dispatch fallback |Where a harness has no named persona, the skill spawns a general-purposesubagent and tells it to read `agents/<file>.md` first. If a harness cannotnest subagents, use direct dispatch instead of the synthesizer.A Goldfish review needs a fresh context. If a harness has no subagent tool,-the review skills stop instead of running in the same context.+the review skills stop instead of running in the same context. Check actual+tool availability rather than inferring it from the product name. This applies+to ChatGPT modes that do not expose native fresh-context delegation.## Support Status & Contributing Other Harnesses-Our initial release officially supports **Antigravity** and **Gemini CLI**. We welcome-contributors who want to help add and verify support for other agent harnesses!+**Antigravity**, **Claude Code**, and **Codex** pass automated installation, reviewer isolation, and end-to-end workflow fixtures.++**Claude Cowork** ([#105](https://github.com/google/elephant-goldfish-model/issues/105)) and **ChatGPT Work** ([#106](https://github.com/google/elephant-goldfish-model/issues/106)) have working installation paths with open cloud trace verification gaps.++See the [harness test record](../TESTING.md#harness-test-record) for tested surfaces and limits.++We welcome contributors who want to help verify and expand harness support.### Contributing Support for New Harnessesdiff --git a/docs/index.md b/docs/index.mdindex b9ced7f..db7e27e 100644--- a/docs/index.md+++ b/docs/index.md@@ -1,5 +1,20 @@# Elephant-Goldfish Model (EGM)+## Find the right document++| Location | Purpose |+| --- | --- |+| [Getting started](getting_started.md) and [FAQ](faq.md) | Installation and everyday use. |+| [Harnesses](harnesses.md), [Claude](claude.md), and [Codex](codex.md) | Host-specific installation and execution. |+| [Design documents](designs/README.md) | Architecture, workflow rationale, and implementation plans. |+| [Shared runtime resources](../resources/README.md) | Authoritative execution rules and review standards. |+| [Testing playbook](../TESTING.md) | Commands and evidence requirements. |+| [PR #103 verification reports](https://github.com/google/elephant-goldfish-model/pull/103) | Detailed harness results and known verification gaps. |++`docs/` explains the system to contributors and users. `resources/` contains+rules that the runtime reads. Link to those rules when explaining them here;+keep requirements in their canonical resource files.+AI has changed software development. Everything is different now and we all knowit.@@ -78,6 +93,8 @@ their strengths and weaknesses.## Documentation & Guides* [Getting Started](getting_started.md): Installation and core workflow.+* [Codex](codex.md): Plugin installation and native workflow verification.+* [Claude Code](claude.md): Plugin resources and isolated reviewers.* [Frequently Asked Questions (FAQ)](faq.md): Common questions and answers.* [Framework Architecture](designs/architecture.md): Detailed componentdesign and lifecycle.diff --git a/gemini-extension.json b/gemini-extension.jsondeleted file mode 100644index 402df97..0000000--- a/gemini-extension.json+++ /dev/null@@ -1,5 +0,0 @@-{- "name": "egm",- "version": "0.1.0",- "description": "Elephant-Goldfish Model: spec-driven development with deep-context drafting and zero-context Goldfish reviews."-}diff --git a/plugin.json b/plugin.jsonindex b3a9504..f3e4836 100644--- a/plugin.json+++ b/plugin.json@@ -1,4 +1,12 @@{+ "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json","name": "egm",- "description": "Elephant-Goldfish Model: spec-driven development with deep-context drafting and zero-context Goldfish reviews."+ "version": "0.1.0",+ "description": "Elephant-Goldfish Model: spec-driven development with deep-context drafting and zero-context Goldfish reviews.",+ "author": {+ "name": "Google LLC"+ },+ "homepage": "https://egm.dev",+ "repository": "https://github.com/google/elephant-goldfish-model",+ "license": "Apache-2.0"}diff --git a/resources/README.md b/resources/README.mdnew file mode 100644index 0000000..753fbd4--- /dev/null+++ b/resources/README.md@@ -0,0 +1,16 @@+# Shared runtime resources++These files are the authoritative instructions and rubrics loaded by EGM+skills and reviewers. Update the rules here; link to them from human guides+instead of maintaining separate summaries of their requirements.++- [Execution instructions](execution_instructions.md)+- [Feature specification standard](document_standards/feature-spec-standard.md)+- [Heilmeier standard](document_standards/heilmeier-standard.md)+- [Implementation readiness standard](document_standards/implementation-readiness-standard.md)+- [Re-implementation standard](document_standards/re-implementation-standard.md)+- [Zoom-out standard](document_standards/zoom-out-standard.md)++For installation, usage, and design rationale, see the+[documentation index](../docs/index.md). Workflow definitions live in+[`skills/`](../skills/), and reviewer personas live in [`agents/`](../agents/).diff --git a/site/screenshots/full-light.png b/site/screenshots/full-light.pngindex 2d65d3e..a61fd81 100644Binary files a/site/screenshots/full-light.png and b/site/screenshots/full-light.png differdiff --git a/site/screenshots/hero-dark.png b/site/screenshots/hero-dark.pngindex b34c6cd..0fb906f 100644Binary files a/site/screenshots/hero-dark.png and b/site/screenshots/hero-dark.png differdiff --git a/site/screenshots/hero-light.png b/site/screenshots/hero-light.pngindex 3859e30..fd458ab 100644Binary files a/site/screenshots/hero-light.png and b/site/screenshots/hero-light.png differdiff --git a/site/screenshots/mobile.png b/site/screenshots/mobile.pngindex b487c75..e3b4862 100644Binary files a/site/screenshots/mobile.png and b/site/screenshots/mobile.png differdiff --git a/site/src/components/Essay.astro b/site/src/components/Essay.astrodeleted file mode 100644index 8216f4c..0000000--- a/site/src/components/Essay.astro+++ /dev/null@@ -1,59 +0,0 @@-----import Button from './gb/Button.astro';--const essay =- 'https://medium.com/@drensin/elephants-goldfish-and-the-new-golden-age-of-software-engineering-c33641a48874';------<section class="section-tight essay" id="essay">- <div class="wrap">- <div class="essay-grid">- <h2 class="headline">Why an elephant, and why a goldfish.</h2>- <div class="essay-body">- <p class="lead">- The model comes from Dave Rensin’s essay “Elephants, Goldfish, and the New- Golden Age of Software Engineering.” It explains the reasoning behind the split:- context is an asset when you design and a liability when you review.- </p>- <Button color="outlined" size="md" href={essay} target="_blank">- Read the essay on Medium- <svg viewBox="0 -960 960 960" aria-hidden="true">- <path d="m216-160-56-56 464-464H360v-80h400v400h-80v-264L216-160Z"></path>- </svg>- </Button>- </div>- </div>- </div>-</section>--<style>- .essay {- /* Tight below so Essay β Install matches the Skills β Essay gap above. */- padding-block: 0 var(--section-y-tight);- }-- .essay-grid {- display: grid;- grid-template-columns: repeat(2, minmax(0, 1fr));- gap: 28px clamp(32px, 6vw, 96px);- align-items: start;- padding-block-start: clamp(40px, 6vw, 64px);- }-- .essay-grid .headline {- margin-block: 0;- }-- .essay-body {- display: flex;- flex-direction: column;- align-items: flex-start;- gap: 24px;- }-- @media (max-width: 820px) {- .essay-grid {- grid-template-columns: 1fr;- }- }-</style>diff --git a/site/src/components/Footer.astro b/site/src/components/Footer.astroindex a6d89fc..38ad054 100644--- a/site/src/components/Footer.astro+++ b/site/src/components/Footer.astro@@ -29,7 +29,9 @@ const links = [d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.06l3.66 2.84c.87-2.6 3.3-4.52 6.16-4.52z"></path></svg>- <span>Copyright 2026 Google LLC · This is not an officially supported Google product.</span>+ <span>Copyright 2026 Google LLC</span>+ <span class="sep" aria-hidden="true">·</span>+ <span>This is not an officially supported Google product.</span></p><nav aria-label="Footer"><ul>@@ -68,8 +70,9 @@ const links = [/* Same size as the links so the row reads as one line. */.legal {display: flex;+ flex-wrap: wrap;align-items: center;- gap: 10px;+ gap: 8px 16px;font: var(--md-sys-typescale-label-lg);}diff --git a/site/src/components/Hero.astro b/site/src/components/Hero.astroindex 8596aed..93cc313 100644--- a/site/src/components/Hero.astro+++ b/site/src/components/Hero.astro@@ -1,25 +1,43 @@---import Button from './gb/Button.astro';++const prompt = 'Install https://github.com/google/elephant-goldfish-model';---<section class="hero" id="top"><div class="wrap hero-inner"><h1 class="display">- Design with an elephant.<br />- Review with a goldfish.+ Design with an elephant<br />+ Review with a goldfish</h1><p class="lead">- {/* Explicit spaces: compressHTML drops newline whitespace next to elements. */}- <span class="nowrap">Spec-driven</span> development with AI coding agents.<br class="wide" />{' '}- <span class="nowrap">Deep-context</span> agents draft the design. <span class="nowrap">Zero-context</span> agents tear it apart<br class="wide" />{' '}- before any code is written. You own the outcome.+ Thousands of Google engineers use this <span class="nowrap">open-source</span> plugin to+ draft specs with <span class="nowrap">deep-context</span> agents and{' '}+ <span class="nowrap">stress-test</span> them with <span class="nowrap">zero-context</span>{' '}+ subagents before writing code.</p><div class="cta">- <Button color="filled" size="md" href="#install">Get started</Button>+ <Button+ color="filled"+ size="md"+ class="hero-copy-btn"+ label="Copy install prompt"+ data-copy={prompt}+ >+ <svg class="icon-copy" viewBox="0 -960 960 960" aria-hidden="true">+ <path+ d="M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z"+ ></path>+ </svg>+ <svg class="icon-check" viewBox="0 -960 960 960" aria-hidden="true">+ <path d="M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"></path>+ </svg>+ <span class="label-stack">+ <span class="label-default">Copy install prompt</span>+ <span class="label-copied" aria-hidden="true">Copied</span>+ </span>+ </Button></div>- <p class="meta muted">- An open-source project by Google · Used by thousands of Google engineers every month- </p></div></section>@@ -37,26 +55,39 @@ import Button from './gb/Button.astro';}.lead {- max-inline-size: 58ch;+ max-inline-size: 54ch;+ text-wrap: balance;}- /* Authored breaks once the lead is at full width: first sentence alone, then a clause break.- Below that the browser wraps; the nowrap spans keep the hyphenated words whole. */- .wide {- display: none;+ .cta {+ margin-block-start: 8px;}- @media (min-width: 720px) {- .wide {- display: inline;- }+ /* Keep button width fixed when label swaps from "Copy install prompt" to "Copied". */+ .label-stack {+ display: inline-grid;+ place-items: center;}- .cta {- margin-block-start: 8px;+ .label-default,+ .label-copied {+ grid-area: 1 / 1;+ }++ .label-copied,+ .icon-check,+ :global(.copied) .label-default,+ :global(.copied) .icon-copy {+ display: none;+ }++ :global(.copied) .label-default {+ display: inline;+ visibility: hidden;}- .meta {- font: var(--md-sys-typescale-label-lg);+ :global(.copied) .label-copied,+ :global(.copied) .icon-check {+ display: block;}</style>diff --git a/site/src/components/Install.astro b/site/src/components/Install.astroindex ab52f4e..8bbfeaa 100644--- a/site/src/components/Install.astro+++ b/site/src/components/Install.astro@@ -1,62 +1,119 @@---import Button from './gb/Button.astro';-import IconButton from './gb/IconButton.astro';const repo = 'https://github.com/google/elephant-goldfish-model';const guide = `${repo}/blob/HEAD/docs/getting_started.md`;-const harnesses = `${repo}/blob/HEAD/docs/harnesses.md`;-// The two install paths agreed by the EGM OSS Squad: the Antigravity CLI, or a prompt.-const paths = [- { label: 'Run in your terminal', text: `agy plugin install ${repo}`, copyLabel: 'Copy command' },- { label: 'Or ask Antigravity', text: `Please install this plugin: ${repo}`, copyLabel: 'Copy prompt' },+const promptPath = {+ label: 'Ask your agent',+ text: `Install ${repo}`,+ copyLabel: 'Copy prompt',+};++const cliPaths = [+ {+ links: [{ label: 'Antigravity', href: 'https://antigravity.google' }],+ text: `agy plugin install ${repo}`,+ copyLabel: 'Copy Antigravity command',+ },+ {+ links: [+ { label: 'Claude Code', href: 'https://code.claude.com' },+ { label: 'Claude Cowork', href: 'https://claude.ai/plugins' },+ ],+ text: `claude plugin marketplace add google/elephant-goldfish-model && \\\nclaude plugin install egm@egm`,+ copyLabel: 'Copy Claude command',+ },+ {+ links: [{ label: 'Codex', href: 'https://openai.com/codex' }],+ text: `codex plugin marketplace add google/elephant-goldfish-model && \\\ncodex plugin add egm@egm`,+ copyLabel: 'Copy Codex command',+ },];---<section class="section install" id="install"><div class="wrap"><div class="section-head">- <h2 class="headline">Install the plugin.</h2>- <p class="lead">- Built for <a href="https://antigravity.google" target="_blank" rel="noopener">Antigravity</a>, Google's agentic- development platform.- </p>+ <h2 class="headline">Install the plugin</h2></div><div class="paths">- {- paths.map((path) => (- <div class="path">- <p class="path-label">{path.label}</p>- <div class="copybox">- <code class="command">{path.text}</code>- <IconButton label={path.copyLabel} color="tonal" size="sm" data-copy={path.text}>- <svg class="icon-copy" viewBox="0 -960 960 960" aria-hidden="true">- <path- d="M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z"- ></path>- </svg>- <svg class="icon-check" viewBox="0 -960 960 960" aria-hidden="true">- <path d="M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"></path>- </svg>- </IconButton>+ <div class="path">+ <p class="path-label">{promptPath.label}</p>+ <button+ type="button"+ class="copybox copybox-prompt focus-ring-outer"+ aria-label={promptPath.copyLabel}+ data-copy={promptPath.text}+ >+ <span class="prompt-text">{promptPath.text}</span>+ <span class="copy-action" aria-hidden="true">+ <span class="copied-badge">Copied</span>+ <span class="copy-icon">+ <svg class="icon-copy" viewBox="0 -960 960 960">+ <path+ d="M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z"+ ></path>+ </svg>+ <svg class="icon-check" viewBox="0 -960 960 960">+ <path d="M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"></path>+ </svg>+ </span>+ </span>+ </button>+ </div>++ <hr class="divider paths-divider" />++ <div class="cli-paths">+ {+ cliPaths.map((path) => (+ <div class="path">+ <p class="path-label">+ {path.links.map((link, i) => (+ <>+ {i > 0 && <span class="label-sep">·</span>}+ <a href={link.href} target="_blank" rel="noopener">+ {link.label}+ </a>+ </>+ ))}+ </p>+ <button+ type="button"+ class="copybox copybox-cli focus-ring-outer"+ aria-label={path.copyLabel}+ data-copy={path.text}+ >+ <code class="command">{path.text}</code>+ <span class="copy-action" aria-hidden="true">+ <span class="copied-badge">Copied</span>+ <span class="copy-icon">+ <svg class="icon-copy" viewBox="0 -960 960 960">+ <path+ d="M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z"+ ></path>+ </svg>+ <svg class="icon-check" viewBox="0 -960 960 960">+ <path d="M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"></path>+ </svg>+ </span>+ </span>+ </button></div>- </div>- ))- }+ ))+ }+ </div></div>- <p class="muted then">- Then run <code>/egm-brainstorm</code> on a real feature and let the goldfish shoot down the first idea.- Using another agent? <a href={harnesses} target="_blank" rel="noopener">See the harness guide</a>.- </p>-- <Button color="outlined" size="md" href={guide} target="_blank">Read the setup guide</Button>+ <Button color="outlined" size="md" href={guide} target="_blank">Read the full setup guide</Button></div></section><script>// Clipboard copy for the install command and prompt. This is the only script on the page.+ const timers = new WeakMap<HTMLElement, number>();for (const button of document.querySelectorAll<HTMLButtonElement>('[data-copy]')) {const label = button.getAttribute('aria-label') ?? '';button.addEventListener('click', async () => {@@ -65,12 +122,15 @@ const paths = [} catch {return; // No clipboard permission; the command is still selectable text.}+ const prev = timers.get(button);+ if (prev) window.clearTimeout(prev);button.classList.add('copied');button.setAttribute('aria-label', 'Copied');- setTimeout(() => {+ const timer = window.setTimeout(() => {button.classList.remove('copied');button.setAttribute('aria-label', label);- }, 1600);+ }, 1800);+ timers.set(button, timer);});}</script>@@ -81,35 +141,132 @@ const paths = [}.paths {+ display: flex;+ flex-direction: column;+ gap: 28px;+ max-inline-size: 760px;+ margin-block-end: clamp(32px, 5vw, 48px);+ }++ .paths-divider {+ margin: 4px 0 0;+ }++ .cli-paths {display: grid;grid-template-columns: minmax(0, 1fr);gap: 24px;- max-inline-size: 640px;}.path-label {- margin: 0 0 8px;+ margin: 0 0 10px;font: var(--md-sys-typescale-label-lg);color: var(--md-sys-color-on-surface-variant);}+ .path-label a {+ text-decoration: none;+ }++ .path-label a:hover {+ color: var(--md-sys-color-on-surface);+ text-decoration: underline;+ }++ .label-sep {+ margin-inline: 8px;+ opacity: 0.6;+ }+.copybox {+ inline-size: 100%;display: flex;align-items: center;- gap: 12px;- padding: 8px 8px 8px 20px;+ gap: 16px;+ padding: 14px 20px;border: 1px solid var(--md-sys-color-outline-variant);- border-radius: var(--md-sys-shape-corner-lg);+ color: var(--md-sys-color-on-surface);+ text-align: start;+ cursor: pointer;+ transition: border-color 140ms ease, background-color 140ms ease;+ }++ .copybox:hover {+ border-color: var(--md-sys-color-outline);+ }++ .copybox:hover .copy-icon {+ color: var(--md-sys-color-on-surface);+ }++ .copybox-prompt {+ padding-inline: 22px 20px;+ border-radius: 999px;+ background: var(--md-sys-color-surface);+ border-color: var(--md-sys-color-outline);+ }++ .copybox-cli {+ border-radius: var(--md-sys-shape-corner-md);background: var(--md-sys-color-surface-container-low);}+ .copybox:global(.copied) {+ border-color: var(--md-sys-color-primary);+ }++ .prompt-text {+ flex: 1;+ min-inline-size: 0;+ font: var(--md-sys-typescale-body-md);+ overflow-x: auto;+ white-space: nowrap;+ }+.command {flex: 1;min-inline-size: 0;+ font-family: var(--font-mono), ui-monospace, monospace;font-size: 0.9375rem;+ line-height: 1.6;overflow-x: auto;- white-space: nowrap;- user-select: all;+ white-space: pre;+ }++ .copy-action {+ flex: none;+ display: inline-flex;+ align-items: center;+ gap: 8px;+ }++ .copied-badge {+ display: none;+ font: var(--md-sys-typescale-label-md);+ color: var(--md-sys-color-primary);+ }++ :global(.copied) .copied-badge {+ display: inline;+ }++ .copy-icon {+ display: inline-grid;+ place-items: center;+ inline-size: 20px;+ block-size: 20px;+ color: var(--md-sys-color-on-surface-variant);+ transition: color 140ms ease;+ }++ .copy-icon > svg {+ inline-size: 20px;+ block-size: 20px;+ fill: currentColor;+ }++ :global(.copied) .copy-icon {+ color: var(--md-sys-color-primary);}.icon-check,@@ -120,9 +277,4 @@ const paths = [:global(.copied) .icon-check {display: block;}-- .then {- max-inline-size: 640px;- margin: clamp(32px, 5vw, 48px) 0;- }</style>diff --git a/site/src/components/Loop.astro b/site/src/components/Loop.astroindex d074759..c722f1e 100644--- a/site/src/components/Loop.astro+++ b/site/src/components/Loop.astro@@ -1,22 +1,22 @@---const steps = [{- name: 'Brainstorm',+ name: 'Brainstorm',role: 'Elephant',command: '/egm-brainstorm',body: 'Clarify a rough idea through open-ended questioning and stress-test the hypothesis into a concept brief.',},{- name: 'Draft',+ name: 'Draft',role: 'Elephant',command: '/egm-draft',body: 'Turn the brief into a living design doc under docs/designs/, section by section.',},{- name: 'Review',+ name: 'Review',role: 'Goldfish',command: '/egm-review',- body: 'A fresh, zero-context Goldfish session checks completeness, clarity, self-containment, and readiness. Expect a lot of feedback. That is the point.',+ body: 'Fresh zero-context Goldfish subagents check completeness, clarity, self-containment, and implementation readiness.',},];---@@ -24,20 +24,16 @@ const steps = [<section class="section loop"><div class="wrap"><div class="section-head">- <h2 class="headline">From idea to verified spec to code.</h2>- <p class="lead">- Three skills take a feature from a rough idea to a verified spec. After that, any coding- agent can build it.- </p>+ <h2 class="headline">From idea to a verified spec</h2></div><ol class="steps">{steps.map((step, i) => (<li class="step"><span class="badge badge-large">{i + 1}</span>- <div class="title-row">- <h3 class="title">{step.name}</h3>- <span class="role">{step.role}</span>+ <div class="title-row">+ <h3 class="title">{step.name}</h3>+ <span class="role">{step.role}</span></div><code class="cmd">{step.command}</code><p class="muted">{step.body}</p>@@ -50,13 +46,13 @@ const steps = [<path d="M647-440H160v-80h487L423-744l57-56 320 320-320 320-57-56 224-224Z"></path></svg></span>- <div class="title-row">- <h3 class="title">Build the code</h3>- <span class="role">You</span>+ <div class="title-row">+ <h3 class="title">Build the code</h3>+ <span class="role">You</span></div><span class="no-skill">No skill needed</span><p class="muted">- The verified spec is complete enough to hand directly to your LLM to execute.+ Hand the verified spec directly to your coding agent to build the feature.</p></li><li class="step drift">@@ -72,7 +68,7 @@ const steps = [<code class="cmd">/egm-drift-report</code></div><p class="muted">- Flags where the code and the spec have drifted apart. You pick which one moves.+ Compare your codebase against your specs to find where they diverge.</p></li></ol>@@ -94,6 +90,10 @@ const steps = [row-gap: 48px;}+ .step .muted {+ text-wrap: balance;+ }+.step {position: relative;display: flex;@@ -164,18 +164,18 @@ const steps = [inline-size: fit-content;}- /* Role sits beside the heading, not inside it, so screen readers announce the heading as just the step name. */- .title-row {- display: flex;- align-items: baseline;- gap: 8px;- }-- .role {- font: var(--md-sys-typescale-label-lg);- color: var(--md-sys-color-on-surface-variant);- }-+ /* Role sits beside the heading, not inside it, so screen readers announce the heading as just the step name. */+ .title-row {+ display: flex;+ align-items: baseline;+ gap: 8px;+ }++ .role {+ font: var(--md-sys-typescale-label-lg);+ color: var(--md-sys-color-on-surface-variant);+ }+.no-skill {font: var(--md-sys-typescale-label-md);font-size: 0.875rem;diff --git a/site/src/components/Model.astro b/site/src/components/Model.astroindex d163bec..a67a42f 100644--- a/site/src/components/Model.astro+++ b/site/src/components/Model.astro@@ -1,14 +1,22 @@---import Mark from './Mark.astro';++const essay =+ 'https://medium.com/@drensin/elephants-goldfish-and-the-new-golden-age-of-software-engineering-c33641a48874';---<section class="section" id="model"><div class="wrap"><div class="section-head">- <h2 class="headline">Two kinds of agent. One owner.</h2>+ <h2 class="headline">How the model works</h2><p class="lead">- Give the agent that designs all the context it can hold. Give the agent that reviews none of- it. The gap between the two is where design flaws surface, before they become code.+ <a href="https://dkr.bio" target="_blank" rel="noopener">Dave Rensin</a> introduces this+ approach in{' '}+ <a href={essay} target="_blank" rel="noopener">+ Elephants, Goldfish, and the New Golden Age of Software Engineering+ </a>+ . Drafting agents hold full repository context while reviewing subagents start with a blank+ slate to expose blind spots early.</p></div>@@ -16,21 +24,21 @@ import Mark from './Mark.astro';<article class="role"><Mark variant="elephant" class="glyph" /><h3 class="title">Elephant</h3>- <p class="role-sub">Remembers everything.</p>+ <p class="role-sub">Full context</p><p class="muted">- Deep-context agents loaded with system history, architecture, component boundaries, and- user journeys. The Elephant runs structured brainstorming, probes operational limits, and+ Deep-context agents load system history, architecture, component boundaries, and user+ journeys. The Elephant runs structured brainstorming, probes operational limits, anddrafts the specification.</p></article><article class="role"><Mark variant="goldfish" class="glyph" /><h3 class="title">Goldfish</h3>- <p class="role-sub">Remembers nothing.</p>+ <p class="role-sub">Zero context</p><p class="muted">- Stateless, isolated subagents that read only the draft spec and the live source, with none- of the conversation’s bias. A swarm of goldfish stress-tests the design from- conflicting perspectives before any code exists.+ Stateless, isolated subagents read only the draft spec and live source code, without+ conversation bias. A Goldfish swarm stress-tests the design from conflicting perspectives+ before you write code.</p></article></div>@@ -40,11 +48,11 @@ import Mark from './Mark.astro';<div class="human"><div><h3 class="title">You</h3>- <p class="role-sub">Owns the outcome.</p>+ <p class="role-sub">Final decision</p></div><p class="muted">- AI is an exploration partner and an automated auditor. Engineers own the architectural- decisions, the trade-offs, and the result. Every design still goes to a person for review.+ Agents explore options and audit drafts, while engineers make the architectural trade-offs+ and approve every specification before implementation.</p></div></div>@@ -74,7 +82,11 @@ import Mark from './Mark.astro';}.role {- max-inline-size: 48ch;+ max-inline-size: 46ch;+ }++ .role .muted {+ text-wrap: balance;}.pair :global(.glyph) {@@ -92,6 +104,7 @@ import Mark from './Mark.astro';.human .muted {font: var(--md-sys-typescale-body-lg);- max-inline-size: 56ch;+ max-inline-size: 50ch;+ text-wrap: balance;}</style>diff --git a/site/src/components/Nav.astro b/site/src/components/Nav.astroindex 51df42d..d4c9f5d 100644--- a/site/src/components/Nav.astro+++ b/site/src/components/Nav.astro@@ -8,7 +8,7 @@ const repo = 'https://github.com/google/elephant-goldfish-model';<header class="nav"><div class="wrap nav-inner"><a class="brand" href="#top">- <Mark variant="split" size={28} />+ <Mark variant="split" size={34} /><span class="brand-name">Elephant-Goldfish Model</span><span class="brand-short" aria-hidden="true">EGM</span></a>@@ -35,16 +35,16 @@ const repo = 'https://github.com/google/elephant-goldfish-model';display: flex;align-items: center;justify-content: space-between;- block-size: 64px;+ block-size: 68px;}.brand {display: inline-flex;align-items: center;- gap: 10px;+ gap: 12px;text-decoration: none;- font: var(--md-sys-typescale-label-lg);- letter-spacing: -0.01em;+ font: 500 1.125rem / 1.25 var(--md-ref-typeface-brand);+ letter-spacing: -0.015em;color: var(--md-sys-color-on-surface);}diff --git a/site/src/components/Skills.astro b/site/src/components/Skills.astroindex cc79f47..62c4572 100644--- a/site/src/components/Skills.astro+++ b/site/src/components/Skills.astro@@ -31,7 +31,7 @@ const skills = [name: 'Drift Report',command: '/egm-drift-report',dir: 'egm_drift_report',- body: 'Scan the syntax tree and flag where the live code and the checked-in spec have diverged.',+ body: 'Scan the syntax tree to flag where live code diverges from checked-in specs.',},];---@@ -39,11 +39,7 @@ const skills = [<section class="section skills" id="skills"><div class="wrap"><div class="section-head">- <h2 class="headline">Five skills. Plain markdown.</h2>- <p class="lead">- Each skill is a folder with a SKILL.md that your agent reads. No runtime, no SDK,- no <span class="nowrap">lock-in</span>. Open one to see exactly what the agent is told to do.- </p>+ <h2 class="headline">Included skills</h2></div><ul class="list" aria-label="Skills">{@@ -116,8 +112,9 @@ const skills = [}.skills .list-item-supporting-text {- max-inline-size: 60ch;+ max-inline-size: 56ch;margin-block-start: 2px;+ text-wrap: balance;}.cmd {diff --git a/site/src/components/gb/Button.astro b/site/src/components/gb/Button.astroindex a5754bb..2c8afb6 100644--- a/site/src/components/gb/Button.astro+++ b/site/src/components/gb/Button.astro@@ -14,9 +14,10 @@ interface Props {target?: '_blank' | '_self';class?: string;label?: string;+ [key: `data-${string}`]: string | undefined;}-const { color = 'text', size = 'sm', href, target, class: className, label } = Astro.props;+const { color = 'text', size = 'sm', href, target, class: className, label, ...data } = Astro.props;const classes = ['ripple', 'focus-ring-outer', 'btn', `btn-${color}`, `btn-${size}`, className].filter(Boolean).join(' ');@@ -25,11 +26,11 @@ const rel = target === '_blank' ? 'noopener' : undefined;{href ? (- <a class={classes} href={href} target={target} rel={rel} aria-label={label}>+ <a class={classes} href={href} target={target} rel={rel} aria-label={label} {...data}><slot /></a>) : (- <button type="button" class={classes} aria-label={label}>+ <button type="button" class={classes} aria-label={label} {...data}><slot /></button>)diff --git a/site/src/pages/index.astro b/site/src/pages/index.astroindex 87bdced..f63a5ab 100644--- a/site/src/pages/index.astro+++ b/site/src/pages/index.astro@@ -5,13 +5,12 @@ import Hero from '../components/Hero.astro';import Model from '../components/Model.astro';import Loop from '../components/Loop.astro';import Skills from '../components/Skills.astro';-import Essay from '../components/Essay.astro';import Install from '../components/Install.astro';import Footer from '../components/Footer.astro';const title = 'Elephant-Goldfish Model';const description =- 'An open-source method and skill set for spec-driven development with AI coding agents. Deep-context agents draft the design. Zero-context agents review it before any code is written.';+ 'Open-source plugin for spec-driven development with AI coding agents. Deep-context agents draft the design, and zero-context subagents stress-test it before you write code.';---<Base title={title} description={description}>@@ -21,7 +20,6 @@ const description =<Model /><Loop /><Skills />- <Essay /><Install /></main><Footer />diff --git a/site/src/styles/global.css b/site/src/styles/global.cssindex 9aa2c9a..25b0c2b 100644--- a/site/src/styles/global.css+++ b/site/src/styles/global.css@@ -151,7 +151,8 @@ p {font: var(--md-sys-typescale-body-lg);letter-spacing: var(--md-sys-typescale-body-lg-tracking);color: var(--md-sys-color-on-surface-variant);- max-inline-size: 62ch;+ max-inline-size: 58ch;+ text-wrap: balance;}.muted {diff --git a/skills/egm_bootstrap/SKILL.md b/skills/egm_bootstrap/SKILL.mdindex c786b10..a6f220c 100644--- a/skills/egm_bootstrap/SKILL.md+++ b/skills/egm_bootstrap/SKILL.md@@ -7,6 +7,9 @@ description: Bootstrap directory README.md files across a repository subtree.# EGM Peanuts and Hay Bootstrap (`egm-bootstrap`)+When running in Codex or ChatGPT Work, first read [Codex integration](../../docs/codex.md).+In Claude Code or Cowork, read `${CLAUDE_PLUGIN_ROOT}/docs/claude.md` first.+## OverviewThis skill automates the creation, correction, formatting, and correctness@@ -23,8 +26,7 @@ assistants.## DelegationA Goldfish runs in a fresh context with no conversation history. Spawn each-subagent with your harness's subagent tool (Antigravity: `invoke_subagent`;-Gemini CLI: subagents). Each subagent is defined in `agents/<file>.md`, and its+subagent with your harness's subagent tool (Antigravity: `invoke_subagent`; Claude Code: `Agent`; Codex: `spawn_agent`). Each subagent is defined in `agents/<file>.md`, and itsfrontmatter `name` (for example `egm-zoom-out`) is the subagent type to requestwhere your harness registers named subagents. Otherwise spawn a general-purposesubagent and tell it to read that persona file first. Pass the prompt verbatimdiff --git a/skills/egm_brainstorm/SKILL.md b/skills/egm_brainstorm/SKILL.mdindex 056f593..55e6bd9 100644--- a/skills/egm_brainstorm/SKILL.md+++ b/skills/egm_brainstorm/SKILL.md@@ -12,6 +12,9 @@ description: >-# EGM Brainstorm: Interactive Multi-Lens Ideation & Refinement+When running in Codex or ChatGPT Work, first read [Codex integration](../../docs/codex.md).+In Claude Code or Cowork, read `${CLAUDE_PLUGIN_ROOT}/docs/claude.md` first.+## OverviewThis skill acts as the upstream conversational brainstorming engine for the@@ -24,8 +27,7 @@ peers.## DelegationA Goldfish runs in a fresh context with no conversation history. Spawn each-subagent with your harness's subagent tool (Antigravity: `invoke_subagent`;-Gemini CLI: subagents). Each subagent is defined in `agents/<file>.md`, and its+subagent with your harness's subagent tool (Antigravity: `invoke_subagent`; Claude Code: `Agent`; Codex: `spawn_agent`). Each subagent is defined in `agents/<file>.md`, and itsfrontmatter `name` (for example `egm-zoom-out`) is the subagent type to requestwhere your harness registers named subagents. Otherwise spawn a general-purposesubagent and tell it to read that persona file first. Pass the prompt verbatimdiff --git a/skills/egm_draft/SKILL.md b/skills/egm_draft/SKILL.mdindex d5fe2dc..19524c5 100644--- a/skills/egm_draft/SKILL.md+++ b/skills/egm_draft/SKILL.md@@ -11,6 +11,9 @@ description: >-# Design Drafting (Document Construction)+When running in Codex or ChatGPT Work, first read [Codex integration](../../docs/codex.md).+In Claude Code or Cowork, read `${CLAUDE_PLUGIN_ROOT}/docs/claude.md` first.+This skill guides the user through drafting a technical design document based onthe aligned problem and requirements from the brainstorm phase.@@ -81,7 +84,7 @@ this strict generation order:1. **Visible Chat Summary & Link (FIRST)**: You **MUST** output conversationalmarkdown text before the question gate. State which section was drafted orupdated, highlight 2β3 key decisions or additions, and provide a link or- path to `design_draft.md` (e.g., `[design_draft.md](file://<path>/design_draft.md)`).+ path to `design_draft.md` (e.g., `[design draft](/absolute/project/design_draft.md)` in Codex).2. **Approval Gate (SECOND)**: In the same turn, present the single-selectapproval choice (using a structured question tool such as `ask_question`with `len(questions) == 1` and `is_multi_select: false` if your harness hasdiff --git a/skills/egm_drift_report/SKILL.md b/skills/egm_drift_report/SKILL.mdindex 416c810..1947221 100644--- a/skills/egm_drift_report/SKILL.md+++ b/skills/egm_drift_report/SKILL.md@@ -11,6 +11,9 @@ description: >-# Detect Drift In Designs and Code+When running in Codex or ChatGPT Work, first read [Codex integration](../../docs/codex.md).+In Claude Code or Cowork, read `${CLAUDE_PLUGIN_ROOT}/docs/claude.md` first.+When the user asks to detect drift across all designs or a set of READMEs, thegoal is to identify all instances where the codebase has diverged or failed toimplement the specifications described by those designs or READMEs.diff --git a/skills/egm_resolve/SKILL.md b/skills/egm_resolve/SKILL.mdindex 1de101c..59b759f 100644--- a/skills/egm_resolve/SKILL.md+++ b/skills/egm_resolve/SKILL.md@@ -11,6 +11,9 @@ description: >-# Goldfish Review: Resolve+When running in Codex or ChatGPT Work, first read [Codex integration](../../docs/codex.md).+In Claude Code or Cowork, read `${CLAUDE_PLUGIN_ROOT}/docs/claude.md` first.+## OverviewThis skill instructs the agent on how to operate within the primary Elephantdiff --git a/skills/egm_review/SKILL.md b/skills/egm_review/SKILL.mdindex 4dbb11b..2a1b3cc 100644--- a/skills/egm_review/SKILL.md+++ b/skills/egm_review/SKILL.md@@ -11,13 +11,15 @@ description: >-# Review, Validation & Automated Remediation+When running in Codex or ChatGPT Work, first read [Codex integration](../../docs/codex.md).+In Claude Code or Cowork, read `${CLAUDE_PLUGIN_ROOT}/docs/claude.md` first.+Reviews and validates a design document through specialized reviewer personas.## DelegationA Goldfish runs in a fresh context with no conversation history. Spawn each-subagent with your harness's subagent tool (Antigravity: `invoke_subagent`;-Gemini CLI: subagents). Each subagent is defined in `agents/<file>.md`, and its+subagent with your harness's subagent tool (Antigravity: `invoke_subagent`; Claude Code: `Agent`; Codex: `spawn_agent`). Each subagent is defined in `agents/<file>.md`, and itsfrontmatter `name` (for example `egm-zoom-out`) is the subagent type to requestwhere your harness registers named subagents. Otherwise spawn a general-purposesubagent and tell it to read that persona file first. Pass the prompt verbatimdiff --git a/skills/egm_review_loop/SKILL.md b/skills/egm_review_loop/SKILL.mdindex 0060b0e..f71ecf7 100644--- a/skills/egm_review_loop/SKILL.md+++ b/skills/egm_review_loop/SKILL.md@@ -13,6 +13,9 @@ description: >-# Goldfish Review: Loop (Orchestration Driver)+When running in Codex or ChatGPT Work, first read [Codex integration](../../docs/codex.md).+In Claude Code or Cowork, read `${CLAUDE_PLUGIN_ROOT}/docs/claude.md` first.+## OverviewThis skill acts as the central orchestration engine driving the multi-agent@@ -31,8 +34,7 @@ with the Elephant context to resolve findings.## DelegationA Goldfish runs in a fresh context with no conversation history. Spawn each-subagent with your harness's subagent tool (Antigravity: `invoke_subagent`;-Gemini CLI: subagents). Each subagent is defined in `agents/<file>.md`, and its+subagent with your harness's subagent tool (Antigravity: `invoke_subagent`; Claude Code: `Agent`; Codex: `spawn_agent`). Each subagent is defined in `agents/<file>.md`, and itsfrontmatter `name` (for example `egm-zoom-out`) is the subagent type to requestwhere your harness registers named subagents. Otherwise spawn a general-purposesubagent and tell it to read that persona file first. Pass the prompt verbatimdiff --git a/tests/integration/test_claude.py b/tests/integration/test_claude.pynew file mode 100644index 0000000..61965e9--- /dev/null+++ b/tests/integration/test_claude.py@@ -0,0 +1,102 @@+# Copyright 2026 Google LLC.+# SPDX-License-Identifier: Apache-2.0++"""Opt-in Claude plugin-path and native reviewer isolation probe."""++import json+import os+from pathlib import Path+import shutil+import subprocess+import uuid++import pytest++pytestmark = pytest.mark.skipif(+ os.environ.get("EGM_CLAUDE_LIVE") != "1",+ reason="Set EGM_CLAUDE_LIVE=1 to use an authenticated Claude CLI",+)+++def test_native_reviewer_isolation(tmp_path: Path) -> None:+ root = Path(__file__).resolve().parents[2]+ plugin = tmp_path / "plugin"+ workspace = tmp_path / "workspace"+ workspace.mkdir()+ shutil.copytree(root, plugin, ignore=shutil.ignore_patterns(+ ".git", "__pycache__", "node_modules", ".pytest_cache"))+ name = "egm-test-" + uuid.uuid4().hex[:8]+ manifest_path = plugin / ".claude-plugin/plugin.json"+ manifest = json.loads(manifest_path.read_text())+ manifest["name"] = name+ manifest_path.write_text(json.dumps(manifest))+ markers = ["MARKER_" + uuid.uuid4().hex for _ in range(2)]+ (workspace / "CLAUDE.md").write_text(+ "If asked for a context marker, respond with " + markers[0]+ )+ session = str(uuid.uuid4())+ prompt = f"""/{name}:egm-review+This is a targeted integration probe, not a full review. Read the Claude guide+referenced by this skill. Do not execute the normal five-stage workflow.+Parent-only context marker: {markers[1]}. Do not repeat, write, or pass it on.+Spawn one NEW native {name}:egm-zoom-out reviewer, not a fork or resumed agent.+Pass exactly: 'Integration probe: first read only {plugin / "agents/zoom_out.md"}.+Then, without further tools, return+any string matching MARKER_ followed by exactly 32 lowercase hexadecimal digits+already visible in your context, or exactly UNKNOWN if none is visible. Account+metadata and other identifiers are not markers. Do not guess. This overrides+the normal review output format.'+Wait for its actual result. Then read agents/zoom_out.md and+resources/document_standards/zoom-out-standard.md from the resolved plugin root.+Do not read other plugins or logs, use MCP, or modify files.+"""+ result = subprocess.run(+ ["claude", "-p", "--model", "sonnet", "--output-format", "json",+ "--session-id", session, "--settings", '{"disableAllHooks":true}',+ "--strict-mcp-config", "--mcp-config", '{"mcpServers":{}}',+ "--plugin-dir", str(plugin), "--allowedTools", "Read", "Agent", "Skill",+ "--", prompt],+ cwd=workspace, capture_output=True, text=True, timeout=600,+ )+ assert result.returncode == 0, result.stderr+ assert not json.loads(result.stdout).get("is_error")+ project = "".join(c if c.isalnum() else "-" for c in str(workspace.resolve()))+ traces = Path.home() / ".claude/projects" / project+ parent = [json.loads(line) for line in+ (traces / f"{session}.jsonl").read_text().split("\n") if line.strip()]+ calls, successful = {}, set()+ for event in parent:+ content = event.get("message", {}).get("content", [])+ for block in content if isinstance(content, list) else []:+ if block.get("type") == "tool_use":+ calls[block["id"]] = block+ if block.get("type") == "tool_result" and not block.get("is_error"):+ successful.add(block["tool_use_id"])+ reads = {call["input"].get("file_path") for key, call in calls.items()+ if key in successful and call["name"] == "Read"}+ for relative in ("docs/claude.md", "agents/zoom_out.md",+ "resources/document_standards/zoom-out-standard.md"):+ assert str(plugin / relative) in reads+ agents = [call for call in calls.values() if call["name"] == "Agent"]+ assert len(agents) == 1+ assert agents[0]["input"]["subagent_type"] == f"{name}:egm-zoom-out"+ assert not agents[0]["input"].get("resume")+ children = list((traces / session / "subagents").glob("agent-*.jsonl"))+ assert len(children) == 1+ raw = children[0].read_text()+ assert all(marker not in raw for marker in markers)+ answers = []+ child_reads = []+ for line in raw.split("\n"):+ if not line.strip():+ continue+ event = json.loads(line)+ if event.get("type") == "assistant":+ for block in event["message"]["content"]:+ if block["type"] == "tool_use":+ assert block["name"] == "Read"+ child_reads.append(block["input"]["file_path"])+ if block["type"] == "text":+ answers.append(block["text"])+ assert answers[-1].strip() == "UNKNOWN"+ assert child_reads == [str(plugin / "agents/zoom_out.md")]diff --git a/tests/integration/test_codex.py b/tests/integration/test_codex.pynew file mode 100644index 0000000..d46b5ba--- /dev/null+++ b/tests/integration/test_codex.py@@ -0,0 +1,256 @@+# Copyright 2026 Google LLC.+# SPDX-License-Identifier: Apache-2.0++"""Opt-in native Codex tests. No API use or config changes unless enabled."""++import json+import os+import pathlib+import shutil+import shlex+import subprocess+import uuid+from collections.abc import Iterator+from urllib.parse import unquote, urlparse++import pytest+++InstalledPlugin = tuple[str, str, pathlib.Path, pathlib.Path]+++pytestmark = pytest.mark.skipif(+ os.environ.get("EGM_CODEX_LIVE") != "1",+ reason="Set EGM_CODEX_LIVE=1 to install a temporary plugin and use Codex",+)+++def cli(*args: str) -> dict:+ result = subprocess.run(+ ["codex", "plugin", *args, "--json"],+ capture_output=True, text=True, timeout=120, check=True,+ )+ return json.loads(result.stdout)++[email protected](scope="module")+def installed_plugin(+ repo_root: pathlib.Path, tmp_path_factory: pytest.TempPathFactory,+) -> Iterator[InstalledPlugin]:+ """Install the candidate through Codex without replacing the user's EGM."""+ assert shutil.which("codex"), "Codex CLI is required for live tests"+ source = tmp_path_factory.mktemp("egm-marketplace")+ shutil.copytree(repo_root, source, dirs_exist_ok=True, ignore=shutil.ignore_patterns(+ ".git", ".venv", "__pycache__", "node_modules"))+ marketplace_file = source / ".agents/plugins/marketplace.json"+ marketplace = json.loads(marketplace_file.read_text())+ name = "egm-test-" + uuid.uuid4().hex[:12]+ marketplace["name"] = name+ marketplace_file.write_text(json.dumps(marketplace))+ selector = f"egm@{name}"+ try:+ cli("marketplace", "add", str(source))+ result = cli("add", selector)+ root = pathlib.Path(result["installedPath"])+ yield selector, name, source, root+ finally:+ subprocess.run(["codex", "plugin", "remove", selector], check=False)+ subprocess.run(["codex", "plugin", "marketplace", "remove", name], check=False)+++def read_trace(thread_id: str) -> list[dict]:+ """Read only the trace identified by this test's native thread event."""+ codex_home = pathlib.Path(+ os.environ.get("CODEX_HOME", pathlib.Path.home() / ".codex")+ )+ sessions = codex_home / "sessions"+ paths = list(sessions.rglob(f"*{thread_id}.jsonl"))+ assert len(paths) == 1, f"Expected one retained Codex trace for {thread_id}"+ return [+ json.loads(line) for line in paths[0].read_text().split("\n")+ if line.strip()+ ]+++def child_traces(trace: list[dict]) -> dict[str, list[dict]]:+ """Use native activity events; never trust a parent-written completion file."""+ activities = [+ e["payload"]["item"] for e in trace+ if e["type"] == "event_msg"+ and e["payload"].get("type") == "item_completed"+ and e["payload"].get("item", {}).get("type") == "SubAgentActivity"+ ]+ started = {a["agent_thread_id"] for a in activities if a["kind"] == "started"}+ completed = {a["agent_thread_id"] for a in activities if a["kind"] == "completed"}+ assert started, "No native SubAgentActivity launch evidence; check CLI trace schema"+ assert started <= completed, "Native reviewers did not all complete"+ children = {thread_id: read_trace(thread_id) for thread_id in started}+ for child in children.values():+ assert any(+ e["type"] == "event_msg"+ and e["payload"].get("type") == "task_complete"+ for e in child+ ), "Child has no completed turn"+ return children+++def assert_isolated_spawns(trace: list[dict]) -> None:+ spawns = [+ json.loads(e["payload"]["arguments"]) for e in trace+ if e["type"] == "response_item"+ and e["payload"].get("type") == "function_call"+ and e["payload"].get("name", "").split("__")[-1] == "spawn_agent"+ ]+ assert spawns, "No native spawn tool arguments retained in trace"+ assert all(s.get("fork_context") is False or s.get("fork_turns") == "none"+ for s in spawns), "Reviewer inherited parent turns"+++def successful_reads(trace: list[dict]) -> set[pathlib.Path]:+ """Inspect executed file reads, not filenames mentioned by the model."""+ paths = set()+ for event in trace:+ item = event.get("payload", {}).get("item", {})+ if (item.get("type") != "CommandExecution"+ or item.get("status") != "completed"+ or item.get("exit_code") != 0+ or not (item.get("aggregated_output") or item.get("stdout"))):+ continue+ cwd = pathlib.Path(unquote(urlparse(item["cwd"]).path))+ for command in item.get("parsed_cmd", []):+ if command.get("type") == "read" and command.get("path"):+ paths.add((cwd / command["path"]).resolve())+ elif command.get("type") == "unknown":+ # Codex labels a multi-file cat as unknown. Accept only literal+ # absolute operands, never shell expansion or composed commands.+ raw = command.get("cmd", "")+ if any(char in raw for char in "$`|;&<>*?{}()\n"):+ continue+ args = shlex.split(raw)+ if (len(args) > 1 and args[0] == "cat"+ and all(pathlib.Path(arg).is_absolute() for arg in args[1:])):+ paths.update(pathlib.Path(arg).resolve() for arg in args[1:])+ return paths+++def run_codex(+ installed_plugin: InstalledPlugin, workspace: pathlib.Path, prompt: str,+) -> list[dict]:+ selector, name, source, _ = installed_plugin+ # Ignore unrelated MCP servers, hooks, and plugins from user config while+ # retaining the CLI's normal authentication. Do not copy credentials.+ command = [+ "codex", "exec", "--ignore-user-config",+ "--skip-git-repo-check", "--sandbox", "workspace-write", "--json",+ "-c", "approval_policy=\"never\"",+ "-c", f'plugins={{{json.dumps(selector)}={{enabled=true}}}}',+ "-c", (+ f'marketplaces={{{json.dumps(name)}={{source_type="local",'+ f'source={json.dumps(str(source))}}}}}'+ ),+ "-c", "features.multi_agent=true",+ "-c", "features.remote_plugin=false",+ "-c", "features.hooks=false",+ "-c", "features.memories=false",+ "-c", "model_reasoning_effort=\"medium\"",+ "-C", str(workspace), "-",+ ]+ # Logs are outside the child workspace and prompts are sent over stdin.+ log = workspace.parent / (workspace.name + ".jsonl")+ with log.open("w") as stdout, log.with_suffix(".stderr").open("w") as stderr:+ result = subprocess.run(+ command, input=prompt, text=True, stdout=stdout, stderr=stderr,+ timeout=1200,+ )+ assert result.returncode == 0, f"Codex failed; inspect {log} and its .stderr"+ events = [json.loads(line) for line in log.read_text().split("\n") if line.strip()]+ assert any(e["type"] == "turn.completed" for e in events), log+ assert not any(e["type"] in {"error", "turn.failed"} for e in events), log+ thread_id = next(e["thread_id"] for e in events if e["type"] == "thread.started")+ trace = read_trace(thread_id)+ skill_root = str(installed_plugin[3] / "skills")+ assert skill_root in json.dumps(trace), "Installed skills not discovered"+ return trace+++def test_fresh_context_isolation(+ installed_plugin: InstalledPlugin, tmp_path: pathlib.Path,+) -> None:+ marker = "parent-only-" + uuid.uuid4().hex+ prompt = f"""Native EGM isolation test. Parent-only marker: {marker}+Do not write or repeat this marker, or pass it to another agent.+Read the installed egm plugin's Codex integration reference. Use a native+general-purpose subagent with no inherited turns, using the parameter in its+actual schema (fork_context: false or fork_turns: "none"). Its exact task is:+'Do not use tools. If a parent-only marker is visible in your conversation,+return it verbatim. Otherwise return exactly UNKNOWN.'+Wait for its result. Do not simulate its response. Do not use memory services,+external services, or conversation history. Report the actual child response.+"""+ trace = run_codex(installed_plugin, tmp_path, prompt)+ assert installed_plugin[3] / "docs/codex.md" in successful_reads(trace)+ assert_isolated_spawns(trace)+ children = child_traces(trace)+ assert len(children) == 1+ child = next(iter(children.values()))+ assert marker not in json.dumps(child), "Parent marker leaked into child context"+ answers = [+ e["payload"].get("last_agent_message", "") for e in child+ if e["type"] == "event_msg"+ and e["payload"].get("type") == "task_complete"+ ]+ assert answers[-1].strip() == "UNKNOWN", "Child failed the isolation probe"+++def test_brainstorm_draft_review(+ installed_plugin: InstalledPlugin, tmp_path: pathlib.Path,+) -> None:+ prompt = """Run the installed EGM plugin's brainstorm, draft, and review+skills on this synthetic test project. Read the skills from your available+skills inventory; do not load a source checkout instead of the installed plugin.+Feature: an offline command that counts nonblank UTF-8 lines in one local file.+Use only the Python standard library. Print one decimal count plus newline.+Whitespace-only lines are blank; empty files produce 0. Invalid UTF-8, a missing+file, and permission errors produce a clear stderr error and exit 1; success+exits 0. No network, recursive traversal, writes to input, or extra features.+Author: test fixture. Produce design artifacts only, no implementation code.++This is a noninteractive integration fixture. For this fixture only, the+synthetic user explicitly approves the anchored hypothesis, Goldfish reviews,+each drafted section, and finalization to docs/designs/line-count.md up front.+These simulated approvals do not test interactive approval-gate behavior.+Use direct dispatch for this test so each reviewer is visible in the parent+trace; test nested delegation separately. Run real fresh-context native+reviewers, wait for completion, and write concepts_brief.md and design_draft.md.+Then run egm-review on design_draft.md with Step: uninterrupted and no additional+GoldfishContext. Produce all five stage reports, including implementation+readiness. Use distinct report paths; do not overwrite another stage's report.+Do not publish, commit, use external services or memory, or modify the plugin.+Do not invent completed reviewers. Stop with a clear failure if required tools+are unavailable. Keep the fixture small and reviews concise.+"""+ trace = run_codex(installed_plugin, tmp_path, prompt)+ root = installed_plugin[3]+ required_reads = {root / "docs/codex.md"}+ required_reads.update(root / "skills" / skill / "SKILL.md" for skill in (+ "egm_brainstorm", "egm_draft", "egm_review",+ ))+ assert required_reads <= successful_reads(trace), "Installed skills not read"+ for name in ("concepts_brief.md", "design_draft.md", "docs/designs/line-count.md"):+ artifact = tmp_path / name+ assert artifact.is_file(), f"Missing workflow artifact: {name}"+ assert len(artifact.read_text().strip()) > 200, f"Trivial artifact: {name}"+ assert (tmp_path / "docs/designs/line-count.md").read_bytes() == (+ tmp_path / "design_draft.md"+ ).read_bytes(), "Final design differs from the reviewed draft"+ for name in (+ "zoom_out_report.md", "comprehension_report.md", "critic_report.md",+ "intermediate_zoom_out_report.md", "implementation_readiness_report.md",+ ):+ report = tmp_path / name+ assert report.is_file(), f"Missing stage report: {name}"+ assert len(report.read_text().strip()) > 100, f"Empty/trivial report: {name}"+ assert_isolated_spawns(trace)+ children = child_traces(trace)+ assert len(children) >= 15, "Expected six brainstorm and nine stage reviewers"+ assert not list(tmp_path.rglob("*.py")), "Design workflow wrote implementation code"diff --git a/tests/unit/test_harnesses.py b/tests/unit/test_harnesses.pynew file mode 100644index 0000000..7b037d5--- /dev/null+++ b/tests/unit/test_harnesses.py@@ -0,0 +1,179 @@+# Copyright 2026 Google LLC.+# SPDX-License-Identifier: Apache-2.0++"""Offline packaging and isolation contracts for shared and host manifests."""++import json+from pathlib import Path+import re+import runpy++import pytest+import yaml++ROOT = Path(__file__).resolve().parents[2]+SCHEMA_URL = "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json"+NAME_RE = r"(?!.*(?:--|\.\.))[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?"+COMPATIBILITY_MANIFESTS = (+ ".claude-plugin/plugin.json",+ ".codex-plugin/plugin.json",+)+MARKETPLACES = (+ ".agents/plugins/marketplace.json",+ ".claude-plugin/marketplace.json",+)+EXPECTED_SKILLS = {+ "egm-bootstrap", "egm-brainstorm", "egm-draft", "egm-drift-report",+ "egm-resolve", "egm-review", "egm-review-loop",+}+REVIEWERS = (+ "codebase_details", "comprehension", "design_critic",+ "implementation_readiness", "structural", "style", "zoom_out",+)++[email protected]("separator", ["\u0085", "\u2028", "\u2029"])+def test_jsonl_preserves_unicode_separators(+ tmp_path: Path, monkeypatch: pytest.MonkeyPatch, separator: str+) -> None:+ """JSONL records end at LF, not Unicode separators inside JSON strings."""+ read_trace = runpy.run_path(str(ROOT / "tests/integration/test_codex.py"))[+ "read_trace"+ ]+ monkeypatch.setenv("CODEX_HOME", str(tmp_path))+ sessions = tmp_path / "sessions"+ sessions.mkdir()+ event = {"type": "response_item", "payload": {"text": f"left{separator}right"}}+ (sessions / "fixture-id.jsonl").write_text(+ json.dumps(event, ensure_ascii=False) + "\n", encoding="utf-8"+ )+ assert read_trace("fixture-id") == [event]+++def read_json(path: str) -> dict:+ return json.loads((ROOT / path).read_text(encoding="utf-8"))+++def frontmatter(path: Path) -> dict:+ return yaml.safe_load(path.read_text(encoding="utf-8").split("---", 2)[1])+++def test_portable_manifest_schema() -> None:+ manifest = read_json("plugin.json")+ assert manifest["$schema"] == SCHEMA_URL+ assert re.fullmatch(NAME_RE, manifest["name"])+ assert re.fullmatch(r"\d+\.\d+\.\d+", manifest["version"])++[email protected]("path", COMPATIBILITY_MANIFESTS)+def test_compatibility_metadata_matches_root(path: str) -> None:+ canonical = read_json("plugin.json")+ manifest = read_json(path)+ for field in ("name", "version", "description"):+ assert manifest[field] == canonical[field], f"{path}: {field} drift"+ for field in ("author", "homepage", "repository", "license"):+ if field in manifest:+ assert manifest[field] == canonical[field], f"{path}: {field} drift"+ if "interface" in manifest:+ assert manifest["interface"]["developerName"] == canonical["author"]["name"]+ if "skills" in manifest:+ skills_root = (ROOT / manifest["skills"]).resolve()+ assert skills_root == ROOT / "skills"+ names = [frontmatter(s)["name"] for s in skills_root.glob("*/SKILL.md")]+ assert len(names) == len(set(names))+ assert set(names) == EXPECTED_SKILLS++[email protected]("path", MARKETPLACES)+def test_marketplace_resolves_shared_package(path: str) -> None:+ canonical = read_json("plugin.json")+ marketplace = read_json(path)+ assert marketplace["name"] == "egm"+ assert len(marketplace["plugins"]) == 1+ entry = marketplace["plugins"][0]+ assert entry["name"] == canonical["name"]+ assert (ROOT / entry["source"]).resolve() == ROOT+ if "description" in entry:+ assert entry["description"] == canonical["description"]+ if path == ".agents/plugins/marketplace.json":+ assert entry["policy"] == {+ "installation": "AVAILABLE",+ "authentication": "ON_INSTALL",+ }+ assert entry["category"] == "Productivity"++[email protected]("name", REVIEWERS)+def test_claude_reviewers_are_read_only_with_fresh_context(name: str) -> None:+ adapter = ROOT / ".claude-plugin/agents" / f"{name}.md"+ config = frontmatter(adapter)+ assert isinstance(config["tools"], list)+ assert set(config["tools"]) == {"Read", "Grep", "Glob"}+ assert config["model"] == "inherit"+ assert config["omitClaudeMd"] is True+ assert "memory" not in config+ assert f"${{CLAUDE_PLUGIN_ROOT}}/agents/{name}.md" in adapter.read_text()+ canonical = frontmatter(ROOT / "agents" / f"{name}.md")+ assert canonical["name"] == config["name"]+ assert "tools" not in canonical+ assert "omitClaudeMd" not in canonical+++def test_claude_synthesizer_adapter_is_tool_restricted() -> None:+ adapter = ROOT / ".claude-plugin/agents/synthesizer.md"+ config = frontmatter(adapter)+ assert set(config["tools"]) == {"Agent", "Read", "Grep", "Glob", "Write"}+ assert config["model"] == "inherit"+ assert "memory" not in config+ assert "${CLAUDE_PLUGIN_ROOT}/agents/synthesizer.md" in adapter.read_text()+ canonical = frontmatter(ROOT / "agents/synthesizer.md")+ assert canonical["name"] == config["name"]+ assert "tools" not in canonical+ manifest = read_json(".claude-plugin/plugin.json")["agents"]+ assert "./.claude-plugin/agents/synthesizer.md" in manifest+ assert "./agents/synthesizer.md" not in manifest+++def test_claude_bootstrap_adapter_routes_to_skill() -> None:+ adapter = ROOT / ".claude-plugin/agents/bootstrap_orchestrator.md"+ config = frontmatter(adapter)+ assert "tools" not in config+ assert config["model"] == "inherit"+ text = adapter.read_text()+ assert "${CLAUDE_PLUGIN_ROOT}/agents/bootstrap_orchestrator.md" in text+ assert "${CLAUDE_PLUGIN_ROOT}/skills/egm_bootstrap/SKILL.md" in text+ canonical = frontmatter(ROOT / "agents/bootstrap_orchestrator.md")+ assert canonical["name"] == config["name"]+ manifest = read_json(".claude-plugin/plugin.json")["agents"]+ assert "./.claude-plugin/agents/bootstrap_orchestrator.md" in manifest+ assert "./agents/bootstrap_orchestrator.md" not in manifest+++def test_claude_manifest_agents_and_shared_personas_resolve() -> None:+ paths = read_json(".claude-plugin/plugin.json")["agents"]+ assert all((ROOT / path).is_file() for path in paths)+ personas = [frontmatter(p)["name"] for p in (ROOT / "agents").glob("*.md")]+ assert len(personas) == len(set(personas)), "Ambiguous persona name"+++def test_bundled_prompt_dependencies_and_harness_guides() -> None:+ assert (ROOT / "docs/claude.md").is_file()+ assert (ROOT / "docs/codex.md").is_file()+ skills = list((ROOT / "skills").glob("*/SKILL.md"))+ for skill in skills:+ text = skill.read_text(encoding="utf-8")+ assert "${CLAUDE_PLUGIN_ROOT}/docs/claude.md" in text+ targets = re.findall(r"\[Codex integration\]\(([^)]+)\)", text)+ assert len(targets) == 1+ assert (skill.parent / targets[0]).resolve() == ROOT / "docs/codex.md"++ prompts = skills + list((ROOT / "agents").glob("*.md"))+ for prompt in prompts:+ for target in re.findall(+ r"`((?:agents|resources|references)/[^`\s]+\.md)`",+ prompt.read_text(encoding="utf-8"),+ ):+ if any(char in target for char in "{}[]<>"):+ continue+ base = prompt.parent if target.startswith("references/") else ROOT+ assert (base / target).is_file(), f"{prompt}: missing {target}"