@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.
- package/package.json +9 -5
- package/resources/templates/architecture/arc42/arc42-template-EN.md +1077 -0
- package/resources/templates/architecture/arc42/images/01_2_iso-25010-topics-EN.drawio-2023.png +0 -0
- package/resources/templates/architecture/arc42/images/01_2_iso-25010-topics-EN.drawio.png +0 -0
- package/resources/templates/architecture/arc42/images/05_building_blocks-EN.png +0 -0
- package/resources/templates/architecture/arc42/images/08-concepts-EN.drawio.png +0 -0
- package/resources/templates/architecture/arc42/images/arc42-logo.png +0 -0
- package/resources/templates/architecture/c4.md +224 -0
- package/resources/templates/architecture/freestyle.md +53 -0
- package/resources/templates/architecture/none.md +17 -0
- package/resources/templates/design/comprehensive.md +207 -0
- package/resources/templates/design/freestyle.md +37 -0
- package/resources/templates/design/none.md +17 -0
- package/resources/templates/requirements/ears.md +90 -0
- package/resources/templates/requirements/freestyle.md +42 -0
- package/resources/templates/requirements/none.md +17 -0
- package/resources/workflows/big-bang-conversion.yaml +539 -0
- package/resources/workflows/boundary-testing.yaml +334 -0
- package/resources/workflows/bugfix.yaml +185 -0
- package/resources/workflows/business-analysis.yaml +671 -0
- package/resources/workflows/c4-analysis.yaml +485 -0
- package/resources/workflows/epcc.yaml +161 -0
- package/resources/workflows/greenfield.yaml +189 -0
- package/resources/workflows/minor.yaml +127 -0
- package/resources/workflows/posts.yaml +207 -0
- package/resources/workflows/slides.yaml +256 -0
- package/resources/workflows/tdd.yaml +157 -0
- package/resources/workflows/waterfall.yaml +195 -0
- package/.turbo/turbo-build.log +0 -4
- package/src/config-manager.ts +0 -96
- package/src/conversation-manager.ts +0 -489
- package/src/database.ts +0 -427
- package/src/file-detection-manager.ts +0 -302
- package/src/git-manager.ts +0 -64
- package/src/index.ts +0 -28
- package/src/instruction-generator.ts +0 -210
- package/src/interaction-logger.ts +0 -109
- package/src/logger.ts +0 -353
- package/src/path-validation-utils.ts +0 -261
- package/src/plan-manager.ts +0 -323
- package/src/project-docs-manager.ts +0 -523
- package/src/state-machine-loader.ts +0 -365
- package/src/state-machine-types.ts +0 -72
- package/src/state-machine.ts +0 -370
- package/src/system-prompt-generator.ts +0 -122
- package/src/template-manager.ts +0 -328
- package/src/transition-engine.ts +0 -386
- package/src/types.ts +0 -60
- package/src/workflow-manager.ts +0 -606
- package/test/unit/conversation-manager.test.ts +0 -179
- package/test/unit/custom-workflow-loading.test.ts +0 -174
- package/test/unit/directory-linking-and-extensions.test.ts +0 -338
- package/test/unit/file-linking-integration.test.ts +0 -256
- package/test/unit/git-commit-integration.test.ts +0 -91
- package/test/unit/git-manager.test.ts +0 -86
- package/test/unit/install-workflow.test.ts +0 -138
- package/test/unit/instruction-generator.test.ts +0 -247
- package/test/unit/list-workflows-filtering.test.ts +0 -68
- package/test/unit/none-template-functionality.test.ts +0 -224
- package/test/unit/project-docs-manager.test.ts +0 -337
- package/test/unit/state-machine-loader.test.ts +0 -234
- package/test/unit/template-manager.test.ts +0 -217
- package/test/unit/validate-workflow-name.test.ts +0 -150
- package/test/unit/workflow-domain-filtering.test.ts +0 -75
- package/test/unit/workflow-enum-generation.test.ts +0 -92
- package/test/unit/workflow-manager-enhanced-path-resolution.test.ts +0 -369
- package/test/unit/workflow-manager-path-resolution.test.ts +0 -150
- package/test/unit/workflow-migration.test.ts +0 -155
- package/test/unit/workflow-override-by-name.test.ts +0 -116
- package/test/unit/workflow-prioritization.test.ts +0 -38
- package/test/unit/workflow-validation.test.ts +0 -303
- package/test/utils/e2e-test-setup.ts +0 -453
- package/test/utils/run-server-in-dir.sh +0 -27
- package/test/utils/temp-files.ts +0 -308
- package/test/utils/test-access.ts +0 -79
- package/test/utils/test-helpers.ts +0 -286
- package/test/utils/test-setup.ts +0 -78
- package/tsconfig.build.json +0 -21
- package/tsconfig.json +0 -8
- package/vitest.config.ts +0 -18
@@ -0,0 +1,189 @@
|
|
1
|
+
# yaml-language-server: $schema=../state-machine-schema.json
|
2
|
+
---
|
3
|
+
name: 'greenfield'
|
4
|
+
description: 'A comprehensive workflow for starting new projects from scratch: Ideation, Architecture, Plan, Code, Document - ideal for greenfield projects requiring thorough upfront planning'
|
5
|
+
initial_state: 'ideation'
|
6
|
+
|
7
|
+
# Enhanced metadata for better discoverability
|
8
|
+
metadata:
|
9
|
+
domain: 'code'
|
10
|
+
complexity: 'high'
|
11
|
+
bestFor:
|
12
|
+
- 'New projects from scratch'
|
13
|
+
- 'Greenfield development'
|
14
|
+
- 'Complex system design'
|
15
|
+
- 'Comprehensive planning needed'
|
16
|
+
useCases:
|
17
|
+
- 'Starting a new application'
|
18
|
+
- 'Building a new service'
|
19
|
+
- 'Creating a new library'
|
20
|
+
examples:
|
21
|
+
- 'Build a new web application'
|
22
|
+
- 'Create a microservice architecture'
|
23
|
+
- 'Develop a new CLI tool'
|
24
|
+
requiresDocumentation: true
|
25
|
+
|
26
|
+
# States with default instructions and transitions
|
27
|
+
states:
|
28
|
+
ideation:
|
29
|
+
description: 'Deep requirements discovery and PRD creation phase'
|
30
|
+
default_instructions: |
|
31
|
+
You are in the ideation phase for greenfield project.
|
32
|
+
Understand WHAT the system should do, WHO will use it, WHY it's needed, and WHAT'S in/out of scope, e. g.
|
33
|
+
• Are there existing solutions? What gaps do they have?
|
34
|
+
• What technologies must/cannot be used? Why?
|
35
|
+
• How will you measure product success?
|
36
|
+
• Have you validated this need with potential users?
|
37
|
+
Don't discuss technical implementation yet - focus purely on understanding the problem space and requirements. Document all findings in $REQUIREMENTS_DOC and the plan file.
|
38
|
+
transitions:
|
39
|
+
- trigger: 'ideation_complete'
|
40
|
+
to: 'architecture'
|
41
|
+
additional_instructions: 'Ideation is complete! ✅ Present the PRD to the user. Mark completed ideation tasks.'
|
42
|
+
transition_reason: 'PRD is complete with clear requirements, ready for technical architecture design'
|
43
|
+
review_perspectives:
|
44
|
+
- perspective: 'business_analyst'
|
45
|
+
prompt: 'Review the Product Requirements Document for completeness, clarity, and business value. Ensure all stakeholder needs are captured, requirements are testable, and scope is well-defined.'
|
46
|
+
- perspective: 'ux_expert'
|
47
|
+
prompt: 'Evaluate user experience requirements and usability considerations. Ensure user personas, workflows, and interaction patterns are properly defined for the greenfield project.'
|
48
|
+
|
49
|
+
- trigger: 'abandon_project'
|
50
|
+
to: 'ideation'
|
51
|
+
instructions: >
|
52
|
+
Project development abandoned. Return to ideation state for new projects.
|
53
|
+
The plan file will remain for future reference if needed.
|
54
|
+
additional_instructions: 'Project development abandoned. Clean up any ideation work and prepare for new projects.'
|
55
|
+
transition_reason: 'User decided to abandon current project development'
|
56
|
+
|
57
|
+
architecture:
|
58
|
+
description: 'Tech stack selection and architecture design phase'
|
59
|
+
default_instructions: "You are in the architecture phase. Based on the requirements from $REQUIREMENTS_DOC, now design the technical solution. Ask about the user's technical preferences and experience. Challenge their choices by presenting alternatives. Evaluate pros and cons of different tech stacks, frameworks, and architectural patterns. Consider non-functional requirements like scalability, performance, maintainability, and deployment. Create a comprehensive architecture document in $ARCHITECTURE_DOC. Don't start coding yet - focus on technical design decisions."
|
60
|
+
transitions:
|
61
|
+
- trigger: 'need_more_ideation'
|
62
|
+
to: 'ideation'
|
63
|
+
additional_instructions: 'Architecture work revealed gaps in requirements understanding. Focus on the specific requirements areas that need clarification before continuing with technical design.'
|
64
|
+
transition_reason: 'Architecture work revealed need for more requirements clarification'
|
65
|
+
|
66
|
+
- trigger: 'architecture_complete'
|
67
|
+
to: 'plan'
|
68
|
+
additional_instructions: 'Architecture is complete! ✅ You have a solid technical foundation with clear tech stack choices and architectural decisions. Present the implementation plan to the user and document it thoroughly. Mark completed architecture tasks.'
|
69
|
+
transition_reason: 'Technical architecture is complete, ready for implementation planning'
|
70
|
+
review_perspectives:
|
71
|
+
- perspective: 'architect'
|
72
|
+
prompt: 'Review the technical architecture for completeness, scalability, and maintainability. Ensure technology choices are appropriate and architectural patterns are sound for a greenfield project.'
|
73
|
+
- perspective: 'security_expert'
|
74
|
+
prompt: 'Evaluate security architecture, data protection strategies, and potential vulnerabilities. Ensure security is built into the foundation of the greenfield project from the start.'
|
75
|
+
|
76
|
+
- trigger: 'abandon_project'
|
77
|
+
to: 'ideation'
|
78
|
+
instructions: >
|
79
|
+
Project development abandoned during architecture phase. Return to ideation state for new projects.
|
80
|
+
The plan file and PRD will remain for future reference.
|
81
|
+
additional_instructions: 'Project development abandoned during architecture phase. Clean up any architecture work and prepare for new projects.'
|
82
|
+
transition_reason: 'User decided to abandon project during architecture phase'
|
83
|
+
|
84
|
+
plan:
|
85
|
+
description: 'Implementation planning phase based on established architecture'
|
86
|
+
default_instructions: 'You are in the planning phase. Based on your completed architecture in $ARCHITECTURE_DOC and requirements from $REQUIREMENTS_DOC, create a detailed implementation strategy. Break down the work into specific, actionable tasks considering the chosen tech stack and architectural decisions. Plan the implementation order, identify dependencies, and consider potential risks. Document the detailed design in $DESIGN_DOC and the plan thoroughly with clear milestones. Important: Tasks for the actual coding should be organized in the Code section of the plan.'
|
87
|
+
transitions:
|
88
|
+
- trigger: 'need_architecture_changes'
|
89
|
+
to: 'architecture'
|
90
|
+
additional_instructions: "Planning revealed issues with the current architecture. Consider what you've learned during planning and adjust the technical design accordingly. Document the changes and reasons."
|
91
|
+
transition_reason: 'Planning work revealed need to revise the architecture'
|
92
|
+
|
93
|
+
- trigger: 'plan_complete'
|
94
|
+
to: 'code'
|
95
|
+
additional_instructions: "Implementation plan is complete! ✅ Now transition to coding phase. Read specific documentation before using the chosen libraries and frameworks. Follow the architectural patterns and tech stack decisions you've made. Modularize your code according to best practices. Stay focused on the current project scope defined in your PRD. Mark completed planning tasks."
|
96
|
+
transition_reason: 'Implementation plan is complete and ready for coding'
|
97
|
+
|
98
|
+
- trigger: 'abandon_project'
|
99
|
+
to: 'ideation'
|
100
|
+
instructions: >
|
101
|
+
Project development abandoned during planning. Return to ideation state for new projects.
|
102
|
+
The plan file, PRD, and architecture documentation will remain for future reference.
|
103
|
+
additional_instructions: 'Project development abandoned during planning. Clean up any planning work and prepare for new projects.'
|
104
|
+
transition_reason: 'User decided to abandon project during planning phase'
|
105
|
+
|
106
|
+
code:
|
107
|
+
description: 'Implementation phase following the established plan and architecture'
|
108
|
+
default_instructions: 'You are in the implementation phase. Follow your plan and detailed design from $DESIGN_DOC to build the solution using the architecture from $ARCHITECTURE_DOC. Ensure all requirements from $REQUIREMENTS_DOC you are currently working on are met. Write clean, well-structured code with proper error handling. Prevent regression by building, linting, and executing existing tests. Stay flexible and adapt the plan as you learn more during implementation, but maintain alignment with your architecture decisions. Update progress in the plan file. Important: Focus on tasks in the Code section of your plan.'
|
109
|
+
transitions:
|
110
|
+
- trigger: 'need_replanning'
|
111
|
+
to: 'plan'
|
112
|
+
additional_instructions: "Implementation revealed issues with the current plan. Consider what you've learned during coding and adjust the implementation strategy accordingly while maintaining architectural consistency. Document the changes and reasons."
|
113
|
+
transition_reason: 'Implementation work revealed need to revise the plan'
|
114
|
+
|
115
|
+
- trigger: 'need_architecture_changes'
|
116
|
+
to: 'architecture'
|
117
|
+
additional_instructions: 'Implementation revealed fundamental issues with the architecture that require design changes. Focus on the specific architectural problems that are blocking implementation progress.'
|
118
|
+
transition_reason: 'Implementation work revealed need for architectural changes'
|
119
|
+
|
120
|
+
- trigger: 'code_complete'
|
121
|
+
to: 'finalize'
|
122
|
+
additional_instructions: 'Implementation is complete! ✅ Now transition to finalization phase. Mark completed implementation tasks.'
|
123
|
+
transition_reason: 'Core implementation is complete, ready for comprehensive documentation'
|
124
|
+
|
125
|
+
- trigger: 'abandon_project'
|
126
|
+
to: 'ideation'
|
127
|
+
instructions: >
|
128
|
+
Project development abandoned during implementation. Clean up any incomplete code and return to ideation.
|
129
|
+
The plan file, PRD, architecture documentation, and any completed work will remain for future reference.
|
130
|
+
additional_instructions: 'Project development abandoned during implementation. Clean up any incomplete code and prepare for new projects.'
|
131
|
+
transition_reason: 'User decided to abandon project during implementation'
|
132
|
+
|
133
|
+
finalize:
|
134
|
+
description: 'Code cleanup and documentation finalization'
|
135
|
+
default_instructions: >
|
136
|
+
You are in the finalize phase. This phase ensures code quality and documentation accuracy through systematic cleanup and review.
|
137
|
+
|
138
|
+
**STEP 1: Code Cleanup**
|
139
|
+
Systematically clean up development artifacts:
|
140
|
+
|
141
|
+
1. **Remove Debug Output**: Search for and remove all temporary debug output statements used during development.
|
142
|
+
Look for language-specific debug output methods (console logging, print statements, debug output functions).
|
143
|
+
Remove any debugging statements that were added for development purposes.
|
144
|
+
|
145
|
+
2. **Review TODO/FIXME Comments**:
|
146
|
+
- Address each TODO/FIXME comment by either implementing the solution or documenting why it's deferred
|
147
|
+
- Remove completed TODOs
|
148
|
+
- Convert remaining TODOs to proper issue tracking if needed
|
149
|
+
|
150
|
+
3. **Remove Debugging Code Blocks**:
|
151
|
+
- Remove temporary debugging code, test code blocks, and commented-out code
|
152
|
+
- Clean up any experimental code that's no longer needed
|
153
|
+
- Ensure proper error handling replaces temporary debug logging
|
154
|
+
|
155
|
+
**STEP 2: Documentation Review**
|
156
|
+
Review and update documentation to reflect final implementation:
|
157
|
+
|
158
|
+
1. **Update Long-Term Memory Documents**: Based on what was actually implemented:
|
159
|
+
• Update $REQUIREMENTS_DOC if requirements changed during development
|
160
|
+
• Update $ARCHITECTURE_DOC if architectural decisions evolved
|
161
|
+
• Update $DESIGN_DOC if design details were refined or changed
|
162
|
+
2. **Compare Against Implementation**: Review documentation against actual implemented functionality
|
163
|
+
3. **Update Changed Sections**: Only modify documentation sections that have functional changes
|
164
|
+
4. **Remove Development Progress**: Remove references to development iterations, progress notes, and temporary decisions
|
165
|
+
5. **Focus on Final State**: Ensure documentation describes the final implemented state, not the development process
|
166
|
+
6. **Ask User to Review Document Updates**
|
167
|
+
6. **Comprehensive Documentation**: Ensure project has complete documentation for newcomers including setup, usage, architecture overview, and contribution guidelines
|
168
|
+
|
169
|
+
**STEP 3: Final Validation**
|
170
|
+
- Run existing tests to ensure cleanup didn't break functionality
|
171
|
+
- Verify documentation accuracy with a final review
|
172
|
+
- Ensure project is ready for users and contributors
|
173
|
+
|
174
|
+
Update the plan file with finalization progress and mark completed tasks.
|
175
|
+
transitions:
|
176
|
+
- trigger: 'need_code_changes'
|
177
|
+
to: 'code'
|
178
|
+
additional_instructions: 'Finalization revealed issues that require code changes. Focus on the problems identified during final review that affect usability or functionality.'
|
179
|
+
transition_reason: 'Finalization revealed issues requiring code changes'
|
180
|
+
|
181
|
+
- trigger: 'finalization_complete'
|
182
|
+
to: 'ideation'
|
183
|
+
additional_instructions: 'Greenfield project is complete and ready for delivery! All phases successfully finished. Prepare for the next greenfield project.'
|
184
|
+
transition_reason: 'Project delivery complete with finalized code and documentation, ready for next greenfield project'
|
185
|
+
|
186
|
+
- trigger: 'abandon_project'
|
187
|
+
to: 'ideation'
|
188
|
+
additional_instructions: 'Project development abandoned during finalization. Clean up any finalization artifacts and prepare for new projects.'
|
189
|
+
transition_reason: 'User decided to abandon project during finalization phase'
|
@@ -0,0 +1,127 @@
|
|
1
|
+
# yaml-language-server: $schema=../state-machine-schema.json
|
2
|
+
---
|
3
|
+
name: 'minor'
|
4
|
+
description: 'A streamlined workflow for small-impact changes: Explore (analysis + design) → Implement (code + test + commit) - optimized for minor enhancements'
|
5
|
+
initial_state: 'explore'
|
6
|
+
|
7
|
+
# Enhanced metadata for better discoverability
|
8
|
+
metadata:
|
9
|
+
domain: 'code'
|
10
|
+
complexity: 'low'
|
11
|
+
bestFor:
|
12
|
+
- 'Small bug fixes'
|
13
|
+
- 'Minor feature enhancements'
|
14
|
+
- 'Code refactoring'
|
15
|
+
- 'Documentation updates'
|
16
|
+
useCases:
|
17
|
+
- 'Adding a new parameter to an existing function'
|
18
|
+
- 'Improving error messages'
|
19
|
+
- 'Small UI adjustments'
|
20
|
+
examples:
|
21
|
+
- 'Fix a typo in user interface text'
|
22
|
+
- 'Add validation to an input field'
|
23
|
+
- 'Enhance logging in a specific module'
|
24
|
+
|
25
|
+
# States with default instructions and transitions
|
26
|
+
states:
|
27
|
+
explore:
|
28
|
+
description: 'Analysis and design phase - understanding and planning without implementation'
|
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
|
+
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 the plan file. If $DESIGN_DOC exists, respect the design approach in $DESIGN_DOC.
|
34
|
+
Document your analysis and design decisions in the plan file.
|
35
|
+
Focus on analysis and design only - do not write any code yet.
|
36
|
+
transitions:
|
37
|
+
- trigger: 'exploration_complete'
|
38
|
+
to: 'implement'
|
39
|
+
additional_instructions: 'Analysis and design complete! ✅ Now transition to implementation phase. You have a clear understanding of the problem and a solid design approach. Keep the scope focused on the minor enhancement. Mark completed exploration tasks.'
|
40
|
+
transition_reason: 'Analysis and design complete, ready for streamlined implementation'
|
41
|
+
|
42
|
+
- trigger: 'abandon_feature'
|
43
|
+
to: 'explore'
|
44
|
+
instructions: >
|
45
|
+
Minor enhancement abandoned. Revert potentially made changes.
|
46
|
+
Return to exploration state for new tasks.
|
47
|
+
The plan file will remain for future reference if needed.
|
48
|
+
additional_instructions: 'Minor enhancement development abandoned. Clean up any analysis work and prepare for new tasks.'
|
49
|
+
transition_reason: 'User decided to abandon current minor enhancement'
|
50
|
+
|
51
|
+
implement:
|
52
|
+
description: 'Combined implementation phase - code, test, and commit'
|
53
|
+
default_instructions: "You are in the implementation phase for minor enhancement. 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 plan file requirements are met. 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 progress in the plan file."
|
54
|
+
transitions:
|
55
|
+
- trigger: 'need_more_analysis'
|
56
|
+
to: 'explore'
|
57
|
+
additional_instructions: 'Implementation revealed gaps in analysis or design. Focus on the specific areas that need clarification before continuing with implementation.'
|
58
|
+
transition_reason: 'Implementation work revealed need for more analysis or design'
|
59
|
+
|
60
|
+
- trigger: 'implementation_complete'
|
61
|
+
to: 'finalize'
|
62
|
+
additional_instructions: 'Implementation is complete! Clean up code and finalize documentation to ensure everything is ready for delivery. Mark all implementation tasks as complete.'
|
63
|
+
transition_reason: 'Implementation complete, ready for finalization'
|
64
|
+
|
65
|
+
- trigger: 'abandon_feature'
|
66
|
+
to: 'explore'
|
67
|
+
instructions: >
|
68
|
+
Minor enhancement abandoned during implementation. Clean up any incomplete code and return to exploration.
|
69
|
+
The plan file and any completed work will remain for future reference.
|
70
|
+
additional_instructions: 'Minor enhancement abandoned during implementation. Clean up any incomplete code and prepare for new tasks.'
|
71
|
+
transition_reason: 'User decided to abandon minor enhancement during implementation'
|
72
|
+
|
73
|
+
finalize:
|
74
|
+
description: 'Code cleanup and documentation finalization'
|
75
|
+
default_instructions: >
|
76
|
+
You are in the finalize phase. This phase ensures code quality and documentation accuracy through systematic cleanup and review.
|
77
|
+
|
78
|
+
**STEP 1: Code Cleanup**
|
79
|
+
Systematically clean up development artifacts:
|
80
|
+
|
81
|
+
1. **Remove Debug Output**: Search for and remove all temporary debug output statements used during development.
|
82
|
+
Look for language-specific debug output methods (console logging, print statements, debug output functions).
|
83
|
+
Remove any debugging statements that were added for development purposes.
|
84
|
+
|
85
|
+
2. **Review TODO/FIXME Comments**:
|
86
|
+
- Address each TODO/FIXME comment by either implementing the solution or documenting why it's deferred
|
87
|
+
- Remove completed TODOs
|
88
|
+
- Convert remaining TODOs to proper issue tracking if needed
|
89
|
+
|
90
|
+
3. **Remove Debugging Code Blocks**:
|
91
|
+
- Remove temporary debugging code, test code blocks, and commented-out code
|
92
|
+
- Clean up any experimental code that's no longer needed
|
93
|
+
- Ensure proper error handling replaces temporary debug logging
|
94
|
+
|
95
|
+
**STEP 2: Documentation Review**
|
96
|
+
Review and update documentation to reflect final implementation:
|
97
|
+
|
98
|
+
1. **Update Long-Term Memory Documents**: Based on what was actually implemented:
|
99
|
+
• If $REQUIREMENTS_DOC exists, update $REQUIREMENTS_DOC if requirements changed during development
|
100
|
+
• If $DESIGN_DOC exists, update $DESIGN_DOC if design details were refined or changed
|
101
|
+
2. **Compare Against Implementation**: Review documentation against actual implemented functionality
|
102
|
+
3. **Update Changed Sections**: Only modify documentation sections that have functional changes
|
103
|
+
4. **Remove Development Progress**: Remove references to development iterations, progress notes, and temporary decisions
|
104
|
+
5. **Focus on Final State**: Ensure documentation describes the final implemented state, not the development process
|
105
|
+
6. **Ask User to Review Document Updates**
|
106
|
+
|
107
|
+
**STEP 3: Final Validation**
|
108
|
+
- Run existing tests to ensure cleanup didn't break functionality
|
109
|
+
- Verify documentation accuracy with a final review
|
110
|
+
- Ensure minor enhancement is ready for delivery
|
111
|
+
|
112
|
+
Update the plan file with finalization progress and mark completed tasks.
|
113
|
+
transitions:
|
114
|
+
- trigger: 'need_implementation_changes'
|
115
|
+
to: 'implement'
|
116
|
+
additional_instructions: 'Finalization revealed issues that require implementation changes. Focus on the specific problems identified during final review.'
|
117
|
+
transition_reason: 'Finalization revealed issues requiring implementation changes'
|
118
|
+
|
119
|
+
- trigger: 'finalization_complete'
|
120
|
+
to: 'explore'
|
121
|
+
additional_instructions: 'Minor enhancement is complete and finalized! All work is finished and ready for delivery. Prepare for the next development task.'
|
122
|
+
transition_reason: 'Minor enhancement delivery complete, ready for next task'
|
123
|
+
|
124
|
+
- trigger: 'abandon_feature'
|
125
|
+
to: 'explore'
|
126
|
+
additional_instructions: 'Minor enhancement abandoned during finalization. Clean up any finalization artifacts and prepare for new tasks.'
|
127
|
+
transition_reason: 'User decided to abandon minor enhancement during finalization'
|
@@ -0,0 +1,207 @@
|
|
1
|
+
name: posts
|
2
|
+
description: 'A comprehensive workflow for writing posts - from blog posts to short-form content, with research, story development, and multi-platform publishing'
|
3
|
+
initial_state: discovery
|
4
|
+
|
5
|
+
# Enhanced metadata for better discoverability
|
6
|
+
metadata:
|
7
|
+
domain: 'office'
|
8
|
+
complexity: 'medium'
|
9
|
+
bestFor:
|
10
|
+
- 'Blog post writing'
|
11
|
+
- 'Content creation'
|
12
|
+
- 'Article development'
|
13
|
+
- 'Social media content'
|
14
|
+
useCases:
|
15
|
+
- 'Writing technical blog posts'
|
16
|
+
- 'Creating marketing content'
|
17
|
+
- 'Developing thought leadership articles'
|
18
|
+
examples:
|
19
|
+
- 'Write a tutorial blog post'
|
20
|
+
- 'Create a product announcement'
|
21
|
+
- 'Develop a technical deep-dive article'
|
22
|
+
|
23
|
+
states:
|
24
|
+
discovery:
|
25
|
+
description: 'Research topic, decide format, and analyze competitive landscape'
|
26
|
+
default_instructions: |
|
27
|
+
You are in the discovery phase for post development. This is where you define the foundation of your post.
|
28
|
+
|
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
|
+
- Research existing content on this topic to identify gaps and opportunities
|
32
|
+
- Guide user to articulate personal motivation and unique angle
|
33
|
+
- Conduct competitive landscape analysis to avoid duplication
|
34
|
+
- Define target audience and platform considerations
|
35
|
+
- Gather initial sources and reference materials
|
36
|
+
|
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.
|
39
|
+
|
40
|
+
transitions:
|
41
|
+
- trigger: discovery_complete
|
42
|
+
to: story
|
43
|
+
additional_instructions: |
|
44
|
+
Discovery complete! ✅ You have clear format decision, unique angle, and research foundation.
|
45
|
+
|
46
|
+
Update the plan file with story development tasks and mark completed discovery work.
|
47
|
+
transition_reason: 'Topic researched and format decided, ready for story structure development'
|
48
|
+
|
49
|
+
- trigger: abandon_post
|
50
|
+
to: discovery
|
51
|
+
instructions: |
|
52
|
+
Post development abandoned. Clean up any discovery work and prepare for new post topics.
|
53
|
+
The plan file will remain for future reference if needed.
|
54
|
+
additional_instructions: 'Post development abandoned. Prepare for new post topics.'
|
55
|
+
transition_reason: 'User decided to abandon current post development'
|
56
|
+
|
57
|
+
story:
|
58
|
+
description: 'Create narrative structure and story outline'
|
59
|
+
default_instructions: |
|
60
|
+
Working on story development phase. Focus on creating a compelling narrative structure.
|
61
|
+
|
62
|
+
Key activities for this phase:
|
63
|
+
- Create detailed story outline with clear beginning, middle, end
|
64
|
+
- Identify key messages and memorable metaphors/examples
|
65
|
+
- Define content scope boundaries to maintain focus and avoid adjacent topics
|
66
|
+
- Plan how content will adapt across different platforms
|
67
|
+
- Ensure narrative arc matches chosen format (concise for short posts, comprehensive for long-form)
|
68
|
+
- Structure content to maintain user's personal voice and conversational style
|
69
|
+
|
70
|
+
Work with the user to create a solid story foundation before moving to writing.
|
71
|
+
Update the plan file with story decisions and structural progress.
|
72
|
+
|
73
|
+
transitions:
|
74
|
+
- trigger: story_complete
|
75
|
+
to: writing
|
76
|
+
additional_instructions: |
|
77
|
+
Story complete! ✅ You have a clear narrative structure and content outline.
|
78
|
+
|
79
|
+
Update the plan file with writing tasks and mark completed story work.
|
80
|
+
transition_reason: 'Story structure and outline complete, ready for content creation'
|
81
|
+
|
82
|
+
- trigger: need_more_discovery
|
83
|
+
to: discovery
|
84
|
+
additional_instructions: 'Story development revealed gaps in research or format clarity. Focus on clarifying these foundational aspects.'
|
85
|
+
transition_reason: 'Story work revealed need for additional discovery or research'
|
86
|
+
|
87
|
+
- trigger: abandon_post
|
88
|
+
to: discovery
|
89
|
+
instructions: |
|
90
|
+
Post development abandoned during story phase. Clean up story work and return to discovery.
|
91
|
+
The plan file and any completed work will remain for future reference.
|
92
|
+
additional_instructions: 'Post abandoned during story phase. Clean up and prepare for new topics.'
|
93
|
+
transition_reason: 'User decided to abandon post during story phase'
|
94
|
+
|
95
|
+
writing:
|
96
|
+
description: 'Create the actual post content following story outline'
|
97
|
+
default_instructions: |
|
98
|
+
Working on writing phase. Focus purely on creating engaging content.
|
99
|
+
|
100
|
+
Key activities for this phase:
|
101
|
+
- Write content following the established story outline
|
102
|
+
- Maintain consistent narrative flow and personal voice
|
103
|
+
- Create engaging, conversational content in user's style
|
104
|
+
- Ensure content length matches chosen format (3-10 lines for short, 2000-5000+ words for long)
|
105
|
+
- Stay within defined content scope to avoid adjacent topics
|
106
|
+
- Include concrete examples and metaphors as planned
|
107
|
+
- Create clear section structure with appropriate headings (for long-form)
|
108
|
+
|
109
|
+
Focus on high-quality content creation without visual elements.
|
110
|
+
Update the plan file with writing progress and content decisions.
|
111
|
+
|
112
|
+
transitions:
|
113
|
+
- trigger: writing_complete
|
114
|
+
to: illustration
|
115
|
+
additional_instructions: |
|
116
|
+
Writing complete! ✅ You have solid content that follows your story outline.
|
117
|
+
|
118
|
+
Update the plan file with illustration tasks and mark completed writing work.
|
119
|
+
transition_reason: 'Content creation complete, ready for visual enhancement'
|
120
|
+
|
121
|
+
- trigger: need_story_revision
|
122
|
+
to: story
|
123
|
+
additional_instructions: 'Writing revealed issues with story structure or narrative flow. Focus on refining the story foundation.'
|
124
|
+
transition_reason: 'Content creation revealed need for story structure refinement'
|
125
|
+
|
126
|
+
- trigger: abandon_post
|
127
|
+
to: discovery
|
128
|
+
instructions: |
|
129
|
+
Post development abandoned during writing. Clean up writing work and return to discovery.
|
130
|
+
The plan file and any completed work will remain for future reference.
|
131
|
+
additional_instructions: 'Post abandoned during writing phase. Clean up and prepare for new topics.'
|
132
|
+
transition_reason: 'User decided to abandon post during writing phase'
|
133
|
+
|
134
|
+
illustration:
|
135
|
+
description: 'Create and integrate visual elements'
|
136
|
+
default_instructions: |
|
137
|
+
Working on illustration phase. Focus on visual enhancement of your content.
|
138
|
+
|
139
|
+
Key activities for this phase:
|
140
|
+
- Identify strategic locations for visual elements
|
141
|
+
- Create or source appropriate visuals (screenshots, diagrams, metaphorical images)
|
142
|
+
- Ensure visual density matches format (minimal for short posts, comprehensive for long-form)
|
143
|
+
- Maintain visual consistency and professional appearance
|
144
|
+
- Ensure visuals support and enhance the written content
|
145
|
+
- Consider accessibility and platform compatibility
|
146
|
+
- Plan visual integration and placement
|
147
|
+
|
148
|
+
Focus on creating visuals that enhance rather than distract from the content.
|
149
|
+
Update the plan file with illustration progress and visual decisions.
|
150
|
+
|
151
|
+
transitions:
|
152
|
+
- trigger: illustration_complete
|
153
|
+
to: distribution
|
154
|
+
additional_instructions: |
|
155
|
+
Illustration complete! ✅ You have visually enhanced content ready for publishing.
|
156
|
+
|
157
|
+
Update the plan file with distribution tasks and mark completed illustration work.
|
158
|
+
transition_reason: 'Visual elements complete, ready for SEO optimization and publishing'
|
159
|
+
|
160
|
+
- trigger: need_more_content
|
161
|
+
to: writing
|
162
|
+
additional_instructions: 'Illustration work revealed gaps in written content. Focus on completing the content foundation.'
|
163
|
+
transition_reason: 'Visual work revealed need for additional written content'
|
164
|
+
|
165
|
+
- trigger: abandon_post
|
166
|
+
to: discovery
|
167
|
+
instructions: |
|
168
|
+
Post development abandoned during illustration. Clean up illustration work and return to discovery.
|
169
|
+
The plan file and any completed work will remain for future reference.
|
170
|
+
additional_instructions: 'Post abandoned during illustration phase. Clean up and prepare for new topics.'
|
171
|
+
transition_reason: 'User decided to abandon post during illustration phase'
|
172
|
+
|
173
|
+
distribution:
|
174
|
+
description: 'Optimize for SEO and publish across platforms'
|
175
|
+
default_instructions: |
|
176
|
+
Working on distribution phase. Focus on optimization and multi-platform publishing.
|
177
|
+
|
178
|
+
Key activities for this phase:
|
179
|
+
- Create compelling, SEO-optimized titles and descriptions
|
180
|
+
- Add appropriate tags and metadata for discoverability
|
181
|
+
- Adapt content formatting for different platforms (LinkedIn, Medium, HN)
|
182
|
+
- Maintain core message while adjusting for platform-specific requirements
|
183
|
+
- Conduct final quality review and polish
|
184
|
+
- Prepare publishing materials and schedule
|
185
|
+
- Execute multi-platform publishing strategy
|
186
|
+
|
187
|
+
Focus on maximizing reach while maintaining content quality and consistency.
|
188
|
+
Update the plan file with distribution progress and publishing decisions.
|
189
|
+
|
190
|
+
transitions:
|
191
|
+
- trigger: distribution_complete
|
192
|
+
to: discovery
|
193
|
+
additional_instructions: 'Post successfully published. Ready for next post project.'
|
194
|
+
transition_reason: 'Post publishing completed successfully, ready for new projects'
|
195
|
+
|
196
|
+
- trigger: need_final_review
|
197
|
+
to: illustration
|
198
|
+
additional_instructions: 'Distribution preparation revealed issues with visuals or content presentation. Focus on final refinements.'
|
199
|
+
transition_reason: 'Publishing preparation identified issues requiring visual or content refinement'
|
200
|
+
|
201
|
+
- trigger: abandon_post
|
202
|
+
to: discovery
|
203
|
+
instructions: |
|
204
|
+
Post development abandoned before distribution. Clean up distribution preparation and return to discovery.
|
205
|
+
The plan file and completed work will remain for future reference.
|
206
|
+
additional_instructions: 'Post abandoned before distribution. Clean up and prepare for new topics.'
|
207
|
+
transition_reason: 'User decided to abandon post before distribution'
|