Plan

Analyze specifications against current implementation and generate structured action item plans for both components and infrastru…

wtah updated 5mo ago
Claude CodeGeneric
View source ↗
# Implementation Planning Pipeline

Analyze specifications against current implementation and generate structured action item plans for both components and infrastructure.

## Silent Mode (`--silent`)

When invoked with `--silent`, execute autonomously without asking questions:

- **Do not ask for confirmation** before generating implementation plans
- **Process all discovered targets** automatically (components + infrastructure)
- **Make planning decisions** when ambiguity exists:
  - Prioritize based on dependencies (P0 for foundational, P1 for features)
  - Infer implementation order from architectural dependencies
  - Use conservative estimates for completion status
- **Proceed through all phases** without user interaction
- **Handle missing specs gracefully** - skip and report in summary
- **Document all decisions** in the output summary under a "Planning Notes" section

## Prerequisites

Before running this command, ensure:
1. Architecture pipeline has completed (`/architect` command)
2. Component specifications exist in `{container}/{component}/.specs/`
3. Deployment specifications exist in `.specs/deployment/`

## Instructions

You are orchestrating the planning pipeline. This command triggers the `planner-agent` for:
- Each component (generates `{container}/{component}/.implementation-plan.md`)
- Each container (generates `{container}/.implementation-plan.md`)
- Infrastructure (generates `.specs/deployment/.implementation-plan.md`)

---

## Phase 1: Discovery

Scan for plannable targets:

### Components

.arch-registry/components/{container}/ └── {component}.md # Registry entries

{container}/{component}/.specs/ ├── design.md # Must exist └── classes/ # Must have class specs


**Ready for planning** = Component has registry entry + `design.md` + class specs

**NOTE**: Test planning is handled separately by `/plan-test-setup`. This command focuses on implementation only.


### Container

.arch-registry/containers/{container-name}.md # Container description

{container}/.specs/ ├── components.md # C4 diagram + component inventory ├── technology.md # Technology stack for this container ├── integration.md # Integration requirements (entrypoints, scripts, tests) ├── interfaces/ │ └── {name}.md # Container Internal API contracts ├── data-models/ │ └── {entity}.md # Data schemas └── decisions/ └── ADR-{n}.md # Significant decisions


**Ready for planning** = Component has registry entry + clear specifications in {container}/.specs/

### Infrastructure

.specs/deployment/ ├── overview.md # Must exist ├── environments/ # Environment specs ├── infrastructure/ # Resource specs └── pipelines/ # CI/CD specs


**Ready for planning** = `.specs/deployment/overview.md` exists

---

## Phase 2: Analysis (Parallel, Max 2 Per Batch)

Spawn `planner-agent` instances in parallel for ALL targets with a **maximum of 2 concurrent agents** per batch. Start by first completing all component planner agents, and then continue with the container planner agents, finally when these have completed, start the planner agents for the 

### For Each Component

**Agent**: `planner-agent`
**Output**: `{container}/{component}/.implementation-plan.md`
**Consumer**: `coding-agent`

1. Read specs from `{container}/{component}/.specs/`
2. Scan implementation in `{container}/{component}/src/`
3. Generate gap analysis (implementation only, NOT tests)
4. Create action items with IDs, status, priorities
5. Write `.implementation-plan.md`

**NOTE**: Tests are excluded. Use `/plan-test-setup` for test planning.


### For Each Container

**Agent**: `planner-agent`
**Output**: `{container}/.implementation-plan.md`
**Consumer**: `integration-developer`

1. Read specs from `{container}/.specs/`
2. Scan implementation in `{container}/src/` and `scripts/`
3. Generate gap analysis (implementation only, NOT tests)
4. Create action items with IDs, status, priorities
5. Write `.implementation-plan.md`

**NOTE**: Tests are excluded. Use `/plan-test-setup` for test planning.



### For Infrastructure

**Agent**: `planner-agent`
**Output**: `.specs/deployment/.implementation-plan.md`
**Consumer**: `devops-coding-agent`

1. Read specs from `.specs/deployment/`
2. Scan implementation in `infrastructure/` and potential CICD workflows
3. Generate gap analysis
4. Create action items with IDs, status, priorities
5. Write `.implementation-plan.md`

---

## Execution Flow

Phase 1: Discovery │ Scan .arch-registry/components/ for components │ Check .specs/deployment/ for infrastructure │ Build list of all targets ▼ Phase 2: Analysis (BATCHED, max 2 per batch) │ Component Batch 1 (up to 2 agents): │ ├── container-a/component-1 → planner-agent → .implementation-plan.md │ ├── container-a/component-2 → planner-agent → .implementation-plan.md │ └── ... (up to 2 total) │ Wait for batch to complete and start next batch until all components completed │ Container Batch 1 (up to 2 agents): │ ├── container-a → planner-agent → .implementation-plan.md │ ├── container-b → planner-agent → .implementation-plan.md │ └── ... (up to 2 total) │ Wait for batch to complete and start next batch until all containers completed │ ▼ │ Infrastructure Batch 1 (up to 2 agents): │ ├── ... │ └── infrastructure → planner-agent → .specs/deployment/.implementation-plan.md │ Wait for batch to complete ▼ Phase 3: Summary │ Aggregate all plans │ Report overall progress │ Identify blockers


---

## How to Execute

When this command runs:

1. **Discover all targets**:
   - List all components in `.arch-registry/components/`
   - Check if `.specs/deployment/overview.md` exists
   - Build complete list of targets

2. **Spawn planner-agent ins

Maintain Plan?

Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.

[Plan on getagentictools](https://getagentictools.com/loops/wtah-implementation-planning-pipeline?ref=badge)
npx agentictools info loops/wtah-implementation-planning-pipeline

The second line is the CLI lookup for this page — handy in READMEs and docs.