dev-playbooks 1.7.3 → 2.0.0

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
@@ -31,6 +31,39 @@ AI coding assistants are powerful, but often **unpredictable**:
31
31
 
32
32
  ---
33
33
 
34
+ ## ✨ v2.0.0 New Features: Human-Friendly Document Templates
35
+
36
+ **Core Philosophy**: In the AI era, humans need concise information to make decisions, not reading thousands of lines of AI-generated documents.
37
+
38
+ ### Bottom Line Up Front (30-second understanding)
39
+
40
+ Every document (proposal, design, tasks, verification) has a brief summary at the top:
41
+ - ✅ **What will result**: List changes in plain language
42
+ - ❌ **What won't result**: Clearly state what won't change
43
+ - 📝 **One-sentence summary**: Understandable even for non-technical people
44
+
45
+ ### Alignment Check (Uncover hidden requirements)
46
+
47
+ In the proposal phase, guide users through questions:
48
+ - 👤 **Who are you?**: Quick Starter / Platform Builder / Rapid Validator
49
+ - 🎯 **What do you want?**: Explicit requirements + hidden requirements
50
+ - 💡 **Multi-perspective recommendations**: Different recommendations based on different roles
51
+
52
+ ### Default Approval Mechanism (Reduce decision fatigue)
53
+
54
+ - ⏰ **User silence = agreement**: Auto-approve after timeout
55
+ - 🎛️ **Configurable timeout**: proposal 48h / design 24h / tasks 24h / verification 12h
56
+ - 🔒 **Retain control**: Users can reject or customize at any time
57
+
58
+ ### Project-Level Documents (Knowledge retention)
59
+
60
+ - 📋 **User Profile** (project-profile.md): Record role, requirements, constraints, preferences
61
+ - 📝 **Decision Log** (decision-log.md): Record all important decisions for retrospection
62
+
63
+ **See**: `docs/v2.0.0-changelog.md`
64
+
65
+ ---
66
+
34
67
  ## How It Works
35
68
 
36
69
  **Hard constraint**: Test Owner and Coder **must work in separate conversations**. This is not a suggestion. Coder cannot modify `tests/**`. "Done" is defined by tests/build verification, not AI self-evaluation.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dev-playbooks",
3
- "version": "1.7.3",
3
+ "version": "2.0.0",
4
4
  "description": "AI-powered spec-driven development workflow",
5
5
  "keywords": [
6
6
  "devbooks",
@@ -37,9 +37,9 @@ This document defines the design principles and constraints you must follow when
37
37
  **Editor Skills MUST**:
38
38
  - [ ] Back up original files before edits (or make it recoverable via git)
39
39
  - [ ] Avoid cumulative side effects across reruns
40
- - [ ] Provide a dry-run mode to preview changes
40
+ - [ ] Provide a "dry-run" mode to preview changes
41
41
 
42
- ### 1.3 Verification-First Principle (inspired by VS Code)
42
+ ### 1.3 Verification-First Principle
43
43
 
44
44
  **Core requirement**: after a generator/editor Skill writes files, it **must run verification**, and must not proceed to the next step if verification fails.
45
45
 
@@ -99,7 +99,7 @@ echo "ok: verification passed"
99
99
  - **Write to workspace**: Skills should write to `<change-root>/<change-id>/`.
100
100
  - **Archive is merge**: archiving merges workspace outputs back into truth.
101
101
 
102
- ### 1.6 Resource Cleanup (inspired by VS Code)
102
+ ### 1.6 Resource Cleanup
103
103
 
104
104
  **Requirement**: clean up temporary resources on both success and failure.
105
105
 
@@ -0,0 +1,285 @@
1
+ # Approval Configuration Guide
2
+
3
+ > This document explains how to configure the approval mechanism, including default approval, timeout settings, etc.
4
+
5
+ ## Configuration File Location
6
+
7
+ ```
8
+ .devbooks/config.yaml
9
+ ```
10
+
11
+ ## Configuration Example
12
+
13
+ ```yaml
14
+ # Approval configuration
15
+ approval:
16
+ # Default approval strategy
17
+ # - auto_approve: Auto-approve after timeout (default)
18
+ # - require_explicit: Must explicitly approve
19
+ # - disabled: Disable approval mechanism
20
+ default_strategy: auto_approve
21
+
22
+ # Timeout (hours)
23
+ timeout:
24
+ proposal: 48 # Proposal needs 48 hours
25
+ design: 24 # Design needs 24 hours
26
+ tasks: 24 # Tasks needs 24 hours
27
+ verification: 12 # Verification needs 12 hours
28
+
29
+ # Whether explicit approval is required
30
+ require_explicit:
31
+ proposal: true # Proposal must be explicitly approved
32
+ design: false # Design can be auto-approved
33
+ tasks: false # Tasks can be auto-approved
34
+ verification: false # Verification can be auto-approved
35
+
36
+ # Approval methods
37
+ approval_methods:
38
+ - cli # Command-line approval
39
+ - chat # Chat approval
40
+ - auto # Auto-approval
41
+
42
+ # Notification methods
43
+ notification:
44
+ - terminal # Terminal notification
45
+ # - desktop # Desktop notification (optional)
46
+ # - email # Email notification (optional)
47
+ ```
48
+
49
+ ## Configuration Details
50
+
51
+ ### 1. Default Approval Strategy
52
+
53
+ | Strategy | Description | Use Case |
54
+ |----------|-------------|----------|
55
+ | `auto_approve` | Auto-approve after timeout | Most cases (recommended) |
56
+ | `require_explicit` | Must explicitly approve | High-risk projects |
57
+ | `disabled` | Disable approval mechanism | Complete trust in AI |
58
+
59
+ ### 2. Timeout Settings
60
+
61
+ - **Proposal**: 48 hours (needs more time to think)
62
+ - **Design**: 24 hours (technical details)
63
+ - **Tasks**: 24 hours (task breakdown)
64
+ - **Verification**: 12 hours (acceptance results)
65
+
66
+ **Recommendations**:
67
+ - Personal projects: Can shorten timeout (e.g., 12/6/6/3 hours)
68
+ - Team projects: Keep default timeout
69
+ - High-risk projects: Extend timeout (e.g., 72/48/48/24 hours)
70
+
71
+ ### 3. Explicit Approval Required
72
+
73
+ - **true**: Must explicitly approve, won't auto-approve
74
+ - **false**: Auto-approve after timeout
75
+
76
+ **Recommendations**:
77
+ - Set Proposal to true (important decisions)
78
+ - Set other phases to false (reduce burden)
79
+
80
+ ### 4. Approval Methods
81
+
82
+ #### CLI Approval
83
+
84
+ ```bash
85
+ # Approve
86
+ devbooks approve <change-id> --stage proposal
87
+
88
+ # Reject
89
+ devbooks reject <change-id> --stage proposal --reason "reason"
90
+
91
+ # Revise
92
+ devbooks revise <change-id> --stage proposal
93
+ ```
94
+
95
+ #### Chat Approval
96
+
97
+ Say directly in chat:
98
+ - "agree" / "approve"
99
+ - "disagree" / "reject"
100
+ - "I want to modify XXX"
101
+
102
+ #### Auto-approval
103
+
104
+ Auto-approve after timeout (based on configuration)
105
+
106
+ ### 5. Notification Methods
107
+
108
+ - **terminal**: Terminal notification (default)
109
+ - **desktop**: Desktop notification (requires additional configuration)
110
+ - **email**: Email notification (requires additional configuration)
111
+
112
+ ## Approval Process
113
+
114
+ ### 1. Creation Phase
115
+
116
+ After AI creates a document, it adds an approval block at the end:
117
+
118
+ ```markdown
119
+ ## ✅ Approval Process
120
+
121
+ **Current status**:
122
+ - 📝 Status: Pending approval
123
+ - ⏰ Created at: 2026-01-19 10:00
124
+ - ⏰ Timeout at: 2026-01-20 10:00 (after 24 hours)
125
+
126
+ **If you agree**:
127
+ - [ ] ✅ Approve, start next phase
128
+
129
+ **If you disagree**:
130
+ - [ ] ❌ Reject, explain reason
131
+
132
+ **Default choice**: ✅ Approve (auto-approved after 24 hours)
133
+ ```
134
+
135
+ ### 2. Notification Phase
136
+
137
+ System reminds users through configured notification methods:
138
+
139
+ ```
140
+ ⏰ Reminder: Proposal pending approval
141
+ - Change: 20260119-1000-add-feature-x
142
+ - Phase: Proposal
143
+ - Timeout at: 2026-01-20 10:00 (23 hours remaining)
144
+ - Action: devbooks approve 20260119-1000-add-feature-x --stage proposal
145
+ ```
146
+
147
+ ### 3. Approval Phase
148
+
149
+ Users can approve through:
150
+
151
+ - **CLI**: `devbooks approve <change-id> --stage proposal`
152
+ - **Chat**: Say "agree" directly
153
+ - **Auto**: Do nothing, wait for timeout
154
+
155
+ ### 4. Timeout Phase
156
+
157
+ If timeout and configured as `auto_approve`, system auto-approves:
158
+
159
+ ```
160
+ ✅ Auto-approved: Proposal
161
+ - Change: 20260119-1000-add-feature-x
162
+ - Phase: Proposal
163
+ - Reason: Auto-approved after timeout (24 hours)
164
+ ```
165
+
166
+ ### 5. Recording Phase
167
+
168
+ All approval actions are recorded in approval history:
169
+
170
+ ```markdown
171
+ ## Approval History
172
+
173
+ | Time | Phase | Action | Actor | Reason |
174
+ |------|-------|--------|-------|--------|
175
+ | 2026-01-19 10:00 | Proposal | Created | AI | - |
176
+ | 2026-01-20 10:00 | Proposal | Auto-approved | System | 24-hour timeout |
177
+ ```
178
+
179
+ ## FAQ
180
+
181
+ ### Q1: How to disable auto-approval?
182
+
183
+ Modify configuration file:
184
+
185
+ ```yaml
186
+ approval:
187
+ default_strategy: require_explicit
188
+ require_explicit:
189
+ proposal: true
190
+ design: true
191
+ tasks: true
192
+ verification: true
193
+ ```
194
+
195
+ ### Q2: How to shorten timeout?
196
+
197
+ Modify configuration file:
198
+
199
+ ```yaml
200
+ approval:
201
+ timeout:
202
+ proposal: 12
203
+ design: 6
204
+ tasks: 6
205
+ verification: 3
206
+ ```
207
+
208
+ ### Q3: How to view pending approvals?
209
+
210
+ ```bash
211
+ devbooks status
212
+ ```
213
+
214
+ Output:
215
+
216
+ ```
217
+ Pending approvals:
218
+ - 20260119-1000-add-feature-x (Proposal, 23 hours remaining)
219
+ - 20260119-1100-fix-bug-y (Design, 5 hours remaining)
220
+ ```
221
+
222
+ ### Q4: How to batch approve?
223
+
224
+ ```bash
225
+ devbooks approve --all
226
+ ```
227
+
228
+ ### Q5: How to revoke approval?
229
+
230
+ ```bash
231
+ devbooks revoke <change-id> --stage proposal
232
+ ```
233
+
234
+ ## Best Practices
235
+
236
+ ### 1. Personal Projects
237
+
238
+ ```yaml
239
+ approval:
240
+ default_strategy: auto_approve
241
+ timeout:
242
+ proposal: 12
243
+ design: 6
244
+ tasks: 6
245
+ verification: 3
246
+ require_explicit:
247
+ proposal: false
248
+ design: false
249
+ tasks: false
250
+ verification: false
251
+ ```
252
+
253
+ ### 2. Team Projects
254
+
255
+ ```yaml
256
+ approval:
257
+ default_strategy: auto_approve
258
+ timeout:
259
+ proposal: 48
260
+ design: 24
261
+ tasks: 24
262
+ verification: 12
263
+ require_explicit:
264
+ proposal: true
265
+ design: false
266
+ tasks: false
267
+ verification: false
268
+ ```
269
+
270
+ ### 3. High-risk Projects
271
+
272
+ ```yaml
273
+ approval:
274
+ default_strategy: require_explicit
275
+ timeout:
276
+ proposal: 72
277
+ design: 48
278
+ tasks: 48
279
+ verification: 24
280
+ require_explicit:
281
+ proposal: true
282
+ design: true
283
+ tasks: true
284
+ verification: true
285
+ ```
@@ -0,0 +1,137 @@
1
+ # Decision Log Document Template
2
+
3
+ > This template defines the standard structure for decision-log.md, used to record all important decisions for easy retrospection and learning.
4
+
5
+ ## File Location
6
+
7
+ ```
8
+ <truth-root>/specs/_meta/decision-log.md
9
+ ```
10
+
11
+ ## Standard Structure
12
+
13
+ ```markdown
14
+ # Decision Log: <Project Name>
15
+
16
+ > **Purpose**: Record all important decisions for easy retrospection and learning
17
+
18
+ ## Decision #001: [Decision Title]
19
+
20
+ **Decision time**: YYYY-MM-DD
21
+ **Decision phase**: Proposal / Design / Tasks / Verification
22
+ **Decision maker**: User / AI recommendation / Default
23
+
24
+ **Background**:
25
+ [Why this decision needs to be made]
26
+
27
+ **Options**:
28
+ - Option A: [Description]
29
+ - Advantages: [Advantages]
30
+ - Disadvantages: [Disadvantages]
31
+ - Suitable for: [What scenarios]
32
+
33
+ - Option B: [Description]
34
+ - Advantages: [Advantages]
35
+ - Disadvantages: [Disadvantages]
36
+ - Suitable for: [What scenarios]
37
+
38
+ **Decision**:
39
+ Choose option [X]
40
+
41
+ **Reason**:
42
+ - [Reason 1]
43
+ - [Reason 2]
44
+ - [Reason 3]
45
+
46
+ **Impact**:
47
+ - ✅ [Positive impact]
48
+ - ⚠️ [Negative impact]
49
+ - ⚠️ [Risk]
50
+
51
+ **Subsequent evolution**:
52
+ - YYYY-MM-DD: [Evolution record]
53
+
54
+ ---
55
+
56
+ ## Decision #002: [Decision Title]
57
+
58
+ ...
59
+
60
+ ---
61
+
62
+ ## Decision Template
63
+
64
+ **Decision #XXX: [Decision Title]**
65
+
66
+ **Decision time**: YYYY-MM-DD
67
+ **Decision phase**: Proposal / Design / Tasks / Verification
68
+ **Decision maker**: User / AI recommendation / Default
69
+
70
+ **Background**:
71
+ [Why this decision needs to be made]
72
+
73
+ **Options**:
74
+ - Option A: [Description]
75
+ - Option B: [Description]
76
+ - Option C: [Description]
77
+
78
+ **Decision**:
79
+ Choose option X
80
+
81
+ **Reason**:
82
+ - [Reason 1]
83
+ - [Reason 2]
84
+ - [Reason 3]
85
+
86
+ **Impact**:
87
+ - ✅ [Positive impact]
88
+ - ⚠️ [Negative impact]
89
+ - ⚠️ [Risk]
90
+
91
+ **Subsequent evolution**:
92
+ - YYYY-MM-DD: [Evolution record]
93
+ ```
94
+
95
+ ## Usage Guide
96
+
97
+ ### 1. Who writes Decision Log?
98
+
99
+ - **proposal-author**: Records decisions from Proposal phase
100
+ - **design-doc**: Records decisions from Design phase
101
+ - **implementation-plan**: Records decisions from Tasks phase
102
+ - **archiver**: Organizes decision log during archiving
103
+
104
+ ### 2. Who reads Decision Log?
105
+
106
+ | Skill | Reading Purpose |
107
+ |-------|-----------------|
108
+ | proposal-author | Understand historical decisions, avoid repeated discussions |
109
+ | design-doc | Understand historical reasons for technology selection |
110
+ | impact-analysis | Assess long-term impact of decisions |
111
+ | archiver | Organize decision log, build knowledge base |
112
+
113
+ ### 3. Purpose of Decision Log
114
+
115
+ - **Knowledge retention**: Record background, reasons, and impact of decisions
116
+ - **Avoid repetition**: Avoid repeated discussions of the same issues
117
+ - **Learning and improvement**: Review subsequent evolution of decisions, learn lessons
118
+ - **Team collaboration**: Help new members quickly understand project's decision history
119
+
120
+ ### 4. Decision Log Update Frequency
121
+
122
+ - **Real-time updates**: Record immediately when important decisions are made
123
+ - **Regular review**: Review monthly, update "Subsequent evolution" section
124
+ - **Archiving organization**: Organize decision log during each archiving, remove outdated decisions
125
+
126
+ ### 5. What decisions need to be recorded?
127
+
128
+ **Decisions to record**:
129
+ - Technology selection (choosing A over B)
130
+ - Architecture design (choosing solution A over solution B)
131
+ - Important trade-offs (sacrificing X for Y)
132
+ - Boundary conditions (explicitly not doing something)
133
+
134
+ **Decisions not to record**:
135
+ - Obvious decisions (like using Git for version control)
136
+ - Temporary decisions (like variable naming)
137
+ - Reversible decisions (like code formatting)
@@ -0,0 +1,202 @@
1
+ # Design Document Template
2
+
3
+ > This template defines the standard structure for design.md to ensure designs are clear, implementable, and verifiable.
4
+
5
+ ## File Location
6
+
7
+ ```
8
+ <change-root>/<change-id>/design.md
9
+ ```
10
+
11
+ ## Standard Structure
12
+
13
+ ```markdown
14
+ # <Change Title> - Design Document
15
+
16
+ ## 🎯 Bottom Line Up Front (30-second read)
17
+
18
+ **This design will result in**:
19
+ - ✅ [Change 1 that will happen]
20
+ - ✅ [Change 2 that will happen]
21
+ - ✅ [Change 3 that will happen]
22
+
23
+ **This design will NOT result in**:
24
+ - ❌ [What won't happen 1]
25
+ - ❌ [What won't happen 2]
26
+
27
+ **Difference from Proposal**:
28
+ - 📝 Proposal said "[Proposal content]"
29
+ - 🎨 Design says "[Specific implementation approach]"
30
+
31
+ ---
32
+
33
+ ## 🤔 Requirements Alignment Check (2-minute read)
34
+
35
+ > Purpose: Confirm the design meets your needs
36
+
37
+ ### Quick Check
38
+
39
+ **In the Proposal phase you chose**:
40
+ - Role: [Role name]
41
+ - Solution: [Solution name]
42
+
43
+ **Changes in the Design phase**:
44
+ - ⚠️ [New issues or constraints discovered]
45
+ - ✅ [Suggested adjustments]
46
+ - ⚠️ Trade-offs: [Explain trade-offs]
47
+
48
+ **Need your confirmation**:
49
+ - [ ] ✅ Agree with adjustments ([reason])
50
+ - [ ] ❌ Disagree, continue with original plan ([reason])
51
+ - [ ] 🤔 I need more information
52
+
53
+ **Default choice**: ✅ Agree with adjustments (auto-approved after 24 hours)
54
+
55
+ ---
56
+
57
+ ## ✅ Approval Process (1 minute)
58
+
59
+ **Current status**:
60
+ - 📝 Status: Pending approval
61
+ - ⏰ Created at: [time]
62
+ - ⏰ Timeout at: [time] (after 24 hours)
63
+
64
+ **If you agree**:
65
+ - [ ] ✅ Approve design, start implementation
66
+
67
+ **If you disagree**:
68
+ - [ ] ❌ Reject design, reason: [reason]
69
+
70
+ **Default choice**: ✅ Approve design (auto-approved after 24 hours)
71
+
72
+ ---
73
+
74
+ ## 📋 Detailed Design (AI reading)
75
+
76
+ ### What (What to do)
77
+
78
+ #### Objective
79
+
80
+ [Describe the design objective]
81
+
82
+ #### Scope
83
+
84
+ [Explain the design scope]
85
+
86
+ ---
87
+
88
+ ### Constraints
89
+
90
+ #### Technical Constraints
91
+
92
+ | Constraint | Description | Impact |
93
+ |------------|-------------|--------|
94
+ | [Constraint1] | [Description] | [Impact] |
95
+
96
+ #### Business Constraints
97
+
98
+ | Constraint | Description | Impact |
99
+ |------------|-------------|--------|
100
+ | [Constraint1] | [Description] | [Impact] |
101
+
102
+ ---
103
+
104
+ ### Architecture
105
+
106
+ #### Component Diagram
107
+
108
+ ```
109
+ [Use Mermaid or text to describe component relationships]
110
+ ```
111
+
112
+ #### Data Flow
113
+
114
+ ```
115
+ [Describe data flow]
116
+ ```
117
+
118
+ #### Interface Design
119
+
120
+ | Interface | Input | Output | Description |
121
+ |-----------|-------|--------|-------------|
122
+ | [Interface1] | [Input] | [Output] | [Description] |
123
+
124
+ ---
125
+
126
+ ### Acceptance Criteria
127
+
128
+ #### AC-001: [Acceptance Criteria Title]
129
+
130
+ **Description**: [One-sentence description]
131
+
132
+ **Acceptance conditions**:
133
+ - [ ] [Condition 1]
134
+ - [ ] [Condition 2]
135
+
136
+ **Testing approach**: [Explain how to test]
137
+
138
+ ---
139
+
140
+ ### Documentation Impact
141
+
142
+ #### Documents to Update
143
+
144
+ | Document | Update Reason | Priority |
145
+ |----------|---------------|----------|
146
+ | [Document1] | [Reason] | P0 |
147
+
148
+ #### Documents Not Requiring Updates
149
+
150
+ - [ ] This change is an internal refactoring and doesn't affect user-visible functionality
151
+ - [ ] This change only fixes bugs and doesn't introduce new features
152
+
153
+ ---
154
+
155
+ ### Architecture Impact
156
+
157
+ #### New Dependencies
158
+
159
+ | Dependency | Version | Purpose | Risk |
160
+ |------------|---------|---------|------|
161
+ | [Dependency1] | [Version] | [Purpose] | [Risk] |
162
+
163
+ #### Modified Modules
164
+
165
+ | Module | Modification Type | Impact Scope |
166
+ |--------|-------------------|--------------|
167
+ | [Module1] | [Add/Modify/Delete] | [Impact scope] |
168
+
169
+ ---
170
+
171
+ ## Approval History
172
+
173
+ | Time | Phase | Action | Actor | Reason |
174
+ |------|-------|--------|-------|--------|
175
+ | [Time] | Design | Created | AI | - |
176
+ | [Time] | Design | Approved | User | [Reason] |
177
+ ```
178
+
179
+ ## Usage Guide
180
+
181
+ ### 1. Purpose of Bottom Line Up Front
182
+
183
+ - **30-second quick understanding**: Let users immediately know the core content of the design
184
+ - **Comparison with Proposal**: Clearly explain the difference between design and proposal
185
+ - **Reduce cognitive load**: Use plain language, avoid technical jargon
186
+
187
+ ### 2. Purpose of Requirements Alignment Check
188
+
189
+ - **Lightweight alignment**: Only requires user confirmation when new issues or constraints are discovered
190
+ - **Quick decision**: In most cases, users only need to confirm "agree" or "disagree"
191
+ - **Retain control**: Users can reject adjustments at any time
192
+
193
+ ### 3. Purpose of Detailed Design
194
+
195
+ - **AI reading**: Provides complete technical details for AI reference
196
+ - **Humans can skip**: Humans only need to read "Bottom Line Up Front" and "Requirements Alignment Check" sections
197
+
198
+ ### 4. Purpose of Acceptance Criteria
199
+
200
+ - **Testable**: Each acceptance criterion should be testable
201
+ - **Traceable**: Acceptance criteria should correspond to Proposal objectives
202
+ - **Verifiable**: Acceptance criteria should clearly explain how to verify