{
  "markdown": "# Gemini Swarm & Modernization Toolkit\n\nA comprehensive Gemini CLI Extension that provides a **Multi-Agent Swarm** for autonomous software development.\n\n**See** [Gemini CLI Extensions](https://github.com/google-gemini/gemini-cli/blob/main/docs/extensions/index.md) for more details.\n\n**Credits**: [@dandobrin](https://github.com/ddobrin), [@jjdelorme](https://github.com/jjdelorme) & [@cedricyao](https://github.com/cedricyao). Parts of this work were adapted from Dan's [production serverless repository](https://github.com/GoogleCloudPlatform/serverless-production-readiness-java-gcp/tree/main/genai/quotes-llm/.gemini/commands).\n\n## Prerequisites\nInstall the [Gemini CLI](https://github.com/google-gemini/gemini-cli)\n\n## Extension Installation\nFrom your command line:\n\n```bash\ngemini extensions install https://github.com/jjdelorme/plan-commands\n```\n\n### Activating the Swarm Supervisor (Per-Workspace)\n\nWhile the agents (`architect`, `engineer`, `auditor`) are installed globally by the extension, the **Supervisor** (`system.md`) must be activated locally in each project you want to use it in.\n\n1. Navigate to your project directory.\n2. Run the initialization command:\n   ```bash\n   /swarm:init\n   ```\n   *(This downloads the `system.md` file into your local `.gemini/` folder).*\n3. **Restart** the Gemini CLI with the system override enabled:\n   ```bash\n   GEMINI_SYSTEM_MD=true gemini\n   ```\n\n---\n\n## 🤖 The Autonomous Swarm\n\nThis extension packages a portable, framework-agnostic AI agent swarm designed to manage the software development lifecycle using a rigorous **Plan -> Act -> Verify** state machine.\n\n### The Agents\n*   **Supervisor (`system.md`)**: The Project Manager. Enforces the state machine, manages hand-offs, and gates Git commits.\n*   **Product Owner (`product_owner`)**: The Visionary. Translates human ideas into rigorous specifications (`spec.md`) through interactive \"grilling\" and manages the Master Roadmap (`00-ROADMAP.md`) and Release targeting.\n*   **Architect (`architect`)**: The Planner. Reads specs, creates comprehensive step-by-step TDD implementation plans in the `plans/active_milestones/` directory.\n*   **Engineer (`engineer`)**: The Builder. Strictly follows the Architect's plans, writing tests and implementing changes via Red-Green-Refactor.\n*   **Auditor (`auditor`)**: The Gatekeeper. Verifies the Engineer's work against the spec and tests. Compiles code, runs tests, and hunts for lazy AI shortcuts.\n\n### 🔄 Protocol Lifecycle\nThe system moves through distinct phases, enforced by the Supervisor.\n\n```mermaid\ngraph TD\n    %% Roles\n    subgraph \"Phase 0 & 1: Product & Strategy\"\n        PO[\"Product Owner: Spec & Roadmap\"]\n        Architect[\"Architect: Plan & Contract\"]\n    end\n\n    subgraph \"Phase 2 & 3: Construction\"\n        Engineer[\"Engineer: Implement\"]\n        Auditor[\"Auditor: Verify\"]\n    end\n\n    %% Flow\n    Start([\"User Request\"]) --> PO\n    PO -- Grills User --> PO\n    PO --> Architect\n    Architect --> Review{\"User Approval\"}\n\n    Review -- Reject --> Architect\n    Review -- Approve --> Engineer\n\n    Engineer --> Auditor\n\n    %% The Three-Way Fork\n    Auditor -- Code Broken? --> Engineer\n    Auditor -- Plan Wrong? --> Architect\n    Auditor -- Verified --> Commit([\"Git Commit\"])\n    \n    Commit --> CheckRelease{\"Release Complete?\"}\n    CheckRelease -- No --> Engineer\n    CheckRelease -- Yes --> Tag([\"Git Tag & Release\"])\n    Tag --> PO\n```\n\n### Workspace Maintenance: Archiving Plans\nAs the Swarm executes tasks, your `plans/` directory will accumulate executed task files, research reports, and review feedback. To keep the agent's context window clean and focused, you can archive completed items:\n\n```bash\n/swarm:archive\n```\n**What it does:**\n1. Reads your Master Roadmap to identify completed milestones and tasks.\n2. Moves all corresponding completed files into a `plans/archive/` directory.\n3. Automatically updates your project's `.geminiignore` to ensure archived files are hidden from the AI's context in future turns.\n\n### Extending the Swarm (Optional)\nThe core swarm is agnostic. To add deep codebase intelligence (like a Graph Database), install a specialized skill/agent in your project and update your project's `GEMINI.md` to instruct the swarm to use it:\n\n```markdown\n# Swarm Routing & Delegation Rules (Add to your project's GEMINI.md)\n- For codebase investigation, you MUST delegate to the `scout` agent. Do NOT use the built-in investigator.\n- The `auditor` agent MUST utilize the `graphdb` skill for verifying changes.\n```\n\n---\n\n## 📝 2. Agile Refinement Commands\n\nThis toolkit also includes standalone utilities for refining your project requirements and mapping out new tasks, which are entirely separate from the automated agent swarm. \n\n### User Story Generation\n*Generates agile user stories from an existing code base to help understand the current system or prepare for refactoring.*\n*   **Command:** `/agile:create-user-stories {{path/to/code}}`\n*   **Output:** `user-stories.md`",
  "bytes": 4985,
  "sha": "4387c92802890fe669420ecab3edfcd85cf664afc31962efaee1c352c4e8ec09",
  "repo_slug": "jjdelorme/plan-commands",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_jjdelorme_plan_commands_92f7e6a9/readme"
}