@codihaus/claude-skills 1.6.25 → 1.6.27
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/package.json +1 -1
- package/skills/debrief/SKILL.md +57 -38
- package/skills/debrief/references/codes.md +1 -102
- package/skills/debrief/references/research.md +32 -14
- package/skills/debrief/references/templates/brd-references.md +0 -16
- package/skills/debrief/references/templates/feature-references.md +0 -10
- package/skills/debrief/references/workflow.md +120 -105
- package/skills/debrief/scripts/generate_questionnaire.py +26 -0
- package/src/commands/update.js +57 -2
- package/src/utils/skills.js +24 -0
package/package.json
CHANGED
package/skills/debrief/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: debrief
|
|
3
|
-
description: Customer requirements →
|
|
4
|
-
version: 5.
|
|
3
|
+
description: Customer requirements → questionnaire (default) or BRD (with --answers flag)
|
|
4
|
+
version: 5.3.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# /debrief - Business Requirements Document
|
|
@@ -24,43 +24,42 @@ version: 5.0.0
|
|
|
24
24
|
## Usage
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
/debrief "Customer wants..." # New project
|
|
28
|
-
/debrief "Add {feature}" # Add feature
|
|
29
|
-
/debrief --answers questionnaire.xlsx # Process answers
|
|
30
|
-
/debrief --generate-brd questionnaire.xlsx # Generate BRD from
|
|
31
|
-
/debrief --questionnaire-only # Questions only
|
|
27
|
+
/debrief "Customer wants..." # New project → questionnaire output
|
|
28
|
+
/debrief "Add {feature}" # Add feature → questionnaire output
|
|
29
|
+
/debrief --answers questionnaire.xlsx # Process answers → CREATE BRD
|
|
30
|
+
/debrief --generate-brd questionnaire.xlsx # Generate BRD from research
|
|
32
31
|
```
|
|
33
32
|
|
|
33
|
+
**Key principle**:
|
|
34
|
+
- **Without flags**: ONLY outputs questionnaire (no BRD)
|
|
35
|
+
- **With --answers or --generate-brd**: Creates BRD files
|
|
36
|
+
|
|
34
37
|
---
|
|
35
38
|
|
|
36
|
-
## Output
|
|
39
|
+
## Output
|
|
37
40
|
|
|
38
|
-
**
|
|
39
|
-
- README.md (all features index)
|
|
40
|
-
- context.md (stakeholders, users, constraints)
|
|
41
|
-
- references.md (industry, compliance, competitor overview)
|
|
42
|
-
- use-cases/{feature}/ (all use cases, grouped)
|
|
43
|
-
- changelog.md
|
|
41
|
+
**Default (no flags)**: `questionnaire-{date}.xlsx` only (3 sheets: Summary, Questions, References)
|
|
44
42
|
|
|
45
|
-
**
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
43
|
+
**With --answers or --generate-brd**:
|
|
44
|
+
- `plans/brd/` - Project-wide BRD files
|
|
45
|
+
- `plans/brd/use-cases/` - Use cases by feature
|
|
46
|
+
- `plans/features/{feature}/` - Feature-specific files
|
|
49
47
|
|
|
50
48
|
---
|
|
51
49
|
|
|
52
50
|
## Key Principles
|
|
53
51
|
|
|
54
|
-
### 1.
|
|
52
|
+
### 1. Questionnaire First (Default)
|
|
55
53
|
|
|
56
|
-
**
|
|
57
|
-
|
|
54
|
+
**Default behavior (no flags)**:
|
|
55
|
+
- ALWAYS output: Summary + Questionnaire (3 sheets Excel)
|
|
56
|
+
- NEVER auto-create: BRD files, use cases, feature folders
|
|
58
57
|
|
|
59
|
-
**BRD creation
|
|
60
|
-
- `--answers questionnaire.xlsx`
|
|
61
|
-
- `--generate-brd questionnaire.xlsx`
|
|
58
|
+
**BRD creation (explicit flags)**:
|
|
59
|
+
- `--answers questionnaire.xlsx` → Creates BRD after customer fills it
|
|
60
|
+
- `--generate-brd questionnaire.xlsx` → Creates BRD from existing research
|
|
62
61
|
|
|
63
|
-
**Why**: User reviews research first, validates with customer,
|
|
62
|
+
**Why**: User reviews research first, validates with customer, THEN creates BRD.
|
|
64
63
|
|
|
65
64
|
### 2. Business Focus ONLY
|
|
66
65
|
|
|
@@ -78,19 +77,27 @@ version: 5.0.0
|
|
|
78
77
|
|
|
79
78
|
**If you mention files, code, APIs, or tech → YOU ARE DOING IT WRONG.**
|
|
80
79
|
|
|
81
|
-
### 3. Deep Research (
|
|
80
|
+
### 3. Deep Research + Revalidation (ALWAYS)
|
|
82
81
|
|
|
83
|
-
**Always thorough
|
|
84
|
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
82
|
+
**Always thorough** (regardless of scope tier):
|
|
83
|
+
1. Comparison pages (feature matrix)
|
|
84
|
+
2. **Multi-source revalidation** (MANDATORY):
|
|
85
|
+
- Ecosystems (Chrome, WordPress, GitHub, NPM)
|
|
86
|
+
- User signals (Reddit, reviews, forums)
|
|
87
|
+
- Competitor direct (pricing, features)
|
|
88
|
+
3. Full evidence per feature (3+ source types)
|
|
88
89
|
|
|
89
|
-
No
|
|
90
|
+
**No shortcuts**: MVP/Standard/Full all get same deep research + revalidation.
|
|
90
91
|
|
|
91
92
|
### 4. Questionnaire = Decision Tool
|
|
92
93
|
|
|
93
|
-
**
|
|
94
|
+
**How to generate**:
|
|
95
|
+
```bash
|
|
96
|
+
python .claude/skills/debrief/scripts/generate_questionnaire.py questionnaire-{YYYY-MM-DD}.xlsx -
|
|
97
|
+
```
|
|
98
|
+
Pipe JSON to stdin with research data (see `references/workflow.md` for JSON format).
|
|
99
|
+
|
|
100
|
+
**3 sheets generated**:
|
|
94
101
|
- Summary (features count, tier breakdown, research stats)
|
|
95
102
|
- Questions (validation + open)
|
|
96
103
|
- References (URLs, evidence per feature)
|
|
@@ -105,12 +112,24 @@ Then create BRD via `--answers` or `--generate-brd`.
|
|
|
105
112
|
|
|
106
113
|
**See** `references/workflow.md` for detailed steps.
|
|
107
114
|
|
|
115
|
+
**CRITICAL**: ALWAYS ask context questions FIRST using AskUserQuestion tool before doing any research.
|
|
116
|
+
|
|
108
117
|
**Modes**:
|
|
109
|
-
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
-
|
|
118
|
+
- **New Project**:
|
|
119
|
+
1. Ask 4 questions (Industry, Users, Constraints, Scope mode: MVP/Market Standard/Full)
|
|
120
|
+
2. Research + questionnaire → `plans/brd/use-cases/{project}/questionnaire-{date}.xlsx`
|
|
121
|
+
3. NO BRD created
|
|
122
|
+
- **Add Feature**:
|
|
123
|
+
1. Ask 2 questions (Feature name, Scope mode: MVP/Market Standard/Full)
|
|
124
|
+
2. Research + questionnaire → `plans/brd/use-cases/{feature}/questionnaire-{date}.xlsx`
|
|
125
|
+
3. NO BRD created
|
|
126
|
+
- **Process Answers** (`--answers`):
|
|
127
|
+
1. Read filled questionnaire
|
|
128
|
+
2. **ASK what to do**: Continue research / Ask follow-ups / Create BRD
|
|
129
|
+
3. Execute based on choice
|
|
130
|
+
- **Generate BRD** (`--generate-brd`): Create BRD from research
|
|
131
|
+
|
|
132
|
+
**Default**: Questionnaire only. BRD requires explicit flag AND user confirmation.
|
|
114
133
|
|
|
115
134
|
---
|
|
116
135
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Reference Codes
|
|
2
2
|
|
|
3
|
-
Quick reference for use case naming
|
|
3
|
+
Quick reference for use case naming.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -32,104 +32,3 @@ Standard codes for `UC-{GROUP}-{NNN}-{slug}.md` naming.
|
|
|
32
32
|
**Custom codes**: Define project-specific codes in BRD README (3-5 chars, obvious meaning).
|
|
33
33
|
|
|
34
34
|
**Principle**: Group by user intent, not implementation (PAY not STRIPE, USER not DATABASE).
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## Codebase Discovery Patterns
|
|
39
|
-
|
|
40
|
-
For existing codebase scanning (detect features and tech stack).
|
|
41
|
-
|
|
42
|
-
### Frontend File Patterns
|
|
43
|
-
|
|
44
|
-
**Include**:
|
|
45
|
-
```
|
|
46
|
-
**/*.vue # Vue.js
|
|
47
|
-
**/*.tsx, **/*.jsx # React / Next.js
|
|
48
|
-
**/pages/**/* # Routes
|
|
49
|
-
**/app/**/page.tsx # Next.js App Router
|
|
50
|
-
**/*.svelte # Svelte
|
|
51
|
-
**/*.component.ts # Angular
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
**Exclude**:
|
|
55
|
-
```
|
|
56
|
-
node_modules/**, dist/**, build/**, .next/**, .nuxt/**
|
|
57
|
-
*.min.js, *.bundle.js, *.chunk.js
|
|
58
|
-
**/*.test.*, **/*.spec.*, __tests__/**
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
### Feature Inference from Files
|
|
64
|
-
|
|
65
|
-
Map file/folder names to features:
|
|
66
|
-
|
|
67
|
-
| Pattern | Feature |
|
|
68
|
-
|---------|---------|
|
|
69
|
-
| `auth/`, `login.*`, `signin.*` | Authentication |
|
|
70
|
-
| `user/`, `profile.*`, `account.*` | User Management |
|
|
71
|
-
| `dashboard.*` | Dashboard |
|
|
72
|
-
| `payment/`, `checkout.*`, `billing.*` | Payments |
|
|
73
|
-
| `subscription/`, `plans.*` | Subscriptions |
|
|
74
|
-
| `admin/` | Admin Panel |
|
|
75
|
-
| `notification/`, `alerts/` | Notifications |
|
|
76
|
-
| `search.*` | Search |
|
|
77
|
-
| `cart.*`, `basket.*` | Shopping Cart |
|
|
78
|
-
| `order/`, `orders/` | Orders |
|
|
79
|
-
| `product/`, `catalog/` | Products |
|
|
80
|
-
| `message/`, `chat/`, `inbox/` | Messaging |
|
|
81
|
-
| `report/`, `analytics/` | Reporting |
|
|
82
|
-
| `upload/`, `files/`, `media/` | File Management |
|
|
83
|
-
| `team/`, `organization/` | Team Management |
|
|
84
|
-
| `onboarding/`, `wizard/`, `setup/` | Onboarding |
|
|
85
|
-
| `help/`, `support/`, `faq/` | Help/Support |
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
### Tech Stack Detection
|
|
90
|
-
|
|
91
|
-
**Package files**:
|
|
92
|
-
```
|
|
93
|
-
package.json → Node.js / JavaScript
|
|
94
|
-
requirements.txt → Python
|
|
95
|
-
Gemfile → Ruby
|
|
96
|
-
go.mod → Go
|
|
97
|
-
Cargo.toml → Rust
|
|
98
|
-
composer.json → PHP
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
**Framework detection** (from package.json dependencies):
|
|
102
|
-
- `next` → Next.js
|
|
103
|
-
- `nuxt` → Nuxt.js
|
|
104
|
-
- `vue` → Vue.js
|
|
105
|
-
- `react` → React
|
|
106
|
-
- `@angular/core` → Angular
|
|
107
|
-
- `svelte` → Svelte
|
|
108
|
-
- `express` → Express.js
|
|
109
|
-
- `nestjs` → NestJS
|
|
110
|
-
|
|
111
|
-
---
|
|
112
|
-
|
|
113
|
-
### Documentation Patterns
|
|
114
|
-
|
|
115
|
-
Look for existing docs:
|
|
116
|
-
```
|
|
117
|
-
README.md, CLAUDE.md, CONTRIBUTING.md
|
|
118
|
-
docs/**/*.md
|
|
119
|
-
plans/**/*.md
|
|
120
|
-
specifications/**/*.md
|
|
121
|
-
.github/**/*.md
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
---
|
|
125
|
-
|
|
126
|
-
## Discovery Strategy
|
|
127
|
-
|
|
128
|
-
**For existing codebase**:
|
|
129
|
-
1. Find package.json → Detect framework
|
|
130
|
-
2. Glob frontend files → List pages/components
|
|
131
|
-
3. Match patterns → Infer features
|
|
132
|
-
4. Read docs (README, CLAUDE.md)
|
|
133
|
-
5. Summarize in context.md
|
|
134
|
-
|
|
135
|
-
**Output**: Features table with status (exists/missing), tech stack summary
|
|
@@ -2,15 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
**Mindset**: Evidence-based validation. Features classified by market standards, not personal judgment.
|
|
4
4
|
|
|
5
|
-
**Methodology**: Comparison-first →
|
|
5
|
+
**Methodology**: Comparison-first → Multi-source revalidation (ALWAYS) → Tier classification
|
|
6
6
|
|
|
7
|
-
**Expected Outcome**: Features with tier (MVP/Standard/Advanced) backed by evidence
|
|
7
|
+
**Expected Outcome**: Features with tier (MVP/Standard/Advanced) backed by evidence from multiple sources.
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Research Flow (ALWAYS Deep)
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
**No quick mode.** Always do full research with multi-source revalidation, regardless of scope tier.
|
|
14
|
+
|
|
15
|
+
### Step 1: Comparison-First Approach
|
|
14
16
|
|
|
15
17
|
**Start here** - one comparison page = 10 competitors analyzed:
|
|
16
18
|
|
|
@@ -30,7 +32,19 @@
|
|
|
30
32
|
|
|
31
33
|
---
|
|
32
34
|
|
|
33
|
-
###
|
|
35
|
+
### Step 2: Multi-Source Revalidation (MANDATORY)
|
|
36
|
+
|
|
37
|
+
**Always revalidate** across multiple source types for every feature:
|
|
38
|
+
- Comparison pages (initial)
|
|
39
|
+
- Ecosystems (Chrome, WordPress, GitHub, NPM)
|
|
40
|
+
- User signals (Reddit, G2 reviews, forums)
|
|
41
|
+
- Competitor direct (pricing pages, feature pages)
|
|
42
|
+
|
|
43
|
+
**No shortcuts.** All tiers (MVP/Standard/Full) require full revalidation.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
### Step 3: Tier Classification
|
|
34
48
|
|
|
35
49
|
**MVP** (80%+ competitors, high demand):
|
|
36
50
|
- Present in 8+ out of 10 competitors
|
|
@@ -67,7 +81,7 @@ Per feature, collect:
|
|
|
67
81
|
|
|
68
82
|
---
|
|
69
83
|
|
|
70
|
-
##
|
|
84
|
+
## Revalidation Sources (ALWAYS Use Multiple)
|
|
71
85
|
|
|
72
86
|
### Comparison & Alternatives (Primary)
|
|
73
87
|
|
|
@@ -135,9 +149,11 @@ Per feature, collect:
|
|
|
135
149
|
|
|
136
150
|
---
|
|
137
151
|
|
|
138
|
-
## Methodology
|
|
152
|
+
## Methodology (ALWAYS Deep)
|
|
139
153
|
|
|
140
|
-
|
|
154
|
+
**Process**: Always execute both phases regardless of scope tier (MVP/Standard/Full).
|
|
155
|
+
|
|
156
|
+
### Phase 1: Comparison Scan
|
|
141
157
|
|
|
142
158
|
**Goal**: Extract feature matrix from comparison pages.
|
|
143
159
|
|
|
@@ -151,17 +167,19 @@ Per feature, collect:
|
|
|
151
167
|
|
|
152
168
|
---
|
|
153
169
|
|
|
154
|
-
### Phase 2:
|
|
170
|
+
### Phase 2: Multi-Source Revalidation (MANDATORY)
|
|
155
171
|
|
|
156
|
-
**Goal**: Validate tier with evidence from
|
|
172
|
+
**Goal**: Validate tier with evidence from MULTIPLE source types.
|
|
157
173
|
|
|
158
|
-
**
|
|
174
|
+
**ALWAYS cross-validate** across source categories:
|
|
159
175
|
- Comparison pages (initial)
|
|
160
|
-
-
|
|
161
|
-
- User signals (Reddit, reviews)
|
|
176
|
+
- Ecosystems (Chrome, WordPress, GitHub, NPM)
|
|
177
|
+
- User signals (Reddit, reviews, forums)
|
|
162
178
|
- Competitor direct (pricing, features)
|
|
163
179
|
|
|
164
|
-
**
|
|
180
|
+
**No shortcuts**: Every feature needs multi-source validation, even for MVP scope.
|
|
181
|
+
|
|
182
|
+
**Output**: Tier classification with evidence from 3+ source types
|
|
165
183
|
|
|
166
184
|
---
|
|
167
185
|
|
|
@@ -52,22 +52,6 @@
|
|
|
52
52
|
|
|
53
53
|
---
|
|
54
54
|
|
|
55
|
-
## Implementation Resources
|
|
56
|
-
|
|
57
|
-
> **For Engineers**: General documentation (feature-specific docs in feature folders)
|
|
58
|
-
|
|
59
|
-
### Platform Documentation
|
|
60
|
-
| Technology | Link | Purpose |
|
|
61
|
-
|------------|------|---------|
|
|
62
|
-
| {Platform/Service} | [Docs](url) | {General purpose} |
|
|
63
|
-
|
|
64
|
-
### Industry Examples
|
|
65
|
-
| Company | Link | What to Learn |
|
|
66
|
-
|---------|------|---------------|
|
|
67
|
-
| {Company} | [Example](url) | {General pattern} |
|
|
68
|
-
|
|
69
|
-
---
|
|
70
|
-
|
|
71
55
|
## Notes
|
|
72
56
|
|
|
73
57
|
**Project Goals**:
|
|
@@ -80,16 +80,6 @@
|
|
|
80
80
|
|
|
81
81
|
---
|
|
82
82
|
|
|
83
|
-
## Implementation Resources
|
|
84
|
-
|
|
85
|
-
> **For Engineers**: Links specific to this feature
|
|
86
|
-
|
|
87
|
-
| Topic | Link | Purpose |
|
|
88
|
-
|-------|------|---------|
|
|
89
|
-
| {Service} {Feature} API | [Docs](url) | {Implementation} |
|
|
90
|
-
|
|
91
|
-
---
|
|
92
|
-
|
|
93
83
|
## Open Questions
|
|
94
84
|
|
|
95
85
|
- {Question requiring customer input}
|
|
@@ -10,15 +10,13 @@
|
|
|
10
10
|
|
|
11
11
|
## Mode Detection
|
|
12
12
|
|
|
13
|
-
**Principle**:
|
|
13
|
+
**Principle**: Default outputs questionnaire only. BRD creation requires explicit flag.
|
|
14
14
|
|
|
15
15
|
**Detection**:
|
|
16
|
-
- `--answers {file}` → Process Answers mode
|
|
17
|
-
- `--generate-brd {file}` → Generate BRD mode
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
- `plans/brd/` exists → Add Feature mode
|
|
21
|
-
- Modifying confirmed UC → Change Request mode
|
|
16
|
+
- `--answers {file}` → Process Answers mode (CREATE BRD)
|
|
17
|
+
- `--generate-brd {file}` → Generate BRD mode (CREATE BRD)
|
|
18
|
+
- New customer request → New Project mode (questionnaire only)
|
|
19
|
+
- Adding to existing research → Add Feature mode (questionnaire only)
|
|
22
20
|
|
|
23
21
|
**Action**: Execute appropriate workflow for detected mode.
|
|
24
22
|
|
|
@@ -30,50 +28,93 @@
|
|
|
30
28
|
|
|
31
29
|
**Mindset**: Discovery mode. Understand context, research market, validate with customer.
|
|
32
30
|
|
|
33
|
-
### Context Gathering
|
|
31
|
+
### STEP 1: Context Gathering (MANDATORY - DO THIS FIRST)
|
|
32
|
+
|
|
33
|
+
**CRITICAL**: ALWAYS ask questions BEFORE doing any research. DO NOT skip this step.
|
|
34
34
|
|
|
35
35
|
**Check for existing questionnaire**:
|
|
36
36
|
- If found: Ask "Found existing research. Use it or start fresh?"
|
|
37
37
|
- Reuse → Switch to Generate BRD mode
|
|
38
38
|
- Fresh → Continue with new research
|
|
39
39
|
|
|
40
|
-
**
|
|
41
|
-
1.
|
|
42
|
-
2.
|
|
43
|
-
3.
|
|
44
|
-
4.
|
|
45
|
-
5. Scope tier (Core/Standard/Full)
|
|
40
|
+
**ALWAYS ask 4 questions** using AskUserQuestion tool:
|
|
41
|
+
1. **Industry**: SaaS / E-commerce / Marketplace / etc.
|
|
42
|
+
2. **Target users**: B2B / B2C / Internal
|
|
43
|
+
3. **Constraints**: Timeline / Budget / Compliance / Integrations
|
|
44
|
+
4. **Scope mode**: MVP / Market Standard / Full (determines WHICH features to include)
|
|
46
45
|
|
|
47
|
-
**
|
|
46
|
+
**DO NOT proceed to research until user answers these questions.**
|
|
48
47
|
|
|
49
48
|
**Output**: Context understanding, scope alignment
|
|
50
49
|
|
|
51
50
|
---
|
|
52
51
|
|
|
53
|
-
### Market Research (
|
|
52
|
+
### STEP 2: Market Research (ALWAYS Deep + Revalidation)
|
|
53
|
+
|
|
54
|
+
**CRITICAL**: After user answers questions and scope tier is chosen, THEN do deep research + multi-source revalidation.
|
|
54
55
|
|
|
55
56
|
**Methodology**: See `research.md` for full process.
|
|
56
57
|
|
|
57
|
-
**
|
|
58
|
-
1. Comparison pages (feature matrix extraction)
|
|
59
|
-
2.
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
**Always execute** (same process for ALL scope tiers):
|
|
59
|
+
1. **Phase 1**: Comparison pages (feature matrix extraction)
|
|
60
|
+
2. **Phase 2**: Multi-source revalidation (MANDATORY)
|
|
61
|
+
- Ecosystems (Chrome, WordPress, GitHub, NPM)
|
|
62
|
+
- User signals (Reddit, reviews, forums)
|
|
63
|
+
- Competitor direct (pricing, features)
|
|
64
|
+
3. Full tier classification with evidence from 3+ source types
|
|
62
65
|
|
|
63
|
-
**
|
|
66
|
+
**No shortcuts**: Core/Standard/Full scope all get identical deep research + revalidation process.
|
|
64
67
|
|
|
65
|
-
|
|
68
|
+
**Output**: Features with tier classification and multi-source evidence
|
|
66
69
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
**Principle**: Default output. No BRD files created yet.
|
|
70
|
+
---
|
|
70
71
|
|
|
71
|
-
|
|
72
|
+
### STEP 3: Generate Questionnaire (ALWAYS)
|
|
73
|
+
|
|
74
|
+
**Principle**: After research is complete, generate questionnaire. No BRD files created yet.
|
|
75
|
+
|
|
76
|
+
**How to generate**:
|
|
77
|
+
1. Create JSON with research data (see format below)
|
|
78
|
+
2. Call Python script: `python .claude/skills/debrief/scripts/generate_questionnaire.py questionnaire-{YYYY-MM-DD}.xlsx -`
|
|
79
|
+
3. Pipe JSON to stdin or save as file
|
|
80
|
+
|
|
81
|
+
**JSON format**:
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"project_name": "Project Name",
|
|
85
|
+
"date": "2026-01-25",
|
|
86
|
+
"research": {
|
|
87
|
+
"depth": "Deep",
|
|
88
|
+
"features_count": 12,
|
|
89
|
+
"tiers": {"MVP": 5, "Standard": 4, "Advanced": 3},
|
|
90
|
+
"sources_count": 23
|
|
91
|
+
},
|
|
92
|
+
"references": {
|
|
93
|
+
"Feature Name": [
|
|
94
|
+
{"type": "Comparison", "url": "https://..."},
|
|
95
|
+
{"type": "G2 Reviews", "url": "https://..."}
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
"questions": [
|
|
99
|
+
{
|
|
100
|
+
"category": "Requirements",
|
|
101
|
+
"question": "Question text?",
|
|
102
|
+
"priority": "Required",
|
|
103
|
+
"context": "Why we're asking",
|
|
104
|
+
"source": "UC-XXX-NNN"
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**3 sheets generated**:
|
|
72
111
|
- **Summary**: Feature count, tier distribution, research stats
|
|
73
112
|
- **Questions**: Validation + open questions
|
|
74
113
|
- **References**: URLs by feature (comparison pages, reviews, ecosystems)
|
|
75
114
|
|
|
76
|
-
**Output**:
|
|
115
|
+
**Output location**:
|
|
116
|
+
- New Project: `plans/brd/use-cases/{project-name}/questionnaire-{YYYY-MM-DD}.xlsx`
|
|
117
|
+
- Add Feature: `plans/brd/use-cases/{feature-name}/questionnaire-{YYYY-MM-DD}.xlsx`
|
|
77
118
|
|
|
78
119
|
**NO BRD files created**. User reviews questionnaire first.
|
|
79
120
|
|
|
@@ -90,8 +131,7 @@
|
|
|
90
131
|
**Next steps**:
|
|
91
132
|
1. Review questionnaire
|
|
92
133
|
2. Send to customer for answers
|
|
93
|
-
3. After answers: `/debrief --answers questionnaire-{date}.xlsx`
|
|
94
|
-
4. BRD will be created from answers
|
|
134
|
+
3. After answers: `/debrief --answers questionnaire-{date}.xlsx` to create BRD
|
|
95
135
|
|
|
96
136
|
---
|
|
97
137
|
|
|
@@ -101,25 +141,29 @@
|
|
|
101
141
|
|
|
102
142
|
**Mindset**: Continuity mode. Check duplicates, maintain consistency.
|
|
103
143
|
|
|
104
|
-
### Context Gathering
|
|
144
|
+
### STEP 1: Context Gathering (MANDATORY - DO THIS FIRST)
|
|
105
145
|
|
|
106
|
-
**
|
|
107
|
-
|
|
108
|
-
2
|
|
146
|
+
**CRITICAL**: ALWAYS ask questions BEFORE doing any research. DO NOT skip this step.
|
|
147
|
+
|
|
148
|
+
**ALWAYS ask 2 questions** using AskUserQuestion tool:
|
|
149
|
+
1. **Feature name**: What feature to add?
|
|
150
|
+
2. **Scope mode**: MVP / Market Standard / Full (determines WHICH features to include)
|
|
109
151
|
|
|
110
152
|
**Duplicate check**: Read `docs-graph.json` if exists, warn if similar feature found
|
|
111
153
|
|
|
154
|
+
**DO NOT proceed to research until user answers these questions.**
|
|
155
|
+
|
|
112
156
|
**Output**: Feature to add, scope confirmed
|
|
113
157
|
|
|
114
158
|
---
|
|
115
159
|
|
|
116
|
-
### Research & Generate Questionnaire
|
|
160
|
+
### STEP 2: Research & Generate Questionnaire
|
|
117
161
|
|
|
118
162
|
**Same as New Project**:
|
|
119
163
|
- Market research (comparison-first, see `research.md`)
|
|
120
164
|
- Generate questionnaire (validation + open questions)
|
|
121
165
|
|
|
122
|
-
**Output**: `
|
|
166
|
+
**Output**: `plans/brd/use-cases/{feature}/questionnaire-{YYYY-MM-DD}.xlsx`
|
|
123
167
|
|
|
124
168
|
**NO BRD files created**. User reviews questionnaire, gets answers, then runs `--answers`.
|
|
125
169
|
|
|
@@ -127,11 +171,13 @@
|
|
|
127
171
|
|
|
128
172
|
## Process Answers Mode
|
|
129
173
|
|
|
130
|
-
**
|
|
174
|
+
**Trigger**: `/debrief --answers questionnaire.xlsx`
|
|
175
|
+
|
|
176
|
+
**Goal**: Process filled questionnaire and ask what user wants to do next.
|
|
131
177
|
|
|
132
|
-
**Mindset**:
|
|
178
|
+
**Mindset**: Interactive mode. User decides next action based on answers.
|
|
133
179
|
|
|
134
|
-
### Read Questionnaire
|
|
180
|
+
### STEP 1: Read Questionnaire
|
|
135
181
|
|
|
136
182
|
**Read questionnaire** (Excel file):
|
|
137
183
|
- Summary sheet (features, tiers, research)
|
|
@@ -140,7 +186,23 @@
|
|
|
140
186
|
|
|
141
187
|
---
|
|
142
188
|
|
|
143
|
-
###
|
|
189
|
+
### STEP 2: Ask What To Do (MANDATORY)
|
|
190
|
+
|
|
191
|
+
**CRITICAL**: ALWAYS ask what user wants to do. DO NOT auto-create BRD.
|
|
192
|
+
|
|
193
|
+
**Ask using AskUserQuestion tool** - What would you like to do?
|
|
194
|
+
1. **Continue research and revise summary** (do more research based on answers)
|
|
195
|
+
2. **Ask follow-up questions** (generate new questionnaire with deeper questions)
|
|
196
|
+
3. **Create BRD** (generate use cases and BRD files)
|
|
197
|
+
|
|
198
|
+
**Based on user choice**:
|
|
199
|
+
- Choice 1 → Do additional research, update questionnaire
|
|
200
|
+
- Choice 2 → Generate new questionnaire with follow-up questions
|
|
201
|
+
- Choice 3 → Proceed to Feature Sequencing (below)
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
### STEP 3: Feature Sequencing (ONLY if user chose "Create BRD")
|
|
144
206
|
|
|
145
207
|
**Principle**: Order by dependencies within each tier.
|
|
146
208
|
|
|
@@ -157,7 +219,7 @@
|
|
|
157
219
|
|
|
158
220
|
---
|
|
159
221
|
|
|
160
|
-
### Use Case Generation
|
|
222
|
+
### STEP 4: Use Case Generation (ONLY if user chose "Create BRD")
|
|
161
223
|
|
|
162
224
|
**Principle**: Lean 80/20 format (~30 lines).
|
|
163
225
|
|
|
@@ -181,9 +243,9 @@
|
|
|
181
243
|
|
|
182
244
|
---
|
|
183
245
|
|
|
184
|
-
### BRD Structure Creation
|
|
246
|
+
### STEP 5: BRD Structure Creation (ONLY if user chose "Create BRD")
|
|
185
247
|
|
|
186
|
-
**Create project-wide** (`brd/`):
|
|
248
|
+
**Create project-wide** (`plans/brd/`):
|
|
187
249
|
- README.md (all features index)
|
|
188
250
|
- context.md (stakeholders, users, constraints)
|
|
189
251
|
- references.md (industry, compliance, competitor overview)
|
|
@@ -204,73 +266,26 @@
|
|
|
204
266
|
|
|
205
267
|
---
|
|
206
268
|
|
|
207
|
-
## Change Request Mode
|
|
208
|
-
|
|
209
|
-
**Goal**: Track modifications to confirmed BRD.
|
|
210
|
-
|
|
211
|
-
**Mindset**: Traceability mode. Document change rationale and impact.
|
|
212
|
-
|
|
213
|
-
### Process
|
|
214
|
-
|
|
215
|
-
**Create CR** (`brd/changes/CR-{NNN}-{slug}.md`):
|
|
216
|
-
- Change description
|
|
217
|
-
- Reason for change
|
|
218
|
-
- Impact analysis (affected UCs)
|
|
219
|
-
|
|
220
|
-
**If gaps introduced**: Generate questionnaire at `brd/changes/CR-{NNN}-questionnaire-{date}.xlsx`
|
|
221
|
-
|
|
222
|
-
**Update**: Affected use cases, references, changelog
|
|
223
|
-
|
|
224
|
-
**Output**: CR document with impact analysis
|
|
225
|
-
|
|
226
|
-
---
|
|
227
|
-
|
|
228
269
|
## Generate BRD Mode
|
|
229
270
|
|
|
271
|
+
**Trigger**: `/debrief --generate-brd questionnaire.xlsx`
|
|
272
|
+
|
|
230
273
|
**Goal**: Generate full BRD from existing questionnaire research.
|
|
231
274
|
|
|
232
275
|
**Mindset**: Resumption mode. User reviewed Summary + Questionnaire, ready for full BRD.
|
|
233
276
|
|
|
234
277
|
### Process
|
|
235
278
|
|
|
236
|
-
**
|
|
237
|
-
- Ask: "Found existing research in questionnaire. Use it or start fresh?"
|
|
238
|
-
- Reuse (generate from questionnaire)
|
|
239
|
-
- Fresh (ignore questionnaire, do new research)
|
|
240
|
-
|
|
241
|
-
**If reuse**:
|
|
242
|
-
- Execute same process as Process Answers mode
|
|
279
|
+
**Execute same process as Process Answers mode**:
|
|
243
280
|
- Read questionnaire sheets
|
|
244
281
|
- Sequence features
|
|
245
282
|
- Generate use cases
|
|
246
283
|
- Create BRD structure
|
|
247
284
|
|
|
248
|
-
**If fresh**:
|
|
249
|
-
- Ignore questionnaire
|
|
250
|
-
- Run full research flow (New Project or Add Feature mode)
|
|
251
|
-
|
|
252
285
|
**Output**: BRD files + feature folders
|
|
253
286
|
|
|
254
287
|
---
|
|
255
288
|
|
|
256
|
-
## Questionnaire Only Mode
|
|
257
|
-
|
|
258
|
-
**Goal**: Generate questions without creating BRD.
|
|
259
|
-
|
|
260
|
-
**Mindset**: Quick mode. Capture questions for customer.
|
|
261
|
-
|
|
262
|
-
### Process
|
|
263
|
-
|
|
264
|
-
**Ask**:
|
|
265
|
-
- Topic/feature name
|
|
266
|
-
- Custom questions (user provides)
|
|
267
|
-
|
|
268
|
-
**Generate**: `questionnaire-{date}.xlsx` in current directory
|
|
269
|
-
|
|
270
|
-
**Output**: Excel file ready to send
|
|
271
|
-
|
|
272
|
-
---
|
|
273
|
-
|
|
274
289
|
## File Organization Principles
|
|
275
290
|
|
|
276
291
|
**Scope-based placement**:
|
|
@@ -320,17 +335,17 @@
|
|
|
320
335
|
|
|
321
336
|
## Summary
|
|
322
337
|
|
|
323
|
-
**Workflow
|
|
324
|
-
- New Project: Full discovery and research
|
|
325
|
-
- Add Feature: Focused research, duplicate check
|
|
326
|
-
-
|
|
327
|
-
-
|
|
328
|
-
|
|
329
|
-
|
|
338
|
+
**Workflow modes**:
|
|
339
|
+
- New Project: Full discovery and research → questionnaire (no BRD)
|
|
340
|
+
- Add Feature: Focused research, duplicate check → questionnaire (no BRD)
|
|
341
|
+
- Process Answers (`--answers`): Read filled questionnaire → CREATE BRD
|
|
342
|
+
- Generate BRD (`--generate-brd`): Read research questionnaire → CREATE BRD
|
|
343
|
+
|
|
344
|
+
**Default**: Questionnaire only. BRD creation requires explicit flag.
|
|
330
345
|
|
|
331
346
|
**Consistent principles**:
|
|
332
|
-
- Business focus (WHAT and WHY)
|
|
333
|
-
- Evidence-based validation
|
|
334
|
-
-
|
|
335
|
-
-
|
|
336
|
-
-
|
|
347
|
+
- Business focus (WHAT and WHY, never HOW)
|
|
348
|
+
- Evidence-based validation (multi-source)
|
|
349
|
+
- Always deep research + revalidation
|
|
350
|
+
- Customer validation via questionnaire
|
|
351
|
+
- BRD creation ONLY when user provides filled questionnaire
|
|
@@ -36,6 +36,32 @@ questions.json format:
|
|
|
36
36
|
|
|
37
37
|
import sys
|
|
38
38
|
import json
|
|
39
|
+
import subprocess
|
|
40
|
+
import os
|
|
41
|
+
|
|
42
|
+
# Check and install openpyxl if missing
|
|
43
|
+
def check_dependencies():
|
|
44
|
+
"""Check if openpyxl is installed, install if missing."""
|
|
45
|
+
try:
|
|
46
|
+
import openpyxl
|
|
47
|
+
except ImportError:
|
|
48
|
+
print("Installing required dependency: openpyxl")
|
|
49
|
+
|
|
50
|
+
# Detect pip command (pip3 or pip)
|
|
51
|
+
pip_cmd = 'pip3' if os.system('which pip3 > /dev/null 2>&1') == 0 else 'pip'
|
|
52
|
+
|
|
53
|
+
try:
|
|
54
|
+
subprocess.check_call([pip_cmd, 'install', 'openpyxl'],
|
|
55
|
+
stdout=subprocess.DEVNULL,
|
|
56
|
+
stderr=subprocess.DEVNULL)
|
|
57
|
+
print("✓ openpyxl installed successfully")
|
|
58
|
+
except subprocess.CalledProcessError:
|
|
59
|
+
print("✗ Failed to install openpyxl")
|
|
60
|
+
print(f"Please run: {pip_cmd} install openpyxl")
|
|
61
|
+
sys.exit(1)
|
|
62
|
+
|
|
63
|
+
check_dependencies()
|
|
64
|
+
|
|
39
65
|
from openpyxl import Workbook
|
|
40
66
|
from openpyxl.styles import Font, PatternFill, Alignment, Border, Side
|
|
41
67
|
from openpyxl.utils import get_column_letter
|
package/src/commands/update.js
CHANGED
|
@@ -6,14 +6,35 @@
|
|
|
6
6
|
|
|
7
7
|
import chalk from 'chalk';
|
|
8
8
|
import ora from 'ora';
|
|
9
|
+
import { execSync } from 'child_process';
|
|
10
|
+
import fs from 'fs-extra';
|
|
11
|
+
import path from 'path';
|
|
9
12
|
|
|
10
|
-
import { checkForUpdates, copySkillsToProject, getInstalledSkills } from '../utils/skills.js';
|
|
13
|
+
import { checkForUpdates, copySkillsToProject, getInstalledSkills, cleanupOldSkills } from '../utils/skills.js';
|
|
11
14
|
|
|
12
15
|
export async function update(options) {
|
|
13
16
|
const projectPath = process.cwd();
|
|
14
17
|
|
|
15
18
|
console.log(chalk.bold('\n📦 Claude Skills Update\n'));
|
|
16
19
|
|
|
20
|
+
// Check for npm package updates
|
|
21
|
+
const packageSpinner = ora('Checking npm for latest version...').start();
|
|
22
|
+
try {
|
|
23
|
+
const currentVersion = await getCurrentPackageVersion();
|
|
24
|
+
const latestVersion = await getLatestNpmVersion();
|
|
25
|
+
|
|
26
|
+
if (currentVersion !== latestVersion) {
|
|
27
|
+
packageSpinner.info(`Package update available: ${currentVersion} → ${latestVersion}`);
|
|
28
|
+
console.log(chalk.yellow(`\nTo update the CLI package, run:\n npm install -g @codihaus/claude-skills@latest\n`));
|
|
29
|
+
} else {
|
|
30
|
+
packageSpinner.succeed(`CLI package is up to date (${currentVersion})`);
|
|
31
|
+
}
|
|
32
|
+
} catch (e) {
|
|
33
|
+
packageSpinner.warn('Could not check for CLI updates');
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
console.log('');
|
|
37
|
+
|
|
17
38
|
// Check for installed skills
|
|
18
39
|
const installed = await getInstalledSkills(projectPath);
|
|
19
40
|
|
|
@@ -25,7 +46,7 @@ export async function update(options) {
|
|
|
25
46
|
console.log(chalk.gray(`Found ${installed.length} installed skills\n`));
|
|
26
47
|
|
|
27
48
|
// Check for updates
|
|
28
|
-
const spinner = ora('Checking for updates...').start();
|
|
49
|
+
const spinner = ora('Checking for skill updates...').start();
|
|
29
50
|
const updates = await checkForUpdates(projectPath);
|
|
30
51
|
spinner.stop();
|
|
31
52
|
|
|
@@ -52,6 +73,13 @@ export async function update(options) {
|
|
|
52
73
|
|
|
53
74
|
try {
|
|
54
75
|
const skillNames = updates.map(u => u.name);
|
|
76
|
+
|
|
77
|
+
// Clean up old files first
|
|
78
|
+
updateSpinner.text = 'Cleaning up old skill files...';
|
|
79
|
+
await cleanupOldSkills(projectPath, skillNames);
|
|
80
|
+
|
|
81
|
+
// Copy new versions
|
|
82
|
+
updateSpinner.text = 'Installing updated skills...';
|
|
55
83
|
const { copied, errors } = await copySkillsToProject(projectPath, skillNames);
|
|
56
84
|
|
|
57
85
|
if (errors.length > 0) {
|
|
@@ -70,3 +98,30 @@ export async function update(options) {
|
|
|
70
98
|
|
|
71
99
|
console.log(chalk.green('\n✅ Update complete!\n'));
|
|
72
100
|
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Get current package version
|
|
104
|
+
*/
|
|
105
|
+
async function getCurrentPackageVersion() {
|
|
106
|
+
try {
|
|
107
|
+
const packageJson = await fs.readJson(path.join(import.meta.dirname, '../../package.json'));
|
|
108
|
+
return packageJson.version;
|
|
109
|
+
} catch (e) {
|
|
110
|
+
return 'unknown';
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Get latest version from npm
|
|
116
|
+
*/
|
|
117
|
+
async function getLatestNpmVersion() {
|
|
118
|
+
try {
|
|
119
|
+
const result = execSync('npm view @codihaus/claude-skills version', {
|
|
120
|
+
encoding: 'utf8',
|
|
121
|
+
stdio: ['pipe', 'pipe', 'ignore']
|
|
122
|
+
});
|
|
123
|
+
return result.trim();
|
|
124
|
+
} catch (e) {
|
|
125
|
+
throw new Error('Could not fetch latest version from npm');
|
|
126
|
+
}
|
|
127
|
+
}
|
package/src/utils/skills.js
CHANGED
|
@@ -243,6 +243,30 @@ export async function removeSkillFromProject(projectPath, skillName) {
|
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
+
/**
|
|
247
|
+
* Clean up old skill files before updating
|
|
248
|
+
* Removes entire skill directory to ensure deleted files are removed
|
|
249
|
+
*/
|
|
250
|
+
export async function cleanupOldSkills(projectPath, skillNames) {
|
|
251
|
+
const skillsPath = path.join(projectPath, '.claude', 'skills');
|
|
252
|
+
|
|
253
|
+
if (!await fs.pathExists(skillsPath)) {
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
for (const skillName of skillNames) {
|
|
258
|
+
const skillPath = path.join(skillsPath, skillName);
|
|
259
|
+
|
|
260
|
+
if (await fs.pathExists(skillPath)) {
|
|
261
|
+
try {
|
|
262
|
+
await fs.remove(skillPath);
|
|
263
|
+
} catch (e) {
|
|
264
|
+
// Ignore errors, will be logged during copy
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
246
270
|
/**
|
|
247
271
|
* Check if skills need updating
|
|
248
272
|
*/
|