{
  "markdown": "# Gemini Task Runner\n\nThe Gemini Task Runner is a foundation for task orchestration and execution, designed to manage complex workflows through a series of structured phases: Design, Plan, Execute, and Validate.\n\n## Features\n\n- **Phase-Based Orchestration**: Structured workflow through Design, Plan, Execute, Review, and Validate.\n- **Autonomous Self-Correction**: Automatically retries failed phases (up to 2 times) by passing previous error logs back to the agent for remediation.\n- **Iterative Review Phase**: An intelligent gatekeeper phase where an Architect agent critiques implementation outputs and suggests improvements before final validation.\n- **Persistent State Management**: Full task state is saved to `.task-state.json`, allowing for seamless resumption of interrupted tasks.\n- **Worker Pool Concurrency**: Executes independent sub-tasks in parallel to optimize performance.\n- **Intelligent Context Injection**: Automatically feeds relevant design, planning, and error context to each agent role.\n\n## Architecture\n\nThe system is composed of several key components:\n\n- **Runner** (`src/runner.ts`): The main orchestrator that manages the task lifecycle and handles the self-correction retry logic.\n- **PhaseManager** (`src/phase-manager.ts`): Manages transitions between phases and prepares role-specific context files.\n- **StateStore** (`src/state-store.ts`): Handles the persistence of the task state.\n- **WorkerPool** (`src/worker-pool.ts`): Manages concurrent sub-task execution.\n- **AgentDispatcher** (`src/agent-dispatcher.ts`): Interfaces with the `gemini` CLI, providing a robust wrapper for agent communication.\n\n## Phases\n\n1.  **Design**: The **Architect** analyzes the request and produces a technical design.\n2.  **Plan**: The **Planner** decomposes the design into a dependency graph of sub-tasks.\n3.  **Execute**: **Coder** agents execute the sub-tasks concurrently.\n4.  **Review**: The **Architect** critiques the implementation and suggests fixes or refinements.\n5.  **Validate**: The **Tester** verifies the final system against the original requirements.\n\n## Defining New Agent Roles and Prompts\n\nTo define a new agent role:\n1.  Create a new prompt file in the `prompts/` directory (e.g., `prompts/new-role.md`).\n2.  Update the `PhaseManager` or create a new phase that uses the `dispatchAgent` function with the new role name and prompt file.\n\nExample of `dispatchAgent` usage:\n```typescript\ndispatchAgent('NewRole', 'prompts/new-role.md', ['context-file.txt']);\n```\n\n## Commands\n\n- `/runner:start <prompt>`: Starts a new task with the provided prompt. Defined in `commands/runner.toml`.\n",
  "bytes": 2623,
  "sha": "dc7502e2235d5a7dc6e460f955e875ff0788e43437e6b7291ee371da163dd58b",
  "repo_slug": "ndiesslin/gemini-task-runner",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_ndiesslin_gemini_task_runner_ac12461a/readme"
}