specweave 0.1.5 → 0.1.7

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/SPECWEAVE.md CHANGED
@@ -13,46 +13,58 @@ This file contains quick reference for developing with SpecWeave:
13
13
 
14
14
  ---
15
15
 
16
- ## SpecWeave Auto-Routing (CRITICAL)
16
+ ## Using SpecWeave with Slash Commands (CRITICAL)
17
17
 
18
- **MANDATORY BEHAVIOR**: This project has SpecWeave installed (`.specweave/` directory exists).
18
+ **IMPORTANT**: SpecWeave uses **EXPLICIT SLASH COMMANDS** - no auto-activation, no proactive detection!
19
19
 
20
- ### Auto-Detection & Routing Rules
20
+ ### How SpecWeave Works
21
21
 
22
- 1. **ALWAYS check for SpecWeave FIRST** before responding to ANY user request
23
- 2. **ROUTE ALL development-related questions** through `specweave-detector` skill
24
- 3. **EVEN GENERIC questions** may need SpecWeave context (e.g., "Analyze BTC/USD" → suggest creating trading analysis feature)
22
+ SpecWeave follows the **spec-kit approach**: You MUST use slash commands explicitly.
25
23
 
26
- ### Detection Logic
24
+ **To use SpecWeave**: Type a slash command (e.g., `/pi "Feature description"`)
27
25
 
28
- ```javascript
29
- if (directoryExists('.specweave/config.yaml')) {
30
- // SpecWeave is installed
31
- // Route through specweave-detector for ALL development requests
32
- activateSpecWeaveMode();
33
- }
34
- ```
26
+ ### Quick Command Reference
27
+
28
+ | Alias | Full Command | Purpose | Example |
29
+ |-------|--------------|---------|---------|
30
+ | `/init` | `/create-project` | Initialize SpecWeave project | `/init my-saas` |
31
+ | `/pi` | `/create-increment` | **Plan Product Increment** | `/pi "User auth"` |
32
+ | `/si` | `/start-increment` | Start working on increment | `/si 0001` |
33
+ | `/at` | `/add-tasks` | Add tasks to increment | `/at 0001 "Add tests"` |
34
+ | `/vi` | `/validate-increment` | Validate increment quality | `/vi 0001 --quality` |
35
+ | `/done` | `/close-increment` | Close increment | `/done 0001` |
36
+ | `/ls` | `/list-increments` | List all increments | `/ls` |
37
+
38
+ **Why Slash Commands?**
39
+ - ✅ **100% reliable** - Always works, no guessing
40
+ - ✅ **Clear intent** - You know exactly when SpecWeave is active
41
+ - ✅ **Fast** - Short aliases like `/pi` save keystrokes
42
+ - ✅ **Memorable** - Domain-specific names (PI = Product Increment from Agile/SAFe)
43
+
44
+ ### Typical Workflow
45
+
46
+ ```bash
47
+ # 1. Initialize project
48
+ npx specweave init my-saas
49
+
50
+ # 2. Plan your first increment (use slash command!)
51
+ /pi "User authentication with JWT and RBAC"
35
52
 
36
- ### Routing Examples
53
+ # 3. Validate
54
+ /vi 0001 --quality
37
55
 
38
- | User Request | Detection | Action |
39
- |-------------|-----------|--------|
40
- | "Create authentication" | Development request | ✅ Route to `specweave-detector` → `increment-planner` |
41
- | "Analyze BTC/USD prices" | Could be feature request | ✅ Route to `specweave-detector` → Suggest: "Create BTC analysis feature?" |
42
- | "Add payment processing" | Development request | ✅ Route to `specweave-detector` → `increment-planner` |
43
- | "Fix bug in login" | Development request | ✅ Route to `specweave-detector` → Load context → Implement |
44
- | "What's for lunch?" | Non-development | ❌ Respond normally (out of domain) |
56
+ # 4. Start working
57
+ /si 0001
45
58
 
46
- ### Activation Behavior
59
+ # 5. Implement (regular conversation, no slash commands needed here)
60
+ User: "Let's implement the backend API"
61
+ Claude: [implements based on plan.md and tasks.md]
47
62
 
48
- **When SpecWeave is detected**:
49
- - ✅ Show indicator: `🔷 SpecWeave Active`
50
- - ✅ Route development requests automatically
51
- - ✅ Load context via `context-loader` when needed
52
- - ✅ Use appropriate agents (PM, Architect, DevOps, etc.)
53
- - ✅ Adapt to detected tech stack (TypeScript, Python, Go, etc.)
63
+ # 6. Close when done
64
+ /done 0001
65
+ ```
54
66
 
55
- **Rule**: When in doubt, route through SpecWeave. Let `specweave-detector` decide if it's a valid development request.
67
+ **Remember**: Type `/pi` first, THEN implement! Otherwise you lose all SpecWeave benefits (specs, architecture, test strategy).
56
68
 
57
69
  ---
58
70
 
@@ -177,23 +189,29 @@ npx specweave list --installed # See what's installed
177
189
 
178
190
  ---
179
191
 
180
- ## Quick Reference: Slash Commands
181
-
182
- | Command | Purpose | Example |
183
- |---------|---------|---------|
184
- | `/create-project` | Bootstrap new SpecWeave project | `/create-project --type python` |
185
- | `/create-increment` | Create new feature/increment | `/create-increment "user auth"` |
186
- | `/start-increment` | Start working on an increment | `/start-increment 0001` |
187
- | `/add-tasks` | Add tasks to existing increment | `/add-tasks 0001 "implement login"` |
188
- | `/validate-increment` | Validate with rule-based + optional AI quality | `/validate-increment 0001 --quality` |
189
- | `/close-increment` | Close increment with leftover transfer | `/close-increment 0001` |
190
- | `/list-increments` | List all increments with status | `/list-increments` |
191
- | `/review-docs` | Review strategic docs vs code | `/review-docs --increment=0003` |
192
- | `/generate-docs` | Generate documentation site | `/generate-docs` |
193
- | `/sync-github` | Sync increment to GitHub issues | `/sync-github` |
192
+ ## Quick Reference: Slash Commands (MUST USE!)
193
+
194
+ **CRITICAL**: SpecWeave uses **EXPLICIT SLASH COMMANDS** - type them to activate the framework!
195
+
196
+ | Command | Alias | Purpose | Example |
197
+ |---------|-------|---------|---------|
198
+ | `/create-project` | `/init` | Bootstrap new SpecWeave project | `/init my-saas --type python` |
199
+ | `/create-increment` | `/pi` | **Plan Product Increment** (create new feature) | `/pi "user authentication"` |
200
+ | `/start-increment` | `/si` | Start working on an increment | `/si 0001` |
201
+ | `/add-tasks` | `/at` | Add tasks to existing increment | `/at 0001 "implement login"` |
202
+ | `/validate-increment` | `/vi` | Validate with rule-based + optional AI quality | `/vi 0001 --quality` |
203
+ | `/close-increment` | `/done` | Close increment with leftover transfer | `/done 0001` |
204
+ | `/list-increments` | `/ls` | List all increments with status | `/ls --status=in-progress` |
205
+ | `/review-docs` | - | Review strategic docs vs code | `/review-docs --increment=0003` |
206
+ | `/generate-docs` | - | Generate documentation site | `/generate-docs` |
207
+ | `/sync-github` | - | Sync increment to GitHub issues | `/sync-github` |
194
208
 
195
209
  **All commands are framework-agnostic** (adapt to detected tech stack)
196
210
 
211
+ **💡 Pro Tip**: Use short aliases (`/pi`, `/vi`, `/si`, `/done`, `/ls`, `/at`, `/init`) for speed during active development!
212
+ - **PI** = Product Increment (standard Agile terminology)
213
+ - **Why explicit?** Auto-activation doesn't work reliably - slash commands ensure SpecWeave ALWAYS activates
214
+
197
215
  **See**: [Command Reference](.claude/commands/) for all available commands
198
216
 
199
217
  ---
@@ -227,8 +245,8 @@ npx specweave list --installed # See what's installed
227
245
 
228
246
  | Skill | Purpose | Activates When |
229
247
  |-------|---------|----------------|
230
- | `specweave-detector` | Auto-detect SpecWeave projects | Any request in SpecWeave project |
231
- | `increment-planner` | Plan features with context | Creating/planning features |
248
+ | `specweave-detector` | Slash command documentation | User asks about SpecWeave commands |
249
+ | `increment-planner` | Plan features with context | `/pi` or `/create-increment` command |
232
250
  | `skill-router` | Route to appropriate skills | Ambiguous requests |
233
251
  | `context-loader` | Load context selectively | Working on increments |
234
252
  | `diagrams-generator` | Coordinate diagram creation | "create diagram", "draw diagram", C4, sequence, ER |
@@ -284,11 +302,17 @@ backlog → planned → in-progress → completed → closed
284
302
 
285
303
  **Naming Convention**: 4-digit format (0001-9999), e.g., `0001-feature-name`, `0042-user-auth`, `0123-payment-flow`
286
304
 
287
- **Commands**:
305
+ **Commands** (MUST USE SLASH COMMANDS!):
288
306
  ```bash
289
- /create-increment "feature name" # Create new increment (auto-numbered, e.g., 0003-feature-name)
290
- /add-tasks 0001 "task description" # Add tasks to existing
291
- /close-increment 0001 # Close with leftover transfer
307
+ # Use short aliases (recommended)
308
+ /pi "feature name" # Create new increment (auto-numbered, e.g., 0003-feature-name)
309
+ /at 0001 "task description" # Add tasks to existing
310
+ /done 0001 # Close with leftover transfer
311
+
312
+ # Or full commands
313
+ /create-increment "feature name" # Same as /pi
314
+ /add-tasks 0001 "task description" # Same as /at
315
+ /close-increment 0001 # Same as /done
292
316
  ```
293
317
 
294
318
  **See**: [Increment Lifecycle Guide](.specweave/docs/internal/delivery/guides/increment-lifecycle.md) for complete lifecycle management
@@ -659,8 +683,27 @@ Attempt 2/3: Refining with feedback...
659
683
 
660
684
  ---
661
685
 
662
- **Quick Start**: Run `/create-project` to initialize a new SpecWeave project
686
+ **Quick Start**:
687
+
688
+ **CRITICAL**: SpecWeave uses **EXPLICIT SLASH COMMANDS** - type `/pi` to activate!
689
+
690
+ ```bash
691
+ # Initialize project
692
+ npx specweave init my-project
693
+
694
+ # Create your first feature (use slash command!)
695
+ /pi "feature description"
696
+
697
+ # Typical workflow
698
+ 1. /pi "feature" → SpecWeave creates specs
699
+ 2. Regular conversation → Claude implements code
700
+ 3. /done 0001 → Close increment
701
+ ```
702
+
703
+ **Remember**: Type `/pi` first, THEN implement! Otherwise you lose all SpecWeave benefits (specs, architecture, test strategy).
704
+
705
+ **Need help?**: Type `/pi` to see examples, or ask about specific workflows.
663
706
 
664
- **Need help?**: Ask Claude to load the relevant guide from `.specweave/docs/internal/delivery/guides/`
707
+ **SpecWeave Documentation**: https://spec-weave.com
665
708
 
666
709
  **Last Updated**: Auto-updated via `post-task-completion` hook
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specweave",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "Spec-Driven Development framework with AI-powered autonomous agents for building SaaS applications",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -0,0 +1,173 @@
1
+ # SpecWeave Slash Commands
2
+
3
+ This directory contains all slash commands for SpecWeave, including both full commands and short aliases.
4
+
5
+ ## Command Aliases
6
+
7
+ SpecWeave provides short aliases for frequently used commands to speed up your workflow:
8
+
9
+ | Full Command | Alias | Description |
10
+ |--------------|-------|-------------|
11
+ | `/create-project` | `/init` | Initialize new SpecWeave project |
12
+ | `/create-increment` | `/pi` | Plan Product Increment (create new increment) |
13
+ | `/start-increment` | `/si` | Start working on increment |
14
+ | `/add-tasks` | `/at` | Add tasks to increment |
15
+ | `/validate-increment` | `/vi` | Validate increment quality |
16
+ | `/close-increment` | `/done` | Close completed increment |
17
+ | `/list-increments` | `/ls` | List all increments |
18
+
19
+ ## Usage
20
+
21
+ ### Full Commands (Explicit)
22
+
23
+ Use full commands when:
24
+ - ✅ Writing scripts or automation
25
+ - ✅ Documentation and tutorials
26
+ - ✅ Sharing commands with team members
27
+ - ✅ Clarity is more important than speed
28
+
29
+ **Example**:
30
+ ```bash
31
+ /create-increment "User authentication with OAuth"
32
+ /validate-increment 0001 --quality
33
+ /close-increment 0001
34
+ ```
35
+
36
+ ### Aliases (Quick)
37
+
38
+ Use aliases when:
39
+ - ✅ Active development (speed matters)
40
+ - ✅ Iterative workflow (creating/validating frequently)
41
+ - ✅ Command-line muscle memory
42
+ - ✅ Personal productivity
43
+
44
+ **Example**:
45
+ ```bash
46
+ /ci "User authentication with OAuth"
47
+ /vi 0001 --quality
48
+ /done 0001
49
+ ```
50
+
51
+ ## Typical Workflow
52
+
53
+ **Using aliases for speed**:
54
+ ```bash
55
+ # 1. Initialize project
56
+ /init my-saas
57
+
58
+ # 2. Plan Product Increment (PI = Product Increment in Agile)
59
+ /pi "User authentication"
60
+
61
+ # 3. Start working
62
+ /si 0001
63
+
64
+ # 4. Add tasks as needed
65
+ /at 0001 "Implement login endpoint"
66
+ /at 0001 "Add password validation"
67
+
68
+ # 5. Check progress
69
+ /ls --status=in-progress
70
+
71
+ # 6. Validate before closing
72
+ /vi 0001 --quality
73
+
74
+ # 7. Close when done
75
+ /done 0001
76
+ ```
77
+
78
+ **Using full commands for clarity**:
79
+ ```bash
80
+ # Same workflow with explicit commands
81
+ /create-project my-saas
82
+ /create-increment "User authentication"
83
+ /start-increment 0001
84
+ /add-tasks 0001 "Implement login endpoint"
85
+ /list-increments --status=in-progress
86
+ /validate-increment 0001 --quality
87
+ /close-increment 0001
88
+ ```
89
+
90
+ ## All Available Commands
91
+
92
+ ### Core Workflow Commands
93
+
94
+ | Command | Alias | Description |
95
+ |---------|-------|-------------|
96
+ | `/create-project` | `/init` | Bootstrap new SpecWeave project with auto-detection |
97
+ | `/create-increment` | `/pi` | Plan Product Increment with PM/Architect/QA planning |
98
+ | `/start-increment` | `/si` | Start working on an increment (load context, create branch) |
99
+ | `/add-tasks` | `/at` | Add tasks to existing increment |
100
+ | `/validate-increment` | `/vi` | Validate increment (120 rules + optional LLM quality judge) |
101
+ | `/close-increment` | `/done` | Close increment with leftover task handling |
102
+ | `/list-increments` | `/ls` | List all increments with status and progress |
103
+
104
+ ### Documentation & Review Commands
105
+
106
+ | Command | Alias | Description |
107
+ |---------|-------|-------------|
108
+ | `/review-docs` | - | Review strategic docs vs implementation |
109
+ | `/generate-docs` | - | Generate documentation site (Docusaurus/MkDocs) |
110
+
111
+ ### Integration Commands
112
+
113
+ | Command | Alias | Description |
114
+ |---------|-------|-------------|
115
+ | `/sync-github` | - | Sync increment to GitHub issues with subtasks |
116
+
117
+ ## Alias Design Philosophy
118
+
119
+ **Why separate files instead of symlinks?**
120
+
121
+ 1. **Cross-platform compatibility** - Works on Windows, macOS, Linux, cloud IDEs
122
+ 2. **Clear documentation** - Each alias explains what it references
123
+ 3. **Consistent user experience** - Both commands work identically
124
+ 4. **Easy maintenance** - Update main command, aliases stay in sync via reference
125
+
126
+ **Trade-off**: Slight content duplication, but improved UX and compatibility.
127
+
128
+ ## Creating Custom Aliases
129
+
130
+ You can create your own project-specific aliases:
131
+
132
+ **1. Create `.claude/commands/custom-alias.md`**:
133
+ ```markdown
134
+ ---
135
+ description: Your custom command description
136
+ ---
137
+
138
+ # Custom Alias
139
+
140
+ This is a shorthand for `/some-long-command`.
141
+
142
+ <!-- Paste full command content or reference it -->
143
+ ```
144
+
145
+ **2. Use it**:
146
+ ```bash
147
+ /custom-alias
148
+ ```
149
+
150
+ ## Installation
151
+
152
+ Aliases are automatically installed when you:
153
+ - Run `specweave init` (new projects)
154
+ - Install SpecWeave as dependency (`npm install specweave --save-dev`)
155
+
156
+ For manual installation:
157
+ ```bash
158
+ npm run install:commands
159
+ ```
160
+
161
+ ## Documentation
162
+
163
+ - **Command Reference**: See `.claude/commands/` for all available commands
164
+ - **CLAUDE.md**: Quick reference table with all commands and aliases
165
+ - **Official Docs**: https://spec-weave.com/docs/commands
166
+
167
+ ---
168
+
169
+ **💡 Pro Tip**: Learn the aliases - they'll save you hundreds of keystrokes per day!
170
+
171
+ **Most used**: `/pi`, `/si`, `/vi`, `/done`, `/ls`
172
+
173
+ **PI** = Product Increment (standard Agile/Scrum terminology)
@@ -0,0 +1,114 @@
1
+ ---
2
+ description: 🔥 Shorthand for /add-tasks - Add tasks to increment (Alias)
3
+ ---
4
+
5
+ # Add Tasks (Short Alias)
6
+
7
+ **⚡ Quick Alias**: This is a shorthand command for `/add-tasks`.
8
+
9
+ Use this when you want to quickly add tasks to an increment without typing the full command name.
10
+
11
+ ---
12
+
13
+ ## Full Command
14
+
15
+ For complete documentation, see `/add-tasks`.
16
+
17
+ This alias provides the exact same functionality as the full command.
18
+
19
+ ---
20
+
21
+ ## Usage
22
+
23
+ ```bash
24
+ /at <increment-id> <task-description>
25
+ ```
26
+
27
+ **Examples**:
28
+ ```bash
29
+ /at 0001 "Implement login endpoint"
30
+ /at 0001 "Add password validation"
31
+ /at 0001 "Write E2E tests for auth flow"
32
+ ```
33
+
34
+ ---
35
+
36
+ ## What This Does
37
+
38
+ 1. **Analyzes task** against spec/plan
39
+ 2. **Determines priority** (P1, P2, P3)
40
+ 3. **Estimates effort** (based on complexity)
41
+ 4. **Identifies dependencies** (from existing tasks)
42
+ 5. **Adds to tasks.md** with proper formatting
43
+ 6. **Updates progress** percentage
44
+
45
+ ---
46
+
47
+ ## Task Format
48
+
49
+ Tasks are added with:
50
+ - ✅ **Task ID** (auto-numbered: T001, T002, ...)
51
+ - ✅ **Description** (clear, actionable)
52
+ - ✅ **Priority** (P1/P2/P3)
53
+ - ✅ **Estimated time** (based on analysis)
54
+ - ✅ **Dependencies** (if any)
55
+ - ✅ **Status** (Pending by default)
56
+
57
+ **Example Output**:
58
+ ```markdown
59
+ ### T012: Implement login endpoint
60
+ **Priority**: P1
61
+ **Estimated**: 2 hours
62
+ **Depends on**: T008
63
+ **Status**: [ ] Pending
64
+
65
+ **Implementation**:
66
+ - Create POST /api/auth/login endpoint
67
+ - Validate email and password
68
+ - Return JWT token on success
69
+ - Handle rate limiting
70
+ ```
71
+
72
+ ---
73
+
74
+ ## Bulk Add
75
+
76
+ You can add multiple tasks by calling the command multiple times or providing a list:
77
+
78
+ ```bash
79
+ /at 0001 "Task 1"
80
+ /at 0001 "Task 2"
81
+ /at 0001 "Task 3"
82
+ ```
83
+
84
+ ---
85
+
86
+ ## When to Add Tasks
87
+
88
+ **During planning**:
89
+ - Breaking down large features
90
+ - After spec/plan review
91
+
92
+ **During implementation**:
93
+ - Discovered new requirements
94
+ - Technical debt identified
95
+ - Bug fixes needed
96
+
97
+ **After review**:
98
+ - Feedback from code review
99
+ - QA findings
100
+ - Security audit results
101
+
102
+ ---
103
+
104
+ ## Other Useful Aliases
105
+
106
+ - `/ci` - Create increment (shorthand for `/create-increment`)
107
+ - `/si` - Start increment (shorthand for `/start-increment`)
108
+ - `/vi` - Validate increment (shorthand for `/validate-increment`)
109
+ - `/done` - Close increment (shorthand for `/close-increment`)
110
+ - `/ls` - List increments (shorthand for `/list-increments`)
111
+
112
+ ---
113
+
114
+ **💡 Tip**: Add tasks as you discover them - don't wait until sprint planning!
@@ -0,0 +1,103 @@
1
+ ---
2
+ description: 🔥 Shorthand for /close-increment - Close completed increment (Alias)
3
+ ---
4
+
5
+ # Close Increment (Short Alias)
6
+
7
+ **⚡ Quick Alias**: This is a shorthand command for `/close-increment`.
8
+
9
+ Use this when you want to quickly close an increment without typing the full command name.
10
+
11
+ ---
12
+
13
+ ## Full Command
14
+
15
+ For complete documentation, see `/close-increment`.
16
+
17
+ This alias provides the exact same functionality as the full command.
18
+
19
+ ---
20
+
21
+ ## Usage
22
+
23
+ ```bash
24
+ /done <increment-id>
25
+ ```
26
+
27
+ **Examples**:
28
+ ```bash
29
+ /done 0001
30
+ /done 0042
31
+ ```
32
+
33
+ ---
34
+
35
+ ## What This Does
36
+
37
+ 1. **Validates completion**:
38
+ - ✅ All P1 tasks completed
39
+ - ✅ Tests passing
40
+ - ✅ Documentation updated
41
+ - ⚠️ Warns if incomplete
42
+
43
+ 2. **Handles leftover tasks**:
44
+ - Prompts to transfer incomplete tasks to new increment
45
+ - OR mark as deferred/cancelled
46
+ - Ensures no work is lost
47
+
48
+ 3. **Updates status** to `closed` in `tasks.md`
49
+
50
+ 4. **Archives increment** (if configured)
51
+
52
+ 5. **Suggests next steps**:
53
+ - Merge PR (if using git workflow)
54
+ - Deploy (if using CI/CD)
55
+ - Create release notes
56
+
57
+ ---
58
+
59
+ ## Before Closing Checklist
60
+
61
+ **Required**:
62
+ - [ ] All P1 tasks completed
63
+ - [ ] Tests passing
64
+ - [ ] Code reviewed
65
+ - [ ] Documentation updated
66
+
67
+ **Optional** (based on project):
68
+ - [ ] Performance validated
69
+ - [ ] Security reviewed
70
+ - [ ] Accessibility tested
71
+ - [ ] E2E tests passing
72
+
73
+ ---
74
+
75
+ ## Leftover Task Handling
76
+
77
+ If you have incomplete tasks, you'll be prompted:
78
+
79
+ ```
80
+ ⚠️ Incomplete Tasks Found: 3
81
+
82
+ Options:
83
+ 1. Transfer to new increment (recommended)
84
+ 2. Mark as deferred (with reason)
85
+ 3. Cancel tasks (not recommended)
86
+
87
+ What would you like to do?
88
+ ```
89
+
90
+ **Best Practice**: Transfer to new increment to maintain continuity.
91
+
92
+ ---
93
+
94
+ ## Other Useful Aliases
95
+
96
+ - `/ci` - Create increment (shorthand for `/create-increment`)
97
+ - `/si` - Start increment (shorthand for `/start-increment`)
98
+ - `/vi` - Validate increment (shorthand for `/validate-increment`)
99
+ - `/ls` - List increments (shorthand for `/list-increments`)
100
+
101
+ ---
102
+
103
+ **💡 Tip**: Always run `/vi --quality` before `/done` to ensure quality.