agileflow 2.77.0 → 2.78.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 (113) hide show
  1. package/README.md +3 -3
  2. package/package.json +6 -1
  3. package/scripts/agileflow-configure.js +174 -2
  4. package/scripts/agileflow-statusline.sh +171 -78
  5. package/scripts/agileflow-welcome.js +79 -2
  6. package/scripts/damage-control-bash.js +232 -0
  7. package/scripts/damage-control-edit.js +243 -0
  8. package/scripts/damage-control-write.js +243 -0
  9. package/src/core/agents/accessibility.md +124 -53
  10. package/src/core/agents/adr-writer.md +192 -52
  11. package/src/core/agents/analytics.md +139 -60
  12. package/src/core/agents/api.md +173 -63
  13. package/src/core/agents/ci.md +139 -57
  14. package/src/core/agents/compliance.md +159 -68
  15. package/src/core/agents/configuration/damage-control.md +356 -0
  16. package/src/core/agents/database.md +162 -61
  17. package/src/core/agents/datamigration.md +179 -66
  18. package/src/core/agents/design.md +179 -57
  19. package/src/core/agents/devops.md +160 -3
  20. package/src/core/agents/documentation.md +204 -60
  21. package/src/core/agents/epic-planner.md +147 -55
  22. package/src/core/agents/integrations.md +197 -69
  23. package/src/core/agents/mentor.md +158 -57
  24. package/src/core/agents/mobile.md +159 -67
  25. package/src/core/agents/monitoring.md +154 -65
  26. package/src/core/agents/multi-expert.md +115 -43
  27. package/src/core/agents/orchestrator.md +77 -24
  28. package/src/core/agents/performance.md +130 -75
  29. package/src/core/agents/product.md +151 -55
  30. package/src/core/agents/qa.md +162 -74
  31. package/src/core/agents/readme-updater.md +178 -76
  32. package/src/core/agents/refactor.md +148 -95
  33. package/src/core/agents/research.md +143 -72
  34. package/src/core/agents/security.md +154 -65
  35. package/src/core/agents/testing.md +176 -97
  36. package/src/core/agents/ui.md +170 -79
  37. package/src/core/commands/adr/list.md +171 -0
  38. package/src/core/commands/adr/update.md +235 -0
  39. package/src/core/commands/adr/view.md +252 -0
  40. package/src/core/commands/adr.md +207 -50
  41. package/src/core/commands/agent.md +16 -0
  42. package/src/core/commands/assign.md +148 -44
  43. package/src/core/commands/auto.md +18 -1
  44. package/src/core/commands/babysit.md +361 -36
  45. package/src/core/commands/baseline.md +14 -0
  46. package/src/core/commands/blockers.md +170 -51
  47. package/src/core/commands/board.md +144 -66
  48. package/src/core/commands/changelog.md +15 -0
  49. package/src/core/commands/ci.md +179 -69
  50. package/src/core/commands/compress.md +18 -0
  51. package/src/core/commands/configure.md +16 -0
  52. package/src/core/commands/context/export.md +193 -4
  53. package/src/core/commands/context/full.md +191 -18
  54. package/src/core/commands/context/note.md +248 -4
  55. package/src/core/commands/debt.md +17 -0
  56. package/src/core/commands/deploy.md +208 -65
  57. package/src/core/commands/deps.md +15 -0
  58. package/src/core/commands/diagnose.md +16 -0
  59. package/src/core/commands/docs.md +196 -64
  60. package/src/core/commands/epic/list.md +170 -0
  61. package/src/core/commands/epic/view.md +242 -0
  62. package/src/core/commands/epic.md +192 -69
  63. package/src/core/commands/feedback.md +191 -71
  64. package/src/core/commands/handoff.md +162 -48
  65. package/src/core/commands/help.md +9 -0
  66. package/src/core/commands/ideate.md +446 -0
  67. package/src/core/commands/impact.md +16 -0
  68. package/src/core/commands/metrics.md +141 -37
  69. package/src/core/commands/multi-expert.md +77 -0
  70. package/src/core/commands/packages.md +16 -0
  71. package/src/core/commands/pr.md +161 -67
  72. package/src/core/commands/readme-sync.md +16 -0
  73. package/src/core/commands/research/analyze.md +568 -0
  74. package/src/core/commands/research/ask.md +345 -20
  75. package/src/core/commands/research/import.md +562 -19
  76. package/src/core/commands/research/list.md +173 -5
  77. package/src/core/commands/research/view.md +181 -8
  78. package/src/core/commands/retro.md +135 -48
  79. package/src/core/commands/review.md +219 -47
  80. package/src/core/commands/session/end.md +209 -0
  81. package/src/core/commands/session/history.md +210 -0
  82. package/src/core/commands/session/init.md +116 -0
  83. package/src/core/commands/session/new.md +296 -0
  84. package/src/core/commands/session/resume.md +166 -0
  85. package/src/core/commands/session/status.md +166 -0
  86. package/src/core/commands/skill/create.md +115 -17
  87. package/src/core/commands/skill/delete.md +117 -0
  88. package/src/core/commands/skill/edit.md +104 -0
  89. package/src/core/commands/skill/list.md +128 -0
  90. package/src/core/commands/skill/test.md +135 -0
  91. package/src/core/commands/skill/upgrade.md +542 -0
  92. package/src/core/commands/sprint.md +17 -1
  93. package/src/core/commands/status.md +133 -21
  94. package/src/core/commands/story/list.md +176 -0
  95. package/src/core/commands/story/view.md +265 -0
  96. package/src/core/commands/story-validate.md +101 -1
  97. package/src/core/commands/story.md +204 -51
  98. package/src/core/commands/template.md +16 -1
  99. package/src/core/commands/tests.md +226 -64
  100. package/src/core/commands/update.md +17 -1
  101. package/src/core/commands/validate-expertise.md +16 -0
  102. package/src/core/commands/velocity.md +140 -36
  103. package/src/core/commands/verify.md +14 -0
  104. package/src/core/commands/whats-new.md +30 -0
  105. package/src/core/skills/_learnings/README.md +91 -0
  106. package/src/core/skills/_learnings/_template.yaml +106 -0
  107. package/src/core/skills/_learnings/commit.yaml +69 -0
  108. package/src/core/templates/damage-control-patterns.yaml +234 -0
  109. package/src/core/templates/skill-template.md +53 -11
  110. package/tools/cli/commands/start.js +180 -0
  111. package/tools/cli/tui/Dashboard.js +66 -0
  112. package/tools/cli/tui/StoryList.js +69 -0
  113. package/tools/cli/tui/index.js +16 -0
@@ -1,6 +1,24 @@
1
1
  ---
2
2
  description: Generate detailed research prompt for web AI tools (ChatGPT, Perplexity, etc.)
3
3
  argument-hint: TOPIC=<text> [DETAILS=<constraints>] [ERROR=<error message>]
4
+ compact_context:
5
+ priority: critical
6
+ preserve_rules:
7
+ - "ACTIVE COMMAND: /agileflow:research:ask - Generate research prompt for external AI"
8
+ - "MUST generate 200+ lines minimum (FAIL and regenerate if shorter)"
9
+ - "MUST include 50+ lines of ACTUAL code from user's codebase (not pseudo-code)"
10
+ - "MUST include exact error messages verbatim if troubleshooting"
11
+ - "MUST list 2+ approaches already tried with detailed results"
12
+ - "MUST ask 3+ specific questions (not vague)"
13
+ - "NO FILE WRITES - output only, user will copy/paste to external AI"
14
+ - "Validation required before output: length, code snippets, error details, attempts, questions"
15
+ - "If validation fails: gather missing info and regenerate"
16
+ state_fields:
17
+ - topic
18
+ - error_message
19
+ - codebase_context
20
+ - attempts_tried
21
+ - prompt_generated
4
22
  ---
5
23
 
6
24
  # /agileflow:research:ask
@@ -22,26 +40,332 @@ When you need external research (from ChatGPT, Perplexity, Claude web, Gemini),
22
40
  ---
23
41
 
24
42
  <!-- COMPACT_SUMMARY_START -->
25
- ## Compact Summary
26
-
27
- **Command**: `/agileflow:research:ask TOPIC="your topic"`
28
- **Purpose**: Generate 200+ line research prompt with full context for web AI tools
29
-
30
- ### Critical Rules
31
- - **MUST generate 200+ lines** - fail and regenerate if shorter
32
- - **MUST include actual code snippets** (50+ lines from codebase)
33
- - **MUST include exact error messages** if troubleshooting
34
- - **MUST list what was already tried** if fixing an issue
35
- - **MUST ask 3+ specific questions**
36
- - **NO file writes** - output prompt only
37
-
38
- ### Quality Validation
39
- Before outputting, verify:
40
- - Length 200 lines
41
- - Code snippets ≥50 lines
42
- - Error verbatim if applicable
43
- - ≥2 tried approaches listed
44
- - ≥3 specific questions
43
+
44
+ ## ⚠️ COMPACT SUMMARY - /agileflow:research:ask IS ACTIVE
45
+
46
+ **CRITICAL**: You are running `/agileflow:research:ask`. Generate detailed research prompts for external AI tools.
47
+
48
+ **ROLE**: Generate 200+ line research prompt with actual code, errors, attempts, and specific questions.
49
+
50
+ ---
51
+
52
+ ### 🚨 RULE #1: MINIMUM 200 LINES REQUIRED
53
+
54
+ **Every research prompt MUST be 200+ lines. If it's shorter, gather more context and regenerate.**
55
+
56
+ ```
57
+ WRONG: "How do I implement OAuth in Next.js?" (too short)
58
+ RIGHT: [200+ line detailed prompt with code, error, attempts, questions]
59
+ ```
60
+
61
+ **Why**: Vague short prompts get vague short answers. Detailed prompts get actionable results.
62
+
63
+ **Validation step (BEFORE outputting):**
64
+ - Count lines in the generated prompt
65
+ - If < 200 lines: gather more context and regenerate
66
+ - Do NOT output incomplete prompts
67
+
68
+ ---
69
+
70
+ ### 🚨 RULE #2: INCLUDE 50+ LINES OF ACTUAL CODE
71
+
72
+ **Include actual code from the user's codebase, not pseudo-code or summaries.**
73
+
74
+ ```
75
+ ❌ WRONG:
76
+ ```typescript
77
+ // User authentication logic
78
+ ```
79
+
80
+ ✅ RIGHT:
81
+ ```typescript
82
+ import NextAuth from "next-auth";
83
+ import Google from "next-auth/providers/google";
84
+
85
+ export const { handlers, auth, signIn, signOut } = NextAuth({
86
+ providers: [
87
+ Google({
88
+ clientId: process.env.GOOGLE_CLIENT_ID!,
89
+ clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
90
+ }),
91
+ ],
92
+ callbacks: {
93
+ async jwt({ token, user }) {
94
+ if (user) {
95
+ token.id = user.id;
96
+ }
97
+ return token;
98
+ },
99
+ },
100
+ });
101
+ ```
102
+
103
+ **How to get code:**
104
+ - Read relevant source files using Read tool
105
+ - Extract 50+ lines from actual implementation
106
+ - Include imports, configuration, any relevant code
107
+
108
+ ---
109
+
110
+ ### 🚨 RULE #3: INCLUDE EXACT ERROR MESSAGES
111
+
112
+ **If troubleshooting, include the EXACT error verbatim. Not a summary, not paraphrased.**
113
+
114
+ ```
115
+ ❌ WRONG: "I'm getting an authentication error"
116
+ ✅ RIGHT:
117
+ ```
118
+ [auth][error] CallbackRouteError: Read more at https://errors.authjs.dev#callbackrouteerror
119
+ [auth][cause]: Error: unauthorized_client
120
+ ```
121
+ ```
122
+
123
+ **Include:**
124
+ - Full error message (copy-pasted exactly)
125
+ - Complete stack trace if available
126
+ - When it occurs (which endpoint, which action)
127
+ - Steps to reproduce
128
+
129
+ ---
130
+
131
+ ### 🚨 RULE #4: LIST WHAT WAS ALREADY TRIED (2+ APPROACHES)
132
+
133
+ **Document what approaches were already attempted and why they didn't work.**
134
+
135
+ Format:
136
+ ```
137
+ ## What We've Already Tried
138
+
139
+ ### Attempt 1: [Description]
140
+ **What we did**: [Detailed explanation]
141
+ **Result**: [What happened]
142
+ **Why it didn't work**: [Analysis of why this approach failed]
143
+
144
+ ### Attempt 2: [Description]
145
+ **What we did**: [Detailed explanation]
146
+ **Result**: [What happened]
147
+ **Why it didn't work**: [Analysis]
148
+ ```
149
+
150
+ **This helps external AI:**
151
+ - Avoid suggesting same solutions
152
+ - Understand what's been ruled out
153
+ - Provide alternative approaches
154
+
155
+ ---
156
+
157
+ ### 🚨 RULE #5: ASK 3+ SPECIFIC QUESTIONS
158
+
159
+ **Ask specific, answerable questions. NOT vague ones.**
160
+
161
+ ```
162
+ ❌ WRONG:
163
+ - How do I fix OAuth?
164
+ - What should I do?
165
+ - Why isn't this working?
166
+
167
+ ✅ RIGHT:
168
+ 1. Why does next-auth 5.0.0-beta.4 throw unauthorized_client when credentials are verified correct?
169
+ 2. Is there additional configuration needed for Google OAuth with Next.js 14 App Router?
170
+ 3. What's the correct format for authorized redirect URIs in Google Console for next-auth v5?
171
+ 4. Are there known issues with next-auth 5.0.0-beta.4 and the Google provider?
172
+ ```
173
+
174
+ **Good questions:**
175
+ - Reference specific libraries/versions
176
+ - Ask about trade-offs ("Should we use X or Y?")
177
+ - Ask about configuration details
178
+ - Ask about known issues
179
+
180
+ ---
181
+
182
+ ### 🚨 RULE #6: MANDATORY SECTIONS (IN ORDER)
183
+
184
+ Every research prompt MUST have:
185
+
186
+ 1. **Project Context** - Framework, versions, dependencies
187
+ 2. **Current Implementation** - 50+ lines of actual code
188
+ 3. **The Problem** - Error message, expected vs actual behavior
189
+ 4. **What We've Tried** - 2+ approaches with results
190
+ 5. **Specific Questions** - 3+ detailed questions
191
+ 6. **What We Need** - Expected response format
192
+ 7. **Environment Details** - Versions, OS, setup
193
+
194
+ ---
195
+
196
+ ### 🚨 RULE #7: NO FILE WRITES
197
+
198
+ **This command outputs a prompt only. User will copy/paste to ChatGPT/Claude/Perplexity.**
199
+
200
+ ```
201
+ ❌ WRONG: Write prompt to file
202
+ ✅ RIGHT: Output prompt in code block, instruct user to copy
203
+ ```
204
+
205
+ ---
206
+
207
+ ### VALIDATION CHECKLIST (BEFORE OUTPUT)
208
+
209
+ **Before outputting, verify ALL:**
210
+
211
+ | Check | Requirement | If Fail |
212
+ |-------|-------------|---------|
213
+ | Length | ≥200 lines | Add more context and regenerate |
214
+ | Code | ≥50 lines actual code | Read more files and extract code |
215
+ | Error | Verbatim message present | Ask user for exact error message |
216
+ | Tried | ≥2 approaches listed | Ask what was already attempted |
217
+ | Questions | ≥3 specific questions | Add more detailed questions |
218
+
219
+ **If ANY check fails:**
220
+ 1. Do NOT output the prompt
221
+ 2. Gather the missing information
222
+ 3. Regenerate with complete content
223
+
224
+ ---
225
+
226
+ ### ANTI-PATTERNS (DON'T DO THESE)
227
+
228
+ ❌ Generate short vague prompts ("How do I do X?")
229
+ ❌ Include pseudo-code instead of actual code
230
+ ❌ Summarize errors instead of including verbatim
231
+ ❌ List no or vague attempted solutions
232
+ ❌ Ask generic questions without context
233
+ ❌ Output prompt shorter than 200 lines
234
+ ❌ Save prompt to file instead of displaying for copy/paste
235
+ ❌ Skip validation before outputting
236
+
237
+ ### DO THESE INSTEAD
238
+
239
+ ✅ Generate detailed 200+ line prompts
240
+ ✅ Include 50+ lines of actual code from codebase
241
+ ✅ Include exact error messages verbatim
242
+ ✅ List 2+ specific attempts with detailed results
243
+ ✅ Ask 3+ specific, contextualized questions
244
+ ✅ Validate prompt quality before outputting
245
+ ✅ Display prompt in code block for user copy/paste
246
+ ✅ Instruct user where to paste results back
247
+
248
+ ---
249
+
250
+ ### WORKFLOW
251
+
252
+ **Phase 1: Gather Context**
253
+ 1. Read package.json / pyproject.toml for versions
254
+ 2. Read relevant source files for code snippets
255
+ 3. Get project overview from README/CLAUDE.md
256
+
257
+ **Phase 2: Extract Information**
258
+ 4. Get error message (if ERROR argument provided)
259
+ 5. Identify what was already tried
260
+ 6. Understand the tech stack
261
+
262
+ **Phase 3: Generate Prompt**
263
+ 7. Create structured prompt with mandatory sections
264
+ 8. Include 50+ lines of actual code
265
+ 9. Include exact error messages
266
+ 10. List 2+ attempted approaches
267
+ 11. Ask 3+ specific questions
268
+
269
+ **Phase 4: Validate Quality**
270
+ 12. Check length ≥200 lines
271
+ 13. Verify code snippets ≥50 lines
272
+ 14. Verify error details if applicable
273
+ 15. Verify 2+ attempts listed
274
+ 16. Verify 3+ specific questions
275
+ 17. If any check fails: gather more info and regenerate
276
+
277
+ **Phase 5: Output**
278
+ 18. Display prompt in code block
279
+ 19. Instruct user: "Copy this prompt and paste into ChatGPT/Claude/Perplexity"
280
+ 20. Provide post-answer instructions: "When you get results, use /agileflow:research:import to save"
281
+
282
+ ---
283
+
284
+ ### KEY FILES
285
+
286
+ | File | Purpose |
287
+ |------|---------|
288
+ | `package.json` | Dependency versions, framework info |
289
+ | `README.md` / `CLAUDE.md` | Project overview |
290
+ | Source files | Code to extract for snippets |
291
+
292
+ ---
293
+
294
+ ### PROMPT TEMPLATE
295
+
296
+ ```markdown
297
+ # Research Request: [TOPIC]
298
+
299
+ ## Project Context
300
+
301
+ **Framework**: [e.g., Next.js 14.0.4 with App Router]
302
+ **Key Dependencies**:
303
+ - [dependency]: [version]
304
+ - [dependency]: [version]
305
+
306
+ ---
307
+
308
+ ## Current Implementation
309
+
310
+ ### File: [path/to/file.ts]
311
+
312
+ [50+ lines of actual code]
313
+
314
+ ---
315
+
316
+ ## The Problem
317
+
318
+ ### Error Message
319
+ [EXACT error, copied verbatim]
320
+
321
+ ### Expected vs Actual
322
+ Expected: [What should happen]
323
+ Actual: [What actually happens]
324
+
325
+ ---
326
+
327
+ ## What We've Already Tried
328
+
329
+ ### Attempt 1: [Description]
330
+ **What**: [Details]
331
+ **Result**: [What happened]
332
+
333
+ ### Attempt 2: [Description]
334
+ **What**: [Details]
335
+ **Result**: [What happened]
336
+
337
+ ---
338
+
339
+ ## Specific Questions
340
+
341
+ 1. **[Specific question with context]**
342
+ 2. **[Specific question with context]**
343
+ 3. **[Specific question with context]**
344
+
345
+ ---
346
+
347
+ ## What We Need
348
+
349
+ 1. Root cause analysis
350
+ 2. Step-by-step solution
351
+ 3. Complete code examples
352
+ 4. Testing approach
353
+ ```
354
+
355
+ ---
356
+
357
+ ### REMEMBER AFTER COMPACTION
358
+
359
+ - `/agileflow:research:ask` IS ACTIVE - you're generating research prompts
360
+ - MUST generate 200+ lines minimum
361
+ - MUST include 50+ lines of actual code (not pseudo-code)
362
+ - MUST include exact error messages verbatim if applicable
363
+ - MUST list 2+ attempts with detailed results
364
+ - MUST ask 3+ specific questions
365
+ - Validate all checks BEFORE outputting
366
+ - NO file writes - output for user to copy/paste
367
+ - After user gets results, they use /agileflow:research:import to save
368
+
45
369
  <!-- COMPACT_SUMMARY_END -->
46
370
 
47
371
  ---
@@ -448,6 +772,7 @@ After clicking "Sign in with Google", immediately get unauthorized_client error.
448
772
 
449
773
  ## Related Commands
450
774
 
775
+ - `/agileflow:research:analyze` - Analyze existing research for implementation
451
776
  - `/agileflow:research:import` - Import research results back
452
777
  - `/agileflow:research:list` - Show research notes index
453
778
  - `/agileflow:research:view` - Read specific research note