.config/opencode/skills/workflow-create-plan/SKILL.md
This skill should be used when generating a detailed implementation plan from an existing PRD and codebase research. It synthesizes requirements with codebase context into actionable, bite-sized TDD tasks suitable for junior developers.
npx skillsauth add alexismanuel/dotfiles workflow-create-planInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generate a detailed implementation plan from an existing Product Requirements Document (PRD) and codebase research document. The plan synthesizes the "what" from the PRD with the "how" from research, creating actionable tasks, phases, and dependencies for development.
Type: FLEXIBLE - Adapt task granularity to the complexity of the feature.
Output: plan.md (detailed) and Architecture-Decisions.md (concise decision log), both with YAML frontmatter.
Use this workflow when:
Announce at start: "I'm using the create-plan workflow to generate an implementation plan with decision log."
When this workflow is invoked (e.g., with path/to/prd-file.md path/to/research-file.md [optional: feature-name]), respond with:
I'm ready to create an implementation plan. I'll read the provided PRD and research files, then synthesize them into actionable steps. If you have a specific feature name, provide it; otherwise, I'll infer from the PRD.
Parse arguments:
prd_file: Absolute path to the PRD Markdown file.research_file: Absolute path to the research Markdown file.feature_name (optional): Slug for output filename (e.g., "user-auth"); default to sanitized PRD title.Validate paths exist using List tool. If invalid, prompt: "Please provide valid absolute paths to the PRD and research files."
If no arguments are parsed, try to look for ./research.md file and ./prd.md file.
Scan the repository root for language-specific configuration files:
| File Present | Language | Skills to Load |
|--------------|----------|----------------|
| pyproject.toml, setup.py, requirements.txt | Python | python-dev-guidelines, python-testing-guidelines |
| package.json | TypeScript/JavaScript | (future: ts-dev-guidelines) |
| go.mod | Go | (future: go-dev-guidelines) |
| Cargo.toml | Rust | (future: rust-dev-guidelines) |
Use the skill tool to load all detected skills before proceeding. These skills contain critical implementation patterns that MUST be reflected in the plan.
CRITICAL for Python projects: After loading
python-testing-guidelines, ensure ALL test tasks follow these requirements:
- All tests MUST use dummy classes that inherit from real classes (NO
unittest.mock,Mock,MagicMock,AsyncMock, orpatch())- Tests mirror source structure:
src/module/file.py→tests/module/test_file.py- All fixtures and dummy classes MUST be centralized in
tests/fixtures.py- Error-as-value pattern for new code: functions return
(result, error)tuples
Spawn parallel Task agents only for gaps (e.g., feasibility checks):
codebase-analyzer for deep dives on unresolved PRD requirements (prompt: "Analyze how to implement [specific req] using existing codebase patterns from [research summary]. Return code examples and file paths.").codebase-locator to find additional files if research is outdated (prompt: "Locate files related to [PRD component] not covered in [research file].").Limit to 2-3 agents; wait for all to complete before proceeding. Incorporate results into decomposition (update todo).
Compile: Connect PRD goals to research-backed tasks. Prioritize based on dependencies and risks.
Generate metadata:
git rev-parse HEAD).git branch --show-current).Structure the document with YAML frontmatter + content (saved as plan.md via Edit tool, but only after user confirmation).
From the synthesized plan content, extract 6-8 key architectural decisions and format them as ADR (Architecture Decision Records). This happens automatically without user prompting.
Decision Extraction Guidelines:
Extract decisions from these plan sections:
Decision Format (per decision):
### [DECISION #]: [Decision Title]
**Status:** Accepted
**Context:**
[2-3 sentences explaining the problem space or constraints]
**Decision:**
[1-2 sentences clearly stating the chosen approach]
**Justification:**
[4-5 bullet points with positive framing:]
- [Benefit 1: positive impact, measurable advantage]
- [Benefit 2: what we gain from this approach]
- [Benefit 3: efficiency, maintainability, or performance win]
- [Benefit 4: alignment with existing patterns or best practices]
- [Benefit 5: specific advantage over alternatives]
**Alternatives Considered:**
- [Alternative A]: [Brief description + why not chosen]
- [Alternative B]: [Brief description + why not chosen]
**Rationale:**
[1-2 sentences synthesizing the justification into a clear choice statement]
Generate Architecture-Decisions.md:
---
date: [ISO datetime]
planner: opencode
git_commit: [hash]
branch: [name]
repository: [name]
feature: "[feature_name]"
status: accepted
---
# Architecture Decisions: [Feature Name]
> **Generated from:** plan.md
> **Review time:** 5-10 minutes
## Decision Summary
This document captures 6-8 key architectural decisions for the [feature name]. Each decision follows the ADR (Architecture Decision Record) format with positive justification for the chosen approach.
---
[Insert 6-8 decisions using format above]
---
## Implementation Tracking
These decisions are reflected in the detailed implementation tasks in plan.md:
- Decision 1 → Tasks [X-Y] [description]
- Decision 2 → Tasks [A-B] [description]
...
## Related Documents
- PRD: [prd_file path]
- Research: [research_file path]
- Implementation Plan: plan.md
- Git Commit: [hash]
---
date: [ISO datetime]
planner: opencode
git_commit: [hash]
branch: [name]
repository: [name]
feature: "[feature_name]"
tags: [plan, ...]
status: complete
last_updated: [YYYY-MM-DD]
last_updated_by: opencode
prd_source: [prd_file path]
research_source: [research_file path]
language: [detected language]
loaded_skills: [list of loaded skill names]
---
# Implementation Plan: [Feature Name]
> **For execution:** Use the `workflow-implement-plan` skill to execute this plan task-by-task with batch checkpoints.
**Goal:** [One sentence describing what this builds]
**Architecture:** [2-3 sentences about approach]
**Tech Stack:** [Key technologies/libraries]
---
**Date**: [ISO datetime]
**Planner**: opencode
**Git Commit**: [hash]
**Branch**: [name]
**PRD Source**: [prd_file]
**Research Source**: [research_file]
## Overview
[Brief synthesis: Problem from PRD + key research insights.]
## Goals (from PRD)
[List measurable objectives from PRD.]
## Task Breakdown
### Task 1: [Component Name]
**Files:**
- Create: `exact/path/to/file.py`
- Modify: `exact/path/to/existing.py:123-145`
- Test: `tests/exact/path/to/test.py`
**Step 1: Write the failing test**
```python
def test_specific_behavior():
result = function(input)
assert result == expected
Step 2: Run test to verify it fails
Run: pytest tests/path/test.py::test_name -v
Expected: FAIL with "function not defined"
Step 3: Write minimal implementation
def function(input):
return expected
Step 4: Run test to verify it passes
Run: pytest tests/path/test.py::test_name -v
Expected: PASS
Step 5: Commit
git add tests/path/test.py src/path/file.py
git commit -m "feat: add specific feature"
[Same structure: Files, Step 1-5]
...
[If Python project, include:]
Python Testing Requirements (from
python-testing-guidelines):
- NO
unittest.mock- use dummy classes inheriting from real classes- All dummies and fixtures in
tests/fixtures.py- Test classes named:
TestMethodNameorTestClassNameMethodName- Error-as-Value pattern: functions return
(result, error)tuples
path/to/file.py:123 - [Brief desc + relevance to plan][Restate + verification steps]
[Any gaps; suggest follow-ups.]
### Step 7: Save and Present
- Confirm with user: "Here's the proposed plan summary: [concise 3-5 bullet overview]. Shall I generate the full plan.md and Architecture-Decisions.md?"
- If yes, use Write tool to write both files:
- `plan.md`: Detailed implementation plan
- `Architecture-Decisions.md`: Concise decision log (6-8 ADR-style decisions)
- Output: Present summary with key tasks, decisions, and code refs. Ask: "Any follow-ups or adjustments?"
## Handle Follow-Ups
- Update plan.md: Add `## Follow-up [timestamp]` section, update frontmatter (last_updated, last_updated_by, last_updated_note).
- Update Architecture-Decisions.md: If decisions change, add `## Decision Updates [timestamp]` section with new or modified decisions.
- Re-run steps 3-5 for new info; spawn sub-agents as needed.
## Task Granularity
**Each step is ONE action (2-5 minutes):**
- "Write the failing test" - step
- "Run it to make sure it fails" - step
- "Implement the minimal code to make the test pass" - step
- "Run the tests and make sure they pass" - step
- "Commit" - step
**Task requirements:**
- Exact file paths always (`src/auth/login.ts:45-67`)
- Complete code in plan (not "add validation")
- Exact commands with expected output
- Reference relevant code from research
## Important Notes
- Parallelism: Read files and sub-agents in parallel for efficiency.
- Read-Only: No code changes; focus on planning.
- Conventions: Mimic codebase style from research. Follow security (no secrets).
- Junior-Dev Focus: Tasks explicit, with file refs for navigation. Assume zero codebase context.
- Edge Cases: If no feature_name, infer from PRD title (e.g., slugify "User Login" -> "user-login").
- Tools: Use todowrite for internal tracking; Bash for git metadata.
- TDD: Every task follows Write Test -> Fail -> Implement -> Pass -> Commit cycle.
- **Decision Log**: Always generated alongside plan.md. Automatic, non-optional part of plan creation.
- **Positive Framing**: Decision justifications use positive language (what we gain, not what we avoid).
- **Abstraction Level**: Architecture-Decisions.md is higher-level than plan.md - captures cross-cutting choices, not implementation details.
## Integration with Other Workflows
After plan is complete, offer:
**"Plan complete and saved to `plan.md` and `Architecture-Decisions.md`. Ready to implement?"**
- Use **workflow-implement-plan** skill to execute with batch checkpoints
- Or implement manually following the step-by-step tasks
- Review Architecture-Decisions.md for 5-10 minutes to understand key architectural choices before implementation
development
Generate GitLab merge request descriptions from git commits with automatic categorization and Jira integration.
development
This skill should be used when validating that an implementation plan was correctly executed. It verifies success criteria, runs tests, identifies deviations, and presents structured completion options including MR creation or discard.
development
This skill should be used when reviewing code changes in a branch against main/master/develop. It analyzes commits, integrates JIRA ticket and MR context when available, and produces a structured code review using Conventional Comments format.
development
This skill should be used when conducting comprehensive codebase research to answer questions, understand architecture, or prepare context for implementation planning. It spawns parallel sub-agents and synthesizes findings into a structured research document.