agileflow 2.73.0 → 2.75.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.
- package/README.md +3 -3
- package/package.json +1 -1
- package/scripts/agileflow-configure.js +315 -0
- package/src/core/agents/accessibility.md +1 -1
- package/src/core/agents/adr-writer.md +6 -6
- package/src/core/agents/analytics.md +1 -1
- package/src/core/agents/api.md +130 -41
- package/src/core/agents/ci.md +3 -3
- package/src/core/agents/compliance.md +1 -1
- package/src/core/agents/database.md +121 -36
- package/src/core/agents/datamigration.md +1 -1
- package/src/core/agents/design.md +1 -1
- package/src/core/agents/devops.md +2 -2
- package/src/core/agents/documentation.md +1 -1
- package/src/core/agents/epic-planner.md +4 -4
- package/src/core/agents/integrations.md +3 -3
- package/src/core/agents/mentor.md +6 -6
- package/src/core/agents/mobile.md +1 -1
- package/src/core/agents/monitoring.md +1 -1
- package/src/core/agents/performance.md +1 -1
- package/src/core/agents/product.md +3 -3
- package/src/core/agents/qa.md +1 -1
- package/src/core/agents/refactor.md +1 -1
- package/src/core/agents/security.md +4 -4
- package/src/core/agents/testing.md +2 -2
- package/src/core/agents/ui.md +129 -44
- package/src/core/commands/babysit.md +137 -0
- package/src/core/commands/blockers.md +3 -3
- package/src/core/commands/configure.md +88 -1
- package/src/core/commands/context/export.md +99 -0
- package/src/core/commands/context/full.md +172 -0
- package/src/core/commands/context/note.md +128 -0
- package/src/core/commands/research/ask.md +453 -0
- package/src/core/commands/research/import.md +287 -0
- package/src/core/commands/research/list.md +93 -0
- package/src/core/commands/research/view.md +113 -0
- package/src/core/experts/research/expertise.yaml +2 -2
- package/src/core/commands/context.md +0 -417
- package/src/core/commands/research.md +0 -124
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Generate detailed research prompt for web AI tools (ChatGPT, Perplexity, etc.)
|
|
3
|
+
argument-hint: TOPIC=<text> [DETAILS=<constraints>] [ERROR=<error message>]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /agileflow:research:ask
|
|
7
|
+
|
|
8
|
+
Generate a comprehensive, detailed research prompt for external AI tools.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
|
|
14
|
+
When you need external research (from ChatGPT, Perplexity, Claude web, Gemini), this command generates a **detailed, context-rich prompt** that includes:
|
|
15
|
+
- Your current codebase context and code snippets
|
|
16
|
+
- Exact error messages and stack traces
|
|
17
|
+
- What you've already tried
|
|
18
|
+
- Specific questions to answer
|
|
19
|
+
|
|
20
|
+
**This is STEP 1 of research workflow.** After you get results from the external AI, use `/agileflow:research:import` to save them.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
<!-- 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
|
|
45
|
+
<!-- COMPACT_SUMMARY_END -->
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Arguments
|
|
50
|
+
|
|
51
|
+
| Argument | Required | Description |
|
|
52
|
+
|----------|----------|-------------|
|
|
53
|
+
| TOPIC | Yes | What you're researching (e.g., "OAuth 2.0 with Google") |
|
|
54
|
+
| DETAILS | No | Constraints, deadlines, or specific requirements |
|
|
55
|
+
| ERROR | No | Exact error message if troubleshooting |
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## IMMEDIATE ACTIONS
|
|
60
|
+
|
|
61
|
+
Upon invocation, execute these steps:
|
|
62
|
+
|
|
63
|
+
### Step 1: Create Todo List
|
|
64
|
+
|
|
65
|
+
```xml
|
|
66
|
+
<invoke name="TodoWrite">
|
|
67
|
+
<parameter name="todos">[
|
|
68
|
+
{"content": "Gather codebase context", "status": "in_progress", "activeForm": "Gathering context"},
|
|
69
|
+
{"content": "Extract relevant code snippets", "status": "pending", "activeForm": "Extracting code"},
|
|
70
|
+
{"content": "Collect error details", "status": "pending", "activeForm": "Collecting errors"},
|
|
71
|
+
{"content": "Document what was tried", "status": "pending", "activeForm": "Documenting attempts"},
|
|
72
|
+
{"content": "Generate research prompt", "status": "pending", "activeForm": "Generating prompt"},
|
|
73
|
+
{"content": "Validate prompt quality", "status": "pending", "activeForm": "Validating quality"}
|
|
74
|
+
]</parameter>
|
|
75
|
+
</invoke>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Step 2: Gather Codebase Context
|
|
79
|
+
|
|
80
|
+
Read and collect:
|
|
81
|
+
- `package.json` or `pyproject.toml` - Framework, dependencies, versions
|
|
82
|
+
- `docs/context.md` - Project overview if exists
|
|
83
|
+
- `docs/09-agents/status.json` - Current story context
|
|
84
|
+
- Relevant source files for the TOPIC
|
|
85
|
+
|
|
86
|
+
### Step 3: Extract Relevant Code Snippets
|
|
87
|
+
|
|
88
|
+
Find files related to TOPIC and extract **50+ lines of actual code**:
|
|
89
|
+
- Current implementation
|
|
90
|
+
- Related configuration files
|
|
91
|
+
- Import statements and dependencies
|
|
92
|
+
|
|
93
|
+
### Step 4: Collect Error Details (if applicable)
|
|
94
|
+
|
|
95
|
+
If ERROR argument provided or troubleshooting:
|
|
96
|
+
- Full error message (verbatim)
|
|
97
|
+
- Complete stack trace
|
|
98
|
+
- Steps to reproduce
|
|
99
|
+
- When it occurs
|
|
100
|
+
|
|
101
|
+
### Step 5: Document What Was Already Tried
|
|
102
|
+
|
|
103
|
+
If fixing an issue, list **at least 2 approaches** with results:
|
|
104
|
+
- Approach 1: [description] → Result: [what happened]
|
|
105
|
+
- Approach 2: [description] → Result: [what happened]
|
|
106
|
+
|
|
107
|
+
### Step 6: Generate Research Prompt
|
|
108
|
+
|
|
109
|
+
Create a prompt with these **MANDATORY SECTIONS**:
|
|
110
|
+
|
|
111
|
+
```markdown
|
|
112
|
+
# Research Request: [TOPIC]
|
|
113
|
+
|
|
114
|
+
## Project Context
|
|
115
|
+
|
|
116
|
+
**Framework**: [e.g., Next.js 14.0.4 with App Router]
|
|
117
|
+
**Key Dependencies**:
|
|
118
|
+
- [dependency]: [version]
|
|
119
|
+
- [dependency]: [version]
|
|
120
|
+
|
|
121
|
+
**Relevant Files**:
|
|
122
|
+
- `src/auth/login.ts` - Authentication logic
|
|
123
|
+
- `src/api/users.ts` - User API endpoints
|
|
124
|
+
- [list all relevant files]
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Current Implementation
|
|
129
|
+
|
|
130
|
+
### File: [path/to/file.ts]
|
|
131
|
+
|
|
132
|
+
```typescript
|
|
133
|
+
// [50+ lines of actual code from your codebase]
|
|
134
|
+
// DO NOT summarize - include the FULL relevant code
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### File: [path/to/config.ts]
|
|
138
|
+
|
|
139
|
+
```typescript
|
|
140
|
+
// [Additional relevant code]
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## The Problem
|
|
146
|
+
|
|
147
|
+
### Error Message
|
|
148
|
+
```
|
|
149
|
+
[EXACT error message, copied verbatim]
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Stack Trace
|
|
153
|
+
```
|
|
154
|
+
[FULL stack trace if available]
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Expected Behavior
|
|
158
|
+
[What SHOULD happen]
|
|
159
|
+
|
|
160
|
+
### Actual Behavior
|
|
161
|
+
[What ACTUALLY happens]
|
|
162
|
+
|
|
163
|
+
### Steps to Reproduce
|
|
164
|
+
1. [Step 1]
|
|
165
|
+
2. [Step 2]
|
|
166
|
+
3. [Step 3]
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## What We've Already Tried
|
|
171
|
+
|
|
172
|
+
### Attempt 1: [Description]
|
|
173
|
+
**What we did**: [Detailed explanation]
|
|
174
|
+
**Result**: [What happened - did it fail? How?]
|
|
175
|
+
**Why it didn't work**: [Analysis]
|
|
176
|
+
|
|
177
|
+
### Attempt 2: [Description]
|
|
178
|
+
**What we did**: [Detailed explanation]
|
|
179
|
+
**Result**: [What happened]
|
|
180
|
+
**Why it didn't work**: [Analysis]
|
|
181
|
+
|
|
182
|
+
### Attempt 3: [Description] (if applicable)
|
|
183
|
+
**What we did**: [Detailed explanation]
|
|
184
|
+
**Result**: [What happened]
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Specific Questions
|
|
189
|
+
|
|
190
|
+
1. **Why is [specific thing] happening?**
|
|
191
|
+
Context: [relevant detail]
|
|
192
|
+
|
|
193
|
+
2. **What is the correct way to [do X] in [framework version]?**
|
|
194
|
+
Context: [current approach that's failing]
|
|
195
|
+
|
|
196
|
+
3. **Are there known compatibility issues between [A] and [B]?**
|
|
197
|
+
Context: [why you suspect this]
|
|
198
|
+
|
|
199
|
+
4. **What configuration am I missing for [feature]?**
|
|
200
|
+
Context: [current config]
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## What I Need
|
|
205
|
+
|
|
206
|
+
Please provide:
|
|
207
|
+
|
|
208
|
+
1. **Root cause analysis**: Why is this happening?
|
|
209
|
+
|
|
210
|
+
2. **Step-by-step solution** with:
|
|
211
|
+
- Exact code changes needed
|
|
212
|
+
- File paths where changes go
|
|
213
|
+
- Order of operations
|
|
214
|
+
|
|
215
|
+
3. **Complete code examples** that I can copy-paste
|
|
216
|
+
|
|
217
|
+
4. **Gotchas and edge cases** to watch for
|
|
218
|
+
|
|
219
|
+
5. **Testing approach** to verify the fix works
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Environment Details
|
|
224
|
+
|
|
225
|
+
- **Node.js**: [version]
|
|
226
|
+
- **npm/yarn/pnpm**: [version]
|
|
227
|
+
- **OS**: [operating system]
|
|
228
|
+
- **Relevant versions**: [list any relevant tool versions]
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
## References
|
|
233
|
+
|
|
234
|
+
If citing documentation or examples, please include:
|
|
235
|
+
- Source title
|
|
236
|
+
- URL
|
|
237
|
+
- Date accessed (for version relevance)
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### Step 7: Validate Prompt Quality
|
|
241
|
+
|
|
242
|
+
**Before outputting, verify ALL of these:**
|
|
243
|
+
|
|
244
|
+
| Check | Requirement | If Fail |
|
|
245
|
+
|-------|-------------|---------|
|
|
246
|
+
| Length | ≥200 lines | Add more code/context |
|
|
247
|
+
| Code snippets | ≥50 lines actual code | Read more files |
|
|
248
|
+
| Error details | Verbatim message present | Ask user for error |
|
|
249
|
+
| Tried section | ≥2 approaches listed | Ask what was tried |
|
|
250
|
+
| Questions | ≥3 specific questions | Add more questions |
|
|
251
|
+
|
|
252
|
+
**If ANY check fails:**
|
|
253
|
+
1. Do NOT output the prompt
|
|
254
|
+
2. Gather the missing information
|
|
255
|
+
3. Regenerate with complete content
|
|
256
|
+
|
|
257
|
+
### Step 8: Output the Prompt
|
|
258
|
+
|
|
259
|
+
Wrap the final prompt in a code block:
|
|
260
|
+
|
|
261
|
+
````
|
|
262
|
+
```markdown
|
|
263
|
+
[Complete research prompt here - 200+ lines]
|
|
264
|
+
```
|
|
265
|
+
````
|
|
266
|
+
|
|
267
|
+
End with instructions:
|
|
268
|
+
|
|
269
|
+
```
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
Copy this prompt and paste it into ChatGPT, Claude web, Perplexity, or Gemini.
|
|
273
|
+
|
|
274
|
+
When you get the answer, paste the results here and I'll save them to your research folder using `/agileflow:research:import`.
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
## Anti-Pattern: Lazy Prompts
|
|
280
|
+
|
|
281
|
+
**NEVER generate short, vague prompts like:**
|
|
282
|
+
|
|
283
|
+
```
|
|
284
|
+
"How do I fix OAuth in Next.js?"
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
or
|
|
288
|
+
|
|
289
|
+
```
|
|
290
|
+
"Getting an error with authentication, how to fix?"
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
**ALWAYS generate detailed prompts with:**
|
|
294
|
+
- Actual code from the codebase
|
|
295
|
+
- Exact error messages
|
|
296
|
+
- What was already tried
|
|
297
|
+
- Specific questions
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
## Example: Good vs Bad
|
|
302
|
+
|
|
303
|
+
### BAD (Don't do this)
|
|
304
|
+
|
|
305
|
+
```markdown
|
|
306
|
+
# OAuth Issue
|
|
307
|
+
|
|
308
|
+
I'm having trouble with OAuth in my Next.js app. It's not working. How do I fix it?
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
**Problems**: No code, no error, no context, no specific questions.
|
|
312
|
+
|
|
313
|
+
### GOOD (Do this)
|
|
314
|
+
|
|
315
|
+
```markdown
|
|
316
|
+
# Research Request: next-auth Google OAuth unauthorized_client Error
|
|
317
|
+
|
|
318
|
+
## Project Context
|
|
319
|
+
|
|
320
|
+
**Framework**: Next.js 14.0.4 with App Router
|
|
321
|
+
**Key Dependencies**:
|
|
322
|
+
- next-auth: 5.0.0-beta.4
|
|
323
|
+
- next: 14.0.4
|
|
324
|
+
- typescript: 5.3.3
|
|
325
|
+
|
|
326
|
+
**Relevant Files**:
|
|
327
|
+
- `src/app/api/auth/[...nextauth]/route.ts` - Auth configuration
|
|
328
|
+
- `src/lib/auth.ts` - Auth helpers
|
|
329
|
+
- `.env.local` - Environment variables
|
|
330
|
+
|
|
331
|
+
---
|
|
332
|
+
|
|
333
|
+
## Current Implementation
|
|
334
|
+
|
|
335
|
+
### File: src/app/api/auth/[...nextauth]/route.ts
|
|
336
|
+
|
|
337
|
+
```typescript
|
|
338
|
+
import NextAuth from "next-auth";
|
|
339
|
+
import Google from "next-auth/providers/google";
|
|
340
|
+
|
|
341
|
+
export const { handlers, auth, signIn, signOut } = NextAuth({
|
|
342
|
+
providers: [
|
|
343
|
+
Google({
|
|
344
|
+
clientId: process.env.GOOGLE_CLIENT_ID!,
|
|
345
|
+
clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
|
|
346
|
+
}),
|
|
347
|
+
],
|
|
348
|
+
callbacks: {
|
|
349
|
+
async jwt({ token, user }) {
|
|
350
|
+
if (user) {
|
|
351
|
+
token.id = user.id;
|
|
352
|
+
}
|
|
353
|
+
return token;
|
|
354
|
+
},
|
|
355
|
+
async session({ session, token }) {
|
|
356
|
+
session.user.id = token.id as string;
|
|
357
|
+
return session;
|
|
358
|
+
},
|
|
359
|
+
},
|
|
360
|
+
});
|
|
361
|
+
|
|
362
|
+
export const { GET, POST } = handlers;
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
### File: .env.local (sanitized)
|
|
366
|
+
|
|
367
|
+
```
|
|
368
|
+
GOOGLE_CLIENT_ID=123456789-xxxxx.apps.googleusercontent.com
|
|
369
|
+
GOOGLE_CLIENT_SECRET=GOCSPX-xxxxxxxxx
|
|
370
|
+
NEXTAUTH_URL=http://localhost:3000
|
|
371
|
+
NEXTAUTH_SECRET=my-secret-key
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
---
|
|
375
|
+
|
|
376
|
+
## The Problem
|
|
377
|
+
|
|
378
|
+
### Error Message
|
|
379
|
+
```
|
|
380
|
+
[auth][error] CallbackRouteError: Read more at https://errors.authjs.dev#callbackrouteerror
|
|
381
|
+
[auth][cause]: Error: unauthorized_client
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
### Stack Trace
|
|
385
|
+
```
|
|
386
|
+
at AuthHandler (node_modules/next-auth/lib/index.js:42:15)
|
|
387
|
+
at async /app/api/auth/[...nextauth]/route.ts:1:1
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
### Expected Behavior
|
|
391
|
+
User should be redirected to Google login, authenticate, and return to the app.
|
|
392
|
+
|
|
393
|
+
### Actual Behavior
|
|
394
|
+
After clicking "Sign in with Google", immediately get unauthorized_client error.
|
|
395
|
+
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
## What We've Already Tried
|
|
399
|
+
|
|
400
|
+
### Attempt 1: Verify credentials
|
|
401
|
+
**What we did**: Double-checked GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET in .env.local against Google Cloud Console
|
|
402
|
+
**Result**: Credentials match exactly
|
|
403
|
+
**Why it didn't work**: Issue persists
|
|
404
|
+
|
|
405
|
+
### Attempt 2: Check redirect URIs
|
|
406
|
+
**What we did**: Added http://localhost:3000/api/auth/callback/google to authorized redirect URIs in Google Console
|
|
407
|
+
**Result**: Still getting unauthorized_client
|
|
408
|
+
**Why it didn't work**: Redirect URI appears correct
|
|
409
|
+
|
|
410
|
+
### Attempt 3: Clear browser state
|
|
411
|
+
**What we did**: Cleared cookies, tried incognito window
|
|
412
|
+
**Result**: Same error
|
|
413
|
+
**Why it didn't work**: Not a caching issue
|
|
414
|
+
|
|
415
|
+
---
|
|
416
|
+
|
|
417
|
+
## Specific Questions
|
|
418
|
+
|
|
419
|
+
1. **Why does next-auth 5.0.0-beta.4 throw unauthorized_client when credentials are verified correct?**
|
|
420
|
+
Context: This is a beta version, might have breaking changes
|
|
421
|
+
|
|
422
|
+
2. **Is there additional configuration needed for Google OAuth with Next.js 14 App Router?**
|
|
423
|
+
Context: App Router is relatively new, patterns may differ
|
|
424
|
+
|
|
425
|
+
3. **What's the correct format for authorized redirect URIs in Google Console for next-auth v5?**
|
|
426
|
+
Context: Current URI is http://localhost:3000/api/auth/callback/google
|
|
427
|
+
|
|
428
|
+
4. **Are there known issues with next-auth 5.0.0-beta.4 and the Google provider?**
|
|
429
|
+
Context: Using beta version, may have bugs
|
|
430
|
+
|
|
431
|
+
---
|
|
432
|
+
|
|
433
|
+
## What I Need
|
|
434
|
+
|
|
435
|
+
[rest of template...]
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
---
|
|
439
|
+
|
|
440
|
+
## Rules
|
|
441
|
+
|
|
442
|
+
- **NO file writes** - This is output-only
|
|
443
|
+
- **MUST validate quality** before outputting
|
|
444
|
+
- **MUST include actual code** from the codebase
|
|
445
|
+
- **MUST be detailed** - 200+ lines minimum
|
|
446
|
+
|
|
447
|
+
---
|
|
448
|
+
|
|
449
|
+
## Related Commands
|
|
450
|
+
|
|
451
|
+
- `/agileflow:research:import` - Import research results back
|
|
452
|
+
- `/agileflow:research:list` - Show research notes index
|
|
453
|
+
- `/agileflow:research:view` - Read specific research note
|