@codemcp/workflows-core 5.2.2 → 5.2.4

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,12 +27,21 @@ states:
27
27
  explore:
28
28
  description: 'Analysis and design phase - understanding and planning without implementation'
29
29
  default_instructions: >
30
- You are in the exploration phase for minor enhancement.
31
- This phase should be efficient since it's a minor enhancement.
32
30
  Understand the problem, analyze existing patterns, and design your approach.
33
- Consider the scope and impact of the change. If $REQUIREMENTS_DOC exists, document requirements there, otherwise document them in your task management system. If $DESIGN_DOC exists, respect the design approach in $DESIGN_DOC.
34
- Document your analysis and design decisions and create tasks as needed.
35
- Focus on analysis and design only - do not write any code yet.
31
+ Consider the scope and impact of the change.
32
+
33
+ **STEP 1: Analyze Requirements**
34
+ - If `$REQUIREMENTS_DOC` exists: Use it to understand the required changes
35
+ - Otherwise: Document requirements in your task management system
36
+
37
+ **STEP 2: Review Design Approach**
38
+ - If `$DESIGN_DOC` exists: Respect the design approach documented in `$DESIGN_DOC`
39
+ - Otherwise: Design your approach based on the problem analysis
40
+
41
+ **STEP 3: Document Decisions**
42
+ - Document your analysis and design decisions
43
+ - Create tasks to guide implementation
44
+ - Focus on analysis and design only - do not write any code yet
36
45
  transitions:
37
46
  - trigger: 'exploration_complete'
38
47
  to: 'implement'
@@ -49,7 +58,22 @@ states:
49
58
 
50
59
  implement:
51
60
  description: 'Combined implementation phase - code, test, and commit'
52
- default_instructions: "This phase combines coding, testing, and commit preparation. If $DESIGN_DOC exists, follow your design from $DESIGN_DOC. If $REQUIREMENTS_DOC exists, ensure the relevant requirements from $REQUIREMENTS_DOC are met, otherwise ensure existing requirements are met based on your task context. Write clean, focused code for the minor enhancement. Test your changes to ensure they work correctly and don't break existing functionality. Prepare documentation and commit when ready. Update task progress as needed."
61
+ default_instructions: >
62
+ Write clean, focused code for the minor enhancement, test your changes, and prepare for commit.
63
+
64
+ **STEP 1: Review Design and Requirements**
65
+ - If `$DESIGN_DOC` exists: Follow your design from `$DESIGN_DOC`
66
+ - Otherwise: Elaborate design options and present them to the user
67
+ - If `$REQUIREMENTS_DOC` exists: Ensure the relevant requirements from `$REQUIREMENTS_DOC` are met
68
+ - Otherwise: Ensure existing requirements are met based on your task context
69
+
70
+ **STEP 2: Implement Changes**
71
+ - Write clean, focused code for the minor enhancement
72
+ - Test your changes to ensure they work correctly and don't break existing functionality
73
+
74
+ **STEP 3: Prepare for Finalization**
75
+ - Update task progress as needed
76
+ - Prepare documentation and commit when ready
53
77
  transitions:
54
78
  - trigger: 'need_more_analysis'
55
79
  to: 'explore'
@@ -71,43 +95,42 @@ states:
71
95
  finalize:
72
96
  description: 'Code cleanup and documentation finalization'
73
97
  default_instructions: >
74
- You are in the finalize phase. This phase ensures code quality and documentation accuracy through systematic cleanup and review.
98
+ Ensure code quality and documentation accuracy through systematic cleanup and review.
75
99
 
76
100
  **STEP 1: Code Cleanup**
77
101
  Systematically clean up development artifacts:
78
102
 
79
- 1. **Remove Debug Output**: Search for and remove all temporary debug output statements used during development.
80
- Look for language-specific debug output methods (console logging, print statements, debug output functions).
81
- Remove any debugging statements that were added for development purposes.
103
+ - **Remove Debug Output**: Search for and remove all temporary debug output statements used during development.
104
+ Look for language-specific debug output methods (console logging, print statements, debug output functions).
105
+ Remove any debugging statements that were added for development purposes.
82
106
 
83
- 2. **Review TODO/FIXME Comments**:
84
- - Address each TODO/FIXME comment by either implementing the solution or documenting why it's deferred
85
- - Remove completed TODOs
86
- - Convert remaining TODOs to proper issue tracking if needed
107
+ - **Review TODO/FIXME Comments**:
108
+ - Address each TODO/FIXME comment by either implementing the solution or documenting why it's deferred
109
+ - Remove completed TODOs
110
+ - Convert remaining TODOs to proper issue tracking if needed
87
111
 
88
- 3. **Remove Debugging Code Blocks**:
89
- - Remove temporary debugging code, test code blocks, and commented-out code
90
- - Clean up any experimental code that's no longer needed
91
- - Ensure proper error handling replaces temporary debug logging
112
+ - **Remove Debugging Code Blocks**:
113
+ - Remove temporary debugging code, test code blocks, and commented-out code
114
+ - Clean up any experimental code that's no longer needed
115
+ - Ensure proper error handling replaces temporary debug logging
92
116
 
93
117
  **STEP 2: Documentation Review**
94
118
  Review and update documentation to reflect final implementation:
95
119
 
96
- 1. **Update Long-Term Memory Documents**: Based on what was actually implemented:
97
- If $REQUIREMENTS_DOC exists, update $REQUIREMENTS_DOC if requirements changed during development
98
- If $DESIGN_DOC exists, update $DESIGN_DOC if design details were refined or changed
99
- 2. **Compare Against Implementation**: Review documentation against actual implemented functionality
100
- 3. **Update Changed Sections**: Only modify documentation sections that have functional changes
101
- 4. **Remove Development Progress**: Remove references to development iterations, progress notes, and temporary decisions
102
- 5. **Focus on Final State**: Ensure documentation describes the final implemented state, not the development process
103
- 6. **Ask User to Review Document Updates**
120
+ - **Update Long-Term Memory Documents**: Based on what was actually implemented:
121
+ - If `$REQUIREMENTS_DOC` exists: Update `$REQUIREMENTS_DOC` if requirements changed during development
122
+ - If `$DESIGN_DOC` exists: Update `$DESIGN_DOC` if design details were refined or changed
123
+ - **Compare Against Implementation**: Review documentation against actual implemented functionality
124
+ - **Update Changed Sections**: Only modify documentation sections that have functional changes
125
+ - **Remove Development Progress**: Remove references to development iterations, progress notes, and temporary decisions
126
+ - **Focus on Final State**: Ensure documentation describes the final implemented state, not the development process
127
+ - **Ask User to Review Document Updates**
104
128
 
105
129
  **STEP 3: Final Validation**
106
130
  - Run existing tests to ensure cleanup didn't break functionality
107
131
  - Verify documentation accuracy with a final review
108
132
  - Ensure minor enhancement is ready for delivery
109
-
110
- Update task progress and mark completed work as you finalize the minor enhancement.
133
+ - Update task progress and mark completed work as you finalize the minor enhancement
111
134
  transitions:
112
135
  - trigger: 'need_implementation_changes'
113
136
  to: 'implement'
@@ -24,18 +24,21 @@ states:
24
24
  discovery:
25
25
  description: 'Research topic, decide format, and analyze competitive landscape'
26
26
  default_instructions: |
27
- You are in the discovery phase for post development. This is where you define the foundation of your post.
27
+ Define the foundation of your post by establishing topic understanding and format.
28
+
29
+ Determine post format by asking about:
30
+ - Goal (quick insight vs deep exploration)
31
+ - Topic complexity level
32
+ - Available time for development
28
33
 
29
- Focus on understanding the topic and format:
30
- - Help user decide post format: Ask about goal (quick insight vs deep exploration), topic complexity, available time
31
34
  - Research existing content on this topic to identify gaps and opportunities
32
35
  - Guide user to articulate personal motivation and unique angle
33
36
  - Conduct competitive landscape analysis to avoid duplication
34
37
  - Define target audience and platform considerations
35
38
  - Gather initial sources and reference materials
36
39
 
37
- Work with the user to establish clear direction before moving to story development.
38
- Update the plan file with discovery progress and key decisions.
40
+ Establish clear direction before moving to story development.
41
+ Update `$PLAN_FILE` with discovery progress and key decisions.
39
42
 
40
43
  transitions:
41
44
  - trigger: discovery_complete
@@ -45,17 +48,16 @@ states:
45
48
  - trigger: abandon_post
46
49
  to: discovery
47
50
  instructions: |
48
- Post development abandoned. Clean up any discovery work and prepare for new post topics.
49
- The plan file will remain for future reference if needed.
50
- additional_instructions: 'Post development abandoned. Prepare for new post topics.'
51
+ Abandon post development. Clean up any discovery work and prepare for new post topics.
52
+ The `$PLAN_FILE` will remain for future reference if needed.
53
+ additional_instructions: 'Prepare for new post topics.'
51
54
  transition_reason: 'User decided to abandon current post development'
52
55
 
53
56
  story:
54
57
  description: 'Create narrative structure and story outline'
55
58
  default_instructions: |
56
- Working on story development phase. Focus on creating a compelling narrative structure.
59
+ Create a compelling narrative structure for your post.
57
60
 
58
- Key activities for this phase:
59
61
  - Create detailed story outline with clear beginning, middle, end
60
62
  - Identify key messages and memorable metaphors/examples
61
63
  - Define content scope boundaries to maintain focus and avoid adjacent topics
@@ -63,8 +65,8 @@ states:
63
65
  - Ensure narrative arc matches chosen format (concise for short posts, comprehensive for long-form)
64
66
  - Structure content to maintain user's personal voice and conversational style
65
67
 
66
- Work with the user to create a solid story foundation before moving to writing.
67
- Update the plan file with story decisions and structural progress.
68
+ Build a solid story foundation before moving to writing.
69
+ Update `$PLAN_FILE` with story decisions and structural progress.
68
70
 
69
71
  transitions:
70
72
  - trigger: story_complete
@@ -72,28 +74,27 @@ states:
72
74
  additional_instructions: |
73
75
  Story complete! ✅ You have a clear narrative structure and content outline.
74
76
 
75
- Update the plan file with writing tasks and mark completed story work.
77
+ Update `$PLAN_FILE` with writing tasks and mark completed story work.
76
78
  transition_reason: 'Story structure and outline complete, ready for content creation'
77
79
 
78
80
  - trigger: need_more_discovery
79
81
  to: discovery
80
- additional_instructions: 'Story development revealed gaps in research or format clarity. Focus on clarifying these foundational aspects.'
82
+ additional_instructions: 'Resolve gaps in research or format clarity by focusing on foundational aspects.'
81
83
  transition_reason: 'Story work revealed need for additional discovery or research'
82
84
 
83
85
  - trigger: abandon_post
84
86
  to: discovery
85
87
  instructions: |
86
- Post development abandoned during story phase. Clean up story work and return to discovery.
87
- The plan file and any completed work will remain for future reference.
88
- additional_instructions: 'Post abandoned during story phase. Clean up and prepare for new topics.'
88
+ Abandon post development during story phase. Clean up story work and return to discovery.
89
+ The `$PLAN_FILE` and any completed work will remain for future reference.
90
+ additional_instructions: 'Clean up and prepare for new topics.'
89
91
  transition_reason: 'User decided to abandon post during story phase'
90
92
 
91
93
  writing:
92
94
  description: 'Create the actual post content following story outline'
93
95
  default_instructions: |
94
- Working on writing phase. Focus purely on creating engaging content.
96
+ Create engaging content following the established story outline.
95
97
 
96
- Key activities for this phase:
97
98
  - Write content following the established story outline
98
99
  - Maintain consistent narrative flow and personal voice
99
100
  - Create engaging, conversational content in user's style
@@ -103,7 +104,7 @@ states:
103
104
  - Create clear section structure with appropriate headings (for long-form)
104
105
 
105
106
  Focus on high-quality content creation without visual elements.
106
- Update the plan file with writing progress and content decisions.
107
+ Update `$PLAN_FILE` with writing progress and content decisions.
107
108
 
108
109
  transitions:
109
110
  - trigger: writing_complete
@@ -111,28 +112,27 @@ states:
111
112
  additional_instructions: |
112
113
  Writing complete! ✅ You have solid content that follows your story outline.
113
114
 
114
- Update the plan file with illustration tasks and mark completed writing work.
115
+ Update `$PLAN_FILE` with illustration tasks and mark completed writing work.
115
116
  transition_reason: 'Content creation complete, ready for visual enhancement'
116
117
 
117
118
  - trigger: need_story_revision
118
119
  to: story
119
- additional_instructions: 'Writing revealed issues with story structure or narrative flow. Focus on refining the story foundation.'
120
+ additional_instructions: 'Refine the story foundation to address issues with structure or narrative flow.'
120
121
  transition_reason: 'Content creation revealed need for story structure refinement'
121
122
 
122
123
  - trigger: abandon_post
123
124
  to: discovery
124
125
  instructions: |
125
- Post development abandoned during writing. Clean up writing work and return to discovery.
126
- The plan file and any completed work will remain for future reference.
127
- additional_instructions: 'Post abandoned during writing phase. Clean up and prepare for new topics.'
126
+ Abandon post development during writing. Clean up writing work and return to discovery.
127
+ The `$PLAN_FILE` and any completed work will remain for future reference.
128
+ additional_instructions: 'Clean up and prepare for new topics.'
128
129
  transition_reason: 'User decided to abandon post during writing phase'
129
130
 
130
131
  illustration:
131
132
  description: 'Create and integrate visual elements'
132
133
  default_instructions: |
133
- Working on illustration phase. Focus on visual enhancement of your content.
134
+ Enhance your content with visual elements.
134
135
 
135
- Key activities for this phase:
136
136
  - Identify strategic locations for visual elements
137
137
  - Create or source appropriate visuals (screenshots, diagrams, metaphorical images)
138
138
  - Ensure visual density matches format (minimal for short posts, comprehensive for long-form)
@@ -141,8 +141,8 @@ states:
141
141
  - Consider accessibility and platform compatibility
142
142
  - Plan visual integration and placement
143
143
 
144
- Focus on creating visuals that enhance rather than distract from the content.
145
- Update the plan file with illustration progress and visual decisions.
144
+ Create visuals that enhance rather than distract from the content.
145
+ Update `$PLAN_FILE` with illustration progress and visual decisions.
146
146
 
147
147
  transitions:
148
148
  - trigger: illustration_complete
@@ -150,28 +150,27 @@ states:
150
150
  additional_instructions: |
151
151
  Illustration complete! ✅ You have visually enhanced content ready for publishing.
152
152
 
153
- Update the plan file with distribution tasks and mark completed illustration work.
153
+ Update `$PLAN_FILE` with distribution tasks and mark completed illustration work.
154
154
  transition_reason: 'Visual elements complete, ready for SEO optimization and publishing'
155
155
 
156
156
  - trigger: need_more_content
157
157
  to: writing
158
- additional_instructions: 'Illustration work revealed gaps in written content. Focus on completing the content foundation.'
158
+ additional_instructions: 'Complete the content foundation to address gaps revealed during visual work.'
159
159
  transition_reason: 'Visual work revealed need for additional written content'
160
160
 
161
161
  - trigger: abandon_post
162
162
  to: discovery
163
163
  instructions: |
164
- Post development abandoned during illustration. Clean up illustration work and return to discovery.
165
- The plan file and any completed work will remain for future reference.
166
- additional_instructions: 'Post abandoned during illustration phase. Clean up and prepare for new topics.'
164
+ Abandon post development during illustration. Clean up illustration work and return to discovery.
165
+ The `$PLAN_FILE` and any completed work will remain for future reference.
166
+ additional_instructions: 'Clean up and prepare for new topics.'
167
167
  transition_reason: 'User decided to abandon post during illustration phase'
168
168
 
169
169
  distribution:
170
170
  description: 'Optimize for SEO and publish across platforms'
171
171
  default_instructions: |
172
- Working on distribution phase. Focus on optimization and multi-platform publishing.
172
+ Optimize content and publish across multiple platforms.
173
173
 
174
- Key activities for this phase:
175
174
  - Create compelling, SEO-optimized titles and descriptions
176
175
  - Add appropriate tags and metadata for discoverability
177
176
  - Adapt content formatting for different platforms (LinkedIn, Medium, HN)
@@ -180,8 +179,8 @@ states:
180
179
  - Prepare publishing materials and schedule
181
180
  - Execute multi-platform publishing strategy
182
181
 
183
- Focus on maximizing reach while maintaining content quality and consistency.
184
- Update the plan file with distribution progress and publishing decisions.
182
+ Maximize reach while maintaining content quality and consistency.
183
+ Update `$PLAN_FILE` with distribution progress and publishing decisions.
185
184
 
186
185
  transitions:
187
186
  - trigger: distribution_complete
@@ -190,13 +189,13 @@ states:
190
189
 
191
190
  - trigger: need_final_review
192
191
  to: illustration
193
- additional_instructions: 'Distribution preparation revealed issues with visuals or content presentation. Focus on final refinements.'
192
+ additional_instructions: 'Refine visuals or content presentation based on issues identified during publishing preparation.'
194
193
  transition_reason: 'Publishing preparation identified issues requiring visual or content refinement'
195
194
 
196
195
  - trigger: abandon_post
197
196
  to: discovery
198
197
  instructions: |
199
- Post development abandoned before distribution. Clean up distribution preparation and return to discovery.
200
- The plan file and completed work will remain for future reference.
201
- additional_instructions: 'Post abandoned before distribution. Clean up and prepare for new topics.'
198
+ Abandon post development before distribution. Clean up distribution preparation and return to discovery.
199
+ The `$PLAN_FILE` and completed work will remain for future reference.
200
+ additional_instructions: 'Clean up and prepare for new topics.'
202
201
  transition_reason: 'User decided to abandon post before distribution'