@codemcp/workflows-core 3.1.21 → 3.2.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.
Files changed (80) hide show
  1. package/package.json +9 -5
  2. package/resources/templates/architecture/arc42/arc42-template-EN.md +1077 -0
  3. package/resources/templates/architecture/arc42/images/01_2_iso-25010-topics-EN.drawio-2023.png +0 -0
  4. package/resources/templates/architecture/arc42/images/01_2_iso-25010-topics-EN.drawio.png +0 -0
  5. package/resources/templates/architecture/arc42/images/05_building_blocks-EN.png +0 -0
  6. package/resources/templates/architecture/arc42/images/08-concepts-EN.drawio.png +0 -0
  7. package/resources/templates/architecture/arc42/images/arc42-logo.png +0 -0
  8. package/resources/templates/architecture/c4.md +224 -0
  9. package/resources/templates/architecture/freestyle.md +53 -0
  10. package/resources/templates/architecture/none.md +17 -0
  11. package/resources/templates/design/comprehensive.md +207 -0
  12. package/resources/templates/design/freestyle.md +37 -0
  13. package/resources/templates/design/none.md +17 -0
  14. package/resources/templates/requirements/ears.md +90 -0
  15. package/resources/templates/requirements/freestyle.md +42 -0
  16. package/resources/templates/requirements/none.md +17 -0
  17. package/resources/workflows/big-bang-conversion.yaml +539 -0
  18. package/resources/workflows/boundary-testing.yaml +334 -0
  19. package/resources/workflows/bugfix.yaml +185 -0
  20. package/resources/workflows/business-analysis.yaml +671 -0
  21. package/resources/workflows/c4-analysis.yaml +485 -0
  22. package/resources/workflows/epcc.yaml +161 -0
  23. package/resources/workflows/greenfield.yaml +189 -0
  24. package/resources/workflows/minor.yaml +127 -0
  25. package/resources/workflows/posts.yaml +207 -0
  26. package/resources/workflows/slides.yaml +256 -0
  27. package/resources/workflows/tdd.yaml +157 -0
  28. package/resources/workflows/waterfall.yaml +195 -0
  29. package/.turbo/turbo-build.log +0 -4
  30. package/src/config-manager.ts +0 -96
  31. package/src/conversation-manager.ts +0 -489
  32. package/src/database.ts +0 -427
  33. package/src/file-detection-manager.ts +0 -302
  34. package/src/git-manager.ts +0 -64
  35. package/src/index.ts +0 -28
  36. package/src/instruction-generator.ts +0 -210
  37. package/src/interaction-logger.ts +0 -109
  38. package/src/logger.ts +0 -353
  39. package/src/path-validation-utils.ts +0 -261
  40. package/src/plan-manager.ts +0 -323
  41. package/src/project-docs-manager.ts +0 -523
  42. package/src/state-machine-loader.ts +0 -365
  43. package/src/state-machine-types.ts +0 -72
  44. package/src/state-machine.ts +0 -370
  45. package/src/system-prompt-generator.ts +0 -122
  46. package/src/template-manager.ts +0 -328
  47. package/src/transition-engine.ts +0 -386
  48. package/src/types.ts +0 -60
  49. package/src/workflow-manager.ts +0 -606
  50. package/test/unit/conversation-manager.test.ts +0 -179
  51. package/test/unit/custom-workflow-loading.test.ts +0 -174
  52. package/test/unit/directory-linking-and-extensions.test.ts +0 -338
  53. package/test/unit/file-linking-integration.test.ts +0 -256
  54. package/test/unit/git-commit-integration.test.ts +0 -91
  55. package/test/unit/git-manager.test.ts +0 -86
  56. package/test/unit/install-workflow.test.ts +0 -138
  57. package/test/unit/instruction-generator.test.ts +0 -247
  58. package/test/unit/list-workflows-filtering.test.ts +0 -68
  59. package/test/unit/none-template-functionality.test.ts +0 -224
  60. package/test/unit/project-docs-manager.test.ts +0 -337
  61. package/test/unit/state-machine-loader.test.ts +0 -234
  62. package/test/unit/template-manager.test.ts +0 -217
  63. package/test/unit/validate-workflow-name.test.ts +0 -150
  64. package/test/unit/workflow-domain-filtering.test.ts +0 -75
  65. package/test/unit/workflow-enum-generation.test.ts +0 -92
  66. package/test/unit/workflow-manager-enhanced-path-resolution.test.ts +0 -369
  67. package/test/unit/workflow-manager-path-resolution.test.ts +0 -150
  68. package/test/unit/workflow-migration.test.ts +0 -155
  69. package/test/unit/workflow-override-by-name.test.ts +0 -116
  70. package/test/unit/workflow-prioritization.test.ts +0 -38
  71. package/test/unit/workflow-validation.test.ts +0 -303
  72. package/test/utils/e2e-test-setup.ts +0 -453
  73. package/test/utils/run-server-in-dir.sh +0 -27
  74. package/test/utils/temp-files.ts +0 -308
  75. package/test/utils/test-access.ts +0 -79
  76. package/test/utils/test-helpers.ts +0 -286
  77. package/test/utils/test-setup.ts +0 -78
  78. package/tsconfig.build.json +0 -21
  79. package/tsconfig.json +0 -8
  80. package/vitest.config.ts +0 -18
@@ -0,0 +1,671 @@
1
+ # yaml-language-server: $schema=../state-machine-schema.json
2
+ ---
3
+ name: 'business-analysis'
4
+ description: 'Business Capability Modeling workflow that analyzes systems from a pure business perspective. Creates hierarchical business capability maps, service catalogs, and process documentation using industry-standard Business Capability Modeling methodology.'
5
+ initial_state: 'document_discovery'
6
+
7
+ # Enhanced metadata for better discoverability
8
+ metadata:
9
+ domain: 'architecture'
10
+ complexity: 'medium'
11
+ bestFor:
12
+ - 'Business capability modeling'
13
+ - 'Business architecture analysis'
14
+ - 'Business service cataloging'
15
+ - 'Business process documentation'
16
+ useCases:
17
+ - 'Create business capability maps from system documentation'
18
+ - 'Document business services and processes'
19
+ - 'Analyze organizational business functions'
20
+ examples:
21
+ - 'Model business capabilities for legacy system understanding'
22
+ - 'Create business service catalog for domain architects'
23
+ - 'Document business processes and organizational roles'
24
+
25
+ # States with default instructions and transitions
26
+ states:
27
+ document_discovery:
28
+ description: 'Gather business documents and create standardized Business Capability Modeling structure'
29
+ default_instructions: >
30
+ You are in the document discovery phase. Gather documents and create standardized Business Capability Modeling structure.
31
+
32
+ **Step 1: Interactive Document Gathering**
33
+ Ask user to identify and provide available documents:
34
+ - Business process documentation
35
+ - Organizational charts
36
+ - System documentation
37
+ - Existing c4-analysis results
38
+ - Business requirements documents
39
+
40
+ IMPORTANT: In this phase, do not read the documents yet!
41
+
42
+ **Step 2: Create Document Processing Tasks**
43
+ For each gathered document, add task to plan file:
44
+ "- [ ] Summarize [document-name] using structured chapter-by-chapter approach"
45
+
46
+ Update plan file with discovery progress and processing tasks.
47
+ transitions:
48
+ - trigger: 'discovery_complete'
49
+ to: 'documents_consolidation'
50
+ additional_instructions: >
51
+ Document discovery is complete! ✅ Now transition to documents consolidation phase.
52
+
53
+ Begin systematic document processing using structured summarization technique.
54
+ Mark completed discovery tasks in plan file.
55
+ transition_reason: 'Documents gathered and Business Capability Modeling structure created, ready for consolidation'
56
+
57
+ documents_consolidation:
58
+ description: 'Process and consolidate gathered documents using structured summarization'
59
+ default_instructions: >
60
+ You are in the documents consolidation phase. Process each document systematically using basic structured summarization.
61
+
62
+ **Step 1: Apply Structured Summarization Technique**
63
+ For each document, use this approach:
64
+
65
+ 1. Read document chapter by chapter
66
+ 2. Maintain original hierarchical structure
67
+ 3. Condense content while preserving key information
68
+ 4. Create [document-name]-processed.md file
69
+ 5. Mark task complete in plan file
70
+
71
+ **Summarization Guidelines:**
72
+ - Create structured summary based exclusively on source document information
73
+ - Identify chapters and hierarchy levels systematically
74
+ - Summarize level-by-level into [document-name]-processed.md
75
+ - Write chapter summaries in natural language (no bullet points)
76
+ - Include information about potential capabilities, services, processes, or actors
77
+ - Maintain folder structure if documents have associated folders
78
+
79
+ **Step 2: Create Bibliography**
80
+ Create BIBLIOGRAPHY.md with:
81
+ - "sources" section listing all processed documents
82
+ - "terms" section with important business terms and their source references
83
+
84
+ IMPORTANT: This phase focuses only on basic document processing. Business analysis happens in the next phase.
85
+ transitions:
86
+ - trigger: 'consolidation_complete'
87
+ to: 'business_content_analysis'
88
+ additional_instructions: >
89
+ Documents consolidation is complete! ✅ Now transition to business content analysis.
90
+
91
+ Begin identifying business-relevant chapters for detailed analysis.
92
+ Mark completed consolidation tasks in plan file.
93
+ transition_reason: 'Basic document processing complete, ready for business content analysis'
94
+
95
+ business_content_analysis:
96
+ description: 'Identify and analyze business-relevant content from processed documents'
97
+ default_instructions: >
98
+ You are in the business content analysis phase. Focus on identifying and analyzing business-relevant content.
99
+
100
+ **Step 1: Review Processed Documents**
101
+ Review all [document-name]-processed.md files from consolidation phase.
102
+ Identify chapters that contain business-relevant content:
103
+ - Business processes and workflows
104
+ - Organizational roles and responsibilities
105
+ - Business capabilities and functions
106
+ - Services and customer interactions
107
+ - Business rules and policies
108
+
109
+ **Step 2: Create Business Analysis Tasks**
110
+ For each business-relevant chapter identified, add a task to the plan file:
111
+ "- [ ] Create detailed business analysis of [document-name] Chapter [X]: [chapter-title]"
112
+
113
+ IMPORTANT: You MUST add these tasks to the plan file before proceeding.
114
+
115
+ **Step 3: Execute Business Analysis Tasks**
116
+ For each business analysis task:
117
+ 1. Read the specific chapter in detail
118
+ 2. Extract business information focusing on:
119
+ - What business capabilities are mentioned
120
+ - What services or processes are described
121
+ - Who (roles/actors) performs the work
122
+ - Why (business value/purpose) it exists
123
+ 3. Create detailed business summary emphasizing WHAT, WHY, WHO (not HOW)
124
+ 4. Mark task complete in plan file
125
+
126
+ **Step 4: Update Bibliography**
127
+ Update BIBLIOGRAPHY.md with business terms found during detailed analysis:
128
+ - check whether the "sources" section already contains an entry it. If not: create one (max 5 letters in brackets).
129
+ - In the "terms" section, check whether there is an entry for it - If not, create an entry for It
130
+ - add a reference to the source + chapter
131
+
132
+ --- sample 1 ---
133
+
134
+ Document "operations manual" reads about "payment processing" in Chapter 5.2
135
+
136
+ => in BIBLIOGRAPHY.md
137
+
138
+ # Sources
139
+
140
+ - Operations Manual [OPMAN]
141
+
142
+ # Terms
143
+
144
+ - payment processing
145
+ - OPMAN, 5.2
146
+
147
+ --- end of sample 1 ---
148
+
149
+ --- sample 2 ---
150
+
151
+ Document "requirements.md" reads about "payment processing" in Chapter 1.2.1
152
+
153
+ => in BIBLIOGRAPHY.md
154
+
155
+ # Sources
156
+
157
+ - Requirements [REQ]
158
+
159
+ # Terms
160
+
161
+ - payment processing
162
+ - REQ, 1.2.1
163
+
164
+ --- end of sample 2 ---
165
+
166
+ Process business analysis tasks systematically, one at a time.
167
+ transitions:
168
+ - trigger: 'business_analysis_complete'
169
+ to: 'capability_identification'
170
+ additional_instructions: >
171
+ Business content analysis is complete! ✅ Now transition to capability identification.
172
+
173
+ Create BUSINESS_ANALYSIS.md with the following template content:
174
+ ```markdown
175
+ # Business Analysis Report
176
+
177
+ *This report documents business capabilities using Business Capability Modeling methodology. It provides a hierarchical view of what the business does, how it delivers value, and who performs the work.*
178
+
179
+ ## Methodology
180
+ This analysis uses **Business Capability Modeling**, an industry-standard approach for understanding business architecture:
181
+
182
+ - **Business Domains**: High-level areas of business activity
183
+ - **Business Capabilities**: What the business does (stable, outcome-focused)
184
+ - **Business Services**: How capabilities are delivered to consumers
185
+ - **Business Processes**: Step-by-step activities that deliver services
186
+ - **Business Actors**: Roles and organizational units that perform the work
187
+
188
+ **Hierarchy**: Domain → Capability → Sub-Capability → Service → Process → Actor
189
+
190
+ ## Executive Summary
191
+ <!-- High-level business capability overview -->
192
+
193
+ ## Business Domains Identified
194
+ <!-- Main business domains discovered -->
195
+
196
+ ## Key Business Capabilities
197
+ <!-- Primary capabilities mapped hierarchically -->
198
+
199
+ ## Business Services Catalog
200
+ <!-- Services that deliver capabilities -->
201
+
202
+ ## Business Architecture Insights
203
+ <!-- Important findings and patterns -->
204
+
205
+ ## Recommendations
206
+ <!-- Business capability recommendations -->
207
+ ```
208
+
209
+ Create business-processes-detailed.md with template:
210
+ ```markdown
211
+ # Business Processes Detailed
212
+
213
+ ## Overview
214
+ This document details business processes for each capability.
215
+
216
+ ## Process Overview by Capability
217
+ <!-- Process summaries for each capability -->
218
+
219
+ ## Process Flow Diagrams
220
+ <!-- Detailed process flows -->
221
+
222
+ ## Process Actors and Responsibilities
223
+ <!-- Key roles in each process -->
224
+ ```
225
+
226
+ Create business-functions-mapping.md with template:
227
+ ```markdown
228
+ # Business Functions Mapping
229
+
230
+ ## Overview
231
+ This document maps organizational functions to business capabilities.
232
+
233
+ ## Organizational Structure
234
+ <!-- High-level org structure -->
235
+
236
+ ## Function-Capability Mappings
237
+ <!-- Which functions support which capabilities -->
238
+
239
+ ## Roles and Responsibilities
240
+ <!-- Key roles and their responsibilities -->
241
+ ```
242
+
243
+ Create technical-business-mapping.md with template:
244
+ ```markdown
245
+ # Technical-Business Mapping
246
+
247
+ ## Overview
248
+ This document maps technical components to business capabilities.
249
+
250
+ ## Technical Architecture Overview
251
+ <!-- High-level technical architecture -->
252
+
253
+ ## Component-Capability Mappings
254
+ <!-- Which technical components support which capabilities -->
255
+
256
+ ## Business Value Assessments
257
+ <!-- Business value of each technical component -->
258
+ ```
259
+
260
+ Create Standardized Business Capability Modeling folder Structure
261
+ - business-analysis/business-domains/ (folder for details)
262
+ - business-analysis/business-capabilities/ (folder for details)
263
+ - business-analysis/business-processes/ (folder for details)
264
+ - business-analysis/business-actors/ (folder for details)
265
+
266
+ Begin analyzing processed documents to identify business capabilities and domains.
267
+ Mark completed business analysis tasks in plan file.
268
+ transition_reason: 'Business content analysis complete, ready for capability identification'
269
+
270
+ capability_identification:
271
+ description: 'Identify business capabilities from processed documents'
272
+ default_instructions: >
273
+ You are in the capability identification phase. Analyze processed documents to identify business capabilities.
274
+
275
+ IMPORTANT: ALWAYS reference the existing documents!
276
+
277
+ **Step 1: Analyze Processed Documents**
278
+ Review all [document-name]-processed.md files from consolidation phase.
279
+ Look for:
280
+ - Business functions mentioned
281
+ - Activities and processes described
282
+ - Services or offerings referenced
283
+ - Organizational responsibilities
284
+ - System functionalities with business purpose
285
+
286
+ **Step 2: Extract Potential Capabilities**
287
+ From document analysis, create initial list of business capabilities.
288
+ Group similar activities and functions together.
289
+ Use Business Capability Modeling naming: [Verb] + [Business Object] (e.g., "Manage Customers", "Process Orders")
290
+
291
+ **Step 3: Identify Business Domains**
292
+ Group capabilities into logical business domains:
293
+ - Customer-related capabilities → Customer Management
294
+ - Order-related capabilities → Order Management
295
+ - Financial capabilities → Financial Management
296
+ - etc.
297
+
298
+ **Step 4: Present Findings to User**
299
+ Show user the identified capabilities and domains:
300
+ "Based on the documents, I identified these business domains and capabilities:
301
+ [Present structured list]
302
+
303
+ Do these align with your understanding?
304
+ Are there any capabilities missing or incorrectly categorized?"
305
+
306
+ **Step 5: Refine with User Input**
307
+ Adjust the capability model based on user feedback.
308
+ Document final capability list in business-capabilities.md.
309
+
310
+ transitions:
311
+ - trigger: 'capabilities_identified'
312
+ to: 'capability_decomposition'
313
+ additional_instructions: >
314
+ Capability identification is complete! ✅ Now transition to capability decomposition.
315
+
316
+ For each identified capability, add decomposition tasks to plan file:
317
+ "- [ ] Decompose [capability-name] into sub-capabilities using document analysis"
318
+
319
+ Begin systematic decomposition of capabilities one at a time.
320
+ Mark completed identification tasks in plan file.
321
+ transition_reason: 'Business capabilities identified, ready for detailed decomposition'
322
+
323
+ capability_decomposition:
324
+ description: 'Break down business capabilities into detailed sub-capabilities using document analysis'
325
+ default_instructions: >
326
+ You are in the capability decomposition phase. Analyze documents to identify sub-capabilities, then validate with user.
327
+
328
+ IMPORTANT: ALWAYS reference the existing documents!
329
+
330
+ **Step 1: Analyze Documents for Sub-capabilities**
331
+ Review processed documents for the next unprocessed capability:
332
+ - Look for detailed activities mentioned within this capability
333
+ - Identify specific processes or functions described
334
+ - Find decision points and workflow steps
335
+ - Note different outcomes or deliverables mentioned
336
+
337
+ **Step 2: Extract Potential Sub-capabilities**
338
+ From document analysis, create initial list of sub-capabilities.
339
+ Use Business Capability Modeling naming: [Verb] + [Business Object]
340
+ Example: For "Customer Management" → "Verify Customer Identity", "Setup Customer Account", "Maintain Customer Data"
341
+
342
+ **Step 3: Present Findings to User**
343
+ Show user the identified sub-capabilities:
344
+ "Based on the documents, I identified these sub-capabilities for [capability]:
345
+ [Present structured list]
346
+
347
+ Do these sub-capabilities accurately reflect [capability]?
348
+ Are any activities missing or incorrectly categorized?"
349
+
350
+ **Step 4: Refine with User Input**
351
+ Adjust the sub-capability model based on user feedback.
352
+ Document refined decomposition in business-capabilities/ detail folder.
353
+ Mark capability as complete and ask: "Ready for the next capability?"
354
+
355
+ transitions:
356
+ - trigger: 'decomposition_complete'
357
+ to: 'actor_analysis'
358
+ additional_instructions: >
359
+ Capability decomposition is complete! ✅ Now transition to actor analysis.
360
+
361
+ Create business-actors.md with template:
362
+ ```markdown
363
+ # Business Actors
364
+
365
+ ## Overview
366
+ This document maps business actors (roles and organizational units) to capabilities using Business Capability Modeling methodology.
367
+
368
+ ## Actor-Capability Mappings
369
+ <!-- For each capability, document:
370
+ - Primary Owner: Who is accountable for capability outcomes
371
+ - Performing Roles: Which roles actually execute the capability
372
+ - Supporting Units: Which organizational units support the capability
373
+ - Decision Authority: Who has authority to change/approve within this capability -->
374
+
375
+ ## Role Definitions
376
+ <!-- Detailed definitions of key business roles -->
377
+
378
+ ## Organizational Units
379
+ <!-- Key organizational units and their responsibilities -->
380
+ ```
381
+
382
+ For each capability, add actor analysis tasks to plan file:
383
+ "- [ ] Analyze business actors for [capability-name] using document analysis"
384
+
385
+ Begin systematic actor analysis one capability at a time.
386
+ Mark completed decomposition tasks in plan file.
387
+ transition_reason: 'Capability decomposition complete, ready for actor analysis'
388
+
389
+ actor_analysis:
390
+ description: 'Map business actors (roles and organizational units) to capabilities using systematic task-based approach'
391
+ default_instructions: >
392
+ You are in the actor analysis phase. Identify WHO performs each capability using Business Capability Modeling approach.
393
+
394
+ **Step 1: Select Next Capability for Actor Analysis**
395
+ From plan file, select the next capability to analyze for business actors.
396
+
397
+ **Step 2: Analyze Documents for Business Actors**
398
+ Review processed documents to identify:
399
+ - **Business Roles**: Specific job roles (Customer Service Rep, Account Manager, etc.)
400
+ - **Organizational Units**: Teams/departments (Sales Team, Finance Department, etc.)
401
+ - **Decision-making Authority**: Who makes decisions for this capability
402
+ - **Accountability**: Who is responsible for capability outcomes
403
+
404
+ **Step 3: Map Actors to Capabilities**
405
+ For the selected capability, identify:
406
+ - **Primary Owner**: Who is accountable for capability outcomes
407
+ - **Performing Roles**: Which roles actually execute the capability
408
+ - **Supporting Units**: Which organizational units support the capability
409
+ - **Decision Authority**: Who has authority to change/approve within this capability
410
+
411
+ **Step 4: Create Actor Analysis Document**
412
+ Document the actor mappings in business-actors.md:
413
+ - **Primary Owner**: Who is accountable for capability outcomes
414
+ - **Performing Roles**: Which roles actually execute the capability
415
+ - **Supporting Units**: Which organizational units support the capability
416
+ - **Decision Authority**: Who has authority to change/approve within this capability
417
+
418
+ Then present to user for validation:
419
+ "I documented the business actors for [capability]. Please review the actor mappings - do they accurately reflect WHO performs this capability?"
420
+
421
+ **Step 5: Refine and Document**
422
+ Update business-actors.md with capability-actor mappings.
423
+ Mark task complete in plan file.
424
+
425
+ Focus on capability ownership and role accountability, not just organizational structure.
426
+
427
+ Process one capability's functions at a time.
428
+ transitions:
429
+ - trigger: 'actor_analysis_complete'
430
+ to: 'process_analysis'
431
+ additional_instructions: >
432
+ Actor analysis is complete! ✅ Now transition to process analysis.
433
+
434
+ Create business-processes.md with template:
435
+ ```markdown
436
+ # Business Processes
437
+
438
+ ## Overview
439
+ This document details business processes that deliver capabilities.
440
+
441
+ ## Process Overview by Capability
442
+ <!-- Process summaries for each capability -->
443
+
444
+ ## Process Flow Diagrams
445
+ <!-- Detailed process flows and decision points -->
446
+
447
+ ## Process-Actor Relationships
448
+ <!-- How processes relate to the actors identified -->
449
+ ```
450
+
451
+ For each capability, add process analysis tasks to plan file:
452
+ "- [ ] Analyze business processes for [capability-name] using document analysis and actor context"
453
+
454
+ Begin systematic process analysis one capability at a time.
455
+ Mark completed actor analysis tasks in plan file.
456
+ transition_reason: 'Actor analysis complete, ready for process analysis'
457
+
458
+ process_analysis:
459
+ description: 'Analyze business processes using systematic task-based approach'
460
+ default_instructions: >
461
+ You are in the process analysis phase. Create process analysis tasks for systematic processing.
462
+
463
+ **Step 1: Select Next Process Analysis Task**
464
+ From plan file process analysis tasks, select the next capability to process.
465
+
466
+ **Step 2: Analyze Documents for Process Information**
467
+ Review processed documents for process information:
468
+ - Look for process steps, workflows, decision points
469
+ - Identify process actors, inputs, outputs
470
+ - Note process triggers and outcomes
471
+ - Find process rules and constraints
472
+
473
+ **Step 3: Extract Processes**
474
+ Create process flows from document analysis.
475
+ Document process characteristics:
476
+ - Process name and purpose
477
+ - Process steps and sequence
478
+ - Decision points and branches
479
+ - Process actors and responsibilities
480
+ - Inputs, outputs, and deliverables
481
+
482
+ **Step 4: Present to User**
483
+ Show identified processes and ask for validation:
484
+ "Based on documents, I identified these processes for [capability]:
485
+ [Present process flows]
486
+
487
+ Do these processes accurately reflect how [capability] works?
488
+ Are any process steps missing or incorrectly sequenced?"
489
+
490
+ **Step 5: Refine and Document**
491
+ Update business-processes-detailed.md and detail folder.
492
+ Mark task complete in plan file.
493
+
494
+ Process one capability's processes at a time.
495
+ transitions:
496
+ - trigger: 'process_analysis_complete'
497
+ to: 'consistency'
498
+ additional_instructions: >
499
+ Process analysis is complete! ✅ Now transition to consistency phase.
500
+
501
+ Present the Business Capability Consistency Framework to user:
502
+ "I'll now validate consistency across all analysis documents using this framework:
503
+
504
+ **Business Capability Consistency Framework:**
505
+ - **Capability-Process Alignment**: Do processes actually deliver the stated capabilities?
506
+ - **Actor-Capability Ownership**: Are actors properly assigned to capability outcomes?
507
+ - **Process-Actor Mapping**: Do processes reference the correct performing actors?
508
+ - **Cross-Document Coherence**: Same entities described consistently across documents?
509
+ - **Completeness Validation**: All expected sections present and properly linked?
510
+
511
+ This ensures our business capability model is internally consistent before final summary.
512
+ Ready to proceed with consistency validation?"
513
+
514
+ Begin systematic consistency validation across all analysis documents.
515
+ Mark completed process analysis tasks in plan file.
516
+ transition_reason: 'Process analysis complete, ready for consistency validation'
517
+
518
+ consistency:
519
+ description: 'Validate consistency across all business capability analysis documents'
520
+ default_instructions: >
521
+ You are in the consistency phase. Validate consistency across all analysis documents using the Business Capability Consistency Framework.
522
+
523
+ **Step 1: Re-discover Analysis Documents**
524
+ Scan workspace for all created analysis documents:
525
+ - business-domains.md and detail folders
526
+ - business-capabilities.md and detail folders
527
+ - business-processes.md and detail folders
528
+ - business-actors.md and detail folders
529
+ - BUSINESS_ANALYSIS.md
530
+ - Any other analysis artifacts created
531
+
532
+ **Step 2: Apply Consistency Framework**
533
+ For each consistency check:
534
+
535
+ **Capability-Process Alignment Check:**
536
+ - Do documented processes actually deliver the stated capabilities?
537
+ - Are there capabilities without supporting processes?
538
+ - Are there processes that don't map to any capability?
539
+
540
+ **Actor-Capability Ownership Check:**
541
+ - Is each capability assigned a clear primary owner (actor)?
542
+ - Are performing roles properly mapped to capabilities?
543
+ - Do actors have decision authority for their assigned capabilities?
544
+
545
+ **Process-Actor Mapping Check:**
546
+ - Do processes reference the correct performing actors?
547
+ - Are actor responsibilities aligned with process steps?
548
+ - Is there clear accountability in each process?
549
+
550
+ **Cross-Document Coherence Check:**
551
+ - Are capabilities named consistently across documents?
552
+ - Do actor definitions match across process and capability docs?
553
+ - Are business terms used consistently throughout?
554
+
555
+ **Completeness Validation:**
556
+ - Are all expected document sections present?
557
+ - Do internal links work correctly?
558
+ - Are references to other documents accurate?
559
+
560
+ **Step 3: Document Issues and Fixes**
561
+ Create CONSISTENCY_REPORT.md documenting:
562
+ - Issues found during validation
563
+ - Fixes applied to resolve inconsistencies
564
+ - Remaining gaps or recommendations
565
+
566
+ **Step 4: Present Findings to User**
567
+ Show consistency validation results and ask for confirmation:
568
+ "Consistency validation complete. Found [X] issues, resolved [Y].
569
+ Key findings: [summary of major consistency improvements]
570
+
571
+ Are you satisfied with the consistency of the business capability model?"
572
+
573
+ Focus on ensuring the business capability model is internally coherent before final summary.
574
+ transitions:
575
+ - trigger: 'consistency_complete'
576
+ to: 'summary'
577
+ additional_instructions: >
578
+ Consistency validation is complete! ✅ Now transition to summary phase.
579
+
580
+ Ask user about illustration format preference:
581
+ "How would you like diagrams and illustrations formatted in the final summary?
582
+ - ASCII diagrams (text-based, simple)
583
+ - Mermaid diagrams (code-based, rich formatting)
584
+ - PlantUML diagrams (UML standard, detailed)
585
+ - All three formats (comprehensive)"
586
+
587
+ Begin creating consolidated summaries and illustrations.
588
+ Mark completed consistency tasks in plan file.
589
+ transition_reason: 'Consistency validation complete, ready for final summary creation'
590
+
591
+ summary:
592
+ description: 'Create consolidated summaries and illustrations for business capability analysis'
593
+ default_instructions: >
594
+ You are in the summary phase. Create consolidated overviews and illustrations using user's preferred formats.
595
+
596
+ **Step 1: Create Consolidated Overviews**
597
+ Build comprehensive summary documents:
598
+ - **Executive Summary**: High-level business capability overview for leadership
599
+ - **Capability Map**: Hierarchical view of all business capabilities
600
+ - **Actor-Capability Matrix**: Who owns/performs each capability
601
+ - **Process Overview**: Key processes supporting capabilities
602
+ - **Navigation Guide**: How to use all analysis documents
603
+
604
+ **Step 2: Generate Illustrations**
605
+ Using user's chosen format(s) (ASCII/Mermaid/PlantUML):
606
+ - Business capability hierarchy diagrams
607
+ - Process flow diagrams
608
+ - Actor-capability relationship maps
609
+ - Cross-functional process flows
610
+ - Organizational responsibility charts
611
+
612
+ **Step 3: Fix Links and References**
613
+ - Standardize internal document links
614
+ - Create cross-references between related content
615
+ - Build table of contents for navigation
616
+ - Ensure all references are accurate and working
617
+
618
+ **Step 4: Update BUSINESS_ANALYSIS.md**
619
+ Finalize the main analysis document with:
620
+ - Complete executive summary
621
+ - Key findings and insights
622
+ - Business architecture recommendations
623
+ - Links to all detailed analysis documents
624
+ - Methodology explanation and validation results
625
+
626
+ **Step 5: Present Final Deliverables**
627
+ Show completed analysis to user:
628
+ "Business Capability Analysis complete! Final deliverables:
629
+ [Present overview of all documents, diagrams, and summaries]
630
+
631
+ This provides comprehensive business architecture understanding for domain architects.
632
+ Are you satisfied with the final analysis deliverables?"
633
+
634
+ Focus on creating business-friendly, navigable documentation that serves domain architects.
635
+ transitions:
636
+ - trigger: 'summary_complete'
637
+ to: 'analysis_complete'
638
+ additional_instructions: >
639
+ Summary creation is complete! ✅
640
+
641
+ Final Business Capability Analysis deliverables ready:
642
+ - Consolidated executive summaries
643
+ - Business capability maps and diagrams
644
+ - Actor-capability matrices
645
+ - Process flow documentation
646
+ - Navigation guides and cross-references
647
+
648
+ The analysis provides complete business architecture understanding using Business Capability Modeling methodology.
649
+ Mark completed summary tasks in plan file.
650
+ transition_reason: 'Summary creation complete, analysis finished'
651
+
652
+ analysis_complete:
653
+ description: 'Business analysis complete'
654
+ default_instructions: >
655
+ Business analysis is complete! The system has been thoroughly analyzed using Business Capability Modeling methodology.
656
+
657
+ Final deliverables:
658
+ - Comprehensive business architecture documentation (Business Capability Modeling-based)
659
+ - BUSINESS_ANALYSIS.md with complete analysis findings
660
+ - Business capability maps and process flows
661
+ - Technical-business alignment documentation
662
+ - Business-friendly documentation for domain architects
663
+
664
+ The analysis provides a solid foundation for business architecture decisions and technical-business alignment.
665
+ transitions:
666
+ - trigger: 'analysis_complete'
667
+ to: 'analysis_complete'
668
+ instructions: >
669
+ Analysis is complete! The business architecture is now well-documented and understood.
670
+ Use the comprehensive documentation for business architecture decisions and planning.
671
+ transition_reason: 'Analysis complete, ready for business architecture work'