@codihaus/claude-skills 1.6.21 → 1.6.23

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.
@@ -0,0 +1,340 @@
1
+ # Workflow Principles
2
+
3
+ **Mindset**: Business analyst. Focus on WHAT and WHY, defer HOW to /dev-specs.
4
+
5
+ **Methodology**: Mode detection → Context gathering → Research → Document → Questionnaire
6
+
7
+ **Expected Outcome**: Market-validated BRD with tiered features, lean use cases, customer questionnaire.
8
+
9
+ ---
10
+
11
+ ## Mode Detection
12
+
13
+ **Principle**: Behavior changes based on context.
14
+
15
+ **Detection**:
16
+ - `--answers {file}` → Process Answers mode
17
+ - `--generate-brd {file}` → Generate BRD mode
18
+ - `--questionnaire-only` → Questionnaire Only mode
19
+ - No `plans/brd/` → New Project mode
20
+ - `plans/brd/` exists → Add Feature mode
21
+ - Modifying confirmed UC → Change Request mode
22
+
23
+ **Action**: Execute appropriate workflow for detected mode.
24
+
25
+ ---
26
+
27
+ ## New Project Mode
28
+
29
+ **Goal**: Create initial BRD with market-validated features.
30
+
31
+ **Mindset**: Discovery mode. Understand context, research market, validate with customer.
32
+
33
+ ### Context Gathering
34
+
35
+ **Ask 6 questions** (AskUserQuestion):
36
+ 1. Project type (new/existing codebase)
37
+ 2. Industry (SaaS/E-commerce/Marketplace/etc.)
38
+ 3. Target users (B2B/B2C/Internal)
39
+ 4. Constraints (timeline/budget/compliance/integrations)
40
+ 5. Scope tier (Core/Standard/Full)
41
+ 6. Research depth (Quick 5min / Deep 15-20min)
42
+
43
+ **If existing codebase**: Scan for docs + features (Glob, Read)
44
+
45
+ **Output**: Context understanding, scope alignment
46
+
47
+ ---
48
+
49
+ ### Market Research
50
+
51
+ **Methodology**: See `research.md` for full process.
52
+
53
+ **Quick** (5 min):
54
+ - Find 2-3 comparison/alternative pages
55
+ - Extract feature matrix
56
+ - Initial tier hypothesis
57
+
58
+ **Deep** (15-20 min):
59
+ - Comparison pages (initial)
60
+ - Cross-validate with ecosystem + user signals
61
+ - Full tier classification with evidence
62
+
63
+ **After research, ask output preference**:
64
+ - Summary + Questionnaire (review first)
65
+ - Full BRD (write all files now)
66
+
67
+ **Output**: Features with tier classification and evidence
68
+
69
+ ---
70
+
71
+ ### Feature Sequencing
72
+
73
+ **Principle**: Order by dependencies within each tier.
74
+
75
+ **Common patterns**:
76
+ - Create before operate (signup before login)
77
+ - Auth before features (login before projects)
78
+ - Basic before advanced (CRUD before bulk operations)
79
+ - Data before analytics (tracking before dashboards)
80
+ - Core before extensions (email before templates)
81
+
82
+ **Validation**: No forward dependencies (UC-001 doesn't depend on UC-002)
83
+
84
+ **Output**: Sequenced feature list (UC-001, UC-002, UC-003...)
85
+
86
+ ---
87
+
88
+ ### Use Case Generation
89
+
90
+ **Principle**: Lean 80/20 format (~30 lines).
91
+
92
+ **Include (20%)**:
93
+ - Story (1 line)
94
+ - Critical acceptance criteria (3-5 bullets)
95
+ - Key business rules (constraints, limits)
96
+ - Open questions (blockers)
97
+
98
+ **Defer to /dev-specs (80%)**:
99
+ - Detailed flows, integrations, edge cases, UI/UX
100
+
101
+ **Template**: `templates/use-case.md`
102
+
103
+ **Output**: Lean use cases in `brd/use-cases/{feature}/UC-{GROUP}-{NNN}-{slug}.md`
104
+
105
+ ---
106
+
107
+ ### BRD Structure
108
+
109
+ **Project-wide** (`brd/`):
110
+ - README.md (all features index)
111
+ - context.md (stakeholders, users, constraints)
112
+ - references.md (industry, compliance, competitor overview)
113
+ - changelog.md
114
+
115
+ **Feature-specific** (`features/{feature}/`):
116
+ - README.md (feature overview)
117
+ - references.md (market research, tier evidence)
118
+ - questionnaire-{date}.xlsx
119
+
120
+ **Templates**: `templates/brd-references.md`, `templates/feature-references.md`
121
+
122
+ **Output**: Organized BRD structure with scope separation
123
+
124
+ ---
125
+
126
+ ### Questionnaire
127
+
128
+ **Principle**: Always generate. Validate assumptions + fill gaps.
129
+
130
+ **3 sheets**:
131
+ - **Summary**: Feature count, tier distribution, research stats
132
+ - **Questions**: Validation + open questions
133
+ - **References**: URLs by feature (comparison pages, reviews, ecosystems)
134
+
135
+ **Output**: `features/{feature}/questionnaire-{date}.xlsx` (permanent reference)
136
+
137
+ ---
138
+
139
+ ### Summary
140
+
141
+ **Provide**:
142
+ - Files created (brd/, features/)
143
+ - Use case count (lean format)
144
+ - Research summary (comparison pages, evidence sources)
145
+ - Tier distribution (MVP: X, Standard: Y, Advanced: Z)
146
+ - Questionnaire location and question count
147
+
148
+ **Next steps**:
149
+ - Review BRD with stakeholders
150
+ - Send questionnaire to customer
151
+ - Process with `/debrief --answers {path}`
152
+ - Then `/dev-specs {feature}` for implementation
153
+
154
+ ---
155
+
156
+ ## Add Feature Mode
157
+
158
+ **Goal**: Extend existing BRD with new feature.
159
+
160
+ **Mindset**: Continuity mode. Check duplicates, maintain consistency.
161
+
162
+ ### Context Gathering
163
+
164
+ **Ask 3 questions**:
165
+ 1. Feature name
166
+ 2. Scope tier (Core/Standard/Full)
167
+ 3. Research depth (Quick / Deep)
168
+
169
+ **Duplicate check**: Read `docs-graph.json` if exists, warn if similar feature found
170
+
171
+ **Output**: Feature to add, scope confirmed
172
+
173
+ ---
174
+
175
+ ### Research & Document
176
+
177
+ **Same as New Project**:
178
+ - Market research (comparison-first, see `research.md`)
179
+ - Feature sequencing (dependencies)
180
+ - Lean use cases (templates/use-case.md)
181
+
182
+ **Update**:
183
+ - `brd/README.md` (add to index)
184
+ - `brd/changelog.md` (log addition)
185
+ - Create `features/{feature}/` folder
186
+
187
+ **Questionnaire**: Always generate (validation + open questions)
188
+
189
+ **Output**: Feature added to BRD with research and questionnaire
190
+
191
+ ---
192
+
193
+ ## Process Answers Mode
194
+
195
+ **Goal**: Update BRD with customer responses.
196
+
197
+ **Mindset**: Integration mode. Incorporate feedback, resolve gaps.
198
+
199
+ ### Process
200
+
201
+ **Read questionnaire** (Excel file):
202
+ - Extract answers from "Answer" column
203
+ - Match to source use cases via "Context/Source"
204
+
205
+ **Update use cases**:
206
+ - Remove questions from "Open Questions" section
207
+ - Add answers to relevant sections (Acceptance Criteria, Business Rules)
208
+
209
+ **Update feature README**:
210
+ - Log questionnaire as processed
211
+ - Track history
212
+
213
+ **Check completeness**:
214
+ - If gaps remain → generate new questionnaire (new date)
215
+ - If complete → update UC status to "Confirmed"
216
+
217
+ **Output**: Updated use cases, questionnaire history, completion status
218
+
219
+ ---
220
+
221
+ ## Change Request Mode
222
+
223
+ **Goal**: Track modifications to confirmed BRD.
224
+
225
+ **Mindset**: Traceability mode. Document change rationale and impact.
226
+
227
+ ### Process
228
+
229
+ **Create CR** (`brd/changes/CR-{NNN}-{slug}.md`):
230
+ - Change description
231
+ - Reason for change
232
+ - Impact analysis (affected UCs)
233
+
234
+ **If gaps introduced**: Generate questionnaire at `brd/changes/CR-{NNN}-questionnaire-{date}.xlsx`
235
+
236
+ **Update**: Affected use cases, references, changelog
237
+
238
+ **Output**: CR document with impact analysis
239
+
240
+ ---
241
+
242
+ ## Generate BRD Mode
243
+
244
+ **Goal**: Generate full BRD from existing questionnaire research.
245
+
246
+ **Mindset**: Resumption mode. User reviewed Summary + Questionnaire, ready for full BRD.
247
+
248
+ ### Process
249
+
250
+ **Read questionnaire**:
251
+ - Summary sheet (features, tiers, research stats)
252
+ - References sheet (source URLs)
253
+
254
+ **Generate**: Full BRD structure from existing research (no re-research)
255
+
256
+ **Output**: BRD files + feature folders
257
+
258
+ ---
259
+
260
+ ## Questionnaire Only Mode
261
+
262
+ **Goal**: Generate questions without creating BRD.
263
+
264
+ **Mindset**: Quick mode. Capture questions for customer.
265
+
266
+ ### Process
267
+
268
+ **Ask**:
269
+ - Topic/feature name
270
+ - Custom questions (user provides)
271
+
272
+ **Generate**: `questionnaire-{date}.xlsx` in current directory
273
+
274
+ **Output**: Excel file ready to send
275
+
276
+ ---
277
+
278
+ ## File Organization Principles
279
+
280
+ **Scope-based placement**:
281
+
282
+ **Project-wide** (applies to entire product):
283
+ - Industry landscape → `brd/references.md`
284
+ - Compliance (GDPR, PCI) → `brd/references.md`
285
+ - Competitor companies → `brd/references.md`
286
+ - Use cases → `brd/use-cases/{feature}/`
287
+
288
+ **Feature-specific** (applies to one feature):
289
+ - Market research → `features/{feature}/references.md`
290
+ - Tier evidence → `features/{feature}/references.md`
291
+ - Questionnaire → `features/{feature}/questionnaire-{date}.xlsx`
292
+
293
+ **Cross-reference**: Files can link to each other
294
+
295
+ ---
296
+
297
+ ## Use Case Principles
298
+
299
+ **Lean format** (80/20 rule):
300
+ - ~30 lines max
301
+ - Scannable in 30 seconds
302
+ - Business focus only (no technical details)
303
+
304
+ **Sequencing**:
305
+ - Dependencies first (create before validate)
306
+ - Logical user journey
307
+ - No forward references
308
+
309
+ **Wikilinks**: Use [[node-id]] for docs-graph traceability
310
+
311
+ ---
312
+
313
+ ## Research Principles
314
+
315
+ **See**: `research.md` for full methodology.
316
+
317
+ **Key principles**:
318
+ - Comparison-first (fast feature extraction)
319
+ - Evidence-based (multiple source types)
320
+ - Tier validation (MVP/Standard/Advanced rules)
321
+ - Always questionnaire (validation + open questions)
322
+
323
+ ---
324
+
325
+ ## Summary
326
+
327
+ **Workflow adapts to mode**:
328
+ - New Project: Full discovery and research
329
+ - Add Feature: Focused research, duplicate check
330
+ - Generate BRD: Reads existing questionnaire research
331
+ - Process Answers: Integration and validation
332
+ - Change Request: Impact tracking
333
+ - Questionnaire Only: Quick question generation
334
+
335
+ **Consistent principles**:
336
+ - Business focus (WHAT and WHY)
337
+ - Evidence-based validation
338
+ - Lean documentation (80/20)
339
+ - Scope-based organization
340
+ - Customer validation (questionnaire)
@@ -10,6 +10,18 @@ questions.json format:
10
10
  {
11
11
  "project_name": "Project Name",
12
12
  "date": "2024-01-20",
13
+ "research": {
14
+ "depth": "Deep",
15
+ "features_count": 12,
16
+ "tiers": {"MVP": 5, "Standard": 4, "Advanced": 3},
17
+ "sources_count": 23
18
+ },
19
+ "references": {
20
+ "Authentication": [
21
+ {"type": "Comparison", "url": "https://..."},
22
+ {"type": "G2 Reviews", "url": "https://..."}
23
+ ]
24
+ },
13
25
  "questions": [
14
26
  {
15
27
  "category": "Requirements",
@@ -119,14 +131,24 @@ def create_questionnaire(output_path: str, questions_data: dict):
119
131
 
120
132
  # Summary sheet
121
133
  ws_summary = wb.create_sheet("Summary", 0)
134
+ research = questions_data.get('research', {})
135
+ tiers = research.get('tiers', {})
136
+
122
137
  summary_data = [
123
138
  ("Project Questionnaire", ""),
124
139
  ("", ""),
125
140
  ("Project:", questions_data.get('project_name', '')),
126
141
  ("Generated:", questions_data.get('date', '')),
127
- ("Total Questions:", len(questions)),
128
142
  ("", ""),
129
- ("Priority Breakdown:", ""),
143
+ ("Research Summary:", ""),
144
+ ("Depth:", research.get('depth', 'N/A')),
145
+ ("Features:", research.get('features_count', 0)),
146
+ (" MVP:", tiers.get('MVP', 0)),
147
+ (" Standard:", tiers.get('Standard', 0)),
148
+ (" Advanced:", tiers.get('Advanced', 0)),
149
+ ("Sources:", research.get('sources_count', 0)),
150
+ ("", ""),
151
+ ("Questions:", len(questions)),
130
152
  ]
131
153
 
132
154
  # Count priorities
@@ -134,28 +156,8 @@ def create_questionnaire(output_path: str, questions_data: dict):
134
156
  optional_count = len(questions) - required_count
135
157
 
136
158
  summary_data.extend([
137
- ("Required:", required_count),
138
- ("Optional:", optional_count),
139
- ("", ""),
140
- ("Categories:", ""),
141
- ])
142
-
143
- # Count categories
144
- categories = {}
145
- for q in questions:
146
- cat = q.get('category', 'General')
147
- categories[cat] = categories.get(cat, 0) + 1
148
-
149
- for cat, count in sorted(categories.items()):
150
- summary_data.append((f" {cat}:", count))
151
-
152
- summary_data.extend([
153
- ("", ""),
154
- ("Instructions:", ""),
155
- ("1.", "Fill in the 'Answer' column for each question"),
156
- ("2.", "Required questions must be answered before proceeding"),
157
- ("3.", "Context/Source shows where this question originated"),
158
- ("4.", "Save and return this file when complete"),
159
+ (" Required:", required_count),
160
+ (" Optional:", optional_count),
159
161
  ])
160
162
 
161
163
  for row, (col1, col2) in enumerate(summary_data, 1):
@@ -169,6 +171,29 @@ def create_questionnaire(output_path: str, questions_data: dict):
169
171
  ws_summary.column_dimensions['A'].width = 25
170
172
  ws_summary.column_dimensions['B'].width = 40
171
173
 
174
+ # References sheet
175
+ references = questions_data.get('references', {})
176
+ if references:
177
+ ws_refs = wb.create_sheet("References")
178
+ ws_refs.cell(1, 1, "Feature").font = header_font
179
+ ws_refs.cell(1, 2, "Source Type").font = header_font
180
+ ws_refs.cell(1, 3, "URL").font = header_font
181
+ ws_refs.cell(1, 1).fill = header_fill
182
+ ws_refs.cell(1, 2).fill = header_fill
183
+ ws_refs.cell(1, 3).fill = header_fill
184
+
185
+ row = 2
186
+ for feature, sources in references.items():
187
+ for source in sources:
188
+ ws_refs.cell(row, 1, feature)
189
+ ws_refs.cell(row, 2, source.get('type', ''))
190
+ ws_refs.cell(row, 3, source.get('url', ''))
191
+ row += 1
192
+
193
+ ws_refs.column_dimensions['A'].width = 20
194
+ ws_refs.column_dimensions['B'].width = 20
195
+ ws_refs.column_dimensions['C'].width = 60
196
+
172
197
  # Save
173
198
  wb.save(output_path)
174
199
  print(f"Created: {output_path}")
@@ -1,173 +0,0 @@
1
- # File Patterns for Codebase Discovery
2
-
3
- Patterns for lightweight scanning of existing codebases.
4
-
5
- ## Frontend File Patterns
6
-
7
- ### Include
8
-
9
- ```
10
- # Vue.js
11
- **/*.vue
12
-
13
- # React / Next.js
14
- **/*.tsx
15
- **/*.jsx
16
- **/pages/**/*.ts
17
- **/pages/**/*.tsx
18
- **/app/**/page.tsx
19
- **/app/**/layout.tsx
20
-
21
- # Svelte
22
- **/*.svelte
23
-
24
- # Angular
25
- **/*.component.ts
26
-
27
- # General
28
- **/views/**/*
29
- **/screens/**/*
30
- ```
31
-
32
- ### Exclude
33
-
34
- ```
35
- # Dependencies
36
- node_modules/**
37
- vendor/**
38
- bower_components/**
39
-
40
- # Build output
41
- dist/**
42
- build/**
43
- .next/**
44
- .nuxt/**
45
- .output/**
46
- out/**
47
-
48
- # Bundled files
49
- *.min.js
50
- *.bundle.js
51
- *.chunk.js
52
-
53
- # Tests
54
- __tests__/**
55
- **/*.test.*
56
- **/*.spec.*
57
- **/test/**
58
- **/tests/**
59
-
60
- # Config & misc
61
- .git/**
62
- coverage/**
63
- .cache/**
64
- ```
65
-
66
- ## Documentation Patterns
67
-
68
- Look for existing docs:
69
-
70
- ```
71
- # Root docs
72
- README.md
73
- CLAUDE.md
74
- CONTRIBUTING.md
75
-
76
- # Doc folders
77
- docs/**/*.md
78
- documentation/**/*.md
79
- plans/**/*.md
80
- specifications/**/*.md
81
- specs/**/*.md
82
- .github/**/*.md
83
- ```
84
-
85
- ## Feature Inference
86
-
87
- Map file/folder names to features:
88
-
89
- | Pattern | Feature |
90
- |---------|---------|
91
- | `auth/`, `login.*`, `signin.*`, `signup.*` | Authentication |
92
- | `user/`, `users/`, `profile.*`, `account.*` | User Management |
93
- | `dashboard.*`, `dashboard/` | Dashboard |
94
- | `payment/`, `payments/`, `checkout.*`, `billing.*` | Payments |
95
- | `subscription/`, `subscriptions/`, `plans.*` | Subscriptions |
96
- | `settings.*`, `settings/`, `preferences.*` | Settings |
97
- | `admin/`, `admin.*` | Admin Panel |
98
- | `notification/`, `notifications/`, `alerts/` | Notifications |
99
- | `search.*`, `search/` | Search |
100
- | `cart.*`, `cart/`, `basket.*` | Shopping Cart |
101
- | `order/`, `orders/` | Orders |
102
- | `product/`, `products/`, `catalog/` | Products |
103
- | `message/`, `messages/`, `chat/`, `inbox/` | Messaging |
104
- | `report/`, `reports/`, `analytics/` | Reporting |
105
- | `upload/`, `files/`, `media/` | File Management |
106
- | `team/`, `teams/`, `organization/` | Team Management |
107
- | `onboarding/`, `wizard/`, `setup/` | Onboarding |
108
- | `help/`, `support/`, `faq/` | Help/Support |
109
-
110
- ## Tech Stack Detection
111
-
112
- ### Package Managers
113
-
114
- ```
115
- # Check for these files
116
- package.json → Node.js / JavaScript
117
- requirements.txt → Python
118
- Gemfile → Ruby
119
- go.mod → Go
120
- Cargo.toml → Rust
121
- composer.json → PHP
122
- ```
123
-
124
- ### Framework Detection (from package.json)
125
-
126
- | Dependency | Framework |
127
- |------------|-----------|
128
- | `next` | Next.js |
129
- | `nuxt` | Nuxt.js |
130
- | `vue` | Vue.js |
131
- | `react` | React |
132
- | `@angular/core` | Angular |
133
- | `svelte` | Svelte |
134
- | `express` | Express.js |
135
- | `fastify` | Fastify |
136
- | `nestjs` | NestJS |
137
-
138
- ## Folder Structure Hints
139
-
140
- ```
141
- # Next.js App Router
142
- app/
143
- ├── page.tsx → Home page
144
- ├── layout.tsx → Root layout
145
- ├── (auth)/ → Auth group
146
- │ ├── login/
147
- │ └── register/
148
- └── dashboard/ → Dashboard
149
-
150
- # Nuxt.js
151
- pages/
152
- ├── index.vue → Home
153
- ├── login.vue → Login
154
- └── dashboard/
155
- └── index.vue → Dashboard
156
-
157
- # Standard React
158
- src/
159
- ├── pages/ → Routes
160
- ├── components/ → UI components
161
- ├── hooks/ → Custom hooks
162
- ├── services/ → API calls
163
- └── utils/ → Helpers
164
- ```
165
-
166
- ## Scan Strategy
167
-
168
- 1. **Find package.json** → Detect framework
169
- 2. **Glob for frontend files** → List all pages/components
170
- 3. **Group by folder** → pages/, components/, views/
171
- 4. **Match patterns** → Infer features
172
- 5. **Check for docs** → Read README, CLAUDE.md
173
- 6. **Summarize** → Create feature table
@@ -1,72 +0,0 @@
1
- # Use Case Group Codes
2
-
3
- Standard codes for grouping use cases. Use these for consistency across BRDs.
4
-
5
- ## Standard Codes
6
-
7
- | Code | Domain | Examples |
8
- |------|--------|----------|
9
- | **AUTH** | Authentication | Login, logout, password reset, SSO |
10
- | **USER** | User Management | Registration, profile, settings |
11
- | **PAY** | Payments | Checkout, refunds, payment methods |
12
- | **SUB** | Subscriptions | Plans, upgrades, cancellation |
13
- | **BILL** | Billing | Invoices, receipts, statements |
14
- | **NOTIF** | Notifications | Email, push, in-app alerts |
15
- | **ADMIN** | Administration | Dashboard, settings, config |
16
- | **RPT** | Reporting | Analytics, exports, dashboards |
17
- | **INTG** | Integrations | API, webhooks, third-party |
18
- | **SRCH** | Search | Search, filters, browse |
19
- | **INV** | Inventory | Stock, catalog, products |
20
- | **ORD** | Orders | Cart, checkout, order history |
21
- | **SHIP** | Shipping | Delivery, tracking, returns |
22
- | **MSG** | Messaging | Chat, comments, threads |
23
- | **FILE** | Files | Upload, storage, sharing |
24
- | **TEAM** | Teams | Organizations, roles, permissions |
25
- | **ONBD** | Onboarding | Setup, tutorials, first-run |
26
- | **SUPP** | Support | Help, tickets, FAQ |
27
-
28
- ## Choosing Codes
29
-
30
- 1. **Use existing code** if it fits
31
- 2. **Create new code** if domain is distinct
32
- 3. **Keep codes 3-5 characters**
33
- 4. **Make it obvious** - anyone should guess the domain
34
-
35
- ## Custom Codes
36
-
37
- For project-specific domains, define in BRD README:
38
-
39
- ```markdown
40
- ## Custom Group Codes
41
-
42
- | Code | Domain | Description |
43
- |------|--------|-------------|
44
- | PROP | Properties | Real estate listings |
45
- | BOOK | Bookings | Reservation system |
46
- ```
47
-
48
- ## Grouping Strategy
49
-
50
- **Group by user intent**, not by feature:
51
-
52
- Good:
53
- - `UC-PAY-001-checkout.md` - User paying
54
- - `UC-PAY-002-refund-request.md` - User requesting money back
55
-
56
- Avoid:
57
- - `UC-STRIPE-001-...` - Implementation detail, not user intent
58
- - `UC-BUTTON-001-...` - UI element, not user goal
59
-
60
- ## Cross-Group Dependencies
61
-
62
- Note dependencies in use case files:
63
-
64
- ```markdown
65
- > **Related**: [UC-AUTH-001](./UC-AUTH-001-login.md), [UC-PAY-001](./UC-PAY-001-checkout.md)
66
- ```
67
-
68
- Common patterns:
69
- - AUTH → all authenticated features
70
- - USER → TEAM (user creates team)
71
- - PAY → SUB (payment enables subscription)
72
- - ORD → SHIP (order triggers shipping)