🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@codemcp/workflows-core

Package Overview
Dependencies
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codemcp/workflows-core - npm Package Compare versions

Comparing version
5.2.4
to
5.3.0
+0
-4
dist/instruction-generator.d.ts

@@ -37,6 +37,2 @@ /**

/**
* Generate task management guidance for markdown backend
*/
private generateTaskManagementGuidance;
/**
* Capitalize phase name for display

@@ -43,0 +39,0 @@ */

+11
-35

@@ -65,41 +65,17 @@ /**

async enhanceInstructions(baseInstructions, context) {
const { phase, conversationContext, transitionReason, isModeled, planFileExists, } = context;
// Generate task management guidance for markdown backend
const taskGuidance = this.generateTaskManagementGuidance();
let enhanced;
// Markdown mode: Traditional plan file approach
enhanced = `Check your plan file at \`${conversationContext.planFilePath}\` and focus on the "${this.capitalizePhase(phase)}" section.
${baseInstructions}
**Plan File Guidance:**
- Work on the tasks listed in the ${this.capitalizePhase(phase)} section
${taskGuidance}
- Update the "Key Decisions" section with important choices made
- Add relevant notes to help maintain context`;
// Add transition context if this is a modeled transition
if (isModeled && transitionReason) {
enhanced += `\n\n**Phase Context:**
- ${transitionReason}`;
}
// Add plan file creation note if needed
const { phase, conversationContext, planFileExists } = context;
const phaseName = this.capitalizePhase(phase);
let workflowSection = `---
**Workflow Continuity:**
Maintain \`${conversationContext.planFilePath}\`:
- Work through tasks in the "${phaseName}" section; Focus on those tasks!
- Add newly discovered tasks; log decisions in "Key Decisions"
- DO NOT maintain tasks in other tools or documents than explicitly stated in this plan file!`;
if (!planFileExists) {
enhanced +=
'\n\n**Note**: Plan file will be created when you first update it.';
workflowSection += '\n- Note: plan file will be created on first update';
}
// Add continuity and task management instructions
enhanced += `\n\n**Important Reminders:**
- Use ONLY the development plan for task management - do not use your own task management tools
- Call whats_next() after the next user message to maintain the development workflow`;
return enhanced;
workflowSection += '\n\nCall `whats_next()` after each user message.';
return `## ${phaseName} Phase\n\n${baseInstructions}\n\n${workflowSection}`;
}
/**
* Generate task management guidance for markdown backend
*/
generateTaskManagementGuidance() {
// Default markdown backend
return `- Mark completed tasks with [x] as you finish them
- Add new tasks as they are identified during your work with the user`;
}
/**
* Capitalize phase name for display

@@ -106,0 +82,0 @@ */

@@ -1,1 +0,1 @@

{"version":3,"file":"instruction-generator.js","sourceRoot":"","sources":["../src/instruction-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAS/D,MAAM,OAAO,oBAAoB;IACvB,kBAAkB,CAAqB;IAE/C,YAAY,YAAyB;QACnC,+EAA+E;QAC/E,IAAI,CAAC,kBAAkB,GAAG,IAAI,kBAAkB,EAAE,CAAC;IACrD,CAAC;IAED;;OAEG;IACH,eAAe,CAAC,aAA+B;QAC7C,gFAAgF;QAChF,OAAO;IACT,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,oBAAoB,CACxB,gBAAwB,EACxB,OAA2B;QAE3B,mDAAmD;QACnD,MAAM,uBAAuB,GAAG,IAAI,CAAC,yBAAyB,CAC5D,gBAAgB,EAChB,OAAO,CAAC,mBAAmB,CAAC,WAAW,EACvC,OAAO,CAAC,mBAAmB,CAAC,SAAS,CACtC,CAAC;QAEF,2DAA2D;QAC3D,MAAM,oBAAoB,GAAG,MAAM,IAAI,CAAC,mBAAmB,CACzD,uBAAuB,EACvB,OAAO,CACR,CAAC;QAEF,OAAO;YACL,YAAY,EAAE,oBAAoB;YAClC,gBAAgB,EACd,+DAA+D;YACjE,QAAQ,EAAE;gBACR,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,YAAY,EAAE,OAAO,CAAC,mBAAmB,CAAC,YAAY;gBACtD,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;gBAC1C,SAAS,EAAE,OAAO,CAAC,SAAS;aAC7B;SACF,CAAC;IACJ,CAAC;IAED;;;OAGG;IACK,yBAAy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AQ;gBACN,mEAAmE,CAAC;QACxE,CAAC;QAED,kDAAkD;QAClD,QAAQ,IAAI;;qFAEqE,CAAC;QAElF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;OAEG;IACK,8BAA8B;QACpC,2BAA2B;QAC3B,OAAO;sEAC2D,CAAC;IACrE,CAAC;IAED;;OAEG;IACK,eAAe,CAAC,KAAa;QACnC,OAAO,KAAK;aACT,KAAK,CAAC,GAAG,CAAC;aACV,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;aACzD,IAAI,CAAC,GAAG,CAAC,CAAC;IACf,CAAC;CACF"}
{"version":3,"file":"instruction-generator.js","sourceRoot":"","sources":["../src/instruction-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAS/D,MAAM,OAAO,oBAAoB;IACvB,kBAAkB,CAAqB;IAE/C,YAAY,YAAyB;QACnC,+EAA+E;QAC/E,IAAI,CAAC,kBAAkB,GAAG,IAAI,kBAAkB,EAAE,CAAC;IACrD,CAAC;IAED;;OAEG;IACH,eAAe,CAAC,aAA+B;QAC7C,gFAAgF;QAChF,OAAO;IACT,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,oBAAoB,CACxB,gBAAwB,EACxB,OAA2B;QAE3B,mDAAmD;QACnD,MAAM,uBAAuB,GAAG,IAAI,CAAC,yBAAyB,CAC5D,gBAAgB,EAChB,OAAO,CAAC,mBAAmB,CAAC,WAAW,EACvC,OAAO,CAAC,mBAAmB,CAAC,SAAS,CACtC,CAAC;QAEF,2DAA2D;QAC3D,MAAM,oBAAoB,GAAG,MAAM,IAAI,CAAC,mBAAmB,CACzD,uBAAuB,EACvB,OAAO,CACR,CAAC;QAEF,OAAO;YACL,YAAY,EAAE,oBAAoB;YACl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;QAED,eAAe,IAAI,kDAAkD,CAAC;QAEtE,OAAO,MAAM,SAAS,aAAa,gBAAgB,OAAO,eAAe,EAAE,CAAC;IAC9E,CAAC;IAED;;OAEG;IACK,eAAe,CAAC,KAAa;QACnC,OAAO,KAAK;aACT,KAAK,CAAC,GAAG,CAAC;aACV,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;aACzD,IAAI,CAAC,GAAG,CAAC,CAAC;IACf,CAAC;CACF"}
{
"name": "@codemcp/workflows-core",
"version": "5.2.4",
"version": "5.3.0",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "types": "dist/index.d.ts",

@@ -597,8 +597,2 @@ # yaml-language-server: $schema=../state-machine-schema.json

The analysis provides a solid foundation for business architecture decisions and technical-business alignment.
transitions:
- trigger: 'analysis_complete'
to: 'analysis_complete'
instructions: >
Analysis is complete! The business architecture is now well-documented and understood.
Use the comprehensive documentation for business architecture decisions and planning.
transition_reason: 'Analysis complete, ready for business architecture work'
transitions: []

@@ -468,9 +468,2 @@ # yaml-language-server: $schema=../state-machine-schema.json

transitions:
- trigger: 'analysis_complete'
to: 'analysis_complete'
instructions: >
Analysis is complete. The legacy system is now well-documented and understood.
Use the comprehensive documentation and `$DISCOVERY_FILE` findings for any future development work.
transition_reason: 'Analysis complete, ready for future development'
- trigger: 'refine_analysis'

@@ -477,0 +470,0 @@ to: 'component_analysis'

@@ -48,10 +48,2 @@ # yaml-language-server: $schema=../state-machine-schema.json

- trigger: 'abandon_project'
to: 'ideation'
instructions: >
Project development abandoned. Return to ideation state for new projects.
Task history will remain for future reference if needed.
additional_instructions: 'Project development abandoned. Clean up any ideation work and prepare for new projects.'
transition_reason: 'User decided to abandon current project development'
architecture:

@@ -58,0 +50,0 @@ description: 'Tech stack selection and architecture design phase'

@@ -50,11 +50,2 @@ # yaml-language-server: $schema=../state-machine-schema.json

- trigger: 'abandon_feature'
to: 'explore'
instructions: >
Minor enhancement abandoned. Revert potentially made changes.
Return to exploration state for new tasks.
Task history will remain for future reference if needed.
additional_instructions: 'Minor enhancement development abandoned. Clean up any analysis work and prepare for new tasks.'
transition_reason: 'User decided to abandon current minor enhancement'
implement:

@@ -61,0 +52,0 @@ description: 'Combined implementation phase - code, test, and commit'

@@ -48,10 +48,2 @@ name: posts

- trigger: abandon_post
to: discovery
instructions: |
Abandon post development. Clean up any discovery work and prepare for new post topics.
The `$PLAN_FILE` will remain for future reference if needed.
additional_instructions: 'Prepare for new post topics.'
transition_reason: 'User decided to abandon current post development'
story:

@@ -58,0 +50,0 @@ description: 'Create narrative structure and story outline'

@@ -361,9 +361,2 @@ # yaml-language-server: $schema=../state-machine-schema.json

transitions:
- trigger: 'verification_complete'
to: 'verify'
instructions: >
The bug has been resolved, all tests pass, and no regressions have been detected.
The fix is ready for deployment.
transition_reason: 'Verification complete, bug fix ready for deployment'
- trigger: 'regression_detected'

@@ -370,0 +363,0 @@ to: 'fix'

@@ -450,10 +450,2 @@ # yaml-language-server: $schema=../state-machine-schema.json

transitions:
- trigger: 'implementation_complete'
to: 'implement'
instructions: >
Feature implementation completed successfully. All user stories have been implemented,
tested, and integrated with the existing system. The feature meets the success criteria
defined in the specification.
transition_reason: 'Implementation complete, feature ready for use'
- trigger: 'implementation_blocked'

@@ -460,0 +452,0 @@ to: 'plan'

@@ -455,10 +455,3 @@ # yaml-language-server: $schema=../state-machine-schema.json

transitions:
- trigger: 'documentation_complete'
to: 'document'
instructions: >
Project documentation is complete. The specification-driven development process has successfully
delivered a working solution with comprehensive documentation. Review all deliverables and
ensure they meet the constitutional principles established at the beginning.
transition_reason: 'Documentation complete, project ready for delivery'
transitions: []

@@ -465,0 +458,0 @@ # Global transitions available from any state

@@ -42,11 +42,2 @@ name: slides

- trigger: abandon_presentation
to: ideate
instructions: |
**Abandon ideation work** - Clean up any ideation work and prepare for new presentation topics.
The plan file will remain for future reference if needed.
additional_instructions: 'Presentation development abandoned. Prepare for new presentation topics.'
transition_reason: 'User decided to abandon current presentation development'
structure:

@@ -53,0 +44,0 @@ description: 'Organize content flow and logical progression'

@@ -47,10 +47,2 @@ # yaml-language-server: $schema=../state-machine-schema.json

- trigger: 'abandon_feature'
to: 'explore'
instructions: >
Feature development abandoned. Return to exploration state for new tasks.
Task history will remain for future reference if needed.
additional_instructions: 'Clean up any work in progress and prepare for new tasks.'
transition_reason: 'User decided to abandon current feature development'
red:

@@ -57,0 +49,0 @@ description: 'RED phase - Write a failing test that defines the expected behavior'