@codemcp/workflows-core 5.2.2 → 5.2.3

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.
@@ -27,35 +27,33 @@ states:
27
27
  reproduce:
28
28
  description: 'Reproduce and understand the bug systematically'
29
29
  default_instructions: |
30
- You are systematically reproducing and understanding the bug to create a solid foundation for specification-driven fixing.
31
-
32
- **Bug Reproduction Process:**
33
-
34
- 1. **Gather Comprehensive Information**:
35
- - What are the exact OS, browser/runtime versions, and hardware specs?
36
- - What is the precise sequence of actions that trigger the bug?
37
- - What error messages, logs, or stack traces are available?
38
- - Does this happen every time or intermittently?
39
- - How many users are affected and what is the business impact?
40
-
41
- 2. **Create Reproduction Cases**:
42
- - Develop minimal, reliable reproduction steps
43
- - Document the exact environment and conditions
44
- - Create test data or scenarios that trigger the issue
45
- - Verify the bug occurs consistently
46
-
47
- 3. **Understand the Problem**:
48
- - What is the current (buggy) behavior?
49
- - What should the correct behavior be?
50
- - What are the symptoms vs. root cause?
51
- - Are there related issues or edge cases?
52
-
53
- 4. **Document Findings**:
54
- - Create `$VIBE_DIR/specs/$BRANCH_NAME/reproduction.md` with detailed reproduction steps
55
- - Include error logs, screenshots, or other evidence
56
- - Document the gap between expected and actual behavior
57
-
58
- **Output**: Clear, reliable reproduction case that can be used to verify the fix later.
30
+ **Systematically reproduce and understand the bug** to create a solid foundation for specification-driven fixing.
31
+
32
+ **STEP 1: Gather Comprehensive Information**
33
+ - Identify exact OS, browser/runtime versions, and hardware specs
34
+ - Document the precise sequence of actions that trigger the bug
35
+ - Collect error messages, logs, or stack traces
36
+ - Determine if bug occurs consistently or intermittently
37
+ - Assess how many users are affected and the business impact
38
+
39
+ **STEP 2: Create Reproduction Cases**
40
+ - Develop minimal, reliable reproduction steps
41
+ - Document the exact environment and conditions
42
+ - Create test data or scenarios that trigger the issue
43
+ - Verify the bug occurs consistently
44
+
45
+ **STEP 3: Understand the Problem**
46
+ - Clarify current (buggy) behavior
47
+ - Specify correct behavior that should occur
48
+ - Distinguish symptoms from root cause
49
+ - Identify related issues or edge cases
50
+
51
+ **STEP 4: Document Findings**
52
+ - Create `$VIBE_DIR/specs/$BRANCH_NAME/reproduction.md` with detailed reproduction steps
53
+ - Include error logs, screenshots, or other evidence
54
+ - Document the gap between expected and actual behavior
55
+
56
+ **Output**: Clear, reliable reproduction case to verify the fix later.
59
57
 
60
58
  transitions:
61
59
  - trigger: 'bug_reproduced'
@@ -65,35 +63,34 @@ states:
65
63
  - trigger: 'bug_not_reproducible'
66
64
  to: 'reproduce'
67
65
  instructions: >
68
- Unable to reproduce the bug with current information. Gather more details about the environment,
69
- conditions, or steps that might be missing. Contact the reporter for additional information if needed.
66
+ Gather more details about the environment, conditions, or steps that might be missing from the current information.
67
+ Contact the reporter for additional information if needed.
70
68
  transition_reason: 'Bug could not be reproduced, need more information'
71
69
 
72
70
  specify:
73
71
  description: 'Create specification of correct behavior'
74
72
  default_instructions: |
75
- You are creating a clear specification of the correct behavior. This specification will guide the fix and prevent regressions.
76
-
77
- **Specification Process:**
78
-
79
- 1. **Define Correct Behavior**:
80
- - What should happen in the scenario that currently fails?
81
- - What are the expected outcomes for users?
82
- - How should the system behave in edge cases?
83
- - What are the business rules that should be enforced?
84
-
85
- 2. **Handle Ambiguities**:
86
- - Make informed decisions about unclear requirements
87
- - Use [NEEDS CLARIFICATION: question] only for critical ambiguities (max 3)
88
- - Prioritize: correctness > user experience > technical details
89
-
90
- 3. **Quality Standards**:
91
- - Focus on user impact and business value
92
- - Avoid implementation details
93
- - Ensure all requirements are testable
94
- - Make success criteria measurable
95
-
96
- Create `$VIBE_DIR/specs/$BRANCH_NAME/bug-spec.md` using the template provided below.
73
+ **Create a clear specification of the correct behavior** to guide the fix and prevent regressions.
74
+
75
+ **STEP 1: Define Correct Behavior**
76
+ - Describe what should happen in the scenario that currently fails
77
+ - Specify expected outcomes for users
78
+ - Clarify system behavior in edge cases
79
+ - Document business rules that should be enforced
80
+
81
+ **STEP 2: Handle Ambiguities**
82
+ - Make informed decisions about unclear requirements
83
+ - Use `[NEEDS CLARIFICATION: question]` only for critical ambiguities (max 3)
84
+ - Prioritize: correctness > user experience > technical details
85
+
86
+ **STEP 3: Ensure Quality Standards**
87
+ - Focus on user impact and business value
88
+ - Avoid implementation details
89
+ - Ensure all requirements are testable
90
+ - Make success criteria measurable
91
+
92
+ **STEP 4: Document Specification**
93
+ - Create `$VIBE_DIR/specs/$BRANCH_NAME/bug-spec.md` using the template provided below
97
94
  additional_instructions: |
98
95
  **Bug Specification Template:**
99
96
 
@@ -185,41 +182,39 @@ states:
185
182
  - trigger: 'needs_clarification'
186
183
  to: 'specify'
187
184
  instructions: >
188
- Bug specification has unresolved clarifications. Present structured questions to stakeholders,
189
- wait for their responses, then update the specification accordingly.
185
+ Present structured questions to stakeholders about unresolved clarifications in the bug specification.
186
+ Wait for their responses, then update the specification accordingly.
190
187
  transition_reason: 'Bug specification needs clarification before proceeding'
191
188
 
192
189
  test:
193
190
  description: 'Create comprehensive tests that capture the bug and expected behavior'
194
191
  default_instructions: |
195
- You are creating comprehensive tests that capture both the current bug and the expected correct behavior. These tests will guide the fix and prevent regressions.
196
-
197
- **Test Creation Process:**
192
+ **Create comprehensive tests** that capture both the current bug and the expected correct behavior to guide the fix and prevent regressions.
198
193
 
199
- 1. **Failing Tests for Current Bug**:
200
- - Create tests that demonstrate the current buggy behavior
201
- - These tests should fail initially (Red phase of TDD)
202
- - Cover the main reproduction case and related scenarios
203
- - Include edge cases and boundary conditions
194
+ **STEP 1: Create Failing Tests for Current Bug**
195
+ - Write tests that demonstrate the current buggy behavior
196
+ - These tests should fail initially (Red phase of TDD)
197
+ - Cover the main reproduction case and related scenarios
198
+ - Include edge cases and boundary conditions
204
199
 
205
- 2. **Tests for Expected Behavior**:
206
- - Create tests that specify the correct behavior from `$VIBE_DIR/specs/$BRANCH_NAME/bug-spec.md`
207
- - These tests should pass once the bug is fixed
208
- - Cover all functional requirements from the specification
209
- - Include user scenarios and success criteria
200
+ **STEP 2: Create Tests for Expected Behavior**
201
+ - Write tests that specify the correct behavior from `$VIBE_DIR/specs/$BRANCH_NAME/bug-spec.md`
202
+ - These tests should pass once the bug is fixed
203
+ - Cover all functional requirements from the specification
204
+ - Include user scenarios and success criteria
210
205
 
211
- 3. **Regression Tests**:
212
- - Create tests for related functionality that should not be affected
213
- - Ensure the fix doesn't break existing features
214
- - Test integration points and dependencies
206
+ **STEP 3: Create Regression Tests**
207
+ - Write tests for related functionality that should not be affected
208
+ - Ensure the fix doesn't break existing features
209
+ - Test integration points and dependencies
215
210
 
216
- 4. **Test Organization**:
217
- - Group tests by functionality and user scenarios
218
- - Use clear, descriptive test names
219
- - Include both unit and integration tests as appropriate
220
- - Document test setup and data requirements
211
+ **STEP 4: Organize Test Suite**
212
+ - Group tests by functionality and user scenarios
213
+ - Use clear, descriptive test names
214
+ - Include both unit and integration tests as appropriate
215
+ - Document test setup and data requirements
221
216
 
222
- **Output**: Create comprehensive test suite in appropriate test files that will guide the fix implementation.
217
+ **Output**: Comprehensive test suite in appropriate test files to guide the fix implementation.
223
218
 
224
219
  transitions:
225
220
  - trigger: 'tests_created'
@@ -229,39 +224,37 @@ states:
229
224
  plan:
230
225
  description: 'Plan the fix approach with constitutional compliance'
231
226
  default_instructions: |
232
- You are planning the fix approach, ensuring the solution aligns with system architecture and quality principles.
233
-
234
- **Fix Planning Process:**
235
-
236
- 1. **Load Context**:
237
- - Read bug specification (`$VIBE_DIR/specs/$BRANCH_NAME/bug-spec.md`)
238
- - Review reproduction case (`$VIBE_DIR/specs/$BRANCH_NAME/reproduction.md`)
239
- - Understand the test requirements
240
- - Analyze existing codebase and architecture
241
-
242
- 2. **Root Cause Analysis**:
243
- - Identify the underlying cause of the bug
244
- - Understand why the current implementation fails
245
- - Map the problem to specific code areas or logic flaws
246
- - Consider systemic issues vs. isolated bugs
247
-
248
- 3. **Fix Strategy**:
249
- - Design minimal, targeted fix that addresses root cause
250
- - Ensure fix aligns with existing architectural patterns
251
- - Consider impact on related functionality
252
- - Plan for backward compatibility if needed
253
-
254
- 4. **Constitutional/Quality Compliance**:
255
- - Ensure fix follows system design principles
256
- - Verify approach maintains code quality standards
257
- - Check that fix doesn't introduce technical debt
258
- - Validate solution is maintainable and testable
259
-
260
- 5. **Implementation Plan**:
261
- - Break down fix into specific, actionable tasks
262
- - Identify files and components that need changes
263
- - Plan testing and validation approach
264
- - Consider rollout and deployment strategy
227
+ **Plan the fix approach** to ensure the solution aligns with system architecture and quality principles.
228
+
229
+ **STEP 1: Load Context**
230
+ - Read bug specification from `$VIBE_DIR/specs/$BRANCH_NAME/bug-spec.md`
231
+ - Review reproduction case from `$VIBE_DIR/specs/$BRANCH_NAME/reproduction.md`
232
+ - Understand the test requirements
233
+ - Analyze existing codebase and architecture
234
+
235
+ **STEP 2: Perform Root Cause Analysis**
236
+ - Identify the underlying cause of the bug
237
+ - Understand why the current implementation fails
238
+ - Map the problem to specific code areas or logic flaws
239
+ - Consider systemic issues vs. isolated bugs
240
+
241
+ **STEP 3: Design Fix Strategy**
242
+ - Design minimal, targeted fix that addresses root cause
243
+ - Ensure fix aligns with existing architectural patterns
244
+ - Consider impact on related functionality
245
+ - Plan for backward compatibility if needed
246
+
247
+ **STEP 4: Verify Constitutional/Quality Compliance**
248
+ - Ensure fix follows system design principles
249
+ - Verify approach maintains code quality standards
250
+ - Check that fix doesn't introduce technical debt
251
+ - Validate solution is maintainable and testable
252
+
253
+ **STEP 5: Create Implementation Plan**
254
+ - Break down fix into specific, actionable tasks
255
+ - Identify files and components that need changes
256
+ - Plan testing and validation approach
257
+ - Consider rollout and deployment strategy
265
258
 
266
259
  **Output**: Create `$VIBE_DIR/specs/$BRANCH_NAME/fix-plan.md` with detailed approach for implementing the bug fix.
267
260
 
@@ -273,40 +266,39 @@ states:
273
266
  - trigger: 'architectural_conflict'
274
267
  to: 'plan'
275
268
  instructions: >
276
- Planned fix conflicts with system architecture or quality principles.
277
- Revise the approach to ensure proper integration and maintainability.
269
+ Revise the approach to address conflicts with system architecture or quality principles.
270
+ Ensure proper integration and maintainability of the planned fix.
278
271
  transition_reason: 'Fix plan conflicts with architecture, needs revision'
279
272
 
280
273
  fix:
281
274
  description: 'Implement the minimal fix to make tests pass'
282
275
  default_instructions: |
283
- You are implementing the bug fix following the plan and making the tests pass. Focus on minimal, targeted changes that address the root cause.
284
-
285
- **Fix Implementation Process:**
286
-
287
- 1. **Follow the Plan**: Execute the fix strategy from `$VIBE_DIR/specs/$BRANCH_NAME/fix-plan.md`
288
- - Make targeted changes to address the root cause
289
- - Avoid over-engineering or unnecessary modifications
290
- - Keep changes minimal and focused
291
-
292
- 2. **Test-Driven Implementation**:
293
- - Run the failing tests to confirm they capture the bug
294
- - Implement changes to make the tests pass (Green phase)
295
- - Ensure all new tests pass while maintaining existing functionality
296
-
297
- 3. **Quality Standards**:
298
- - Follow existing code patterns and conventions
299
- - Maintain or improve code readability
300
- - Add appropriate error handling
301
- - Include necessary logging or monitoring
302
-
303
- 4. **Validation**:
304
- - Verify the original reproduction case no longer occurs
305
- - Run full test suite to check for regressions
306
- - Test edge cases and boundary conditions
307
- - Validate fix meets success criteria from specification
308
-
309
- **Progress Tracking**:
276
+ **Implement the bug fix** following the plan and making the tests pass with minimal, targeted changes.
277
+
278
+ **STEP 1: Execute Fix Strategy**
279
+ - Follow the fix strategy from `$VIBE_DIR/specs/$BRANCH_NAME/fix-plan.md`
280
+ - Make targeted changes to address the root cause
281
+ - Avoid over-engineering or unnecessary modifications
282
+ - Keep changes minimal and focused
283
+
284
+ **STEP 2: Apply Test-Driven Implementation**
285
+ - Run the failing tests to confirm they capture the bug
286
+ - Implement changes to make the tests pass (Green phase)
287
+ - Ensure all new tests pass while maintaining existing functionality
288
+
289
+ **STEP 3: Maintain Quality Standards**
290
+ - Follow existing code patterns and conventions
291
+ - Maintain or improve code readability
292
+ - Add appropriate error handling
293
+ - Include necessary logging or monitoring
294
+
295
+ **STEP 4: Validate Implementation**
296
+ - Verify the original reproduction case no longer occurs
297
+ - Run full test suite to check for regressions
298
+ - Test edge cases and boundary conditions
299
+ - Validate fix meets success criteria from specification
300
+
301
+ **STEP 5: Track Progress**
310
302
  - Document any deviations from the original plan
311
303
  - Note any additional issues discovered during implementation
312
304
  - Update tests if new edge cases are found
@@ -319,49 +311,47 @@ states:
319
311
  - trigger: 'fix_blocked'
320
312
  to: 'plan'
321
313
  instructions: >
322
- Fix implementation is blocked by technical issues or complexity.
323
314
  Return to planning to revise the approach or break down the problem further.
315
+ Fix implementation is blocked by technical issues or complexity that need to be resolved.
324
316
  transition_reason: 'Fix implementation blocked, need to revise plan'
325
317
 
326
318
  - trigger: 'tests_failing'
327
319
  to: 'test'
328
320
  instructions: >
329
- Tests are failing in unexpected ways, indicating the test design may need revision.
330
321
  Review and update the test suite to better capture the requirements.
322
+ Tests are failing in unexpected ways, indicating the test design may need revision.
331
323
  transition_reason: 'Tests failing unexpectedly, need to revise test approach'
332
324
 
333
325
  verify:
334
326
  description: 'Verify the fix works and does not introduce regressions'
335
327
  default_instructions: |
336
- You are verifying that the bug fix works correctly and doesn't introduce any regressions or new issues.
337
-
338
- **Verification Process:**
339
-
340
- 1. **Bug Resolution Verification**:
341
- - Confirm the original reproduction case no longer occurs
342
- - Verify all scenarios from `$VIBE_DIR/specs/$BRANCH_NAME/bug-spec.md` work correctly
343
- - Test the fix in the original environment where the bug was reported
344
- - Validate that success criteria are met
345
-
346
- 2. **Regression Testing**:
347
- - Run full test suite to ensure no existing functionality is broken
348
- - Test related features and integration points
349
- - Verify performance hasn't degraded
350
- - Check that the fix doesn't introduce new edge case failures
351
-
352
- 3. **User Acceptance**:
353
- - Test from user perspective using real scenarios
354
- - Verify the fix addresses the original user problem
355
- - Ensure user experience is improved, not just technically correct
356
- - Consider having original bug reporter validate the fix
357
-
358
- 4. **Documentation and Communication**:
359
- - Update relevant documentation if behavior has changed
360
- - Document the fix approach for future reference
361
- - Prepare release notes or change log entries
362
- - Consider if this fix reveals systemic issues to address
363
-
364
- **Final Validation**:
328
+ **Verify the bug fix** works correctly and doesn't introduce any regressions or new issues.
329
+
330
+ **STEP 1: Verify Bug Resolution**
331
+ - Confirm the original reproduction case no longer occurs
332
+ - Verify all scenarios from `$VIBE_DIR/specs/$BRANCH_NAME/bug-spec.md` work correctly
333
+ - Test the fix in the original environment where the bug was reported
334
+ - Validate that success criteria are met
335
+
336
+ **STEP 2: Perform Regression Testing**
337
+ - Run full test suite to ensure no existing functionality is broken
338
+ - Test related features and integration points
339
+ - Verify performance hasn't degraded
340
+ - Check that the fix doesn't introduce new edge case failures
341
+
342
+ **STEP 3: Validate User Acceptance**
343
+ - Test from user perspective using real scenarios
344
+ - Verify the fix addresses the original user problem
345
+ - Ensure user experience is improved, not just technically correct
346
+ - Consider having original bug reporter validate the fix
347
+
348
+ **STEP 4: Update Documentation**
349
+ - Update relevant documentation if behavior has changed
350
+ - Document the fix approach for future reference
351
+ - Prepare release notes or change log entries
352
+ - Consider if this fix reveals systemic issues to address
353
+
354
+ **Final Validation Checklist**:
365
355
  - All tests pass (both new and existing)
366
356
  - Original bug reproduction case fails (bug is fixed)
367
357
  - No regressions detected
@@ -371,22 +361,22 @@ states:
371
361
  - trigger: 'verification_complete'
372
362
  to: 'verify'
373
363
  instructions: >
374
- Bug fix verification completed successfully. The bug has been resolved, all tests pass,
375
- and no regressions have been detected. The fix is ready for deployment.
364
+ The bug has been resolved, all tests pass, and no regressions have been detected.
365
+ The fix is ready for deployment.
376
366
  transition_reason: 'Verification complete, bug fix ready for deployment'
377
367
 
378
368
  - trigger: 'regression_detected'
379
369
  to: 'fix'
380
370
  instructions: >
381
- Regression detected during verification. The fix has introduced new issues or broken
382
- existing functionality. Return to implementation to address the problems.
371
+ Return to implementation to address the problems.
372
+ The fix has introduced new issues or broken existing functionality.
383
373
  transition_reason: 'Regression detected, need to revise fix implementation'
384
374
 
385
375
  - trigger: 'fix_insufficient'
386
376
  to: 'specify'
387
377
  instructions: >
388
- The fix doesn't fully address the original problem or reveals that the specification
389
- was incomplete. Return to specification to better define the requirements.
378
+ Return to specification to better define the requirements.
379
+ The fix doesn't fully address the original problem or reveals incomplete specification.
390
380
  transition_reason: 'Fix insufficient, need to revise specification'
391
381
 
392
382
  # Global transitions available from any state
@@ -394,6 +384,5 @@ global_transitions:
394
384
  - trigger: 'abandon_bugfix'
395
385
  to: 'reproduce'
396
386
  instructions: >
397
- Bug fix abandoned. If you want to restart, you'll begin again with reproducing
398
- and understanding the bug.
387
+ If you want to restart, you'll begin again with reproducing and understanding the bug.
399
388
  transition_reason: 'Bug fix abandoned, restart from beginning'