YOU ARE EXECUTING THE /plan-feature SKILL. The user triggered this skill. Follow ALL instructions below step by step. Do NOT treat this as a freeform conversation - execute the skill workflow.
Follow CLAUDE.md rules.
Output file: docs/plan-features/{$ARGUMENTS.name}_FEATURE.md (uppercase)
Ultra Think Strategy
Ultra think before each phase transition:
- After exploration results: reflect on completeness before planning
- Before writing spec: consider architecture, edge cases, future maintainability
- After validation: ensure the plan is comprehensive and actionable
1. GATHER REQUIREMENTS
Ask user for:
- Detailed feature description
- Mockups/screenshots if available
- Business rules and edge cases
- Integrations with existing features
Do not proceed until requirements are clear.
1.5 CLARIFY DETAILS
Use AskUserQuestion to clarify before exploration:
Must clarify (if not specified)
- Error messages for user-facing failures?
- Default values for new fields?
- Validation rules?
- What triggers state changes?
UX Decisions (if not specified)
- What happens on success? (toast, redirect, refresh?)
- What happens on error?
- Confirmation dialogs needed?
Permissions (if not specified)
- Who can perform each action?
- RLS policy rules?
Do not proceed until critical details are clarified.
2. EXPLORE (PARALLEL)
Launch focused agents in a single message (parallel execution). Scale agent count to task complexity.
Complexity Guide
| Scope |
Backend agents |
Frontend agents |
| Single file fix |
1 |
1 |
| Single-layer feature |
2 |
2 |
| Multi-layer feature |
2-3 |
2-3 |
| Cross-cutting / large feature |
3-4 |
3-4 |
Backend Agents (min 2 when backend in scope, split by concern)
- Domain & data flow -
explore-codebase: "Find entities, repository interfaces, value objects, and DTOs related to [feature] in backend/internal/domain/ and backend/internal/application/dto/"
- Usecases & business logic -
explore-codebase: "Find usecases related to [feature] in backend/internal/application/usecases/. Read their Execute methods, dependencies, and error handling"
- Handlers & routing -
explore-codebase: "Find HTTP handlers and routes related to [feature] in backend/internal/presentation/. Check middleware, validation, response patterns"
- Infrastructure & services -
explore-codebase: "Find repo implementations, external service adapters, and config related to [feature] in backend/internal/infrastructure/"
- Similar patterns -
explore-codebase: "Find the most similar existing feature to [feature] in backend/. I need to replicate its patterns"
Frontend Agents (min 2 when frontend in scope, split by concern)
- Components & UI -
explore-codebase: "Find components related to [feature] in frontend/src/components/. Check props, state, Shadcn UI usage"
- Hooks & state -
explore-codebase: "Find hooks, React Query calls, and state management related to [feature] in frontend/src/hooks/ and frontend/src/lib/"
- Pages & routing -
explore-codebase: "Find pages and layouts related to [feature] in frontend/src/app/. Check route structure, data fetching, i18n"
- Types & API layer -
explore-codebase: "Find TypeScript types, API client functions related to [feature] in frontend/src/types/ and frontend/src/lib/"
- Similar patterns -
explore-codebase: "Find the most similar existing feature to [feature] in frontend/src/. I need to replicate its patterns"
Supporting Agents (as needed, 1 each)
| Need |
Agent |
Prompt |
| Database |
explore-db |
"dev - Find tables related to [feature], check schema, relationships, RLS policies" |
| Library docs |
explore-docs |
"[library] [specific feature] documentation" |
| Best practices |
websearch |
"[topic] best practices 2025 2026" |
2.5 POST-EXPLORATION CHECK
After agents return, verify coverage across all dimensions:
- Full code path traced? Can I trace handler -> usecase -> repository -> DB (backend) and page -> hook -> API -> component (frontend)? If gaps -> launch targeted
explore-codebase
- Similar patterns identified? Do I have a reference implementation to follow? If not -> launch
explore-codebase
- Data model complete? Tables, columns, relationships, RLS known? If not -> launch
explore-db
- Library docs sufficient? If not -> launch
explore-docs
Do NOT proceed with incomplete context.
3. VALIDATE ARCHITECTURE
Display architecture plan:
## Architecture Plan - [Feature Name]
### Database
- Tables to create: [list with columns]
- Tables to modify: [changes]
- RLS policies needed
### Backend (Go Clean Architecture)
- Entities: [list]
- Usecases: [list with descriptions]
- Handlers: [endpoints]
- Code to reuse: [from exploration]
### Frontend (Next.js)
- Types, Components, Hooks, Pages
- Code to reuse: [from exploration]
### Libraries / Best Practices
- [from exploration]
Ask with AskUserQuestion: "Validate this architecture?"
4. WRITE SPEC FILE
After validation, write complete spec to docs/plan-features/{$ARGUMENTS.name}_FEATURE.md.
Use the template structure from templates/feature-spec-template.md.
Structure:
- Overview (objective, summary, tech stack)
- Context and Motivation
- Functional Specifications (detailed behavior, rules, edge cases)
- Technical Architecture (existing files to modify, new files to create)
- Configuration (
app.yaml for thresholds, limits, feature flags - NO hardcoded values)
- Database (migrations, columns, RLS policies)
- Backend Implementation (phases: Domain -> Infrastructure -> Application -> Presentation)
- Frontend Implementation (phases: Types/API -> Hooks -> Components -> Pages)
- Execution Plan (checkboxes for each task)
- Important Notes (compatibility, performance, security)
Backend Phase Rules
- Order: Domain -> Infrastructure -> Application -> Presentation
- Max 5 items per phase - split if more
- Separate CRUD usecases from business logic usecases
- Each phase must compile independently
5. DELIVER
- Confirm file created
- Summarize the phases
- Indicate next steps:
/dev spec=docs/plan-features/[name]_FEATURE.md phase=1
/dev spec=docs/plan-features/[name]_FEATURE.md phase=8
Rules
- EXPLORE FIRST - parallel exploration before the plan
- CONTEXT IS KEY - spec must be detailed enough for a new session
- VALIDATE - user validation before writing spec
- CHECKBOXES - execution plan with checkboxes to track progress
Source: Aurealibe/claude-config — distributed by TomeVault.
1---2name: plan-feature-33description: Create complete development plan with parallel exploration Use when this capability is needed.4---56**YOU ARE EXECUTING THE `/plan-feature` SKILL.** The user triggered this skill. Follow ALL instructions below step by step. Do NOT treat this as a freeform conversation - execute the skill workflow.78Follow CLAUDE.md rules.910**Output file:** `docs/plan-features/{$ARGUMENTS.name}_FEATURE.md` (uppercase)1112## Ultra Think Strategy1314Ultra think before each phase transition:15- After exploration results: reflect on completeness before planning16- Before writing spec: consider architecture, edge cases, future maintainability17- After validation: ensure the plan is comprehensive and actionable1819---2021## 1. GATHER REQUIREMENTS2223Ask user for:24- Detailed feature description25- Mockups/screenshots if available26- Business rules and edge cases27- Integrations with existing features2829Do not proceed until requirements are clear.3031---3233## 1.5 CLARIFY DETAILS3435Use AskUserQuestion to clarify before exploration:3637### Must clarify (if not specified)38- Error messages for user-facing failures?39- Default values for new fields?40- Validation rules?41- What triggers state changes?4243### UX Decisions (if not specified)44- What happens on success? (toast, redirect, refresh?)45- What happens on error?46- Confirmation dialogs needed?4748### Permissions (if not specified)49- Who can perform each action?50- RLS policy rules?5152Do not proceed until critical details are clarified.5354---5556## 2. EXPLORE (PARALLEL)5758Launch focused agents in a **single message** (parallel execution). Scale agent count to task complexity.5960### Complexity Guide6162| Scope | Backend agents | Frontend agents |63|-------|---------------|-----------------|64| Single file fix | 1 | 1 |65| Single-layer feature | 2 | 2 |66| Multi-layer feature | 2-3 | 2-3 |67| Cross-cutting / large feature | 3-4 | 3-4 |6869### Backend Agents (min 2 when backend in scope, split by concern)70711. **Domain & data flow** - `explore-codebase`: "Find entities, repository interfaces, value objects, and DTOs related to [feature] in backend/internal/domain/ and backend/internal/application/dto/"722. **Usecases & business logic** - `explore-codebase`: "Find usecases related to [feature] in backend/internal/application/usecases/. Read their Execute methods, dependencies, and error handling"733. **Handlers & routing** - `explore-codebase`: "Find HTTP handlers and routes related to [feature] in backend/internal/presentation/. Check middleware, validation, response patterns"744. **Infrastructure & services** - `explore-codebase`: "Find repo implementations, external service adapters, and config related to [feature] in backend/internal/infrastructure/"755. **Similar patterns** - `explore-codebase`: "Find the most similar existing feature to [feature] in backend/. I need to replicate its patterns"7677### Frontend Agents (min 2 when frontend in scope, split by concern)78791. **Components & UI** - `explore-codebase`: "Find components related to [feature] in frontend/src/components/. Check props, state, Shadcn UI usage"802. **Hooks & state** - `explore-codebase`: "Find hooks, React Query calls, and state management related to [feature] in frontend/src/hooks/ and frontend/src/lib/"813. **Pages & routing** - `explore-codebase`: "Find pages and layouts related to [feature] in frontend/src/app/. Check route structure, data fetching, i18n"824. **Types & API layer** - `explore-codebase`: "Find TypeScript types, API client functions related to [feature] in frontend/src/types/ and frontend/src/lib/"835. **Similar patterns** - `explore-codebase`: "Find the most similar existing feature to [feature] in frontend/src/. I need to replicate its patterns"8485### Supporting Agents (as needed, 1 each)8687| Need | Agent | Prompt |88|------|-------|--------|89| Database | explore-db | "dev - Find tables related to [feature], check schema, relationships, RLS policies" |90| Library docs | explore-docs | "[library] [specific feature] documentation" |91| Best practices | websearch | "[topic] best practices 2025 2026" |9293---9495## 2.5 POST-EXPLORATION CHECK9697After agents return, verify coverage across **all dimensions**:98991. **Full code path traced?** Can I trace handler -> usecase -> repository -> DB (backend) and page -> hook -> API -> component (frontend)? If gaps -> launch targeted `explore-codebase`1002. **Similar patterns identified?** Do I have a reference implementation to follow? If not -> launch `explore-codebase`1013. **Data model complete?** Tables, columns, relationships, RLS known? If not -> launch `explore-db`1024. **Library docs sufficient?** If not -> launch `explore-docs`103104Do NOT proceed with incomplete context.105106107---108109## 3. VALIDATE ARCHITECTURE110111Display architecture plan:112113```markdown114## Architecture Plan - [Feature Name]115116### Database117- Tables to create: [list with columns]118- Tables to modify: [changes]119- RLS policies needed120121### Backend (Go Clean Architecture)122- Entities: [list]123- Usecases: [list with descriptions]124- Handlers: [endpoints]125- Code to reuse: [from exploration]126127### Frontend (Next.js)128- Types, Components, Hooks, Pages129- Code to reuse: [from exploration]130131### Libraries / Best Practices132- [from exploration]133```134135Ask with AskUserQuestion: "Validate this architecture?"136- "Validate"137- "Modify"138139---140141## 4. WRITE SPEC FILE142143After validation, write complete spec to `docs/plan-features/{$ARGUMENTS.name}_FEATURE.md`.144145Use the template structure from [templates/feature-spec-template.md](templates/feature-spec-template.md).146147Structure:1481. Overview (objective, summary, tech stack)1492. Context and Motivation1503. Functional Specifications (detailed behavior, rules, edge cases)1514. Technical Architecture (existing files to modify, new files to create)1525. Configuration (`app.yaml` for thresholds, limits, feature flags - NO hardcoded values)1536. Database (migrations, columns, RLS policies)1547. Backend Implementation (phases: Domain -> Infrastructure -> Application -> Presentation)1558. Frontend Implementation (phases: Types/API -> Hooks -> Components -> Pages)1569. Execution Plan (checkboxes for each task)15710. Important Notes (compatibility, performance, security)158159### Backend Phase Rules160- Order: Domain -> Infrastructure -> Application -> Presentation161- Max 5 items per phase - split if more162- Separate CRUD usecases from business logic usecases163- Each phase must compile independently164165---166167## 5. DELIVER168169- Confirm file created170- Summarize the phases171- Indicate next steps:172 - `/dev spec=docs/plan-features/[name]_FEATURE.md phase=1`173 - `/dev spec=docs/plan-features/[name]_FEATURE.md phase=8`174175---176177## Rules178179- **EXPLORE FIRST** - parallel exploration before the plan180- **CONTEXT IS KEY** - spec must be detailed enough for a new session181- **VALIDATE** - user validation before writing spec182- **CHECKBOXES** - execution plan with checkboxes to track progress183184---185> Source: [Aurealibe/claude-config](https://github.com/Aurealibe/claude-config) — distributed by [TomeVault](https://tomevault.io).186<!-- tomevault:4.0:skill_md:2026-07-03 -->