@codemcp/workflows-core 3.5.0 → 3.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/resources/workflows/adr.yaml +133 -0
package/package.json
CHANGED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
name: adr
|
|
2
|
+
description: 'Architecture Decision Records workflow: Context → Research → Decide → Commit - structured process for documenting architectural decisions'
|
|
3
|
+
initial_state: context
|
|
4
|
+
|
|
5
|
+
metadata:
|
|
6
|
+
domain: 'architecture'
|
|
7
|
+
complexity: 'medium'
|
|
8
|
+
bestFor:
|
|
9
|
+
- 'Documenting architectural decisions'
|
|
10
|
+
- 'Recording design choices'
|
|
11
|
+
- 'Technology selection decisions'
|
|
12
|
+
- 'System design decisions'
|
|
13
|
+
useCases:
|
|
14
|
+
- 'Choosing between architectural patterns'
|
|
15
|
+
- 'Selecting technology stack components'
|
|
16
|
+
- 'Documenting design trade-offs'
|
|
17
|
+
examples:
|
|
18
|
+
- 'Document database selection decision'
|
|
19
|
+
- 'Record API design approach'
|
|
20
|
+
- 'Document deployment strategy choice'
|
|
21
|
+
|
|
22
|
+
states:
|
|
23
|
+
context:
|
|
24
|
+
description: 'Define the architectural problem or decision that needs to be made'
|
|
25
|
+
default_instructions: |
|
|
26
|
+
You are starting an Architecture Decision Record (ADR) workflow.
|
|
27
|
+
|
|
28
|
+
**Your tasks:**
|
|
29
|
+
1. Check if $ARCHITECTURE_DOC exists to determine ADR storage location
|
|
30
|
+
2. Look for existing ADRs to understand current format/numbering
|
|
31
|
+
3. Help user clearly define the architectural problem or decision needed
|
|
32
|
+
4. Identify key stakeholders who should be involved
|
|
33
|
+
5. Document the context and problem statement
|
|
34
|
+
6. Create initial ADR structure using existing format or template above
|
|
35
|
+
|
|
36
|
+
Focus on understanding WHAT decision needs to be made and WHY it's important.
|
|
37
|
+
Don't make the decision yet - that happens in the decide phase.
|
|
38
|
+
|
|
39
|
+
additional_instructions: |
|
|
40
|
+
**ADR Template (use if no existing ADRs found):**
|
|
41
|
+
```
|
|
42
|
+
# ADR-XXX: [Decision Title]
|
|
43
|
+
|
|
44
|
+
## Status
|
|
45
|
+
Proposed
|
|
46
|
+
|
|
47
|
+
## Context
|
|
48
|
+
[Describe the architectural problem or decision that needs to be made]
|
|
49
|
+
|
|
50
|
+
## Decision
|
|
51
|
+
[The decision that was made - to be filled in decide phase]
|
|
52
|
+
|
|
53
|
+
## Consequences
|
|
54
|
+
### Positive
|
|
55
|
+
- [Benefits of this decision]
|
|
56
|
+
|
|
57
|
+
### Negative
|
|
58
|
+
- [Drawbacks or risks of this decision]
|
|
59
|
+
|
|
60
|
+
## Alternatives Considered
|
|
61
|
+
- [Other options that were evaluated]
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
transitions:
|
|
65
|
+
- trigger: context_complete
|
|
66
|
+
to: research
|
|
67
|
+
transition_reason: 'Architectural problem clearly defined, ready to research options'
|
|
68
|
+
|
|
69
|
+
- trigger: abandon_adr
|
|
70
|
+
to: context
|
|
71
|
+
transition_reason: 'User decided to abandon current ADR'
|
|
72
|
+
|
|
73
|
+
research:
|
|
74
|
+
description: 'Investigate options, gather information, and analyze alternatives'
|
|
75
|
+
default_instructions: |
|
|
76
|
+
You are in the research phase for the ADR.
|
|
77
|
+
|
|
78
|
+
**Your tasks:**
|
|
79
|
+
1. Research available options and alternatives for the decision
|
|
80
|
+
2. Gather technical information, constraints, and requirements
|
|
81
|
+
3. Analyze trade-offs between different approaches
|
|
82
|
+
4. Consider non-functional requirements (performance, security, maintainability)
|
|
83
|
+
5. Document findings in the "Alternatives Considered" section
|
|
84
|
+
6. Identify pros and cons for each option
|
|
85
|
+
|
|
86
|
+
Work with the user to thoroughly understand all viable options before making a decision.
|
|
87
|
+
Update the ADR with research findings but don't make the final decision yet.
|
|
88
|
+
|
|
89
|
+
decide:
|
|
90
|
+
description: 'Make the architectural decision and document the rationale'
|
|
91
|
+
default_instructions: |
|
|
92
|
+
You are in the decide phase for the ADR.
|
|
93
|
+
|
|
94
|
+
**Your tasks:**
|
|
95
|
+
1. Help user make the final architectural decision based on research
|
|
96
|
+
2. Document the chosen option in the "Decision" section
|
|
97
|
+
3. Provide clear rationale for why this option was selected
|
|
98
|
+
4. Document positive consequences (benefits) of the decision
|
|
99
|
+
5. Document negative consequences (drawbacks/risks) of the decision
|
|
100
|
+
6. Ensure the decision is specific and actionable
|
|
101
|
+
7. Update ADR status to "Accepted" (or "Proposed" if needs approval)
|
|
102
|
+
|
|
103
|
+
Focus on making a clear, well-reasoned decision with documented rationale.
|
|
104
|
+
The decision should be based on the research conducted in the previous phase.
|
|
105
|
+
|
|
106
|
+
transitions:
|
|
107
|
+
- trigger: decision_complete
|
|
108
|
+
to: commit
|
|
109
|
+
transition_reason: 'Decision made and documented, ready for finalization'
|
|
110
|
+
review_perspectives:
|
|
111
|
+
- perspective: 'architect'
|
|
112
|
+
prompt: 'Review the ADR for architectural soundness, completeness, and alignment with system design principles. Ensure the decision is well-reasoned and consequences are thoroughly documented.'
|
|
113
|
+
- perspective: 'stakeholder'
|
|
114
|
+
prompt: 'Review the ADR from a business/project perspective. Ensure the decision addresses stakeholder needs, considers business impact, and is clearly communicated.'
|
|
115
|
+
- perspective: 'implementer'
|
|
116
|
+
prompt: 'Review the ADR from an implementation perspective. Ensure the decision is practical, actionable, and considers development/operational implications.'
|
|
117
|
+
|
|
118
|
+
commit:
|
|
119
|
+
description: 'Finalize the ADR with validation and cleanup'
|
|
120
|
+
default_instructions: |
|
|
121
|
+
You are in the commit phase for the ADR.
|
|
122
|
+
|
|
123
|
+
**Your tasks:**
|
|
124
|
+
1. Review ADR completeness and quality
|
|
125
|
+
2. Ensure proper formatting and structure
|
|
126
|
+
3. Verify all sections are filled appropriately
|
|
127
|
+
4. Check that consequences (positive and negative) are documented
|
|
128
|
+
5. Ensure alternatives considered are listed
|
|
129
|
+
6. Finalize ADR numbering if needed
|
|
130
|
+
7. Update ADR status to final state (Accepted/Approved)
|
|
131
|
+
8. Save/integrate ADR into $ARCHITECTURE_DOC or appropriate location
|
|
132
|
+
|
|
133
|
+
This is the final validation and cleanup phase before the ADR is complete.
|