Loading...
Loading...
Decomposes complex, multi-day tasks into optimized milestones using parallel reviewer agents (ultraplan). Spawns 5 independent reviewers that analyze the problem from different angles, then synthesizes their findings into a milestone dependency DAG. Triggers when the user says "plan milestones", "break this into milestones", "ultraplan", or when long-run harness needs milestone generation.
npx skill4agent add tmdgusya/engineering-discipline milestone-planningclarificationclarification## Problem Brief
**Goal:** [What must be achieved]
**Scope:**
- In: [What is included]
- Out: [What is explicitly excluded]
**Technical Context:**
[Relevant architecture, existing code, constraints]
**Constraints:**
[Time, compatibility, dependencies, performance requirements]
**Success Criteria:**
[Specific, measurable outcomes]
**Verification Strategy:**
- **Level:** [e2e | integration | skill/agent | test-suite | build-only]
- **Command:** [exact command to run the verification]
- **What it validates:** [what passing this verification proves]run_in_background: trueisolation: "worktree"maxTurns: 200You are a feasibility analyst reviewing a problem decomposition.
## Problem Brief
{PROBLEM_BRIEF}
## Your Task
Analyze the feasibility of solving this problem. For each major component:
1. **Technical feasibility:** Can this be built with the stated tech stack?
Identify any components that require research, prototyping, or may not
be possible as described.
2. **Effort estimation:** Classify each component as:
- Small (1-3 tasks, < 1 plan cycle)
- Medium (4-8 tasks, 1 plan cycle)
- Large (9+ tasks, multiple plan cycles → candidate for milestone)
- Uncertain (requires spike/prototype before estimation)
3. **Risk of underestimation:** Flag components that appear simple but
have hidden complexity (integration points, edge cases, data migration,
backward compatibility).
4. **Suggested milestone boundaries:** Based on effort and risk, suggest
where natural milestone boundaries should fall. A milestone should be
independently deliverable and testable.
## Output Format
For each suggested milestone:
- **Name:** [milestone name]
- **Effort:** [Small/Medium/Large/Uncertain]
- **Feasibility risk:** [Low/Medium/High] — [reason]
- **Key deliverable:** [what this milestone produces]
Also list:
- **Spike candidates:** Components needing prototype before planning
- **Underestimation risks:** Components likely harder than they appearYou are an architecture analyst reviewing a problem decomposition.
## Problem Brief
{PROBLEM_BRIEF}
## Your Task
Analyze the architectural implications and suggest milestone boundaries
that respect architectural constraints.
1. **Interface boundaries:** Identify the key interfaces, contracts, and
APIs that must be defined. Milestones should align with interface
boundaries — one milestone should not half-define an interface.
2. **Data flow:** Map how data flows through the system. Milestones that
cut across data flows create integration risk.
3. **Dependency direction:** Identify which components depend on which.
Milestones should be ordered so dependencies are built before dependents.
4. **Incremental deliverability:** Each milestone should leave the system
in a working state. No milestone should produce a half-built component
that only works after the next milestone.
5. **Existing pattern alignment:** Where possible, milestones should follow
existing patterns in the codebase rather than introducing new patterns.
## Output Format
For each suggested milestone:
- **Name:** [milestone name]
- **Architectural rationale:** [why this is a natural boundary]
- **Interfaces defined:** [what contracts this milestone establishes]
- **Depends on:** [which milestones must complete first]
- **Leaves system in working state:** [Yes/No — explain]
Also list:
- **Interface risks:** Interfaces that may need revision after initial implementation
- **Pattern conflicts:** Where the proposed work conflicts with existing patternsYou are a risk analyst reviewing a problem decomposition.
## Problem Brief
{PROBLEM_BRIEF}
## Your Task
Identify risks that could derail multi-day execution and suggest milestone
ordering that minimizes cumulative risk.
1. **Integration risk:** Which components have the highest risk of not
working together? These should be integrated early, not in the last
milestone.
2. **Ambiguity risk:** Which requirements are most likely to change or
be misunderstood? These should be tackled early so course corrections
are cheap.
3. **Dependency risk:** Which external dependencies (APIs, libraries,
services) are least reliable? Milestones depending on them should
include fallback plans.
4. **Regression risk:** Which changes are most likely to break existing
functionality? These milestones need heavier test coverage.
5. **Recovery cost:** If a milestone fails validation, how expensive is
it to redo? High-cost milestones should be smaller and more frequent.
## Output Format
For each identified risk:
- **Risk:** [description]
- **Severity:** [Low/Medium/High/Critical]
- **Affected milestone(s):** [which milestones]
- **Mitigation:** [how to structure milestones to reduce this risk]
Overall risk-ordered milestone sequence:
1. [milestone] — [why first: highest ambiguity / integration risk / ...]
2. [milestone] — [why second]
...You are a dependency analyst reviewing a problem decomposition.
## Problem Brief
{PROBLEM_BRIEF}
## Your Task
Map all dependencies — between milestones, between files, between external
systems — and verify that the proposed decomposition respects them.
1. **File conflict analysis:** List all files that will be created or
modified. Identify files touched by multiple milestones — these create
ordering constraints.
2. **Interface dependency graph:** Map which milestones produce interfaces
that other milestones consume. Draw the dependency DAG.
3. **External dependency mapping:** List external systems, APIs, libraries,
or services each milestone depends on. Flag any that require setup,
credentials, or may be unavailable.
4. **Shared state identification:** Identify shared state (databases,
config files, global settings) that multiple milestones modify.
These require strict ordering.
5. **Parallelization opportunities:** Identify milestones with zero
dependencies between them — these can run concurrently.
## Output Format
**Dependency DAG:**
**File conflict matrix:**
| File | Milestones | Ordering constraint |
|------|-----------|-------------------|
| path/to/file | M1, M3 | M1 before M3 |
**Parallelizable groups:**
- Group A: [M1, M2] — no shared files, no interface deps
- Group B: [M4, M5] — after Group A completes
**External dependencies:**
- [dependency]: required by [milestones], setup needed: [yes/no]You are a user value analyst reviewing a problem decomposition.
## Problem Brief
{PROBLEM_BRIEF}
## Your Task
Ensure milestone ordering maximizes early value delivery and maintains
user motivation throughout multi-day execution.
1. **Value ordering:** Which milestones deliver the most visible,
user-facing value? These should come early to provide feedback
and maintain confidence.
2. **Demo-ability:** After each milestone, can the user see/test
something meaningful? Milestones that produce only internal
infrastructure with no visible output erode confidence.
3. **Feedback loops:** Which milestones benefit most from early user
feedback? These should be prioritized so corrections are cheap.
4. **Minimum viable milestone:** What is the smallest first milestone
that proves the approach works? This validates the overall direction
before investing in the full plan.
5. **Abort points:** After which milestones could the user reasonably
decide to stop and still have something useful? Mark these as
natural checkpoints.
## Output Format
**Value-ordered milestone sequence:**
1. [milestone] — **Value:** [what user sees] — **Demo:** [how to verify]
2. [milestone] — **Value:** [what user sees] — **Demo:** [how to verify]
...
**Minimum viable milestone:** [which milestone and why]
**Natural abort points:** [milestones after which stopping is reasonable]
**Low-value milestones:** [milestones that could be cut if time is short]{..._OUTPUT}You are a milestone synthesis agent. You have received analyses from 5
independent reviewers who each examined the same problem from a different
angle. Your job is to produce the final milestone decomposition.
## Reviewer Outputs
### Feasibility Analysis
{FEASIBILITY_OUTPUT}
### Architecture Analysis
{ARCHITECTURE_OUTPUT}
### Risk Analysis
{RISK_OUTPUT}
### Dependency Analysis
{DEPENDENCY_OUTPUT}
### User Value Analysis
{USER_VALUE_OUTPUT}
## Your Task
1. **Cross-reference findings.** Identify where reviewers agree and
where they conflict. Agreements are high-confidence decisions.
Conflicts require resolution.
2. **Resolve conflicts explicitly.** For each conflict:
- State the conflict
- State your resolution
- State why (which reviewer's reasoning is stronger in this case)
3. **Produce the milestone DAG.** Each milestone must have:
- Name
- Goal (1 sentence)
- Success criteria (measurable, specific)
- Dependencies (which milestones must complete first)
- Files affected (from dependency analysis)
- Risk level (from risk analysis)
- Estimated effort (from feasibility analysis)
- User value (from value analysis)
4. **Validate the DAG.** Verify:
- No circular dependencies
- Valid topological ordering exists
- No file conflicts between parallel milestones
- Each milestone leaves system in working state
- First milestone is the minimum viable milestone
5. **Produce execution order.** List milestones in execution order,
marking which can run in parallel.
## Output Format
## Conflict Resolution Log
| Conflict | Resolution | Rationale |
|----------|-----------|-----------|
| [description] | [decision] | [why] |
## Milestone DAG
### M1: [Name]
- **Goal:** [one sentence]
- **Success Criteria:**
- [ ] [specific, measurable criterion]
- [ ] [specific, measurable criterion]
- **Dependencies:** None
- **Files:** [list]
- **Risk:** [Low/Medium/High]
- **Effort:** [Small/Medium/Large]
- **User Value:** [what user sees after completion]
- **Abort Point:** [Yes/No]
### M2: [Name]
...
## Execution Order
## Rejected Proposals
| Proposal | Source | Reason for rejection |
|----------|--------|---------------------|
| [what was proposed] | [which reviewer] | [why rejected] |### M_final: Integration Verification
- **Goal:** Validate that all milestones work together as a complete system
- **Success Criteria:**
- [ ] Highest-level project verification passes (e2e, integration, or discovered verification)
- [ ] All milestone success criteria remain valid after full integration
- [ ] No regressions in pre-existing functionality
- [ ] Cross-milestone interfaces are exercised end-to-end
- **Dependencies:** ALL other milestones
- **Files:** None (read-only verification — no new code)
- **Risk:** Medium (integration issues between independently-verified milestones)
- **Effort:** Small (verification only, no implementation)
- **User Value:** Confidence that the system works as a whole, not just per-milestone
- **Abort Point:** No (this is the final gate)Verification Strategydocs/engineering-discipline/harness/<session-slug>/
├── state.md # Master state file
├── milestones/
│ ├── M1-<name>.md # Individual milestone definition
│ ├── M2-<name>.md
│ └── ...
└── reviews/
├── feasibility.md
├── architecture.md
├── risk.md
├── dependency.md
├── user-value.md
└── synthesis.md# Long Run State: [Session Name]
**Created:** YYYY-MM-DD HH:MM
**Last Updated:** YYYY-MM-DD HH:MM
**Status:** milestone-planning-complete | executing | paused | completing | completed | failed
**Verification Strategy:**
- **Level:** [e2e | integration | skill/agent | test-suite | build-only]
- **Command:** [exact verification command]
- **What it validates:** [what passing proves]
## Milestones
| ID | Name | Status | Attempts | Dependencies | Plan File | Review File |
|----|------|--------|----------|-------------|-----------|-------------|
| M1 | [name] | pending | 0 | — | — | — |
| M2 | [name] | pending | 0 | M1 | — | — |
| M3 | [name] | pending | 0 | M1, M2 | — | — |
Status values: pending | planning | executing | validating | completed | failed | skipped
Attempts: number of plan-execute-review cycles attempted (incremented at each Step 2-3 start)
## Execution Log
| Timestamp | Event | Details |
|-----------|-------|---------|
| YYYY-MM-DD HH:MM | milestones-locked | N milestones approved by user |# Milestone: [Name]
**ID:** M1
**Status:** pending
**Dependencies:** [None | M1, M2, ...]
**Risk:** [Low/Medium/High]
**Effort:** [Small/Medium/Large]
## Goal
[One sentence goal]
## Success Criteria
- [ ] [Specific, measurable criterion]
- [ ] [Specific, measurable criterion]
- [ ] [Specific, measurable criterion]
## Files Affected
- Create: [files to create]
- Modify: [files to modify]
## User Value
[What the user sees/can test after this milestone]
## Abort Point
[Yes/No — can user stop here and have something useful?]
## Notes
[Any special considerations from reviewer analysis]| Anti-Pattern | Why It Fails |
|---|---|
| Running reviewers sequentially | Wastes time; reviewers are independent |
| Skipping synthesis and just merging reviewer outputs | Conflicts go unresolved; milestone boundaries are incoherent |
| Accepting milestones without measurable success criteria | Cannot validate completion; "done" becomes subjective |
| Creating milestones too large (>12 tasks each) | Exceeds single plan-crafting cycle; risk of context loss |
| Creating milestones too small (1-2 tasks each) | Overhead of plan-crafting + run-plan + review-work exceeds the work itself |
| Creating more than 10 milestones without user approval | Compounding risk across milestones; likely needs project split |
| Ignoring reviewer conflicts | Unresolved conflicts surface during execution when they're expensive to fix |
| Not saving reviewer outputs | Loses the reasoning behind milestone decisions; cannot audit later |
| Letting user skip approval | User discovers misalignment mid-execution after days of work |
long-runclarificationplan-crafting