aiblueprint-cli 1.4.22 → 1.4.24

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.
Files changed (90) hide show
  1. package/claude-code-config/skills/git-commit/SKILL.md +42 -0
  2. package/claude-code-config/{commands/git/create-pr.md → skills/git-create-pr/SKILL.md} +12 -18
  3. package/claude-code-config/skills/git-fix-pr-comments/SKILL.md +51 -0
  4. package/claude-code-config/skills/git-merge/SKILL.md +68 -0
  5. package/claude-code-config/skills/{claude-memory → meta-claude-memory}/SKILL.md +7 -2
  6. package/claude-code-config/skills/meta-claude-memory/references/rules-directory-guide.md +298 -0
  7. package/claude-code-config/skills/meta-prompt-creator/SKILL.md +285 -0
  8. package/claude-code-config/skills/meta-prompt-creator/references/anthropic-best-practices.md +126 -0
  9. package/claude-code-config/skills/meta-prompt-creator/references/anti-patterns.md +57 -0
  10. package/claude-code-config/skills/meta-prompt-creator/references/clarity-principles.md +54 -0
  11. package/claude-code-config/skills/meta-prompt-creator/references/context-management.md +389 -0
  12. package/claude-code-config/skills/meta-prompt-creator/references/few-shot-patterns.md +47 -0
  13. package/claude-code-config/skills/meta-prompt-creator/references/openai-best-practices.md +50 -0
  14. package/claude-code-config/skills/meta-prompt-creator/references/prompt-templates.md +110 -0
  15. package/claude-code-config/skills/meta-prompt-creator/references/reasoning-techniques.md +52 -0
  16. package/claude-code-config/skills/meta-prompt-creator/references/system-prompt-patterns.md +48 -0
  17. package/claude-code-config/skills/meta-prompt-creator/references/xml-structure.md +36 -0
  18. package/claude-code-config/skills/meta-skill-creator/LICENSE.txt +202 -0
  19. package/claude-code-config/skills/meta-skill-creator/SKILL.md +421 -0
  20. package/claude-code-config/skills/meta-skill-creator/package.json +5 -0
  21. package/claude-code-config/skills/meta-skill-creator/references/output-patterns.md +82 -0
  22. package/claude-code-config/skills/meta-skill-creator/references/progressive-disclosure-patterns.md +374 -0
  23. package/claude-code-config/skills/meta-skill-creator/references/prompting-integration.md +363 -0
  24. package/claude-code-config/skills/meta-skill-creator/references/real-world-examples.md +513 -0
  25. package/claude-code-config/skills/meta-skill-creator/references/script-patterns.md +385 -0
  26. package/claude-code-config/skills/meta-skill-creator/references/workflows.md +28 -0
  27. package/claude-code-config/skills/meta-skill-creator/references/xml-tag-guide.md +606 -0
  28. package/claude-code-config/skills/meta-skill-creator/scripts/init-skill.ts +214 -0
  29. package/claude-code-config/skills/meta-skill-creator/scripts/package-skill.ts +146 -0
  30. package/claude-code-config/skills/meta-skill-creator/scripts/validate.ts +138 -0
  31. package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/SKILL.md +41 -15
  32. package/claude-code-config/skills/{setup-ralph → ralph-loop}/steps/step-00-init.md +2 -3
  33. package/claude-code-config/skills/utils-fix-errors/SKILL.md +61 -0
  34. package/claude-code-config/skills/utils-fix-grammar/SKILL.md +59 -0
  35. package/claude-code-config/skills/utils-oneshot/SKILL.md +56 -0
  36. package/claude-code-config/skills/workflow-apex/SKILL.md +303 -0
  37. package/claude-code-config/skills/workflow-apex/scripts/setup-templates.sh +134 -0
  38. package/claude-code-config/skills/workflow-apex/scripts/update-progress.sh +80 -0
  39. package/claude-code-config/skills/workflow-apex/steps/step-00-init.md +288 -0
  40. package/claude-code-config/skills/workflow-apex/steps/step-00b-branch.md +126 -0
  41. package/claude-code-config/skills/workflow-apex/steps/step-00b-economy.md +244 -0
  42. package/claude-code-config/skills/workflow-apex/steps/step-00b-interactive.md +153 -0
  43. package/claude-code-config/skills/workflow-apex/steps/step-01-analyze.md +361 -0
  44. package/claude-code-config/skills/workflow-apex/steps/step-02-plan.md +264 -0
  45. package/claude-code-config/skills/workflow-apex/steps/step-03-execute.md +239 -0
  46. package/claude-code-config/skills/workflow-apex/steps/step-04-validate.md +264 -0
  47. package/claude-code-config/skills/workflow-apex/steps/step-05-examine.md +294 -0
  48. package/claude-code-config/skills/workflow-apex/steps/step-06-resolve.md +237 -0
  49. package/claude-code-config/skills/workflow-apex/steps/step-07-tests.md +250 -0
  50. package/claude-code-config/skills/workflow-apex/steps/step-08-run-tests.md +308 -0
  51. package/claude-code-config/skills/workflow-apex/steps/step-09-finish.md +193 -0
  52. package/claude-code-config/skills/workflow-apex/templates/00-context.md +51 -0
  53. package/claude-code-config/skills/workflow-apex/templates/01-analyze.md +10 -0
  54. package/claude-code-config/skills/workflow-apex/templates/02-plan.md +10 -0
  55. package/claude-code-config/skills/workflow-apex/templates/03-execute.md +10 -0
  56. package/claude-code-config/skills/workflow-apex/templates/04-validate.md +10 -0
  57. package/claude-code-config/skills/workflow-apex/templates/05-examine.md +10 -0
  58. package/claude-code-config/skills/workflow-apex/templates/06-resolve.md +10 -0
  59. package/claude-code-config/skills/workflow-apex/templates/07-tests.md +10 -0
  60. package/claude-code-config/skills/workflow-apex/templates/08-run-tests.md +10 -0
  61. package/claude-code-config/skills/workflow-apex/templates/09-finish.md +10 -0
  62. package/claude-code-config/skills/workflow-apex/templates/README.md +195 -0
  63. package/claude-code-config/skills/workflow-apex/templates/step-complete.md +7 -0
  64. package/dist/cli.js +46 -3
  65. package/package.json +1 -1
  66. package/claude-code-config/commands/explore.md +0 -90
  67. package/claude-code-config/commands/git/commit.md +0 -60
  68. package/claude-code-config/commands/git/fix-pr-comments.md +0 -59
  69. package/claude-code-config/commands/oneshot.md +0 -57
  70. package/claude-code-config/skills/create-slash-commands/SKILL.md +0 -1110
  71. package/claude-code-config/skills/create-slash-commands/references/arguments.md +0 -273
  72. package/claude-code-config/skills/create-slash-commands/references/patterns.md +0 -947
  73. package/claude-code-config/skills/create-slash-commands/references/prompt-examples.md +0 -656
  74. package/claude-code-config/skills/create-slash-commands/references/tool-restrictions.md +0 -389
  75. /package/claude-code-config/skills/{claude-memory → meta-claude-memory}/references/comprehensive-example.md +0 -0
  76. /package/claude-code-config/skills/{claude-memory → meta-claude-memory}/references/project-patterns.md +0 -0
  77. /package/claude-code-config/skills/{claude-memory → meta-claude-memory}/references/prompting-techniques.md +0 -0
  78. /package/claude-code-config/skills/{claude-memory → meta-claude-memory}/references/section-templates.md +0 -0
  79. /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/context-management.md +0 -0
  80. /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/debugging-agents.md +0 -0
  81. /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/error-handling-and-recovery.md +0 -0
  82. /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/evaluation-and-testing.md +0 -0
  83. /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/orchestration-patterns.md +0 -0
  84. /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/subagents.md +0 -0
  85. /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/writing-subagent-prompts.md +0 -0
  86. /package/claude-code-config/skills/{setup-ralph → ralph-loop}/SKILL.md +0 -0
  87. /package/claude-code-config/skills/{setup-ralph → ralph-loop}/scripts/setup.sh +0 -0
  88. /package/claude-code-config/skills/{setup-ralph → ralph-loop}/steps/step-01-interactive-prd.md +0 -0
  89. /package/claude-code-config/skills/{setup-ralph → ralph-loop}/steps/step-02-create-stories.md +0 -0
  90. /package/claude-code-config/skills/{setup-ralph → ralph-loop}/steps/step-03-finish.md +0 -0
@@ -0,0 +1,153 @@
1
+ ---
2
+ name: step-00b-interactive
3
+ description: Interactively configure APEX workflow flags
4
+ returns_to: step-00-init.md
5
+ ---
6
+
7
+ # Step 0b: Interactive Configuration
8
+
9
+ ## MANDATORY EXECUTION RULES (READ FIRST):
10
+
11
+ - 🛑 NEVER skip the interactive menu
12
+ - 🛑 NEVER assume user preferences
13
+ - ✅ ALWAYS use AskUserQuestion for flag selection
14
+ - ✅ ALWAYS update all flag variables before returning
15
+ - 📋 YOU ARE A CONFIGURATOR, not an implementer
16
+ - 💬 FOCUS on flag configuration only
17
+ - 🚫 FORBIDDEN to start any workflow steps
18
+
19
+ ## CONTEXT BOUNDARIES:
20
+
21
+ - Variables available: All current flag values from step-00-init
22
+ - This sub-step updates: All flag variables based on user selection
23
+ - Return to step-00-init.md after completion
24
+
25
+ ## YOUR TASK:
26
+
27
+ Present an interactive menu for the user to enable/disable workflow flags.
28
+
29
+ ---
30
+
31
+ ## EXECUTION SEQUENCE:
32
+
33
+ ### 1. Display Current Configuration
34
+
35
+ Show current flag values:
36
+ ```
37
+ **Current APEX Configuration:**
38
+
39
+ | Flag | Status | Description |
40
+ |------|--------|-------------|
41
+ | Auto (`-a`) | {auto_mode ? "✓ ON" : "✗ OFF"} | Skip confirmations |
42
+ | Examine (`-x`) | {examine_mode ? "✓ ON" : "✗ OFF"} | Adversarial review |
43
+ | Save (`-s`) | {save_mode ? "✓ ON" : "✗ OFF"} | Save outputs to files |
44
+ | Test (`-t`) | {test_mode ? "✓ ON" : "✗ OFF"} | Include test steps |
45
+ | Economy (`-e`) | {economy_mode ? "✓ ON" : "✗ OFF"} | No subagents |
46
+ | Branch (`-b`) | {branch_mode ? "✓ ON" : "✗ OFF"} | Verify/create branch |
47
+ | PR (`-pr`) | {pr_mode ? "✓ ON" : "✗ OFF"} | Create pull request |
48
+ ```
49
+
50
+ ### 2. Ask for Flag Changes
51
+
52
+ Use AskUserQuestion with multiSelect:
53
+ ```yaml
54
+ questions:
55
+ - header: "Configure"
56
+ question: "Select flags to TOGGLE (currently shown flags will flip their state):"
57
+ options:
58
+ - label: "Auto mode"
59
+ description: "{auto_mode ? 'Disable' : 'Enable'} - skip confirmations"
60
+ - label: "Examine mode"
61
+ description: "{examine_mode ? 'Disable' : 'Enable'} - adversarial review at end"
62
+ - label: "Save mode"
63
+ description: "{save_mode ? 'Disable' : 'Enable'} - save outputs to .claude/output/"
64
+ - label: "Test mode"
65
+ description: "{test_mode ? 'Disable' : 'Enable'} - include test creation/runner"
66
+ multiSelect: true
67
+ ```
68
+
69
+ ### 3. Ask for Additional Flags
70
+
71
+ Use AskUserQuestion with multiSelect:
72
+ ```yaml
73
+ questions:
74
+ - header: "More"
75
+ question: "Select additional flags to TOGGLE:"
76
+ options:
77
+ - label: "Economy mode"
78
+ description: "{economy_mode ? 'Disable' : 'Enable'} - no subagents, save tokens"
79
+ - label: "Branch mode"
80
+ description: "{branch_mode ? 'Disable' : 'Enable'} - verify/create git branch"
81
+ - label: "PR mode"
82
+ description: "{pr_mode ? 'Disable' : 'Enable'} - create pull request at end"
83
+ - label: "Done - keep current"
84
+ description: "No more changes, proceed with workflow"
85
+ multiSelect: true
86
+ ```
87
+
88
+ ### 4. Apply Changes
89
+
90
+ For each selected flag, toggle its value:
91
+ ```
92
+ IF "Auto mode" selected → {auto_mode} = !{auto_mode}
93
+ IF "Examine mode" selected → {examine_mode} = !{examine_mode}
94
+ IF "Save mode" selected → {save_mode} = !{save_mode}
95
+ IF "Test mode" selected → {test_mode} = !{test_mode}
96
+ IF "Economy mode" selected → {economy_mode} = !{economy_mode}
97
+ IF "Branch mode" selected → {branch_mode} = !{branch_mode}
98
+ IF "PR mode" selected → {pr_mode} = !{pr_mode}
99
+ ```
100
+
101
+ **Special rule:** If PR mode enabled, auto-enable branch mode:
102
+ ```
103
+ IF {pr_mode} = true → {branch_mode} = true
104
+ ```
105
+
106
+ ### 5. Show Final Configuration
107
+
108
+ Display updated configuration:
109
+ ```
110
+ **Updated APEX Configuration:**
111
+
112
+ | Flag | Status |
113
+ |------|--------|
114
+ | Auto | {auto_mode ? "✓ ON" : "✗ OFF"} |
115
+ | Examine | {examine_mode ? "✓ ON" : "✗ OFF"} |
116
+ | Save | {save_mode ? "✓ ON" : "✗ OFF"} |
117
+ | Test | {test_mode ? "✓ ON" : "✗ OFF"} |
118
+ | Economy | {economy_mode ? "✓ ON" : "✗ OFF"} |
119
+ | Branch | {branch_mode ? "✓ ON" : "✗ OFF"} |
120
+ | PR | {pr_mode ? "✓ ON" : "✗ OFF"} |
121
+ ```
122
+
123
+ ### 6. Return
124
+
125
+ → Return to step-00-init.md with all flags updated
126
+
127
+ ---
128
+
129
+ ## SUCCESS METRICS:
130
+
131
+ ✅ Current configuration displayed
132
+ ✅ User able to toggle any flag
133
+ ✅ All selected flags properly toggled
134
+ ✅ PR mode auto-enables branch mode
135
+ ✅ Final configuration shown
136
+
137
+ ## FAILURE MODES:
138
+
139
+ ❌ Not showing current flag states
140
+ ❌ Forgetting to toggle selected flags
141
+ ❌ Not enabling branch_mode when pr_mode selected
142
+ ❌ Starting workflow instead of returning
143
+ ❌ **CRITICAL**: Using plain text prompts instead of AskUserQuestion
144
+
145
+ ---
146
+
147
+ ## RETURN:
148
+
149
+ After configuration complete, return to `./step-00-init.md` to continue initialization.
150
+
151
+ <critical>
152
+ Remember: This sub-step ONLY handles flag configuration. Return immediately after updating flags.
153
+ </critical>
@@ -0,0 +1,361 @@
1
+ ---
2
+ name: step-01-analyze
3
+ description: Pure context gathering - explore codebase to understand WHAT EXISTS
4
+ next_step: steps/step-02-plan.md
5
+ ---
6
+
7
+ # Step 1: Analyze (Context Gathering)
8
+
9
+ ## MANDATORY EXECUTION RULES (READ FIRST):
10
+
11
+ - 🛑 NEVER plan or design solutions - that's step 2
12
+ - 🛑 NEVER create todos or implementation tasks
13
+ - 🛑 NEVER decide HOW to implement anything
14
+ - ✅ ALWAYS focus on discovering WHAT EXISTS
15
+ - ✅ ALWAYS report findings with file paths and line numbers
16
+ - 📋 YOU ARE AN EXPLORER, not a planner
17
+ - 💬 FOCUS on "What is here?" NOT "What should we build?"
18
+ - 🚫 FORBIDDEN to suggest implementations or approaches
19
+
20
+ ## 🧠 SMART AGENT STRATEGY
21
+
22
+ <critical>
23
+ **ADAPTIVE AGENT LAUNCHING** (unless economy_mode is true)
24
+
25
+ Before exploring, THINK about what information you need and launch the RIGHT agents - between 1 and 10 depending on task complexity.
26
+
27
+ **DO NOT blindly launch all agents. BE SMART.**
28
+ </critical>
29
+
30
+ ## EXECUTION PROTOCOLS:
31
+
32
+ - 🎯 Launch parallel exploration agents (unless economy_mode)
33
+ - 💾 Append findings to output file (if save_mode)
34
+ - 📖 Document patterns with specific file:line references
35
+ - 🚫 FORBIDDEN to proceed until context is complete
36
+
37
+ ## CONTEXT BOUNDARIES:
38
+
39
+ - Variables from step-00-init are available
40
+ - No implementation decisions have been made yet
41
+ - Codebase state is unknown - must be discovered
42
+ - Don't assume knowledge about the codebase
43
+
44
+ ## YOUR TASK:
45
+
46
+ Gather ALL relevant context about WHAT CURRENTLY EXISTS in the codebase related to the task.
47
+
48
+ ---
49
+
50
+ <available_state>
51
+ From step-00-init:
52
+
53
+ | Variable | Description |
54
+ |----------|-------------|
55
+ | `{task_description}` | What to implement |
56
+ | `{task_id}` | Kebab-case identifier |
57
+ | `{auto_mode}` | Skip confirmations |
58
+ | `{examine_mode}` | Auto-proceed to review |
59
+ | `{save_mode}` | Save outputs to files |
60
+ | `{test_mode}` | Include test steps |
61
+ | `{economy_mode}` | No subagents, direct tools |
62
+ | `{output_dir}` | Path to output (if save_mode) |
63
+ </available_state>
64
+
65
+ ---
66
+
67
+ ## EXECUTION SEQUENCE:
68
+
69
+ ### 1. Initialize Save Output (if save_mode)
70
+
71
+ **If `{save_mode}` = true:**
72
+
73
+ ```bash
74
+ bash {skill_dir}/scripts/update-progress.sh "{task_id}" "01" "analyze" "in_progress"
75
+ ```
76
+
77
+ Append findings to `{output_dir}/01-analyze.md` as you work.
78
+
79
+ ### 2. Extract Search Keywords
80
+
81
+ From the task description, identify:
82
+ - **Domain terms**: auth, user, payment, etc.
83
+ - **Technical terms**: API, route, component, etc.
84
+ - **Action hints**: create, update, fix, add, etc.
85
+
86
+ These keywords guide exploration - NOT planning.
87
+
88
+ ### 3. Explore Codebase
89
+
90
+ **If `{economy_mode}` = true:**
91
+ → Use direct tools (see step-00b-economy.md for rules)
92
+
93
+ ```
94
+ 1. Glob to find files: **/*{keyword}*
95
+ 2. Grep to search content in likely locations
96
+ 3. Read the most relevant 3-5 files
97
+ 4. Skip web research unless stuck
98
+ ```
99
+
100
+ **If `{economy_mode}` = false:**
101
+ → Use SMART agent strategy below
102
+
103
+ ---
104
+
105
+ ### 🧠 STEP 3A: ANALYZE TASK COMPLEXITY
106
+
107
+ **Before launching agents, THINK:**
108
+
109
+ ```
110
+ Task: {task_description}
111
+
112
+ 1. SCOPE: How many areas of the codebase are affected?
113
+ - Single file/function → Low
114
+ - Multiple related files → Medium
115
+ - Cross-cutting concerns → High
116
+
117
+ 2. LIBRARIES: Which external libraries are involved?
118
+ - None or well-known basics → Skip docs
119
+ - Unfamiliar library or specific API needed → Need docs
120
+ - Multiple libraries interacting → Need multiple doc agents
121
+
122
+ 3. PATTERNS: Do I need to understand existing patterns?
123
+ - Simple addition → Maybe skip codebase exploration
124
+ - Must integrate with existing code → Need codebase exploration
125
+
126
+ 4. UNCERTAINTY: What am I unsure about?
127
+ - Clear requirements, known approach → Fewer agents
128
+ - Unclear approach, unfamiliar territory → More agents
129
+ ```
130
+
131
+ ---
132
+
133
+ ### 🎯 STEP 3B: CHOOSE YOUR AGENTS (1-10)
134
+
135
+ **Available Agent Types:**
136
+
137
+ | Agent | Use When |
138
+ |-------|----------|
139
+ | `explore-codebase` | Need to find existing patterns, related files, utilities |
140
+ | `explore-docs` | Unfamiliar library API, need current syntax, complex feature |
141
+ | `websearch` | Need common approaches, best practices, gotchas |
142
+
143
+ **Decision Matrix:**
144
+
145
+ | Task Type | Agents Needed | Example |
146
+ |-----------|---------------|---------|
147
+ | **Simple fix** | 1-2 | Bug fix in known file → 1x explore-codebase |
148
+ | **Add feature (familiar stack)** | 2-3 | Add button → 1x explore-codebase + 1x websearch |
149
+ | **Add feature (unfamiliar library)** | 3-5 | Add Stripe → 1x codebase + 1x explore-docs (Stripe) + 1x websearch |
150
+ | **Complex integration** | 5-8 | Auth + payments → 1x codebase + 2-3x explore-docs + 1-2x websearch |
151
+ | **Major feature (multiple systems)** | 6-10 | Full e-commerce → Multiple codebase areas + multiple docs + research |
152
+
153
+ ---
154
+
155
+ ### 🚀 STEP 3C: LAUNCH AGENTS IN PARALLEL
156
+
157
+ **Launch ALL chosen agents in ONE message.**
158
+
159
+ **Agent Prompts:**
160
+
161
+ **`explore-codebase`** - Use for finding existing code:
162
+ ```
163
+ Find existing code related to: {specific_area}
164
+
165
+ Report:
166
+ 1. Files with paths and line numbers
167
+ 2. Patterns used for similar features
168
+ 3. Relevant utilities
169
+ 4. Test patterns
170
+
171
+ DO NOT suggest implementations.
172
+ ```
173
+
174
+ **`explore-docs`** - Use ONLY when you need specific library knowledge:
175
+ ```
176
+ Research {library_name} documentation for: {specific_question}
177
+
178
+ Find:
179
+ 1. Current API for {specific_feature}
180
+ 2. Code examples
181
+ 3. Configuration needed
182
+ ```
183
+
184
+ **`websearch`** - Use for approaches and gotchas:
185
+ ```
186
+ Search: {specific_question_or_approach}
187
+
188
+ Find common patterns and pitfalls.
189
+ ```
190
+
191
+ ---
192
+
193
+ ### 📋 EXAMPLE AGENT LAUNCHES
194
+
195
+ **Simple task** (fix button styling) → 1 agent:
196
+ ```
197
+ [Task: explore-codebase - find button components and styling patterns]
198
+ ```
199
+
200
+ **Medium task** (add user profile page) → 3 agents:
201
+ ```
202
+ [Task: explore-codebase - find user-related components and data fetching patterns]
203
+ [Task: explore-codebase - find page layout and routing patterns]
204
+ [Task: websearch - Next.js profile page best practices]
205
+ ```
206
+
207
+ **Complex task** (add Stripe subscriptions) → 6 agents:
208
+ ```
209
+ [Task: explore-codebase - find existing payment/billing code]
210
+ [Task: explore-codebase - find user account and settings patterns]
211
+ [Task: explore-docs - Stripe subscription API and webhooks]
212
+ [Task: explore-docs - Stripe Customer Portal integration]
213
+ [Task: websearch - Stripe subscriptions Next.js implementation]
214
+ [Task: websearch - Stripe webhook security best practices]
215
+ ```
216
+
217
+ ### 4. Synthesize Findings
218
+
219
+ Combine results into structured context:
220
+
221
+ ```markdown
222
+ ## Codebase Context
223
+
224
+ ### Related Files Found
225
+ | File | Lines | Contains |
226
+ |------|-------|----------|
227
+ | `src/auth/login.ts` | 1-150 | Existing login implementation |
228
+ | `src/utils/validate.ts` | 20-45 | Email validation helper |
229
+
230
+ ### Patterns Observed
231
+ - **Route pattern**: Uses Next.js App Router with `route.ts`
232
+ - **Validation**: Uses zod schemas in `schemas/` folder
233
+ - **Error handling**: Throws custom ApiError classes
234
+
235
+ ### Utilities Available
236
+ - `src/lib/auth.ts` - JWT sign/verify functions
237
+ - `src/lib/db.ts` - Prisma client instance
238
+
239
+ ### Similar Implementations
240
+ - `src/auth/login.ts:42` - Login flow (reference for patterns)
241
+
242
+ ### Test Patterns
243
+ - Tests in `__tests__/` folders
244
+ - Uses vitest with testing-library
245
+
246
+ ## Documentation Insights
247
+
248
+ ### Libraries Used
249
+ - **jose**: JWT library - uses `SignJWT` class
250
+ - **prisma**: ORM - uses `prisma.user.create()` pattern
251
+
252
+ ## Research Findings
253
+
254
+ ### Common Approaches
255
+ - Registration: validate → hash → create → issue token
256
+ - Use httpOnly cookies for tokens
257
+ ```
258
+
259
+ **If `{save_mode}` = true:** Append synthesis to 01-analyze.md
260
+
261
+ ### 5. Infer Acceptance Criteria
262
+
263
+ Based on task and context, infer success criteria:
264
+
265
+ ```markdown
266
+ ## Inferred Acceptance Criteria
267
+
268
+ Based on "{task_description}" and existing patterns:
269
+
270
+ - [ ] AC1: [specific measurable outcome]
271
+ - [ ] AC2: [specific measurable outcome]
272
+ - [ ] AC3: [specific measurable outcome]
273
+
274
+ _These will be refined in the planning step._
275
+ ```
276
+
277
+ **If `{save_mode}` = true:** Update 00-context.md with acceptance criteria
278
+
279
+ ### 6. Present Context Summary
280
+
281
+ **Always (regardless of auto_mode):**
282
+
283
+ Present summary and proceed directly to planning:
284
+
285
+ ```
286
+ **Context Gathering Complete**
287
+
288
+ **Files analyzed:** {count}
289
+ **Patterns identified:** {count}
290
+ **Utilities found:** {count}
291
+
292
+ **Key findings:**
293
+ - {summary of relevant files}
294
+ - {patterns that will guide implementation}
295
+
296
+ → Proceeding to planning phase...
297
+ ```
298
+
299
+ <critical>
300
+ Do NOT ask for user confirmation here - always proceed directly to step-02-plan.
301
+ </critical>
302
+
303
+ ### 7. Complete Save Output (if save_mode)
304
+
305
+ **If `{save_mode}` = true:**
306
+
307
+ Append summary to `{output_dir}/01-analyze.md` then:
308
+
309
+ ```bash
310
+ bash {skill_dir}/scripts/update-progress.sh "{task_id}" "01" "analyze" "complete"
311
+ bash {skill_dir}/scripts/update-progress.sh "{task_id}" "02" "plan" "in_progress"
312
+ ```
313
+
314
+ ---
315
+
316
+ ## SUCCESS METRICS:
317
+
318
+ ✅ Related files identified with paths and line numbers
319
+ ✅ Existing patterns documented with specific examples
320
+ ✅ Available utilities noted
321
+ ✅ Dependencies listed
322
+ ✅ Acceptance criteria inferred
323
+ ✅ NO planning or implementation decisions made
324
+ ✅ Output saved (if save_mode)
325
+ ✅ Task complexity analyzed BEFORE launching agents
326
+ ✅ Right NUMBER of agents launched (1-10 based on complexity)
327
+ ✅ Right TYPE of agents chosen for the task
328
+ ✅ All agents launched in PARALLEL (single message)
329
+
330
+ ## FAILURE MODES:
331
+
332
+ ❌ Starting to plan or design (that's step 2!)
333
+ ❌ Suggesting implementations or approaches
334
+ ❌ Missing obvious related files
335
+ ❌ Not documenting patterns with file:line references
336
+ ❌ Launching agents sequentially instead of parallel
337
+ ❌ Using subagents when economy_mode is true
338
+ ❌ **CRITICAL**: Blocking workflow with unnecessary confirmation prompts
339
+ ❌ Launching too many agents for a simple task (wasteful)
340
+ ❌ Launching too few agents for a complex task (insufficient context)
341
+ ❌ Not analyzing task complexity before choosing agents
342
+ ❌ Skipping `explore-docs` when genuinely unfamiliar with a library API
343
+
344
+ ## ANALYZE PROTOCOLS:
345
+
346
+ - This step is ONLY about discovery
347
+ - Report what EXISTS, not what SHOULD BE
348
+ - Include file paths and line numbers for all findings
349
+ - Don't assume - verify by reading files
350
+ - In economy mode, use direct tools only
351
+
352
+ ---
353
+
354
+ ## NEXT STEP:
355
+
356
+ Always proceed directly to `./step-02-plan.md` after presenting context summary.
357
+
358
+ <critical>
359
+ Remember: Analysis is ONLY about "What exists?" - save all planning for step-02!
360
+ Do NOT ask for confirmation - proceed directly!
361
+ </critical>