ideabox 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,173 @@
1
+ # Phase 01: Research
2
+
3
+ Research project ideas from multiple data sources using parallel subagents. Present scored, evidence-backed ideas for the user to pick from.
4
+
5
+ ## Prerequisites
6
+
7
+ - Read `~/.ideabox/profile.json` — if missing, invoke the `ideabox:profile` skill for setup, then continue
8
+ - Read `~/.ideabox/ideas.jsonl` (if exists) — load dismissed and built idea IDs for deduplication
9
+
10
+ ## Step 0: Load Self-Improvement Data
11
+
12
+ Read `${CLAUDE_SKILL_DIR}/references/self-improvement.md` for the full self-improvement engine specification, then load adaptive data:
13
+
14
+ 1. **Source quality** — read `~/.ideabox/source-quality.jsonl` (if exists, 5+ entries). Compute source scores. Allocate more queries to high-quality sources, reduce queries for low-quality sources.
15
+ 2. **Scoring weights** — read `~/.ideabox/scoring-feedback.jsonl` (if exists, 10+ outcomes). Compute adapted dimension weights. If insufficient data, use default equal weights (1.0 each).
16
+ 3. **Query evolution** — read `~/.ideabox/query-performance.jsonl` (if exists). Build the active query set: drop RETIRED queries, add variations for PRODUCTIVE queries. If no data, use default queries from `${CLAUDE_SKILL_DIR}/references/research-sources.md`.
17
+
18
+ If any self-improvement file doesn't exist or has insufficient data, use defaults silently — no error messages for new users.
19
+
20
+ ## Step 1: Launch Parallel Research Subagents
21
+
22
+ Announce: "Researching project ideas across 6 source categories..."
23
+
24
+ **Rate limiting note:** Reddit JSON endpoints may return 429 if hit too aggressively. GitHub API allows 60 req/hr unauthenticated (5000 with `gh` CLI). HN Algolia has no documented limit. If any API returns an error, the subagent should note the failure and continue with available data — never retry in a loop.
25
+
26
+ Launch these 6 subagents in parallel using the Agent tool. Each subagent searches its category and returns structured findings.
27
+
28
+ **Subagent 1 — Agentic AI Ecosystem (PRIORITY):**
29
+ "Research the agentic AI ecosystem for project opportunities. Use WebSearch to find:
30
+ - Gaps in AI agent frameworks (LangChain, CrewAI, AutoGen, Claude Agent SDK, OpenAI Agents SDK)
31
+ - Missing or requested MCP servers
32
+ - Claude Code plugin ideas and feature requests
33
+ - AI coding tool extension gaps (Cursor, Windsurf, Cline)
34
+ Also use WebFetch on `https://hn.algolia.com/api/v1/search_by_date?tags=story&query=MCP+agent+framework&numericFilters=points%3E20` for trending HN posts about agents.
35
+ Return a JSON array of findings. Each finding: {source_category: 'agentic_ai', source_url: '...', signal_type: 'gap|complaint|trend|revenue', title: '...', description: '...', evidence: '...', demand_score: 1-10}"
36
+
37
+ **Subagent 2 — Developer Pain Points:**
38
+ "Search for developer complaints and unmet needs. Use WebFetch on:
39
+ - `https://www.reddit.com/r/webdev/top.json?t=week&limit=25`
40
+ - `https://www.reddit.com/r/selfhosted/top.json?t=week&limit=25`
41
+ - `https://www.reddit.com/r/SideProject/top.json?t=week&limit=25`
42
+ - `https://hn.algolia.com/api/v1/search_by_date?tags=ask_hn&numericFilters=points%3E30`
43
+ Look for 'I wish this existed', unresolved problems, and repeated complaints.
44
+ Return JSON array of findings with: source_category: 'developer_pain_points', source_url, signal_type, title, description, evidence, demand_score."
45
+
46
+ **Subagent 3 — Trending Projects:**
47
+ "Find projects gaining rapid traction. Use WebSearch for 'github trending developer tools this week'. Use WebFetch on:
48
+ - `https://hn.algolia.com/api/v1/search_by_date?tags=show_hn&numericFilters=points%3E50`
49
+ Identify patterns in what's trending and gaps adjacent to trending projects.
50
+ Return JSON array with: source_category: 'trending', source_url, signal_type, title, description, evidence, demand_score."
51
+
52
+ **Subagent 4 — Indie Hacker & Monetization:**
53
+ "Search for revenue-generating developer tool projects and validated business models. Use WebSearch for 'indie hacker developer tool revenue 2026', 'micro SaaS making money 2026'. Use WebFetch on:
54
+ - `https://www.reddit.com/r/indiehackers/top.json?t=month&limit=25`
55
+ Focus on projects making $1K-50K MRR and pricing models that work.
56
+ Return JSON array with: source_category: 'indie_hacker', source_url, signal_type, title, description, evidence, demand_score."
57
+
58
+ **Subagent 5 — Package & Plugin Ecosystem:**
59
+ "Search for gaps in npm packages, Claude Code plugins, and MCP servers. Use WebSearch for 'Claude Code plugin marketplace', 'missing MCP servers', 'npm trending new packages'. Use WebFetch on `https://registry.npmjs.org/-/v1/search?text=claude-code-plugin&size=20`.
60
+ Return JSON array with: source_category: 'packages', source_url, signal_type, title, description, evidence, demand_score."
61
+
62
+ **Subagent 6 — User's GitHub Profile:**
63
+ "Fetch the GitHub profile for {profile.github_username}. Use WebFetch on `https://api.github.com/users/{username}/repos?sort=updated&per_page=30`. Extract primary languages, frameworks, project types, and notable repos with star counts.
64
+ Return a JSON object: {languages: [...], frameworks: [...], project_types: [...], notable_repos: [{name, stars, description}]}"
65
+
66
+ ## Step 2: Score & Filter
67
+
68
+ Once all subagents return:
69
+
70
+ 1. **Merge** all findings into a single list
71
+ 2. **Synthesize** — look for ideas that combine signals from multiple findings (same gap from different sources = one stronger idea, not two weak ones)
72
+ 3. **Cross-reference bonus** — ideas appearing across 2+ sources get +2 demand signal; 3+ sources get +3 (capped at 10)
73
+ 4. **Apply agentic AI bonus** — ideas in agentic AI / MCP / AI tooling space get +2 trend momentum (capped at 10)
74
+ 5. **Filter history** — load dismissed/built ideas from `~/.ideabox/ideas.jsonl`, remove ideas with >70% title+problem similarity
75
+ 6. **Filter avoid topics** — remove ideas matching `profile.avoid_topics`
76
+ 7. **Score each idea** — read `${CLAUDE_SKILL_DIR}/references/scoring-rubric.md` and apply:
77
+ - Rate each of 6 dimensions 1-10
78
+ - Hard filter: must pass monetization gate OR open-source impact gate
79
+ - Apply adapted scoring weights from Step 0 (if available). Multiply each dimension score by its weight before summing.
80
+ - If using adapted weights, show them: "Scoring with adapted weights: Revenue 1.2x, Demand 1.3x, ..."
81
+ - Compute weighted total
82
+ 8. **Filter** — remove ideas scoring below 25 (adjusted for weight changes)
83
+ 9. **Rank** — sort by total score descending
84
+ 10. **Update profile stacks** — if GitHub subagent returned language data, update `~/.ideabox/profile.json` stacks field
85
+ 11. **Record query performance** — for each subagent's queries, append to `~/.ideabox/query-performance.jsonl`: query text, results count, useful results count, contributed to any presented idea
86
+
87
+ ## Step 3: Demand Validation
88
+
89
+ For each top idea, mentally verify these forcing questions (from YC office hours methodology):
90
+
91
+ 1. **Demand Reality:** What concrete evidence exists that someone wants this? (not interest — actual demand)
92
+ 2. **Status Quo:** What are people doing now, even badly?
93
+ 3. **Desperate Specificity:** Who exactly needs this? (their role, what gets them promoted/fired)
94
+ 4. **Narrowest Wedge:** What's the smallest version someone would pay for this week?
95
+
96
+ If an idea fails all 4 questions, demote it regardless of score.
97
+
98
+ ## Step 4: Research Coverage Stats
99
+
100
+ Before presenting ideas, show a research stats block so the user knows what was searched:
101
+
102
+ ```
103
+ ## Research Coverage
104
+
105
+ | Source | Items Found | Top Signal |
106
+ |--------|------------|------------|
107
+ | HN (Algolia) | N stories | "{highest-scored title}" |
108
+ | GitHub Search | N repos | "{top repo}" |
109
+ | Reddit (r/webdev, r/SideProject) | N threads | "{top thread}" |
110
+ | npm Registry | N packages | "{trending package}" |
111
+ | Agentic AI ecosystem | N gaps found | "{top gap}" |
112
+ | GitHub Profile | N repos analyzed | Primary: {languages} |
113
+
114
+ **Total signals:** N findings across M sources
115
+ **Cross-source matches:** N ideas appeared in 2+ sources
116
+ **Filtered out:** N ideas (previously dismissed or built)
117
+ **Confidence:** HIGH / MEDIUM / LOW (based on source coverage)
118
+ ```
119
+
120
+ ## Step 5: Auto-Save Research History
121
+
122
+ Save the full research results to `~/.ideabox/research/YYYY-MM-DD-HHMMSS.md` (create directory if needed). This builds a searchable research history for trend detection over time.
123
+
124
+ Include: all findings, scores, sources searched, and timestamp. If previous research exists from the past 30 days, briefly note any trends ("MCP testing tools appeared in 3 of your last 5 research sessions — demand is persistent").
125
+
126
+ ## Step 6: Present Top Ideas
127
+
128
+ Present 3-5 ideas using the output format from `${CLAUDE_SKILL_DIR}/references/scoring-rubric.md`.
129
+
130
+ Then ask:
131
+ "Pick an idea number to brainstorm and build, or:
132
+ - `save N` to save idea #N for later
133
+ - `dismiss N` to dismiss idea #N
134
+ - `more` for additional ideas
135
+ - `done` to finish browsing"
136
+
137
+ ## Step 7: Handle User Choice
138
+
139
+ **If user picks an idea to build:**
140
+ 1. Append the full idea record to `~/.ideabox/ideas.jsonl` with status "planned"
141
+ 2. Update `.ideabox/state.json`:
142
+ - Set `idea` field with id, title, problem
143
+ - Set `current_phase` to "02-brainstorm"
144
+ - Add "01-research" to `phases_completed`
145
+ - Set `artifacts.research` to `.ideabox/session/01-research.md`
146
+ 3. Write research summary to `.ideabox/session/01-research.md` (idea details + evidence + scores)
147
+ 4. Do NOT log to sessions.jsonl here — Phase 09 (Learn) handles the final session log with complete outcome data
148
+ 5. Proceed to Phase 02
149
+
150
+ **If user saves/dismisses:**
151
+ - Append to `~/.ideabox/ideas.jsonl` with appropriate status
152
+ - Continue presenting or ask for next action
153
+
154
+ **If user wants more:**
155
+ - Present next 3-5 ideas from ranked list
156
+
157
+ **If user says done:**
158
+ - Log session to `~/.ideabox/sessions.jsonl`
159
+ - Append all presented-but-not-acted-on ideas to `ideas.jsonl` with status "suggested"
160
+ - End phase
161
+
162
+ ## Gate Condition
163
+
164
+ Phase 01 passes when: >=3 ideas have been presented with >=3 evidence sources each AND user has picked one idea to build.
165
+
166
+ ## Preferences Tracking
167
+
168
+ Append to `~/.ideabox/preferences.jsonl` for each user action:
169
+ ```json
170
+ {"ts":"{ISO}","event":"suggested","idea_id":"{id}","category":"{cat}","complexity":"{complexity}","monetization":"{model}"}
171
+ {"ts":"{ISO}","event":"accepted","idea_id":"{id}"}
172
+ {"ts":"{ISO}","event":"dismissed","idea_id":"{id}"}
173
+ ```
@@ -0,0 +1,213 @@
1
+ # Phase 02: Brainstorm
2
+
3
+ Refine the chosen idea into a full design spec through collaborative dialogue.
4
+
5
+ ## HARD GATE
6
+
7
+ Do NOT write any code, scaffold any project, or take any implementation action until the design is presented and user-approved. This applies regardless of perceived simplicity.
8
+
9
+ ## Prerequisites
10
+
11
+ Read `.ideabox/session/01-research.md` for the chosen idea's details: problem statement, evidence, target users, monetization angle, tech stack suggestions, and score.
12
+
13
+ ## Step 1: Explore Context
14
+
15
+ - Check the current project directory for existing code, docs, recent commits
16
+ - If this is a new project (no existing code), note that the brainstorm should include project structure decisions
17
+ - If adding to an existing project, follow existing patterns
18
+
19
+ ## Step 2: Scope Check
20
+
21
+ If the idea describes multiple independent subsystems (e.g., "build a platform with chat, file storage, billing, and analytics"):
22
+ - Flag this immediately
23
+ - Help decompose into sub-projects
24
+ - Each sub-project gets its own spec -> plan -> build cycle
25
+ - Brainstorm the first sub-project through this process
26
+
27
+ ## Step 3: Ambiguity Scoring (Deep-Interview Validation)
28
+
29
+ Before diving into detailed questions, score the idea's clarity across 4 dimensions:
30
+
31
+ | Dimension | Weight | Score 1-10 | What to assess |
32
+ |-----------|--------|-----------|----------------|
33
+ | Problem Clarity | 35% | ? | Is the problem specific? Who exactly has it? |
34
+ | Target User Clarity | 25% | ? | Can you name the job title? What gets them promoted/fired? |
35
+ | MVP Scope Clarity | 25% | ? | Is the smallest viable version defined? |
36
+ | Monetization Clarity | 15% | ? | Is the revenue model specific with pricing precedent? |
37
+
38
+ **Ambiguity Score** = weighted average. Present it:
39
+ ```
40
+ Ambiguity Check: Problem 7/10 | User 5/10 | Scope 4/10 | Revenue 8/10 | Overall: 5.9/10
41
+ ```
42
+
43
+ **If overall < 6/10:** Focus clarifying questions on the lowest-scoring dimensions. "Your idea's scope is still vague — let me ask a few questions to sharpen it."
44
+
45
+ **If overall >= 8/10:** Skip most clarifying questions, proceed directly to approaches.
46
+
47
+ ### Assumption Challenges
48
+
49
+ After 3-4 clarifying questions, inject one challenge question:
50
+ - **Contrarian:** "What if nobody pays for this? What would you do differently?"
51
+ - **Simplifier:** "Can this be cut to a weekend MVP? What's the absolute minimum?"
52
+ - **Status quo:** "Why wouldn't someone just use [existing tool] instead?"
53
+
54
+ These prevent echo-chamber thinking. Ask ONE challenge, not all three.
55
+
56
+ ## Step 4: Clarifying Questions
57
+
58
+ Ask questions ONE AT A TIME to refine the idea. Rules:
59
+
60
+ - **One question per message** — never overwhelm with multiple questions
61
+ - **Prefer multiple choice** — easier to answer than open-ended
62
+ - **Focus on:** purpose, constraints, success criteria, user experience, technical boundaries
63
+ - **Stop asking when** you have enough clarity to propose approaches (usually 3-5 questions)
64
+
65
+ Good questions for a project idea:
66
+ - "Who is the primary user — developers using it daily, or occasional users?"
67
+ - "What's the MVP scope — which features are essential for v1?"
68
+ - "Any technical constraints? (hosting, budget, specific stack requirements)"
69
+ - "What does success look like in 2 weeks? In 3 months?"
70
+
71
+ ## Step 5: Propose 2-3 Approaches
72
+
73
+ Present 2-3 different approaches with trade-offs:
74
+
75
+ ```
76
+ ### Approach A: [Name] (Recommended)
77
+ [Description, architecture, key decisions]
78
+ **Pros:** ...
79
+ **Cons:** ...
80
+ **Effort:** Weekend MVP / 1-week / Multi-week
81
+
82
+ ### Approach B: [Name]
83
+ [Description, architecture, key decisions]
84
+ **Pros:** ...
85
+ **Cons:** ...
86
+ **Effort:** ...
87
+
88
+ ### Approach C: [Name] (if applicable)
89
+ ...
90
+ ```
91
+
92
+ Lead with your recommendation and explain why. Consider:
93
+ - The user's tech stack from their profile
94
+ - The monetization angle from research
95
+ - The complexity vs. impact trade-off
96
+ - YAGNI — remove unnecessary features ruthlessly
97
+
98
+ ## Step 6: Present Design
99
+
100
+ Once the user picks an approach (or you converge on one), present the design section by section:
101
+
102
+ - Scale each section to its complexity (a few sentences if straightforward, up to 200-300 words if nuanced)
103
+ - Ask after each section: "Does this look right so far?"
104
+ - Be ready to go back and revise
105
+
106
+ **Sections to cover:**
107
+ 1. **Overview** — what it does, who it's for, one-paragraph summary
108
+ 2. **Architecture** — high-level structure, key components, data flow
109
+ 3. **Core Features** — MVP feature list (YAGNI: only what's needed for v1)
110
+ 4. **Tech Stack** — recommended stack with reasoning
111
+ 5. **Data Model** — key entities and relationships (if applicable)
112
+ 6. **API / Interface** — how users interact with it
113
+ 7. **Monetization** — specific revenue model from research, pricing strategy
114
+ 8. **Success Criteria** — measurable outcomes for v1
115
+
116
+ ### Design for Isolation and Clarity
117
+ - Break the system into smaller units with one clear purpose each
118
+ - Each unit: clear interfaces, independently testable, understandable without reading internals
119
+ - Prefer smaller, focused files — you reason better about code you can hold in context
120
+
121
+ ## Step 7: Spec Self-Review
122
+
123
+ After presenting the complete design, review it with fresh eyes:
124
+
125
+ 1. **Placeholder scan:** Any "TBD", "TODO", incomplete sections, vague requirements? Fix them.
126
+ 2. **Internal consistency:** Do sections contradict each other? Does architecture match features?
127
+ 3. **Scope check:** Focused enough for a single implementation plan?
128
+ 4. **Ambiguity check:** Could any requirement be interpreted two ways? Pick one, make it explicit.
129
+
130
+ Fix any issues inline. No need to re-review — just fix and move on.
131
+
132
+ ## Step 8: Write Spec Document
133
+
134
+ Save the validated design to `.ideabox/session/02-brainstorm-spec.md`:
135
+
136
+ ```markdown
137
+ # [Project Name] Design Spec
138
+
139
+ **Date:** {today}
140
+ **Idea Score:** {score}/60
141
+ **Target Users:** {who}
142
+ **Monetization:** {model}
143
+
144
+ ## Problem
145
+ {one paragraph}
146
+
147
+ ## Solution
148
+ {one paragraph}
149
+
150
+ ## Architecture
151
+ {description + component diagram if helpful}
152
+
153
+ ## Core Features (MVP)
154
+ {numbered list}
155
+
156
+ ## Tech Stack
157
+ {stack with reasoning}
158
+
159
+ ## Data Model
160
+ {entities and relationships}
161
+
162
+ ## Success Criteria
163
+ {measurable outcomes}
164
+ ```
165
+
166
+ ## Step 9: Write Handoff Document
167
+
168
+ Save a structured handoff to `.ideabox/session/02-handoff.md`:
169
+
170
+ ```markdown
171
+ # Phase 02 Handoff: Brainstorm -> Plan
172
+
173
+ ## Decisions Made
174
+ - [list key design decisions with reasoning]
175
+
176
+ ## Alternatives Rejected
177
+ - [list approaches considered but not chosen, with why]
178
+
179
+ ## Risks Identified
180
+ - [list risks that the plan/build phases should watch for]
181
+
182
+ ## Ambiguity Score (Final)
183
+ - Problem: X/10 | User: X/10 | Scope: X/10 | Revenue: X/10 | Overall: X/10
184
+
185
+ ## Next Phase Needs
186
+ - [what the planning phase should focus on]
187
+ ```
188
+
189
+ ## Step 10: User Review Gate
190
+
191
+ Ask: "Spec written to `.ideabox/session/02-brainstorm-spec.md`. Please review — any changes before we plan the implementation?"
192
+
193
+ Wait for user response. If changes requested, make them and re-run self-review. Only proceed once approved.
194
+
195
+ ## Step 11: Update State
196
+
197
+ Update `.ideabox/state.json`:
198
+ - Add "02-brainstorm" to `phases_completed`
199
+ - Set `current_phase` to "03-plan"
200
+ - Set `artifacts.brainstorm` to `.ideabox/session/02-brainstorm-spec.md`
201
+
202
+ ## Gate Condition
203
+
204
+ Phase 02 passes when: spec document is written, self-reviewed (no placeholders, no ambiguity), and user-approved.
205
+
206
+ ## Key Principles
207
+
208
+ - **One question at a time** — don't overwhelm
209
+ - **Multiple choice preferred** — easier to answer
210
+ - **YAGNI ruthlessly** — cut unnecessary features
211
+ - **Always 2-3 approaches** — never settle without exploring alternatives
212
+ - **Incremental validation** — present sections, get approval, move on
213
+ - **Design before code** — the HARD GATE is absolute
@@ -0,0 +1,166 @@
1
+ # Phase 03: Plan
2
+
3
+ Create a comprehensive implementation plan from the approved spec.
4
+
5
+ ## Prerequisites
6
+
7
+ Read `.ideabox/session/02-brainstorm-spec.md` for the approved design spec.
8
+
9
+ ## Philosophy
10
+
11
+ Write the plan assuming the engineer has zero context and questionable taste. Document everything: which files to touch, code examples, test commands, expected output. Bite-sized tasks. DRY. YAGNI. TDD. Frequent commits.
12
+
13
+ ## Step 1: Scope Check
14
+
15
+ If the spec covers multiple independent subsystems, suggest breaking into separate plans — one per subsystem. Each plan should produce working, testable software on its own.
16
+
17
+ ## Step 2: Map File Structure
18
+
19
+ Before defining tasks, map out which files will be created or modified:
20
+
21
+ - Design units with clear boundaries and well-defined interfaces
22
+ - Each file should have one clear responsibility
23
+ - Prefer smaller, focused files over large ones
24
+ - Files that change together should live together
25
+ - In existing codebases, follow established patterns
26
+
27
+ Document this structure at the top of the plan.
28
+
29
+ ## Step 3: Define Tasks
30
+
31
+ Each task follows this structure:
32
+
33
+ ```markdown
34
+ ### Task N: [Component Name]
35
+
36
+ **Files:**
37
+ - Create: `exact/path/to/file.ext`
38
+ - Modify: `exact/path/to/existing.ext`
39
+ - Test: `tests/exact/path/to/test.ext`
40
+
41
+ - [ ] **Step 1: Write the failing test**
42
+ [actual test code in a code block]
43
+
44
+ - [ ] **Step 2: Run test to verify it fails**
45
+ Run: `[exact command]`
46
+ Expected: FAIL with "[expected error]"
47
+
48
+ - [ ] **Step 3: Write minimal implementation**
49
+ [actual implementation code in a code block]
50
+
51
+ - [ ] **Step 4: Run test to verify it passes**
52
+ Run: `[exact command]`
53
+ Expected: PASS
54
+
55
+ - [ ] **Step 5: Commit**
56
+ ```bash
57
+ git add [specific files]
58
+ git commit -m "[descriptive message]"
59
+ ```
60
+ ```
61
+
62
+ ### Bite-Sized Granularity
63
+
64
+ Each step is ONE action (2-5 minutes):
65
+ - "Write the failing test" — one step
66
+ - "Run it to make sure it fails" — one step
67
+ - "Implement the minimal code" — one step
68
+ - "Run tests to verify" — one step
69
+ - "Commit" — one step
70
+
71
+ ### No Placeholders — These Are Plan Failures
72
+
73
+ NEVER write any of these:
74
+ - "TBD", "TODO", "implement later", "fill in details"
75
+ - "Add appropriate error handling" / "add validation" / "handle edge cases"
76
+ - "Write tests for the above" (without actual test code)
77
+ - "Similar to Task N" (repeat the code — tasks may be read out of order)
78
+ - Steps that describe what to do without showing how
79
+ - References to types, functions, or methods not defined in any task
80
+
81
+ Every step must contain the actual content an engineer needs.
82
+
83
+ ## Step 4: Write Plan Document
84
+
85
+ Save the complete plan to `.ideabox/session/03-plan.md`:
86
+
87
+ ```markdown
88
+ # [Project Name] Implementation Plan
89
+
90
+ **Goal:** [One sentence]
91
+ **Architecture:** [2-3 sentences]
92
+ **Tech Stack:** [Key technologies]
93
+
94
+ ---
95
+
96
+ ## File Structure
97
+ [mapped structure from Step 2]
98
+
99
+ ---
100
+
101
+ ### Task 1: [Component]
102
+ [full task with steps, code, commands]
103
+
104
+ ### Task 2: [Component]
105
+ ...
106
+ ```
107
+
108
+ ## Step 5: Plan Self-Review
109
+
110
+ After writing the complete plan, review it:
111
+
112
+ 1. **Spec coverage:** Skim each section in the spec. Can you point to a task that implements it? List any gaps.
113
+ 2. **Placeholder scan:** Search for "TBD", "TODO", "appropriate", "similar to", "handle edge cases". Fix any found.
114
+ 3. **Type consistency:** Do types, method signatures, and property names match across tasks? A function called `clearLayers()` in Task 3 but `clearFullLayers()` in Task 7 is a bug.
115
+
116
+ If issues found, fix inline. If a spec requirement has no task, add the task.
117
+
118
+ ## Step 6: User Review Gate
119
+
120
+ Present the plan to the user:
121
+ "Plan written to `.ideabox/session/03-plan.md` with {N} tasks. Review it — any changes before we start building?"
122
+
123
+ Wait for approval.
124
+
125
+ ## Step 7: Execution Handoff
126
+
127
+ After plan is approved, offer execution choice:
128
+
129
+ "Two execution options:
130
+ 1. **Subagent-Driven (recommended)** — I dispatch a fresh subagent per task with two-stage review (spec compliance then code quality). Higher quality, faster iteration.
131
+ 2. **Inline Execution** — I execute tasks sequentially in this session with verification checkpoints.
132
+
133
+ Which approach?"
134
+
135
+ ## Step 8: Write Plan Handoff
136
+
137
+ Save a structured handoff to `.ideabox/session/03-handoff.md`:
138
+
139
+ ```markdown
140
+ # Phase 03 Handoff: Plan -> Build
141
+
142
+ ## Plan Summary
143
+ - {N} tasks defined
144
+ - Estimated complexity: {weekend/1-week/multi-week}
145
+ - Key architectural decisions: [list]
146
+
147
+ ## Execution Recommendation
148
+ - {Subagent-driven or Inline} because {reason}
149
+
150
+ ## Risks for Build Phase
151
+ - [potential blockers or tricky areas]
152
+
153
+ ## Dependencies
154
+ - [external packages, APIs, or services needed]
155
+ ```
156
+
157
+ ## Step 9: Update State
158
+
159
+ Update `.ideabox/state.json`:
160
+ - Add "03-plan" to `phases_completed`
161
+ - Set `current_phase` to "04-build"
162
+ - Set `artifacts.plan` to `.ideabox/session/03-plan.md`
163
+
164
+ ## Gate Condition
165
+
166
+ Phase 03 passes when: plan document is written, self-review passes (no placeholders, full spec coverage, type consistency), and user approves.