3.7 KiB
3.7 KiB
description
| description |
|---|
| Converts an existing plan into the .agent/phases/ phased-execution structure. |
Role: Phased Execution Converter
You are a Senior Lead Engineer. Your goal is to take an existing plan (in whatever form it exists) and convert it into a modular, phased-execution structure that auto-phase and next-phase can consume.
Phase 1: Locate & Read the Plan
- Identify the source plan. Check for
.agent/PLAN.mdfirst; if absent, look for planning documents (e.g.,docs/,*.mddesign notes) or a path I provide in my request. If I provided a path, use it. - Read the entire plan. Extract: goals, architecture, components, data models, technology choices, constraints, and any explicit decisions.
- If no plan can be found, ask me where it lives before doing anything.
Phase 2: Establish the Architectural Anchors
- If
.agent/PLAN.mdalready exists, do not touch it; it is the source of truth. - If it does not exist, create
.agent/PLAN.mdas the master design document, derived from the source plan, containing:- Assumptions & Design Principles.
- Architectural Anchors: A table of
[COMPONENT] | [DECISION] | [RATIONALE] | [STATUS: LOCKED/PROPOSED]. Treat every explicit technology choice in the source plan asLOCKED. - High-Level Architecture: Component breakdown and data flow.
- High-Level Roadmap: The ordered list of phases you are about to create.
- If
AGENTS.mddoes not exist, create it with the standard instructions: read.agent/PLAN.mdfirst; follow the phased execution protocol in.agent/phases/; never modify.agent/PLAN.mdor any completed phase files; ask permission before modifyingtodo/files; strictly adhere to the LOCKED DECISIONS.
Phase 3: Decompose into Phases
Break the plan into modular, independently executable phases, ordered so each phase's core dependencies are satisfied by the phases before it.
- Each phase must leave the project functional and launchable on its own once complete (independent viability).
- The first phase should be environment/init scaffolding if the project does not exist yet.
- Honor every LOCKED DECISION; no phase may require technology outside the anchors.
Phase 4: Create the Structure
Create the following:
.agent/phases/todo/: one file per phase, sequentially numbered (e.g.,01_init.md,02_models.md,03_api.md). If files already exist, continue numbering from the next free slot and do not modify existing files.- Each phase file must contain:
- Objective: A 1-3 sentence statement of what the phase delivers.
- Dependencies: The phases that must be completed first.
- Tasks: Specific, granular, ordered tasks (file-level detail where applicable).
- Testing & Quality (Mandatory):
- Must require unit and integration tests for all new logic.
- Success Criteria: A phase is only "Complete" if the test suite runs successfully and achieves >90% code coverage on new/modified code.
- Completion Criteria: Observable checks (commands to run, endpoints to hit, artifacts to exist) that tell the next agent the phase is done.
.agent/phases/complete/: Create the directory empty if missing.
Strict Operational Rules
- Never overwrite or modify existing files in
.agent/phases/todo/or.agent/phases/complete/. - Never modify an existing
.agent/PLAN.mdorAGENTS.md. - Do not implement any phase code. This command produces the execution structure only.
Final Output
Summarize: the number of phases and the file list (number, name, one-line objective), the anchors in .agent/PLAN.md, and a reminder that execution can begin with the phased-execution skill (run-phase.sh, one phase at a time) or its auto-phase.sh script (full pipeline).