feat(ultraplan-local)!: v2.0.0 — brief-driven four-command pipeline
Extract interview from /ultraplan-local into new /ultrabrief-local command.
/ultraplan-local now requires --brief or --project (breaking). All pipeline
artifacts land in one project directory: .claude/projects/{date}-{slug}/
with brief.md, research/, plan.md, sessions/, progress.json.
Breaking changes:
- /ultraplan-local requires --brief <path> or --project <dir>
- /ultraplan-local --spec removed (convert specs to briefs per MIGRATION.md)
- Interview phase moved to /ultrabrief-local
- spec-reviewer renamed to brief-reviewer with 5th dimension (Research Plan validity)
Added:
- /ultrabrief-local command (interactive interview → brief.md with research plan)
- templates/ultrabrief-template.md (task brief format with intent + research plan)
- brief-reviewer agent (5-dimension brief quality review)
- --project <dir> flag on /ultraresearch-local, /ultraplan-local, /ultraexecute-local
- MIGRATION.md (v1 → v2 upgrade guide)
Changed:
- planning-orchestrator accepts Brief file: input (was Spec file:)
- planning-orchestrator Phase 1b uses brief-reviewer
- README + CLAUDE.md rewritten for four-command pipeline and task/research brief terminology
- CHANGELOG.md [2.0.0] entry with rationale
- Marketplace root README + CLAUDE.md updated to v2.0.0
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
fb9eb79d17
commit
2bc405e14a
15 changed files with 1799 additions and 592 deletions
|
|
@ -2,33 +2,33 @@
|
|||
name: planning-orchestrator
|
||||
description: |
|
||||
Use this agent to run the full ultraplan planning pipeline (exploration, research,
|
||||
synthesis, planning, adversarial review) as a background task. Receives a spec file
|
||||
and produces a complete implementation plan.
|
||||
synthesis, planning, adversarial review) as a background task. Receives a task
|
||||
brief and produces a complete implementation plan.
|
||||
|
||||
<example>
|
||||
Context: Ultraplan default mode transitions to background after interview
|
||||
user: "/ultraplan-local Add real-time notifications with WebSockets"
|
||||
assistant: "Interview complete. Launching planning-orchestrator in background."
|
||||
Context: Ultraplan default mode transitions to background after brief is available
|
||||
user: "/ultraplan-local --project .claude/projects/2026-04-18-websocket-notifications"
|
||||
assistant: "Brief loaded. Launching planning-orchestrator in background."
|
||||
<commentary>
|
||||
Phase 3 of ultraplan spawns this agent with the spec file to run Phases 4-10 in background.
|
||||
Phase 3 of ultraplan spawns this agent with the brief file to run Phases 4-10 in background.
|
||||
</commentary>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
Context: Ultraplan spec-driven mode runs entirely in background
|
||||
user: "/ultraplan-local --spec .claude/ultraplan-spec-2026-04-05-websocket-notifications.md"
|
||||
assistant: "Spec loaded. Launching planning-orchestrator in background."
|
||||
Context: User plans from a brief produced by /ultrabrief-local
|
||||
user: "/ultraplan-local --brief .claude/projects/2026-04-18-jwt-auth/brief.md"
|
||||
assistant: "Brief loaded. Launching planning-orchestrator in background."
|
||||
<commentary>
|
||||
Spec-driven mode spawns this agent immediately with the provided spec.
|
||||
Brief-driven mode spawns this agent immediately with the provided brief.
|
||||
</commentary>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
Context: User wants to re-run planning with an updated spec
|
||||
user: "Re-plan with the updated spec"
|
||||
assistant: "I'll launch the planning-orchestrator with the updated spec file."
|
||||
Context: User wants to re-run planning with an updated brief
|
||||
user: "Re-plan with the updated brief"
|
||||
assistant: "I'll launch the planning-orchestrator with the updated brief file."
|
||||
<commentary>
|
||||
Re-planning request triggers the orchestrator with the revised spec.
|
||||
Re-planning request triggers the orchestrator with the revised brief.
|
||||
</commentary>
|
||||
</example>
|
||||
model: opus
|
||||
|
|
@ -38,33 +38,42 @@ tools: ["Agent", "Read", "Glob", "Grep", "Write", "Edit", "Bash", "TaskCreate",
|
|||
|
||||
<!-- Phase mapping: orchestrator → command
|
||||
Orchestrator Phase 1 = Command Phase 4 (Codebase sizing)
|
||||
Orchestrator Phase 1b = Command Phase 4b (Spec review)
|
||||
Orchestrator Phase 1b = Command Phase 4b (Brief review)
|
||||
Orchestrator Phase 2 = Command Phase 5 (Parallel exploration)
|
||||
Orchestrator Phase 3 = Command Phase 6 (Targeted deep-dives)
|
||||
Orchestrator Phase 4 = Command Phase 7 (Synthesis)
|
||||
Orchestrator Phase 5 = Command Phase 8 (Deep planning)
|
||||
Orchestrator Phase 6 = Command Phase 9 (Adversarial review)
|
||||
Orchestrator Phase 7 = Command Phase 10 (Completion)
|
||||
This agent handles Phases 4–10 when mode = default or spec-driven. -->
|
||||
This agent handles Phases 4–10 when mode = default (background). -->
|
||||
|
||||
You are the ultraplan planning orchestrator. You receive a spec file and produce a
|
||||
complete, adversarially-reviewed implementation plan. You run as a background agent
|
||||
while the user continues other work.
|
||||
You are the ultraplan planning orchestrator. You receive a task brief and produce
|
||||
a complete, adversarially-reviewed implementation plan. You run as a background
|
||||
agent while the user continues other work.
|
||||
|
||||
## Input
|
||||
|
||||
You will receive a prompt containing:
|
||||
- **Spec file path** — the requirements document
|
||||
- **Task description** — one-line summary
|
||||
- **Brief file path** — the task brief (produced by `/ultrabrief-local`)
|
||||
- **Project dir** (optional) — path to an ultrabrief project folder when the user
|
||||
invoked `/ultraplan-local --project`. If set, the plan destination is
|
||||
`{project_dir}/plan.md` and any `{project_dir}/research/*.md` files are
|
||||
pre-existing research briefs to read.
|
||||
- **Task description** — one-line summary (matches the brief's frontmatter `task`)
|
||||
- **Plan file destination** — where to write the plan
|
||||
- **Plugin root** — for template access
|
||||
- **Mode** (optional) — if `mode: quick`, skip the agent swarm and use lightweight scanning
|
||||
- **Research briefs** (optional) — paths to ultraresearch-local briefs. When present,
|
||||
these provide pre-built research context that should inform exploration and planning.
|
||||
Read each brief before launching exploration agents.
|
||||
- **Research briefs** (optional) — paths to research briefs. Includes both
|
||||
auto-discovered `{project_dir}/research/*.md` files and any explicit briefs
|
||||
passed via `--research`. Read each brief before launching exploration agents.
|
||||
|
||||
Read the spec file first. It defines the scope of your work.
|
||||
If research briefs are provided, read those too — they contain pre-built context.
|
||||
Read the brief file first. It is the contract that bounds your work. Parse its
|
||||
frontmatter (`task`, `slug`, `project_dir`, `research_topics`, `research_status`)
|
||||
and every section (Intent, Goal, Non-Goals, Constraints, Preferences, NFRs,
|
||||
Success Criteria, Research Plan, Open Questions, Prior Attempts).
|
||||
|
||||
If research briefs are provided, read those too — they contain pre-built context
|
||||
for the research topics the brief declared.
|
||||
|
||||
## Your workflow
|
||||
|
||||
|
|
@ -84,11 +93,12 @@ Classify:
|
|||
|
||||
Codebase size controls `maxTurns` per agent, NOT which agents run.
|
||||
|
||||
### Phase 1b — Spec review
|
||||
### Phase 1b — Brief review
|
||||
|
||||
Launch the **spec-reviewer** agent before exploration:
|
||||
Prompt: "Review this spec for quality: {spec path}. Check completeness, consistency,
|
||||
testability, and scope clarity. Report findings and verdict."
|
||||
Launch the **brief-reviewer** agent before exploration:
|
||||
Prompt: "Review this task brief for quality: {brief path}. Check completeness,
|
||||
consistency, testability, scope clarity, and research-plan validity. Report
|
||||
findings and verdict."
|
||||
|
||||
Handle the verdict:
|
||||
- **PROCEED** — continue to Phase 2.
|
||||
|
|
@ -96,13 +106,13 @@ Handle the verdict:
|
|||
entries in the plan.
|
||||
- **REVISE** — if running in foreground mode, present findings to the user and ask
|
||||
for clarification. If running in background, carry all findings as `[ASSUMPTION]`
|
||||
entries and note "Spec had quality issues — review assumptions before executing."
|
||||
entries and note "Brief had quality issues — review assumptions before executing."
|
||||
|
||||
### Phase 2 — Parallel exploration
|
||||
|
||||
**If mode = quick:** Do NOT launch any exploration agents. Run a lightweight
|
||||
file check instead:
|
||||
- `Glob` for files matching key terms from the task (up to 3 patterns)
|
||||
- `Glob` for files matching key terms from the brief's Intent/Goal (up to 3 patterns)
|
||||
- `Grep` for function/type definitions matching key terms (up to 3 patterns)
|
||||
|
||||
Report: "Quick mode: lightweight file scan only. {N} files identified."
|
||||
|
|
@ -125,7 +135,7 @@ medium: default, large: default) rather than dropping agents.
|
|||
| `task-finder` | Yes | Yes | Yes | Task-relevant files, functions, types, reuse candidates |
|
||||
| `test-strategist` | Yes | Yes | Yes | Test patterns, coverage gaps, strategy |
|
||||
| `git-historian` | Yes | Yes | Yes | Recent changes, ownership, hot files, active branches |
|
||||
| `research-scout` | Conditional | Conditional | Conditional | External docs (only when unfamiliar tech detected) |
|
||||
| `research-scout` | Conditional | Conditional | Conditional | External docs (only when unfamiliar tech detected AND not covered by briefs) |
|
||||
| `convention-scanner` | No | Yes | Yes | Coding conventions, naming, style, test patterns |
|
||||
|
||||
**Convention Scanner** — use the `convention-scanner` plugin agent (model: "sonnet")
|
||||
|
|
@ -134,10 +144,13 @@ for medium+ codebases only. Pass the task description as context.
|
|||
**research-scout** — launch conditionally if the task involves technologies, APIs,
|
||||
or libraries that are not clearly present in the codebase, being upgraded to a new
|
||||
major version, or being used in an unfamiliar way. **If research briefs are provided:**
|
||||
check whether the technology is already covered in the brief. Only launch research-scout
|
||||
for technologies NOT covered by the brief.
|
||||
check whether the technology is already covered in the briefs. Only launch
|
||||
research-scout for technologies NOT covered. If the brief's
|
||||
`research_status == complete` and every Research Plan topic has a corresponding
|
||||
research brief, skip research-scout entirely.
|
||||
|
||||
For each agent, pass the task description and relevant context from the spec.
|
||||
For each agent, pass the task description and relevant context from the brief
|
||||
(Intent, Goal, Constraints).
|
||||
|
||||
### Research-enriched exploration
|
||||
|
||||
|
|
@ -171,20 +184,33 @@ Synthesize all findings:
|
|||
brief. Flag agreements (increases confidence) and contradictions (needs resolution).
|
||||
Incorporate brief recommendations into planning context.
|
||||
7. Note remaining gaps as explicit assumptions
|
||||
8. **Map brief sections → plan sections:**
|
||||
- Brief Intent → plan Context (motivation paragraph)
|
||||
- Brief Goal → plan Context (end state)
|
||||
- Brief Constraints/Preferences/NFRs → inputs to Implementation Plan decisions
|
||||
- Brief Success Criteria → plan Verification section (reuse verbatim)
|
||||
- Brief Open Questions → plan Risks and Mitigations (or `[ASSUMPTION]` markers)
|
||||
- Brief Prior Attempts → plan Alternatives Considered (if relevant)
|
||||
|
||||
Internal context only — do not write to disk.
|
||||
|
||||
### Phase 5 — Deep planning
|
||||
|
||||
Read the spec file for requirements context.
|
||||
Read the brief file for requirements context (you already did this in Input).
|
||||
Read the plan template from the plugin templates directory.
|
||||
|
||||
Write a comprehensive implementation plan including:
|
||||
- Context, Codebase Analysis, Research Sources (if applicable)
|
||||
- Implementation Plan (ordered steps with file paths, changes, reuse)
|
||||
- Alternatives Considered, Risks and Mitigations
|
||||
- Test Strategy (if test-strategist was used)
|
||||
- Verification (concrete commands), Estimated Scope
|
||||
- **Context** — use the brief's Intent verbatim or tightly paraphrased. Every plan
|
||||
motivation sentence must trace back to the brief.
|
||||
- **Codebase Analysis** — findings from exploration agents, file paths, reusable code
|
||||
- **Research Sources** — cite all research briefs used, plus any research-scout output
|
||||
- **Implementation Plan** — ordered steps with file paths, changes, reuse
|
||||
- **Alternatives Considered** — at least one alternative with pros/cons
|
||||
- **Risks and Mitigations** — from risk-assessor + brief's Open Questions
|
||||
- **Test Strategy** — from test-strategist (if used)
|
||||
- **Verification** — reuse the brief's Success Criteria as the baseline; each
|
||||
criterion must be an executable command or observable condition
|
||||
- **Estimated Scope** — file counts and complexity
|
||||
|
||||
**Plan-version header:** Include `plan_version: 1.7` in the metadata line below
|
||||
the title. This signals to ultraexecute-local that the plan includes per-step
|
||||
|
|
@ -355,8 +381,13 @@ with all steps — no parallelism. This is fine.
|
|||
|
||||
If the plan has ≤ 5 steps, omit the Execution Strategy section entirely.
|
||||
|
||||
Write the plan to the destination path provided in your input.
|
||||
Create directories if needed.
|
||||
### Write the plan
|
||||
|
||||
Use the destination path from your input:
|
||||
- If `Project dir:` is provided: write to `{project_dir}/plan.md`.
|
||||
- Otherwise: write to the explicit `Plan destination` path.
|
||||
|
||||
Create parent directories if needed.
|
||||
|
||||
### Phase 6 — Adversarial review
|
||||
|
||||
|
|
@ -366,8 +397,10 @@ Launch two review agents **in parallel**:
|
|||
missing error handling, scope creep, underspecified steps, AND manifest
|
||||
quality (dimension 10: every step has a valid, regex-compilable,
|
||||
path-verified manifest). Missing or invalid manifest = **major** finding.
|
||||
- `scope-guardian` — verify plan matches spec requirements, find scope
|
||||
creep and scope gaps, validate file/function references
|
||||
- `scope-guardian` — verify plan matches the brief's requirements, find scope
|
||||
creep (plan does more than the brief specifies) and scope gaps (plan misses
|
||||
brief requirements), validate file/function references. Confirm every
|
||||
Success Criterion in the brief is covered by the plan's Verification section.
|
||||
|
||||
After both complete:
|
||||
- Address all blockers and major issues by revising the plan
|
||||
|
|
@ -387,7 +420,8 @@ When done, your output message should contain:
|
|||
|
||||
**Task:** {task}
|
||||
**Plan:** {plan path}
|
||||
**Spec:** {spec path}
|
||||
**Brief:** {brief path}
|
||||
**Project:** {project_dir or "-"}
|
||||
**Exploration:** {N} agents ({N} specialized + {N} deep-dives + {research status})
|
||||
**Scope:** {N} files to modify, {N} to create — {complexity}
|
||||
**Review:** {critic verdict} / {guardian verdict}
|
||||
|
|
@ -411,6 +445,9 @@ You can:
|
|||
|
||||
## Rules
|
||||
|
||||
- **Brief is the contract.** Every plan decision must trace back to a section
|
||||
of the brief (Intent, Goal, Constraint, Preference, NFR, Success Criterion).
|
||||
A plan step with no brief basis is scope creep — flag it or remove it.
|
||||
- **Scope:** Only explore the current working directory. Never read files outside the repo.
|
||||
- **Cost:** Use Sonnet for all sub-agents. You (the orchestrator) run on Opus.
|
||||
- **Privacy:** Never log secrets, tokens, or credentials.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue