@codihaus/claude-skills 1.0.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 +167 -0
- package/bin/cli.js +58 -0
- package/package.json +46 -0
- package/skills/_quality-attributes.md +392 -0
- package/skills/_registry.md +189 -0
- package/skills/debrief/SKILL.md +647 -0
- package/skills/debrief/references/change-request-template.md +124 -0
- package/skills/debrief/references/file-patterns.md +173 -0
- package/skills/debrief/references/group-codes.md +72 -0
- package/skills/debrief/references/research-queries.md +106 -0
- package/skills/debrief/references/use-case-template.md +141 -0
- package/skills/debrief/scripts/generate_questionnaire.py +195 -0
- package/skills/dev-arch/SKILL.md +747 -0
- package/skills/dev-changelog/SKILL.md +378 -0
- package/skills/dev-coding/SKILL.md +470 -0
- package/skills/dev-coding-backend/SKILL.md +361 -0
- package/skills/dev-coding-frontend/SKILL.md +534 -0
- package/skills/dev-coding-frontend/references/nextjs.md +477 -0
- package/skills/dev-review/SKILL.md +548 -0
- package/skills/dev-scout/SKILL.md +723 -0
- package/skills/dev-scout/references/feature-patterns.md +210 -0
- package/skills/dev-scout/references/file-patterns.md +252 -0
- package/skills/dev-scout/references/tech-detection.md +211 -0
- package/skills/dev-scout/scripts/scout-analyze.sh +280 -0
- package/skills/dev-specs/SKILL.md +577 -0
- package/skills/dev-specs/references/checklist.md +176 -0
- package/skills/dev-specs/references/spec-templates.md +460 -0
- package/skills/dev-test/SKILL.md +364 -0
- package/skills/utils/diagram/SKILL.md +205 -0
- package/skills/utils/diagram/references/common-errors.md +305 -0
- package/skills/utils/diagram/references/diagram-types.md +636 -0
- package/skills/utils/docs-graph/SKILL.md +204 -0
- package/skills/utils/gemini/SKILL.md +292 -0
- package/skills/utils/gemini/scripts/gemini-scan.py +340 -0
- package/skills/utils/gemini/scripts/setup.sh +169 -0
- package/src/commands/add.js +64 -0
- package/src/commands/doctor.js +179 -0
- package/src/commands/init.js +251 -0
- package/src/commands/list.js +88 -0
- package/src/commands/remove.js +60 -0
- package/src/commands/update.js +72 -0
- package/src/index.js +26 -0
- package/src/utils/config.js +272 -0
- package/src/utils/deps.js +599 -0
- package/src/utils/skills.js +253 -0
- package/templates/CLAUDE.md.template +58 -0
|
@@ -0,0 +1,647 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: debrief
|
|
3
|
+
description: Analyze customer requirements and deliver market research, tiered proposals, and recommendations
|
|
4
|
+
version: 3.8.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /debrief - Business Requirements Document (BRD)
|
|
8
|
+
|
|
9
|
+
> **Skill Awareness**: See `skills/_registry.md` for all available skills.
|
|
10
|
+
> - **Before**: Use `/dev-scout` if existing codebase
|
|
11
|
+
> - **During**: Calls `/dev-arch` to validate architecture feasibility
|
|
12
|
+
> - **After**: Use `/dev-specs` for implementation plans
|
|
13
|
+
> - **Utils**: `/utils/docs-graph` for relationships
|
|
14
|
+
|
|
15
|
+
Create and maintain the unified BRD for a project. Handles initial requirements and feature additions.
|
|
16
|
+
|
|
17
|
+
## When to Use
|
|
18
|
+
|
|
19
|
+
- Start a new project (creates initial BRD)
|
|
20
|
+
- Add new feature to existing project (updates BRD)
|
|
21
|
+
- Process change requests (tracked separately)
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
/debrief "Customer wants a SaaS platform" # New project
|
|
27
|
+
/debrief "Add billing and subscriptions" # Add feature
|
|
28
|
+
/debrief requirements.pdf # From document
|
|
29
|
+
/debrief # Interactive
|
|
30
|
+
/debrief --answers questionnaire.xlsx # Process customer answers
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Output Structure
|
|
34
|
+
|
|
35
|
+
All output goes to unified `plans/` structure:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
plans/
|
|
39
|
+
├── brd/ # This skill manages this folder
|
|
40
|
+
│ ├── README.md # Project overview, feature index
|
|
41
|
+
│ ├── context.md # Stakeholders, constraints
|
|
42
|
+
│ ├── use-cases/ # ALL use cases, grouped by feature
|
|
43
|
+
│ │ ├── auth/ # Auth feature UCs
|
|
44
|
+
│ │ │ ├── UC-AUTH-001-login.md
|
|
45
|
+
│ │ │ ├── UC-AUTH-002-signup.md
|
|
46
|
+
│ │ │ └── UC-AUTH-003-forgot.md
|
|
47
|
+
│ │ ├── billing/ # Billing feature UCs
|
|
48
|
+
│ │ │ ├── UC-PAY-001-checkout.md
|
|
49
|
+
│ │ │ └── UC-PAY-002-refund.md
|
|
50
|
+
│ │ └── ...
|
|
51
|
+
│ ├── changes/ # Change requests
|
|
52
|
+
│ │ └── CR-001-add-sso.md
|
|
53
|
+
│ ├── references.md
|
|
54
|
+
│ └── changelog.md
|
|
55
|
+
│
|
|
56
|
+
├── features/ # Created per feature
|
|
57
|
+
│ ├── auth/ # /dev-scout and /dev-specs work here
|
|
58
|
+
│ ├── billing/
|
|
59
|
+
│ └── ...
|
|
60
|
+
│
|
|
61
|
+
└── scout/ # /dev-scout project level
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Workflow
|
|
65
|
+
|
|
66
|
+
### Mode Detection
|
|
67
|
+
|
|
68
|
+
On start, detect current mode:
|
|
69
|
+
|
|
70
|
+
1. **New Project**: `plans/brd/` doesn't exist
|
|
71
|
+
2. **Add Feature**: `plans/brd/` exists, adding new use cases
|
|
72
|
+
3. **Change Request**: Modifying existing use cases
|
|
73
|
+
4. **Process Answers**: `--answers` flag with questionnaire file
|
|
74
|
+
|
|
75
|
+
### Phase 0: Check Documentation Graph
|
|
76
|
+
|
|
77
|
+
For Add Feature and Change Request modes, read `plans/docs-graph.json`:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
1. Read plans/docs-graph.json (if exists)
|
|
81
|
+
2. List existing use cases and features
|
|
82
|
+
3. Check for potential duplicates or overlaps
|
|
83
|
+
4. Identify related nodes for impact analysis
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**How docs-graph helps debrief:**
|
|
87
|
+
|
|
88
|
+
| Mode | Graph Provides |
|
|
89
|
+
|------|----------------|
|
|
90
|
+
| Add Feature | Existing UCs to avoid duplicates |
|
|
91
|
+
| Change Request | Nodes affected by the change |
|
|
92
|
+
| New Project | Skip (no graph yet) |
|
|
93
|
+
|
|
94
|
+
**Duplicate Detection:**
|
|
95
|
+
|
|
96
|
+
Before creating new UCs, check if similar ones exist:
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
// User requests: "Add login functionality"
|
|
100
|
+
// Graph shows:
|
|
101
|
+
{
|
|
102
|
+
"existing": [
|
|
103
|
+
{"id": "uc-auth-001", "label": "Login", "type": "use-case"},
|
|
104
|
+
{"id": "uc-auth-002", "label": "Signup", "type": "use-case"}
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
// → Warn: "Login already exists as UC-AUTH-001. Create CR instead?"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**Impact Analysis for Changes:**
|
|
111
|
+
|
|
112
|
+
For Change Requests, find what links to the affected UC:
|
|
113
|
+
|
|
114
|
+
```json
|
|
115
|
+
// Modifying: uc-auth-001 (Login)
|
|
116
|
+
// Graph edges show:
|
|
117
|
+
{
|
|
118
|
+
"incoming": ["uc-auth-002", "uc-auth-003", "spec-auth-001"],
|
|
119
|
+
"outgoing": ["feature-auth"]
|
|
120
|
+
}
|
|
121
|
+
// → Impact: 3 other nodes reference Login, need to update
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
This prevents:
|
|
125
|
+
- Duplicate use cases
|
|
126
|
+
- Orphaned specs (spec without UC)
|
|
127
|
+
- Missing impact analysis on changes
|
|
128
|
+
|
|
129
|
+
### Phase 1: Context Gathering
|
|
130
|
+
|
|
131
|
+
Ask using `AskUserQuestion`:
|
|
132
|
+
|
|
133
|
+
**For New Project:**
|
|
134
|
+
|
|
135
|
+
**Q1: Project Type & Source Code**
|
|
136
|
+
- New project (no existing code)
|
|
137
|
+
- Existing codebase (current folder)
|
|
138
|
+
- Existing codebase (different folder)
|
|
139
|
+
|
|
140
|
+
**Q2: Industry/Niche**
|
|
141
|
+
- SaaS B2B / SaaS B2C / E-commerce / Marketplace / Enterprise / Other
|
|
142
|
+
|
|
143
|
+
**Q3: Target Users**
|
|
144
|
+
- Business users (B2B) / Consumers (B2C) / Internal / Mixed
|
|
145
|
+
|
|
146
|
+
**Q4: Known Constraints** (multi-select)
|
|
147
|
+
- Timeline / Budget / Compliance / Integration / None
|
|
148
|
+
|
|
149
|
+
**Q5: Scope Tier**
|
|
150
|
+
- Core (3-5 use cases) / Standard (8-12) / Full (15+)
|
|
151
|
+
|
|
152
|
+
**For Add Feature:**
|
|
153
|
+
|
|
154
|
+
**Q1: Feature Name**
|
|
155
|
+
- What to call this feature (e.g., "billing", "notifications")
|
|
156
|
+
|
|
157
|
+
**Q2: Scope for this feature**
|
|
158
|
+
- Core / Standard / Full
|
|
159
|
+
|
|
160
|
+
### Phase 1.5: Codebase Discovery (if existing codebase)
|
|
161
|
+
|
|
162
|
+
See `references/file-patterns.md` for scan patterns.
|
|
163
|
+
|
|
164
|
+
1. Check for docs (README, CLAUDE.md)
|
|
165
|
+
2. Scan frontend files (.vue, .tsx, .jsx)
|
|
166
|
+
3. Infer existing features
|
|
167
|
+
4. Summarize in context.md
|
|
168
|
+
|
|
169
|
+
### Phase 2: Market Research
|
|
170
|
+
|
|
171
|
+
Search for references (not prescriptions):
|
|
172
|
+
1. Industry patterns
|
|
173
|
+
2. User flows
|
|
174
|
+
3. Compliance requirements
|
|
175
|
+
4. Documentation links
|
|
176
|
+
|
|
177
|
+
Output to `references.md`.
|
|
178
|
+
|
|
179
|
+
### Phase 3: Use Case Generation
|
|
180
|
+
|
|
181
|
+
**Determine feature folder** from context (e.g., billing, auth, notifications).
|
|
182
|
+
|
|
183
|
+
**Determine group code** from feature (e.g., billing → PAY, auth → AUTH).
|
|
184
|
+
|
|
185
|
+
**Create feature subfolder** in use-cases if not exists:
|
|
186
|
+
```
|
|
187
|
+
plans/brd/use-cases/{feature}/
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
**For each use case**, create file in the feature subfolder:
|
|
191
|
+
|
|
192
|
+
**Path**: `plans/brd/use-cases/{feature}/UC-{GROUP}-{NNN}-{slug}.md`
|
|
193
|
+
|
|
194
|
+
```markdown
|
|
195
|
+
# UC-{GROUP}-{NNN}: {Title}
|
|
196
|
+
|
|
197
|
+
> **Feature**: [[feature-{feature}]]
|
|
198
|
+
> **Related**: [[uc-xxx-nnn]]
|
|
199
|
+
> **Status**: Draft
|
|
200
|
+
|
|
201
|
+
## User Story
|
|
202
|
+
As a {role}, I want {goal}, so that {benefit}.
|
|
203
|
+
|
|
204
|
+
## Acceptance Criteria
|
|
205
|
+
- [ ] Given {context}, when {action}, then {result}
|
|
206
|
+
|
|
207
|
+
## Business Rules
|
|
208
|
+
- {Rule}
|
|
209
|
+
|
|
210
|
+
## Integration Notes
|
|
211
|
+
{How this connects to existing features}
|
|
212
|
+
|
|
213
|
+
## Open Questions
|
|
214
|
+
- {Question}
|
|
215
|
+
|
|
216
|
+
## References
|
|
217
|
+
- [{Link}]({url})
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Phase 4: Generate/Update BRD Files
|
|
221
|
+
|
|
222
|
+
#### For New Project:
|
|
223
|
+
|
|
224
|
+
Create `plans/brd/` structure:
|
|
225
|
+
|
|
226
|
+
**README.md:**
|
|
227
|
+
```markdown
|
|
228
|
+
# {Project Name}
|
|
229
|
+
|
|
230
|
+
> **Created**: {date}
|
|
231
|
+
> **Status**: Active
|
|
232
|
+
> **Codebase**: New | Existing
|
|
233
|
+
|
|
234
|
+
## Overview
|
|
235
|
+
{Project description}
|
|
236
|
+
|
|
237
|
+
## Overview Flow
|
|
238
|
+
|
|
239
|
+
```mermaid
|
|
240
|
+
flowchart LR
|
|
241
|
+
A[User] --> B{Action}
|
|
242
|
+
B --> C[Feature 1]
|
|
243
|
+
B --> D[Feature 2]
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
## Features
|
|
247
|
+
|
|
248
|
+
| Feature | Use Cases | Technical | Status |
|
|
249
|
+
|---------|-----------|-----------|--------|
|
|
250
|
+
| Auth | UC-AUTH-001 to 003 | [→](../features/auth/) | Planning |
|
|
251
|
+
| Billing | UC-PAY-001 to 005 | [→](../features/billing/) | Planning |
|
|
252
|
+
|
|
253
|
+
## Use Cases
|
|
254
|
+
|
|
255
|
+
### Authentication ([→ use-cases/auth/](./use-cases/auth/))
|
|
256
|
+
| ID | Title | Priority | Status |
|
|
257
|
+
|----|-------|----------|--------|
|
|
258
|
+
| [UC-AUTH-001](./use-cases/auth/UC-AUTH-001-login.md) | Login | Must | Draft |
|
|
259
|
+
| [UC-AUTH-002](./use-cases/auth/UC-AUTH-002-signup.md) | Signup | Must | Draft |
|
|
260
|
+
|
|
261
|
+
### Billing ([→ use-cases/billing/](./use-cases/billing/))
|
|
262
|
+
| ID | Title | Priority | Status |
|
|
263
|
+
|----|-------|----------|--------|
|
|
264
|
+
| [UC-PAY-001](./use-cases/billing/UC-PAY-001-checkout.md) | Checkout | Must | Draft |
|
|
265
|
+
|
|
266
|
+
## Change History
|
|
267
|
+
_No changes yet_
|
|
268
|
+
|
|
269
|
+
## Quick Links
|
|
270
|
+
- [Context](./context.md)
|
|
271
|
+
- [References](./references.md)
|
|
272
|
+
- [Changelog](./changelog.md)
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
**context.md:**
|
|
276
|
+
```markdown
|
|
277
|
+
# Context
|
|
278
|
+
|
|
279
|
+
## Stakeholders
|
|
280
|
+
| Role | Responsibility |
|
|
281
|
+
|------|----------------|
|
|
282
|
+
|
|
283
|
+
## Users / Personas
|
|
284
|
+
| Persona | Description | Key Needs |
|
|
285
|
+
|---------|-------------|-----------|
|
|
286
|
+
|
|
287
|
+
## Current State
|
|
288
|
+
{How things work today}
|
|
289
|
+
|
|
290
|
+
## Existing Features
|
|
291
|
+
{From codebase discovery, if applicable}
|
|
292
|
+
|
|
293
|
+
| Feature | Evidence | Status |
|
|
294
|
+
|---------|----------|--------|
|
|
295
|
+
|
|
296
|
+
## Constraints
|
|
297
|
+
| Type | Description | Impact |
|
|
298
|
+
|------|-------------|--------|
|
|
299
|
+
|
|
300
|
+
## Assumptions
|
|
301
|
+
-
|
|
302
|
+
|
|
303
|
+
## Dependencies
|
|
304
|
+
-
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
#### For Add Feature:
|
|
308
|
+
|
|
309
|
+
1. Read existing `plans/brd/README.md`
|
|
310
|
+
2. **Check BRD status**:
|
|
311
|
+
- If any use cases are "Confirmed" → **Create CR first** (see Phase 6)
|
|
312
|
+
- If all use cases are "Draft" → Add directly
|
|
313
|
+
3. Add new feature to Features table
|
|
314
|
+
4. Add new use case group
|
|
315
|
+
5. Create feature folder: `plans/features/{feature}/`
|
|
316
|
+
6. Update changelog
|
|
317
|
+
7. Link CR to feature if created
|
|
318
|
+
|
|
319
|
+
**Why CR for confirmed BRDs**: Once stakeholders have approved use cases, any addition is a scope change that needs tracking.
|
|
320
|
+
|
|
321
|
+
**changelog.md addition:**
|
|
322
|
+
```markdown
|
|
323
|
+
## {date} - Added {Feature}
|
|
324
|
+
- Added {X} use cases: UC-{GROUP}-001 to {NNN}
|
|
325
|
+
- Created feature folder: features/{feature}/
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
### Phase 5: Create Feature Folder
|
|
329
|
+
|
|
330
|
+
For each feature mentioned, create:
|
|
331
|
+
|
|
332
|
+
```
|
|
333
|
+
plans/features/{feature}/
|
|
334
|
+
├── README.md # Feature overview, links to use cases
|
|
335
|
+
└── .gitkeep # Placeholder for scout/specs
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
**Feature README.md:**
|
|
339
|
+
```markdown
|
|
340
|
+
# {Feature Name}
|
|
341
|
+
|
|
342
|
+
> **Use Cases**: UC-{GROUP}-001 to {NNN}
|
|
343
|
+
> **Status**: Planning
|
|
344
|
+
|
|
345
|
+
## Related Use Cases
|
|
346
|
+
| ID | Title |
|
|
347
|
+
|----|-------|
|
|
348
|
+
| [UC-XXX-001](../../brd/use-cases/UC-XXX-001-slug.md) | Title |
|
|
349
|
+
|
|
350
|
+
## Technical (pending)
|
|
351
|
+
- [ ] Architecture: Run `/dev-arch {feature}`
|
|
352
|
+
- [ ] Scout: Run `/dev-scout {feature}`
|
|
353
|
+
- [ ] Impact: Analyze integration points
|
|
354
|
+
- [ ] Specs: Run `/dev-specs {feature}`
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
### Phase 5.5: Architecture Feasibility Check
|
|
358
|
+
|
|
359
|
+
After creating use cases, call `/dev-arch` to validate:
|
|
360
|
+
|
|
361
|
+
```
|
|
362
|
+
1. Load dev-arch skill
|
|
363
|
+
→ Read skills/dev-arch/SKILL.md
|
|
364
|
+
|
|
365
|
+
2. Pass context to dev-arch
|
|
366
|
+
→ Feature requirements from use cases
|
|
367
|
+
→ Existing architecture from scout (if exists)
|
|
368
|
+
|
|
369
|
+
3. dev-arch evaluates:
|
|
370
|
+
→ Can current architecture support this?
|
|
371
|
+
→ What new architecture decisions needed?
|
|
372
|
+
→ Any blockers or major concerns?
|
|
373
|
+
|
|
374
|
+
4. dev-arch returns:
|
|
375
|
+
→ "Feasible with existing patterns" → Continue
|
|
376
|
+
→ "Feasible with additions" → Note additions needed
|
|
377
|
+
→ "Requires architecture work" → Create architecture.md first
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
**Output from dev-arch:**
|
|
381
|
+
|
|
382
|
+
```markdown
|
|
383
|
+
## Architecture Feasibility
|
|
384
|
+
|
|
385
|
+
### Assessment: {Feasible | Needs Work | Blocked}
|
|
386
|
+
|
|
387
|
+
### Current Support
|
|
388
|
+
| Requirement | Support | Gap |
|
|
389
|
+
|-------------|---------|-----|
|
|
390
|
+
| User auth | ✓ Exists | None |
|
|
391
|
+
| Payments | ✗ New | Need Stripe integration |
|
|
392
|
+
| Real-time | ✗ New | Need WebSocket |
|
|
393
|
+
|
|
394
|
+
### Recommended Actions
|
|
395
|
+
1. {Action 1}
|
|
396
|
+
2. {Action 2}
|
|
397
|
+
|
|
398
|
+
### Architecture Decisions Needed
|
|
399
|
+
- [ ] Payment provider selection
|
|
400
|
+
- [ ] Real-time architecture
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
This ensures architecture is considered early, not as an afterthought.
|
|
404
|
+
|
|
405
|
+
### Phase 6: Handle Change Requests
|
|
406
|
+
|
|
407
|
+
If modifying existing use cases:
|
|
408
|
+
|
|
409
|
+
1. Create `plans/brd/changes/CR-{NNN}-{slug}.md`
|
|
410
|
+
2. Update README.md Change History
|
|
411
|
+
3. Update affected use cases with reference
|
|
412
|
+
|
|
413
|
+
**CR-{NNN}-{slug}.md:**
|
|
414
|
+
```markdown
|
|
415
|
+
# CR-{NNN}: {Title}
|
|
416
|
+
|
|
417
|
+
> **Date**: {date}
|
|
418
|
+
> **Status**: Draft | Approved | Implemented
|
|
419
|
+
> **Requestor**: {who requested}
|
|
420
|
+
|
|
421
|
+
## Request
|
|
422
|
+
{What is being requested}
|
|
423
|
+
|
|
424
|
+
## Reason
|
|
425
|
+
{Why this change is needed}
|
|
426
|
+
|
|
427
|
+
## Impact
|
|
428
|
+
|
|
429
|
+
### New Use Cases
|
|
430
|
+
| ID | Title |
|
|
431
|
+
|----|-------|
|
|
432
|
+
|
|
433
|
+
### Modified Use Cases
|
|
434
|
+
| ID | Change |
|
|
435
|
+
|----|--------|
|
|
436
|
+
| UC-XXX-001 | {What changes} |
|
|
437
|
+
|
|
438
|
+
### Affected Features
|
|
439
|
+
- {feature}: {how affected}
|
|
440
|
+
|
|
441
|
+
## Notes
|
|
442
|
+
{Additional context}
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
### Phase 7: Collect Open Questions
|
|
446
|
+
|
|
447
|
+
Gather all open questions from:
|
|
448
|
+
1. Use case files (`## Open Questions` section)
|
|
449
|
+
2. Context gaps (unknowns from Phase 1)
|
|
450
|
+
3. Integration uncertainties
|
|
451
|
+
4. Business rules needing clarification
|
|
452
|
+
|
|
453
|
+
**Build questions list:**
|
|
454
|
+
```json
|
|
455
|
+
{
|
|
456
|
+
"project_name": "{Project Name}",
|
|
457
|
+
"date": "{YYYY-MM-DD}",
|
|
458
|
+
"questions": [
|
|
459
|
+
{
|
|
460
|
+
"category": "Requirements",
|
|
461
|
+
"question": "What is the expected concurrent user load?",
|
|
462
|
+
"priority": "Required",
|
|
463
|
+
"context": "Needed for capacity planning",
|
|
464
|
+
"source": "UC-PAY-003"
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"category": "Business",
|
|
468
|
+
"question": "What payment methods should be supported?",
|
|
469
|
+
"priority": "Required",
|
|
470
|
+
"context": "Affects integration scope",
|
|
471
|
+
"source": "UC-PAY-001"
|
|
472
|
+
}
|
|
473
|
+
]
|
|
474
|
+
}
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
**Categories:**
|
|
478
|
+
- `Business` - Business model, stakeholders, priorities
|
|
479
|
+
- `Requirements` - Feature details, user needs
|
|
480
|
+
- `Constraints` - Timeline, budget, compliance
|
|
481
|
+
- `Integration` - Third-party systems, APIs
|
|
482
|
+
- `Technical` - Only if blocking business decisions
|
|
483
|
+
|
|
484
|
+
**Priority:**
|
|
485
|
+
- `Required` - Blocks use case completion
|
|
486
|
+
- `Optional` - Nice to clarify, not blocking
|
|
487
|
+
|
|
488
|
+
### Phase 8: Generate Questionnaire
|
|
489
|
+
|
|
490
|
+
If open questions exist, generate customer questionnaire:
|
|
491
|
+
|
|
492
|
+
```bash
|
|
493
|
+
python scripts/generate_questionnaire.py {output_path} questions.json
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
**Output location** (contextual, with date for revision tracking):
|
|
497
|
+
- New feature: `plans/features/{feature}/questionnaire-{YYYY-MM-DD}.xlsx`
|
|
498
|
+
- Change request: `plans/brd/changes/CR-{NNN}-questionnaire-{YYYY-MM-DD}.xlsx`
|
|
499
|
+
|
|
500
|
+
**Note**: No questionnaire at BRD root level. New project questions are associated with specific features or tracked via initial CR.
|
|
501
|
+
|
|
502
|
+
Creates Excel file with:
|
|
503
|
+
- Summary sheet (project info, question counts)
|
|
504
|
+
- Questions sheet (categorized, with context/source)
|
|
505
|
+
- Answer column for customer to fill
|
|
506
|
+
|
|
507
|
+
### Phase 9: Summary
|
|
508
|
+
|
|
509
|
+
Output summary:
|
|
510
|
+
- Use cases created/updated
|
|
511
|
+
- Features created
|
|
512
|
+
- Change requests (if any)
|
|
513
|
+
- Open questions count
|
|
514
|
+
- Questionnaire generated (if applicable)
|
|
515
|
+
- Next steps
|
|
516
|
+
|
|
517
|
+
**Next steps suggestions:**
|
|
518
|
+
- Send questionnaire to customer (if generated)
|
|
519
|
+
- Run `/dev-scout` for codebase analysis
|
|
520
|
+
- Run `/dev-scout {feature}` for targeted analysis
|
|
521
|
+
- Review use cases with stakeholders
|
|
522
|
+
- Run `/dev-specs {feature}` when ready
|
|
523
|
+
|
|
524
|
+
---
|
|
525
|
+
|
|
526
|
+
## Process Answers Workflow
|
|
527
|
+
|
|
528
|
+
When customer returns filled questionnaire, run:
|
|
529
|
+
```
|
|
530
|
+
/debrief --answers plans/features/billing/questionnaire-2024-01-20.xlsx
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
### Step 1: Read Questionnaire
|
|
534
|
+
|
|
535
|
+
Read the Excel file and extract answers:
|
|
536
|
+
- Parse "Answer" column
|
|
537
|
+
- Match to source use cases via "Context/Source" column
|
|
538
|
+
- Flag unanswered required questions
|
|
539
|
+
|
|
540
|
+
### Step 2: Update Related Files
|
|
541
|
+
|
|
542
|
+
For each answered question:
|
|
543
|
+
|
|
544
|
+
1. **Find source use case file**
|
|
545
|
+
2. **Update use case**:
|
|
546
|
+
- Remove question from `## Open Questions`
|
|
547
|
+
- Add answer to relevant section (Acceptance Criteria, Business Rules, etc.)
|
|
548
|
+
3. **Update feature README** with new information
|
|
549
|
+
4. **Update CR file** if questionnaire is CR-related
|
|
550
|
+
|
|
551
|
+
### Step 3: Handle Questionnaire File
|
|
552
|
+
|
|
553
|
+
**Keep the file** for revision history:
|
|
554
|
+
- File stays at original location with date
|
|
555
|
+
- Add "Processed: {date}" to Summary sheet
|
|
556
|
+
- If follow-up needed → new questionnaire with new date
|
|
557
|
+
|
|
558
|
+
Example revision history:
|
|
559
|
+
```
|
|
560
|
+
plans/features/billing/
|
|
561
|
+
├── questionnaire-2024-01-15.xlsx # Initial, processed
|
|
562
|
+
├── questionnaire-2024-01-22.xlsx # Follow-up, processed
|
|
563
|
+
└── questionnaire-2024-01-28.xlsx # Final clarifications
|
|
564
|
+
```
|
|
565
|
+
|
|
566
|
+
### Step 4: Check Completeness
|
|
567
|
+
|
|
568
|
+
After processing:
|
|
569
|
+
- Count remaining open questions across related use cases
|
|
570
|
+
- If still gaps → generate new questionnaire with new date
|
|
571
|
+
- If complete → update use case status to "Confirmed"
|
|
572
|
+
|
|
573
|
+
### Step 5: Update References
|
|
574
|
+
|
|
575
|
+
Add questionnaire to relevant files for traceability:
|
|
576
|
+
|
|
577
|
+
**In feature README.md:**
|
|
578
|
+
```markdown
|
|
579
|
+
## Questionnaire History
|
|
580
|
+
| Date | Status | Questions |
|
|
581
|
+
|------|--------|-----------|
|
|
582
|
+
| 2024-01-15 | Processed | 8 answered |
|
|
583
|
+
| 2024-01-22 | Processed | 3 answered |
|
|
584
|
+
```
|
|
585
|
+
|
|
586
|
+
**In CR file (if applicable):**
|
|
587
|
+
```markdown
|
|
588
|
+
## Clarifications
|
|
589
|
+
- [Questionnaire 2024-01-20](./CR-001-questionnaire-2024-01-20.xlsx)
|
|
590
|
+
```
|
|
591
|
+
|
|
592
|
+
### Step 6: Summary
|
|
593
|
+
|
|
594
|
+
Output:
|
|
595
|
+
- Questions answered: X/Y
|
|
596
|
+
- Use cases updated: [list]
|
|
597
|
+
- Files modified: [list]
|
|
598
|
+
- Remaining gaps: [if any]
|
|
599
|
+
- Next questionnaire: [path if generated]
|
|
600
|
+
- Status: Complete | Needs follow-up
|
|
601
|
+
|
|
602
|
+
## Tools Used
|
|
603
|
+
|
|
604
|
+
| Tool | Purpose |
|
|
605
|
+
|------|---------|
|
|
606
|
+
| `AskUserQuestion` | Context gathering |
|
|
607
|
+
| `Glob` | Find existing files, codebase scan |
|
|
608
|
+
| `Read` | Read existing BRD, docs |
|
|
609
|
+
| `Write` | Create/update BRD files |
|
|
610
|
+
| `WebSearch` | Market research |
|
|
611
|
+
|
|
612
|
+
## Scripts
|
|
613
|
+
|
|
614
|
+
### Customer Questionnaire
|
|
615
|
+
|
|
616
|
+
Generate dynamic questionnaire based on open questions identified during debrief:
|
|
617
|
+
|
|
618
|
+
```bash
|
|
619
|
+
python scripts/generate_questionnaire.py output.xlsx questions.json
|
|
620
|
+
```
|
|
621
|
+
|
|
622
|
+
**Input:** JSON file with collected open questions (see Phase 7)
|
|
623
|
+
|
|
624
|
+
**Output:** Excel file with:
|
|
625
|
+
- Summary sheet (project info, priority breakdown, category counts)
|
|
626
|
+
- Questions sheet (categorized questions with context/source)
|
|
627
|
+
- Answer column for customer to fill
|
|
628
|
+
- Required vs Optional priority indicators
|
|
629
|
+
|
|
630
|
+
**Example:**
|
|
631
|
+
```bash
|
|
632
|
+
# After debrief creates questions.json
|
|
633
|
+
python scripts/generate_questionnaire.py plans/brd/questionnaire.xlsx /tmp/questions.json
|
|
634
|
+
```
|
|
635
|
+
|
|
636
|
+
The questionnaire only contains questions we couldn't answer from:
|
|
637
|
+
- Customer brief
|
|
638
|
+
- Existing codebase (if any)
|
|
639
|
+
- Market research
|
|
640
|
+
|
|
641
|
+
## References
|
|
642
|
+
|
|
643
|
+
- `references/research-queries.md` - Search templates
|
|
644
|
+
- `references/use-case-template.md` - UC file template
|
|
645
|
+
- `references/group-codes.md` - Standard group codes
|
|
646
|
+
- `references/file-patterns.md` - Codebase scan patterns
|
|
647
|
+
- `references/change-request-template.md` - CR template
|