specdacular 0.2.0 → 0.2.2

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.
@@ -1,65 +1,82 @@
1
1
  <purpose>
2
- Initialize a new feature folder with structured planning documents through a conversational workflow.
2
+ Initialize a new feature folder and start the first discussion. Creates structure, asks initial questions, and writes technical requirements.
3
3
 
4
- Uses adaptive questioning depth based on feature complexity to gather requirements, then creates:
5
- - FEATURE.md - What this feature does, core value, constraints
6
- - REQUIREMENTS.md - Scoped requirements with REQ-IDs (v1/v2/out-of-scope)
7
- - ROADMAP.md - Phases with success criteria and requirement mapping
8
- - STATE.md - Project memory, current position, decisions
9
- - config.json - Mode, depth, tracking metadata
4
+ **Core flow:**
5
+ ```
6
+ new-feature (discuss research)* plan-feature
7
+ ```
8
+
9
+ The user controls the rhythm after initialization. This command is just the entry point.
10
10
 
11
- Output: `.specd/features/{feature-name}/` folder with all planning documents.
11
+ **Output:** `.specd/features/{feature-name}/` folder with FEATURE.md, CONTEXT.md, DECISIONS.md, STATE.md, config.json
12
12
  </purpose>
13
13
 
14
14
  <philosophy>
15
- **Conversational, not interrogative:**
16
- Build understanding through natural dialogue. Ask follow-up questions that build on previous answers.
17
15
 
18
- **User-driven scoping:**
19
- The user decides what's v1 vs v2 vs out-of-scope. Present options, don't prescribe.
16
+ ## Collaborative, Not Interrogative
17
+
18
+ Follow the thread. Build understanding through natural dialogue. When the user says something interesting, explore it. Don't march through a checklist.
19
+
20
+ **Bad:** "Question 1: What's the feature? Question 2: What's the scope? Question 3: ..."
21
+ **Good:** "Tell me about what you're building... [response] ...Interesting, when you say X, do you mean Y or Z?"
22
+
23
+ ## Technical Focus
24
+
25
+ This is about technical requirements, not product specs. Focus on:
26
+ - What code needs to exist
27
+ - What existing code it integrates with
28
+ - Technical constraints
29
+
30
+ ## Probe Until Initial Understanding
31
+
32
+ Keep asking until you understand:
33
+ 1. What this creates (files, components, APIs)
34
+ 2. What it integrates with (existing code)
35
+ 3. Key constraints (technical, timeline, scope)
20
36
 
21
- **Complexity-adaptive:**
22
- Light features need 2-3 questions. Complicated features need thorough probing until all gray areas are resolved.
37
+ You don't need to resolve everything — that's what `discuss-feature` is for.
38
+
39
+ ## Decisions Get Recorded
40
+
41
+ Any decision made during this initial discussion goes into DECISIONS.md with date and rationale.
23
42
 
24
- **Traceable requirements:**
25
- Every requirement gets an ID. Phases map to requirements. Progress is trackable.
26
43
  </philosophy>
27
44
 
28
45
  <process>
29
46
 
30
- <step name="setup">
47
+ <step name="validate">
31
48
  Get feature name and validate.
32
49
 
33
50
  **If $ARGUMENTS provided:**
34
51
  Use as feature name. Normalize to kebab-case (lowercase, hyphens).
35
52
 
36
53
  **If no arguments:**
37
- Ask: "What's the name of this feature? (e.g., user-dashboard, auth-flow, payment-integration)"
54
+ Ask: "What's the name of this feature?"
38
55
 
39
56
  **Validate:**
40
57
  - Feature name should be kebab-case
41
58
  - Check if `.specd/features/{name}/` already exists
42
59
 
43
- **If feature exists:**
44
- ```
45
- Feature '{name}' already exists at .specd/features/{name}/
46
-
47
- Options:
48
- 1. Resume - Continue working with existing feature
49
- 2. Reset - Delete and start fresh
50
- 3. Different name - Use a different feature name
60
+ ```bash
61
+ # Check if feature exists
62
+ [ -d ".specd/features/$FEATURE_NAME" ] && echo "exists"
51
63
  ```
52
64
 
53
- Wait for user response.
65
+ **If feature exists:**
66
+ Use AskUserQuestion:
67
+ - header: "Feature Exists"
68
+ - question: "Feature '{name}' already exists. What would you like to do?"
69
+ - options:
70
+ - "Resume" — Continue with existing feature (suggest /specd:discuss-feature)
71
+ - "Reset" — Delete and start fresh
72
+ - "Different name" — Use a different name
54
73
 
55
74
  **If new feature:**
56
- Create feature abbreviation for REQ-IDs (e.g., "user-dashboard" → "DASH", "auth-flow" → "AUTH")
57
-
58
75
  Continue to codebase_context.
59
76
  </step>
60
77
 
61
78
  <step name="codebase_context">
62
- Look for codebase documentation to inform feature planning.
79
+ Look for codebase documentation.
63
80
 
64
81
  **Check for existing config:**
65
82
  ```bash
@@ -75,105 +92,85 @@ ls .specd/codebase/*.md 2>/dev/null
75
92
  ```
76
93
 
77
94
  **If codebase docs found:**
78
- Note available context:
79
95
  ```
80
- Found codebase documentation:
81
- - ARCHITECTURE.md - System design and patterns
82
- - CONVENTIONS.md - Code style and patterns
83
- - STRUCTURE.md - Directory layout
84
- [etc.]
85
-
86
- I'll reference these when defining requirements and integration points.
96
+ Found codebase documentation. I'll reference these when defining requirements.
87
97
  ```
88
98
 
89
- Continue to complexity_assessment.
99
+ Read the available docs to understand:
100
+ - Project structure (where new code goes)
101
+ - Code patterns (how things are done here)
102
+ - Architecture (how systems connect)
90
103
 
91
- **If no codebase docs found:**
92
- Ask user:
93
- ```
94
- I didn't find codebase documentation at .specd/codebase/
104
+ Continue to first_discussion.
95
105
 
96
- Do you have codebase specs elsewhere?
97
- 1. Yes, at a custom location
98
- 2. No, proceed without (I can run /specd:map-codebase later)
99
- ```
106
+ **If no codebase docs found:**
107
+ Use AskUserQuestion:
108
+ - header: "No Codebase Docs"
109
+ - question: "I didn't find codebase documentation. How should we proceed?"
110
+ - options:
111
+ - "Run map-codebase first" — Creates AI-optimized docs
112
+ - "Continue without" — Proceed without codebase context
113
+ - "Custom location" — Docs are elsewhere
100
114
 
101
115
  **If custom location:**
102
- Ask for path, then save to `.specd/config.json`:
103
- ```json
104
- {
105
- "codebase_docs": "{user-specified-path}",
106
- "created": "{date}"
107
- }
108
- ```
116
+ Ask for path, then save to `.specd/config.json`.
109
117
 
110
- Continue to complexity_assessment.
118
+ Continue to first_discussion.
111
119
  </step>
112
120
 
113
- <step name="complexity_assessment">
114
- Ask user to assess feature complexity.
121
+ <step name="first_discussion">
122
+ Start the conversation.
115
123
 
124
+ **Opening:**
116
125
  ```
117
- How complex is this feature?
118
-
119
- 1. Light - Simple addition, straightforward scope
120
- (I'll ask 2-3 follow-up questions)
126
+ Let's talk about what you're building.
121
127
 
122
- 2. Moderate - Multi-part feature, some decisions to make
123
- (I'll ask 4-6 follow-up questions)
124
-
125
- 3. Complicated - Major feature, many moving parts
126
- (I'll probe thoroughly until all gray areas are resolved)
128
+ What's the {feature-name} feature? Give me the quick version — what problem does it solve and roughly how?
127
129
  ```
128
130
 
129
- Wait for user response. Store complexity level (1, 2, or 3).
131
+ Wait for response.
132
+
133
+ **Follow the thread:**
134
+ Based on their response, ask follow-up questions that:
135
+ - Clarify what they said ("When you say X, do you mean...?")
136
+ - Explore interesting aspects ("Tell me more about how that would work...")
137
+ - Identify technical implications ("So that would mean creating a...")
138
+
139
+ **Questions to answer (not in order — follow the conversation):**
140
+ 1. What does this create? (new files, components, APIs, data)
141
+ 2. What does it integrate with? (existing code, external services)
142
+ 3. What are the key constraints? (technical, timeline, scope)
143
+ 4. What's explicitly out of scope? (scope boundaries)
144
+
145
+ **Conversational probes:**
146
+ - "Walk me through how someone would use this..."
147
+ - "What existing code does this touch?"
148
+ - "What's the simplest version that would be useful?"
149
+ - "Is there anything you've already decided on how to build this?"
150
+ - "What definitely should NOT be part of this?"
151
+
152
+ **Check understanding:**
153
+ After 4-6 exchanges, summarize:
154
+ ```
155
+ So if I understand correctly:
156
+ - This feature [does X]
157
+ - It needs to create [files/components]
158
+ - It integrates with [existing code]
159
+ - Key constraint: [constraint]
130
160
 
131
- Continue to deep_questioning.
132
- </step>
161
+ Does that capture it, or should we dig into anything more?
162
+ ```
133
163
 
134
- <step name="deep_questioning">
135
- Gather feature understanding through adaptive conversation.
136
-
137
- **Opening question (all complexity levels):**
138
- "Tell me about this feature. What problem does it solve and who benefits from it?"
139
-
140
- **Light complexity (level 1):**
141
- After initial response, ask 2-3 targeted questions:
142
- - "What's the ONE thing that must work for this to be useful?"
143
- - "Are there any constraints I should know about? (tech, timeline, dependencies)"
144
-
145
- **Moderate complexity (level 2):**
146
- After initial response, ask 4-6 questions covering:
147
- - Core value and success criteria
148
- - User interactions and flows
149
- - Integration with existing code
150
- - Edge cases and error handling
151
- - Any constraints or non-negotiables
152
-
153
- **Complicated complexity (level 3):**
154
- Thorough probing until clarity achieved:
155
- - All moderate questions plus:
156
- - Data models and state management
157
- - Performance considerations
158
- - Security implications
159
- - Rollback/migration concerns
160
- - Dependencies and sequencing
161
- - Continue asking until no ambiguity remains
162
-
163
- **Question style:**
164
- - Build on previous answers
165
- - Ask "what about..." to explore edges
166
- - Confirm understanding before moving on
167
- - Use "So if I understand correctly..." to validate
168
-
169
- **When done:**
170
- "I think I have a good understanding. Let me capture this in FEATURE.md."
164
+ **When to move on:**
165
+ - User confirms understanding is correct
166
+ - You have enough for initial FEATURE.md
167
+ - Further details can be discussed later with /specd:discuss-feature
171
168
 
172
169
  Continue to write_feature.
173
170
  </step>
174
171
 
175
172
  <step name="write_feature">
176
- Create FEATURE.md from conversation.
173
+ Create feature directory and FEATURE.md.
177
174
 
178
175
  **Create feature directory:**
179
176
  ```bash
@@ -181,206 +178,147 @@ mkdir -p .specd/features/{feature-name}
181
178
  ```
182
179
 
183
180
  **Write FEATURE.md:**
184
- Use template at `~/.claude/specdacular/templates/features/FEATURE.md` as structure.
181
+ Use template at `~/.claude/specdacular/templates/features/FEATURE.md`
185
182
 
186
183
  Fill in based on conversation:
187
- - Feature name and description
188
- - Core value (the ONE thing)
189
- - Context from codebase docs (if available)
190
- - Constraints mentioned
191
- - Key decisions from discussion
192
-
193
- **Commit:**
194
- ```bash
195
- git add .specd/features/{feature-name}/FEATURE.md
196
- git commit -m "docs(feature): initialize {feature-name}"
197
- ```
198
-
199
- Continue to configuration.
184
+ - **What This Is:** 1-2 sentences from discussion
185
+ - **Must Create:** Files/components identified
186
+ - **Must Integrate With:** Existing code mentioned
187
+ - **Constraints:** Any constraints identified
188
+ - **Success Criteria:** Observable behaviors
189
+ - **Out of Scope:** Explicit exclusions
190
+ - **Initial Context:** Notes from discussion
191
+
192
+ Continue to write_context.
200
193
  </step>
201
194
 
202
- <step name="configuration">
203
- Ask user preferences for workflow mode and depth.
195
+ <step name="write_context">
196
+ Write CONTEXT.md with initial discussion state.
204
197
 
205
- ```
206
- How do you want to work on this feature?
198
+ **Write CONTEXT.md:**
199
+ Use template at `~/.claude/specdacular/templates/features/CONTEXT.md`
207
200
 
208
- **Mode:**
209
- 1. Interactive (recommended) - I'll check in at each phase
210
- 2. YOLO - I'll execute phases autonomously, checking in only when blocked
201
+ Fill in:
202
+ - **Discussion Summary:** Brief summary of what was discussed
203
+ - **Resolved Questions:** Questions that were answered in this session
204
+ - **Deferred Questions:** Things that came up but weren't resolved
205
+ - **Gray Areas Remaining:** Areas that need more discussion
211
206
 
212
- **Depth:**
213
- 1. Quick - Minimal docs, fast execution
214
- 2. Standard (recommended) - Balanced documentation and execution
215
- 3. Comprehensive - Thorough docs, detailed planning
216
- ```
217
-
218
- Wait for user response. Store mode and depth.
219
-
220
- Continue to define_requirements.
207
+ Continue to initialize_decisions.
221
208
  </step>
222
209
 
223
- <step name="define_requirements">
224
- Present requirements and let user scope them.
225
-
226
- **Generate requirements from conversation:**
227
- Derive requirements from the feature discussion. Group by category:
228
- - UI - User interface requirements
229
- - API - Backend/API requirements
230
- - DATA - Data model requirements
231
- - INT - Integration requirements
232
- - SEC - Security requirements
233
- - PERF - Performance requirements
234
-
235
- **REQ-ID format:** `{FEAT}-{CAT}-{NUM}`
236
- Example: `DASH-UI-01`, `DASH-API-02`
237
-
238
- **Present to user:**
239
- ```
240
- Based on our discussion, here are the requirements I identified:
241
-
242
- **UI Requirements:**
243
- - DASH-UI-01: [Requirement description]
244
- - DASH-UI-02: [Requirement description]
245
-
246
- **API Requirements:**
247
- - DASH-API-01: [Requirement description]
210
+ <step name="initialize_decisions">
211
+ Initialize DECISIONS.md with any decisions made.
248
212
 
249
- [etc.]
213
+ **Write DECISIONS.md:**
214
+ Use template at `~/.claude/specdacular/templates/features/DECISIONS.md`
250
215
 
251
- For each requirement, please indicate:
252
- - v1 (must have for initial release)
253
- - v2 (deferred to later)
254
- - out (out of scope entirely)
216
+ If any decisions were made during discussion (technology choices, scope decisions, approach decisions), record them:
255
217
 
256
- You can respond like: "UI-01 v1, UI-02 v2, API-01 out" or we can go through them one by one.
218
+ ```markdown
219
+ ### DEC-001: {Decision}
220
+ **Date:** {today}
221
+ **Status:** Active
222
+ **Context:** Identified during initial feature discussion
223
+ **Decision:** {What was decided}
224
+ **Rationale:**
225
+ - {Why}
226
+ **Implications:**
227
+ - {What this means}
257
228
  ```
258
229
 
259
- **Iterate until scoped:**
260
- Continue discussion until all requirements are categorized.
261
-
262
- **Write REQUIREMENTS.md:**
263
- Use template at `~/.claude/specdacular/templates/features/REQUIREMENTS.md`
264
-
265
- **Commit:**
266
- ```bash
267
- git add .specd/features/{feature-name}/REQUIREMENTS.md
268
- git commit -m "docs(feature): define requirements for {feature-name}"
269
- ```
270
-
271
- Continue to create_roadmap.
272
- </step>
273
-
274
- <step name="create_roadmap">
275
- Derive phases from scoped requirements.
276
-
277
- **Phase creation rules:**
278
- - Each phase should be independently shippable
279
- - Phase 1 contains core v1 requirements (the minimum viable feature)
280
- - Subsequent phases add v1 requirements in logical order
281
- - Final phases contain v2 requirements
282
- - Each phase has clear success criteria
283
-
284
- **Present roadmap:**
285
- ```
286
- Based on the v1 requirements, here's the proposed roadmap:
287
-
288
- **Phase 1: {Name}** - {Description}
289
- Requirements: {REQ-IDs}
290
- Success criteria:
291
- 1. [Observable behavior]
292
- 2. [Observable behavior]
293
-
294
- **Phase 2: {Name}** - {Description}
295
- Requirements: {REQ-IDs}
296
- Success criteria:
297
- 1. [Observable behavior]
298
-
299
- [etc.]
300
-
301
- Does this phasing make sense? Any adjustments needed?
302
- ```
303
-
304
- **Iterate until approved.**
305
-
306
- **Write ROADMAP.md:**
307
- Use template at `~/.claude/specdacular/templates/features/ROADMAP.md`
230
+ If no decisions yet, leave with just the template structure.
308
231
 
309
232
  Continue to initialize_state.
310
233
  </step>
311
234
 
312
235
  <step name="initialize_state">
313
- Create STATE.md and config.json for tracking.
236
+ Create STATE.md and config.json.
314
237
 
315
238
  **Write STATE.md:**
316
239
  Use template at `~/.claude/specdacular/templates/features/STATE.md`
317
240
 
318
241
  Initialize with:
319
- - Current position: Phase 1 (not started)
320
- - Progress summary: empty
321
- - Accumulated decisions: from conversation
322
- - Session history: creation date
242
+ - Stage: discussion
243
+ - Initial discussion complete: yes
244
+ - Gray areas identified: based on deferred questions
323
245
 
324
246
  **Write config.json:**
325
247
  ```json
326
248
  {
327
249
  "feature_name": "{name}",
328
- "feature_abbrev": "{ABBREV}",
329
250
  "created": "{date}",
330
- "mode": "{interactive|yolo}",
331
- "depth": "{quick|standard|comprehensive}",
332
- "phases": {
333
- "total": {N},
334
- "completed": 0,
335
- "current": 1
336
- },
337
- "requirements": {
338
- "v1_count": {N},
339
- "v2_count": {N},
340
- "completed": 0
341
- }
251
+ "stage": "discussion",
252
+ "discussion_sessions": 1,
253
+ "decisions_count": {N}
342
254
  }
343
255
  ```
344
256
 
345
- **Commit:**
257
+ Continue to commit.
258
+ </step>
259
+
260
+ <step name="commit">
261
+ Commit the feature initialization.
262
+
346
263
  ```bash
347
- git add .specd/features/{feature-name}/ROADMAP.md .specd/features/{feature-name}/STATE.md .specd/features/{feature-name}/config.json
348
- git commit -m "docs(feature): create roadmap for {feature-name}"
264
+ git add .specd/features/{feature-name}/
265
+ git commit -m "docs({feature-name}): initialize feature
266
+
267
+ Creates feature structure with:
268
+ - FEATURE.md: Technical requirements
269
+ - CONTEXT.md: Discussion context
270
+ - DECISIONS.md: Decision log ({N} decisions)
271
+ - STATE.md: Progress tracking
272
+ - config.json: Configuration"
349
273
  ```
350
274
 
351
275
  Continue to completion.
352
276
  </step>
353
277
 
354
278
  <step name="completion">
355
- Summarize what was created and suggest next steps.
279
+ Present what was created and next options.
356
280
 
357
281
  **Output:**
358
282
  ```
359
- Feature '{feature-name}' initialized.
283
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
284
+ FEATURE INITIALIZED
285
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
286
+
287
+ **Feature:** {feature-name}
288
+
289
+ ## Created
360
290
 
361
- Created .specd/features/{feature-name}/:
362
- - FEATURE.md - Feature definition and context
363
- - REQUIREMENTS.md - {v1_count} v1 requirements, {v2_count} v2 requirements
364
- - ROADMAP.md - {phase_count} phases planned
365
- - STATE.md - Progress tracking initialized
366
- - config.json - Configuration saved
291
+ - `.specd/features/{feature-name}/FEATURE.md` — Technical requirements
292
+ - `.specd/features/{feature-name}/CONTEXT.md` Discussion context
293
+ - `.specd/features/{feature-name}/DECISIONS.md` {N} decisions recorded
294
+ - `.specd/features/{feature-name}/STATE.md` Progress tracking
295
+ - `.specd/features/{feature-name}/config.json` Configuration
367
296
 
368
- Mode: {interactive|yolo}
369
- Depth: {quick|standard|comprehensive}
297
+ ## Summary
370
298
 
371
- ---
299
+ {2-3 sentence summary of what this feature does}
300
+
301
+ {If gray areas remain:}
302
+ **Open areas to discuss:**
303
+ - {Gray area 1}
304
+ - {Gray area 2}
305
+
306
+ ───────────────────────────────────────────────────────
372
307
 
373
308
  ## What's Next
374
309
 
375
- Ready to start Phase 1: {phase_1_name}
310
+ You control the rhythm. Options:
311
+
312
+ **/specd:discuss-feature {feature-name}** — Dive deeper into specific areas
313
+ {Suggested if gray areas remain}
314
+
315
+ **/specd:research-feature {feature-name}** — Research implementation approach
316
+ {Suggested if technology choices are unclear}
376
317
 
377
- When you're ready, ask me to plan or execute Phase 1:
378
- - "Plan phase 1" - I'll create a detailed implementation plan
379
- - "Execute phase 1" - I'll implement the phase (in {mode} mode)
318
+ **/specd:plan-feature {feature-name}** Create executable task plans
319
+ {Only when discussion + research are sufficient}
380
320
 
381
- Or review the artifacts:
382
- - `cat .specd/features/{feature-name}/REQUIREMENTS.md`
383
- - `cat .specd/features/{feature-name}/ROADMAP.md`
321
+ Or just **keep talking** — this conversation continues naturally.
384
322
  ```
385
323
 
386
324
  End workflow.
@@ -390,10 +328,11 @@ End workflow.
390
328
 
391
329
  <success_criteria>
392
330
  - Feature folder created at `.specd/features/{name}/`
393
- - All 5 files created with appropriate content
394
- - Requirements have unique REQ-IDs
395
- - Phases map to requirements via REQ-IDs
396
- - Commits made at: FEATURE.md, REQUIREMENTS.md, ROADMAP.md+STATE.md
397
- - User approved requirements scoping
398
- - User approved roadmap phasing
331
+ - FEATURE.md has specific technical requirements (files to create, integrations)
332
+ - CONTEXT.md captures the discussion state
333
+ - DECISIONS.md initialized (with any decisions made)
334
+ - STATE.md tracks current stage
335
+ - config.json created
336
+ - Committed to git
337
+ - User presented with clear next options
399
338
  </success_criteria>