.github/skills/workflows-plan/SKILL.md
Transform feature descriptions into structured project plans anchored to user story, architectural context, and success criteria from brainstorm (or constructed fresh when no brainstorm exists)
npx skillsauth add the-rabak/compound-engineering-plugin workflows-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.
[feature description, bug report, or improvement idea]
Note: The current year is 2026. Use this when dating plans and searching for recent documentation.
Transform feature descriptions, bug reports, or improvement ideas into well-structured, execution-ready plans that:
/workflows-work can delegate tasks with full context; /workflows-review evaluates against the stated purposePlans consume lynchpin artifacts from /workflows-brainstorm when available, or construct them fresh when running standalone. Either way, the plan document carries forward the WHY, WHERE, and DONE contract that all downstream phases depend on.
<feature_description> #$ARGUMENTS </feature_description>
If the feature description above is empty, ask the user: "What would you like to plan? Please describe the feature, bug fix, or improvement you have in mind."
Do not proceed until you have a clear feature description from the user.
This step establishes the plan's WHY anchor -- whether from a brainstorm, a spec file, or fresh dialogue. Every path must produce or inherit: problem narrative, user story, architectural context, and success criteria.
Check if arguments contain a plan or spec file:
If the feature description (#$ARGUMENTS) is or contains a path to a .md file (e.g., docs/plans/some-plan.md, spec.md, ~/notes/feature-plan.md):
[file path]. Using as foundation."brainstorm_ref field in frontmatter, or search docs/brainstorms/ for a matching topic. If found, read and extract lynchpin artifacts (see Path B).In Step 2 (Issue Planning), build upon the existing plan structure -- preserve its sections, fill gaps, add execution-readiness fields (Files, Depends on, Success criteria, Test command) to any tasks that lack them, and enrich with research findings. Do NOT discard or rewrite sections that are already well-defined.
If arguments are NOT a file path, check for brainstorm output:
Before asking questions, look for recent brainstorm documents in docs/brainstorms/ that match this feature:
ls -la docs/brainstorms/*.md 2>/dev/null | head -10
Relevance criteria: A brainstorm is relevant if:
If a relevant brainstorm exists:
handoff.problem_narrative, handoff.user_story, handoff.architectural_context, handoff.success_criteria{{ARCHITECTURAL_CONTEXT}} in work.md)false or sections are empty, flag them: "Brainstorm is missing [X]. I'll construct this during planning."If multiple brainstorms could match: Use AskUserQuestion tool to ask which brainstorm to use, or whether to proceed without one.
If no brainstorm found (or not relevant), construct WHY artifacts from scratch:
Phase C.1: Idea Refinement Dialogue
Refine the idea through collaborative dialogue using the AskUserQuestion tool:
Gather signals for research decision. During refinement, note:
Skip option: If the feature description is already detailed, offer: "Your description is detailed. Should I proceed with research, or would you like to refine it further?"
Phase C.2: Synthesize WHY Artifacts (mandatory before research)
After idea refinement, before proceeding to research, synthesize the plan's WHY anchor. This is lighter than a full brainstorm but still establishes the foundation that all downstream phases need:
Problem Narrative (2-4 sentences): Synthesize: who has the problem, what triggers it, what the impact is. Not a restatement of the feature request -- a narrative about why this matters.
User Story:
As a [persona],
I need to [action]
so that [outcome],
because currently [pain point]
which causes [impact].
If the feature has multiple personas or use cases, construct the primary user story plus brief secondary stories.
Architectural Context (rough -- research will refine):
This is a hypothesis -- the research phase (Step 1) will validate or correct it.
Success Criteria (3-5 measurable outcomes): Tied to the user story's "so that" clause, not just technical correctness. How will a real user know this works?
Use AskUserQuestion tool to present the synthesized WHY artifacts and ask: "Here's my understanding of WHY we're building this. Does this capture it correctly, or should I adjust anything?"
Revise based on feedback before proceeding.
Use the AskUserQuestion tool to collect structured project inputs. Ask these 4 questions in sequence:
Question 1: "Do you have any project management tickets related to this feature?"
["None", "Enter URLs"]Question 2: "Do you have any wiki or documentation pages related to this feature?"
["None", "Enter URLs"]Question 3: "Do you have any Figma designs related to this feature?"
["None", "Enter URLs"]Question 4: "Do you have any existing plan, spec, or requirements documents (.md files) to build from?"
["None", "Enter file paths"]Processing inputs:
For any non-empty inputs, launch parallel subagents to fetch and summarize each document:
.md file, extract structure (title, problem statement, approach, tasks, acceptance criteria, open questions). Identify which sections are well-defined vs need enrichment.Handle MANUAL_INPUT_NEEDED: If a subagent cannot access a URL (authentication required, private resource), use the AskUserQuestion tool to ask: "I couldn't access [URL]. Could you paste the relevant content from this document?"
Consolidate into project_context block:
## Project Context (from structured inputs)
### Project Tickets
- [TICKET-123](url): Summary of ticket...
### Documentation
- [Doc Title](url): Key decisions and requirements...
### Figma Designs
- [Design Name](url): Design intent and component overview...
### Existing Plans / Specs
- [filename.md](path): Structure summary, well-defined sections, gaps to fill...
Store source URLs/paths in plan frontmatter under source_docs::
source_docs:
tickets:
- https://tracker.example.com/TICKET-123
docs:
- https://wiki.example.com/pages/doc-id
figma:
- https://figma.com/file/abc123
plans:
- docs/specs/existing-feature-spec.md
If all three inputs are "None", skip this step and proceed.
Run these agents in parallel to gather local context:
What to look for:
docs/solutions/ that might apply (gotchas, patterns, lessons learned)These findings inform the next step.
Based on signals from Step 0 and findings from Step 1, decide on external research.
High-risk topics → always research. Security, payments, external APIs, data privacy. The cost of missing something is too high. This takes precedence over speed signals.
Strong local context → skip external research. Codebase has good patterns, CLAUDE.md has guidance, user knows what they want. External research adds little value.
Uncertainty or unfamiliar territory → research. User is exploring, codebase has no examples, new technology. External perspective is valuable.
Announce the decision and proceed. Brief explanation, then continue. User can redirect if needed.
Examples:
Only run if Step 1.5 indicates external research is valuable.
Run these agents in parallel:
After all research steps complete, consolidate findings and validate/refine the WHY artifacts:
Research findings consolidation:
app/Services/ExampleService.php:42)docs/solutions/ (key insights, gotchas to avoid)Validate and refine WHY artifacts against research:
Now that we have concrete codebase knowledge, refine the WHY artifacts established in Step 0:
Architectural Context -- the repo research likely revealed the actual module structure, neighboring services, and data flow patterns. Update the architectural context from hypothesis to grounded fact:
Success Criteria -- check if research uncovered edge cases, existing test patterns, or quality gates that should be added to success criteria
User Story -- rarely changes from research, but if learnings reveal the problem is different than assumed, flag it: "Research suggests the user story may need adjustment because [finding]."
Research implications for approach:
Explicitly state how research findings confirm, challenge, or refine the planned approach relative to the user story. Examples:
app/Services/AuthService.php -- we should follow it for consistency, which aligns with the user story because..."Optional validation: Briefly summarize the refined WHY artifacts and key research findings, then ask if anything looks off or missing before proceeding to planning.
Title & Categorization:
feat: Add user authentication, fix: Cart total calculation)-plan suffix
feat: Add User Authentication → 2026-01-21-feat-add-user-authentication-plan.mdStakeholder Analysis (grounded in WHY artifacts):
Content Planning:
Phase Decomposition (traced to user story):
Each implementation phase must state what aspect of the user story it serves. This creates a traceable chain:
When decomposing into phases:
Execution Readiness:
For plans that will be executed via /workflows-work, ensure each implementation task includes:
This structured format enables the /workflows-work orchestrator to delegate each task to a focused subagent with clear scope and termination criteria. Plans without this structure will be flagged for refinement before execution begins.
After planning the issue structure, run SpecFlow Analyzer to validate the feature specification against the user story and success criteria:
The SpecFlow Analyzer should evaluate:
SpecFlow Analyzer Output:
Important for /workflows-work compatibility: All detail levels can be executed, but the MORE and A LOT levels produce plans with structured execution chunks (per-task success criteria, test commands, file lists) that enable the subagent orchestration model in /workflows-work. MINIMAL plans work but may require the orchestrator to decompose tasks further before delegating to subagents.
All detail levels include WHY sections. The Problem Narrative, User Story, Architectural Context, and Success Criteria are mandatory at every level -- they are the contract that downstream phases depend on. The difference between levels is how much implementation detail surrounds them.
Select how comprehensive you want the issue to be, simpler is mostly better.
Best for: Simple bugs, small improvements, clear features
Includes:
Note: MINIMAL plans may need to be enriched with per-task success criteria before running /workflows-work. The orchestrator can handle this decomposition automatically, but providing structured tasks up front leads to more predictable execution.
Structure:
---
title: [Issue Title]
type: [feat|fix|refactor]
status: active
date: YYYY-MM-DD
brainstorm_ref: [path to brainstorm doc, or null]
source_docs:
tickets: []
docs: []
figma: []
plans: []
handoff:
problem_narrative: true
user_story: true
architectural_context: true
success_criteria: true
---
# [Issue Title]
## Problem Narrative
[2-4 sentences: who has the problem, what triggers it, what the impact is.
Carried forward from brainstorm or constructed in Step 0.]
## User Story
As a [persona],
I need to [action]
so that [outcome],
because currently [pain point]
which causes [impact].
## Architectural Context
- **Lives in:** [service/module/layer -- with actual file paths from research]
- **Interacts with:** [neighboring systems/modules]
- **Entry point:** [UI/API/CLI/event]
## Success Criteria
- [ ] [Measurable outcome tied to user story's "so that"]
- [ ] [Observable behavior proving the problem is solved]
## Implementation
[Brief description of what to build and how]
## References
- Related issue: #[issue_number]
- Documentation: [relevant_docs_url]
Best for: Most features, complex bugs, team collaboration
Includes everything from MINIMAL plus:
Structure:
---
title: [Issue Title]
type: [feat|fix|refactor]
status: active
date: YYYY-MM-DD
brainstorm_ref: [path to brainstorm doc, or null]
source_docs:
tickets: []
docs: []
figma: []
plans: []
handoff:
problem_narrative: true
user_story: true
architectural_context: true
success_criteria: true
---
# [Issue Title]
## Problem Narrative
[The synthesized problem statement. WHY we're building this.
2-4 sentences: who has the problem, what triggers it, what the impact is.]
## User Story
As a [persona],
I need to [action]
so that [outcome],
because currently [pain point]
which causes [impact].
## Architectural Context
- **Lives in:** [service/module/layer -- grounded in repo research]
- **Interacts with:** [neighboring systems/modules with file paths]
- **Entry point:** [UI/API/CLI/event]
- **Data:** [what data flows, where it lives]
- **Dependencies:** [what this depends on, what may depend on it]
- **Conventions:** [relevant CLAUDE.md or project conventions]
## Success Criteria
- [ ] [Measurable outcome 1 -- tied to user story's "so that"]
- [ ] [Measurable outcome 2 -- observable behavior]
- [ ] [Measurable outcome 3 -- proving the problem is solved]
## Overview
[Comprehensive description of what we're building and the chosen approach]
## Technical Considerations
- Architecture impacts
- Performance implications
- Security considerations
## Implementation Phases
#### Phase 1: [Phase Name]
**Serves:** [Which aspect of the user story / which success criterion this phase delivers]
##### Task 1.1: [Task Name]
**Files:** `path/to/file1.php`, `path/to/file2.php`
**Depends on:** None
**Success criteria:**
- [ ] Criterion 1
- [ ] Criterion 2
**Test command:** `<project-appropriate test command>`
##### Task 1.2: [Task Name]
**Files:** `path/to/file3.php`
**Depends on:** Task 1.1
**Success criteria:**
- [ ] Criterion 1
- [ ] Criterion 2
**Test command:** `<project-appropriate test command>`
#### Phase 2: [Phase Name]
**Serves:** [Which aspect of the user story / which success criterion this phase delivers]
##### Task 2.1: [Task Name]
**Files:** `path/to/file4.php`
**Depends on:** Task 1.2
**Success criteria:**
- [ ] Criterion 1
- [ ] Criterion 2
**Test command:** `<project-appropriate test command>`
## Acceptance Criteria
- [ ] Detailed requirement 1
- [ ] Detailed requirement 2
- [ ] Testing requirements
## Success Metrics
[How we measure success -- tied to the user story and problem narrative]
## Dependencies & Risks
[What could block or complicate this]
## References & Research
- Similar implementations: [file_path:line_number]
- Best practices: [documentation_url]
- Related PRs: #[pr_number]
Best for: Major features, architectural changes, complex integrations
Includes everything from MORE plus:
Structure:
---
title: [Issue Title]
type: [feat|fix|refactor]
status: active
date: YYYY-MM-DD
brainstorm_ref: [path to brainstorm doc, or null]
source_docs:
tickets: []
docs: []
figma: []
plans: []
handoff:
problem_narrative: true
user_story: true
architectural_context: true
success_criteria: true
---
# [Issue Title]
## Problem Narrative
[Detailed problem analysis. WHY we're building this.
Who has the problem, what triggers it, what the impact is, and what happens if we don't solve it.]
## User Story
As a [persona],
I need to [action]
so that [outcome],
because currently [pain point]
which causes [impact].
### Secondary Stories (if applicable)
As a [persona 2], I need to [action] so that [outcome].
## Architectural Context
- **Lives in:** [service/module/layer -- grounded in repo research with file paths]
- **Interacts with:** [neighboring systems/modules with specific integration points]
- **Entry point:** [UI/API/CLI/event -- specific routes, components, or endpoints]
- **Data:** [what data flows, where it lives, schema implications]
- **Dependencies:** [what this depends on, what may depend on it]
- **Conventions:** [relevant CLAUDE.md or project conventions]
- **Boundary constraints:** [what this should NOT touch or change]
## Success Criteria
- [ ] [Measurable outcome 1 -- tied to user story]
- [ ] [Measurable outcome 2 -- observable behavior]
- [ ] [Measurable outcome 3 -- proving the problem is solved]
- [ ] [Non-functional: performance target]
- [ ] [Non-functional: security requirement]
## Stakeholder Impact
- **End users:** [How their experience changes -- from user story]
- **Developers:** [How this affects the codebase -- from architectural context]
- **Operations:** [Deployment, monitoring, infrastructure impact]
- **Business:** [Revenue, cost, compliance, timeline impact]
## Overview
[Executive summary of what we're building, the chosen approach, and why this approach best serves the user story]
## Proposed Solution
[Comprehensive solution design]
## Technical Approach
### Architecture
[Detailed technical design, grounded in the architectural context map]
### Implementation Phases
#### Phase 1: [Foundation]
**Serves:** [Which aspect of the user story / which success criteria this phase delivers]
**Rationale:** [Why this phase comes first -- what it enables for subsequent phases]
##### Task 1.1: [Task Name]
**Files:** `path/to/file1.php`, `path/to/file2.php`
**Depends on:** None
**Success criteria:**
- [ ] Criterion 1
- [ ] Criterion 2
**Test command:** `<project-appropriate test command>`
##### Task 1.2: [Task Name]
**Files:** `path/to/file3.php`
**Depends on:** Task 1.1
**Success criteria:**
- [ ] Criterion 1
- [ ] Criterion 2
**Test command:** `<project-appropriate test command>`
#### Phase 2: [Core Implementation]
**Serves:** [Which aspect of the user story / which success criteria this phase delivers]
**Rationale:** [Why this phase order -- what it builds on from Phase 1]
##### Task 2.1: [Task Name]
**Files:** `path/to/file4.php`, `path/to/file5.php`
**Depends on:** Task 1.2
**Success criteria:**
- [ ] Criterion 1
- [ ] Criterion 2
**Test command:** `<project-appropriate test command>`
##### Task 2.2: [Task Name]
**Files:** `path/to/file6.php`
**Depends on:** Task 2.1
**Success criteria:**
- [ ] Criterion 1
- [ ] Criterion 2
**Test command:** `<project-appropriate test command>`
#### Phase 3: [Polish & Optimization]
**Serves:** [Which success criteria / quality aspects this phase delivers]
##### Task 3.1: [Task Name]
**Files:** `path/to/file7.php`
**Depends on:** Task 2.2
**Success criteria:**
- [ ] Criterion 1
- [ ] Criterion 2
**Test command:** `<project-appropriate test command>`
### Phase-to-Story Traceability
| Success Criterion | Delivered by Phase(s) | Key Tasks |
|---|---|---|
| [Criterion 1 from Success Criteria] | Phase 1, Phase 2 | Task 1.1, Task 2.1 |
| [Criterion 2 from Success Criteria] | Phase 2 | Task 2.1, Task 2.2 |
## Alternative Approaches Considered
[Other solutions evaluated and why rejected -- **relative to the user story and success criteria**, not just technical tradeoffs]
## Acceptance Criteria
### Functional Requirements
- [ ] Detailed functional criteria
### Non-Functional Requirements
- [ ] Performance targets
- [ ] Security requirements
- [ ] Accessibility standards
### Quality Gates
- [ ] Test coverage requirements
- [ ] Documentation completeness
- [ ] Code review approval
## Success Metrics
[Detailed KPIs and measurement methods -- tied to user story outcomes]
## Dependencies & Prerequisites
[Detailed dependency analysis]
## Risk Analysis & Mitigation
[Comprehensive risk assessment -- including risks to delivering the user story, not just technical risks]
## Resource Requirements
[Team, time, infrastructure needs]
## Future Considerations
[Extensibility and long-term vision]
## Documentation Plan
[What docs need updating]
## References & Research
### Internal References
- Architecture decisions: [file_path:line_number]
- Similar features: [file_path:line_number]
- Configuration: [file_path:line_number]
### External References
- Framework documentation: [url]
- Best practices guide: [url]
- Industry standards: [url]
### Related Work
- Previous PRs: #[pr_numbers]
- Related issues: #[issue_numbers]
- Design documents: [links]
Content Formatting:
<details> tagsCross-Referencing:
Code & Examples:
# Good example with syntax highlighting and line references
```php
// app/Services/UserService.php:42
public function processUser(User $user): array
{
// Implementation here
}
```
# Collapsible error logs
<details>
<summary>Full error stacktrace</summary>
`Error details here...`
</details>
AI-Era Considerations:
Pre-submission Checklist:
WHY Integrity:
handoff frontmatter fields are all trueContent Quality:
Execution Readiness (for /workflows-work):
{{ARCHITECTURAL_CONTEXT}} in execution agent promptsBefore writing the plan file, ensure the output directory and gitignore rules exist:
# Create docs/plans/ directory if it doesn't exist
mkdir -p docs/plans
# Ensure docs/plans/ and docs/brainstorms/ are in .gitignore (but NOT docs/solutions/)
if [ -f .gitignore ]; then
grep -qxF 'docs/plans/' .gitignore || echo 'docs/plans/' >> .gitignore
grep -qxF 'docs/brainstorms/' .gitignore || echo 'docs/brainstorms/' >> .gitignore
else
printf 'docs/plans/\ndocs/brainstorms/\n' > .gitignore
fi
IMPORTANT: docs/solutions/ must NOT be added to .gitignore -- it contains committed institutional knowledge.
Filename: Use the date and kebab-case filename from Step 2 Title & Categorization.
docs/plans/YYYY-MM-DD-<type>-<descriptive-name>-plan.md
Examples:
docs/plans/2026-01-15-feat-user-authentication-flow-plan.mddocs/plans/2026-02-03-fix-checkout-race-condition-plan.mddocs/plans/2026-03-10-refactor-api-client-extraction-plan.mddocs/plans/2026-01-15-feat-thing-plan.md (not descriptive - what "thing"?)docs/plans/2026-01-15-feat-new-feature-plan.md (too vague - what feature?)docs/plans/2026-01-15-feat: user auth-plan.md (invalid characters - colon and space)docs/plans/feat-user-auth-plan.md (missing date prefix)After writing the plan file, use the AskUserQuestion tool to present these options:
Question: "Plan ready at docs/plans/YYYY-MM-DD-<type>-<name>-plan.md. What would you like to do next?"
Options:
/deepen-plan - Enhance each section with parallel research agents (best practices, performance, UI)/technical_review - Technical feedback from code-focused reviewers (Rabak Laravel, Rabak Vue, Simplicity)/workflows-work - Begin implementing this plan locally/workflows-work on remote - Begin implementing in Claude Code on the web (use & to run in background)Based on selection:
open docs/plans/<plan_filename>.md to open the file in the user's default editor/deepen-plan → Call the /deepen-plan command with the plan file path to enhance with research/technical_review → Call the /technical_review command with the plan file pathdocument-review skill./workflows-work → Call the /workflows-work command with the plan file path/workflows-work on remote → Run /workflows-work docs/plans/<plan_filename>.md & to start work in background for Claude Code webNote: If running /workflows-plan with ultrathink enabled, automatically run /deepen-plan after plan creation for maximum depth and grounding.
Loop back to options after Simplify or Other changes until user selects /workflows-work or /technical_review.
When user selects "Create Issue":
Save the plan as a tracker-ready description:
The plan file is already in markdown format. Inform the user:
[plan_path]. You can create a ticket using the plan content."After creation:
/workflows-work or /technical_reviewThe plan document is a structured contract consumed by all downstream phases. Here's how each phase uses it:
/deepen-plan reads:
/workflows-work reads:
{{ARCHITECTURAL_CONTEXT}} in each execution agent's prompt. This is WHY grounded arch context matters -- every subagent gets system-level awarenessbrainstorm_ref -- if present, the orchestrator can read the original brainstorm for additional context/workflows-review reads:
NEVER CODE! Just research and write the plan.
tools
Package one plan execution packet into a compact ticket-local execution packet with parent refs, scope fences, feature-home ownership, and evidence commands. Use when converting plans into local tickets or when execution needs one ticket-sized context pack without the full plan.
tools
Package one plan execution packet into a compact ticket-local execution packet with parent refs, scope fences, feature-home ownership, and evidence commands. Use when converting plans into local tickets or when execution needs one ticket-sized context pack without the full plan.
testing
Run a deep adversarial review of plans and architecture before implementation. Use when validating strategy docs, contracts, roadmaps, and competitive positioning with scored findings and prioritized recommendations.
testing
Run a deep adversarial review of plans and architecture before implementation. Use when validating strategy docs, contracts, roadmaps, and competitive positioning with scored findings and prioritized recommendations.