safeword 0.15.5 → 0.15.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "safeword",
3
- "version": "0.15.5",
3
+ "version": "0.15.6",
4
4
  "description": "CLI for setting up and managing safeword development environments",
5
5
  "type": "module",
6
6
  "bin": {
@@ -111,18 +111,73 @@ When user references a ticket, resume work:
111
111
 
112
112
  ---
113
113
 
114
- ## Current Behavior (Iteration 3)
114
+ ## Phase 5: Technical Decomposition
115
+
116
+ **Entry:** Agent enters `decomposition` phase (after scenarios validated)
117
+
118
+ **Analyze scenarios for implementation:**
119
+
120
+ 1. **Identify components** — What parts of the system does each scenario touch?
121
+ - UI components
122
+ - API endpoints
123
+ - Data models
124
+ - Business logic modules
125
+ 2. **Assign test layers** — For each component:
126
+ - Pure logic (no I/O) → unit test
127
+ - API boundaries, database → integration test
128
+ - User flows → E2E test
129
+ 3. **Create task breakdown** — Order by dependencies:
130
+ - Data models first
131
+ - Business logic second
132
+ - API endpoints third
133
+ - UI components fourth
134
+ - E2E tests last (prove everything works)
135
+ 4. **Present to user** — Show components, test layers, task order
136
+
137
+ **Exit:** User approves breakdown → update ticket to `phase: implement`
138
+
139
+ ---
140
+
141
+ ## Phase 6 Entry: TDD Handoff
142
+
143
+ **Entry:** Agent enters `implement` phase
144
+
145
+ **Handoff protocol:**
146
+
147
+ 1. Announce: "Entering implementation. TDD mode for each scenario."
148
+ 2. Invoke `safeword-tdd-enforcing` skill
149
+ 3. TDD skill takes over for RED → GREEN → REFACTOR cycles
150
+
151
+ **For each scenario:**
152
+
153
+ 1. Write E2E test first (from scenario Given/When/Then)
154
+ 2. E2E fails (RED) — expected, nothing implemented yet
155
+ 3. TDD loop builds pieces until E2E passes
156
+ 4. Mark scenario `[x]` when E2E is GREEN
157
+
158
+ **Walking skeleton (first scenario only):**
159
+
160
+ If project has no E2E infrastructure, build skeleton first:
161
+
162
+ - Thinnest possible slice proving architecture works
163
+ - Form → API → response → UI (no real logic)
164
+ - This becomes foundation for all scenarios
165
+
166
+ ---
167
+
168
+ ## Current Behavior (Iteration 4)
115
169
 
116
170
  1. Detect work level (see SAFEWORD.md "Work Level Detection")
117
171
  2. Announce with override hint
118
172
  3. **If ticket exists:** Read phase, resume at appropriate point
119
173
  4. **Phase 3:** Draft scenarios from spec, save to test-definitions
120
174
  5. **Phase 4:** Validate scenarios (atomic, observable, deterministic)
121
- 6. **Update phase** in ticket when transitioning
122
- 7. Delegate to `safeword-tdd-enforcing` for implementation (Phase 6)
123
- 8. **REFACTOR:** Verify against guides before marking iteration complete
175
+ 6. **Phase 5:** Decompose into components, assign test layers, create task breakdown
176
+ 7. **Phase 6 Entry:** Hand off to `safeword-tdd-enforcing` for implementation
177
+ 8. **Update phase** in ticket when transitioning
178
+ 9. **REFACTOR:** Verify against guides before marking iteration complete
124
179
 
125
- Future iterations add: context check, discovery, decomposition.
180
+ Future iterations add: context check, discovery.
126
181
 
127
182
  ---
128
183
 
@@ -112,18 +112,73 @@ When user references a ticket, resume work:
112
112
 
113
113
  ---
114
114
 
115
- ## Current Behavior (Iteration 3)
115
+ ## Phase 5: Technical Decomposition
116
+
117
+ **Entry:** Agent enters `decomposition` phase (after scenarios validated)
118
+
119
+ **Analyze scenarios for implementation:**
120
+
121
+ 1. **Identify components** — What parts of the system does each scenario touch?
122
+ - UI components
123
+ - API endpoints
124
+ - Data models
125
+ - Business logic modules
126
+ 2. **Assign test layers** — For each component:
127
+ - Pure logic (no I/O) → unit test
128
+ - API boundaries, database → integration test
129
+ - User flows → E2E test
130
+ 3. **Create task breakdown** — Order by dependencies:
131
+ - Data models first
132
+ - Business logic second
133
+ - API endpoints third
134
+ - UI components fourth
135
+ - E2E tests last (prove everything works)
136
+ 4. **Present to user** — Show components, test layers, task order
137
+
138
+ **Exit:** User approves breakdown → update ticket to `phase: implement`
139
+
140
+ ---
141
+
142
+ ## Phase 6 Entry: TDD Handoff
143
+
144
+ **Entry:** Agent enters `implement` phase
145
+
146
+ **Handoff protocol:**
147
+
148
+ 1. Announce: "Entering implementation. TDD mode for each scenario."
149
+ 2. Invoke `safeword-tdd-enforcing` skill
150
+ 3. TDD skill takes over for RED → GREEN → REFACTOR cycles
151
+
152
+ **For each scenario:**
153
+
154
+ 1. Write E2E test first (from scenario Given/When/Then)
155
+ 2. E2E fails (RED) — expected, nothing implemented yet
156
+ 3. TDD loop builds pieces until E2E passes
157
+ 4. Mark scenario `[x]` when E2E is GREEN
158
+
159
+ **Walking skeleton (first scenario only):**
160
+
161
+ If project has no E2E infrastructure, build skeleton first:
162
+
163
+ - Thinnest possible slice proving architecture works
164
+ - Form → API → response → UI (no real logic)
165
+ - This becomes foundation for all scenarios
166
+
167
+ ---
168
+
169
+ ## Current Behavior (Iteration 4)
116
170
 
117
171
  1. Detect work level (see SAFEWORD.md "Work Level Detection")
118
172
  2. Announce with override hint
119
173
  3. **If ticket exists:** Read phase, resume at appropriate point
120
174
  4. **Phase 3:** Draft scenarios from spec, save to test-definitions
121
175
  5. **Phase 4:** Validate scenarios (atomic, observable, deterministic)
122
- 6. **Update phase** in ticket when transitioning
123
- 7. Delegate to `safeword-tdd-enforcing` for implementation (Phase 6)
124
- 8. **REFACTOR:** Verify against guides before marking iteration complete
176
+ 6. **Phase 5:** Decompose into components, assign test layers, create task breakdown
177
+ 7. **Phase 6 Entry:** Hand off to `safeword-tdd-enforcing` for implementation
178
+ 8. **Update phase** in ticket when transitioning
179
+ 9. **REFACTOR:** Verify against guides before marking iteration complete
125
180
 
126
- Future iterations add: context check, discovery, decomposition.
181
+ Future iterations add: context check, discovery.
127
182
 
128
183
  ---
129
184