This commit is contained in:
alex wiesner
2026-03-13 13:28:20 +00:00
parent 95974224f8
commit cb208a73c4
62 changed files with 1105 additions and 3490 deletions

View File

@@ -1,29 +1,15 @@
---
description: Trigger phased planning for a new task — enters CLARIFY mode and walks
through DISCOVER → PLAN → CRITIC-GATE
permalink: opencode-config/commands/plan
description: Produce or refresh an execution-ready plan
agent: planner
model: github-copilot/gpt-5.4
---
You are the lead agent. The user has invoked `/plan` to begin structured planning for a task.
Create or update an execution-ready plan for: $ARGUMENTS
## Steps
1. Gather the required repo and external context in parallel.
2. Use `researcher`, `explorer`, and `reviewer` as needed.
3. Write the canonical plan to basic-memory under `plans/<slug>`.
4. Include: objective, scope, assumptions, constraints, task breakdown, parallel lanes, verification oracle, risks, and open findings.
5. Set `Status: approved` only when `builder` can execute the plan without guesswork. Otherwise leave it blocked and explain why.
1. **CLARIFY**: Ask the user clarifying questions about the task using the `question` tool. Gather: goals, constraints, affected areas, success criteria. Record in the relevant plan note (per-repo basic-memory project `plans/`).
2. **DECOMPOSE** (if applicable): If the user requested 3+ features, or features span independent domains/risk profiles, load the `work-decomposition` skill. Follow its decomposition procedure to:
- Identify distinct features and assess independence
- Group into independent workstreams
- Classify risk profiles and assign quality tiers
- Allocate worktrees (one per independent workstream)
- Identify human checkpoint triggers (security, architecture, vision-dependent features)
- Present the decomposition to the user and wait for approval before proceeding
3. **DISCOVER**: Delegate to `explorer` to map relevant parts of the codebase. Delegate to `researcher` for any technical unknowns. Record findings in per-repo basic-memory project notes (`research/` or `knowledge/`). Record reusable cross-project findings in `main`.
4. **CONSULT** (if needed): For domain-specific questions, check per-repo project `decisions/` notes and `main` for cached SME guidance first. If not cached, delegate to `sme`.
5. **PLAN**: Draft a phased task list per workstream. Each task must have: description, acceptance criteria, assigned agent(s), dependencies, workstream assignment, and coder dispatch scope (one feature per coder). Store the plan in the per-repo basic-memory project `plans/<feature>` note.
6. **CRITIC-GATE**: Delegate plan to `critic`. If APPROVED → present plan to user and await go-ahead. If REPHRASE → revise and re-gate. If RESOLVE → **stop**, resolve every blocker, then re-gate. Do not proceed to EXECUTE with unresolved blockers.
Present the final approved plan to the user before starting EXECUTE.
Return the plan slug and the key execution checkpoints.