@codemcp/workflows-core 4.0.0 → 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.
@@ -0,0 +1,736 @@
1
+ # yaml-language-server: $schema=../../state-machine-schema.json
2
+ ---
3
+ name: 'sdd-feature-crowd'
4
+ description: 'Collaborative specification-driven feature development: Business Analyst → Architect → Developer working as a team'
5
+ initial_state: 'analyze'
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 feature development'
18
+ - 'Multi-agent collaboration'
19
+ - 'Specification-driven development with specialized roles'
20
+ useCases:
21
+ - 'Add new functionality with separate BA, architect, and developer agents'
22
+ - 'Enhance existing features with collaborative team'
23
+ examples:
24
+ - 'Team builds user profile management system'
25
+ - 'Collaborative search functionality implementation'
26
+
27
+ # States with default instructions and role-specific transitions
28
+ states:
29
+ analyze:
30
+ description: 'Analyze current state and requirements'
31
+ default_instructions: |
32
+ **Team Collaboration Mode**
33
+
34
+ You are $VIBE_ROLE working in a collaborative team on this feature development.
35
+ Current phase: ANALYZE
36
+
37
+ Your team members can help you at any time through messaging.
38
+
39
+ transitions:
40
+ # Business Analyst is RESPONSIBLE for analyze phase
41
+ - trigger: 'analysis_complete'
42
+ to: 'specify'
43
+ role: business-analyst
44
+ transition_reason: 'Analysis completed, moving to specification'
45
+ additional_instructions: |
46
+ **You are RESPONSIBLE for the analyze phase.**
47
+
48
+ You have exclusive control during this phase:
49
+ - Only you can edit the plan file
50
+ - Only you can proceed to the next phase
51
+
52
+ **Analysis Tasks:**
53
+ 1. **For New Features**: Brief analysis focusing on:
54
+ - How this feature fits into the existing system
55
+ - Integration points with current functionality
56
+ - Existing patterns and conventions to follow
57
+
58
+ 2. **For Enhancements**: Thorough analysis of:
59
+ - Current implementation and its limitations
60
+ - User pain points and feedback
61
+ - Performance or usability issues
62
+ - Technical debt that should be addressed
63
+
64
+ 3. **Context Gathering**:
65
+ - Review existing codebase and architecture
66
+ - Understand current user workflows
67
+ - Identify constraints and dependencies
68
+ - Document assumptions about the current state
69
+
70
+ **Collaboration:**
71
+ - Use send_message to ask architect about existing architecture constraints
72
+ - Use send_message to ask developer about current implementation details
73
+ - They are available to answer your questions
74
+
75
+ **Output**: Create `$VIBE_DIR/specs/$BRANCH_NAME/current-state-analysis.md`
76
+
77
+ **Before proceeding to specify phase:**
78
+ 1. Use send_message_to_operator to report analysis completion
79
+ 2. You remain RESPONSIBLE in specify phase (continue driving the work)
80
+ 3. Only you can call proceed_to_phase
81
+
82
+ # Architect is CONSULTED during analyze phase
83
+ - trigger: 'analysis_complete'
84
+ to: 'specify'
85
+ role: architect
86
+ transition_reason: 'Analysis completed, transitioning to specification'
87
+ additional_instructions: |
88
+ **You are CONSULTED during the analyze phase.**
89
+
90
+ Business-analyst is driving this work. You are in consultative mode.
91
+
92
+ **Your Responsibilities:**
93
+ - Monitor your messages for questions from business-analyst
94
+ - Respond when asked about:
95
+ * Existing architecture constraints
96
+ * System integration points
97
+ * Technical feasibility concerns
98
+
99
+ **Important Constraints:**
100
+ - Do NOT edit the plan file (only business-analyst can)
101
+ - Do NOT attempt to proceed to next phase
102
+ - Wait for business-analyst to ask questions
103
+
104
+ **How to Help:**
105
+ - Use get_my_messages to check for questions
106
+ - Provide clear, actionable feedback about architecture
107
+ - Share knowledge about existing system patterns
108
+
109
+ # Developer is CONSULTED during analyze phase
110
+ - trigger: 'analysis_complete'
111
+ to: 'specify'
112
+ role: developer
113
+ transition_reason: 'Analysis completed, transitioning to specification'
114
+ additional_instructions: |
115
+ **You are CONSULTED during the analyze phase.**
116
+
117
+ Business-analyst is driving this work. You are in consultative mode.
118
+
119
+ **Your Responsibilities:**
120
+ - Monitor your messages for questions from business-analyst
121
+ - Respond when asked about:
122
+ * Current implementation details
123
+ * Existing code patterns
124
+ * Technical complexity estimates
125
+
126
+ **Important Constraints:**
127
+ - Do NOT edit the plan file (only business-analyst can)
128
+ - Do NOT attempt to proceed to next phase
129
+ - Wait for business-analyst to ask questions
130
+
131
+ **How to Help:**
132
+ - Use get_my_messages to check for questions
133
+ - Provide insights about existing codebase
134
+ - Share implementation challenges and patterns
135
+
136
+ # Skip analysis option (all agents can use this)
137
+ - trigger: 'skip_analysis'
138
+ to: 'specify'
139
+ transition_reason: 'Analysis not needed, proceeding to specification'
140
+ additional_instructions: |
141
+ Skipping analysis phase for straightforward new feature.
142
+ Proceeding directly to specification using provided requirements.
143
+
144
+ specify:
145
+ description: 'Create feature specification'
146
+ default_instructions: |
147
+ **Team Collaboration Mode**
148
+
149
+ You are $VIBE_ROLE working in a collaborative team on this feature development.
150
+ Current phase: SPECIFY
151
+
152
+ Business-analyst is responsible. Architect and developer are consulted.
153
+
154
+ transitions:
155
+ # Business Analyst is RESPONSIBLE for specify phase
156
+ - trigger: 'specification_complete'
157
+ to: 'clarify'
158
+ role: business-analyst
159
+ transition_reason: 'Specification completed, ready for clarification'
160
+ additional_instructions: |
161
+ **You are RESPONSIBLE for the specify phase.**
162
+
163
+ You have exclusive control during this phase:
164
+ - Only you can edit the plan file
165
+ - Only you can proceed to the next phase
166
+
167
+ **Specification Tasks:**
168
+
169
+ 1. **Parse Requirements**: Extract key concepts from user's description
170
+ - Identify: actors, actions, data, constraints
171
+ - Consider existing system context (from analysis if performed)
172
+ - Focus on WHAT users need and WHY, not HOW to implement
173
+
174
+ 2. **Interactive Requirements Gathering**: Ask clarifying questions about:
175
+ - Integration points with existing features
176
+ - User impact and affected users
177
+ - Data dependencies
178
+ - Performance requirements
179
+ - Backward compatibility concerns
180
+
181
+ 3. **Handle Ambiguities**:
182
+ - Make informed guesses based on context and industry standards
183
+ - Only use [NEEDS CLARIFICATION: question] for critical decisions (max 3)
184
+ - Prioritize: scope > security/privacy > user experience > technical details
185
+
186
+ 4. **Collaboration:**
187
+ - Use send_message to ask architect: "Is this technically feasible?"
188
+ - Use send_message to ask developer: "How complex is this to implement?"
189
+ - They will provide feedback to improve your specification
190
+
191
+ **Output**: Create `$VIBE_DIR/specs/$BRANCH_NAME/spec.md` with:
192
+ - User scenarios and testing
193
+ - Functional requirements
194
+ - Success criteria
195
+ - Integration points
196
+
197
+ **Before proceeding to clarify phase:**
198
+ 1. Use send_message to ask architect and developer to review spec.md
199
+ 2. Wait for their feedback and address concerns
200
+ 3. Use send_message_to_operator: "Specification complete, moving to clarification"
201
+ 4. You remain RESPONSIBLE in clarify phase
202
+ 5. Only you can call proceed_to_phase
203
+
204
+ # Architect is CONSULTED during specify phase
205
+ - trigger: 'specification_complete'
206
+ to: 'clarify'
207
+ role: architect
208
+ transition_reason: 'Specification completed, transitioning to clarification'
209
+ additional_instructions: |
210
+ **You are CONSULTED during the specify phase.**
211
+
212
+ Business-analyst is driving this work. You are in consultative mode.
213
+
214
+ **Your Responsibilities:**
215
+ - Monitor messages for review requests from business-analyst
216
+ - Provide feedback on:
217
+ * Technical feasibility of requirements
218
+ * Architecture constraints and integration concerns
219
+ * System scalability and performance implications
220
+ * Technology stack compatibility
221
+
222
+ **Important Constraints:**
223
+ - Do NOT edit the plan file (only business-analyst can)
224
+ - Do NOT attempt to proceed to next phase
225
+
226
+ **How to Help:**
227
+ - Use get_my_messages to check for review requests
228
+ - Use send_message to provide detailed feedback
229
+ - Ask clarifying questions if requirements are unclear
230
+ - Suggest alternatives if requirements are problematic
231
+
232
+ # Developer is CONSULTED during specify phase
233
+ - trigger: 'specification_complete'
234
+ to: 'clarify'
235
+ role: developer
236
+ transition_reason: 'Specification completed, transitioning to clarification'
237
+ additional_instructions: |
238
+ **You are CONSULTED during the specify phase.**
239
+
240
+ Business-analyst is driving this work. You are in consultative mode.
241
+
242
+ **Your Responsibilities:**
243
+ - Monitor messages for review requests from business-analyst
244
+ - Provide feedback on:
245
+ * Implementation complexity and effort
246
+ * Technical challenges and risks
247
+ * Compatibility with existing codebase
248
+ * Testing requirements
249
+
250
+ **Important Constraints:**
251
+ - Do NOT edit the plan file (only business-analyst can)
252
+ - Do NOT attempt to proceed to next phase
253
+
254
+ **How to Help:**
255
+ - Use get_my_messages to check for review requests
256
+ - Use send_message to provide honest complexity estimates
257
+ - Highlight potential implementation challenges
258
+ - Suggest simplifications if requirements are too complex
259
+
260
+ # For needs_clarification loop
261
+ - trigger: 'needs_clarification'
262
+ to: 'specify'
263
+ role: business-analyst
264
+ transition_reason: 'Specification needs user clarification'
265
+ additional_instructions: |
266
+ Specification has unresolved clarifications. Present structured questions to the user,
267
+ wait for their responses, then update the specification accordingly.
268
+
269
+ clarify:
270
+ description: 'Review and clarify specification details'
271
+ default_instructions: |
272
+ **Team Collaboration Mode**
273
+
274
+ You are $VIBE_ROLE working in a collaborative team on this feature development.
275
+ Current phase: CLARIFY
276
+
277
+ Business-analyst is responsible. Architect is consulted.
278
+
279
+ transitions:
280
+ # Business Analyst is RESPONSIBLE for clarify phase
281
+ - trigger: 'clarification_complete'
282
+ to: 'plan'
283
+ role: business-analyst
284
+ transition_reason: 'All clarifications resolved, handing off to architect'
285
+ additional_instructions: |
286
+ **You are RESPONSIBLE for the clarify phase.**
287
+
288
+ You have exclusive control during this phase:
289
+ - Only you can edit the plan file
290
+ - Only you can proceed to the next phase
291
+
292
+ **Clarification Tasks:**
293
+
294
+ 1. **Specification Review**:
295
+ - Check for any remaining [NEEDS CLARIFICATION] markers
296
+ - Verify all functional requirements are testable
297
+ - Ensure success criteria are measurable
298
+ - Validate user scenarios are complete
299
+
300
+ 2. **Handle Remaining Clarifications**:
301
+ If [NEEDS CLARIFICATION] markers exist:
302
+ - Extract all markers from the spec (max 3)
303
+ - For each, present structured questions with options
304
+ - Wait for user responses
305
+ - Update specification with chosen answers
306
+
307
+ 3. **Final Validation**:
308
+ - Ensure no implementation details leaked in
309
+ - Verify requirements align with existing system
310
+ - Use send_message to ask architect for final spec review
311
+
312
+ **Handoff to Architect:**
313
+
314
+ Before proceeding to plan phase:
315
+ 1. Use send_message to architect: "Specification is complete and clarified. Please take the lead for the plan phase. Review: $VIBE_DIR/specs/$BRANCH_NAME/spec.md"
316
+ 2. Use send_message to developer: "Specification finalized, architect will create the plan next"
317
+ 3. Use send_message_to_operator: "Clarification complete, handing off to architect for planning"
318
+ 4. Call proceed_to_phase - you transition to CONSULTED role in plan phase
319
+
320
+ # Architect is CONSULTED during clarify phase
321
+ - trigger: 'clarification_complete'
322
+ to: 'plan'
323
+ role: architect
324
+ transition_reason: 'Clarifications resolved, preparing to take lead in plan phase'
325
+ additional_instructions: |
326
+ **You are CONSULTED during the clarify phase.**
327
+
328
+ Business-analyst is finalizing clarifications. You are in consultative mode.
329
+
330
+ **Your Responsibilities:**
331
+ - Monitor messages for final review requests
332
+ - Validate specification is ready for technical planning
333
+ - Provide feedback on any remaining technical concerns
334
+
335
+ **Important Constraints:**
336
+ - Do NOT edit the plan file (only business-analyst can)
337
+ - Do NOT attempt to proceed to next phase
338
+
339
+ **Handoff Notice:**
340
+ - When business-analyst completes clarify phase, YOU become RESPONSIBLE
341
+ - You will take the lead in the plan phase
342
+ - Prepare to design the system architecture and create implementation plan
343
+
344
+ # Developer is INFORMED during clarify phase
345
+ - trigger: 'clarification_complete'
346
+ to: 'plan'
347
+ role: developer
348
+ transition_reason: 'Clarifications resolved, architect taking lead for planning'
349
+ additional_instructions: |
350
+ **You are INFORMED during the clarify phase.**
351
+
352
+ Business-analyst is finalizing clarifications. You are in monitoring mode.
353
+
354
+ **Your Responsibilities:**
355
+ - Stay aware of specification updates
356
+ - Prepare to be consulted during planning phase
357
+ - No active work required in this phase
358
+
359
+ **Next Phase:**
360
+ - Architect will take the lead in plan phase
361
+ - You will be CONSULTED during planning
362
+ - Be ready to provide implementation feedback when architect asks
363
+
364
+ # For needs_user_input loop
365
+ - trigger: 'needs_user_input'
366
+ to: 'clarify'
367
+ role: business-analyst
368
+ transition_reason: 'Waiting for user responses to clarification questions'
369
+ additional_instructions: |
370
+ Waiting for user responses to clarification questions. Present the questions clearly
371
+ and wait for user input before proceeding.
372
+
373
+ plan:
374
+ description: 'Generate implementation plan with constitutional compliance'
375
+ default_instructions: |
376
+ **Team Collaboration Mode**
377
+
378
+ You are $VIBE_ROLE working in a collaborative team on this feature development.
379
+ Current phase: PLAN
380
+
381
+ Architect is responsible. Business-analyst and developer are consulted.
382
+
383
+ transitions:
384
+ # Business Analyst is CONSULTED during plan phase
385
+ - trigger: 'plan_complete'
386
+ to: 'tasks'
387
+ role: business-analyst
388
+ transition_reason: 'Plan completed, architect moving to tasks'
389
+ additional_instructions: |
390
+ **You are CONSULTED during the plan phase.**
391
+
392
+ Architect is driving technical planning. You are in consultative mode.
393
+
394
+ **Your Responsibilities:**
395
+ - Monitor messages for questions from architect
396
+ - Validate plan aligns with specification requirements
397
+ - Clarify any requirements that are unclear
398
+ - Approve or suggest adjustments to technical approach
399
+
400
+ **Important Constraints:**
401
+ - Do NOT edit the plan file (only architect can)
402
+ - Do NOT attempt to proceed to next phase
403
+
404
+ **How to Help:**
405
+ - Use get_my_messages to check for architect's questions
406
+ - Use send_message to validate alignment with spec
407
+ - Raise concerns if plan doesn't meet business requirements
408
+ - Clarify user needs when architect asks
409
+
410
+ # Architect is RESPONSIBLE for plan phase
411
+ - trigger: 'plan_complete'
412
+ to: 'tasks'
413
+ role: architect
414
+ transition_reason: 'Implementation plan completed, moving to task breakdown'
415
+ additional_instructions: |
416
+ **You are RESPONSIBLE for the plan phase.**
417
+
418
+ You have exclusive control during this phase:
419
+ - Only you can edit the plan file
420
+ - Only you can proceed to the next phase
421
+
422
+ **Planning Tasks:**
423
+
424
+ 1. **Load Context**:
425
+ - Read specification: `$VIBE_DIR/specs/$BRANCH_NAME/spec.md`
426
+ - Read analysis: `$VIBE_DIR/specs/$BRANCH_NAME/current-state-analysis.md` (if exists)
427
+ - Review existing project patterns and conventions
428
+
429
+ 2. **Collaborate on Technical Approach**:
430
+ - Use send_message to business-analyst: "Does this approach align with requirements?"
431
+ - Use send_message to developer: "Is this implementation strategy sound?"
432
+ - Wait for feedback and incorporate it
433
+
434
+ 3. **Technical Context Analysis**:
435
+ - Identify integration with existing system
436
+ - Map dependencies and integration points
437
+ - Choose appropriate technology stack
438
+ - Mark unknowns for research
439
+
440
+ 4. **Create Plan**: Document in `$VIBE_DIR/specs/$BRANCH_NAME/plan.md`:
441
+ - High-level architecture
442
+ - Technology decisions
443
+ - Integration strategy
444
+ - Implementation phases
445
+
446
+ **You remain RESPONSIBLE in tasks phase** (continue driving technical work)
447
+
448
+ **Before proceeding:**
449
+ 1. Use send_message_to_operator: "Planning complete, moving to task breakdown"
450
+ 2. Only you can call proceed_to_phase
451
+
452
+ # Developer is CONSULTED during plan phase
453
+ - trigger: 'plan_complete'
454
+ to: 'tasks'
455
+ role: developer
456
+ transition_reason: 'Plan completed, architect moving to tasks'
457
+ additional_instructions: |
458
+ **You are CONSULTED during the plan phase.**
459
+
460
+ Architect is driving technical planning. You are in consultative mode.
461
+
462
+ **Your Responsibilities:**
463
+ - Monitor messages for questions from architect
464
+ - Provide feedback on:
465
+ * Implementation feasibility and complexity
466
+ * Existing code patterns and conventions
467
+ * Potential technical challenges
468
+ * Testing requirements and strategies
469
+
470
+ **Important Constraints:**
471
+ - Do NOT edit the plan file (only architect can)
472
+ - Do NOT attempt to proceed to next phase
473
+
474
+ **How to Help:**
475
+ - Use get_my_messages to check for architect's questions
476
+ - Use send_message to provide honest implementation feedback
477
+ - Suggest alternative approaches if needed
478
+ - Raise concerns about technical risks
479
+
480
+ # For architectural_conflict loop
481
+ - trigger: 'architectural_conflict'
482
+ to: 'plan'
483
+ role: architect
484
+ transition_reason: 'Plan conflicts with existing architecture, needs revision'
485
+ additional_instructions: |
486
+ Implementation plan conflicts with existing architecture or principles.
487
+ Review and revise the approach to ensure proper integration.
488
+
489
+ tasks:
490
+ description: 'Generate actionable, dependency-ordered tasks'
491
+ default_instructions: |
492
+ **Team Collaboration Mode**
493
+
494
+ You are $VIBE_ROLE working in a collaborative team on this feature development.
495
+ Current phase: TASKS
496
+
497
+ Architect is responsible. Business-analyst is informed. Developer is consulted.
498
+
499
+ transitions:
500
+ # Business Analyst is INFORMED during tasks phase
501
+ - trigger: 'tasks_generated'
502
+ to: 'implement'
503
+ role: business-analyst
504
+ transition_reason: 'Tasks generated, developer taking lead for implementation'
505
+ additional_instructions: |
506
+ **You are INFORMED during the tasks phase.**
507
+
508
+ Architect is creating the task breakdown. You are in monitoring mode.
509
+
510
+ **Your Responsibilities:**
511
+ - Stay aware of task structure
512
+ - Be ready to clarify requirements during implementation
513
+ - No active work required in this phase
514
+
515
+ **Next Phase:**
516
+ - Developer will take the lead in implement phase
517
+ - You will be CONSULTED during implementation
518
+ - Be ready to clarify requirements when developer asks
519
+
520
+ # Architect is RESPONSIBLE for tasks phase
521
+ - trigger: 'tasks_generated'
522
+ to: 'implement'
523
+ role: architect
524
+ transition_reason: 'Tasks generated, handing off to developer'
525
+ additional_instructions: |
526
+ **You are RESPONSIBLE for the tasks phase.**
527
+
528
+ You have exclusive control during this phase:
529
+ - Only you can edit the plan file
530
+ - Only you can proceed to the next phase
531
+
532
+ **Task Generation:**
533
+
534
+ 1. **Load Design Documents**:
535
+ - Required: `$VIBE_DIR/specs/$BRANCH_NAME/plan.md`, `$VIBE_DIR/specs/$BRANCH_NAME/spec.md`
536
+ - Optional: `$VIBE_DIR/specs/$BRANCH_NAME/technology-research.md`
537
+
538
+ 2. **Extract User Stories**: From spec.md with priorities (P1, P2, P3...)
539
+
540
+ 3. **Generate Task Breakdown**:
541
+ - Setup Phase: Integration and shared infrastructure
542
+ - Foundational Phase: Prerequisites for the feature
543
+ - User Story Phases (P1, P2, P3...): One phase per story
544
+ - Mark parallelizable tasks with [P]
545
+
546
+ 4. **Collaborate with Developer**:
547
+ - Use send_message to developer: "Please review task breakdown for implementability"
548
+ - Wait for feedback and adjust
549
+
550
+ 5. **Create Documents**:
551
+ - `$VIBE_DIR/specs/$BRANCH_NAME/data-model.md`
552
+ - `$VIBE_DIR/specs/$BRANCH_NAME/contracts/` (API contracts)
553
+ - `$VIBE_DIR/specs/$BRANCH_NAME/quickstart.md`
554
+ - `$VIBE_DIR/specs/$BRANCH_NAME/tasks.md`
555
+
556
+ **Handoff to Developer:**
557
+
558
+ Before proceeding to implement phase:
559
+ 1. Use send_message to developer: "Task breakdown complete. Please take the lead for implementation phase. See: $VIBE_DIR/specs/$BRANCH_NAME/tasks.md"
560
+ 2. Use send_message to business-analyst: "Implementation will begin, you'll be consulted for requirement clarifications"
561
+ 3. Use send_message_to_operator: "Tasks ready, handing off to developer"
562
+ 4. Call proceed_to_phase - you transition to CONSULTED role in implement phase
563
+
564
+ # Developer is CONSULTED during tasks phase
565
+ - trigger: 'tasks_generated'
566
+ to: 'implement'
567
+ role: developer
568
+ transition_reason: 'Tasks generated, preparing to take lead for implementation'
569
+ additional_instructions: |
570
+ **You are CONSULTED during the tasks phase.**
571
+
572
+ Architect is creating the task breakdown. You are in consultative mode.
573
+
574
+ **Your Responsibilities:**
575
+ - Monitor messages for review requests from architect
576
+ - Provide feedback on:
577
+ * Task granularity and completeness
578
+ * Implementation order and dependencies
579
+ * Complexity estimates
580
+ * Testing approach
581
+
582
+ **Important Constraints:**
583
+ - Do NOT edit the plan file (only architect can)
584
+ - Do NOT attempt to proceed to next phase
585
+
586
+ **Handoff Notice:**
587
+ - When architect completes tasks phase, YOU become RESPONSIBLE
588
+ - You will take the lead in the implement phase
589
+ - Review the tasks.md and prepare to begin implementation
590
+
591
+ implement:
592
+ description: 'Execute implementation following the task breakdown'
593
+ default_instructions: |
594
+ **Team Collaboration Mode**
595
+
596
+ You are $VIBE_ROLE working in a collaborative team on this feature development.
597
+ Current phase: IMPLEMENT
598
+
599
+ Developer is responsible. Architect and business-analyst are consulted.
600
+
601
+ transitions:
602
+ # Business Analyst is CONSULTED during implement phase
603
+ - trigger: 'implementation_complete'
604
+ to: 'implement'
605
+ role: business-analyst
606
+ transition_reason: 'Implementation complete'
607
+ additional_instructions: |
608
+ **You are CONSULTED during the implement phase.**
609
+
610
+ Developer is driving implementation. You are in consultative mode.
611
+
612
+ **Your Responsibilities:**
613
+ - Monitor messages for questions from developer
614
+ - Provide clarification on:
615
+ * Requirements interpretation
616
+ * User story acceptance criteria
617
+ * Business rules and constraints
618
+ * Success criteria validation
619
+
620
+ **Important Constraints:**
621
+ - Do NOT edit the plan file (only developer can)
622
+ - Do NOT attempt to proceed to next phase
623
+
624
+ **How to Help:**
625
+ - Use get_my_messages to check for developer's questions
626
+ - Use send_message to clarify requirements quickly
627
+ - Validate implementation against specification when asked
628
+ - Approve acceptance criteria when developer completes features
629
+
630
+ # Architect is CONSULTED during implement phase
631
+ - trigger: 'implementation_complete'
632
+ to: 'implement'
633
+ role: architect
634
+ transition_reason: 'Implementation complete'
635
+ additional_instructions: |
636
+ **You are CONSULTED during the implement phase.**
637
+
638
+ Developer is driving implementation. You are in consultative mode.
639
+
640
+ **Your Responsibilities:**
641
+ - Monitor messages for questions from developer
642
+ - Provide guidance on:
643
+ * Architecture decisions and patterns
644
+ * Design patterns and best practices
645
+ * Integration approaches
646
+ * Technical trade-offs
647
+
648
+ **Important Constraints:**
649
+ - Do NOT edit the plan file (only developer can)
650
+ - Do NOT attempt to proceed to next phase
651
+
652
+ **How to Help:**
653
+ - Use get_my_messages to check for developer's questions
654
+ - Use send_message to provide architecture guidance
655
+ - Review code against architecture plan when asked
656
+ - Help resolve technical blockers
657
+
658
+ # Developer is RESPONSIBLE for implement phase
659
+ - trigger: 'implementation_complete'
660
+ to: 'implement'
661
+ role: developer
662
+ transition_reason: 'Implementation complete, feature ready'
663
+ additional_instructions: |
664
+ **You are RESPONSIBLE for the implement phase.**
665
+
666
+ You have exclusive control during this phase:
667
+ - Only you can edit the plan file
668
+ - Only you can proceed (mark complete)
669
+
670
+ **Implementation Tasks:**
671
+
672
+ 1. **Follow Task Breakdown**: Execute tasks from `$VIBE_DIR/specs/$BRANCH_NAME/tasks.md`
673
+ - Work through tasks in order
674
+ - Mark completed tasks with [x] in plan file
675
+ - Focus on one user story at a time
676
+
677
+ 2. **Collaborate When Needed:**
678
+ - Use send_message to architect when design questions arise
679
+ - Use send_message to business-analyst when requirements unclear
680
+ - They are available to unblock you
681
+
682
+ 3. **Quality Standards:**
683
+ - Follow existing code patterns
684
+ - Write tests for new functionality
685
+ - Ensure integration with existing system
686
+ - Handle errors appropriately
687
+
688
+ 4. **Progress Tracking:**
689
+ - Update plan file with completed tasks
690
+ - Document any deviations or decisions
691
+ - Keep implementation aligned with specification
692
+
693
+ **Final Validation:**
694
+
695
+ Before marking complete:
696
+ 1. Use send_message to architect: "Please review implementation against architecture plan"
697
+ 2. Use send_message to business-analyst: "Please validate implementation meets specification"
698
+ 3. Wait for their reviews and address any concerns
699
+ 4. Run all tests and ensure they pass
700
+ 5. Use send_message_to_operator: "Implementation complete and reviewed by team"
701
+ 6. This is a terminal state - feature is complete
702
+
703
+ # Implementation blocked - return to plan phase
704
+ - trigger: 'implementation_blocked'
705
+ to: 'plan'
706
+ role: developer
707
+ transition_reason: 'Implementation blocked, need to revise plan'
708
+ additional_instructions: |
709
+ Implementation is blocked by technical issues. Notify the team:
710
+
711
+ 1. Use send_message to architect: "Implementation blocked: [explain issue]. Need to revise plan."
712
+ 2. Use send_message to business-analyst: "Implementation blocked, may need requirement changes: [explain]"
713
+ 3. Use send_message_to_operator: "Implementation blocked, returning to plan phase"
714
+ 4. Call proceed_to_phase - architect will take lead again in plan phase
715
+
716
+ # Integration issues - return to analyze
717
+ - trigger: 'integration_issues'
718
+ to: 'analyze'
719
+ role: developer
720
+ transition_reason: 'Integration issues require deeper system analysis'
721
+ additional_instructions: |
722
+ Significant integration issues discovered. Notify the team:
723
+
724
+ 1. Use send_message to business-analyst: "Integration issues found: [explain]. Need deeper analysis."
725
+ 2. Use send_message to architect: "Integration problems require re-analysis: [explain]"
726
+ 3. Use send_message_to_operator: "Integration issues, returning to analyze phase"
727
+ 4. Call proceed_to_phase - business-analyst will take lead in analyze phase
728
+
729
+ # Global transitions available from any state
730
+ global_transitions:
731
+ - trigger: 'abandon_feature'
732
+ to: 'analyze'
733
+ transition_reason: 'Feature abandoned, restart from beginning'
734
+ additional_instructions: |
735
+ Feature development abandoned. If you want to restart, begin again with
736
+ analyzing the requirements and current state.