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
build: exclude development documents from runtimes
Oliver Newth5e1c898a3fbc
diff --git a/README.md b/README.mdindex 184ec64..351cf2c 100644--- a/README.md+++ b/README.md@@ -24,7 +24,7 @@ Elephant-Goldfish Model (EGM) is an open-source plugin for Spec-Driven DevelopmeIn 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).+For detailed setup guides and walkthroughs, see [Getting Started](docs/getting_started.md), [Harnesses](docs/harnesses.md), and [Framework Architecture](https://github.com/google/elephant-goldfish-model/blob/main/docs/designs/architecture.md).## Skills@@ -50,7 +50,7 @@ For the foundational essay introducing this methodology, see Dave Rensin's artic## Contributing-We welcome community contributions! Please review [Harnesses](docs/harnesses.md) and our [Contribution Guidelines](CONTRIBUTING.md) before submitting pull requests.+We welcome community contributions! Please review [Harnesses](docs/harnesses.md) and our [Contribution Guidelines](https://github.com/google/elephant-goldfish-model/blob/main/CONTRIBUTING.md) before submitting pull requests.## Licensediff --git a/distributions/claude/.github/PULL_REQUEST_TEMPLATE.md b/distributions/claude/.github/PULL_REQUEST_TEMPLATE.mddeleted file mode 100644index 288485d..0000000--- a/distributions/claude/.github/PULL_REQUEST_TEMPLATE.md+++ /dev/null@@ -1,23 +0,0 @@-## Contribution Type--Please select the track that matches this pull request:--- [ ] **Bug Fix / Minor Patch** (Targeted fix, non-test diff <= 100 lines and < 3 core files in `skills/` or `agents/`; no design doc required)-- [ ] **Feature / Architectural Change -- Stage 1: Design Doc PR** (`Refs #___` with `status: approved-for-design` | Adds `docs/designs/<name>.md` and updates `docs/designs/README.md`; use `Refs` instead of `Closes` so the issue stays open for Stage 2)-- [ ] **Feature / Architectural Change -- Stage 2: Implementation PR** (`Closes #___` with `status: approved-for-pr` | Implements merged `docs/designs/<name>.md`)--## Summary of Key Changes--List all key changes made in this pull request and why:--<!-- Describe each key change and its motivation here. -->--## Human Accountability Affirmation--- [ ] I am a human contributor. I have personally reviewed, understood, and can explain every line of this change in review (using AI tools to write code is welcome, but human understanding of the submitted change is required).--## Verification--- [ ] **For Design Doc PRs (Stage 1)**: Executed `/egm-review docs/designs/<name>.md`, resolved findings via `/egm-resolve`, and verified relative links (`pytest tests/unit/test_link_integrity.py`).-- [ ] **For Bug Fix / Implementation PRs (Stage 2)**: Unit tests or `test_scenarios.yaml` added/updated and `pytest tests/unit` executed.-- [ ] **For Harness Support PRs**: Verified plugin installation and end-to-end execution of `/egm-brainstorm`, `/egm-draft`, and `/egm-review` on the target harness; attached execution summary or transcript.diff --git a/distributions/claude/AI_POLICY.md b/distributions/claude/AI_POLICY.mddeleted file mode 100644index 878e4c0..0000000--- a/distributions/claude/AI_POLICY.md+++ /dev/null@@ -1,29 +0,0 @@-# Artificial Intelligence & Automated Contribution Policy--We encourage using AI tools when developing changes for our codebase. However,-purely autonomous contributions are not accepted; human contributors must-review, understand, and explain every submitted change.--## Operational Rules--1. **Human Accountability**: Every pull request must have a human author who has- personally reviewed, tested, and verified every line of changed code.-2. **Interactive Code Review**: Contributors must directly defend their changes- in review. Copying maintainer review comments into an LLM and pasting- unverified model responses back into review threads is prohibited.-3. **EGM Design Requirement & Two-Stage Alignment**: Contributors planning features- or large changes (`> 100` non-test lines or `>= 3` core files in `skills/` or- `agents/`) should:- * **a)** Reach out to maintainers first via a- [Feature Inquiry Issue](https://github.com/google/elephant-goldfish-model/issues/new?template=feature_proposal.md)- (`.github/ISSUE_TEMPLATE/feature_proposal.md`) to receive- `status: approved-for-design`.- * **b)** Submit and merge a full EGM design document PR- (`docs/designs/<name>.md` authored via `/egm-brainstorm`, `/egm-draft`,- and `/egm-review`, referencing the issue with `Refs #<issue>`) so- maintainers can apply `status: approved-for-pr` to the Feature Inquiry Issue.- * **c)** Submit and merge an implementation PR of the approved design into- the codebase (`Closes #<issue>`).-4. **No Artificial PR Splitting**: Do not artificially split a single logical- feature or refactoring into multiple smaller pull requests (e.g., two 60-line PRs)- to bypass the 100-line scope threshold.diff --git a/distributions/claude/CONTRIBUTING.md b/distributions/claude/CONTRIBUTING.mddeleted file mode 100644index 62326a5..0000000--- a/distributions/claude/CONTRIBUTING.md+++ /dev/null@@ -1,93 +0,0 @@-# Contributing to the Elephant-Goldfish Model (EGM) Plugin--We welcome contributions! We all benefit when new ideas, skills, and reviewer-perspectives are shared across the open-source community.--## Design Principles--These general principles guide development of the EGM framework:--* **Humans Own the Outcomes**: AI is an exploration and review partner, but- human engineers remain responsible for all design decisions and code.-* **Artifact-First UX**: Large proposals, drafts, and reviews belong in- dedicated files, not dumped into chat streams.-* **Living Specifications**: Code and design specifications must evolve- together.--## Contribution Tracks & Workflow--All contributions must comply with our [AI & Automated Contribution Policy](AI_POLICY.md):-every pull request requires a human author who has reviewed and tested the change. They-should be able to explain it themselves.--Contributions follow a two-track intake model defined in-[`.github/PULL_REQUEST_TEMPLATE.md`](.github/PULL_REQUEST_TEMPLATE.md):--### Track 1: Bug Fix / Minor Patch (`<= 100` Non-Test Lines, `< 3` Core Files)-Targeted fixes, typo corrections, and test additions that do not alter core-agent behavior or touch 3+ core files (`skills/`, `agents/`) can be-submitted directly as a Pull Request without a prior issue or design document.-PRs exceeding these limits without an approved design doc receive an advisory label-(`advisory: design-doc-suggested`) recommending two-stage alignment.--### Track 2: Feature / Architectural Change (Two-Stage Alignment)-Any new skill, persona, or change exceeding `100` non-test-lines (or touching `>= 3` core files in `skills/` or `agents/`)-follows the EGM Spec-Driven Development process:--1. **Reach Out & Align (`status: approved-for-design`)**:- Before investing in a large implementation or full specification, open a- [Feature / Architectural Inquiry Issue](https://github.com/google/elephant-goldfish-model/issues/new?template=feature_proposal.md)- (`.github/ISSUE_TEMPLATE/feature_proposal.md`) outlining the problem- statement and proposed `Goals` vs. `Non-Goals`. We recommend using- `/egm-brainstorm` to complete this section. Maintainers will review and apply- `status: approved-for-design` once aligned on direction.--2. **Draft & Review Design Specification**:- Draft a technical design specification under `docs/designs/<name>.md`. We- recommend using `/egm-draft`, and registering it in [`docs/designs/README.md`](docs/designs/README.md).- We also recommend running `/egm-review docs/designs/<name>.md` to stress-test- the proposal.--4. **Submit a Design Doc PR (`status: approved-for-pr`)**:- Open a dedicated **Design Doc PR** containing `docs/designs/<name>.md`- and `docs/designs/README.md` (referencing your aligned issue with- `Refs #<issue>` rather than `Closes #<issue>` so the issue stays open).- When maintainers merge the Design Doc PR, the specification is checked into- the codebase and maintainers manually transition the issue label to- `status: approved-for-pr`.--5. **Submit the Implementation PR**:- Once the specification is merged and your issue is labeled- `status: approved-for-pr`, open the implementation PR (`Closes #<issue>`)- referencing `docs/designs/<name>.md`.--## Automated Validation & Testing--* **Skill Definitions**: Ensure all `SKILL.md` files contain valid YAML- frontmatter (`name`, `description`, and optional `disable-model-invocation`).-* **Evaluation Suites**: Skills must include a co-located behavioral- evaluation suite in `skills/<skill_name>/test_scenarios.yaml` and- verification instructions in `skills/<skill_name>/TEST.md`. See- [TESTING.md](TESTING.md) for running static checks (`pytest tests/unit`).-* **Formatting**: Format markdown files cleanly using standard formatters- (e.g., Prettier or markdownlint).--## Contributor License Agreement (CLA)--Contributions to this project must be accompanied by a-[Contributor License Agreement](https://cla.developers.google.com/about) (CLA).-You (or your employer) retain the copyright to your contribution; this simply-gives us permission to use and redistribute your contributions as part of the-project.--If you or your current employer have already signed the Google CLA (even if it-was for a different project), you probably don't need to do it again.--Visit <https://cla.developers.google.com/> to see your current agreements or to-sign a new one.--## Community Guidelines--This project follows-[Google's Open Source Community Guidelines](https://opensource.google/conduct/).diff --git a/distributions/claude/README.md b/distributions/claude/README.mdindex 184ec64..351cf2c 100644--- a/distributions/claude/README.md+++ b/distributions/claude/README.md@@ -24,7 +24,7 @@ Elephant-Goldfish Model (EGM) is an open-source plugin for Spec-Driven DevelopmeIn 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).+For detailed setup guides and walkthroughs, see [Getting Started](docs/getting_started.md), [Harnesses](docs/harnesses.md), and [Framework Architecture](https://github.com/google/elephant-goldfish-model/blob/main/docs/designs/architecture.md).## Skills@@ -50,7 +50,7 @@ For the foundational essay introducing this methodology, see Dave Rensin's artic## Contributing-We welcome community contributions! Please review [Harnesses](docs/harnesses.md) and our [Contribution Guidelines](CONTRIBUTING.md) before submitting pull requests.+We welcome community contributions! Please review [Harnesses](docs/harnesses.md) and our [Contribution Guidelines](https://github.com/google/elephant-goldfish-model/blob/main/CONTRIBUTING.md) before submitting pull requests.## Licensediff --git a/distributions/claude/TESTING.md b/distributions/claude/TESTING.mddeleted file mode 100644index cb073f7..0000000--- a/distributions/claude/TESTING.md+++ /dev/null@@ -1,105 +0,0 @@-# EGM Testing Playbook--This document provides a step-by-step developer playbook for running unit tests across the EGM skill suite.-------## Setup--### A. Python Environment Setup-Create and activate an isolated Python 3.10+ virtual environment:--```bash-# Navigate to the repository root-cd /path/to/egm_opensource--# Create virtual environment-python3 -m venv .venv--# Activate environment-source .venv/bin/activate--# Install testing dependencies-pip install -r requirements-dev.txt-```-------## Unit Tests--Unit tests run offline without network access, API keys, or model-dependencies. They validate YAML frontmatter schemas and relative link-integrity, the portable plugin manifest, shared metadata consistency, and-marketplace/component paths.--```bash-# Run all unit tests-pytest tests/unit--# Run with verbose output-pytest tests/unit -v--# Run a specific unit test module-pytest tests/unit/test_frontmatter.py -v-pytest 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 builds the Claude runtime and gives it-a unique test name. Two probes invoke the review skill with folder-scoped read-permissions and no approval hook. They check that a native reviewer reads only-its persona, sees no parent or project `CLAUDE.md` context, and stops without a-verdict when an explicit deny rule blocks its persona. This is a focused probe,-not the full review workflow or a marketplace installation test.-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/distributions/claude/docs/codex.md b/distributions/claude/docs/codex.mdindex 6755aee..ac90f90 100644--- a/distributions/claude/docs/codex.md+++ b/distributions/claude/docs/codex.md@@ -82,7 +82,7 @@ Do not use `file://` links in Codex chat.## VerificationRun the offline packaging checks with `pytest tests/unit`. The opt-in native-workflow tests are documented in [TESTING.md](../TESTING.md). They require+workflow tests are documented in [TESTING.md](https://github.com/google/elephant-goldfish-model/blob/main/TESTING.md). They requirean authenticated Codex CLI and consume model usage. Installing or discoveringthe plugin alone does not establish end-to-end workflow support.diff --git a/distributions/claude/docs/designs/README.md b/distributions/claude/docs/designs/README.mddeleted file mode 100644index 1452ede..0000000--- a/distributions/claude/docs/designs/README.md+++ /dev/null@@ -1,17 +0,0 @@-# EGM Design Specifications--This directory contains the canonical technical design specifications defining-the Elephant-Goldfish Model (EGM) framework, skills, reviewer personas, and-operational guardrails.--| Document | Author | Primary Component |-| :------- | :----- | :---------------- |-| [runtime_packaging.md](runtime_packaging.md)<br>Draft runtime package boundaries, permissions, and validation. | [@n3wth](https://github.com/n3wth) | Runtime packaging proposal (#120) |-| [releases.md](releases.md)<br>Draft versioned archives, checksums, and manual release procedure. | [@n3wth](https://github.com/n3wth) | Release proposal (#128) |-| [architecture.md](architecture.md)<br>System architecture of the EGM framework covering component models, end-to-end dataflow, and agent lifecycle. | [@quinnjim](https://github.com/quinnjim), [@eewing314](https://github.com/eewing314) | [EGM Framework Architecture](../../README.md) |-| [brainstorm.md](brainstorm.md)<br>Fast zero-doc ideation tool using a 6-lens Goldfish swarm to audit and stress-test early concepts before drafting. | [@briansuchy](https://github.com/briansuchy) | [`egm_brainstorm`](../../skills/egm_brainstorm/SKILL.md) |-| [draft.md](draft.md)<br>Iterative section-by-section specification drafting protocol and semantic boundary definitions. | [@quinnjim](https://github.com/quinnjim), [@eewing314](https://github.com/eewing314) | [`egm_draft`](../../skills/egm_draft/SKILL.md) |-| [drift_report.md](drift_report.md)<br>Automated scanner to detect and report divergence between checked-in design specifications and live codebase implementations. | [@quinnjim](https://github.com/quinnjim) | [`egm_drift_report`](../../skills/egm_drift_report/SKILL.md) |-| [bootstrap.md](bootstrap.md)<br>Bottom-up recursive bootstrapping and sentinel-block upserting of documentation across package and repository trees. | [@briansuchy](https://github.com/briansuchy) | [`egm_bootstrap`](../../skills/egm_bootstrap/SKILL.md) |-| [review.md](review.md)<br>Multi-stage verification protocol and automated resolution engine using isolated Goldfish reviewer personas. | [@tearseb](https://github.com/tearseb), [@briansuchy](https://github.com/briansuchy) | [`egm_review`](../../skills/egm_review/SKILL.md) |-| [synthesizer.md](synthesizer.md)<br>Intermediate orchestration subagent to coordinate swarm fan-out, deduplicate critiques, and normalize link citations. | [@briansuchy](https://github.com/briansuchy) | [`synthesizer`](../../agents/synthesizer.md) |diff --git a/distributions/claude/docs/designs/architecture.md b/distributions/claude/docs/designs/architecture.mddeleted file mode 100644index 3e1126b..0000000--- a/distributions/claude/docs/designs/architecture.md+++ /dev/null@@ -1,192 +0,0 @@-# EGM Architecture & System Lifecycle--* **Authors:** Jim Quinn ([@quinnjim](https://github.com/quinnjim)), Elise Ewing ([@eewing314](https://github.com/eewing314)), Dave Rensin ([@drensin](https://github.com/drensin))-* **Status:** Current-* **Date:** 2026-06-06------------------------------------------------------------------------------------## Overview--The **Elephant-Goldfish Model (EGM)** is an implementation of Spec-Driven-Development (SDD) based on [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).-It emphasizes collaborative use of AI for design and review, maintaining verified-technical specifications checked directly into the codebase.--This document specifies the overarching system architecture of EGM: its-component model, its end-to-end dataflow, and its lifecycle across coding agent-runtimes.--## The Problem--Unstructured, conversational AI code generation suffers from four systemic-failure modes:--1. **Hallucination Cascades & Context Pollution**: When a single LLM thread- interviews the developer, creates the design, and writes the code, the- session context accumulates speculative hypotheses and conversational bias.- The model validates its own faulty assumptions instead of detecting errors.-2. **Premature Implementation ("Weeds Syndrome")**: Coding agents default to- writing code immediately in nearby files, bypassing high-level architectural- placement, simplicity checks (YAGNI), and existing infrastructure reuse.-3. **Chat Dump Fatigue**: Presenting multi-page design specs or lengthy review- feedback directly in chat windows clutters conversation history, degrades- LLM context performance, and creates poor user ergonomics.-4. **Documentation Drift**: Design documents written during project kickoff- routinely rot as code evolves, breaking future AI agent onboarding.--## Design Principles--* **The Elephant & The Goldfish**:-- * **The Elephant**: A deep-context agent loaded with system history, CUJs,- and codebase maps to explore requirements and draft designs.- * **The Goldfish**: Isolated, zero-context subagent reviewers evaluating- drafts against rubrics without access to context bias.--* **Human Ownership**: AI is a tool for exploration and review; the human- engineer is responsible for architectural decisions, trade-offs, and owns- the outcome.--* **Artifact-First UX**: All long-form deliverables (drafts, summaries, review- reports) are rendered into dedicated side-panel markdown artifacts or- workspace files with interactive feedback checkpoints.--* **Living Specifications**: Designs are checked-in artifacts in the source- tree (`docs/designs/`), continuously monitored against codebase drift.--## System Architecture & Component Model--The open-source EGM framework is organized into four decoupled subsystems:--### 1. Skills Layer (`skills/`)-Modular agent capabilities executable via slash commands or direct invocation:-* `egm_brainstorm`: 6-lens shootdown swarm for early concept exploration.-* `egm_draft`: Section-by-section specification compiler.-* `egm_review`: Orchestrator for the multi-stage review pipeline.-* `egm_review_loop`: Concurrent subagent review dispatcher.-* `egm_resolve`: Interactive resolution and patch application.-* `egm_drift_report`: AST drift scanner between specs and active code.-* `egm_bootstrap`: Recursive bottom-up codebase documentation generator.--### 2. Personas Layer (`agents/`)-Stateless system prompt instructions for isolated Goldfish reviewer subagents-(Comprehension, Design Critic, Implementation Readiness, Codebase Auditor,-Structural Validator, Style Editor, and Synthesizer).--### 3. Document Standards (`resources/document_standards/`)-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 specifications-(`docs/designs/`).--## End-to-End Lifecycle & Dataflow--The EGM development pipeline transitions artifacts through five disciplined-phases:--```mermaid-sequenceDiagram- autonumber- actor Human as Software Engineer- participant Elephant as Elephant (Brainstorm & Draft)- participant Artifact as Side-Panel Artifact / File- participant Reviewer as Goldfish Reviewers (Synthesizer)- participant VCS as Version Control (PR)- participant Coder as Implementation Agent-- Human->>Elephant: /egm-brainstorm (Multi-Lens Ideation & Shootdown)- Elephant->>Artifact: Write concepts_brief.md- Human->>Elephant: /egm-draft- Elephant->>Artifact: Write docs/designs/FEATURE.md- Human->>Reviewer: /egm-review docs/designs/FEATURE.md- Note over Reviewer: Zoom Out -> Comprehension -> Critic -> Readiness- Reviewer->>Artifact: Write review reports & findings- Human->>Reviewer: Triage & resolve findings (/egm-resolve)- Human->>VCS: Open Pull Request with FEATURE.md- VCS-->>Human: Spec Approved & Merged- Human->>Coder: Implement against FEATURE.md-```--### Phase 1: Upstream Ideation & Multi-Lens Shootdown (The Elephant)--* **Command**: `/egm-brainstorm`-* **Mechanics**: The Elephant interviews the engineer to anchor a core hypothesis,- then spawns a 6-lens Goldfish swarm to shoot down flawed assumptions.-* **Output**: A structured brief written to `concepts_brief.md`.--### Phase 2: Spec Authoring & Semantic Boundaries--* **Command**: `/egm-draft`-* **Mechanics**: Converts the concepts brief (or discussion notes) into an EGM-compliant- technical design document written to `docs/designs/<feature>.md`.-* **Semantic Boundary Discovery**: Establishes a clear boundary between the- high-level architecture (`FeatureRange`) and the detailed implementation- plan (`DetailedRange`), enabling targeted subagent reviews.--### Phase 3: Isolated Verification (The Goldfish)--* **Command**: `/egm-review`-* **Execution**: Executes a 4-tier evaluation pipeline:- 1. **Step 5: Zoom Out Review**: Evaluates simplicity, YAGNI, and codebase- reuse against `zoom-out-standard.md`.- 2. **Step 6: Comprehension Test**: Isolated naive reader audits the doc for- self-containment and missing background knowledge.- 3. **Step 7: Critic Review**: Evaluates system design, scale bottlenecks,- and failure modes against `feature-spec-standard.md`.- 4. **Step 8: Implementation Readiness Test**: Verifies file paths, function- signatures, and test cases against- `implementation-readiness-standard.md`.-* **Subagent Fan-Out/Fan-In**: The `synthesizer` persona spawns isolated- reviewers in parallel, aggregates raw findings, deduplicates overlaps, and- writes consolidated markdown reports.--### Phase 4: Human Review & Submission--* The human engineer resolves or rejects Goldfish findings using- `/egm-resolve`, updates the design doc, and submits the- specification via Pull Request for human peer review.--### Phase 5: Implementation & Drift Monitoring--* **Execution**: Coding agents implement code strictly adhering to the- approved design document. (No Skill.md is required here because the design- document is complete and detailed.)-* **Maintenance**: `/egm-drift-report` is run periodically (e.g. weekly) to- detect divergence between codebase implementations and checked-in design docs.--## Artifact-First UX Protocol--To maintain conversation health and prevent context degradation, all EGM skills-adhere to the following UX protocol:--1. **Chat Dump Prohibition**: Tools and skills must never dump large proposals,- drafts, or review logs into the main chat stream.-2. **Artifact Emission**: All content must be written directly to dedicated- side-panel artifacts (with `RequestFeedback: true` in Antigravity) or to- persistent workspace files.-3. **Turn-Yielding Checkpoints**: When user feedback or triage is required, the- calling skill notifies the user with a concise message pointing to the- artifact and yields execution.-4. **Queue Clearance**: Once the user completes a checkpoint review, the- calling skill clears pending feedback markers.--## References--* Dave Rensin, [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) (Medium, 2026).--## Alternatives Considered--* **Monolithic In-Thread Review vs. Multi-Subagent Pipeline**:- * *Alternative*: Run review prompts sequentially within the same chat- session.- * *Rejection*: Severe context degradation and confirmation bias; the model- validates its own mistakes.-* **Direct-to-Code vs. Spec-Driven Development**:- * *Alternative*: Prompting agents to generate code directly from feature- requests.- * *Rejection*: Results in higher comment density per kLOC, duplicated- utility implementations, and zero checked-in architectural memory.diff --git a/distributions/claude/docs/designs/bootstrap.md b/distributions/claude/docs/designs/bootstrap.mddeleted file mode 100644index 38f891e..0000000--- a/distributions/claude/docs/designs/bootstrap.md+++ /dev/null@@ -1,791 +0,0 @@-# Design Doc: EGM Repository & Package Bootstrap (egm-bootstrap)--* **Author:** Brian Suchy ([@briansuchy](https://github.com/briansuchy))-* **Status:** Current-* **Date:** 2026-06-29------------------------------------------------------------------------------------## 1. Overview & Problem Statement--### 1.1 The Problem--In large-scale codebases (monoliths), establishing and maintaining a clear-architectural mental model is a primary challenge for both human developers and-AI assistants.--* **Context Loss**: Without structured directory-level documentation, AI- agents lack context on local invariants, public interfaces, and side- effects. This leads to context window bloat, repetitive file-reading loops,- and a risk of introducing regressions.-* **Monolith Scale**: Manual bootstrapping of directory READMEs for large- repositories is an intensive, tedious task that developers often- deprioritize.--### 1.2 Overview & The "Peanuts and Hay" Metaphor--We propose the **`egm-bootstrap`** skill for the EGM plugin. This-skill automates the creation, correction, formatting, and correctness-verification of-[Design is the New Code (DNC)](../../README.md)-compliant `README.md` files across a directory tree.--* **DNC Compliance**: Design is the New Code (DNC) is the EGM engineering- philosophy that treats human-readable architectural contracts (invariants,- interfaces, and side effects in directory READMEs) as the primary system- assets. These documentation files serve as structured guardrails for human- reviewers and AI agents alike.-* **Metaphor Mapping**: In this context, both "Peanuts" and "Hay" refer to the- generated directory-level `README.md` files:- * **Peanuts**: The granular, leaf-level **Component Package READMEs**- containing specific file contracts.- * **Hay**: The parent-level **Repository Blueprints** that roll up child- interface contracts to provide high-altitude indexes.--To ensure performance, efficiency, and robustness, the skill dynamically scales-its execution model based on the size of the target codebase:--1. **Incremental Scoping**: The Root Orchestrator maps the tree level-by-level- using native filesystem APIs (`list_dir`). If the directory count exceeds- scale limits during discovery, it pauses immediately to warn the user,- preventing hangs on massive repositories.-2. **Sequential Execution (Small Trees)**: If the target has 5 or fewer- subdirectories, the Root Orchestrator crawls and documents them sequentially- in post-order, avoiding multi-agent coordination and startup overhead.-3. **Unbounded Parallel Swarm (Medium/Large Trees)**: If the target has more- than 5 subdirectories, the Root Orchestrator partitions the tree and spawns- parallel instances of the orchestrator agent itself (using the framework's- `self` subagent type) as Sub-Orchestrators (one per sub-tree).- * **Adaptive Depth Partitioning**: To prevent parallelization bottlenecks- in repositories with a single nested source tree (e.g. `src/` or- `java/`), the Root Orchestrator partitions using adaptive depth,- descending levels of the discovery map until it splits the directories- into balanced subtree branches.- * **Unbounded Spawning upon Approval**: The Root Orchestrator removes- artificial concurrency limits. If the directory count is large (> 5), it- asks for user approval to spawn the required number of- Sub-Orchestrators, and then spawns all of them in parallel.- * **Direct Swarm Writing & Formatting**: Sub-Orchestrators process their- subtrees in parallel, write or modify `README.md` files directly in- their assigned folders, and format them using `mdformat`.-4. **Sequential Bottom-Up Processing**: Within each sub-tree, the- Sub-Orchestrator documents subdirectories sequentially in post-order- (deepest leaves first), spawning `goldfish-explorer` agents to summarize- files. This guarantees that parent directories are documented only after- their subdirectories are complete, preventing race conditions.-5. **Final Correctness Verification**: Before concluding work, the Root- Orchestrator runs a final pass across all created and modified READMEs to- verify DNC compliance, proper markdown formatting, valid relative- links, and valid verification targets.-6. **Optional Drift Review**: The Root Orchestrator optionally prompts the user- to run the EGM Drift Report on the generated README updates to ensure- consistency against the codebase.--### 1.3 Goals--* **Automated Bootstrapping & Correction**: Recursively generate or correct- DNC-compliant READMEs (`Interface`, `Invariants`, `Side Effects`) for any- target source directory tree. Existing READMEs are corrected and updated- without completely overwriting them.-* **Idempotent Sentinel-Block Upserting**: Guarantee zero loss of human- operational documentation on existing `README.md` files by encapsulating- auto-generated DNC contracts inside explicit HTML sentinel markers- (`<!-- EGM_BLUEPRINT_START ... -->` / `<!-- EGM_BLUEPRINT_END -->`),- preserving all human runbook content above the sentinels byte-for-byte- across runs.-* **Markdown Formatting**: Ensure every modified or created README is- properly formatted using markdown formatters.-* **Final Correctness Check**: Perform a final verification pass on all- modified READMEs as a correctness check before concluding work.-* **Safe Scaling**: Handle deep/broad directory trees via dynamic user- warnings, incremental BFS scoping, sub-tree partitioning, and unbounded- parallel execution upon user approval.--### 1.4 Non-Goals--* **Code Generation**: The skill will not write or refactor any functional- source code; it is strictly limited to documentation.-* **Non-Source Directories**: It will not document hidden system directories- (e.g., `.git`, `.jj`, `.gemini`), build output paths, or dependency- directories (e.g., `third_party`).--### 1.5 Critical User Journeys (CUJs)--#### CUJ 1: Bootstrap, Correct, Format, and Verify READMEs for a Directory Tree--* **Given**: A source directory tree (e.g., `src/` or `pkg/`) where- subdirectories either lack a `README.md` file or contain incomplete legacy- READMEs.-* **When**: The user runs the `egm-bootstrap` skill via the slash- command `/egm-bootstrap <path>` (or harness-equivalent command / prompt)- specifying the target root directory.-* **Then**:- 1. The Root Orchestrator maps the tree incrementally.- 2. If directory count <= 5, it processes them sequentially.- 3. If directory count > 5, it partitions the tree adaptively, requests user- approval, and spawns unbounded parallel worker instances of the- orchestrator agent itself (`self` Sub-Orchestrators).- 4. Sub-Orchestrators process their sub-trees bottom-up, spawning a- `goldfish-explorer` agent for each directory node.- 5. DNC-compliant `README.md` files are created or corrected, and formatted- using `mdformat`.- 6. The Root Orchestrator runs a final correctness check pass across all- modified READMEs.- 7. The user is optionally prompted to run a Drift Report on the updates.------------------------------------------------------------------------------------## 2. Technical Plan--### 2.1 Swarm Architecture & Roles--The `egm-bootstrap` skill utilizes exactly two agent configurations:--```mermaid-graph TD- Root[Root Orchestrator] -->|list_dir BFS| Map[Directory Map]- Root -->|Spawn Sub-Tree A| Worker1[Sub-Orchestrator A]- Root -->|Spawn Sub-Tree B| Worker2[Sub-Orchestrator B]- Worker1 -->|Seq: Leaf A.1| Exp1[Explorer: A.1 Directory]- Worker1 -->|Seq: Parent A| Exp2[Explorer: A Directory]- Root -->|Final Pass| Verify[Correctness Check & Format]-```--* **Node Orchestrator (`bootstrap-orchestrator`)**:- * Implemented as a single agent configuration.- * The **Root Instance** coordinates the pipeline: maps the tree- incrementally, calculates count/depth, manages safety gates, manages- unbounded parallel worker spawning upon user approval, documents- remaining intermediate directories, compiles the final root README, and- executes the final correctness check pass.- * The **Worker Instances (Sub-Orchestrators)** are spawned by the Root- Instance to process a specific top-level subdirectory tree. They walk- their sub-tree sequentially bottom-up, spawning explorers, writing or- modifying README files directly in the filesystem, and formatting them- with `mdformat`.-* **`goldfish-explorer`**:-- * A read-only, dynamic scout agent.- * **System Prompt**: > "You are a read-only codebase explorer. Your task- is to analyze the source files in the target directory and return a- concise, factual summary. Do not write or modify any files. Return a- JSON object containing the directory's public symbols (interface),- invariants, and side effects."- * **Scout File Constraints**: The scout caps total data read per directory- at **50,000 bytes** to prevent context window bloat. Implementation- and schema files (e.g. `.cc`, `.py`, `.java`, `.go`, `.rs`, `.ts`) are- read up to a maximum of **300 lines** per file. If a directory's size- exceeds the 50KB limit, files are selected for reading based on the- following priority list:- 1. Interface, schema, IDL, and header files (e.g. `.h`, `.hh`, `.hpp`,- `.proto`, `.graphql`, `.gql`, `.thrift`, `.prisma`, `.sql`- schema/DDL definitions, interface classes) are read completely.- 2. Module entry points (e.g., `main.*`, `index.*`, `lib.*`, `mod.*`,- `__init__.py`, or files matching the directory name) are read up- to 300 lines.- 3. Production source and configuration files sorted alphabetically are- read up to 300 lines until the byte cap is reached.- 4. Test files are completely ignored during context loading.- * **Output Schema**:-- ```json- {- "type": "object",- "properties": {- "interface": {- "type": "array",- "items": { "type": "string" }- },- "invariants": {- "type": "array",- "items": { "type": "string" }- },- "side_effects": {- "type": "array",- "items": { "type": "string" }- }- },- "required": ["interface", "invariants", "side_effects"]- }- ```--### 2.2 Agent Reporting & Context Contracts--The communications follow a hierarchical reporting pattern:--1. **Explorer to Sub-Orchestrator**: `goldfish-explorer` analyzes all files in- a directory and returns a structured JSON summary (interface, invariants,- side effects) to its parent `bootstrap-orchestrator`.-2. **Parent Context Propagation**: When the Sub-Orchestrator processes parent- directory `P`, it propagates the compiled interface summaries of its child- subdirectories as prompt context when invoking the parent's- `goldfish-explorer` scout. This enables the parent explorer to accurately- summarize child interface boundaries.- * *Propagating Heuristics*:- 1. If the child directory was documented during this execution run, the- Sub-Orchestrator retrieves its public interface directly from the- in-memory execution cache (or worker JSON return payload), consuming- the structured data directly.- 2. If the child README was corrected/modified, the Sub-Orchestrator- retrieves the updated symbols directly from the scout scan and- legacy extraction.-3. **Child to Parent Orchestrator**: Subdirectories return their compiled- README summary to the parent `bootstrap-orchestrator`, which uses this- to document the parent's "Subdirectories" interface section.-4. **Worker to Root Orchestrator**: Sub-Orchestrators return their compiled- subtree contract metadata to the Root Orchestrator using the structured JSON- schema defined below.--#### 2.2.1 Worker Return Interface Schema--Sub-Orchestrator worker subagents report completed subtree structures using the-following schema:--```json-{- "type": "object",- "properties": {- "subtree_index": {- "type": "array",- "items": {- "type": "object",- "properties": {- "path": { "type": "string" },- "summary": { "type": "string" },- "interface": { "type": "array", "items": { "type": "string" } },- "invariants": { "type": "array", "items": { "type": "string" } },- "side_effects": { "type": "array", "items": { "type": "string" } }- },- "required": ["path", "summary"]- }- }- },- "required": ["subtree_index"]-}-```--### 2.3 Directory Filtering & Classification Rules--To prevent documenting empty directories and ensure the correct template is-selected, we enforce the following rules during directory discovery:--* **Non-Code Filtering**: To prevent documenting empty directories, any- directory that contains no source code files AND contains no subdirectories- with code is excluded. Because a top-down traversal cannot know if- subdirectories contain code deeper down, pruning is executed as a- **bottom-up post-processing pass** after the complete tree has been mapped- in Phase A.- * *Source Code Files*: Defined as files containing executable code,- schemas, and contracts (e.g., `.c`, `.cc`, `.cpp`, `.cxx`, `.h`, `.hh`,- `.hpp`, `.rs`, `.go`, `.zig`, `.lean`, `.java`, `.kt`, `.scala`, `.cs`, `.fs`,- `.py`, `.rb`, `.php`, `.lua`, `.sh`, `.bash`, `.ts`, `.tsx`, `.js`,- `.jsx`, `.mjs`, `.cjs`, `.swift`, `.m`, `.dart`, `.sql`, `.proto`,- `.graphql`, `.gql`, `.thrift`, `.prisma`, `.tf`, `.hcl`, `.cue`).- Excludes build manifests, lockfiles, test fixtures, documentation, and- generic data dumps.-* **Test Directory Exclusion**: Any directory containing exclusively test code- (e.g., folders named `tests`, `testing`, `testdata`, or containing only- files matching `*_test.*` or `*Test.*`) is excluded from documentation- during the pruning pass.-* **Test File Filtering**: In hybrid package directories containing both- production and test files, the explorer scout filters out test files and- ignores their public symbols during context scanning to prevent test- fixtures from polluting the documented public interface.-* **Custom Exclusions**: The discovery loop supports custom ignore patterns.- By default, it ignores hidden/system directories (`.git`, `.jj`, `.gemini`,- `node_modules`). Additionally, it reads a local `.egmignore` file (if- present) containing glob patterns to exclude custom folders (e.g.- `*testdata*`, `*mocks*`, `third_party`).-* **Directory Classification**:- * **Repository Root (Blueprint / Hay)**: The target root folder of the- bootstrap execution is *always* classified as the Repository Root, even- if it contains direct source files. It is documented using the- "Repository Root README Template" (using the optional Local Interface- section for files in the root folder).- * **Component Package (Peanut)**: Any non-root directory containing direct- source code files. If it also contains child subdirectories with code- contracts, its README's `Interface` section will include relative links- to the child subdirectories' contracts.- * **Repository Blueprint (Hay)**: Any non-root directory containing *no*- direct source code files, but containing subdirectories with code- contracts (regardless of whether a `BUILD` file is present).--### 2.4 Document Templates--#### 📄 Component Package (Peanuts) README Template--Used for folders containing direct source files. Focuses on local module-contracts.--```markdown-# [Component Name]--## Overview-[Prose overview of the component's architectural role and goals]--## Interface-- [Public classes, functions, and symbols]-- [Subdirectories list and links to their contracts]--## Invariants-- [State and call invariants that must be preserved by developers/agents]--## Side Effects-- [State mutations, network calls, disk access, locks, or external side effects]--## Verification-- Build: `build //[package_path]...`-- Test: `test //[package_path]...`-```--#### 📄 Repository Root (Blueprint / Hay) README Template--Used for root directory nodes that coordinate child sub-trees.--```markdown-# [Repository Name] Blueprint--## System Overview-[High-altitude architectural overview of this subsystem]--[Optional section if the root directory contains direct source files]-## Local Interface & Invariants-- [Direct symbols, invariants, and side effects of files in the root folder]--## Subdirectories & System Boundaries-- [Subdirectory Name]: [Link to child README.md] - [Summary of child contract/role]--## Global Invariants-- [System-wide constraints that cross component boundaries]--## Global Side Effects-- [Shared resources, databases, or external integrations affected by this subsystem]--## System Verification-- Run: `test //[system_path]...`-```--#### 📄 Intermediate Blueprint README Template--Used for intermediate non-code directories that sit between the root and package-leaves (applicable to directories classified as Repository Blueprints that are-not the execution root).--```markdown-# [Directory Name]--## Overview-[Factual overview of the subdirectories and systems grouped under this directory path]--## Subdirectories & Boundaries-- [Subdirectory Name]: [Link to child README.md] - [Summary of child contract/role]-```--*Note: All subdirectory indexes in Hay templates must use relative paths (e.g.-`./subdir/README.md`) to maintain local rendering compatibility.*--### 2.5 Execution Pipeline--#### Phase A: Incremental Directory Scoping & Plan Definition--1. **Incremental BFS Discovery**: The Root Orchestrator maps the target tree- level-by-level (BFS) using a directory queue and native `list_dir` tool- calls, preserving intermediate folder nodes. **Symbolic links are ignored**- during traversal to prevent infinite recursion and duplicate mapping.-2. **Safety Gate**: During the BFS loop, if the total running count of- discovered directories exceeds **15**, the Root Orchestrator immediately- pauses the discovery traversal and calls the `ask_question` tool to warn the- user of the large execution scope and require confirmation before proceeding- with further mapping or worker spawning.-3. **Bottom-up Post-Pruning Pass**: Once the mapping traversal is complete (and- approved), the Root Orchestrator walks the mapped tree bottom-up (from- leaves to root). It filters out hidden, system, build-output, test-only, and- non-code directories according to the Filtering Rules.-4. Once the pruned tree is resolved, the Root Orchestrator calculates the- maximum depth.-5. **Execution Strategy**:- * **Sequential (Size <= 5)**: The Root Orchestrator executes the bottom-up- documentation sequentially in a single thread.- * **Parallel (Size > 5)**: The Root Orchestrator partitions the discovery- map into independent subtree branches.- * **Adaptive Depth Partitioning Algorithm**:- 1. Set `depth = 1`.- 2. Extract directory nodes from the discovery map located at the- current `depth`.- 3. If the count of nodes at `depth` is between 3 and 5: return- these nodes as subtree partition roots.- 4. If the count of nodes at `depth` < 3: increment `depth`, repeat- step 2.- 5. If the count of nodes at `depth` > 5: group the largest branches- (measured by total nested folder count) into 3-4 separate- partitions, combine the remaining small branches into a single- fallback partition subtree, and return these partition root- boundaries.- 6. Fallback: If `depth` limit of 3 is reached and count is still <- 3, return the immediate children of the root (or fall back to- sequential execution).- * It spawns a parallel worker (Sub-Orchestrator) for each partition- subtree, passing parameters `is_worker: true` and `sub_tree_root:- <path>` to the `self` subagent invocation.- * **Unbounded Spawning upon Approval**: The Root Orchestrator removes- artificial concurrency limits. If the directory count is large (> 5), it- asks for user approval to spawn the required number of- Sub-Orchestrators, and then spawns all of them in parallel.-6. **Conditional Branching Control**: The `egm-bootstrap` skill- configuration (`SKILL.md`) checks these parameters at start:- * If `is_worker` is false/unset: Executes the Root Orchestrator role (runs- BFS mapping, safety gates, spawns workers, compiles the final blueprint- README, and executes the final correctness check pass).- * If `is_worker` is true: Skips Phase A and executes the Sub-Orchestrator- role (processes the assigned `sub_tree_root` subtree bottom-up, spawning- explorers, writing/modifying files directly, and formatting them with- `mdformat`).--#### Phase B: Bottom-Up Bootstrapping--1. Under the parallel strategy, the Root Orchestrator spawns parallel- `bootstrap-orchestrator` instances as Sub-Orchestrators, passing each- its target sub-tree.-2. Each Sub-Orchestrator processes its sub-tree in post-order (deepest leaves- first):- * **Correction & Modification Policy**: Before generating documentation,- the Sub-Orchestrator checks if `README.md` already exists in the active- folder. If `README.md` exists, it does not overwrite it completely.- Instead, it reads the existing content, spawns the `goldfish-explorer`- scout to compile the true code contracts, and uses- `replace_file_content` (or `write_to_file`) to correct and update the- existing README to be DNC compliant while preserving developer notes and- descriptions.- * *Scout Scan Requirement*: Whether the README exists or not, the- Sub-Orchestrator **always spawns** the `goldfish-explorer` scout to- scan the source code in the directory and compile the true code- symbol boundary.- * *Legacy Symbol Extraction Prompt*: To parse pre-existing manual- README files, the Sub-Orchestrator calls the reasoning LLM with the- following extraction prompt: > "Analyze the following unstructured- README.md content. Extract all public symbol names, classes,- interfaces, invariants, and side effects. Format your response- strictly as a JSON object matching the following schema: {- \"interface\": string[], \"invariants\": string[], \"side_effects\":- string[] }."- * **Verification Command Target Lookup**: When generating the `##- Verification` section, the Sub-Orchestrator checks if a `BUILD` file- exists in the active folder. If present:- * It checks if test files (matching `*_test.*` or `*Test.*`) are- present. If test files exist, it writes the `Test:` command;- otherwise it omits the test command.- * If target names in the `BUILD` file are ambiguous or don't match the- folder name, it falls back to building the entire package wildcard- target: `build //[package_path]:all`.- * If no local `BUILD` file exists: it scans the nearest ancestor- `BUILD` file to locate targets whose `srcs` attribute references- files in the active subdirectory (e.g. via direct path list or- glob). If a matching target is found, it references that target- (e.g., `build //[ancestor_path]:my_target`). If multiple- targets match or no match is found, it falls back to the package- wildcard target: `build //[ancestor_path]:all`. If no ancestor- package is found, it omits the verification command.- * *Starlark Parsing Fallback*: If the ancestor `BUILD` file contains- complex Starlark macros or dependencies that cannot be resolved via- file reading, the Sub-Orchestrator falls back to referencing the- wildcard `:all` target of the ancestor package, or omits the target.- * **Scout Definition & Spawning**: The Sub-Orchestrator dynamically- declares the read-only `goldfish-explorer` subagent type using- `define_subagent` if not already defined in its active session.- * *Subagent Definition Arguments*:- * `TypeName`: `goldfish-explorer`- * `Role`: `goldfish-explorer`- * `enable_write_tools`: `false`- * `enable_subagent_tools`: `false`- * `SystemPrompt`: As defined in Section 2.1.- * It then spawns the scout sequentially for the active directory.- * **Child Fault Tolerance**: If a child subdirectory fails to document- (e.g., explorer timeout or tool error), the Sub-Orchestrator logs a- warning, inserts a placeholder link (e.g. `- [Subdirectory Name]: [Link- to child README.md] - (Details pending/documentation failed)`) in the- parent's directory index, and continues documentation instead of- aborting.- * Generates or corrects `README.md` using the appropriate template- depending on its classification (Component Peanut or Blueprint Hay;- Blueprint Hay nodes use the "Intermediate Blueprint template" if they- are not the execution root).- * **Markdown Formatting**: Immediately after writing or correcting- `README.md`, the Sub-Orchestrator executes- `markdown formatter (e.g. prettier or markdownlint)`- via `run_command` to ensure proper markdown formatting.-3. Once all parallel worker instances finish:- * **Root Fault Tolerance**: If a parallel worker fails or times out, the- Root Orchestrator logs a warning, inserts a placeholder warning link- (e.g., `[Subtree Root] (Documentation failed / Subagent execution- timeout)`) inside the root Blueprint's subdirectory index, and completes- the remaining compilation.- * **Intermediate Directory Documentation**: The Root Orchestrator- identifies any intermediate directories sitting between the root and the- partitioned subtree roots. It processes these intermediate directories- sequentially bottom-up, generating Intermediate Blueprint READMEs using- the compiled summaries returned by the workers, and formatting them with- `mdformat`.- * The Root Orchestrator checks if the root directory itself contains any- direct source files. If present, it spawns a `goldfish-explorer` scout- for the root directory to extract local symbols and invariants,- appending them to the root README under the `## Local Interface &- Invariants` section.- * It compiles the final root `README.md` (Blueprint), writes it, and- formats it with `mdformat`.- * **Final Correctness Verification**: The Root Orchestrator performs a- final verification pass across all created and modified READMEs in the- `subtree_index` to verify EGM compliance (`Interface`, `Invariants`,- `Side Effects`), proper markdown formatting, valid relative links- (explicitly verifying referenced child README or SKILL files physically- exist), and valid verification targets before concluding work.- * **Optional Drift Review**: The Root Orchestrator calls `ask_question` to- offer running the `egm-drift-report` skill on the generated updates to- verify consistency with the codebase.- * Terminates successfully.--### 2.6 Processing Tools--* **Directory Discovery**: Use native `list_dir` calls in a BFS loop- (filtering out `.git`, `.jj`, `.gemini`, `third_party`, `node_modules`).- BUILD files are preserved during discovery to extract build/test- targets for the Verification template section.-* **Markdown Formatting**: Use `run_command` to execute- `markdown formatter (e.g. prettier or markdownlint)` on- every modified or created README.--### 2.7 Incremental Sentinel-Block Upsert Architecture--To safely run `egm-bootstrap` over directories that already contain-human-authored operational documentation (such as repository runbooks or oncall-metadata), the skill enforces **Idempotent Sentinel-Block Bootstrapping**:--1. **Sentinel Boundary Markers**: Every DNC block generated by- sub-orchestrators or leaf workers is wrapped inside explicit HTML sentinel- markers:-- * **Start Sentinel:** `- <!-- EGM_BLUEPRINT_START: AUTO-GENERATED BY egm-bootstrap. PUT HUMAN NOTES ABOVE THIS LINE -->`- * **End Sentinel:** `<!-- EGM_BLUEPRINT_END -->`--2. **Three-State Upsert State Machine**: When writing or updating- `d/README.md`, workers execute:--```mermaid-flowchart TD- A[Read d/README.md] --> B{File Exists?}- B -- No --> C["Create file with sentinel-wrapped block"]- B -- Yes --> D{"Contains <!-- EGM_BLUEPRINT_START -->?"}- D -- Yes --> E["Replace substring [START, END] with new block"]- D -- No --> F{"Contains '## Subdirectories & System Boundaries'?"}- F -- Yes (Legacy DNC) --> G["Slice [0, HEADER_INDEX] as Human Preamble + Append Sentinel Block"]- F -- No (Pure Human) --> H["Retain 100% Human Preamble + Append '\n\n' + Sentinel Block"]- C --> I[Run markdown formatter on README.md]- E --> I- G --> I- H --> I-```------------------------------------------------------------------------------------## 3. Alternatives Considered--### 3.1 Single-Agent Flat Crawler--Instead of a recursive swarm, we considered using a single agent that walks the-directory tree sequentially, reading files and updating READMEs as it goes.--* **Why Rejected**:- * **Context Window Limits**: Walking a large directory tree sequentially- accumulates too much token history, leading to context truncation and- loss of precision.- * **Execution Time**: Sequential execution is slower for deep or broad- directory trees.- * **Parallelism**: It cannot leverage parallel execution. The swarm model- allows subagents to run in parallel, reducing execution time.--### 3.2 Direct Reuse of `growing-peanuts-and-hay` Skill--We investigated using the existing `growing-peanuts-and-hay` skill-(an internal prototype precursor)-directly.--* **Why Rejected**:- * The skill is team-specific, sequential, and hardcoded to specific- language conventions.- * EGM requires a general-purpose, language-agnostic tool (supporting C++,- Python, Java, etc.) that can scale to large repositories in parallel.- * We chose to write `egm-bootstrap` to consolidate their DNC- templates and bottom-up logic into a generic skill that supports- parallel scaling via `self` workers.------------------------------------------------------------------------------------## 4. Detailed Implementation--All changes will be housed within the open-source repository structure:--### 4.1 Implementation Files--1. **`skills/egm_bootstrap/SKILL.md`**-- * **Rationale**: Defines the EGM workflow steps for the bootstrap process.- * **YAML Frontmatter Input Schema**:-- ```yaml- name: egm-bootstrap- description: Bootstrap directory README.md files across a repository subtree.- inputs:- path:- type: string- description: The target root directory path to bootstrap.- required: true- is_worker:- type: boolean- description: Internal parameter. True if executing as a worker Sub-Orchestrator.- default: false- sub_tree_root:- type: string- description: Internal parameter. The root path of the assigned subtree partition.- required: false- ```-- * **`SKILL.md` Algorithmic Flow**:-- 1. **Startup Check**: Read `is_worker` parameter. If true, jump to step- 6 (Worker Flow).- 2. **BFS Scoping**: Run `list_dir` in a queue loop to map the directory- tree, ignoring symlinks and `.egmignore` globs.- 3. **Warning Gate**: If discovery count > 15, call `ask_question` and- wait for user approval.- 4. **Partitioning**: If count <= 5, document sequentially. Else, run- Adaptive Depth Partitioning to divide the tree into balanced- subtrees.- 5. **Spawning**: Invoke `self` subagents in parallel upon user- approval, passing `is_worker: true` and `sub_tree_root`. Jump to- step 9.- 6. **Worker Flow**: Declare the read-only `goldfish-explorer` subagent- type dynamically at startup. Traverse the assigned subtree bottom-up- (post-order).- 7. **Explorer Scan & Formatting**: For each folder, check Correction &- Modification Policy. Read existing README, spawn scout,- correct/update the file to be DNC compliant using- `replace_file_content` or `write_to_file`, and format it with- a markdown formatter.- 8. **Reporting**: Compile subtree index and return JSON (Worker- Interface Schema) to the Root Orchestrator.- 9. **Compilation & Final Verification**: The Root Orchestrator compiles- child metadata (recovering from worker timeouts), runs a scout on- the root folder files if present, writes the Blueprint README,- formats it with a markdown formatter, performs a final correctness check pass- across all modified READMEs, optionally prompts to run Drift Report,- and exits.--2. **`skills/egm_bootstrap/TEST.md`**-- * **Rationale**: Lists verification and test scenarios for the bootstrap skill.--3. **`skills/egm_bootstrap/test_scenarios.yaml`**-- * **Rationale**: Automated integration tests evaluating bootstrap scenarios- (small tree sequential execution, parallel subtree partitioning, and safety gates).--4. **`agents/bootstrap_orchestrator.md`**-- * **Rationale**: Defines the system prompt and instructions for the- `bootstrap-orchestrator` persona.------------------------------------------------------------------------------------## 5. Non-Functional Requirements--### 5.1 Security & Privacy--* **Source Centric**: The scoping only reads source files. It must ignore- hidden directories containing sensitive data (e.g., local credentials,- `.git/` history).--### 5.2 Performance & Token Overhead--* **Swarm Concurrency**: Subagents should be invoked with `Workspace=inherit`- to run in parallel.- * **`Workspace=inherit`**: In the Antigravity framework, launching a- subagent with `Workspace=inherit` instructs the system to share the- parent's workspace directory directly with the subagent, rather than- checking out a new isolated branch. This is required for parallel read- operations as it avoids cloning overhead and ensures all subagents see- the same local filesystem state.-* **VCS Isolation**: Sub-Orchestrator workers and explorers must perform no- version control commands (e.g. `git add`, `git commit`). All filesystem- changes are written locally. Tracking and submitting the generated- `README.md` files is deferred to the parent EGM session framework or the- user upon skill completion, avoiding concurrent VCS database locks.-* **Temporary File Isolation**: Parallel workers sharing the workspace must- perform all status tracking, check-pointing, and log writing in independent,- worker-specific directories using their unique `conversationId` under the- application data directory (e.g.- `<appDataDir>/brain/<conversation_id>/scratch/`). They must not write any- temporary files inside the source repository workspace, leaving the- source tree unmodified.-* **Antigravity Framework**: Antigravity is the agent SDK ecosystem and- runtime framework for autonomous coding assistants.-* **Token Optimization**: Goldfish scouts are read-only, ephemeral, and only- read single directories, preventing context window exhaustion on the- orchestrator.- * *Subagent Isolation vs. Direct File Reading*: Offloading file-level- reading to specialized `goldfish-explorer` scouts keeps the- Sub-Orchestrator's context window compact, as it only receives- structured JSON summaries rather than raw code files. This reduces token- overhead at the cost of subagent startup latency.-* **Warning Gate**: If directory count > 15, the user is prompted via- `ask_question` to prevent unbounded execution and token waste on large- repositories.--### 5.3 Risks & Mitigations--* **LLM Rate Limits**: Partitioning a broad repository tree could trigger too- many concurrent API calls. This is mitigated by requiring explicit user- approval before spawning unbounded parallel workers.-* **VCS Database Locks**: Mitigated by prohibiting workers and scouts from- executing any VCS tracking/commit commands (`jj`/`g4`), deferring operations- to EGM session completion.-* **State Collision on Shared Workspace**: Mitigated by storing execution- checkpoints in worker-specific scratchpad directories under `<appDataDir>`,- avoiding modifications to the workspace.-* **Worker failures leaving partial files**: Handled as an incremental- progress feature. The Correction & Modification Policy preserves partial- progress and corrects existing files on subsequent runs, allowing developers- to resume execution without data loss.-* **Documentation Drift**: Bootstrapped READMEs can drift from the codebase- over time. This is out of scope for the bootstrapping tool but should be- resolved in future EGM plugins by running periodic EGM drift check tools- (e.g. `egm-drift-report`).-* **Hallucination Risk**: Automated documentation of invariants and side- effects can suffer from LLM hallucinations. The generated README files- include standard verification commands (build/test targets) so users can- build and execute the package code to verify functionality.------------------------------------------------------------------------------------## 6. Verification & Test Plan--### 6.1 Static Analysis & Skill Validation--Verification ensures the skill definition, frontmatter, heading hierarchy, and-sentinel blocks conform to EGM standards.--### 6.2 Integration Testing & Scenarios--Automated integration test suites in `skills/egm_bootstrap/test_scenarios.yaml` evaluate:--* `bootstrap_small_tree`: Verifies sequential execution for a tree with <= 5- directories, ensuring it generates conforming Peanut and Hay READMEs,- formats them, and runs a final correctness check pass.-* `bootstrap_parallel_tree`: Verifies unbounded parallel worker spawning upon- user approval, child context propagation, direct filesystem- writing/modifying, formatting, and final correctness verification.-* `bootstrap_safety_gate`: Verifies the warning gate triggers when the mapped- directory count exceeds 15, pausing traversal and prompting the user.-* `bootstrap_incremental_sentinel_upsert`: Verifies that running- `egm-bootstrap` against an existing `README.md` containing human- operational notes preserves all human text above the sentinel block while- updating the DNC contract below.diff --git a/distributions/claude/docs/designs/brainstorm.md b/distributions/claude/docs/designs/brainstorm.mddeleted file mode 100644index aef37fb..0000000--- a/distributions/claude/docs/designs/brainstorm.md+++ /dev/null@@ -1,134 +0,0 @@-# EGM Brainstorm: Zero-Doc Upstream Ideation & Multi-Lens Shootdown--* **Author:** Brian Suchy ([@briansuchy](https://github.com/briansuchy))-* **Status:** Current-* **Date:** 2026-07-31------------------------------------------------------------------------------------## Overview--The **EGM Brainstorm Skill** (`/egm-brainstorm`) is a fast way to validate-ideas. It is intended to be run early when a human doesn't know what solution-they want yet. It gives early access to a Goldfish swarm for "half-baked"-concepts and can be used before any formal design discussion begins.--## The Problem--Drafting formal technical design documents too early in the ideation cycle leads-to two major failure modes:--1. **Premature Commitment to Flawed Hypotheses**: When developers write full- design documents for early-stage ideas, they invest significant effort- specifying details for a premise that may be unnecessary.--2. Standard AI chat brainstorming without adversarial review runs the risk of- sycophancy.--## System Architecture & Workflow--```mermaid-sequenceDiagram- autonumber- actor Human as Software Engineer- participant Brainstorm as egm-brainstorm Skill- participant Synth as Synthesizer Persona (Mode: BRAINSTORM)- participant Swarm as 6-Lens Goldfish Swarm- participant Artifact as Artifact: concepts_brief.md-- Human->>Brainstorm: /egm-brainstorm (Raw Feature Idea)- loop Multi-Turn Chat Drilling- Brainstorm->>Human: Open-ended probing questions (no multiple-choice modals)- Human->>Brainstorm: Clarifications & constraints- end- Brainstorm->>Human: Summarize anchored hypothesis & confirm readiness- Human->>Brainstorm: Confirm ready for shootdown- Brainstorm->>Synth: invoke_subagent (Mode: BRAINSTORM, FeatureConcept)- Synth->>Swarm: Parallel shootdown across 6 lenses- Swarm-->>Synth: Raw critiques & feasibility risks- Synth->>Artifact: write_to_file (concepts_brief.md)- Synth-->>Brainstorm: send_message (Completion & artifact link)- Brainstorm->>Human: Highlight top objections & invite iteration- Human->>Brainstorm: Refine or handoff to /egm-draft-```--### 1. Step 1: Open-Ended Problem Drilling--* The skill deliberately avoids structured multiple-choice question modals- (`ask_question`) during early ideation, forcing open-ended exploration in- chat across multiple turns.-* Probes the root bottleneck, consuming systems, hard non-negotiable- invariants, and explicit non-goals.-* Constructs a 2-3 sentence anchored hypothesis and requires explicit human- approval before spawning the subagent swarm.--### 2. Step 2: The 6 Goldfish Brainstorming Lenses--The `synthesizer` persona spawns six concurrent Goldfish subagents to audit the-concept from distinct, conflicting perspectives:--| Lens / Persona | Core Objective | Key Question Challenged |-| :------------- | :------------- | :---------------------- |-| **1. Contrarian / YAGNI** | Complexity minimization | *Can existing libraries, APIs, or services solve this without new code?* |-| **2. Cost & Resource Economics** | Budget & infrastructure scaling | *What is peak QPS, memory footprint, storage load, or token cost at scale?* |-| **3. UX & Developer Ergonomics** | Usability & cognitive overhead | *Is the CLI/API intuitive? Are error messages actionable, or does it add developer friction?* |-| **4. Migration & Compatibility** | Rollout safety & version skew | *How do existing clients/data migrate? Does this break serialized formats or persistent storage?* |-| **5. Observability & SRE** | Telemetry & debuggability | *Are operations traceable with distributed tracing? Are monitoring metrics and alerts actionable for oncalls?* |-| **6. Tech Debt & Maintenance** | Long-term maintainability | *Does this introduce tightly coupled state machines that will become tech debt in 2 years?* |--### 3. Step 3: Synthesis into `concepts_brief.md`--The synthesizer consolidates the multi-lens feedback into `concepts_brief.md` in-the side-panel artifact directory or local workspace:--* Executive Summary & Problem Framing-* Multi-Lens Analysis & Risk Matrix-* Scope Boundaries (Goals vs. Non-Goals)-* Key Architectural Decisions--### 4. Step 4: Iterative Refinement & Handoff--The engineer reviews the brief, addresses key objections, and decides whether-to:--* Abandon the idea altogether.-* Continue refining the hypothesis with additional Goldfish shootdown passes.-* Transition into **`/egm-draft`** (when the concept is concrete and ready for- formal design doc authoring).--## Implementation Files & Referenced Components--The brainstorm capability is implemented via its core skill definition and-delegates directly to the shared EGM subagent swarm and document standards:--### Core Skill Files--| File Path | Type | Purpose & Reason for Existence |-| :-------- | :--- | :----------------------------- |-| `skills/egm_brainstorm/SKILL.md` | Skill Definition | Implements `/egm-brainstorm` workflow, multi-turn open-ended drilling, shootdown delegation, and brief finalization. |-| `skills/egm_brainstorm/TEST.md` | Unit Tests | Verification test scenarios validating the brainstorm ideation and multi-lens critique flow. |-| `skills/egm_brainstorm/test_scenarios.yaml` | Evaluation Benchmark | Benchmark test suite evaluating brainstorm ideation and multi-lens critique flow. |--### Referenced Personas & Infrastructure Components--The ideation shootdown swarm relies on intermediate orchestration and-specialized Goldfish personas defined in `agents/` and document standards:--* **Intermediate Orchestration**:- [`agents/synthesizer.md`](../../agents/synthesizer.md) (`Mode: BRAINSTORM`)- coordinates the parallel fan-out and compiles `concepts_brief.md`.-* **6-Lens Goldfish Personas**:- * [`agents/zoom_out.md`](../../agents/zoom_out.md): Contrarian / YAGNI Lens.- * [`agents/design_critic.md`](../../agents/design_critic.md): Cost, Quota & Resource Economics Lens.- * [`agents/comprehension.md`](../../agents/comprehension.md): UX & Developer Ergonomics Lens.- * [`agents/implementation_readiness.md`](../../agents/implementation_readiness.md): Migration & Compatibility Lens.- * [`agents/codebase_details.md`](../../agents/codebase_details.md): Codebase Grounding & Existing Reuse Lens.- * [`agents/structural.md`](../../agents/structural.md): Maintainability & Tech Debt Lens.-* **Referenced Standards**: Evaluates concepts against- [`zoom-out-standard.md`](../../resources/document_standards/zoom-out-standard.md)- and [`heilmeier-standard.md`](../../resources/document_standards/heilmeier-standard.md).--## References--* Dave Rensin, [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) (Medium, 2026).-* DARPA, [The Heilmeier Catechism](https://www.darpa.mil/about/heilmeier-catechism).diff --git a/distributions/claude/docs/designs/draft.md b/distributions/claude/docs/designs/draft.mddeleted file mode 100644index b20bed0..0000000--- a/distributions/claude/docs/designs/draft.md+++ /dev/null@@ -1,207 +0,0 @@-# EGM Design Drafting: Specification Authoring & Semantic Boundaries--* **Authors:** Jim Quinn ([@quinnjim](https://github.com/quinnjim)), Elise Ewing ([@eewing314](https://github.com/eewing314))-* **Status:** Current-* **Date:** 2026-06-06------------------------------------------------------------------------------------## Overview--The **EGM Design Drafting Skill** (`/egm-draft`) converts the ideation-artifact (`concepts_brief.md` from `/egm-brainstorm` or discussion notes) into a-formal, living design document under `docs/designs/`. It drafts the document-iteratively section-by-section, gathering feedback at each stage before saving to-disk.--Crucially, it establishes **semantic boundaries** within the document to enable-downstream multi-agent reviews (`/egm-review`) and automated drift auditing-(`/egm-drift-report`).--## The Problem--Directly asking AI models to author a comprehensive technical design in a single-prompt produces severe quality issues:--1. **Monolithic Hallucination & Wall-of-Text Output**: Models output massive,- unstructured markdown blobs directly into the chat pane, making review- difficult and truncating technical depth.-2. **Premature Code Dumping**: Instead of focusing on architectural invariants,- data flows, and file-level rationales, models generate raw, unmaintainable- helper code.-3. **Lack of Semantic Structure for Downstream Tooling**: Without strict- standardized section boundaries (e.g., distinguishing high-level goals from- concrete implementation plans), automated reviewers cannot partition audit- responsibilities.--## Design Principles--* **Section-by-Section Iterative Drafting**: Drafts are authored incrementally- (Overview & Goals -> Architecture & Diagrams -> Alternatives ->- Implementation Plan), requesting user feedback between sections.-* **Artifact-First Delivery**: All drafting state is rendered into side-panel- artifacts (`design_draft.md`) or persistent workspace files. Printing large- drafts directly to the chat stream is strictly prohibited.-* **Semantic Split by Design**: Drafts are partitioned into a high-level- conceptual section (`FeatureRange`) and a concrete execution section- (`DetailedRange`) to facilitate targeted downstream Goldfish reviews.-* **Exhaustive File & Rationale Enumeration**: The implementation plan must- enumerate every file to create, modify, or delete, accompanied by an- architectural rationale, without generating raw source code.-* **Provenance Watermarking**: Finalized documents append a standardized- provenance watermark footer to track AI authoring state.--## System Architecture & Workflow--```mermaid-sequenceDiagram- autonumber- actor Human as Software Engineer- participant Draft as egm-draft Skill- participant Summary as Artifact: concepts_brief.md / notes- participant DraftArtifact as Artifact: design_draft.md- participant ZoomOut as zoom-out-standard.md- participant Workspace as Workspace File: docs/designs/<FEATURE>.md- participant Review as egm-review Skill-- Note over Human,Draft: Step 1: Predecessor Context Ingestion- Human->>Draft: /egm-draft- Draft->>Summary: Read concepts_brief.md & verify consensus-- Note over Human,Draft: Step 2, 3, 4: High-Level Sections (FeatureRange)- Draft->>DraftArtifact: Draft Overview, Problem Statement & Goals- Draft->>DraftArtifact: Append Architecture, Data Flow & Mermaid Diagrams- Draft->>DraftArtifact: Append Alternatives Considered & Trade-offs- Draft->>Human: Request Feedback on High-Level Sections-- Note over Human,Draft: Step 5: Detailed Implementation (DetailedRange)- Draft->>DraftArtifact: Append Detailed Implementation Plan (Files & Rationales)- Draft->>Human: Request Feedback on Implementation Checklist-- Note over Human,Draft: Step 6: Finalization, Watermark & Handoff- Draft->>ZoomOut: Self-Evaluate vs zoom-out-standard.md- Draft->>DraftArtifact: Append Watermark Footer- Draft->>Workspace: Write docs/designs/<FEATURE>.md- Draft->>Human: Provide link to spec & recommend /egm-review- Human->>Review: /egm-review docs/designs/<FEATURE>.md-```------------------------------------------------------------------------------------## The Drafting Protocol (`/egm-draft`)--The `/egm-draft` workflow converts the ideation artifact into a living-markdown design doc:--### Step 1: Predecessor Context Ingestion--Parses `concepts_brief.md` (or `discussion_summary.md` / feature notes) from the artifact directory (falling back to the-scratch directory or workspace root if needed) and verifies user consensus.--### Step 2: Overview, Problem & Goals--Drafts the user-facing problem statement, business value, goals, and non-goals-in `design_draft.md`.--### Step 3: Technical Plan & Architecture--Appends component diagrams (Mermaid), API signatures, and data flow narratives.--### Step 4: Alternatives Considered--Documents rejected alternatives with concrete trade-off justifications (latency,-complexity, maintenance).--### Step 5: Detailed Implementation Plan--Drafts the execution section:--* Unified checklist of every file to create, modify, or delete.-* Explicit architectural rationale for each file change.-* **No implementation code**: Includes only schemas, type definitions, and- pseudocode.--### Step 6: Finalization, Formatting & Registration--* Performs a final self-evaluation against- [`zoom-out-standard.md`](../../resources/document_standards/zoom-out-standard.md).-* Appends a standardized provenance watermark footer (*`*Drafted with EGM*`*)- separated by a horizontal rule delimiter (`--------------------------------------------------------------------------------`)- after trailing open questions.-* Writes the document to `docs/designs/<FEATURE>.md`.-* Registers the document in `docs/designs/README.md` if present.-* Formats markdown using standard markdown formatters.-* Outputs a clickable link and instructs the user to run `/egm-review`.------------------------------------------------------------------------------------## Semantic Boundary Discovery--EGM design documents are deliberately structured to enable the downstream-Goldfish review engine to parse the document into two semantic zones:--1. **Feature Range (`FeatureRange`)**: Lines 1 through the header boundary.- Contains the high-level problem statement, goals, architecture, and- alternatives. Audited by the **Design Critic** (`egm_design`) and- **Comprehension Reviewer** (`egm_comprehension`).-2. **Detailed Range (`DetailedRange`)**: From `## Detailed Implementation Plan`- to EOF. Contains file targets, schemas, and test plans. Audited by the- **Implementation Readiness Reviewer** (`egm_implementation_readiness`) and- **Codebase Details Auditor** (`egm_codebase_details`).--Standardizing on the `## Detailed Implementation Plan` header allows automated-boundary discovery without requiring manual line range configuration. Terminal-footer watermarks (`*Drafted with EGM*`) residing at EOF are treated-as inert structural metadata and excluded from requirement audits during review-and drift analysis.--## Provenance Watermarking--To support lightweight provenance tracking and human inspection, all design-`/egm-draft` specs include a footer watermark:--```markdown-----------------------------------------------------------------------------------*Drafted with EGM*-```--* **Delimited EOF Placement**: Appended at the absolute end of the document,- separated from trailing sections (`### Open Questions`) by a horizontal- line.-* **Best-Effort & Forward-Looking**: Applies strictly to newly drafted or- updated specifications moving forward; no retroactive migration sweeps or- blocking presubmits are imposed on legacy documents.------------------------------------------------------------------------------------## Standards Alignment--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) |------------------------------------------------------------------------------------## Implementation Files--The drafting capability is implemented across the following skill and reference files:--| File Path | Type | Purpose & Reason for Existence |-| :-------- | :--- | :----------------------------- |-| `skills/egm_draft/SKILL.md` | Skill Definition | Implements `/egm-draft` section-by-section markdown compilation, sitemap registration, and formatting. |-| `skills/egm_draft/TEST.md` | Unit Tests | Verification test scenarios validating the drafting and finalization workflow. |-| `skills/egm_draft/test_scenarios.yaml` | Evaluation Benchmark | Co-located behavioral eval suite evaluating model adherence to the drafting protocol. |-| `skills/egm_draft/references/design_doc.md` | Document Template | Canonical markdown design document template defining required sections and layout. |-| `resources/execution_instructions.md` | Execution Instructions | Core execution rules enforcing no-code guardrails, silent compliance, and one-question-at-a-time pacing. |------------------------------------------------------------------------------------## References--* Dave Rensin, [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) (Medium, 2026).-* GitHub, [GitHub Flavored Markdown Spec](https://github.github.com/gfm/).diff --git a/distributions/claude/docs/designs/drift_report.md b/distributions/claude/docs/designs/drift_report.mddeleted file mode 100644index fe679ee..0000000--- a/distributions/claude/docs/designs/drift_report.md+++ /dev/null@@ -1,123 +0,0 @@-# EGM Drift Detection Protocol (Living Specifications & Code Synchronization)--* **Author:** Jim Quinn ([@quinnjim](https://github.com/quinnjim))-* **Status:** Current-* **Date:** 2026-06-07------------------------------------------------------------------------------------## Overview--The **EGM Drift Detection Skill** (`/egm-drift-report`) audits checked-in design-documents under `docs/designs/` and package `README.md` hierarchies against-source code to identify and report architectural divergence.--It is intended to be incorporated as a ritual by teams practicing EGM to keep-their design documents in sync with their feature implementations.--## The Problem--Documentation drift, particularly when paired with AI tooling, has these-problems:--1. **Stale Context**: Without a system to keep them up to date, quick- point-fixes or untracked refactors leave designs outdated. When a human or- AI agent consults an outdated spec to design a new feature, they make flawed- assumptions that lead to broken implementations.--2. **Silent Architectural Rot**: Without automated verification, differences- between the intended design and actual code (e.g., hardcoded bypasses- instead of dynamic resolvers) accumulate unnoticed until production- incidents occur.--3. **Human Fatigue**: Manually cross-referencing multi-page design docs against- dozens of implementation files is tedious and rarely performed consistently.--## System Architecture & Workflow--```mermaid-sequenceDiagram- autonumber- actor Human as Software Engineer / Gardener- participant DriftSkill as egm-drift-report Skill- participant DesignDir as docs/designs/ Directory- participant Codebase as Live Codebase- participant Artifact as Artifact: {YYYY-MM-DD}_DRIFT_REPORT.md-- Human->>DriftSkill: /egm-drift-report [path/to/designs]- DriftSkill->>DesignDir: List all design specifications- loop For Each Design Document (Sequential)- DriftSkill->>DesignDir: Read doc & extract symbols, files, APIs- DriftSkill->>Codebase: Locate source files & inspect current state- DriftSkill->>DriftSkill: Compare design vs reality (Detect divergence)- DriftSkill->>Artifact: Append findings under ## <DOC_NAME>- end- DriftSkill->>Human: Deliver consolidated drift report artifact- Human->>Codebase: Reconcile drift (Update code OR update doc)-```------------------------------------------------------------------------------------### Drift Detection Heuristics--The drift skill audits code against four core divergence categories:--| Divergence Category | Description | Example Reportable Drift |-| :------------------ | :---------- | :----------------------- |-| **Missing Features** | Logic or components described in the design but completely absent in source code. | A scheduled cleanup task specified in the design doc was never implemented in the service binary. |-| **Incomplete Models** | Structs, schemas, dataclasses, or classes missing fields specified in the design. | A model schema in the design defines 5 fields, but the code implementation only has 3. |-| **Logic Shortcuts** | Hardcoded values, mock fallbacks, or bypasses where dynamic logic was designed. | A dynamic quota lookup was designed, but the code uses a hardcoded constant `DEFAULT_QUOTA = 100`. |-| **Architectural Divergence** | Code implemented using different design patterns, frameworks, or dependencies than planned. | The design specified using gRPC service endpoints, but the implementation uses custom HTTP handlers. |------------------------------------------------------------------------------------### Execution Protocol--1. **Intake & Discovery**: Identifies target design folder (`docs/designs/`)- or package tree (`README.md`).-2. **Sequential Processing**: Audits documents one-by-one to prevent tool- buffer overflows and context degradation.-3. **Source Grounding**: Resolves referenced classes, endpoints, and files via- code search and file viewing tools. If a document references unlinked symbols,- the report prompts the engineer to add explicit links for cheaper future scans.-4. **Difference Filtering**: Reports **ONLY** actionable discrepancies. If the- implementation matches the design completely, it outputs `"No drift detected."`-5. **Artifact Output**: Formats all results into `{YYYY-MM-DD}_DRIFT_REPORT.md`- using strict markdown headings:-- ```markdown- ## <DESIGN_DOC_NAME>-- * [Divergence item 1 with file:line reference]- * [Divergence item 2]- <!-- Or "No drift detected." -->- ```------------------------------------------------------------------------------------### Operational Maintenance Cadence--To keep documentation living and trustworthy, we recommend (but do not enforce)-the following:--* **Weekly Gardener Rotation**: Teams running EGM incorporate- `/egm-drift-report` into their weekly build gardener or oncall checklist.-* **Two-Way Reconciliation**: Every drift detected is actionable:- * *If the code change was intentional*: Update the design document to- reflect reality.- * *If the design was violated*: File an issue or prompt an agent to complete- the missing implementation.--## Implementation Files--The drift detection skill is implemented across the following files:--| File Path | Type | Purpose & Reason for Existence |-| :-------- | :--- | :----------------------------- |-| `skills/egm_drift_report/SKILL.md` | Skill Definition | Implements `/egm-drift-report` sequential document scanner, divergence heuristics analyzer, and report generator. |-| `skills/egm_drift_report/TEST.md` | Unit Tests | Verification test scenarios testing drift detection heuristics and report generation. |-| `skills/egm_drift_report/test_scenarios.yaml` | Evaluation Benchmark | Benchmark test suite evaluating drift detection accuracy and false-positive filtering. |--## References--* Dave Rensin, [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) (Medium, 2026).diff --git a/distributions/claude/docs/designs/releases.md b/distributions/claude/docs/designs/releases.mddeleted file mode 100644index 7103e18..0000000--- a/distributions/claude/docs/designs/releases.md+++ /dev/null@@ -1,91 +0,0 @@-# Versioned runtime releases--Status: Draft. Maintainer scope approval and design review are pending.-Author: @n3wth. Date: 2026-10-24.--Related issue: #124. Proposed implementation: #128, dependent on #120.--## Problem and scope--Users need identifiable archives built from a reviewed commit. Prepare a draft-release with source identity and checksums, then verify its exact artifacts-before publication.--Reuse the [runtime packaging design](runtime_packaging.md). Do not create tags-automatically, publish automatically, run paid models in CI, or add host support.--## Version and artifact contract--Use the root plugin version as canonical. Require matching Claude and Codex-manifest versions. Accept `vMAJOR.MINOR.PATCH` tags without leading zeroes.-Never reuse a published version for changed artifacts.--The proposed `scripts/prepare_release.py` accepts `--tag`, `--commit`, and-`--output`. Require a full source SHA and a new output directory. Produce:--- `egm-claude-VERSION.zip`-- `egm-openai-VERSION.zip`-- `SHA256SUMS`-- `RELEASE_NOTES.md`, containing the source SHA, tag, and verification limits--Local invocation validates the supplied values and builds archives. It does-not prove Git ancestry or run tests. The workflow owns those checks.--## Workflow and permissions--Dispatch the workflow manually from `main` with an existing version tag. Resolve-the tag to a commit and require that commit to be an ancestor of `main`. Check-out that commit, run offline tests, and prepare its archives.--The build job has `contents: read`, `id-token: write`, and `attestations: write`.-After building, use a commit-pinned `actions/attest` to sign provenance for both-runtime ZIPs and store it in GitHub. Disable registry storage records; no registry-or artifact-metadata permission is needed. Attestation failure stops the build.-Local preparation does not create attestations.--The provenance identifies the workflow dispatched from `main`. Its source-identity can differ from the selected tag checked out during the job. Release-notes record the tagged source SHA. Review both identities before publication.-Attestations establish artifact provenance, not host compatibility or code safety.--A separate draft job receives-the artifacts, verifies their checksums, rechecks tag identity, and creates a-draft with contents-write permission. Duplicate release creation fails without-replacing existing assets. Neither job creates tags or publishes releases.--## Acceptance and release procedure--1. Obtain scope approval for #124 and merge the reviewed design.-2. Merge #120 after its design approval and renewed implementation review.-3. Retarget #128 to `main`, refresh validation, and merge after approval.-4. Select the reviewed version and commit. Regenerate packaged content and- validate all included runtime changes before a maintainer creates the tag.-5. Dispatch the workflow. Inspect both archives, checksums, and source identity.- Verify each ZIP with `gh attestation verify FILE --repo google/elephant-goldfish-model`.- Require the signing workflow `.github/workflows/release.yml` from `main`.-6. Complete #60 for each claimed host using these exact artifacts. Record- installed-file identity, host/model versions, date, and separate installation,- workflow, and isolation results.-7. Review final release notes and publish manually. Directory approval remains- separate from release publication.--Test version mismatch, malformed tags and source IDs, archive contents,-checksums, overwrite refusal, and generated freshness. Lint the workflow and-validate its first real dispatch before accepting release preparation as done.--Reuse historical host evidence only with an explicit explanation of its-applicability. Do not present old candidate results as fresh artifact passes.-Keep cloud support partial while #105 and #106 retain evidence gaps.--## Failure handling and alternatives--Leave a failed or unverified candidate unpublished. Build retries use a fresh-local output directory. Do not replace a published archive or move its tag;-prepare a corrected version instead.--Hand-built releases can omit validation or source identity. Automatic publication-would remove the final evidence review. A validated draft preserves that review-without duplicating the package builder.--This draft does not establish maintainer approval or claim an EGM design-review-run. The issue remains open until the release workflow is validated.diff --git a/distributions/claude/docs/designs/review.md b/distributions/claude/docs/designs/review.mddeleted file mode 100644index 8559c56..0000000--- a/distributions/claude/docs/designs/review.md+++ /dev/null@@ -1,182 +0,0 @@-# EGM Goldfish Review Protocol & Resolution Engine--* **Authors:** Brandon Tearse ([@tearseb](https://github.com/tearseb)), Brian Suchy ([@briansuchy](https://github.com/briansuchy)), Sean Stappas ([@seanstappas](https://github.com/seanstappas))-* **Status:** Current-* **Date:** 2026-06-10------------------------------------------------------------------------------------## Overview--The **Goldfish Review Protocol** is the verification engine of the Elephant &-Goldfish Model (EGM). It stress-tests draft design specifications using-isolated, zero-context AI subagents ("Goldfish") evaluating the document against-strict qualitative rubrics.--This document specifies:--1. The multi-stage review pipeline (`/egm-review`).-2. The review orchestration driver (`egm_review_loop`).-3. The complete catalog of specialized reviewer personas.-4. The mapping to document standards and evaluation rubrics- (`resources/document_standards/`).-5. The interactive resolution engine (`egm_resolve`).--## The Problem--Self-review by the authoring LLM suffers from severe confirmation bias. When the-same context window drafts and reviews a plan:--1. **Blind Spots Persist**: The model assumes the context it holds in memory is- obvious from the text, overlooking unstated assumptions and undefined terms.-2. **Hallucination Masking**: Invalid API assumptions made during discussion go- untested against actual source code.-3. **Premature Implementation Approval**: Implementation plans lacking concrete- file paths or test strategies are rubber-stamped without scrutiny.--The Goldfish model mitigates this by spawning fresh, stateless subagents that-read only the target document and explicitly referenced source files.--## Review Pipeline Architecture (`/egm-review`)--The full review pipeline executes five sequential evaluation phases:--```mermaid-flowchart TD- Start([Target Design Doc]) --> Step5[Step 5: Zoom Out Review]- Step5 --> Gate5{Pass / Abort?}- Gate5 -- Abort --> FixArch[Refactor Architecture]- Gate5 -- Pass --> Step6[Step 6: Comprehension Test]- Step6 --> Gate6{Gaps Found?}- Gate6 -- Yes --> UpdateContext[Clarify Definitions / Context]- Gate6 -- No --> Step7[Step 7: Critic Review]- Step7 --> Loop7[egm_review_loop: design_critic + structural + style]- Loop7 --> Resolve7[egm_resolve]- Resolve7 --> Step8[Step 8: Intermediate Zoom Out Review]- Step8 --> Gate8{YAGNI / Bloat Found?}- Gate8 -- Yes --> PruneBloat[Prune Defensive Over-Engineering]- Gate8 -- No / Resolved --> Step9[Step 9: Implementation Readiness Test]- Step9 --> Loop9[egm_review_loop: implementation_readiness + codebase_details + style]- Loop9 --> Resolve9[egm_resolve]- Resolve9 --> Done([Ready for Human Peer Review])-```--### Stage Breakdown--1. **Step 5: Zoom Out Review (Altitude Check)**:- * *Target*: Full Document.- * *Persona*: [`zoom_out`](../../agents/zoom_out.md) (Skeptical Architect).- * *Standard*: `zoom-out-standard.md`.- * *Focus*: Validates problem framing, rejects speculative features- (YAGNI), and verifies reuse of existing infrastructure before investing in- detailed review passes.-2. **Step 6: Comprehension Test (Self-Containment Check)**:- * *Target*: `FeatureRange` vs `DetailedRange`.- * *Persona*: [`comprehension`](../../agents/comprehension.md) (Naive Reader).- * *Standard*: Baseline Self-Containment.- * *Focus*: Reads the document with zero prior context. Identifies missing- prerequisites, unexplained acronyms, and conceptual gaps.-3. **Step 7: Critic Review (Antagonistic Stress-Test)**:- * *Target*: `FeatureRange` (High-Level Architecture).- * *Personas*: [`design_critic`](../../agents/design_critic.md),- [`structural`](../../agents/structural.md), [`style`](../../agents/style.md).- * *Standards*: `feature-spec-standard.md`, `heilmeier-standard.md`.- * *Focus*: Probes single points of failure (SPOFs), scaling limits,- failure modes, and edge cases.-4. **Step 8: Intermediate Zoom Out Review (Post-Critic Pruning)**:- * *Target*: Full Document.- * *Persona*: [`zoom_out`](../../agents/zoom_out.md) (Skeptical Architect).- * *Standard*: `zoom-out-standard.md`.- * *Focus*: Incremental audit focusing on additions, modifications, and- defensive mitigations introduced during Comprehension and Critic- reviews. Purges speculative complexity and YAGNI elements before task- planning, while avoiding re-flagging decisions accepted in Step 5.-5. **Step 9: Implementation Readiness Test (Actionability Check)**:- * *Target*: `DetailedRange` (`## Detailed Implementation Plan`).- * *Personas*: [`implementation_readiness`](../../agents/implementation_readiness.md),- [`codebase_details`](../../agents/codebase_details.md), [`style`](../../agents/style.md).- * *Standards*: `implementation-readiness-standard.md`, `re-implementation-standard.md`.- * *Focus*: Verifies that every file touched is listed with rationale, API- signatures match current codebase reality, and step-by-step test plans exist.------------------------------------------------------------------------------------## Reviewer Persona Catalog--All reviewer persona prompts reside under [`agents/`](../../agents/):--| Persona File | Role Title | Core Responsibilities |-| :----------- | :--------- | :-------------------- |-| [`agents/zoom_out.md`](../../agents/zoom_out.md) | Skeptical Architect | Audits for over-engineering, YAGNI, and unneeded complexity. Searches codebase for existing utilities to prevent reinvention. |-| [`agents/comprehension.md`](../../agents/comprehension.md) | Naive Reader | Assumes no prior knowledge. Identifies undefined jargon, assumed system context, and missing architectural diagrams. |-| [`agents/design_critic.md`](../../agents/design_critic.md) | Analytical Design Critic | Evaluates system reliability, scale limits, operational risks, failure recovery, and trade-off justification. |-| [`agents/implementation_readiness.md`](../../agents/implementation_readiness.md) | Tech Lead Auditor | Ensures implementation plans contain unambiguous, deterministic instructions, complete file lists, and verification steps. |-| [`agents/codebase_details.md`](../../agents/codebase_details.md) | Codebase Auditor | Cross-references referenced paths, classes, and function signatures against live source code to prevent drift and hallucinated APIs. |-| [`agents/structural.md`](../../agents/structural.md) | Layout Validator | Enforces standard heading hierarchy, table formatting, and document template conformance. |-| [`agents/style.md`](../../agents/style.md) | Technical Copy Editor | Strips conversational filler, enforces factual, objective tone, and ensures adherence to concise technical writing standards. |-| [`agents/synthesizer.md`](../../agents/synthesizer.md) | Review Synthesizer | Spawns reviewers in parallel, deduplicates findings, formats file links, and writes consolidated report artifacts. |------------------------------------------------------------------------------------## Document Standards & Rubrics (`resources/document_standards/`)--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.------------------------------------------------------------------------------------## The Interactive Resolution Engine (`egm_resolve`)--When Goldfish reviewers complete their audit, the **Elephant Resolution Engine**-ingests the flat findings list and manages interactive triage.--### 1. Evaluation & Categorization--For each finding, the Elephant determines:--* **`PROPOSE FIX`**: The critique is valid. Generates exact replacement- strings or structural edits.-* **`CONTEST`**: The critique is invalid or based on a misunderstanding. Cites- concrete codebase evidence defending the current text.--### 2. User Triage Modes--The engineer reviews `goldfish_review_report.md` via four interaction modes:--* **Auto Accept**: Batch-applies all `PROPOSE FIX` suggestions and skips- `CONTEST` items.-* **Interactive Breakdown**: Sequential, item-by-item chat walkthrough with- detailed explanations and overrule capabilities.-* **Artifact Comments**: Inline comments on the artifact parsed and applied by- the Elephant. (Recommended)-* **Wildcard Requests**: Pauses the review to answer ad-hoc questions or run- exploratory commands before resuming triage.--### 3. Iteration & Checkpoint Gating--After fixes are applied, the loop presents a mandatory checkpoint asking the-user whether to run another review pass or complete the workflow. The process-concludes when zero blocking findings remain or the engineer halts the loop.--## Implementation Files--| File Path | Type | Purpose & Reason for Existence |-| :-------- | :--- | :----------------------------- |-| `skills/egm_review/SKILL.md` | Skill Definition | Entry point orchestrating the multi-stage review pipeline (Zoom Out $\rightarrow$ Comprehension $\rightarrow$ Critic $\rightarrow$ Intermediate Zoom Out $\rightarrow$ Readiness). |-| `skills/egm_review/TEST.md` | Unit Tests | Verification test scenarios testing `/egm-review` multi-stage flow and checkpoint gating. |-| `skills/egm_review/test_scenarios.yaml` | Evaluation Benchmark | Benchmark test suite evaluating model review precision and recall. |-| `skills/egm_review_loop/SKILL.md` | Skill Definition | Central review driver managing asynchronous subagent spawning and findings collection. |-| `skills/egm_review_loop/TEST.md` | Unit Tests | Verification test scenarios testing goldfish review loop dispatch. |-| `skills/egm_review_loop/test_scenarios.yaml` | Evaluation Benchmark | Benchmark test suite evaluating goldfish review loop dispatch. |-| `skills/egm_resolve/SKILL.md` | Skill Definition | Elephant resolution engine managing `CONTEST` vs `PROPOSE FIX` triage and automated fixes. |-| `skills/egm_resolve/TEST.md` | Unit Tests | Verification test scenarios validating the finding categorization and resolution loop. |-| `skills/egm_resolve/test_scenarios.yaml` | Evaluation Benchmark | Benchmark test suite evaluating model resolution and fix proposal accuracy. |-| `agents/*.md` | Persona Prompts | System prompt instructions for all 7 Goldfish reviewers and the Synthesizer. |-| `resources/document_standards/*.md` | Document Standards | Evaluation rubrics and standards for feature specs, implementation readiness, and simplicity. |--## References--* Dave Rensin, [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) (Medium, 2026).-* DARPA, [The Heilmeier Catechism](https://www.darpa.mil/about/heilmeier-catechism).diff --git a/distributions/claude/docs/designs/runtime_packaging.md b/distributions/claude/docs/designs/runtime_packaging.mddeleted file mode 100644index 5929555..0000000--- a/distributions/claude/docs/designs/runtime_packaging.md+++ /dev/null@@ -1,75 +0,0 @@-# Runtime packaging--Status: Draft. Maintainer scope approval and design review are pending.-Author: @n3wth. Date: 2026-10-24.--Related issues: #121 and #122. Proposed implementation: #120.--## Problem and scope--Users need runtime packages with the resources required by each host. A full-repository archive also contains development files and website assets.--Build Claude and OpenAI runtime packages from one source tree. Preserve normal-user-controlled permissions. Do not add new hosts, services, or automatic-permission approval. Package validation does not establish directory approval-or runtime support.--## Package contract--Use `scripts/pack_plugin.py`, proposed in #120, as the single builder.-`--target claude|openai` selects the host. `--output` selects a new destination.-Produce an `egm-TARGET` folder and an `egm-TARGET.zip` archive.--Allowlist manifests, skills, references, personas, native adapters, required-documentation, licenses, and image assets. Include SVG and PNG files under-`docs/assets` for README images. Exclude website content, tests, workflows,-hooks, development marketplace metadata, and unrelated files.--Reject symlinks, paths outside the source tree, missing required files,-unbundled manifest references, hooks, and unsupported MCP or app dependencies.-Refuse an existing output folder or archive. A failed build can leave partial-output; diagnose the failure and use a new destination for the next attempt.--Sort archive entries and use fixed timestamps and file modes. Verify identical-bytes under the same build environment. Do not claim reproducibility across-untested toolchain versions.--Generate `distributions/claude` from the same builder. Compare every path and-byte against a fresh build in unit tests. Regenerate it when included source-files change. Do not edit generated files independently.--## Permissions and host boundaries--Remove the automatic permission-approval hook. Keep bounded tools on Claude-native adapters. Resource reads use normal host permissions. A denied read-must stop the affected reviewer without a fabricated verdict.--Test parent-context isolation separately from filesystem access and host-added-instructions or memory. A Claude CLI probe does not establish Cowork behavior.-OpenAI packaging does not establish support for every ChatGPT mode.--## Validation and rollout--- Test required content, image inclusion, exclusions, unsafe paths, missing- references, overwrite refusal, reproducibility, and generated freshness.-- Verify allowed and denied resource reads against the generated runtime.-- Record the source SHA, installed artifact identity, host/model version,- and separate installation, workflow, and isolation outcomes.-- Preserve the evidence gaps tracked in #105 and #106.-- Obtain scope approval and merge this design before merging #120.-- Coordinate tagged artifacts through the [release design](releases.md).--Directory publication in #121 and #122 remains separate. Confirm the owning-account, policy links, publisher authority, and provider findings before-submission. Close those issues only after verifying the published listing.--## Alternatives and open decisions--Separate hand-maintained packages would drift. A full repository ZIP includes-unneeded development content. A shared allowlist keeps package boundaries-explicit and reviewable.--Maintainers must confirm whether #121/#122 provide the packaging approval path-or identify another aligned issue. This draft does not imply that approval or-an EGM design-review run has occurred.diff --git a/distributions/claude/docs/designs/synthesizer.md b/distributions/claude/docs/designs/synthesizer.mddeleted file mode 100644index 69e4bb4..0000000--- a/distributions/claude/docs/designs/synthesizer.md+++ /dev/null@@ -1,120 +0,0 @@-# EGM Synthesizer Persona (Swarm Orchestration & Output Aggregation)--* **Author:** Brian Suchy ([@briansuchy](https://github.com/briansuchy))-* **Status:** Current-* **Date:** 2026-07-31------------------------------------------------------------------------------------## Overview--The **EGM Synthesizer Persona** (`synthesizer`) is an intermediate-orchestration layer, responsible for starting multiple subagents and-deduplicating feedback across them. It is used to consolidate feedback across-the various subagents started by EGM skills and prevent context window bloat in-runtimes that support nested subagents (e.g., Antigravity).--## The Problem--Directly managing a multi-agent review swarm from the primary user conversation-has challenges:--1. **Context Pollution & Token Bloat**: Spawning 6 to 12 parallel reviewers- directly in the root session floods the primary context window with- thousands of tokens of raw, verbose tool outputs and intermediate subagent- chatter, degrading the model's reasoning capacity.-2. **Redundant & Overlapping Critiques**: Multiple reviewers examining the same- document frequently identify the same underlying issue from slightly- different perspectives (e.g., structural vs. design). Unfiltered output- overwhelms the human engineer with duplicate findings.-3. **Inconsistent Link Formatting**: Stateless subagents often construct- inconsistent or broken relative file links.-4. **Chat Stream Interruption**: Dumping raw review traces into the user chat- violates the Artifact-First UX principle.--## System Architecture & Dataflow--```mermaid-sequenceDiagram- autonumber- participant Elephant as Root Elephant Context- participant Synth as Synthesizer Persona (Intermediate Orchestrator)- participant Swarm as Goldfish Swarm (A/B Parallel Subagents)- participant Artifact as Artifact File (goldfish_review_report.md)-- Elephant->>Synth: invoke_subagent (TargetFile, Reviewers, Standards)- Note over Synth: Inspect Mode: REVIEW vs BRAINSTORM- Synth->>Swarm: invoke_subagent (Concurrent A/B Subagents)- Note over Swarm: Independent Audits in Zero-Context Windows- Swarm-->>Synth: Return raw findings & critiques- Note over Synth: Deduplicate, Triage (Blocker/Major/Nit), Normalize Links- Synth->>Artifact: write_to_file (goldfish_review_report.md)- Synth-->>Elephant: send_message (Completion summary & artifact link)-```--## Operating Modes--The synthesizer operates in two distinct modes depending on the invocation-context:--### 1. `Mode: REVIEW` (Document Audit)--* **Redundant Subagent Spawning (A/B Sampling)**: Launches two independent- instances of each requested reviewer (e.g., `Hostile Design Critic A` and- `Hostile Design Critic B`) to maximize finding recall and eliminate- non-deterministic evaluation gaps.-* **Role Title Enforcement**: Subagent roles are strictly suffixed with- `Auditor`, `Reviewer`, or `Critic` for clear observability in execution- dashboards.-* **Severity Triage**: Categorizes all aggregated findings into three tiers:- * 🔴 **Blocker**: Architectural flaws, unaddressed SPOFs, missing file- targets, or unresolvable dependencies.- * 🟡 **Major**: Incomplete error handling, unstated scaling assumptions, or- missing verification plans.- * 🟢 **Nit**: Minor clarity issues, terminology inconsistencies, or- formatting discrepancies.-* **Link Normalization**: Constructs clean markdown links for all referenced- lines: `[path:Lstart-end](path#Lstart-Lend)`.-* **Artifact Emission**: Writes the consolidated report to- `goldfish_review_report.md` (or `zoom_out_report.md` /- `comprehension_report.md`).------------------------------------------------------------------------------------### 2. `Mode: BRAINSTORM` (Concept Ideation)--* **6-Lens Swarm**: Spawns parallel brainstormers across six perspectives:- `Skeptical Architect`, `Codebase Grounding Auditor`, `UX & Ergonomics`,- `Naive Comprehension`, `Implementation Feasibility`, and `Structural- Design`.-* **Concept Synthesis**: Aggregates divergent ideas, highlights hidden risks,- identifies existing infrastructure reuse opportunities, and compiles a- unified `concepts_brief.md` artifact.------------------------------------------------------------------------------------## Inter-Agent Communication Contract--1. **Input Parameters**:- * `TargetFile`: Absolute path to target document.- * `LineRange`: Target line bounds (or `full file`).- * `Reviewers`: Array of reviewer persona shortnames.- * `Standards`: Key-value mapping of reviewers to standard markdown files.- * `GoldfishContext`: Supplementary reading list for reviewer baseline.-2. **Output Contract**:- * The synthesizer must never output the full report text in chat or via- `send_message`.- * It writes the report to disk using file-writing tools.- * It returns a single message via `send_message` containing:- * Total count of findings by severity.- * Clean link to the generated artifact.--## Implementation Files--| File Path | Type | Purpose & Reason for Existence |-| :-------- | :--- | :----------------------------- |-| `agents/synthesizer.md` | Persona Prompt | System prompt, tool permissions, and operational logic for the `synthesizer` orchestration persona. |--## References--* Dave Rensin, [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) (Medium, 2026).diff --git a/distributions/claude/docs/harnesses.md b/distributions/claude/docs/harnesses.mdindex c81cf0e..0f2ea3c 100644--- a/distributions/claude/docs/harnesses.md+++ b/distributions/claude/docs/harnesses.md@@ -94,7 +94,7 @@ the project has no `CLAUDE.md`. To keep the files out of git, add the folder to**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.+See the [harness test record](https://github.com/google/elephant-goldfish-model/blob/main/TESTING.md#harness-test-record) for tested surfaces and limits.We welcome contributors who want to help verify and expand harness support.@@ -110,4 +110,4 @@ support for another harness:(`docs/harnesses.md`).3. Verify that `/egm-brainstorm`, `/egm-draft`, and `/egm-review` run end to end,and attach verification notes or execution transcripts in your Pull Request description- (as outlined in the [Pull Request Template](../.github/PULL_REQUEST_TEMPLATE.md)).+ (as outlined in the [Pull Request Template](https://github.com/google/elephant-goldfish-model/blob/main/.github/PULL_REQUEST_TEMPLATE.md)).diff --git a/distributions/claude/docs/index.md b/distributions/claude/docs/index.mdindex db7e27e..b4a7024 100644--- a/distributions/claude/docs/index.md+++ b/distributions/claude/docs/index.md@@ -6,9 +6,9 @@| --- | --- || [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. |+| [Design documents](https://github.com/google/elephant-goldfish-model/blob/main/docs/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. |+| [Testing playbook](https://github.com/google/elephant-goldfish-model/blob/main/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@@ -96,9 +96,9 @@ their strengths and weaknesses.* [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 component+* [Framework Architecture](https://github.com/google/elephant-goldfish-model/blob/main/docs/designs/architecture.md): Detailed componentdesign and lifecycle.-* [Contributing Guidelines](../CONTRIBUTING.md): How to contribute new skills,+* [Contributing Guidelines](https://github.com/google/elephant-goldfish-model/blob/main/CONTRIBUTING.md): How to contribute new skills,personas, and standards.[^not-really]: It's adiff --git a/docs/codex.md b/docs/codex.mdindex 6755aee..ac90f90 100644--- a/docs/codex.md+++ b/docs/codex.md@@ -82,7 +82,7 @@ Do not use `file://` links in Codex chat.## VerificationRun the offline packaging checks with `pytest tests/unit`. The opt-in native-workflow tests are documented in [TESTING.md](../TESTING.md). They require+workflow tests are documented in [TESTING.md](https://github.com/google/elephant-goldfish-model/blob/main/TESTING.md). They requirean authenticated Codex CLI and consume model usage. Installing or discoveringthe plugin alone does not establish end-to-end workflow support.diff --git a/docs/harnesses.md b/docs/harnesses.mdindex c81cf0e..0f2ea3c 100644--- a/docs/harnesses.md+++ b/docs/harnesses.md@@ -94,7 +94,7 @@ the project has no `CLAUDE.md`. To keep the files out of git, add the folder to**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.+See the [harness test record](https://github.com/google/elephant-goldfish-model/blob/main/TESTING.md#harness-test-record) for tested surfaces and limits.We welcome contributors who want to help verify and expand harness support.@@ -110,4 +110,4 @@ support for another harness:(`docs/harnesses.md`).3. Verify that `/egm-brainstorm`, `/egm-draft`, and `/egm-review` run end to end,and attach verification notes or execution transcripts in your Pull Request description- (as outlined in the [Pull Request Template](../.github/PULL_REQUEST_TEMPLATE.md)).+ (as outlined in the [Pull Request Template](https://github.com/google/elephant-goldfish-model/blob/main/.github/PULL_REQUEST_TEMPLATE.md)).diff --git a/docs/index.md b/docs/index.mdindex db7e27e..b4a7024 100644--- a/docs/index.md+++ b/docs/index.md@@ -6,9 +6,9 @@| --- | --- || [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. |+| [Design documents](https://github.com/google/elephant-goldfish-model/blob/main/docs/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. |+| [Testing playbook](https://github.com/google/elephant-goldfish-model/blob/main/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@@ -96,9 +96,9 @@ their strengths and weaknesses.* [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 component+* [Framework Architecture](https://github.com/google/elephant-goldfish-model/blob/main/docs/designs/architecture.md): Detailed componentdesign and lifecycle.-* [Contributing Guidelines](../CONTRIBUTING.md): How to contribute new skills,+* [Contributing Guidelines](https://github.com/google/elephant-goldfish-model/blob/main/CONTRIBUTING.md): How to contribute new skills,personas, and standards.[^not-really]: It's adiff --git a/scripts/pack_plugin.py b/scripts/pack_plugin.pyindex 5b1f7b5..b07650e 100644--- a/scripts/pack_plugin.py+++ b/scripts/pack_plugin.py@@ -9,11 +9,10 @@ from pathlib import Pathimport zipfileSHARED = (- "plugin.json", "LICENSE", "README.md", "TESTING.md",- "CONTRIBUTING.md", "AI_POLICY.md", ".github/PULL_REQUEST_TEMPLATE.md",+ "plugin.json", "LICENSE", "README.md","skills/*/SKILL.md", "skills/*/references/*.md","skills/*/references/*.json", "agents/*.md", "resources/*.md",- "resources/document_standards/*.md", "docs/*.md", "docs/designs/*.md",+ "resources/document_standards/*.md", "docs/*.md","assets/*.svg", "assets/*.png", "docs/assets/*.svg", "docs/assets/*.png",)HOST = {@@ -43,7 +42,7 @@ def build(root: Path, target: str, output: Path) -> tuple[Path, Path]:raise ValueError(f"Path outside source: {relative}")if path.is_file() and relative.as_posix() != "docs/directory.md":files.add(relative)- for name in ("plugin.json", "LICENSE", "README.md", "TESTING.md",+ for name in ("plugin.json", "LICENSE", "README.md",HOST[target][0]):if Path(name) not in files:raise ValueError(f"Missing required file: {name}")diff --git a/tests/unit/test_packaging.py b/tests/unit/test_packaging.pyindex 6d46e62..30e3d7f 100644--- a/tests/unit/test_packaging.py+++ b/tests/unit/test_packaging.py@@ -54,9 +54,9 @@ def test_runtime_bundle_is_complete_and_reproducible(assert "docs/codex.md" in namesassert "docs/claude.md" in namesassert "assets/icon.svg" in names- assert "CONTRIBUTING.md" in names- assert "AI_POLICY.md" in names- assert ".github/PULL_REQUEST_TEMPLATE.md" in names+ assert not names.intersection({"CONTRIBUTING.md", "AI_POLICY.md", "TESTING.md",+ ".github/PULL_REQUEST_TEMPLATE.md"})+ assert not any(p.startswith("docs/designs/") for p in names)assert not any(p.startswith(("site/", "tests/", ".github/workflows/", ".agents/"))or "hooks/" in p or p.endswith("test_scenarios.yaml")or p.endswith("/TEST.md") or p.endswith("marketplace.json")@@ -72,6 +72,10 @@ def test_runtime_bundle_is_complete_and_reproducible(assert info.date_time == (1980, 1, 1, 0, 0, 0)assert info.external_attr >> 16 == 0o100644assert bundle.read(info) == (first / info.filename).read_bytes()+ check_links = runpy.run_path(str(ROOT / "tests/unit/test_link_integrity.py"))[+ "test_relative_markdown_links_resolve_on_disk"+ ]+ check_links(first)@pytest.mark.parametrize("target", ["claude", "openai"])