specweave 0.1.6 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  > **Spec-Driven Development Framework** - Where specifications and documentation are the source of truth
4
4
 
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
- [![Version](https://img.shields.io/badge/version-0.1.6-blue.svg)](https://github.com/anton-abyzov/specweave/releases/tag/v0.1.6)
6
+ [![Version](https://img.shields.io/badge/version-0.1.8-blue.svg)](https://github.com/anton-abyzov/specweave/releases/tag/v0.1.8)
7
7
  [![Status](https://img.shields.io/badge/status-beta-blue.svg)]()
8
8
  [![Website](https://img.shields.io/badge/website-spec--weave.com-green.svg)](https://spec-weave.com)
9
9
 
@@ -101,6 +101,8 @@ specweave --help # Show help
101
101
 
102
102
  ## 🚀 Quick Example
103
103
 
104
+ **CRITICAL**: SpecWeave uses **EXPLICIT SLASH COMMANDS** - type them to activate the framework!
105
+
104
106
  ```bash
105
107
  # Initialize project - ALL components pre-installed!
106
108
  npx specweave init my-app
@@ -111,48 +113,55 @@ cd my-app
111
113
  # ✅ 35+ skills in .claude/skills/
112
114
  # ✅ 10 slash commands in .claude/commands/
113
115
 
114
- # Open Claude Code and start building:
116
+ # Open Claude Code and use slash commands:
115
117
 
116
- User: "Create Next.js authentication with email and OAuth"
118
+ User: /inc "Next.js authentication with email and OAuth"
117
119
 
118
- SpecWeave: 🔷 SpecWeave Active
120
+ SpecWeave: 🔷 SpecWeave Active (/increment)
119
121
 
120
122
  🚀 Creating increment 0001-user-authentication...
121
123
  📝 Using nextjs skill (already installed!)
122
124
  🤖 PM agent creating requirements...
123
125
  🏗️ Architect agent designing system...
126
+ 📋 Auto-generating tasks from plan...
124
127
 
125
128
  ✅ Increment created: .specweave/increments/0001-user-authentication/
126
- ✅ Files: spec.md, plan.md, tasks.md, tests.md
129
+ ✅ Files: spec.md, plan.md, tasks.md (auto-generated!), tests.md
127
130
 
128
- User: "Create C4 context diagram for authentication"
131
+ User: "Create C4 context diagram for authentication" # Regular conversation for implementation
129
132
 
130
133
  SpecWeave: 🎨 Using diagrams-generator skill
131
134
  🤖 Coordinating with diagrams-architect agent
132
135
 
133
136
  ✅ Diagram saved: .specweave/docs/internal/architecture/diagrams/auth.c4-context.mmd
134
137
 
135
- User: "Implement authentication"
138
+ User: "Implement authentication based on plan.md" # Regular conversation
136
139
 
137
- SpecWeave: 🤖 Orchestrating: PM Architect → Backend → QA → Docs
140
+ SpecWeave: 🤖 Implementing based on specifications
138
141
 
139
142
  ✅ Code: src/auth/
140
143
  ✅ Tests: tests/auth/
141
144
  ✅ Docs: Updated automatically
145
+
146
+ User: /done 0001 # Close increment with slash command
147
+ ✅ Increment 0001 closed successfully
142
148
  ```
143
149
 
144
- **How it works**:
150
+ **How it works** (append-only increment workflow: 0001 → 0002 → 0003):
145
151
  1. `specweave init` → ALL components pre-installed (10 agents + 35+ skills)
146
- 2. `.specweave/` detected`specweave-detector` activates automatically
147
- 3. User request parsedrouted to appropriate pre-installed skills
148
- 4. Skills coordinate agentsartifacts generated
149
- 5. All components ready - no waiting, no installation
152
+ 2. **Use `/inc "feature"`** PM creates specs + plan + auto-generates tasks
153
+ 3. **Use `/build 0001`**Execute implementation (hooks after EVERY task)
154
+ 4. **Use `/validate 0001`**Optional quality check (LLM-as-judge)
155
+ 5. **Use `/done 0001`** PM validates 3 gates (tasks ✅ + tests ✅ + docs ✅)
156
+ 6. All components ready - no waiting, no installation
157
+
158
+ **Why slash commands?** Auto-activation doesn't work reliably - slash commands ensure SpecWeave ALWAYS activates when you want it.
150
159
 
151
160
  ---
152
161
 
153
162
  ## 🤖 Agents (10 Total - All Pre-Installed!)
154
163
 
155
- SpecWeave includes **10 specialized AI agents** that activate automatically based on your request:
164
+ SpecWeave includes **10 specialized AI agents** that work with slash commands and during implementation:
156
165
 
157
166
  | Agent | Role | When It Activates |
158
167
  |-------|------|-------------------|
@@ -173,11 +182,11 @@ SpecWeave includes **10 specialized AI agents** that activate automatically base
173
182
 
174
183
  ## 🎯 Skills (35+ Total - All Pre-Installed!)
175
184
 
176
- SpecWeave includes **35+ AI skills** that activate automatically based on your request:
185
+ SpecWeave includes **35+ AI skills** that work with slash commands:
177
186
 
178
187
  ### Core Framework Skills
179
- - **specweave-detector** - Auto-detect SpecWeave projects
180
- - **increment-planner** - Plan features and create specifications
188
+ - **specweave-detector** - Slash command documentation
189
+ - **increment-planner** - Plan features via `/inc` or `/increment` command
181
190
  - **skill-router** - Route requests to appropriate skills
182
191
  - **context-loader** - Load relevant specifications
183
192
  - **role-orchestrator** - Coordinate multiple agents
@@ -281,22 +290,35 @@ specweave/
281
290
 
282
291
  ### For Greenfield Projects
283
292
 
293
+ **IMPORTANT**: Use slash commands to activate SpecWeave!
294
+
284
295
  ```bash
285
296
  # 1. Create specifications (optional: comprehensive upfront or incremental)
286
297
  # Option A: Comprehensive (Enterprise) - 500-600+ pages upfront
287
298
  # Option B: Incremental (Startup) - Build as you go
288
299
 
289
- # 2. Create increment
290
- /create-increment "user authentication"
300
+ # 2. Plan increment with slash command (PM-led process)
301
+ /inc "user authentication"
302
+ # Alias for /increment
303
+ # PM-led: Market research → spec.md → plan.md → auto-generate tasks.md
304
+ # Creates: spec.md, plan.md, tasks.md (auto-generated!), tests.md
291
305
 
292
- # 3. Implement with auto-role routing
293
- "Implement user authentication"
294
- # SpecWeave orchestrates: PM → Architect → Backend → QA → Docs
306
+ # 3. Build it (hooks run after EVERY task)
307
+ /build 0001
308
+ # Executes tasks sequentially
309
+ # Hooks automatically update CLAUDE.md, README.md, CHANGELOG.md
295
310
 
296
- # 4. Generate diagrams
297
- "Create C4 context diagram for authentication"
311
+ # 4. Validate quality (optional)
312
+ /validate 0001 --quality
313
+ # LLM-as-judge quality assessment
314
+
315
+ # 5. Close increment (PM validates 3 gates)
316
+ /done 0001
317
+ # Gate 1: Tasks completed (P1 required)
318
+ # Gate 2: Tests passing (>80% coverage)
319
+ # Gate 3: Documentation updated
298
320
 
299
- # 5. Sync with tools (optional)
321
+ # 6. Sync with tools (optional)
300
322
  /sync-github # Sync to GitHub issues
301
323
  ```
302
324
 
@@ -465,19 +487,19 @@ npm test
465
487
 
466
488
  ## 🏷️ Project Status
467
489
 
468
- **Version**: 0.1.6
490
+ **Version**: 0.1.8
469
491
  **Status**: Public Beta
470
492
  **License**: MIT
471
493
  **Release Date**: 2025-10-28
472
494
  **Website**: [spec-weave.com](https://spec-weave.com)
473
495
 
474
- ### ✅ What Works (v0.1.6)
496
+ ### ✅ What Works (v0.1.8)
475
497
 
476
498
  - ✅ **10 Agents** fully implemented and pre-installed
477
499
  - ✅ **35+ Skills** fully implemented and pre-installed
478
500
  - ✅ **CLI Tool** - `specweave init` with complete component copying
479
501
  - ✅ **Ready Out of the Box** - All components installed during init
480
- - ✅ **Auto-detection** and intelligent routing (fixed in 0.1.6!)
502
+ - ✅ **Command simplification** - 4-command workflow (0.1.8)
481
503
  - ✅ **Diagram generation** (C4 Model with validation)
482
504
  - ✅ **4-level testing framework** (spec → feature → component → automated)
483
505
  - ✅ **JIRA/ADO/GitHub sync** integration
package/SPECWEAVE.md CHANGED
@@ -13,46 +13,66 @@ 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., `/inc "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
+ **Core Workflow** (4 commands):
29
+
30
+ | Alias | Full Command | Purpose | Example |
31
+ |-------|--------------|---------|---------|
32
+ | `/inc` | `/increment` | **Plan Product Increment** (PM-led) | `/inc "User auth"` |
33
+ | - | `/build` | Execute implementation (hooks after every task) | `/build 0001` |
34
+ | - | `/validate` | Validate quality (optional LLM judge) | `/validate 0001 --quality` |
35
+ | - | `/done` | Close increment (PM validates 3 gates) | `/done 0001` |
36
+
37
+ **Supporting Commands**:
38
+ - `/create-project` - Initialize SpecWeave project
39
+ - `/list-increments` - List all increments
40
+ - `/review-docs` - Review docs vs code
41
+ - `/generate-docs` - Generate doc site
42
+ - `/sync-github` - Sync to GitHub
43
+
44
+ **Why ONE Alias (/inc)?**
45
+ - ✅ `/inc` is THE most used command (every new feature starts here)
46
+ - ✅ Append-only increment workflow: 0001 → 0002 → 0003 → ...
47
+ - ✅ Other commands used once per increment (no aliases needed)
48
+ - ✅ Clear and explicit workflow
49
+
50
+ ### Typical Workflow
35
51
 
36
- ### Routing Examples
52
+ ```bash
53
+ # 1. Initialize project
54
+ npx specweave init my-saas
55
+
56
+ # 2. Plan your first increment (use /inc - the ONLY alias!)
57
+ /inc "User authentication with JWT and RBAC"
58
+
59
+ # 3. Review generated docs
60
+ # spec.md, plan.md, tasks.md (auto-generated!), tests.md
37
61
 
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) |
62
+ # 4. Build it (hooks run after EVERY task)
63
+ /build 0001
45
64
 
46
- ### Activation Behavior
65
+ # 5. Validate quality (optional)
66
+ /validate 0001 --quality
47
67
 
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.)
68
+ # 6. Close when done (PM validates: tasks ✅ + tests ✅ + docs ✅)
69
+ /done 0001
54
70
 
55
- **Rule**: When in doubt, route through SpecWeave. Let `specweave-detector` decide if it's a valid development request.
71
+ # 7. Repeat for next feature
72
+ /inc "Payment processing"
73
+ ```
74
+
75
+ **Remember**: Type `/inc` first, THEN build! Otherwise you lose all SpecWeave benefits (specs, architecture, auto-generated tasks, test strategy).
56
76
 
57
77
  ---
58
78
 
@@ -177,24 +197,26 @@ npx specweave list --installed # See what's installed
177
197
 
178
198
  ---
179
199
 
180
- ## Quick Reference: Slash Commands
200
+ ## Quick Reference: Slash Commands (MUST USE!)
201
+
202
+ **CRITICAL**: SpecWeave uses **EXPLICIT SLASH COMMANDS** - type them to activate the framework!
203
+
204
+ ### Core Workflow (4 Commands)
181
205
 
182
206
  | Command | Alias | Purpose | Example |
183
207
  |---------|-------|---------|---------|
184
- | `/create-project` | `/init` | Bootstrap new SpecWeave project | `/init my-saas --type python` |
185
- | `/create-increment` | `/ci` | Create new feature/increment | `/ci "user authentication"` |
186
- | `/start-increment` | `/si` | Start working on an increment | `/si 0001` |
187
- | `/add-tasks` | `/at` | Add tasks to existing increment | `/at 0001 "implement login"` |
188
- | `/validate-increment` | `/vi` | Validate with rule-based + optional AI quality | `/vi 0001 --quality` |
189
- | `/close-increment` | `/done` | Close increment with leftover transfer | `/done 0001` |
190
- | `/list-increments` | `/ls` | List all increments with status | `/ls --status=in-progress` |
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` |
208
+ | `/increment` | `/inc` | Plan Product Increment (PM-led, auto-generates tasks) | `/inc "user authentication"` |
209
+ | `/build` | - | Execute implementation (hooks after EVERY task) | `/build 0001` |
210
+ | `/validate` | - | Validate quality (optional LLM judge) | `/validate 0001 --quality` |
211
+ | `/done` | - | Close increment (PM validates 3 gates: tasks, tests, docs) | `/done 0001` |
194
212
 
195
- **All commands are framework-agnostic** (adapt to detected tech stack)
213
+ ### Supporting Commands
196
214
 
197
- **💡 Pro Tip**: Use short aliases (`/ci`, `/vi`, `/si`, `/done`, `/ls`, `/at`, `/init`) for speed during active development!
215
+ | Command | Purpose | Example |
216
+ |---------|---------|---------|
217
+ | `/create-project` | Bootstrap new SpecWeave project | `/create-project --type python` |
218
+ | `/list-increments` | List all increments with status | `/list-increments` |
219
+ **All commands are framework-agnostic** (adapt to detected tech stack)
198
220
 
199
221
  **See**: [Command Reference](.claude/commands/) for all available commands
200
222
 
@@ -229,8 +251,8 @@ npx specweave list --installed # See what's installed
229
251
 
230
252
  | Skill | Purpose | Activates When |
231
253
  |-------|---------|----------------|
232
- | `specweave-detector` | Auto-detect SpecWeave projects | Any request in SpecWeave project |
233
- | `increment-planner` | Plan features with context | Creating/planning features |
254
+ | `specweave-detector` | Slash command documentation | User asks about SpecWeave commands |
255
+ | `increment-planner` | Plan features with context | `/inc` or `/increment` command |
234
256
  | `skill-router` | Route to appropriate skills | Ambiguous requests |
235
257
  | `context-loader` | Load context selectively | Working on increments |
236
258
  | `diagrams-generator` | Coordinate diagram creation | "create diagram", "draw diagram", C4, sequence, ER |
@@ -288,9 +310,10 @@ backlog → planned → in-progress → completed → closed
288
310
 
289
311
  **Commands**:
290
312
  ```bash
291
- /create-increment "feature name" # Create new increment (auto-numbered, e.g., 0003-feature-name)
292
- /add-tasks 0001 "task description" # Add tasks to existing
293
- /close-increment 0001 # Close with leftover transfer
313
+ /inc "feature name" # Plan increment (PM-led, auto-generates tasks)
314
+ /build 0001 # Execute implementation (hooks after EVERY task)
315
+ /validate 0001 --quality # Validate quality (optional)
316
+ /done 0001 # Close increment (PM validates 3 gates)
294
317
  ```
295
318
 
296
319
  **See**: [Increment Lifecycle Guide](.specweave/docs/internal/delivery/guides/increment-lifecycle.md) for complete lifecycle management
@@ -661,8 +684,28 @@ Attempt 2/3: Refining with feedback...
661
684
 
662
685
  ---
663
686
 
664
- **Quick Start**: Run `/create-project` to initialize a new SpecWeave project
687
+ **Quick Start**:
688
+
689
+ **CRITICAL**: SpecWeave uses **EXPLICIT SLASH COMMANDS** - type `/inc` to activate!
690
+
691
+ ```bash
692
+ # Initialize project
693
+ npx specweave init my-project
694
+
695
+ # Plan your first increment (use slash command!)
696
+ /inc "feature description"
697
+
698
+ # Typical workflow (append-only increments: 0001 → 0002 → 0003)
699
+ 1. /inc "feature" → PM creates specs + plan + auto-generates tasks
700
+ 2. /build 0001 → Execute implementation (hooks after EVERY task)
701
+ 3. /validate 0001 --quality → Optional quality check
702
+ 4. /done 0001 → PM validates 3 gates (tasks ✅ + tests ✅ + docs ✅)
703
+ ```
704
+
705
+ **Remember**: Type `/inc` first to plan, THEN `/build` to implement! Otherwise you lose all SpecWeave benefits (specs, architecture, test strategy).
706
+
707
+ **Need help?**: Type `/inc` to see examples, or ask about specific workflows.
665
708
 
666
- **Need help?**: Ask Claude to load the relevant guide from `.specweave/docs/internal/delivery/guides/`
709
+ **SpecWeave Documentation**: https://spec-weave.com
667
710
 
668
711
  **Last Updated**: Auto-updated via `post-task-completion` hook
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "specweave",
3
- "version": "0.1.6",
4
- "description": "Spec-Driven Development framework with AI-powered autonomous agents for building SaaS applications",
3
+ "version": "0.1.8",
4
+ "description": "Replace vibe coding with spec-driven development. 4-command workflow (/inc, /build, /validate, /done), PM-led planning, 10 agents, 35+ skills. Visit spec-weave.com",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
7
7
  "specweave": "./bin/specweave.js"
@@ -734,6 +734,291 @@ Avoid technical jargon with stakeholders. Focus on:
734
734
 
735
735
  ---
736
736
 
737
+ ## 🔥 CRITICAL: Increment Closure Validation (/done Command)
738
+
739
+ **MANDATORY BEHAVIOR**: When invoked via `/done` command, PM Agent acts as the **final quality gate** before increment closure.
740
+
741
+ ### Role: Product Owner / Release Manager
742
+
743
+ You are the final approver for increment closure. Your job is to ensure:
744
+ 1. ✅ **Business value delivered** (all critical tasks complete)
745
+ 2. ✅ **Quality maintained** (tests passing, no regressions)
746
+ 3. ✅ **Knowledge preserved** (documentation updated)
747
+
748
+ **You MUST validate ALL 3 gates before approving closure.**
749
+
750
+ ---
751
+
752
+ ### Validation Workflow
753
+
754
+ When user runs `/done <increment-id>`, follow these steps:
755
+
756
+ #### Step 1: Load Increment Context
757
+
758
+ ```bash
759
+ # Load all documents
760
+ Read: .specweave/increments/{id}/spec.md
761
+ Read: .specweave/increments/{id}/plan.md
762
+ Read: .specweave/increments/{id}/tasks.md
763
+ Read: .specweave/increments/{id}/tests.md
764
+ ```
765
+
766
+ #### Step 2: Validate Gate 1 - Tasks Completed ✅
767
+
768
+ **Check**:
769
+ - [ ] All P1 (critical) tasks completed
770
+ - [ ] All P2 (important) tasks completed OR deferred with reason
771
+ - [ ] P3 (nice-to-have) tasks completed, deferred, or moved to backlog
772
+ - [ ] No tasks in "blocked" state
773
+ - [ ] Acceptance criteria for each task met
774
+
775
+ **Example Pass**:
776
+ ```
777
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
778
+ GATE 1: Tasks Completion ✅ PASS
779
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
780
+
781
+ Priority P1 (Critical): 12/12 completed (100%)
782
+ Priority P2 (Important): 16/18 completed (89%) - 2 deferred with reason
783
+ Priority P3 (Nice-to-have): 8/12 completed (67%) - 4 moved to backlog
784
+
785
+ Status: ✅ PASS
786
+ ```
787
+
788
+ **Example Fail**:
789
+ ```
790
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
791
+ GATE 1: Tasks Completion ❌ FAIL
792
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
793
+
794
+ Priority P1 (Critical): 10/12 completed (83%)
795
+
796
+ Incomplete P1 tasks:
797
+ ❌ T005: Add password hashing (CRITICAL - security requirement)
798
+ ❌ T008: Implement JWT validation (CRITICAL - auth won't work)
799
+
800
+ Recommendation: ❌ CANNOT close increment
801
+ • Complete T005 and T008 (security critical)
802
+ • Estimated effort: 4-6 hours
803
+ ```
804
+
805
+ #### Step 3: Validate Gate 2 - Tests Passing ✅
806
+
807
+ **Check**:
808
+ - [ ] All test suites passing (no failures)
809
+ - [ ] Test coverage meets requirements (>80% for critical paths)
810
+ - [ ] E2E tests passing (if UI exists)
811
+ - [ ] No skipped tests without documentation
812
+ - [ ] Test cases align with acceptance criteria in spec.md
813
+
814
+ **Ask user to run tests**:
815
+ ```
816
+ Please run the test suite and share results:
817
+ npm test # Run all tests
818
+ npm run test:coverage # Check coverage
819
+ ```
820
+
821
+ **Example Pass**:
822
+ ```
823
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
824
+ GATE 2: Tests Passing ✅ PASS
825
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
826
+
827
+ Unit Tests: 47/47 passing ✅
828
+ Integration Tests: 15/15 passing ✅
829
+ E2E Tests: 8/8 passing ✅
830
+ Coverage: 89% (above 80% target) ✅
831
+
832
+ Status: ✅ PASS
833
+ ```
834
+
835
+ **Example Fail**:
836
+ ```
837
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
838
+ GATE 2: Tests Passing ❌ FAIL
839
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
840
+
841
+ Unit Tests: 45/47 passing (96%) - 2 failures
842
+ E2E Tests: 7/8 passing (88%) - 1 failure
843
+
844
+ Failures:
845
+ ❌ test/auth/jwt.test.ts: Token expiry validation
846
+ ❌ test/e2e/login.spec.ts: Rate limiting test
847
+
848
+ Recommendation: ❌ CANNOT close increment
849
+ • Fix JWT expiry configuration (security issue)
850
+ • Fix rate limiting (prevents brute force attacks)
851
+ • Estimated effort: 2-3 hours
852
+ ```
853
+
854
+ #### Step 4: Validate Gate 3 - Documentation Updated ✅
855
+
856
+ **Check**:
857
+ - [ ] CLAUDE.md updated with new features
858
+ - [ ] README.md updated with usage examples
859
+ - [ ] CHANGELOG.md updated (if public API changed)
860
+ - [ ] API documentation regenerated (if applicable)
861
+ - [ ] Inline code documentation complete
862
+ - [ ] No stale references to old code
863
+
864
+ **Scan files**:
865
+ ```bash
866
+ Read: CLAUDE.md
867
+ Read: README.md
868
+ Read: CHANGELOG.md
869
+ Grep: Search for references to new features
870
+ ```
871
+
872
+ **Example Pass**:
873
+ ```
874
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
875
+ GATE 3: Documentation Updated ✅ PASS
876
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
877
+
878
+ CLAUDE.md: ✅ Updated with new features
879
+ README.md: ✅ Updated with examples
880
+ CHANGELOG.md: ✅ v0.1.8 entry added
881
+ Inline Docs: ✅ All functions documented
882
+
883
+ Status: ✅ PASS
884
+ ```
885
+
886
+ **Example Fail**:
887
+ ```
888
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
889
+ GATE 3: Documentation Updated ❌ FAIL
890
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
891
+
892
+ CLAUDE.md: ❌ Missing authentication section
893
+ README.md: ❌ No authentication examples
894
+ CHANGELOG.md: ❌ v0.1.8 entry missing
895
+
896
+ Recommendation: ❌ CANNOT close increment
897
+ • Update CLAUDE.md with authentication section
898
+ • Add examples to README.md
899
+ • Create CHANGELOG.md entry
900
+ • Estimated effort: 1-2 hours
901
+ ```
902
+
903
+ #### Step 5: PM Decision
904
+
905
+ **If ALL 3 gates pass**:
906
+ ```
907
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
908
+ PM VALIDATION RESULT: ✅ READY TO CLOSE
909
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
910
+
911
+ ✅ Gate 1: Tasks Completed (100% P1, 89% P2)
912
+ ✅ Gate 2: Tests Passing (70/70, 89% coverage)
913
+ ✅ Gate 3: Documentation Updated (all current)
914
+
915
+ Business Value Delivered:
916
+ • [List key deliverables from spec.md]
917
+
918
+ PM Approval: ✅ APPROVED for closure
919
+
920
+ Next steps:
921
+ 1. Update status: in-progress → completed
922
+ 2. Set completion date
923
+ 3. Generate completion report
924
+ 4. Update backlog with deferred tasks
925
+ ```
926
+
927
+ **If ANY gate fails**:
928
+ ```
929
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
930
+ PM VALIDATION RESULT: ❌ NOT READY TO CLOSE
931
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
932
+
933
+ [Gate status summary]
934
+
935
+ PM Decision: ❌ CANNOT close increment
936
+
937
+ Blockers:
938
+ 1. [List all blockers with estimated effort]
939
+ 2. [...]
940
+
941
+ Total estimated effort to fix: X hours
942
+
943
+ Action Plan:
944
+ 1. [Step-by-step plan to address blockers]
945
+ 2. [...]
946
+ 3. Re-run /done {id} for validation
947
+
948
+ Increment remains: in-progress
949
+ ```
950
+
951
+ ---
952
+
953
+ ### Scope Creep Detection
954
+
955
+ **If tasks.md has significantly more tasks than originally planned**:
956
+
957
+ ```
958
+ 🤔 PM Analysis: Scope creep detected
959
+
960
+ Original plan: 42 tasks (estimated 3-4 weeks)
961
+ Current state: 55 tasks (3 weeks elapsed)
962
+ Reason: 13 tasks added during implementation
963
+
964
+ Options:
965
+ A) Complete all 55 tasks (1 more week)
966
+ B) Move 13 new tasks to next increment (close now)
967
+ C) Re-plan as 2 increments (recommended)
968
+
969
+ Recommendation: Option C - Split into two increments
970
+ • Increment {id}: Core features (42 tasks) - Close now
971
+ • Increment {id+1}: Enhancements (13 tasks) - New increment
972
+
973
+ Create new increment for extra scope? [Y/n]
974
+ ```
975
+
976
+ ---
977
+
978
+ ### Configuration
979
+
980
+ ```yaml
981
+ # .specweave/config.yaml
982
+ increment_closure:
983
+ pm_validation:
984
+ enabled: true # MUST be true
985
+ strict_mode: true # Require all 3 gates
986
+
987
+ gates:
988
+ tasks:
989
+ require_p1_complete: true
990
+ require_p2_complete: false
991
+ allow_scope_transfer: true
992
+
993
+ tests:
994
+ require_all_passing: true
995
+ min_coverage: 80
996
+ allow_skipped: false
997
+
998
+ documentation:
999
+ require_claude_md: true
1000
+ require_readme: true
1001
+ require_changelog: true
1002
+ allow_inline_only: false
1003
+
1004
+ scope_creep:
1005
+ detect: true
1006
+ max_additional_tasks: 10
1007
+ auto_transfer: true
1008
+ ```
1009
+
1010
+ ---
1011
+
1012
+ ### Best Practices
1013
+
1014
+ 1. **Never bypass validation** - All 3 gates must pass
1015
+ 2. **Be specific in feedback** - Tell user exactly what's missing
1016
+ 3. **Estimate effort** - Help user understand time to fix
1017
+ 4. **Detect scope creep early** - Offer to transfer extra tasks
1018
+ 5. **Document business value** - Summarize what was delivered
1019
+
1020
+ ---
1021
+
737
1022
  ## Summary
738
1023
 
739
1024
  The **PM Agent** is your AI Product Manager that:
@@ -745,6 +1030,7 @@ The **PM Agent** is your AI Product Manager that:
745
1030
  ✅ Creates product roadmaps with timelines
746
1031
  ✅ Translates technical decisions for stakeholders
747
1032
  ✅ Defines measurable success metrics
1033
+ ✅ **Validates increment closure with 3-gate check** (tasks, tests, docs)
748
1034
 
749
1035
  **User benefit**: Get expert product management guidance without hiring a PM. Make data-driven decisions about what to build, when, and why.
750
1036