agileflow 2.91.0 → 2.92.1
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.
- package/CHANGELOG.md +10 -0
- package/README.md +6 -6
- package/lib/README.md +178 -0
- package/lib/codebase-indexer.js +32 -23
- package/lib/colors.js +190 -12
- package/lib/consent.js +232 -0
- package/lib/correlation.js +277 -0
- package/lib/error-codes.js +46 -0
- package/lib/errors.js +48 -6
- package/lib/file-cache.js +182 -0
- package/lib/format-error.js +156 -0
- package/lib/path-resolver.js +155 -7
- package/lib/paths.js +212 -20
- package/lib/placeholder-registry.js +205 -0
- package/lib/registry-di.js +358 -0
- package/lib/result-schema.js +363 -0
- package/lib/result.js +210 -0
- package/lib/session-registry.js +13 -0
- package/lib/session-state-machine.js +465 -0
- package/lib/validate-commands.js +308 -0
- package/lib/validate.js +116 -52
- package/package.json +1 -1
- package/scripts/af +34 -0
- package/scripts/agent-loop.js +63 -9
- package/scripts/agileflow-configure.js +2 -2
- package/scripts/agileflow-welcome.js +491 -23
- package/scripts/archive-completed-stories.sh +57 -11
- package/scripts/claude-tmux.sh +102 -0
- package/scripts/damage-control-bash.js +3 -70
- package/scripts/damage-control-edit.js +3 -20
- package/scripts/damage-control-write.js +3 -20
- package/scripts/dependency-check.js +310 -0
- package/scripts/get-env.js +11 -4
- package/scripts/lib/configure-detect.js +23 -1
- package/scripts/lib/configure-features.js +50 -2
- package/scripts/lib/context-formatter.js +771 -0
- package/scripts/lib/context-loader.js +699 -0
- package/scripts/lib/damage-control-utils.js +107 -0
- package/scripts/lib/json-utils.sh +162 -0
- package/scripts/lib/state-migrator.js +353 -0
- package/scripts/lib/story-state-machine.js +437 -0
- package/scripts/obtain-context.js +80 -1248
- package/scripts/pre-push-check.sh +46 -0
- package/scripts/precompact-context.sh +23 -10
- package/scripts/query-codebase.js +127 -14
- package/scripts/ralph-loop.js +5 -5
- package/scripts/session-manager.js +408 -55
- package/scripts/spawn-parallel.js +666 -0
- package/scripts/tui/blessed/data/watcher.js +20 -15
- package/scripts/tui/blessed/index.js +2 -2
- package/scripts/tui/blessed/panels/output.js +14 -8
- package/scripts/tui/blessed/panels/sessions.js +22 -15
- package/scripts/tui/blessed/panels/trace.js +14 -8
- package/scripts/tui/blessed/ui/help.js +3 -3
- package/scripts/tui/blessed/ui/screen.js +4 -4
- package/scripts/tui/blessed/ui/statusbar.js +5 -9
- package/scripts/tui/blessed/ui/tabbar.js +11 -11
- package/scripts/validators/component-validator.js +41 -14
- package/scripts/validators/json-schema-validator.js +11 -4
- package/scripts/validators/markdown-validator.js +1 -2
- package/scripts/validators/migration-validator.js +17 -5
- package/scripts/validators/security-validator.js +137 -33
- package/scripts/validators/story-format-validator.js +31 -10
- package/scripts/validators/test-result-validator.js +19 -4
- package/scripts/validators/workflow-validator.js +12 -5
- package/src/core/agents/codebase-query.md +24 -0
- package/src/core/commands/adr.md +114 -0
- package/src/core/commands/agent.md +120 -0
- package/src/core/commands/assign.md +145 -0
- package/src/core/commands/babysit.md +32 -5
- package/src/core/commands/changelog.md +118 -0
- package/src/core/commands/configure.md +42 -6
- package/src/core/commands/diagnose.md +114 -0
- package/src/core/commands/epic.md +113 -0
- package/src/core/commands/handoff.md +128 -0
- package/src/core/commands/help.md +75 -0
- package/src/core/commands/pr.md +96 -0
- package/src/core/commands/roadmap/analyze.md +400 -0
- package/src/core/commands/session/new.md +132 -6
- package/src/core/commands/session/spawn.md +197 -0
- package/src/core/commands/sprint.md +22 -0
- package/src/core/commands/status.md +74 -0
- package/src/core/commands/story.md +143 -4
- package/src/core/templates/agileflow-metadata.json +55 -2
- package/src/core/templates/plan-template.md +125 -0
- package/src/core/templates/story-lifecycle.md +213 -0
- package/src/core/templates/story-template.md +4 -0
- package/src/core/templates/tdd-test-template.js +241 -0
- package/tools/cli/commands/setup.js +95 -0
- package/tools/cli/installers/core/installer.js +94 -0
- package/tools/cli/installers/ide/_base-ide.js +20 -11
- package/tools/cli/installers/ide/codex.js +29 -47
- package/tools/cli/installers/ide/windsurf.js +1 -1
- package/tools/cli/lib/config-manager.js +17 -2
- package/tools/cli/lib/content-transformer.js +271 -0
- package/tools/cli/lib/error-handler.js +14 -22
- package/tools/cli/lib/ide-error-factory.js +421 -0
- package/tools/cli/lib/ide-health-monitor.js +364 -0
- package/tools/cli/lib/ide-registry.js +113 -2
- package/tools/cli/lib/ui.js +15 -25
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Automated competitor analysis with feature gap identification
|
|
3
|
+
argument-hint: "[COMPETITORS=<keywords>] [FOCUS=all|features|security|perf|ux] [OUTPUT=matrix|report|stories]"
|
|
4
|
+
compact_context:
|
|
5
|
+
priority: high
|
|
6
|
+
preserve_rules:
|
|
7
|
+
- "ACTIVE COMMAND: /agileflow:roadmap:analyze - Competitor analysis orchestrator"
|
|
8
|
+
- "CRITICAL: Use WebSearch for each competitor (max 5 competitors)"
|
|
9
|
+
- "CRITICAL: Compare against current project capabilities from codebase"
|
|
10
|
+
- "MUST categorize features: must-have (2+ competitors) vs nice-to-have (1 competitor)"
|
|
11
|
+
- "MUST include confidence levels: HIGH (verified), MEDIUM (inferred), LOW (uncertain)"
|
|
12
|
+
- "Show preview BEFORE saving (diff-first pattern)"
|
|
13
|
+
- "Output to docs/08-project/roadmap-{YYYYMMDD}.md"
|
|
14
|
+
state_fields:
|
|
15
|
+
- competitors_list
|
|
16
|
+
- focus_area
|
|
17
|
+
- output_mode
|
|
18
|
+
- features_found
|
|
19
|
+
- gaps_identified
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# /agileflow:roadmap:analyze
|
|
23
|
+
|
|
24
|
+
Automated competitor analysis that uses WebSearch to find competitors, analyzes their features, compares against your current project capabilities, and generates a prioritized roadmap with must-have vs nice-to-have recommendations.
|
|
25
|
+
|
|
26
|
+
**Inspired by**: AutoClaude's roadmap feature (see ADR-0010)
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## STEP 0: Gather Context (MANDATORY)
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
node .agileflow/scripts/obtain-context.js roadmap
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
This provides: project overview, tech stack, current features from README/CLAUDE.md.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
<!-- COMPACT_SUMMARY_START -->
|
|
41
|
+
|
|
42
|
+
## Compact Summary - /agileflow:roadmap:analyze IS ACTIVE
|
|
43
|
+
|
|
44
|
+
**Command**: `/agileflow:roadmap:analyze` - Automated competitor analysis
|
|
45
|
+
|
|
46
|
+
**Quick Usage**:
|
|
47
|
+
```
|
|
48
|
+
/agileflow:roadmap:analyze COMPETITORS=cursor,windsurf,aider FOCUS=features OUTPUT=report
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**What It Does**:
|
|
52
|
+
1. Analyze current project capabilities
|
|
53
|
+
2. WebSearch for each competitor
|
|
54
|
+
3. Extract features from search results
|
|
55
|
+
4. Generate comparison matrix
|
|
56
|
+
5. Categorize: must-have vs nice-to-have
|
|
57
|
+
6. Output roadmap report
|
|
58
|
+
|
|
59
|
+
**Arguments**:
|
|
60
|
+
- `COMPETITORS=<keywords>` - Comma-separated competitor names (default: auto-detect from project type)
|
|
61
|
+
- `FOCUS=all|features|security|perf|ux` - Analysis focus (default: all)
|
|
62
|
+
- `OUTPUT=matrix|report|stories` - Output format (default: report)
|
|
63
|
+
|
|
64
|
+
### Tool Usage Examples
|
|
65
|
+
|
|
66
|
+
**WebSearch** (research competitor):
|
|
67
|
+
```xml
|
|
68
|
+
<invoke name="WebSearch">
|
|
69
|
+
<parameter name="query">{competitor} features pricing 2026</parameter>
|
|
70
|
+
</invoke>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**Write** (save roadmap):
|
|
74
|
+
```xml
|
|
75
|
+
<invoke name="Write">
|
|
76
|
+
<parameter name="file_path">/path/to/docs/08-project/roadmap-YYYYMMDD.md</parameter>
|
|
77
|
+
<parameter name="content"># Competitive Roadmap Analysis...</parameter>
|
|
78
|
+
</invoke>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**AskUserQuestion** (next steps):
|
|
82
|
+
```xml
|
|
83
|
+
<invoke name="AskUserQuestion">
|
|
84
|
+
<parameter name="questions">[{"question": "What would you like to do with this roadmap?", "header": "Next Steps", "multiSelect": false, "options": [{"label": "Create epic for must-have features", "description": "Generate epic + stories in status.json"}, {"label": "Research specific feature", "description": "Deep-dive into one gap"}, {"label": "Save and done", "description": "Keep the report"}]}]</parameter>
|
|
85
|
+
</invoke>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Output**: `docs/08-project/roadmap-{YYYYMMDD}.md`
|
|
89
|
+
**Categories**: Must-have (2+ competitors), Nice-to-have (1 competitor), Competitive Advantage (we have, they don't)
|
|
90
|
+
|
|
91
|
+
<!-- COMPACT_SUMMARY_END -->
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## How It Works
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
99
|
+
│ USER: /agileflow:roadmap:analyze │
|
|
100
|
+
│ COMPETITORS=X,Y,Z FOCUS=features │
|
|
101
|
+
└─────────────────────────────────────────────────────────────┘
|
|
102
|
+
│
|
|
103
|
+
▼
|
|
104
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
105
|
+
│ ROADMAP ANALYST │
|
|
106
|
+
│ 1. Parse arguments (COMPETITORS, FOCUS, OUTPUT) │
|
|
107
|
+
│ 2. Analyze current project from CLAUDE.md/README │
|
|
108
|
+
│ 3. WebSearch each competitor (max 5) │
|
|
109
|
+
│ 4. Extract features from search results │
|
|
110
|
+
│ 5. Build comparison matrix │
|
|
111
|
+
│ 6. Categorize gaps by priority │
|
|
112
|
+
│ 7. Generate roadmap report │
|
|
113
|
+
└─────────────────────────────────────────────────────────────┘
|
|
114
|
+
│
|
|
115
|
+
┌───────────────────┼───────────────────┐
|
|
116
|
+
▼ ▼ ▼
|
|
117
|
+
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
|
|
118
|
+
│ WebSearch │ │ WebSearch │ │ WebSearch │
|
|
119
|
+
│ Competitor 1 │ │ Competitor 2 │ │ Competitor 3 │
|
|
120
|
+
│ │ │ │ │ │
|
|
121
|
+
│ Features, │ │ Features, │ │ Features, │
|
|
122
|
+
│ pricing, │ │ pricing, │ │ pricing, │
|
|
123
|
+
│ strengths │ │ strengths │ │ strengths │
|
|
124
|
+
└───────────────┘ └───────────────┘ └───────────────┘
|
|
125
|
+
│ │ │
|
|
126
|
+
└───────────────────┼───────────────────┘
|
|
127
|
+
▼
|
|
128
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
129
|
+
│ COMPARISON ENGINE │
|
|
130
|
+
│ • Map features across competitors │
|
|
131
|
+
│ • Identify gaps (they have, we don't) │
|
|
132
|
+
│ • Identify advantages (we have, they don't) │
|
|
133
|
+
│ • Must-have: 2+ competitors have it │
|
|
134
|
+
│ • Nice-to-have: 1 competitor has it │
|
|
135
|
+
└─────────────────────────────────────────────────────────────┘
|
|
136
|
+
│
|
|
137
|
+
▼
|
|
138
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
139
|
+
│ ROADMAP REPORT │
|
|
140
|
+
│ 📊 Competitors Analyzed: 3 │
|
|
141
|
+
│ 🎯 Must-Have Gaps: 4 features │
|
|
142
|
+
│ 💡 Nice-to-Have: 6 features │
|
|
143
|
+
│ 🏆 Competitive Advantages: 2 features │
|
|
144
|
+
│ 📋 Feature Matrix with checkmarks │
|
|
145
|
+
│ 🚀 Recommended Next Steps │
|
|
146
|
+
└─────────────────────────────────────────────────────────────┘
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Prompt
|
|
152
|
+
|
|
153
|
+
**ROLE**: Roadmap Analyst
|
|
154
|
+
|
|
155
|
+
You analyze competitor products via WebSearch and compare them against the current project to identify feature gaps and competitive advantages. Your output is an actionable roadmap prioritizing must-have features.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Workflow Phases
|
|
160
|
+
|
|
161
|
+
### Phase 1: Parse Arguments & Validate
|
|
162
|
+
|
|
163
|
+
1. Extract COMPETITORS, FOCUS, OUTPUT from arguments
|
|
164
|
+
2. If COMPETITORS not provided:
|
|
165
|
+
- Read CLAUDE.md/README.md to understand project type
|
|
166
|
+
- Suggest 3-5 likely competitors based on project category
|
|
167
|
+
- Ask user to confirm or provide alternatives
|
|
168
|
+
|
|
169
|
+
**Auto-detection heuristics:**
|
|
170
|
+
| Project Type | Likely Competitors |
|
|
171
|
+
|--------------|-------------------|
|
|
172
|
+
| CLI tool for AI coding | cursor, windsurf, aider, copilot |
|
|
173
|
+
| React component library | shadcn, radix, chakra, mantine |
|
|
174
|
+
| API framework | fastapi, express, hono, elysia |
|
|
175
|
+
| Documentation site | docusaurus, nextra, fumadocs, gitbook |
|
|
176
|
+
|
|
177
|
+
### Phase 2: Analyze Current Project
|
|
178
|
+
|
|
179
|
+
1. Read CLAUDE.md and README.md
|
|
180
|
+
2. Extract:
|
|
181
|
+
- Project name and description
|
|
182
|
+
- Key features (look for feature lists, bullet points)
|
|
183
|
+
- Tech stack
|
|
184
|
+
- Target audience
|
|
185
|
+
3. Create internal feature list for comparison
|
|
186
|
+
|
|
187
|
+
### Phase 3: Competitor Research (WebSearch)
|
|
188
|
+
|
|
189
|
+
For each competitor (max 5):
|
|
190
|
+
|
|
191
|
+
```xml
|
|
192
|
+
<invoke name="WebSearch">
|
|
193
|
+
<parameter name="query">{competitor} features pricing comparison 2026</parameter>
|
|
194
|
+
</invoke>
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Extract from results:
|
|
198
|
+
- Feature list
|
|
199
|
+
- Pricing model (free/paid/freemium)
|
|
200
|
+
- Key strengths mentioned
|
|
201
|
+
- Target audience
|
|
202
|
+
- Notable limitations
|
|
203
|
+
|
|
204
|
+
**Important**: Include sources with URLs in final report.
|
|
205
|
+
|
|
206
|
+
### Phase 4: Feature Matrix Generation
|
|
207
|
+
|
|
208
|
+
Build comparison table:
|
|
209
|
+
|
|
210
|
+
| Feature Category | Feature | Our Project | Comp 1 | Comp 2 | Comp 3 |
|
|
211
|
+
|------------------|---------|-------------|--------|--------|--------|
|
|
212
|
+
| Core | Feature A | Y | Y | Y | Y |
|
|
213
|
+
| Core | Feature B | N | Y | Y | N |
|
|
214
|
+
| Advanced | Feature C | Y | N | N | N |
|
|
215
|
+
|
|
216
|
+
Legend:
|
|
217
|
+
- Y = Has feature
|
|
218
|
+
- N = Doesn't have feature
|
|
219
|
+
- ? = Unknown/unclear
|
|
220
|
+
|
|
221
|
+
### Phase 5: Gap Analysis & Prioritization
|
|
222
|
+
|
|
223
|
+
**Must-Have (Priority 1)**:
|
|
224
|
+
- Features that 2+ competitors have
|
|
225
|
+
- We don't have
|
|
226
|
+
- High impact for users
|
|
227
|
+
|
|
228
|
+
**Nice-to-Have (Priority 2)**:
|
|
229
|
+
- Features only 1 competitor has
|
|
230
|
+
- OR features that are niche/specialized
|
|
231
|
+
- Lower impact but differentiating
|
|
232
|
+
|
|
233
|
+
**Competitive Advantages**:
|
|
234
|
+
- Features WE have that competitors lack
|
|
235
|
+
- Highlight these as strengths
|
|
236
|
+
|
|
237
|
+
### Phase 6: Output Generation
|
|
238
|
+
|
|
239
|
+
**Show preview BEFORE saving (diff-first).**
|
|
240
|
+
|
|
241
|
+
Generate report following the Output Template below.
|
|
242
|
+
|
|
243
|
+
Ask for confirmation:
|
|
244
|
+
```xml
|
|
245
|
+
<invoke name="AskUserQuestion">
|
|
246
|
+
<parameter name="questions">[{"question": "Save this roadmap analysis?", "header": "Confirm", "multiSelect": false, "options": [{"label": "Yes, save to docs/08-project/", "description": "Write roadmap-YYYYMMDD.md"}, {"label": "Modify first", "description": "I want to adjust something"}, {"label": "Cancel", "description": "Don't save"}]}]</parameter>
|
|
247
|
+
</invoke>
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### Phase 7: Optional Artifact Creation (if OUTPUT=stories)
|
|
251
|
+
|
|
252
|
+
If user selected OUTPUT=stories:
|
|
253
|
+
1. Create epic for "Competitive Feature Parity"
|
|
254
|
+
2. Generate stories for each must-have feature
|
|
255
|
+
3. Add to status.json
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## Output Template
|
|
260
|
+
|
|
261
|
+
```markdown
|
|
262
|
+
# Competitive Roadmap Analysis
|
|
263
|
+
|
|
264
|
+
**Generated**: {YYYY-MM-DD}
|
|
265
|
+
**Project**: {project name}
|
|
266
|
+
**Competitors Analyzed**: {competitor1}, {competitor2}, {competitor3}
|
|
267
|
+
**Focus Area**: {focus}
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## Executive Summary
|
|
272
|
+
|
|
273
|
+
{2-3 paragraph overview of findings}
|
|
274
|
+
|
|
275
|
+
Key findings:
|
|
276
|
+
- {X} features where we lag behind competitors (must-have gaps)
|
|
277
|
+
- {Y} features unique to single competitors (nice-to-have)
|
|
278
|
+
- {Z} features where we have competitive advantage
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## Current Project Capabilities
|
|
283
|
+
|
|
284
|
+
**Project**: {name}
|
|
285
|
+
**Description**: {from README/CLAUDE.md}
|
|
286
|
+
|
|
287
|
+
**Current Features**:
|
|
288
|
+
- {Feature 1}
|
|
289
|
+
- {Feature 2}
|
|
290
|
+
- {Feature 3}
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## Competitor Analysis
|
|
295
|
+
|
|
296
|
+
### {Competitor 1}
|
|
297
|
+
|
|
298
|
+
**Search Query**: "{query used}"
|
|
299
|
+
**Key Features**:
|
|
300
|
+
- {Feature A}
|
|
301
|
+
- {Feature B}
|
|
302
|
+
- {Feature C}
|
|
303
|
+
|
|
304
|
+
**Strengths**: {what they do well}
|
|
305
|
+
**Weaknesses**: {gaps or limitations}
|
|
306
|
+
**Pricing**: {model if found}
|
|
307
|
+
|
|
308
|
+
### {Competitor 2}
|
|
309
|
+
|
|
310
|
+
[Same structure]
|
|
311
|
+
|
|
312
|
+
### {Competitor 3}
|
|
313
|
+
|
|
314
|
+
[Same structure]
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
## Feature Comparison Matrix
|
|
319
|
+
|
|
320
|
+
| Category | Feature | {Project} | {Comp1} | {Comp2} | {Comp3} | Gap Type |
|
|
321
|
+
|----------|---------|-----------|---------|---------|---------|----------|
|
|
322
|
+
| Core | Feature A | Y | Y | Y | Y | None |
|
|
323
|
+
| Core | Feature B | N | Y | Y | N | Must-Have |
|
|
324
|
+
| Core | Feature C | N | Y | N | N | Nice-to-Have |
|
|
325
|
+
| Advanced | Feature D | Y | N | N | N | Advantage |
|
|
326
|
+
|
|
327
|
+
---
|
|
328
|
+
|
|
329
|
+
## Recommendations
|
|
330
|
+
|
|
331
|
+
### Must-Have Features (High Priority)
|
|
332
|
+
|
|
333
|
+
Features that 2+ competitors have that we lack:
|
|
334
|
+
|
|
335
|
+
1. **{Feature Name}**
|
|
336
|
+
- Found in: {Competitor1}, {Competitor2}
|
|
337
|
+
- Impact: {why users need this}
|
|
338
|
+
- Effort estimate: {Low/Medium/High}
|
|
339
|
+
|
|
340
|
+
2. **{Feature Name}**
|
|
341
|
+
- Found in: {Competitor1}, {Competitor3}
|
|
342
|
+
- Impact: {why users need this}
|
|
343
|
+
- Effort estimate: {Low/Medium/High}
|
|
344
|
+
|
|
345
|
+
### Nice-to-Have Features (Medium Priority)
|
|
346
|
+
|
|
347
|
+
Unique features from single competitors worth considering:
|
|
348
|
+
|
|
349
|
+
1. **{Feature Name}**
|
|
350
|
+
- Found in: {Competitor only}
|
|
351
|
+
- Impact: {potential value}
|
|
352
|
+
- Effort estimate: {Low/Medium/High}
|
|
353
|
+
|
|
354
|
+
### Competitive Advantages (Maintain & Promote)
|
|
355
|
+
|
|
356
|
+
Features we have that competitors lack:
|
|
357
|
+
|
|
358
|
+
1. **{Feature Name}**
|
|
359
|
+
- Our advantage over: {all/specific competitors}
|
|
360
|
+
- Why it matters: {user value}
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
|
|
364
|
+
## Suggested Next Steps
|
|
365
|
+
|
|
366
|
+
- [ ] Prioritize must-have features for next quarter
|
|
367
|
+
- [ ] Create epic for competitive feature parity
|
|
368
|
+
- [ ] Research implementation approaches for top 3 gaps
|
|
369
|
+
- [ ] Document competitive advantages in marketing materials
|
|
370
|
+
|
|
371
|
+
---
|
|
372
|
+
|
|
373
|
+
## Sources
|
|
374
|
+
|
|
375
|
+
- [{Competitor 1} - {page title}]({url})
|
|
376
|
+
- [{Competitor 2} - {page title}]({url})
|
|
377
|
+
- [{Competitor 3} - {page title}]({url})
|
|
378
|
+
|
|
379
|
+
---
|
|
380
|
+
|
|
381
|
+
*Generated by /agileflow:roadmap:analyze on {date}*
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
---
|
|
385
|
+
|
|
386
|
+
## Anti-Patterns
|
|
387
|
+
|
|
388
|
+
- Search too many competitors (>5 = slow, unfocused)
|
|
389
|
+
- Skip project analysis (can't compare without baseline)
|
|
390
|
+
- Save without preview (diff-first is mandatory)
|
|
391
|
+
- Vague feature descriptions ("better UX" vs "keyboard shortcuts for all actions")
|
|
392
|
+
- Missing sources (always include WebSearch URLs)
|
|
393
|
+
|
|
394
|
+
---
|
|
395
|
+
|
|
396
|
+
## Related Commands
|
|
397
|
+
|
|
398
|
+
- `/agileflow:ideate` - Generate improvement ideas from internal analysis
|
|
399
|
+
- `/agileflow:research:ask` - Generate detailed research prompts
|
|
400
|
+
- `/agileflow:epic` - Create epic for implementing roadmap items
|
|
@@ -43,7 +43,23 @@ git rev-parse --is-inside-work-tree
|
|
|
43
43
|
|
|
44
44
|
If not in a git repo, display error and exit.
|
|
45
45
|
|
|
46
|
-
### Step
|
|
46
|
+
### Step 1.5: Check if Inside Tmux Session
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Check if $TMUX environment variable is set
|
|
50
|
+
echo $TMUX
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**If INSIDE tmux** (TMUX is not empty):
|
|
54
|
+
- Use the simplified tmux add-window flow (see Step 2B below)
|
|
55
|
+
- This adds a new window to the CURRENT tmux session instead of creating external worktree
|
|
56
|
+
|
|
57
|
+
**If NOT inside tmux**:
|
|
58
|
+
- Continue with the standard flow (Step 2A below)
|
|
59
|
+
|
|
60
|
+
### Step 2A: Standard Flow (NOT in tmux)
|
|
61
|
+
|
|
62
|
+
Run Session Manager to Get Current State:
|
|
47
63
|
|
|
48
64
|
```bash
|
|
49
65
|
node .agileflow/scripts/session-manager.js status
|
|
@@ -51,7 +67,48 @@ node .agileflow/scripts/session-manager.js status
|
|
|
51
67
|
|
|
52
68
|
Parse the JSON output to understand current sessions.
|
|
53
69
|
|
|
54
|
-
### Step
|
|
70
|
+
### Step 2B: Tmux Flow (INSIDE tmux)
|
|
71
|
+
|
|
72
|
+
When inside tmux, use the simplified add-window flow:
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
AskUserQuestion:
|
|
76
|
+
question: "Name for the new session window?"
|
|
77
|
+
header: "New window"
|
|
78
|
+
multiSelect: false
|
|
79
|
+
options:
|
|
80
|
+
- label: "Auto-generate name"
|
|
81
|
+
description: "Creates parallel-{timestamp} automatically"
|
|
82
|
+
- label: "auth"
|
|
83
|
+
description: "Authentication work"
|
|
84
|
+
- label: "feature"
|
|
85
|
+
description: "New feature development"
|
|
86
|
+
- label: "bugfix"
|
|
87
|
+
description: "Bug fixing"
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Then run:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# If auto-generate selected:
|
|
94
|
+
node .agileflow/scripts/spawn-parallel.js add-window
|
|
95
|
+
|
|
96
|
+
# If named option selected:
|
|
97
|
+
node .agileflow/scripts/spawn-parallel.js add-window --name {selected_name}
|
|
98
|
+
|
|
99
|
+
# If "Other" with custom input:
|
|
100
|
+
node .agileflow/scripts/spawn-parallel.js add-window --name {custom_name}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
The script will:
|
|
104
|
+
1. Create a new git worktree
|
|
105
|
+
2. Add a new tmux window to the current session
|
|
106
|
+
3. Start Claude in that window
|
|
107
|
+
4. Output the Alt+N shortcut to switch to it
|
|
108
|
+
|
|
109
|
+
Display success and exit - skip remaining steps.
|
|
110
|
+
|
|
111
|
+
### Step 3: Present Options with AskUserQuestion (Standard flow only)
|
|
55
112
|
|
|
56
113
|
Use AskUserQuestion to let user choose how to create the session:
|
|
57
114
|
|
|
@@ -169,11 +226,30 @@ To switch to this session, run:
|
|
|
169
226
|
- One short command to type
|
|
170
227
|
- Immediately enables file access to the new session directory
|
|
171
228
|
|
|
229
|
+
## Worktree Creation Timeout
|
|
230
|
+
|
|
231
|
+
By default, worktree creation has a 2-minute (120000ms) timeout. For large repositories with many files, you can increase this:
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
# Increase timeout to 5 minutes (300000ms)
|
|
235
|
+
node .agileflow/scripts/session-manager.js create --timeout 300000
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
During worktree creation, progress feedback is displayed:
|
|
239
|
+
- **TTY (terminal)**: Animated spinner
|
|
240
|
+
- **Non-TTY (Claude Code)**: Periodic "still working" messages every 10 seconds
|
|
241
|
+
|
|
242
|
+
If worktree creation times out or fails, the script automatically cleans up:
|
|
243
|
+
- Removes any partial worktree directory
|
|
244
|
+
- Prunes git worktree registry
|
|
245
|
+
- Removes the branch if we just created it
|
|
246
|
+
|
|
172
247
|
## Error Handling
|
|
173
248
|
|
|
174
249
|
- **Directory exists**: Suggest different name or manual cleanup
|
|
175
250
|
- **Branch conflict**: Offer to use existing branch or create new one
|
|
176
251
|
- **Git errors**: Display error message and suggest manual resolution
|
|
252
|
+
- **Timeout**: Suggest increasing timeout for large repos
|
|
177
253
|
|
|
178
254
|
## Related Commands
|
|
179
255
|
|
|
@@ -187,11 +263,58 @@ To switch to this session, run:
|
|
|
187
263
|
|
|
188
264
|
## ⚠️ COMPACT SUMMARY - /agileflow:session:new IS ACTIVE
|
|
189
265
|
|
|
190
|
-
**CRITICAL**: This command creates new parallel sessions with git worktrees.
|
|
266
|
+
**CRITICAL**: This command creates new parallel sessions with git worktrees.
|
|
267
|
+
|
|
268
|
+
**TWO MODES:**
|
|
269
|
+
1. **In tmux**: Adds a new window to current session (fast, Alt+N to switch)
|
|
270
|
+
2. **Not in tmux**: Creates worktree with /add-dir navigation
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
### 🚨 RULE #0: CHECK IF IN TMUX FIRST
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
echo $TMUX
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
**If TMUX is NOT empty** → Use TMUX FLOW (Rule #1B)
|
|
281
|
+
**If TMUX is empty** → Use STANDARD FLOW (Rule #1A onwards)
|
|
282
|
+
|
|
283
|
+
---
|
|
284
|
+
|
|
285
|
+
### 🚨 RULE #1B: TMUX FLOW (when in tmux)
|
|
286
|
+
|
|
287
|
+
Ask for session name:
|
|
288
|
+
```xml
|
|
289
|
+
<invoke name="AskUserQuestion">
|
|
290
|
+
<parameter name="questions">[{
|
|
291
|
+
"question": "Name for the new session window?",
|
|
292
|
+
"header": "New window",
|
|
293
|
+
"multiSelect": false,
|
|
294
|
+
"options": [
|
|
295
|
+
{"label": "Auto-generate name", "description": "Creates parallel-{timestamp} automatically"},
|
|
296
|
+
{"label": "auth", "description": "Authentication work"},
|
|
297
|
+
{"label": "feature", "description": "New feature development"},
|
|
298
|
+
{"label": "bugfix", "description": "Bug fixing"}
|
|
299
|
+
]
|
|
300
|
+
}]</parameter>
|
|
301
|
+
</invoke>
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
Then run:
|
|
305
|
+
```bash
|
|
306
|
+
# Auto-generate:
|
|
307
|
+
node .agileflow/scripts/spawn-parallel.js add-window
|
|
308
|
+
|
|
309
|
+
# Named:
|
|
310
|
+
node .agileflow/scripts/spawn-parallel.js add-window --name {name}
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
The script outputs the Alt+N shortcut. **DONE - skip remaining rules.**
|
|
191
314
|
|
|
192
315
|
---
|
|
193
316
|
|
|
194
|
-
### 🚨 RULE #
|
|
317
|
+
### 🚨 RULE #1A: VALIDATE PREREQUISITES (standard flow)
|
|
195
318
|
|
|
196
319
|
Before doing anything, check:
|
|
197
320
|
```bash
|
|
@@ -475,8 +598,11 @@ To switch to this session, run:
|
|
|
475
598
|
### REMEMBER AFTER COMPACTION
|
|
476
599
|
|
|
477
600
|
- `/agileflow:session:new` IS ACTIVE
|
|
478
|
-
-
|
|
479
|
-
-
|
|
601
|
+
- **CHECK $TMUX FIRST** - determines which flow to use
|
|
602
|
+
- **In tmux**: Use `spawn-parallel.js add-window` → fast, Alt+N to switch
|
|
603
|
+
- **Not in tmux**: Standard worktree flow → /add-dir to switch
|
|
604
|
+
- ALWAYS validate git repo first (for standard flow)
|
|
605
|
+
- Present 3 options: auto-create / named / existing branch (standard flow)
|
|
480
606
|
- Each option leads to different flow
|
|
481
607
|
- Use AskUserQuestion for user selections
|
|
482
608
|
- Handle all error cases (directory, branch, git)
|