agileflow 3.0.1 → 3.0.2

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 (52) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/README.md +3 -3
  3. package/lib/api-server.js +3 -2
  4. package/lib/flag-detection.js +4 -2
  5. package/lib/git-operations.js +4 -2
  6. package/lib/process-executor.js +24 -9
  7. package/lib/skill-loader.js +11 -3
  8. package/package.json +1 -1
  9. package/scripts/agileflow-welcome.js +65 -25
  10. package/scripts/claude-tmux.sh +9 -3
  11. package/scripts/damage-control-multi-agent.js +14 -10
  12. package/scripts/lib/bus-utils.js +3 -1
  13. package/scripts/lib/configure-detect.js +12 -9
  14. package/scripts/lib/configure-features.js +12 -7
  15. package/scripts/lib/configure-repair.js +6 -5
  16. package/scripts/lib/context-formatter.js +13 -3
  17. package/scripts/lib/damage-control-utils.js +5 -1
  18. package/scripts/lib/lifecycle-detector.js +5 -3
  19. package/scripts/lib/process-cleanup.js +8 -4
  20. package/scripts/lib/scale-detector.js +47 -8
  21. package/scripts/lib/signal-detectors.js +117 -59
  22. package/scripts/lib/task-registry.js +5 -1
  23. package/scripts/lib/team-events.js +4 -4
  24. package/scripts/messaging-bridge.js +7 -1
  25. package/scripts/ralph-loop.js +10 -8
  26. package/scripts/smart-detect.js +32 -11
  27. package/scripts/team-manager.js +1 -1
  28. package/scripts/tmux-task-name.sh +75 -0
  29. package/scripts/tmux-task-watcher.sh +177 -0
  30. package/src/core/commands/babysit.md +75 -42
  31. package/src/core/commands/blockers.md +7 -7
  32. package/src/core/commands/configure.md +5 -36
  33. package/src/core/commands/discovery/brief.md +363 -0
  34. package/src/core/commands/discovery/new.md +395 -0
  35. package/src/core/commands/ideate/new.md +5 -5
  36. package/src/core/commands/logic/audit.md +5 -5
  37. package/src/core/commands/review.md +7 -1
  38. package/src/core/commands/rpi.md +61 -26
  39. package/src/core/commands/sprint.md +7 -6
  40. package/src/core/templates/product-brief.md +136 -0
  41. package/tools/cli/installers/ide/claude-code.js +67 -2
  42. package/src/core/agents/configuration/archival.md +0 -350
  43. package/src/core/agents/configuration/attribution.md +0 -343
  44. package/src/core/agents/configuration/ci.md +0 -1103
  45. package/src/core/agents/configuration/damage-control.md +0 -375
  46. package/src/core/agents/configuration/git-config.md +0 -537
  47. package/src/core/agents/configuration/hooks.md +0 -623
  48. package/src/core/agents/configuration/precompact.md +0 -302
  49. package/src/core/agents/configuration/status-line.md +0 -557
  50. package/src/core/agents/configuration/verify.md +0 -618
  51. package/src/core/agents/configuration-damage-control.md +0 -259
  52. package/src/core/agents/configuration-visual-e2e.md +0 -339
@@ -636,23 +636,12 @@ Then re-ask the enable/disable question.
636
636
  </invoke>
637
637
  ```
638
638
 
639
- Spawn the appropriate configuration agent:
639
+ Handle each selection directly:
640
640
 
641
- ```javascript
642
- // Visual E2E
643
- Task({ subagent_type: "configuration-visual-e2e", description: "Configure Visual E2E", prompt: "..." })
644
-
645
- // Damage Control
646
- Task({ subagent_type: "configuration-damage-control", description: "Configure Damage Control", prompt: "..." })
647
-
648
- // CI/CD
649
- Task({ subagent_type: "configuration-ci", description: "Configure CI/CD", prompt: "..." })
650
-
651
- // Quality Gates - configure TeammateIdle and TaskCompleted hooks
652
- // Writes gate config to agileflow-metadata.json under quality_gates key
653
- // Options: enable/disable tests, lint, types gates per hook
654
- // Sets thresholds for coverage gates
655
- ```
641
+ - **Visual E2E**: `node .agileflow/scripts/agileflow-configure.js --enable=visuale2e`
642
+ - **Damage Control**: `node .agileflow/scripts/agileflow-configure.js --enable=damagecontrol`
643
+ - **CI/CD**: `node .agileflow/scripts/agileflow-configure.js --enable=ci`
644
+ - **Quality Gates**: Update `docs/00-meta/agileflow-metadata.json` under the `quality_gates` key with enable/disable for tests, lint, types gates per hook and coverage thresholds
656
645
 
657
646
  ---
658
647
 
@@ -984,26 +973,6 @@ The script updates `docs/00-meta/agileflow-metadata.json`:
984
973
  }
985
974
  ```
986
975
 
987
- ## Complex Features (Spawn Agents)
988
-
989
- For features needing extra user input, spawn specialized agents:
990
-
991
- ```javascript
992
- // CI/CD - needs provider and commands
993
- Task({
994
- subagent_type: "agileflow-configuration:ci",
995
- description: "Configure CI/CD",
996
- prompt: "Set up CI/CD workflow. Ask for provider (GitHub Actions, GitLab CI, CircleCI) and commands."
997
- })
998
-
999
- // Git config - needs remote URL
1000
- Task({
1001
- subagent_type: "agileflow-configuration:git-config",
1002
- description: "Configure git",
1003
- prompt: "Set up git remote. Ask for URL."
1004
- })
1005
- ```
1006
-
1007
976
  ## Rules
1008
977
 
1009
978
  1. **Always show detection first** - User sees current state before changes
@@ -0,0 +1,363 @@
1
+ ---
2
+ description: Synthesize ideation and research findings into a structured Product Brief
3
+ argument-hint: "TOPIC=<text> [IDEATION=<path>] [RESEARCH=<path,...>]"
4
+ compact_context:
5
+ priority: critical
6
+ preserve_rules:
7
+ - "ACTIVE COMMAND: /agileflow:discovery:brief - Product Brief synthesis"
8
+ - "MUST read ideation report and/or research files as input"
9
+ - "MUST generate a Product Brief using the product-brief template structure"
10
+ - "MoSCoW mapping: HIGH-confidence ideas = MUST HAVE, single-expert ideas = SHOULD HAVE"
11
+ - "MUST include: Executive Summary, Personas, MoSCoW Features, Success Metrics, ROI, Risks"
12
+ - "Output: docs/08-project/briefs/{YYYYMMDD}-{topic-slug}-brief.md"
13
+ - "If no ideation/research files provided, search docs/08-project/ideation/ and docs/10-research/ for recent files"
14
+ - "After brief generation, offer: create epic, refine, or done"
15
+ state_fields:
16
+ - topic
17
+ - ideation_file
18
+ - research_files
19
+ - brief_path
20
+ - brief_generated
21
+ ---
22
+
23
+ # /agileflow:discovery:brief
24
+
25
+ Synthesize brainstorming results and research findings into a professional Product Brief artifact.
26
+
27
+ ---
28
+
29
+ ## Purpose
30
+
31
+ Generate a structured Product Brief that combines:
32
+ - Ideation report findings (feature ideas, confidence levels, expert perspectives)
33
+ - Research data (competitive analysis, market sizing, best practices)
34
+ - Your own knowledge synthesis
35
+
36
+ This can be used standalone (with existing ideation/research files) or as Phase 3 of the `/agileflow:discovery:new` workflow.
37
+
38
+ ---
39
+
40
+ ## STEP 0: Gather Context
41
+
42
+ ```bash
43
+ node .agileflow/scripts/obtain-context.js discovery:brief
44
+ ```
45
+
46
+ ---
47
+
48
+ <!-- COMPACT_SUMMARY_START -->
49
+
50
+ ## Compact Summary
51
+
52
+ **Command**: `/agileflow:discovery:brief` - Generate Product Brief from ideation + research
53
+
54
+ **Quick Usage**:
55
+ ```
56
+ /agileflow:discovery:brief TOPIC="Mobile time tracking app"
57
+ /agileflow:discovery:brief TOPIC="AI code review" IDEATION=docs/08-project/ideation/ideation-20260213.md
58
+ /agileflow:discovery:brief TOPIC="Dashboard" RESEARCH=docs/10-research/20260213-dashboard-research.md
59
+ ```
60
+
61
+ **What It Does**: Read ideation + research inputs -> Synthesize into Product Brief -> Save to docs/08-project/briefs/
62
+
63
+ **Key Sections Generated**:
64
+ - Executive Summary (problem + value prop)
65
+ - User Personas (from research/brainstorm)
66
+ - Features with MoSCoW prioritization
67
+ - Success Metrics
68
+ - Simple ROI / Business Case
69
+ - Competitive Context
70
+ - Risks and Edge Cases
71
+ - Next Steps
72
+
73
+ **Output**: `docs/08-project/briefs/{YYYYMMDD}-{topic-slug}-brief.md`
74
+
75
+ <!-- COMPACT_SUMMARY_END -->
76
+
77
+ ---
78
+
79
+ ## Prompt
80
+
81
+ ROLE: Product Brief Synthesizer
82
+
83
+ You analyze ideation reports and research findings to produce a comprehensive Product Brief. You transform raw ideas and data into a structured, actionable document ready for epic/story planning.
84
+
85
+ ### STEP 1: PARSE ARGUMENTS & LOCATE INPUTS
86
+
87
+ Parse the user's input:
88
+
89
+ | Argument | Required | Default | Description |
90
+ |----------|----------|---------|-------------|
91
+ | TOPIC | Yes | - | The product/feature being briefed |
92
+ | IDEATION | No | Auto-detect | Path to ideation report |
93
+ | RESEARCH | No | Auto-detect | Comma-separated paths to research files |
94
+
95
+ **If TOPIC is missing**, ask the user.
96
+
97
+ **Auto-detect inputs** if paths not provided:
98
+ 1. Search `docs/08-project/ideation/` for recent ideation reports matching the topic
99
+ 2. Search `docs/10-research/` for recent research files matching the topic
100
+ 3. If no files found, that's OK - generate brief from topic + internal knowledge
101
+
102
+ **Read all located files** using the Read tool. Extract:
103
+ - From ideation: ideas, confidence levels, expert names, categories, effort estimates
104
+ - From research: competitive data, market info, user segments, best practices
105
+
106
+ ---
107
+
108
+ ### STEP 2: SYNTHESIZE EXECUTIVE SUMMARY
109
+
110
+ Write a 2-3 sentence executive summary that captures:
111
+ 1. The problem being solved
112
+ 2. The proposed solution / value proposition
113
+ 3. The key differentiator or opportunity
114
+
115
+ **Source**: Combine the highest-confidence ideas from ideation with market context from research.
116
+
117
+ ---
118
+
119
+ ### STEP 3: EXTRACT USER PERSONAS
120
+
121
+ Create 2-3 user personas:
122
+
123
+ **From research data** (if available):
124
+ - User segments identified in market analysis
125
+ - Pain points from competitive weaknesses
126
+ - Demographics or role-based segments
127
+
128
+ **From ideation data** (if available):
129
+ - "Target users" sections from expert brainstorms
130
+ - User needs implied by feature suggestions
131
+
132
+ **If neither available**: Infer reasonable personas from the topic domain.
133
+
134
+ For each persona, provide:
135
+ - Name (descriptive, e.g., "Solo Freelancer" not "User A")
136
+ - Role description
137
+ - Key pain points (2-3)
138
+ - Goals (2-3)
139
+ - Current workaround
140
+
141
+ ---
142
+
143
+ ### STEP 4: MAP FEATURES TO MoSCoW
144
+
145
+ Categorize all features/ideas using MoSCoW prioritization:
146
+
147
+ **MUST HAVE** - Features that are:
148
+ - Agreed by 2+ experts in ideation (HIGH confidence)
149
+ - Core to the value proposition
150
+ - Required for minimum viable product
151
+ - Validated by competitive analysis as table-stakes
152
+
153
+ **SHOULD HAVE** - Features that are:
154
+ - Suggested by 1 expert with strong rationale
155
+ - Important for user satisfaction but not critical for launch
156
+ - Mentioned in research as common expectations
157
+
158
+ **COULD HAVE** - Features that are:
159
+ - Nice-to-have differentiators
160
+ - Future enhancement opportunities
161
+ - Mentioned in brainstorming but lower priority
162
+
163
+ **WON'T HAVE** - Explicitly out of scope:
164
+ - Features that were discussed and rejected (with rationale)
165
+ - Scope boundaries to prevent creep
166
+ - Items deferred to v2+
167
+
168
+ For each feature, include:
169
+ - Feature name
170
+ - Brief rationale (why this priority?)
171
+ - Source (which expert or research file)
172
+
173
+ ---
174
+
175
+ ### STEP 5: DEFINE SUCCESS METRICS
176
+
177
+ Define 3-5 measurable success metrics:
178
+
179
+ **Draw from:**
180
+ - Problem statement (what does success look like?)
181
+ - User personas (what outcomes do they care about?)
182
+ - Competitive gaps (how do we measure differentiation?)
183
+
184
+ **Format each metric as:**
185
+ | Metric | Target | How to Measure |
186
+ |--------|--------|----------------|
187
+
188
+ Include both:
189
+ - **Leading indicators** (adoption rate, feature usage, engagement)
190
+ - **Lagging indicators** (retention, satisfaction, business impact)
191
+
192
+ ---
193
+
194
+ ### STEP 6: ESTIMATE BUSINESS CASE (Simple ROI)
195
+
196
+ Provide a simple, honest business case:
197
+
198
+ - **Effort Estimate**: Based on MUST HAVE + SHOULD HAVE feature count and complexity. Express as T-shirt size (S/M/L/XL) with approximate person-weeks.
199
+ - **Expected Benefit**: Based on persona pain points and market opportunity. Keep qualitative unless research provides specific data.
200
+ - **Payback Period**: Rough estimate (weeks/months/quarters).
201
+ - **Confidence Level**: Low/Medium/High based on available data.
202
+
203
+ **Do NOT over-model.** A sentence or two per item is sufficient. This is order-of-magnitude estimation, not financial analysis.
204
+
205
+ ---
206
+
207
+ ### STEP 7: SUMMARIZE COMPETITIVE CONTEXT
208
+
209
+ **If research data available:**
210
+ - Create comparison table of top alternatives
211
+ - Identify strengths, weaknesses, and our differentiator for each
212
+ - Write a positioning statement
213
+
214
+ **If no research data:**
215
+ - Note that competitive research was not conducted
216
+ - Suggest running `/agileflow:research:ask` for competitive analysis
217
+ - Provide any known alternatives from internal knowledge
218
+
219
+ ---
220
+
221
+ ### STEP 8: IDENTIFY RISKS AND EDGE CASES
222
+
223
+ List 3-5 risks with severity, likelihood, and mitigation:
224
+
225
+ **Sources:**
226
+ - Ideation report "risks" sections
227
+ - Competitive threats from research
228
+ - Technical complexity from architecture expert
229
+ - Market risks (timing, adoption barriers)
230
+
231
+ ---
232
+
233
+ ### STEP 9: ADD TECHNICAL CONSIDERATIONS
234
+
235
+ Brief technical notes (if architecture/API expert input available):
236
+ - Recommended tech stack or approach
237
+ - Key architectural decisions to make
238
+ - Integration points or dependencies
239
+ - Performance or scaling considerations
240
+
241
+ Keep this section brief - detailed technical architecture belongs in ADRs, not the brief.
242
+
243
+ ---
244
+
245
+ ### STEP 10: WRITE AND SAVE THE BRIEF
246
+
247
+ **Compose the full Product Brief** following the template structure.
248
+
249
+ **Create directory if needed:**
250
+ ```bash
251
+ mkdir -p docs/08-project/briefs
252
+ ```
253
+
254
+ **Generate filename**: `docs/08-project/briefs/{YYYYMMDD}-{topic-slug}-brief.md`
255
+
256
+ **Fill in the frontmatter:**
257
+ - `brief_id`: `BRIEF-{YYYYMMDD}-{NNN}` (sequential)
258
+ - `topic`: The TOPIC argument
259
+ - `depth`: quick/guided/deep (or "standalone" if run directly)
260
+ - `created`: ISO date
261
+ - `status`: draft
262
+ - `ideation_source`: Path to ideation file (or "none")
263
+ - `research_sources`: Comma-separated paths (or "none")
264
+
265
+ **Write the file** using the Write tool.
266
+
267
+ **Tell the user:**
268
+ ```
269
+ Product Brief generated!
270
+ Saved to: docs/08-project/briefs/{filename}
271
+
272
+ Summary:
273
+ - {N} MUST HAVE features
274
+ - {N} SHOULD HAVE features
275
+ - {N} COULD HAVE features
276
+ - {N} WON'T HAVE items
277
+ - {N} personas defined
278
+ - {N} success metrics
279
+ - {N} risks identified
280
+ ```
281
+
282
+ ---
283
+
284
+ ### STEP 11: OFFER NEXT STEPS
285
+
286
+ ```xml
287
+ <invoke name="AskUserQuestion">
288
+ <parameter name="questions">[{"question": "Product Brief for '{TOPIC}' is ready. What would you like to do?", "header": "Next Steps", "multiSelect": false, "options": [{"label": "Create epic from this brief (Recommended)", "description": "Run /agileflow:epic to decompose MUST/SHOULD HAVE features into stories"}, {"label": "Refine the brief", "description": "Edit specific sections, adjust priorities, or add detail"}, {"label": "Run competitive research", "description": "Generate research prompt for deeper competitive/market analysis"}, {"label": "Done for now", "description": "Brief saved, review and return later"}]}]</parameter>
289
+ </invoke>
290
+ ```
291
+
292
+ ---
293
+
294
+ ## Arguments
295
+
296
+ | Argument | Values | Default | Description |
297
+ |----------|--------|---------|-------------|
298
+ | TOPIC | Free text | (required) | The product/feature being briefed |
299
+ | IDEATION | File path | Auto-detect | Path to ideation report in docs/08-project/ideation/ |
300
+ | RESEARCH | File paths | Auto-detect | Comma-separated paths to research files in docs/10-research/ |
301
+
302
+ {{argument}}
303
+
304
+ ---
305
+
306
+ ## Examples
307
+
308
+ ### Standalone (no prior ideation)
309
+ ```
310
+ /agileflow:discovery:brief TOPIC="Real-time collaboration for docs"
311
+ ```
312
+ Generates a brief from internal knowledge + topic analysis.
313
+
314
+ ### With existing ideation
315
+ ```
316
+ /agileflow:discovery:brief TOPIC="API rate limiter" IDEATION=docs/08-project/ideation/ideation-20260213-api-rate-limiter.md
317
+ ```
318
+ Reads the ideation report and synthesizes into a brief.
319
+
320
+ ### With ideation + research
321
+ ```
322
+ /agileflow:discovery:brief TOPIC="Mobile app" IDEATION=docs/08-project/ideation/ideation-20260213-mobile-app.md RESEARCH=docs/10-research/20260213-mobile-market-research.md,docs/10-research/20260213-mobile-competitors.md
323
+ ```
324
+ Full synthesis from both sources.
325
+
326
+ ---
327
+
328
+ ## Expected Output
329
+
330
+ ### Success
331
+
332
+ ```
333
+ Product Brief: "Real-time Collaboration for Docs"
334
+ ================================================
335
+
336
+ Reading inputs...
337
+ Ideation report: docs/08-project/ideation/ideation-20260213-realtime-collab.md (15 ideas)
338
+ Research: docs/10-research/20260213-realtime-collab-research.md
339
+
340
+ Synthesizing...
341
+ Executive Summary... done
342
+ User Personas (3 defined)... done
343
+ Features: 4 MUST, 3 SHOULD, 5 COULD, 2 WON'T... done
344
+ Success Metrics (4 defined)... done
345
+ Business Case... done
346
+ Competitive Context (3 alternatives)... done
347
+ Risks (4 identified)... done
348
+
349
+ Saved to: docs/08-project/briefs/20260213-realtime-collaboration-for-docs-brief.md
350
+
351
+ What would you like to do next?
352
+ ```
353
+
354
+ ---
355
+
356
+ ## Related Commands
357
+
358
+ - `/agileflow:discovery:new` - Full discovery workflow (brainstorm + research + brief)
359
+ - `/agileflow:ideate:new` - Generate ideation report
360
+ - `/agileflow:research:ask` - Generate research prompts
361
+ - `/agileflow:research:synthesize` - Synthesize multiple research files
362
+ - `/agileflow:epic` - Create epic from brief
363
+ - `/agileflow:council` - Get architectural advice