@codemcp/workflows-core 3.6.3 → 4.1.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/dist/instruction-generator.js +4 -0
- package/dist/instruction-generator.js.map +1 -1
- package/dist/project-docs-manager.js +3 -0
- package/dist/project-docs-manager.js.map +1 -1
- package/dist/state-machine-types.d.ts +6 -0
- package/dist/system-prompt-generator.d.ts +0 -3
- package/dist/system-prompt-generator.js +4 -77
- package/dist/system-prompt-generator.js.map +1 -1
- package/dist/transition-engine.d.ts +7 -0
- package/dist/transition-engine.js +12 -8
- package/dist/transition-engine.js.map +1 -1
- package/package.json +4 -3
- package/resources/agents/architect.yaml +61 -0
- package/resources/agents/business-analyst.yaml +60 -0
- package/resources/agents/developer.yaml +61 -0
- package/resources/workflows/adr.yaml +11 -7
- package/resources/workflows/sdd-bugfix-crowd.yaml +633 -0
- package/resources/workflows/sdd-feature-crowd.yaml +736 -0
- package/resources/workflows/sdd-greenfield-crowd.yaml +328 -0
|
@@ -0,0 +1,633 @@
|
|
|
1
|
+
# yaml-language-server: $schema=../../state-machine-schema.json
|
|
2
|
+
---
|
|
3
|
+
name: 'sdd-bugfix-crowd'
|
|
4
|
+
description: 'Collaborative bug fixing: Developer reproduces → Business Analyst specifies → Developer tests & fixes → Team verifies'
|
|
5
|
+
initial_state: 'reproduce'
|
|
6
|
+
|
|
7
|
+
# Enhanced metadata for better discoverability
|
|
8
|
+
metadata:
|
|
9
|
+
domain: 'sdd-crowd'
|
|
10
|
+
complexity: 'medium'
|
|
11
|
+
collaboration: true
|
|
12
|
+
requiredRoles:
|
|
13
|
+
- business-analyst
|
|
14
|
+
- architect
|
|
15
|
+
- developer
|
|
16
|
+
bestFor:
|
|
17
|
+
- 'Team-based systematic bug fixing'
|
|
18
|
+
- 'Multi-agent bug resolution'
|
|
19
|
+
- 'Specification-driven debugging with team collaboration'
|
|
20
|
+
useCases:
|
|
21
|
+
- 'Fix complex bugs with team expertise'
|
|
22
|
+
- 'Resolve issues with comprehensive testing and review'
|
|
23
|
+
examples:
|
|
24
|
+
- 'Team fixes authentication flow bug with full specification'
|
|
25
|
+
- 'Collaborative resolution of data corruption issue'
|
|
26
|
+
|
|
27
|
+
# States with default instructions and role-specific transitions
|
|
28
|
+
states:
|
|
29
|
+
reproduce:
|
|
30
|
+
description: 'Reproduce and understand the bug'
|
|
31
|
+
default_instructions: |
|
|
32
|
+
**Team Collaboration Mode**
|
|
33
|
+
|
|
34
|
+
You are $VIBE_ROLE working in a collaborative team on this bug fix.
|
|
35
|
+
Current phase: REPRODUCE
|
|
36
|
+
|
|
37
|
+
Developer is responsible. Business-analyst and architect are consulted.
|
|
38
|
+
|
|
39
|
+
transitions:
|
|
40
|
+
# Business Analyst is CONSULTED during reproduce phase
|
|
41
|
+
- trigger: 'bug_reproduced'
|
|
42
|
+
to: 'specify'
|
|
43
|
+
role: business-analyst
|
|
44
|
+
transition_reason: 'Bug reproduced, preparing to specify correct behavior'
|
|
45
|
+
additional_instructions: |
|
|
46
|
+
**You are CONSULTED during the reproduce phase.**
|
|
47
|
+
|
|
48
|
+
Developer is investigating the bug. You are in consultative mode.
|
|
49
|
+
|
|
50
|
+
**Your Responsibilities:**
|
|
51
|
+
- Monitor messages for questions about expected behavior
|
|
52
|
+
- Clarify business rules and user expectations
|
|
53
|
+
- Explain the correct functionality from user perspective
|
|
54
|
+
|
|
55
|
+
**Important Constraints:**
|
|
56
|
+
- Do NOT edit the plan file (only developer can in this phase)
|
|
57
|
+
- Do NOT attempt to proceed to next phase
|
|
58
|
+
|
|
59
|
+
**Handoff Notice:**
|
|
60
|
+
- When developer completes reproduce phase, YOU become RESPONSIBLE
|
|
61
|
+
- You will take the lead in the specify phase
|
|
62
|
+
- Prepare to document the correct behavior specification
|
|
63
|
+
|
|
64
|
+
# Architect is CONSULTED during reproduce phase
|
|
65
|
+
- trigger: 'bug_reproduced'
|
|
66
|
+
to: 'specify'
|
|
67
|
+
role: architect
|
|
68
|
+
transition_reason: 'Bug reproduced, transitioning to specification'
|
|
69
|
+
additional_instructions: |
|
|
70
|
+
**You are CONSULTED during the reproduce phase.**
|
|
71
|
+
|
|
72
|
+
Developer is investigating the bug. You are in consultative mode.
|
|
73
|
+
|
|
74
|
+
**Your Responsibilities:**
|
|
75
|
+
- Monitor messages for questions about system design
|
|
76
|
+
- Clarify architectural intent and patterns
|
|
77
|
+
- Explain expected component interactions
|
|
78
|
+
|
|
79
|
+
**Important Constraints:**
|
|
80
|
+
- Do NOT edit the plan file (only developer can)
|
|
81
|
+
- Do NOT attempt to proceed to next phase
|
|
82
|
+
|
|
83
|
+
**How to Help:**
|
|
84
|
+
- Use get_my_messages to check for developer's questions
|
|
85
|
+
- Provide architectural context for the buggy component
|
|
86
|
+
|
|
87
|
+
# Developer is RESPONSIBLE for reproduce phase
|
|
88
|
+
- trigger: 'bug_reproduced'
|
|
89
|
+
to: 'specify'
|
|
90
|
+
role: developer
|
|
91
|
+
transition_reason: 'Bug reproduced successfully, handing off to business-analyst'
|
|
92
|
+
additional_instructions: |
|
|
93
|
+
**You are RESPONSIBLE for the reproduce phase.**
|
|
94
|
+
|
|
95
|
+
You have exclusive control during this phase:
|
|
96
|
+
- Only you can edit the plan file
|
|
97
|
+
- Only you can proceed to the next phase
|
|
98
|
+
|
|
99
|
+
**Bug Reproduction Tasks:**
|
|
100
|
+
|
|
101
|
+
1. **Gather Information**:
|
|
102
|
+
- Exact OS, browser/runtime versions, hardware specs
|
|
103
|
+
- Precise sequence of actions triggering the bug
|
|
104
|
+
- Error messages, logs, stack traces
|
|
105
|
+
- Frequency (always or intermittent?)
|
|
106
|
+
- Business impact
|
|
107
|
+
|
|
108
|
+
2. **Create Reproduction**:
|
|
109
|
+
- Develop minimal, reliable reproduction steps
|
|
110
|
+
- Document exact environment and conditions
|
|
111
|
+
- Create test data/scenarios that trigger the issue
|
|
112
|
+
- Verify bug occurs consistently
|
|
113
|
+
|
|
114
|
+
3. **Understand the Problem**:
|
|
115
|
+
- What is current (buggy) behavior?
|
|
116
|
+
- What should correct behavior be?
|
|
117
|
+
- Symptoms vs. root cause?
|
|
118
|
+
- Related issues or edge cases?
|
|
119
|
+
|
|
120
|
+
4. **Collaborate When Needed:**
|
|
121
|
+
- Use send_message to business-analyst: "What is the expected behavior for [scenario]?"
|
|
122
|
+
- Use send_message to architect: "How should this component interact with [other component]?"
|
|
123
|
+
|
|
124
|
+
**Output**: Create `$VIBE_DIR/specs/$BRANCH_NAME/reproduction.md`
|
|
125
|
+
|
|
126
|
+
**Handoff to Business-Analyst:**
|
|
127
|
+
|
|
128
|
+
Before proceeding to specify phase:
|
|
129
|
+
1. Use send_message to business-analyst: "Bug reproduced successfully. Please take the lead for specify phase to document correct behavior. See: $VIBE_DIR/specs/$BRANCH_NAME/reproduction.md"
|
|
130
|
+
2. Use send_message to architect: "Bug reproduced, business-analyst will specify correct behavior"
|
|
131
|
+
3. Use send_message_to_operator: "Reproduction complete, handing off to business-analyst"
|
|
132
|
+
4. Call proceed_to_phase - you transition to CONSULTED in specify phase
|
|
133
|
+
|
|
134
|
+
# Bug not reproducible loop
|
|
135
|
+
- trigger: 'bug_not_reproducible'
|
|
136
|
+
to: 'reproduce'
|
|
137
|
+
role: developer
|
|
138
|
+
transition_reason: 'Bug could not be reproduced, need more information'
|
|
139
|
+
additional_instructions: |
|
|
140
|
+
Unable to reproduce the bug. Gather more details about environment, conditions, or steps.
|
|
141
|
+
Use send_message_to_operator to request more information from bug reporter.
|
|
142
|
+
|
|
143
|
+
specify:
|
|
144
|
+
description: 'Create specification of correct behavior'
|
|
145
|
+
default_instructions: |
|
|
146
|
+
**Team Collaboration Mode**
|
|
147
|
+
|
|
148
|
+
You are $VIBE_ROLE working in a collaborative team on this bug fix.
|
|
149
|
+
Current phase: SPECIFY
|
|
150
|
+
|
|
151
|
+
Business-analyst is responsible. Developer and architect are consulted.
|
|
152
|
+
|
|
153
|
+
transitions:
|
|
154
|
+
# Business Analyst is RESPONSIBLE for specify phase
|
|
155
|
+
- trigger: 'specification_complete'
|
|
156
|
+
to: 'test'
|
|
157
|
+
role: business-analyst
|
|
158
|
+
transition_reason: 'Bug specification completed, developer will create tests'
|
|
159
|
+
additional_instructions: |
|
|
160
|
+
**You are RESPONSIBLE for the specify phase.**
|
|
161
|
+
|
|
162
|
+
You have exclusive control during this phase:
|
|
163
|
+
- Only you can edit the plan file
|
|
164
|
+
- Only you can proceed to the next phase
|
|
165
|
+
|
|
166
|
+
**Specification Tasks:**
|
|
167
|
+
|
|
168
|
+
1. **Define Correct Behavior**:
|
|
169
|
+
- What should happen in the scenario that currently fails?
|
|
170
|
+
- Expected outcomes for users
|
|
171
|
+
- System behavior in edge cases
|
|
172
|
+
- Business rules to enforce
|
|
173
|
+
|
|
174
|
+
2. **Handle Ambiguities**:
|
|
175
|
+
- Make informed decisions about unclear requirements
|
|
176
|
+
- Use [NEEDS CLARIFICATION: question] only for critical ambiguities (max 3)
|
|
177
|
+
- Prioritize: correctness > user experience > technical details
|
|
178
|
+
|
|
179
|
+
3. **Collaborate:**
|
|
180
|
+
- Use send_message to developer: "Does this specification clearly define the fix?"
|
|
181
|
+
- Use send_message to architect: "Does this align with system design intent?"
|
|
182
|
+
|
|
183
|
+
**Output**: Create `$VIBE_DIR/specs/$BRANCH_NAME/bug-spec.md`
|
|
184
|
+
|
|
185
|
+
**Handoff to Developer:**
|
|
186
|
+
|
|
187
|
+
Before proceeding to test phase:
|
|
188
|
+
1. Use send_message to developer: "Bug specification complete. Please take the lead for test phase to create failing tests. See: $VIBE_DIR/specs/$BRANCH_NAME/bug-spec.md"
|
|
189
|
+
2. Use send_message to architect: "Specification ready, developer will create tests and fix"
|
|
190
|
+
3. Use send_message_to_operator: "Bug spec complete, handing off to developer for testing"
|
|
191
|
+
4. Call proceed_to_phase - you transition to CONSULTED in test phase
|
|
192
|
+
|
|
193
|
+
# Architect is CONSULTED during specify phase
|
|
194
|
+
- trigger: 'specification_complete'
|
|
195
|
+
to: 'test'
|
|
196
|
+
role: architect
|
|
197
|
+
transition_reason: 'Bug specification completed, transitioning to test phase'
|
|
198
|
+
additional_instructions: |
|
|
199
|
+
**You are CONSULTED during the specify phase.**
|
|
200
|
+
|
|
201
|
+
Business-analyst is defining correct behavior. You are in consultative mode.
|
|
202
|
+
|
|
203
|
+
**Your Responsibilities:**
|
|
204
|
+
- Monitor messages for questions about system design intent
|
|
205
|
+
- Clarify how components should interact
|
|
206
|
+
- Validate specification against architectural principles
|
|
207
|
+
|
|
208
|
+
**Important Constraints:**
|
|
209
|
+
- Do NOT edit the plan file (only business-analyst can)
|
|
210
|
+
- Do NOT attempt to proceed to next phase
|
|
211
|
+
|
|
212
|
+
# Developer is CONSULTED during specify phase
|
|
213
|
+
- trigger: 'specification_complete'
|
|
214
|
+
to: 'test'
|
|
215
|
+
role: developer
|
|
216
|
+
transition_reason: 'Bug specification completed, preparing to create tests'
|
|
217
|
+
additional_instructions: |
|
|
218
|
+
**You are CONSULTED during the specify phase.**
|
|
219
|
+
|
|
220
|
+
Business-analyst is defining correct behavior. You are in consultative mode.
|
|
221
|
+
|
|
222
|
+
**Your Responsibilities:**
|
|
223
|
+
- Monitor messages for questions about testability
|
|
224
|
+
- Provide feedback on specification clarity
|
|
225
|
+
- Identify any technical constraints
|
|
226
|
+
|
|
227
|
+
**Important Constraints:**
|
|
228
|
+
- Do NOT edit the plan file (only business-analyst can)
|
|
229
|
+
- Do NOT attempt to proceed to next phase
|
|
230
|
+
|
|
231
|
+
**Handoff Notice:**
|
|
232
|
+
- When business-analyst completes specify phase, YOU become RESPONSIBLE
|
|
233
|
+
- You will take the lead in test phase
|
|
234
|
+
- Prepare to create failing tests that capture the bug
|
|
235
|
+
|
|
236
|
+
test:
|
|
237
|
+
description: 'Create comprehensive tests'
|
|
238
|
+
default_instructions: |
|
|
239
|
+
**Team Collaboration Mode**
|
|
240
|
+
|
|
241
|
+
You are $VIBE_ROLE working in a collaborative team on this bug fix.
|
|
242
|
+
Current phase: TEST
|
|
243
|
+
|
|
244
|
+
Developer is responsible for creating tests.
|
|
245
|
+
|
|
246
|
+
transitions:
|
|
247
|
+
# Business Analyst is CONSULTED during test phase
|
|
248
|
+
- trigger: 'tests_created'
|
|
249
|
+
to: 'plan'
|
|
250
|
+
role: business-analyst
|
|
251
|
+
transition_reason: 'Tests created, architect will plan the fix'
|
|
252
|
+
additional_instructions: |
|
|
253
|
+
**You are CONSULTED during the test phase.**
|
|
254
|
+
|
|
255
|
+
Developer is creating tests. You are in consultative mode.
|
|
256
|
+
|
|
257
|
+
**Your Responsibilities:**
|
|
258
|
+
- Monitor messages for questions about acceptance criteria
|
|
259
|
+
- Validate tests cover all user scenarios from spec
|
|
260
|
+
- Ensure tests verify correct business behavior
|
|
261
|
+
|
|
262
|
+
**Important Constraints:**
|
|
263
|
+
- Do NOT edit the plan file (only developer can)
|
|
264
|
+
- Do NOT attempt to proceed to next phase
|
|
265
|
+
|
|
266
|
+
# Architect is CONSULTED during test phase
|
|
267
|
+
- trigger: 'tests_created'
|
|
268
|
+
to: 'plan'
|
|
269
|
+
role: architect
|
|
270
|
+
transition_reason: 'Tests created, preparing to plan fix approach'
|
|
271
|
+
additional_instructions: |
|
|
272
|
+
**You are CONSULTED during the test phase.**
|
|
273
|
+
|
|
274
|
+
Developer is creating tests. You are in consultative mode.
|
|
275
|
+
|
|
276
|
+
**Your Responsibilities:**
|
|
277
|
+
- Monitor messages for questions about test architecture
|
|
278
|
+
- Provide guidance on integration testing approach
|
|
279
|
+
|
|
280
|
+
**Important Constraints:**
|
|
281
|
+
- Do NOT edit the plan file (only developer can)
|
|
282
|
+
- Do NOT attempt to proceed to next phase
|
|
283
|
+
|
|
284
|
+
**Handoff Notice:**
|
|
285
|
+
- When developer completes test phase, YOU become RESPONSIBLE
|
|
286
|
+
- You will take the lead in plan phase
|
|
287
|
+
- Prepare to design the fix approach
|
|
288
|
+
|
|
289
|
+
# Developer is RESPONSIBLE for test phase
|
|
290
|
+
- trigger: 'tests_created'
|
|
291
|
+
to: 'plan'
|
|
292
|
+
role: developer
|
|
293
|
+
transition_reason: 'Tests created, handing off to architect for fix planning'
|
|
294
|
+
additional_instructions: |
|
|
295
|
+
**You are RESPONSIBLE for the test phase.**
|
|
296
|
+
|
|
297
|
+
You have exclusive control during this phase:
|
|
298
|
+
- Only you can edit the plan file
|
|
299
|
+
- Only you can proceed to the next phase
|
|
300
|
+
|
|
301
|
+
**Test Creation Tasks:**
|
|
302
|
+
|
|
303
|
+
1. **Failing Tests for Current Bug**:
|
|
304
|
+
- Create tests demonstrating current buggy behavior
|
|
305
|
+
- These should fail initially (Red phase of TDD)
|
|
306
|
+
- Cover main reproduction case and related scenarios
|
|
307
|
+
- Include edge cases and boundary conditions
|
|
308
|
+
|
|
309
|
+
2. **Tests for Expected Behavior**:
|
|
310
|
+
- Create tests specifying correct behavior from bug-spec.md
|
|
311
|
+
- These should pass once bug is fixed
|
|
312
|
+
- Cover all functional requirements
|
|
313
|
+
- Include user scenarios and success criteria
|
|
314
|
+
|
|
315
|
+
3. **Regression Tests**:
|
|
316
|
+
- Tests for related functionality that shouldn't be affected
|
|
317
|
+
- Ensure fix doesn't break existing features
|
|
318
|
+
|
|
319
|
+
4. **Collaborate:**
|
|
320
|
+
- Use send_message to business-analyst: "Do these tests cover all scenarios from the spec?"
|
|
321
|
+
- Use send_message to architect: "Is the test architecture appropriate?"
|
|
322
|
+
|
|
323
|
+
**Handoff to Architect:**
|
|
324
|
+
|
|
325
|
+
Before proceeding to plan phase:
|
|
326
|
+
1. Use send_message to architect: "Tests created and failing as expected. Please take the lead for plan phase to design the fix approach."
|
|
327
|
+
2. Use send_message to business-analyst: "Tests ready, architect will plan the fix"
|
|
328
|
+
3. Use send_message_to_operator: "Tests complete, handing off to architect for fix planning"
|
|
329
|
+
4. Call proceed_to_phase - you transition to CONSULTED in plan phase
|
|
330
|
+
|
|
331
|
+
plan:
|
|
332
|
+
description: 'Plan the fix approach'
|
|
333
|
+
default_instructions: |
|
|
334
|
+
**Team Collaboration Mode**
|
|
335
|
+
|
|
336
|
+
You are $VIBE_ROLE working in a collaborative team on this bug fix.
|
|
337
|
+
Current phase: PLAN
|
|
338
|
+
|
|
339
|
+
Architect is responsible. Business-analyst and developer are consulted.
|
|
340
|
+
|
|
341
|
+
transitions:
|
|
342
|
+
# Business Analyst is CONSULTED during plan phase
|
|
343
|
+
- trigger: 'plan_complete'
|
|
344
|
+
to: 'fix'
|
|
345
|
+
role: business-analyst
|
|
346
|
+
transition_reason: 'Fix plan complete, developer will implement'
|
|
347
|
+
additional_instructions: |
|
|
348
|
+
**You are CONSULTED during the plan phase.**
|
|
349
|
+
|
|
350
|
+
Architect is designing the fix approach. You are in consultative mode.
|
|
351
|
+
|
|
352
|
+
**Your Responsibilities:**
|
|
353
|
+
- Monitor messages for questions about business rules
|
|
354
|
+
- Validate fix approach addresses the root problem
|
|
355
|
+
- Ensure fix aligns with user expectations
|
|
356
|
+
|
|
357
|
+
**Important Constraints:**
|
|
358
|
+
- Do NOT edit the plan file (only architect can)
|
|
359
|
+
- Do NOT attempt to proceed to next phase
|
|
360
|
+
|
|
361
|
+
# Architect is RESPONSIBLE for plan phase
|
|
362
|
+
- trigger: 'plan_complete'
|
|
363
|
+
to: 'fix'
|
|
364
|
+
role: architect
|
|
365
|
+
transition_reason: 'Fix plan completed, handing off to developer'
|
|
366
|
+
additional_instructions: |
|
|
367
|
+
**You are RESPONSIBLE for the plan phase.**
|
|
368
|
+
|
|
369
|
+
You have exclusive control during this phase:
|
|
370
|
+
- Only you can edit the plan file
|
|
371
|
+
- Only you can proceed to the next phase
|
|
372
|
+
|
|
373
|
+
**Fix Planning Tasks:**
|
|
374
|
+
|
|
375
|
+
1. **Load Context**:
|
|
376
|
+
- Read bug spec: `$VIBE_DIR/specs/$BRANCH_NAME/bug-spec.md`
|
|
377
|
+
- Review reproduction: `$VIBE_DIR/specs/$BRANCH_NAME/reproduction.md`
|
|
378
|
+
- Understand test requirements
|
|
379
|
+
- Analyze existing codebase
|
|
380
|
+
|
|
381
|
+
2. **Root Cause Analysis**:
|
|
382
|
+
- Identify underlying cause of the bug
|
|
383
|
+
- Understand why current implementation fails
|
|
384
|
+
- Map problem to specific code areas or logic flaws
|
|
385
|
+
|
|
386
|
+
3. **Fix Strategy**:
|
|
387
|
+
- Design minimal, targeted fix addressing root cause
|
|
388
|
+
- Ensure fix aligns with existing architecture patterns
|
|
389
|
+
- Consider impact on related functionality
|
|
390
|
+
- Plan for backward compatibility if needed
|
|
391
|
+
|
|
392
|
+
4. **Collaborate:**
|
|
393
|
+
- Use send_message to business-analyst: "Does this fix approach meet business needs?"
|
|
394
|
+
- Use send_message to developer: "Is this fix approach implementable?"
|
|
395
|
+
- Incorporate their feedback
|
|
396
|
+
|
|
397
|
+
**Output**: Create `$VIBE_DIR/specs/$BRANCH_NAME/fix-plan.md`
|
|
398
|
+
|
|
399
|
+
**Handoff to Developer:**
|
|
400
|
+
|
|
401
|
+
Before proceeding to fix phase:
|
|
402
|
+
1. Use send_message to developer: "Fix plan complete. Please take the lead for fix phase. See: $VIBE_DIR/specs/$BRANCH_NAME/fix-plan.md"
|
|
403
|
+
2. Use send_message to business-analyst: "Plan ready, developer will implement fix"
|
|
404
|
+
3. Use send_message_to_operator: "Fix plan complete, handing off to developer"
|
|
405
|
+
4. Call proceed_to_phase - you transition to CONSULTED in fix phase
|
|
406
|
+
|
|
407
|
+
# Developer is CONSULTED during plan phase
|
|
408
|
+
- trigger: 'plan_complete'
|
|
409
|
+
to: 'fix'
|
|
410
|
+
role: developer
|
|
411
|
+
transition_reason: 'Fix plan completed, preparing to implement'
|
|
412
|
+
additional_instructions: |
|
|
413
|
+
**You are CONSULTED during the plan phase.**
|
|
414
|
+
|
|
415
|
+
Architect is designing fix approach. You are in consultative mode.
|
|
416
|
+
|
|
417
|
+
**Your Responsibilities:**
|
|
418
|
+
- Monitor messages for questions about implementation
|
|
419
|
+
- Provide feedback on:
|
|
420
|
+
* Fix implementability and complexity
|
|
421
|
+
* Potential implementation challenges
|
|
422
|
+
* Testing approach
|
|
423
|
+
|
|
424
|
+
**Important Constraints:**
|
|
425
|
+
- Do NOT edit the plan file (only architect can)
|
|
426
|
+
- Do NOT attempt to proceed to next phase
|
|
427
|
+
|
|
428
|
+
**Handoff Notice:**
|
|
429
|
+
- When architect completes plan phase, YOU become RESPONSIBLE
|
|
430
|
+
- You will take the lead in fix phase
|
|
431
|
+
- Prepare to implement the minimal fix
|
|
432
|
+
|
|
433
|
+
fix:
|
|
434
|
+
description: 'Implement the fix to make tests pass'
|
|
435
|
+
default_instructions: |
|
|
436
|
+
**Team Collaboration Mode**
|
|
437
|
+
|
|
438
|
+
You are $VIBE_ROLE working in a collaborative team on this bug fix.
|
|
439
|
+
Current phase: FIX
|
|
440
|
+
|
|
441
|
+
Developer is responsible. Architect and business-analyst are consulted.
|
|
442
|
+
|
|
443
|
+
transitions:
|
|
444
|
+
# Business Analyst is CONSULTED during fix phase
|
|
445
|
+
- trigger: 'fix_implemented'
|
|
446
|
+
to: 'verify'
|
|
447
|
+
role: business-analyst
|
|
448
|
+
transition_reason: 'Fix implemented, team will verify'
|
|
449
|
+
additional_instructions: |
|
|
450
|
+
**You are CONSULTED during the fix phase.**
|
|
451
|
+
|
|
452
|
+
Developer is implementing the fix. You are in consultative mode.
|
|
453
|
+
|
|
454
|
+
**Your Responsibilities:**
|
|
455
|
+
- Monitor messages for requirements clarifications
|
|
456
|
+
- Validate fix approach meets business needs
|
|
457
|
+
- Approve acceptance criteria when asked
|
|
458
|
+
|
|
459
|
+
**Important Constraints:**
|
|
460
|
+
- Do NOT edit the plan file (only developer can)
|
|
461
|
+
- Do NOT attempt to proceed to next phase
|
|
462
|
+
|
|
463
|
+
# Architect is CONSULTED during fix phase
|
|
464
|
+
- trigger: 'fix_implemented'
|
|
465
|
+
to: 'verify'
|
|
466
|
+
role: architect
|
|
467
|
+
transition_reason: 'Fix implemented, team will verify'
|
|
468
|
+
additional_instructions: |
|
|
469
|
+
**You are CONSULTED during the fix phase.**
|
|
470
|
+
|
|
471
|
+
Developer is implementing the fix. You are in consultative mode.
|
|
472
|
+
|
|
473
|
+
**Your Responsibilities:**
|
|
474
|
+
- Monitor messages for architecture questions
|
|
475
|
+
- Provide guidance on:
|
|
476
|
+
* Design patterns and best practices
|
|
477
|
+
* Integration approaches
|
|
478
|
+
* Technical trade-offs
|
|
479
|
+
|
|
480
|
+
**Important Constraints:**
|
|
481
|
+
- Do NOT edit the plan file (only developer can)
|
|
482
|
+
- Do NOT attempt to proceed to next phase
|
|
483
|
+
|
|
484
|
+
# Developer is RESPONSIBLE for fix phase
|
|
485
|
+
- trigger: 'fix_implemented'
|
|
486
|
+
to: 'verify'
|
|
487
|
+
role: developer
|
|
488
|
+
transition_reason: 'Fix implemented and tests passing, ready for verification'
|
|
489
|
+
additional_instructions: |
|
|
490
|
+
**You are RESPONSIBLE for the fix phase.**
|
|
491
|
+
|
|
492
|
+
You have exclusive control during this phase:
|
|
493
|
+
- Only you can edit the plan file
|
|
494
|
+
- Only you can proceed to the next phase
|
|
495
|
+
|
|
496
|
+
**Fix Implementation Tasks:**
|
|
497
|
+
|
|
498
|
+
1. **Follow the Plan**: Execute fix strategy from `$VIBE_DIR/specs/$BRANCH_NAME/fix-plan.md`
|
|
499
|
+
- Make targeted changes to address root cause
|
|
500
|
+
- Avoid over-engineering
|
|
501
|
+
- Keep changes minimal and focused
|
|
502
|
+
|
|
503
|
+
2. **Test-Driven Implementation**:
|
|
504
|
+
- Run failing tests to confirm they capture the bug
|
|
505
|
+
- Implement changes to make tests pass (Green phase)
|
|
506
|
+
- Ensure all tests pass
|
|
507
|
+
|
|
508
|
+
3. **Collaborate When Blocked:**
|
|
509
|
+
- Use send_message to architect: "How should I handle [technical issue]?"
|
|
510
|
+
- Use send_message to business-analyst: "What is correct behavior for [edge case]?"
|
|
511
|
+
|
|
512
|
+
4. **Validation:**
|
|
513
|
+
- Verify original reproduction case no longer occurs
|
|
514
|
+
- Run full test suite to check for regressions
|
|
515
|
+
- Test edge cases and boundary conditions
|
|
516
|
+
|
|
517
|
+
**You remain RESPONSIBLE in verify phase** (continue driving to completion)
|
|
518
|
+
|
|
519
|
+
**Before proceeding:**
|
|
520
|
+
1. Use send_message_to_operator: "Fix implemented and tests passing, moving to verification"
|
|
521
|
+
2. Only you can call proceed_to_phase
|
|
522
|
+
|
|
523
|
+
verify:
|
|
524
|
+
description: 'Verify the fix works and no regressions'
|
|
525
|
+
default_instructions: |
|
|
526
|
+
**Team Collaboration Mode**
|
|
527
|
+
|
|
528
|
+
You are $VIBE_ROLE working in a collaborative team on this bug fix.
|
|
529
|
+
Current phase: VERIFY
|
|
530
|
+
|
|
531
|
+
Developer is responsible. Team validates together.
|
|
532
|
+
|
|
533
|
+
transitions:
|
|
534
|
+
# Business Analyst is CONSULTED during verify phase
|
|
535
|
+
- trigger: 'verification_complete'
|
|
536
|
+
to: 'verify'
|
|
537
|
+
role: business-analyst
|
|
538
|
+
transition_reason: 'Verification complete, bug fixed'
|
|
539
|
+
additional_instructions: |
|
|
540
|
+
**You are CONSULTED during the verify phase.**
|
|
541
|
+
|
|
542
|
+
Developer is verifying the fix. You are in consultative mode.
|
|
543
|
+
|
|
544
|
+
**Your Responsibilities:**
|
|
545
|
+
- Monitor messages for validation requests
|
|
546
|
+
- Perform user acceptance validation:
|
|
547
|
+
* Does fix address original user problem?
|
|
548
|
+
* Are all scenarios from spec working?
|
|
549
|
+
* Is user experience improved?
|
|
550
|
+
|
|
551
|
+
**How to Help:**
|
|
552
|
+
- Use get_my_messages to check for verification requests
|
|
553
|
+
- Use send_message to confirm fix meets business needs
|
|
554
|
+
- Raise concerns if fix doesn't fully address the problem
|
|
555
|
+
|
|
556
|
+
# Architect is CONSULTED during verify phase
|
|
557
|
+
- trigger: 'verification_complete'
|
|
558
|
+
to: 'verify'
|
|
559
|
+
role: architect
|
|
560
|
+
transition_reason: 'Verification complete, bug fixed'
|
|
561
|
+
additional_instructions: |
|
|
562
|
+
**You are CONSULTED during the verify phase.**
|
|
563
|
+
|
|
564
|
+
Developer is verifying the fix. You are in consultative mode.
|
|
565
|
+
|
|
566
|
+
**Your Responsibilities:**
|
|
567
|
+
- Monitor messages for architecture validation requests
|
|
568
|
+
- Review fix maintains architectural integrity
|
|
569
|
+
- Ensure no technical debt introduced
|
|
570
|
+
|
|
571
|
+
**How to Help:**
|
|
572
|
+
- Use get_my_messages to check for verification requests
|
|
573
|
+
- Use send_message to approve architectural soundness
|
|
574
|
+
- Suggest improvements if fix introduces issues
|
|
575
|
+
|
|
576
|
+
# Developer is RESPONSIBLE for verify phase
|
|
577
|
+
- trigger: 'verification_complete'
|
|
578
|
+
to: 'verify'
|
|
579
|
+
role: developer
|
|
580
|
+
transition_reason: 'Verification complete, bug fix ready for deployment'
|
|
581
|
+
additional_instructions: |
|
|
582
|
+
**You are RESPONSIBLE for the verify phase.**
|
|
583
|
+
|
|
584
|
+
You have exclusive control during this phase:
|
|
585
|
+
- Only you can edit the plan file
|
|
586
|
+
- Only you can mark verification complete
|
|
587
|
+
|
|
588
|
+
**Verification Tasks:**
|
|
589
|
+
|
|
590
|
+
1. **Bug Resolution Verification**:
|
|
591
|
+
- Confirm original reproduction case no longer occurs
|
|
592
|
+
- Verify all scenarios from bug-spec.md work correctly
|
|
593
|
+
- Test in original environment where bug was reported
|
|
594
|
+
- Validate success criteria are met
|
|
595
|
+
|
|
596
|
+
2. **Regression Testing**:
|
|
597
|
+
- Run full test suite
|
|
598
|
+
- Test related features and integration points
|
|
599
|
+
- Verify performance hasn't degraded
|
|
600
|
+
- Check for new edge case failures
|
|
601
|
+
|
|
602
|
+
3. **Team Validation:**
|
|
603
|
+
- Use send_message to business-analyst: "Please perform user acceptance validation"
|
|
604
|
+
- Use send_message to architect: "Please review architectural integrity"
|
|
605
|
+
- Wait for their approval
|
|
606
|
+
|
|
607
|
+
4. **Final Steps:**
|
|
608
|
+
- Update relevant documentation if behavior changed
|
|
609
|
+
- Document fix approach for future reference
|
|
610
|
+
- Use send_message_to_operator: "Bug fix verified and approved by team, ready for deployment"
|
|
611
|
+
|
|
612
|
+
This is a terminal state - bug fix is complete.
|
|
613
|
+
|
|
614
|
+
# Regression detected - return to fix
|
|
615
|
+
- trigger: 'regression_detected'
|
|
616
|
+
to: 'fix'
|
|
617
|
+
role: developer
|
|
618
|
+
transition_reason: 'Regression detected, need to revise fix'
|
|
619
|
+
additional_instructions: |
|
|
620
|
+
Regression detected during verification. Fix has introduced new issues.
|
|
621
|
+
|
|
622
|
+
1. Use send_message to architect: "Regression detected: [explain]. Need help revising fix."
|
|
623
|
+
2. Use send_message to business-analyst: "Regression found, working on resolution"
|
|
624
|
+
3. Use send_message_to_operator: "Regression detected, revising fix"
|
|
625
|
+
4. Call proceed_to_phase to return to fix phase
|
|
626
|
+
|
|
627
|
+
# Global transitions
|
|
628
|
+
global_transitions:
|
|
629
|
+
- trigger: 'abandon_bugfix'
|
|
630
|
+
to: 'reproduce'
|
|
631
|
+
transition_reason: 'Bug fix abandoned, restart from beginning'
|
|
632
|
+
additional_instructions: |
|
|
633
|
+
Bug fix abandoned. If you want to restart, begin again with reproducing and understanding the bug.
|