owflow 0.6.0 → 0.7.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.
Files changed (195) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +448 -283
  3. package/dist/agents/bottleneck-analyzer.md +332 -333
  4. package/dist/agents/code-quality-pragmatist.md +353 -354
  5. package/dist/agents/code-reviewer.md +238 -239
  6. package/dist/agents/codebase-analysis-reporter.md +245 -246
  7. package/dist/agents/docs-operator.md +22 -23
  8. package/dist/agents/e2e-test-verifier.md +447 -448
  9. package/dist/agents/gap-analyzer.md +501 -502
  10. package/dist/agents/implementation-completeness-checker.md +219 -220
  11. package/dist/agents/implementation-planner.md +308 -309
  12. package/dist/agents/information-gatherer.md +690 -691
  13. package/dist/agents/production-readiness-checker.md +278 -279
  14. package/dist/agents/project-analyzer.md +403 -403
  15. package/dist/agents/reality-assessor.md +365 -366
  16. package/dist/agents/research-planner.md +449 -450
  17. package/dist/agents/research-synthesizer.md +402 -403
  18. package/dist/agents/solution-brainstormer.md +256 -257
  19. package/dist/agents/solution-designer.md +371 -372
  20. package/dist/agents/spec-auditor.md +297 -298
  21. package/dist/agents/specification-creator.md +333 -334
  22. package/dist/agents/task-classifier.md +449 -450
  23. package/dist/agents/task-group-implementer.md +283 -284
  24. package/dist/agents/test-suite-runner.md +194 -195
  25. package/dist/agents/user-docs-generator.md +508 -509
  26. package/dist/commands/reviews-code.md +90 -90
  27. package/dist/commands/reviews-pragmatic.md +99 -99
  28. package/dist/commands/reviews-production-readiness.md +113 -113
  29. package/dist/commands/reviews-reality-check.md +110 -110
  30. package/dist/commands/reviews-spec-audit.md +114 -114
  31. package/dist/commands/work.md +280 -280
  32. package/dist/configuration/agents-config.d.ts +2 -0
  33. package/dist/configuration/agents-config.js +8 -44
  34. package/dist/configuration/commands-config.d.ts +23 -0
  35. package/dist/configuration/commands-config.js +17 -17
  36. package/dist/configuration/skills-config.d.ts +2 -0
  37. package/dist/configuration/skills-config.js +3 -3
  38. package/dist/hooks/hooks-diagnostics.d.ts +3 -0
  39. package/dist/hooks/hooks-diagnostics.js +21 -0
  40. package/dist/hooks/hooks-persistence.d.ts +17 -0
  41. package/dist/hooks/hooks-persistence.js +207 -0
  42. package/dist/hooks/hooks-registry.d.ts +6 -0
  43. package/dist/hooks/hooks-registry.js +104 -0
  44. package/dist/hooks/hooks-wrapper.d.ts +25 -0
  45. package/dist/hooks/hooks-wrapper.js +318 -0
  46. package/dist/hooks/internal/before-tool.d.ts +6 -0
  47. package/dist/hooks/internal/before-tool.js +13 -0
  48. package/dist/hooks/internal/session-compaction.d.ts +9 -0
  49. package/dist/hooks/{session-compaction.js → internal/session-compaction.js} +9 -7
  50. package/dist/hooks/runtime/circuit-breaker.d.ts +23 -0
  51. package/dist/hooks/runtime/circuit-breaker.js +39 -0
  52. package/dist/hooks/runtime/failure-policy.d.ts +15 -0
  53. package/dist/hooks/runtime/failure-policy.js +49 -0
  54. package/dist/hooks/runtime/process-executor.d.ts +33 -0
  55. package/dist/hooks/runtime/process-executor.js +147 -0
  56. package/dist/hooks/runtime/status-recorder.d.ts +27 -0
  57. package/dist/hooks/runtime/status-recorder.js +111 -0
  58. package/dist/index.d.ts +7 -0
  59. package/dist/index.js +111 -40
  60. package/dist/skills/agents-md-generator/SKILL.md +223 -223
  61. package/dist/skills/codebase-analyzer/SKILL.md +162 -162
  62. package/dist/skills/codebase-analyzer/references/code-analysis.md +63 -63
  63. package/dist/skills/codebase-analyzer/references/combined.md +31 -31
  64. package/dist/skills/codebase-analyzer/references/context-discovery.md +63 -63
  65. package/dist/skills/codebase-analyzer/references/file-discovery.md +51 -51
  66. package/dist/skills/codebase-analyzer/references/migration-target.md +23 -23
  67. package/dist/skills/codebase-analyzer/references/pattern-mining.md +22 -22
  68. package/dist/skills/dev-analyze/SKILL.md +115 -115
  69. package/dist/skills/dev-bugfix/SKILL.md +452 -452
  70. package/dist/skills/dev-finalize/SKILL.md +118 -118
  71. package/dist/skills/dev-implement/SKILL.md +167 -167
  72. package/dist/skills/dev-plan/SKILL.md +147 -147
  73. package/dist/skills/dev-spec/SKILL.md +182 -182
  74. package/dist/skills/dev-tdd-red/SKILL.md +94 -94
  75. package/dist/skills/dev-verify/SKILL.md +153 -153
  76. package/dist/skills/development/SKILL.md +260 -260
  77. package/dist/skills/diagrams-mermaid/SKILL.md +183 -159
  78. package/dist/skills/diagrams-mermaid/references/reference.md +220 -148
  79. package/dist/skills/docs-manager/SKILL.md +379 -379
  80. package/dist/skills/docs-manager/docs/INDEX.md +199 -199
  81. package/dist/skills/docs-manager/docs/standards/backend/api.md +25 -25
  82. package/dist/skills/docs-manager/docs/standards/backend/migrations.md +22 -22
  83. package/dist/skills/docs-manager/docs/standards/backend/models.md +25 -25
  84. package/dist/skills/docs-manager/docs/standards/backend/queries.md +22 -22
  85. package/dist/skills/docs-manager/docs/standards/frontend/accessibility.md +25 -25
  86. package/dist/skills/docs-manager/docs/standards/frontend/components.md +28 -28
  87. package/dist/skills/docs-manager/docs/standards/frontend/css.md +16 -16
  88. package/dist/skills/docs-manager/docs/standards/frontend/responsive.md +28 -28
  89. package/dist/skills/docs-manager/docs/standards/global/coding-style.md +25 -25
  90. package/dist/skills/docs-manager/docs/standards/global/commenting.md +10 -10
  91. package/dist/skills/docs-manager/docs/standards/global/conventions.md +31 -31
  92. package/dist/skills/docs-manager/docs/standards/global/error-handling.md +22 -22
  93. package/dist/skills/docs-manager/docs/standards/global/minimal-implementation.md +22 -22
  94. package/dist/skills/docs-manager/docs/standards/global/validation.md +28 -28
  95. package/dist/skills/docs-manager/docs/standards/testing/test-writing.md +25 -25
  96. package/dist/skills/docs-manager/references/agents-md-template.md +29 -29
  97. package/dist/skills/docs-manager/references/index-md-template.md +73 -73
  98. package/dist/skills/flow-init/SKILL.md +234 -234
  99. package/dist/skills/flow-init/references/architecture-template.md +45 -45
  100. package/dist/skills/flow-init/references/roadmap-templates.md +93 -93
  101. package/dist/skills/flow-init/references/tech-stack-template.md +70 -70
  102. package/dist/skills/flow-init/references/vision-templates.md +75 -75
  103. package/dist/skills/goal-development/SKILL.md +96 -96
  104. package/dist/skills/goal-migration/SKILL.md +114 -114
  105. package/dist/skills/goal-performance/SKILL.md +126 -126
  106. package/dist/skills/goal-research/SKILL.md +118 -118
  107. package/dist/skills/html-renderer/SKILL.md +173 -173
  108. package/dist/skills/html-renderer/references/index.html +318 -318
  109. package/dist/skills/html-renderer/references/styles.css +388 -388
  110. package/dist/skills/html-renderer/references/tokens.json +104 -104
  111. package/dist/skills/implementation-plan-executor/SKILL.md +378 -378
  112. package/dist/skills/implementation-verifier/SKILL.md +307 -307
  113. package/dist/skills/migration/SKILL.md +268 -268
  114. package/dist/skills/migration-analyze/SKILL.md +126 -126
  115. package/dist/skills/migration-finalize/SKILL.md +161 -161
  116. package/dist/skills/migration-fix/SKILL.md +155 -155
  117. package/dist/skills/migration-implement/SKILL.md +131 -131
  118. package/dist/skills/migration-plan/SKILL.md +131 -131
  119. package/dist/skills/migration-spec/SKILL.md +135 -135
  120. package/dist/skills/migration-spec/references/migration-strategies.md +430 -430
  121. package/dist/skills/migration-target/SKILL.md +134 -134
  122. package/dist/skills/migration-target/references/migration-types.md +489 -489
  123. package/dist/skills/migration-verify/SKILL.md +184 -184
  124. package/dist/skills/orchestrator-framework/SKILL.md +65 -65
  125. package/dist/skills/orchestrator-framework/references/command-namespacing.md +7 -7
  126. package/dist/skills/orchestrator-framework/references/confirm-or-revise-exception.md +20 -20
  127. package/dist/skills/orchestrator-framework/references/delegation-rules.md +54 -54
  128. package/dist/skills/orchestrator-framework/references/dispatcher-handoff.md +27 -27
  129. package/dist/skills/orchestrator-framework/references/fix-loop-contract.md +65 -65
  130. package/dist/skills/orchestrator-framework/references/gate-contract.md +122 -122
  131. package/dist/skills/orchestrator-framework/references/orchestrator-creation-checklist.md +51 -51
  132. package/dist/skills/orchestrator-framework/references/orchestrator-patterns.md +235 -235
  133. package/dist/skills/performance/SKILL.md +267 -267
  134. package/dist/skills/performance-analyze/SKILL.md +129 -129
  135. package/dist/skills/performance-analyze/references/performance-optimization-guide.md +271 -271
  136. package/dist/skills/performance-finalize/SKILL.md +117 -117
  137. package/dist/skills/performance-implement/SKILL.md +114 -114
  138. package/dist/skills/performance-plan/SKILL.md +112 -112
  139. package/dist/skills/performance-spec/SKILL.md +145 -145
  140. package/dist/skills/performance-verify/SKILL.md +164 -164
  141. package/dist/skills/research/SKILL.md +249 -249
  142. package/dist/skills/research-brainstorm/SKILL.md +120 -120
  143. package/dist/skills/research-brainstorm/references/brainstorming-techniques.md +84 -84
  144. package/dist/skills/research-converge/SKILL.md +130 -130
  145. package/dist/skills/research-design/SKILL.md +146 -146
  146. package/dist/skills/research-design/references/design-techniques.md +40 -40
  147. package/dist/skills/research-finalize/SKILL.md +125 -125
  148. package/dist/skills/research-fork/SKILL.md +190 -190
  149. package/dist/skills/research-gather/SKILL.md +133 -133
  150. package/dist/skills/research-plan/SKILL.md +141 -141
  151. package/dist/skills/research-plan/references/research-methodologies.md +710 -710
  152. package/dist/skills/research-quick/SKILL.md +139 -139
  153. package/dist/skills/research-synthesize/SKILL.md +127 -127
  154. package/dist/skills/rule-reviewer/SKILL.md +334 -334
  155. package/dist/skills/standards-discover/SKILL.md +260 -260
  156. package/dist/skills/standards-discover/references/aggregation-strategy.md +76 -76
  157. package/dist/skills/standards-discover/references/code-pattern-prompt.md +68 -68
  158. package/dist/skills/standards-discover/references/config-analyzer-prompt.md +67 -67
  159. package/dist/skills/standards-discover/references/docs-extractor-prompt.md +65 -65
  160. package/dist/skills/standards-discover/references/external-analyzer-prompt.md +75 -75
  161. package/dist/skills/standards-update/SKILL.md +207 -207
  162. package/dist/templates/orchestrator-state-base.yml +17 -17
  163. package/dist/templates/orchestrator-state-development.yml +95 -95
  164. package/dist/templates/orchestrator-state-migration.yml +95 -95
  165. package/dist/templates/orchestrator-state-performance.yml +64 -64
  166. package/dist/templates/orchestrator-state-research.yml +67 -67
  167. package/dist/tools/fork_task.d.ts +17 -0
  168. package/dist/tools/fork_task.js +21 -11
  169. package/dist/tools/verify_template.d.ts +11 -0
  170. package/dist/tools/verify_template.js +32 -17
  171. package/dist/tui/hooks-dialogs.d.ts +20 -0
  172. package/dist/tui/hooks-dialogs.js +181 -0
  173. package/dist/tui/hooks-presenter.d.ts +15 -0
  174. package/dist/tui/hooks-presenter.js +70 -0
  175. package/dist/tui/hooks-sidebar.d.ts +10 -0
  176. package/dist/tui/hooks-sidebar.js +104 -0
  177. package/dist/tui/primitives.d.ts +21 -0
  178. package/dist/tui/primitives.js +47 -0
  179. package/dist/tui.d.ts +12 -0
  180. package/dist/tui.js +129 -0
  181. package/dist/types/hook-types.d.ts +125 -0
  182. package/dist/types/hook-types.js +76 -0
  183. package/dist/types/opencode-types.d.ts +13 -0
  184. package/dist/utils/file-util.d.ts +2 -0
  185. package/dist/utils/file-util.js +6 -6
  186. package/dist/utils/fork-task.d.ts +27 -0
  187. package/dist/utils/fork-task.js +18 -23
  188. package/dist/utils/plugin-info.d.ts +3 -0
  189. package/dist/utils/plugin-info.js +8 -10
  190. package/dist/utils/workflow-paths.d.ts +17 -0
  191. package/dist/utils/workflow-paths.js +18 -0
  192. package/dist/utils/yaml-structure.d.ts +7 -0
  193. package/dist/utils/yaml-structure.js +7 -11
  194. package/package.json +68 -48
  195. package/dist/hooks/before-tool.js +0 -19
@@ -1,162 +1,162 @@
1
- ---
2
- name: owflow:codebase-analyzer
3
- description: Analyzes codebase using adaptive parallel Explore subagents based on task complexity. Selects agent roles from a pool, launches Explore agents, then delegates report generation to codebase-analysis-reporter subagent.
4
- user-invocable: false
5
- ---
6
-
7
- # Codebase Analyzer Skill
8
-
9
- Orchestrates parallel codebase analysis using built-in Explore subagents. Adaptively selects which agent roles to activate based on task complexity, then delegates report synthesis to a specialized subagent.
10
-
11
- ## Core Principles
12
-
13
- 1. **Adaptive Agent Selection**: Select roles from a pool based on task complexity — no fixed count
14
- 2. **Task-Type Awareness**: Adapt prompts and focus based on task type
15
- 3. **Delegated Reporting**: Raw findings go to `codebase-analysis-reporter` subagent for synthesis
16
-
17
- ---
18
-
19
- ## Input Parameters
20
-
21
- | Parameter | Required | Description |
22
- |-----------|----------|-------------|
23
- | `task_description` | Yes | Description of the development task |
24
- | `description` | Yes | Task description from user |
25
- | `task_path` | Yes | Path to task directory |
26
- | `artifact_name` | No | Override output filename (default: `codebase-analysis.md`) |
27
-
28
- ---
29
-
30
- ## Execution Workflow
31
-
32
- ### Step 1: Parse Input and Determine Focus
33
-
34
- Extract keywords, component names, file hints, domain, and technology hints from the description.
35
-
36
- Determine primary focus from the task description:
37
-
38
- | Signal in Description | Primary Focus | Key Questions |
39
- |----------------------|---------------|---------------|
40
- | Error/crash/broken language | Find buggy code path | Where does the issue occur? What's the execution flow? |
41
- | Improve/enhance/existing | Find existing feature | What files implement this feature? How does it work? |
42
- | Add/new/create | Find patterns/integration points | What similar patterns exist? Where should this integrate? |
43
-
44
- ### Step 2: Select Agent Roles
45
-
46
- Choose which roles to activate from the pool. Each role is a distinct analysis concern.
47
-
48
- | Role | Purpose | When Needed |
49
- |------|---------|-------------|
50
- | **File Discovery** | Find relevant files by patterns, keywords, naming | Almost always |
51
- | **Code Analysis** | Analyze code structure, patterns, execution flow | When understanding existing behavior matters |
52
- | **Context Discovery** | Find tests, consumers, dependencies | When understanding impact/coverage matters |
53
- | **Pattern Mining** | Find similar implementations as templates | New features following existing patterns |
54
- | **Migration Target** | Analyze target technology/compatibility | Migrations comparing current vs target |
55
-
56
- **Decision signals:**
57
- - **Specificity** (exact files mentioned → fewer agents)
58
- - **Scope breadth** (multiple domains → more agents)
59
- - **Uncertainty** (unclear location → more agents)
60
- - **Task type** (bugs tend focused, features broad, migrations broadest)
61
-
62
- **Examples:**
63
-
64
- | Task Description | Roles Selected | Count |
65
- |------------------|---------------|-------|
66
- | "Fix null check in `utils/parser.ts`" | File Discovery + Code Analysis (combined) | 1 |
67
- | "Add sorting to user table" | File Discovery, Code Analysis | 2 |
68
- | "Fix login timeout" | File Discovery + Code Analysis (combined), Context Discovery | 2 |
69
- | "Add OAuth authentication system" | File Discovery, Code Analysis, Context Discovery | 3 |
70
- | "Add export feature similar to import" | File Discovery, Code Analysis, Pattern Mining | 3 |
71
- | "Migrate from REST to GraphQL" | File Discovery, Code Analysis, Context Discovery, Migration Target | 4 |
72
-
73
- When selecting fewer agents, merge related concerns into a single prompt — don't drop concerns.
74
-
75
- State which roles you selected and why (1 sentence).
76
-
77
- ### Step 3: Read Prompt Templates and Launch Agents
78
-
79
- > **STOP — Do NOT skip this step. Do NOT write prompts from memory.**
80
- >
81
- > Before launching ANY Explore agent, you MUST use the Read tool to load the prompt template for each selected role. This is non-negotiable.
82
-
83
- **3a. Read templates** — Use the Read tool to load ONLY the files for your selected roles:
84
-
85
- | Role | Read This File |
86
- |------|--------------|
87
- | File Discovery | `references/file-discovery.md` |
88
- | Code Analysis | `references/code-analysis.md` |
89
- | Context Discovery | `references/context-discovery.md` |
90
- | Pattern Mining | `references/pattern-mining.md` |
91
- | Migration Target | `references/migration-target.md` |
92
-
93
- If combining roles into one agent, also read `references/combined.md` for merging guidance.
94
-
95
- **3b. Adapt templates** — Replace `[description]` with the actual task description. Select the correct task-type section (Bug / Enhancement / Feature).
96
-
97
- **3c. Launch agents** — Use the Task tool with `subagent_type="Explore"` — one call per selected role, all in ONE message.
98
-
99
- **IMPORTANT**: Every Explore agent prompt MUST include this instruction:
100
- > IMPORTANT: Do NOT create, write, or modify any files. Output all findings as text in your response only.
101
-
102
- **SELF-CHECK**: Did you read the template files with the Read tool? If not, go back to 3a. Do not proceed.
103
-
104
- ### Step 4: Delegate Report Generation
105
-
106
- After all Explore agents complete, delegate to `codebase-analysis-reporter` subagent via Task tool:
107
-
108
- ```
109
- Task tool:
110
- subagent_type: "codebase-analysis-reporter"
111
- description: "Merge findings into analysis report"
112
- prompt: |
113
- You are the codebase-analysis-reporter. Merge these raw findings into a structured analysis report.
114
-
115
- Task description: [description]
116
- Agent roles used: [list of roles]
117
- Agent count: [N]
118
- Output path: [task_path]/analysis/[artifact_name]
119
-
120
- ## Raw Findings
121
-
122
- ### [Role 1 Name]
123
- [paste raw output from agent 1]
124
-
125
- ### [Role 2 Name]
126
- [paste raw output from agent 2]
127
-
128
- [... for each agent]
129
- ```
130
-
131
- The subagent produces the final report at `{task_path}/analysis/{artifact_name}` and returns structured results.
132
-
133
- ### Step 5: Return Results to Orchestrator
134
-
135
- Pass through the subagent's structured output:
136
-
137
- ```yaml
138
- status: success|partial|failed
139
- report_path: analysis/[artifact_name]
140
- summary: "[1-2 sentence summary]"
141
- files_found: [count]
142
- complexity: simple|moderate|complex
143
- risk_level: low|low-medium|medium|medium-high|high
144
- ```
145
-
146
- ---
147
-
148
- ## Error Handling
149
-
150
- - **No files found**: Report partial results, suggest user provide more specific hints
151
- - **Agent timeout**: Use results from completed agents, note incomplete analysis
152
- - **Conflicting results**: Pass all perspectives to reporter subagent, which highlights conflicts
153
-
154
- ---
155
-
156
- ## Integration
157
-
158
- | Orchestrator | Step (slug) | artifact_name |
159
- |-------------|-------|---------------|
160
- | development orchestrator | `codebase-analysed` | `codebase-analysis.md` (default) |
161
- | migration-analyze | `state-analysed` | `current-state-analysis.md` |
162
- | performance-analyze | `codebase-analysed` | `codebase-analysis.md` (default) |
1
+ ---
2
+ name: owflow:codebase-analyzer
3
+ description: Analyzes codebase using adaptive parallel Explore subagents based on task complexity. Selects agent roles from a pool, launches Explore agents, then delegates report generation to codebase-analysis-reporter subagent.
4
+ user-invocable: false
5
+ ---
6
+
7
+ # Codebase Analyzer Skill
8
+
9
+ Orchestrates parallel codebase analysis using built-in Explore subagents. Adaptively selects which agent roles to activate based on task complexity, then delegates report synthesis to a specialized subagent.
10
+
11
+ ## Core Principles
12
+
13
+ 1. **Adaptive Agent Selection**: Select roles from a pool based on task complexity — no fixed count
14
+ 2. **Task-Type Awareness**: Adapt prompts and focus based on task type
15
+ 3. **Delegated Reporting**: Raw findings go to `codebase-analysis-reporter` subagent for synthesis
16
+
17
+ ---
18
+
19
+ ## Input Parameters
20
+
21
+ | Parameter | Required | Description |
22
+ |-----------|----------|-------------|
23
+ | `task_description` | Yes | Description of the development task |
24
+ | `description` | Yes | Task description from user |
25
+ | `task_path` | Yes | Path to task directory |
26
+ | `artifact_name` | No | Override output filename (default: `codebase-analysis.md`) |
27
+
28
+ ---
29
+
30
+ ## Execution Workflow
31
+
32
+ ### Step 1: Parse Input and Determine Focus
33
+
34
+ Extract keywords, component names, file hints, domain, and technology hints from the description.
35
+
36
+ Determine primary focus from the task description:
37
+
38
+ | Signal in Description | Primary Focus | Key Questions |
39
+ |----------------------|---------------|---------------|
40
+ | Error/crash/broken language | Find buggy code path | Where does the issue occur? What's the execution flow? |
41
+ | Improve/enhance/existing | Find existing feature | What files implement this feature? How does it work? |
42
+ | Add/new/create | Find patterns/integration points | What similar patterns exist? Where should this integrate? |
43
+
44
+ ### Step 2: Select Agent Roles
45
+
46
+ Choose which roles to activate from the pool. Each role is a distinct analysis concern.
47
+
48
+ | Role | Purpose | When Needed |
49
+ |------|---------|-------------|
50
+ | **File Discovery** | Find relevant files by patterns, keywords, naming | Almost always |
51
+ | **Code Analysis** | Analyze code structure, patterns, execution flow | When understanding existing behavior matters |
52
+ | **Context Discovery** | Find tests, consumers, dependencies | When understanding impact/coverage matters |
53
+ | **Pattern Mining** | Find similar implementations as templates | New features following existing patterns |
54
+ | **Migration Target** | Analyze target technology/compatibility | Migrations comparing current vs target |
55
+
56
+ **Decision signals:**
57
+ - **Specificity** (exact files mentioned → fewer agents)
58
+ - **Scope breadth** (multiple domains → more agents)
59
+ - **Uncertainty** (unclear location → more agents)
60
+ - **Task type** (bugs tend focused, features broad, migrations broadest)
61
+
62
+ **Examples:**
63
+
64
+ | Task Description | Roles Selected | Count |
65
+ |------------------|---------------|-------|
66
+ | "Fix null check in `utils/parser.ts`" | File Discovery + Code Analysis (combined) | 1 |
67
+ | "Add sorting to user table" | File Discovery, Code Analysis | 2 |
68
+ | "Fix login timeout" | File Discovery + Code Analysis (combined), Context Discovery | 2 |
69
+ | "Add OAuth authentication system" | File Discovery, Code Analysis, Context Discovery | 3 |
70
+ | "Add export feature similar to import" | File Discovery, Code Analysis, Pattern Mining | 3 |
71
+ | "Migrate from REST to GraphQL" | File Discovery, Code Analysis, Context Discovery, Migration Target | 4 |
72
+
73
+ When selecting fewer agents, merge related concerns into a single prompt — don't drop concerns.
74
+
75
+ State which roles you selected and why (1 sentence).
76
+
77
+ ### Step 3: Read Prompt Templates and Launch Agents
78
+
79
+ > **STOP — Do NOT skip this step. Do NOT write prompts from memory.**
80
+ >
81
+ > Before launching ANY Explore agent, you MUST use the Read tool to load the prompt template for each selected role. This is non-negotiable.
82
+
83
+ **3a. Read templates** — Use the Read tool to load ONLY the files for your selected roles:
84
+
85
+ | Role | Read This File |
86
+ |------|--------------|
87
+ | File Discovery | `references/file-discovery.md` |
88
+ | Code Analysis | `references/code-analysis.md` |
89
+ | Context Discovery | `references/context-discovery.md` |
90
+ | Pattern Mining | `references/pattern-mining.md` |
91
+ | Migration Target | `references/migration-target.md` |
92
+
93
+ If combining roles into one agent, also read `references/combined.md` for merging guidance.
94
+
95
+ **3b. Adapt templates** — Replace `[description]` with the actual task description. Select the correct task-type section (Bug / Enhancement / Feature).
96
+
97
+ **3c. Launch agents** — Use the Task tool with `subagent_type="Explore"` — one call per selected role, all in ONE message.
98
+
99
+ **IMPORTANT**: Every Explore agent prompt MUST include this instruction:
100
+ > IMPORTANT: Do NOT create, write, or modify any files. Output all findings as text in your response only.
101
+
102
+ **SELF-CHECK**: Did you read the template files with the Read tool? If not, go back to 3a. Do not proceed.
103
+
104
+ ### Step 4: Delegate Report Generation
105
+
106
+ After all Explore agents complete, delegate to `codebase-analysis-reporter` subagent via Task tool:
107
+
108
+ ```
109
+ Task tool:
110
+ subagent_type: "codebase-analysis-reporter"
111
+ description: "Merge findings into analysis report"
112
+ prompt: |
113
+ You are the codebase-analysis-reporter. Merge these raw findings into a structured analysis report.
114
+
115
+ Task description: [description]
116
+ Agent roles used: [list of roles]
117
+ Agent count: [N]
118
+ Output path: [task_path]/analysis/[artifact_name]
119
+
120
+ ## Raw Findings
121
+
122
+ ### [Role 1 Name]
123
+ [paste raw output from agent 1]
124
+
125
+ ### [Role 2 Name]
126
+ [paste raw output from agent 2]
127
+
128
+ [... for each agent]
129
+ ```
130
+
131
+ The subagent produces the final report at `{task_path}/analysis/{artifact_name}` and returns structured results.
132
+
133
+ ### Step 5: Return Results to Orchestrator
134
+
135
+ Pass through the subagent's structured output:
136
+
137
+ ```yaml
138
+ status: success|partial|failed
139
+ report_path: analysis/[artifact_name]
140
+ summary: "[1-2 sentence summary]"
141
+ files_found: [count]
142
+ complexity: simple|moderate|complex
143
+ risk_level: low|low-medium|medium|medium-high|high
144
+ ```
145
+
146
+ ---
147
+
148
+ ## Error Handling
149
+
150
+ - **No files found**: Report partial results, suggest user provide more specific hints
151
+ - **Agent timeout**: Use results from completed agents, note incomplete analysis
152
+ - **Conflicting results**: Pass all perspectives to reporter subagent, which highlights conflicts
153
+
154
+ ---
155
+
156
+ ## Integration
157
+
158
+ | Orchestrator | Step (slug) | artifact_name |
159
+ |-------------|-------|---------------|
160
+ | development orchestrator | `codebase-analysed` | `codebase-analysis.md` (default) |
161
+ | migration-analyze | `state-analysed` | `current-state-analysis.md` |
162
+ | performance-analyze | `codebase-analysed` | `codebase-analysis.md` (default) |
@@ -1,63 +1,63 @@
1
- # Code Analysis — Prompt Templates
2
-
3
- Replace `[description]` with the actual task description.
4
-
5
- ## Bug
6
- ```
7
- IMPORTANT: Do NOT create, write, or modify any files. Output all findings as text in your response only.
8
-
9
- Analyze the code related to: "[description]"
10
-
11
- Focus on:
12
- 1. Trace execution flow from input to output
13
- 2. Identify state changes and side effects
14
- 3. Look for edge cases, error conditions, race conditions
15
- 4. Find validation logic and where it might fail
16
- 5. Check for recent changes that might have introduced the bug
17
-
18
- Output:
19
- - Execution flow diagram (text-based)
20
- - Key functions/methods involved
21
- - Potential problem areas
22
- - State management approach
23
- ```
24
-
25
- ## Enhancement
26
- ```
27
- IMPORTANT: Do NOT create, write, or modify any files. Output all findings as text in your response only.
28
-
29
- Analyze the existing implementation of: "[description]"
30
-
31
- Focus on:
32
- 1. Understand current functionality and capabilities
33
- 2. Identify the component/service architecture
34
- 3. Document the data flow (props, state, API calls)
35
- 4. Note coding patterns used (hooks, classes, functional)
36
- 5. Assess complexity (simple/moderate/complex)
37
-
38
- Output:
39
- - Current functionality summary
40
- - Architecture overview
41
- - Key functions and their purposes
42
- - Coding patterns observed
43
- ```
44
-
45
- ## Feature
46
- ```
47
- IMPORTANT: Do NOT create, write, or modify any files. Output all findings as text in your response only.
48
-
49
- Analyze the codebase architecture for adding: "[description]"
50
-
51
- Focus on:
52
- 1. Understand the overall project structure
53
- 2. Identify architectural patterns in use (MVC, component-based, etc.)
54
- 3. Document naming conventions and code style
55
- 4. Find the data layer patterns (API, state management)
56
- 5. Note any relevant abstractions or base classes
57
-
58
- Output:
59
- - Project structure overview
60
- - Architectural patterns to follow
61
- - Naming conventions to match
62
- - Recommended approach for new feature
63
- ```
1
+ # Code Analysis — Prompt Templates
2
+
3
+ Replace `[description]` with the actual task description.
4
+
5
+ ## Bug
6
+ ```
7
+ IMPORTANT: Do NOT create, write, or modify any files. Output all findings as text in your response only.
8
+
9
+ Analyze the code related to: "[description]"
10
+
11
+ Focus on:
12
+ 1. Trace execution flow from input to output
13
+ 2. Identify state changes and side effects
14
+ 3. Look for edge cases, error conditions, race conditions
15
+ 4. Find validation logic and where it might fail
16
+ 5. Check for recent changes that might have introduced the bug
17
+
18
+ Output:
19
+ - Execution flow diagram (text-based)
20
+ - Key functions/methods involved
21
+ - Potential problem areas
22
+ - State management approach
23
+ ```
24
+
25
+ ## Enhancement
26
+ ```
27
+ IMPORTANT: Do NOT create, write, or modify any files. Output all findings as text in your response only.
28
+
29
+ Analyze the existing implementation of: "[description]"
30
+
31
+ Focus on:
32
+ 1. Understand current functionality and capabilities
33
+ 2. Identify the component/service architecture
34
+ 3. Document the data flow (props, state, API calls)
35
+ 4. Note coding patterns used (hooks, classes, functional)
36
+ 5. Assess complexity (simple/moderate/complex)
37
+
38
+ Output:
39
+ - Current functionality summary
40
+ - Architecture overview
41
+ - Key functions and their purposes
42
+ - Coding patterns observed
43
+ ```
44
+
45
+ ## Feature
46
+ ```
47
+ IMPORTANT: Do NOT create, write, or modify any files. Output all findings as text in your response only.
48
+
49
+ Analyze the codebase architecture for adding: "[description]"
50
+
51
+ Focus on:
52
+ 1. Understand the overall project structure
53
+ 2. Identify architectural patterns in use (MVC, component-based, etc.)
54
+ 3. Document naming conventions and code style
55
+ 4. Find the data layer patterns (API, state management)
56
+ 5. Note any relevant abstractions or base classes
57
+
58
+ Output:
59
+ - Project structure overview
60
+ - Architectural patterns to follow
61
+ - Naming conventions to match
62
+ - Recommended approach for new feature
63
+ ```
@@ -1,31 +1,31 @@
1
- # Combined Prompts — Guidance
2
-
3
- When merging multiple roles into a single agent, integrate concerns logically rather than concatenating prompts. Read the individual role templates first, then merge them into a coherent single prompt.
4
-
5
- ## Example: File Discovery + Code Analysis (Bug)
6
-
7
- ```
8
- IMPORTANT: Do NOT create, write, or modify any files. Output all findings as text in your response only.
9
-
10
- Explore and analyze the codebase for: "[description]"
11
-
12
- 1. Find files where the bug likely occurs (search for error keywords, related functionality)
13
- 2. Trace the code path through these files - entry points, handlers, processing logic
14
- 3. Identify state changes, side effects, and potential failure points
15
- 4. Look for edge cases, validation logic, and error handling
16
- 5. Check for related configuration that might affect behavior
17
-
18
- Output:
19
- - Relevant files with paths and why they matter
20
- - Execution flow through identified files
21
- - Key functions/methods and their roles
22
- - Potential problem areas and root cause hypotheses
23
- ```
24
-
25
- ## Merging Principles
26
-
27
- - Unify the focus areas into a single logical flow (don't just list both sets of bullet points)
28
- - Combine the output sections — avoid duplicate asks
29
- - Keep the total prompt concise (aim for 8-12 focus items max)
30
- - The merged prompt should read as one coherent task, not two tasks stitched together
31
- - Always include the no-write constraint: "IMPORTANT: Do NOT create, write, or modify any files. Output all findings as text in your response only."
1
+ # Combined Prompts — Guidance
2
+
3
+ When merging multiple roles into a single agent, integrate concerns logically rather than concatenating prompts. Read the individual role templates first, then merge them into a coherent single prompt.
4
+
5
+ ## Example: File Discovery + Code Analysis (Bug)
6
+
7
+ ```
8
+ IMPORTANT: Do NOT create, write, or modify any files. Output all findings as text in your response only.
9
+
10
+ Explore and analyze the codebase for: "[description]"
11
+
12
+ 1. Find files where the bug likely occurs (search for error keywords, related functionality)
13
+ 2. Trace the code path through these files - entry points, handlers, processing logic
14
+ 3. Identify state changes, side effects, and potential failure points
15
+ 4. Look for edge cases, validation logic, and error handling
16
+ 5. Check for related configuration that might affect behavior
17
+
18
+ Output:
19
+ - Relevant files with paths and why they matter
20
+ - Execution flow through identified files
21
+ - Key functions/methods and their roles
22
+ - Potential problem areas and root cause hypotheses
23
+ ```
24
+
25
+ ## Merging Principles
26
+
27
+ - Unify the focus areas into a single logical flow (don't just list both sets of bullet points)
28
+ - Combine the output sections — avoid duplicate asks
29
+ - Keep the total prompt concise (aim for 8-12 focus items max)
30
+ - The merged prompt should read as one coherent task, not two tasks stitched together
31
+ - Always include the no-write constraint: "IMPORTANT: Do NOT create, write, or modify any files. Output all findings as text in your response only."
@@ -1,63 +1,63 @@
1
- # Context Discovery — Prompt Templates
2
-
3
- Replace `[description]` with the actual task description.
4
-
5
- ## Bug
6
- ```
7
- IMPORTANT: Do NOT create, write, or modify any files. Output all findings as text in your response only.
8
-
9
- Find testing and context information for: "[description]"
10
-
11
- Focus on:
12
- 1. Find existing tests that cover this functionality
13
- 2. Look for test files that might help reproduce the bug
14
- 3. Identify test data or fixtures used
15
- 4. Find related integration or E2E tests
16
- 5. Check for any existing bug reports or TODOs in comments
17
-
18
- Output:
19
- - Relevant test files and what they test
20
- - Test coverage gaps
21
- - Reproduction hints from tests
22
- - Related issues or TODOs found in code
23
- ```
24
-
25
- ## Enhancement
26
- ```
27
- IMPORTANT: Do NOT create, write, or modify any files. Output all findings as text in your response only.
28
-
29
- Find dependencies and consumers for: "[description]"
30
-
31
- Focus on:
32
- 1. Find all files that import/use this feature (consumers)
33
- 2. Identify what this feature depends on (dependencies)
34
- 3. Locate test files and assess coverage
35
- 4. Find API endpoints or routes related to this feature
36
- 5. Check for documentation or comments
37
-
38
- Output:
39
- - Consumer list (who uses this)
40
- - Dependency list (what this uses)
41
- - Test files and coverage assessment
42
- - Integration points
43
- ```
44
-
45
- ## Feature
46
- ```
47
- IMPORTANT: Do NOT create, write, or modify any files. Output all findings as text in your response only.
48
-
49
- Find integration requirements for: "[description]"
50
-
51
- Focus on:
52
- 1. Identify where this feature needs to be registered/routed
53
- 2. Find existing integration patterns (how other features connect)
54
- 3. Look for shared dependencies this feature will need
55
- 4. Check for authentication/authorization patterns to follow
56
- 5. Find configuration or environment requirements
57
-
58
- Output:
59
- - Required integration points
60
- - Patterns to follow for registration
61
- - Shared dependencies to use
62
- - Configuration requirements
63
- ```
1
+ # Context Discovery — Prompt Templates
2
+
3
+ Replace `[description]` with the actual task description.
4
+
5
+ ## Bug
6
+ ```
7
+ IMPORTANT: Do NOT create, write, or modify any files. Output all findings as text in your response only.
8
+
9
+ Find testing and context information for: "[description]"
10
+
11
+ Focus on:
12
+ 1. Find existing tests that cover this functionality
13
+ 2. Look for test files that might help reproduce the bug
14
+ 3. Identify test data or fixtures used
15
+ 4. Find related integration or E2E tests
16
+ 5. Check for any existing bug reports or TODOs in comments
17
+
18
+ Output:
19
+ - Relevant test files and what they test
20
+ - Test coverage gaps
21
+ - Reproduction hints from tests
22
+ - Related issues or TODOs found in code
23
+ ```
24
+
25
+ ## Enhancement
26
+ ```
27
+ IMPORTANT: Do NOT create, write, or modify any files. Output all findings as text in your response only.
28
+
29
+ Find dependencies and consumers for: "[description]"
30
+
31
+ Focus on:
32
+ 1. Find all files that import/use this feature (consumers)
33
+ 2. Identify what this feature depends on (dependencies)
34
+ 3. Locate test files and assess coverage
35
+ 4. Find API endpoints or routes related to this feature
36
+ 5. Check for documentation or comments
37
+
38
+ Output:
39
+ - Consumer list (who uses this)
40
+ - Dependency list (what this uses)
41
+ - Test files and coverage assessment
42
+ - Integration points
43
+ ```
44
+
45
+ ## Feature
46
+ ```
47
+ IMPORTANT: Do NOT create, write, or modify any files. Output all findings as text in your response only.
48
+
49
+ Find integration requirements for: "[description]"
50
+
51
+ Focus on:
52
+ 1. Identify where this feature needs to be registered/routed
53
+ 2. Find existing integration patterns (how other features connect)
54
+ 3. Look for shared dependencies this feature will need
55
+ 4. Check for authentication/authorization patterns to follow
56
+ 5. Find configuration or environment requirements
57
+
58
+ Output:
59
+ - Required integration points
60
+ - Patterns to follow for registration
61
+ - Shared dependencies to use
62
+ - Configuration requirements
63
+ ```