Harden OpenCode create-plan using native superpowers skill-tool flow
This commit is contained in:
@@ -98,6 +98,15 @@ Codex must invoke these explicit commands during planning:
|
||||
- `~/.codex/superpowers/.codex/superpowers-codex use-skill brainstorming`
|
||||
- `~/.codex/superpowers/.codex/superpowers-codex use-skill writing-plans`
|
||||
|
||||
### OpenCode
|
||||
|
||||
- Must use OpenCode native skill tool (not Claude/Codex invocation syntax).
|
||||
- Must verify Superpowers skill discovery under:
|
||||
- `~/.config/opencode/skills/superpowers`
|
||||
- Must explicitly load:
|
||||
- `superpowers/brainstorming`
|
||||
- `superpowers/writing-plans`
|
||||
|
||||
## Execution Workflow Rules
|
||||
|
||||
- Read runbook first.
|
||||
|
||||
@@ -1,42 +1,64 @@
|
||||
---
|
||||
name: create-plan
|
||||
description: Use when starting a new feature, project, or complex task that needs structured planning with milestones, bite-sized stories, and resumable execution context in Opencode workflows. Trigger for "create a plan", "make a plan", "plan this", and similar planning requests.
|
||||
description: Use when starting a new feature, project, or complex task that needs structured planning with milestones, bite-sized stories, and resumable execution context in Opencode workflows. ALWAYS invoke when user says "create a plan", "make a plan", "plan this", "start planning", or similar planning requests.
|
||||
---
|
||||
|
||||
# Create Plan (Opencode)
|
||||
# Create Plan (OpenCode)
|
||||
|
||||
Create and maintain a local plan folder under `ai_plan/` at project root.
|
||||
|
||||
## Prerequisite Check (MANDATORY)
|
||||
|
||||
This skill depends on Superpowers planning skills. Before proceeding, verify required dependencies exist.
|
||||
This OpenCode variant depends on Superpowers skills being installed via OpenCode's native skill system.
|
||||
|
||||
Required:
|
||||
- Superpowers repo: `https://github.com/obra/superpowers`
|
||||
- `brainstorming` skill
|
||||
- `writing-plans` skill
|
||||
- OpenCode Superpowers skills symlink: `~/.config/opencode/skills/superpowers`
|
||||
- `superpowers/brainstorming`
|
||||
- `superpowers/writing-plans`
|
||||
|
||||
If any dependency is missing, stop immediately and return:
|
||||
Verify before proceeding:
|
||||
|
||||
"Missing dependency: Superpowers planning skills are required (`brainstorming`, `writing-plans`). Install from https://github.com/obra/superpowers, then retry."
|
||||
```bash
|
||||
ls -l ~/.config/opencode/skills/superpowers
|
||||
```
|
||||
|
||||
If dependencies are missing, stop immediately and return:
|
||||
|
||||
"Missing dependency: OpenCode Superpowers skills are required (`superpowers/brainstorming`, `superpowers/writing-plans`). Install from https://github.com/obra/superpowers (OpenCode setup), then retry."
|
||||
|
||||
## Process
|
||||
|
||||
### Phase 1: Analyze
|
||||
### Phase 1: Bootstrap Superpowers Context (REQUIRED)
|
||||
|
||||
Use OpenCode's native skill tool:
|
||||
- list skills
|
||||
- verify `superpowers/brainstorming` and `superpowers/writing-plans` are discoverable
|
||||
|
||||
### Phase 2: Analyze
|
||||
- Explore the codebase and existing patterns.
|
||||
|
||||
### Phase 2: Gather Requirements
|
||||
- Ask questions one at a time until user says ready.
|
||||
- Confirm scope, constraints, success criteria, dependencies.
|
||||
### Phase 3: Gather Requirements
|
||||
- Ask questions ONE AT A TIME until user says ready.
|
||||
- Cover scope, constraints, success criteria, dependencies.
|
||||
- Summarize before proceeding.
|
||||
|
||||
### Phase 3: Design
|
||||
- Use Opencode planning/brainstorming flow.
|
||||
- Propose 2-3 approaches and recommend one.
|
||||
### Phase 4: Design (REQUIRED SUB-SKILL)
|
||||
|
||||
### Phase 4: Plan
|
||||
- Break into milestones and bite-sized stories.
|
||||
Use OpenCode's native skill tool to load:
|
||||
- `superpowers/brainstorming`
|
||||
|
||||
### Phase 5: Initialize Local Plan Workspace (MANDATORY)
|
||||
Then present 2-3 approaches and recommend one.
|
||||
|
||||
### Phase 5: Plan (REQUIRED SUB-SKILL)
|
||||
|
||||
Use OpenCode's native skill tool to load:
|
||||
- `superpowers/writing-plans`
|
||||
|
||||
Then break into milestones and bite-sized stories (2-5 min each).
|
||||
Story IDs: `S-{milestone}{sequence}`.
|
||||
|
||||
### Phase 6: Initialize Local Plan Workspace (MANDATORY)
|
||||
|
||||
At project root:
|
||||
1. Ensure `ai_plan/` exists. Create it if missing.
|
||||
@@ -46,23 +68,35 @@ At project root:
|
||||
Recommended commit message:
|
||||
- `chore(gitignore): ignore ai_plan local planning artifacts`
|
||||
|
||||
### Phase 6: Generate Plan Files (MANDATORY)
|
||||
### Phase 7: Generate Plan Files (MANDATORY)
|
||||
|
||||
Create `ai_plan/YYYY-MM-DD-<short-title>/` with all files below:
|
||||
Create `ai_plan/YYYY-MM-DD-<short-title>/` with ALL files:
|
||||
1. `original-plan.md` - copy of original planner-generated plan.
|
||||
2. `final-transcript.md` - copy of final planning transcript used to reach approved plan.
|
||||
3. `milestone-plan.md` - full implementation spec (from template).
|
||||
4. `story-tracker.md` - story/milestone status tracker (from template).
|
||||
5. `continuation-runbook.md` - execution instructions and context (from template).
|
||||
3. `milestone-plan.md` - full implementation spec (template-based).
|
||||
4. `story-tracker.md` - status tracking (template-based, all stories start as `pending`).
|
||||
5. `continuation-runbook.md` - resume context and execution protocol (template-based).
|
||||
|
||||
Use templates from this skill's `templates/` folder.
|
||||
|
||||
### Phase 7: Handoff
|
||||
### Phase 8: Handoff
|
||||
|
||||
Always instruct the executing agent:
|
||||
> Read `ai_plan/YYYY-MM-DD-<short-title>/continuation-runbook.md` first, then execute from that folder.
|
||||
> Read `ai_plan/YYYY-MM-DD-<short-title>/continuation-runbook.md` first, then execute from `ai_plan` files only.
|
||||
|
||||
Do not rely on planner-private files during implementation.
|
||||
## Tracker Discipline (MANDATORY)
|
||||
|
||||
Before starting any story:
|
||||
1. Open `story-tracker.md`
|
||||
2. Mark story `in-dev`
|
||||
3. Add notes if relevant
|
||||
4. Then begin implementation
|
||||
|
||||
After completing any story:
|
||||
1. Mark story `completed`
|
||||
2. Add commit hash in Notes
|
||||
3. Review pending stories
|
||||
4. Update Last Updated and Stories Complete counts
|
||||
|
||||
## Execution Rules to Include in Plan (MANDATORY)
|
||||
|
||||
@@ -88,6 +122,9 @@ Do not rely on planner-private files during implementation.
|
||||
- [ ] `original-plan.md` present
|
||||
- [ ] `final-transcript.md` present
|
||||
- [ ] `milestone-plan.md` present
|
||||
- [ ] `story-tracker.md` present
|
||||
- [ ] `story-tracker.md` created with all stories as `pending`
|
||||
- [ ] `continuation-runbook.md` present
|
||||
- [ ] Handoff explicitly says to read runbook first and execute from plan folder
|
||||
|
||||
## Exit Triggers for Question Phase
|
||||
User says: "ready", "done", "let's plan", "proceed", "enough questions"
|
||||
|
||||
Reference in New Issue
Block a user