@codemcp/workflows 6.0.4 → 6.1.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 +2 -2
  2. package/packages/cli/dist/{chunk-RTDQR2KY.js → chunk-D2Q6Y3QQ.js} +5 -4
  3. package/packages/cli/dist/{cli-NHYEKRXH.js → cli-UWGNSSFS.js} +3 -3
  4. package/packages/cli/dist/{dist-KZOA4GL5.js → dist-W7PPKVFG.js} +1 -1
  5. package/packages/cli/dist/{dist-6TO57O6M.js → dist-W7VMGB3G.js} +7 -5
  6. package/packages/cli/dist/index.js +2 -2
  7. package/packages/cli/package.json +1 -1
  8. package/packages/cli/resources/workflows/skilled-bugfix.yaml +182 -0
  9. package/packages/cli/resources/workflows/skilled-epcc.yaml +171 -0
  10. package/packages/cli/resources/workflows/skilled-greenfield.yaml +206 -0
  11. package/packages/core/dist/transition-engine.js +6 -4
  12. package/packages/core/dist/transition-engine.js.map +1 -1
  13. package/packages/core/package.json +1 -1
  14. package/packages/core/resources/workflows/skilled-bugfix.yaml +182 -0
  15. package/packages/core/resources/workflows/skilled-epcc.yaml +171 -0
  16. package/packages/core/resources/workflows/skilled-greenfield.yaml +206 -0
  17. package/packages/docs/.vitepress/dist/404.html +2 -2
  18. package/packages/docs/.vitepress/dist/assets/{app.Dz3lZH3M.js → app.BRB3NIl4.js} +1 -1
  19. package/packages/docs/.vitepress/dist/assets/chunks/{theme.q5Ewb3F1.js → theme.DMKMhwGo.js} +1 -1
  20. package/packages/docs/.vitepress/dist/assets/workflows_skilled-bugfix.md.YyOU6NjA.js +1 -0
  21. package/packages/docs/.vitepress/dist/assets/workflows_skilled-bugfix.md.YyOU6NjA.lean.js +1 -0
  22. package/packages/docs/.vitepress/dist/assets/workflows_skilled-epcc.md.BGeI6g1n.js +1 -0
  23. package/packages/docs/.vitepress/dist/assets/workflows_skilled-epcc.md.BGeI6g1n.lean.js +1 -0
  24. package/packages/docs/.vitepress/dist/assets/workflows_skilled-greenfield.md.CKxrbPQ-.js +1 -0
  25. package/packages/docs/.vitepress/dist/assets/workflows_skilled-greenfield.md.CKxrbPQ-.lean.js +1 -0
  26. package/packages/docs/.vitepress/dist/dev/ARCHITECTURE.html +3 -3
  27. package/packages/docs/.vitepress/dist/dev/DEVELOPMENT.html +3 -3
  28. package/packages/docs/.vitepress/dist/dev/LOGGING.html +3 -3
  29. package/packages/docs/.vitepress/dist/dev/PUBLISHING.html +3 -3
  30. package/packages/docs/.vitepress/dist/hashmap.json +1 -1
  31. package/packages/docs/.vitepress/dist/index.html +3 -3
  32. package/packages/docs/.vitepress/dist/user/advanced-engineering.html +3 -3
  33. package/packages/docs/.vitepress/dist/user/agent-setup.html +3 -3
  34. package/packages/docs/.vitepress/dist/user/beads-integration.html +3 -3
  35. package/packages/docs/.vitepress/dist/user/crowd-mcp-integration.html +3 -3
  36. package/packages/docs/.vitepress/dist/user/custom-workflows.html +3 -3
  37. package/packages/docs/.vitepress/dist/user/git-commit-feature.html +3 -3
  38. package/packages/docs/.vitepress/dist/user/how-it-works.html +3 -3
  39. package/packages/docs/.vitepress/dist/user/long-term-memory.html +3 -3
  40. package/packages/docs/.vitepress/dist/user/packaged-workflows.html +3 -3
  41. package/packages/docs/.vitepress/dist/user/tutorial.html +3 -3
  42. package/packages/docs/.vitepress/dist/user/workflow-selection.html +3 -3
  43. package/packages/docs/.vitepress/dist/workflows/adr.html +3 -3
  44. package/packages/docs/.vitepress/dist/workflows/big-bang-conversion.html +3 -3
  45. package/packages/docs/.vitepress/dist/workflows/boundary-testing.html +3 -3
  46. package/packages/docs/.vitepress/dist/workflows/bugfix.html +3 -3
  47. package/packages/docs/.vitepress/dist/workflows/business-analysis.html +3 -3
  48. package/packages/docs/.vitepress/dist/workflows/c4-analysis.html +3 -3
  49. package/packages/docs/.vitepress/dist/workflows/epcc.html +3 -3
  50. package/packages/docs/.vitepress/dist/workflows/game-beginner.html +3 -3
  51. package/packages/docs/.vitepress/dist/workflows/greenfield.html +3 -3
  52. package/packages/docs/.vitepress/dist/workflows/minor.html +3 -3
  53. package/packages/docs/.vitepress/dist/workflows/posts.html +3 -3
  54. package/packages/docs/.vitepress/dist/workflows/sdd-bugfix-crowd.html +3 -3
  55. package/packages/docs/.vitepress/dist/workflows/sdd-bugfix.html +3 -3
  56. package/packages/docs/.vitepress/dist/workflows/sdd-feature-crowd.html +3 -3
  57. package/packages/docs/.vitepress/dist/workflows/sdd-feature.html +3 -3
  58. package/packages/docs/.vitepress/dist/workflows/sdd-greenfield-crowd.html +3 -3
  59. package/packages/docs/.vitepress/dist/workflows/sdd-greenfield.html +3 -3
  60. package/packages/docs/.vitepress/dist/workflows/skilled-bugfix.html +26 -0
  61. package/packages/docs/.vitepress/dist/workflows/skilled-bugfix.yaml +182 -0
  62. package/packages/docs/.vitepress/dist/workflows/skilled-epcc.html +26 -0
  63. package/packages/docs/.vitepress/dist/workflows/skilled-epcc.yaml +171 -0
  64. package/packages/docs/.vitepress/dist/workflows/skilled-greenfield.html +26 -0
  65. package/packages/docs/.vitepress/dist/workflows/skilled-greenfield.yaml +206 -0
  66. package/packages/docs/.vitepress/dist/workflows/slides.html +3 -3
  67. package/packages/docs/.vitepress/dist/workflows/tdd.html +3 -3
  68. package/packages/docs/.vitepress/dist/workflows/waterfall.html +3 -3
  69. package/packages/docs/.vitepress/dist/workflows.html +3 -3
  70. package/packages/docs/package.json +1 -1
  71. package/packages/mcp-server/dist/index.js +7 -5
  72. package/packages/mcp-server/package.json +1 -1
  73. package/packages/mcp-server/resources/workflows/skilled-bugfix.yaml +182 -0
  74. package/packages/mcp-server/resources/workflows/skilled-epcc.yaml +171 -0
  75. package/packages/mcp-server/resources/workflows/skilled-greenfield.yaml +206 -0
  76. package/packages/visualizer/dist/services/workflow-list.ts +3 -0
  77. package/packages/visualizer/package.json +1 -1
  78. package/resources/workflows/skilled-bugfix.yaml +182 -0
  79. package/resources/workflows/skilled-epcc.yaml +171 -0
  80. package/resources/workflows/skilled-greenfield.yaml +206 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemcp/workflows",
3
- "version": "6.0.4",
3
+ "version": "6.1.0",
4
4
  "description": "A Model Context Protocol server that acts as an intelligent conversation state manager and development guide for LLMs, featuring comprehensive long-term memory with persistent project artifacts",
5
5
  "type": "module",
6
6
  "main": "packages/cli/dist/index.js",
@@ -51,7 +51,7 @@
51
51
  "typescript": "^5.9.3",
52
52
  "vitepress": "^1.6.4",
53
53
  "vitest": "4.0.18",
54
- "@codemcp/workflows-core": "6.0.4"
54
+ "@codemcp/workflows-core": "6.1.0"
55
55
  },
56
56
  "lint-staged": {
57
57
  "*.{ts,js,mts,cts,tsx,jsx}": [
@@ -3924,13 +3924,14 @@ ${continueTransition.additional_instructions}`;
3924
3924
  workflowName,
3925
3925
  reason
3926
3926
  });
3927
- if (!stateMachine.states[targetPhase]) {
3927
+ const normalizedTargetPhase = targetPhase.toLowerCase();
3928
+ if (!stateMachine.states[normalizedTargetPhase]) {
3928
3929
  const validPhases = Object.keys(stateMachine.states);
3929
3930
  const errorMsg = `Invalid target phase: "${targetPhase}". Valid phases are: ${validPhases.join(", ")}`;
3930
3931
  logger5.error("Invalid target phase", new Error(errorMsg));
3931
3932
  throw new Error(errorMsg);
3932
3933
  }
3933
- const targetState = stateMachine.states[targetPhase];
3934
+ const targetState = stateMachine.states[normalizedTargetPhase];
3934
3935
  const instructions = targetState.default_instructions;
3935
3936
  const transitionInfo = {
3936
3937
  instructions,
@@ -3940,12 +3941,12 @@ ${continueTransition.additional_instructions}`;
3940
3941
  };
3941
3942
  logger5.info("Explicit phase transition processed", {
3942
3943
  fromPhase: currentPhase,
3943
- toPhase: targetPhase,
3944
+ toPhase: normalizedTargetPhase,
3944
3945
  reason: transitionInfo.transitionReason,
3945
3946
  isModeled: transitionInfo.isModeled
3946
3947
  });
3947
3948
  return {
3948
- newPhase: targetPhase,
3949
+ newPhase: normalizedTargetPhase,
3949
3950
  instructions: transitionInfo.instructions,
3950
3951
  transitionReason: reason || transitionInfo.transitionReason,
3951
3952
  isModeled: transitionInfo.isModeled
@@ -2,7 +2,7 @@ import {
2
2
  StateMachineLoader,
3
3
  WorkflowManager,
4
4
  generateSystemPrompt
5
- } from "./chunk-RTDQR2KY.js";
5
+ } from "./chunk-D2Q6Y3QQ.js";
6
6
  import "./chunk-R5U7XKVJ.js";
7
7
 
8
8
  // src/cli.ts
@@ -977,11 +977,11 @@ var isLocal = existsSync3(join5(__dirname3, "../../core/dist/index.js"));
977
977
  var generateSystemPrompt2;
978
978
  var StateMachineLoader2;
979
979
  if (isLocal) {
980
- const coreModule = await import("./dist-KZOA4GL5.js");
980
+ const coreModule = await import("./dist-W7PPKVFG.js");
981
981
  generateSystemPrompt2 = coreModule.generateSystemPrompt;
982
982
  StateMachineLoader2 = coreModule.StateMachineLoader;
983
983
  } else {
984
- const coreModule = await import("./dist-KZOA4GL5.js");
984
+ const coreModule = await import("./dist-W7PPKVFG.js");
985
985
  generateSystemPrompt2 = coreModule.generateSystemPrompt;
986
986
  StateMachineLoader2 = coreModule.StateMachineLoader;
987
987
  }
@@ -29,7 +29,7 @@ import {
29
29
  logger,
30
30
  setMcpLoggingLevel,
31
31
  setMcpServerForLogging
32
- } from "./chunk-RTDQR2KY.js";
32
+ } from "./chunk-D2Q6Y3QQ.js";
33
33
  import "./chunk-R5U7XKVJ.js";
34
34
  export {
35
35
  BeadsIntegration,
@@ -7781,13 +7781,14 @@ ${continueTransition.additional_instructions}`;
7781
7781
  workflowName,
7782
7782
  reason
7783
7783
  });
7784
- if (!stateMachine.states[targetPhase]) {
7784
+ const normalizedTargetPhase = targetPhase.toLowerCase();
7785
+ if (!stateMachine.states[normalizedTargetPhase]) {
7785
7786
  const validPhases = Object.keys(stateMachine.states);
7786
7787
  const errorMsg = `Invalid target phase: "${targetPhase}". Valid phases are: ${validPhases.join(", ")}`;
7787
7788
  logger5.error("Invalid target phase", new Error(errorMsg));
7788
7789
  throw new Error(errorMsg);
7789
7790
  }
7790
- const targetState = stateMachine.states[targetPhase];
7791
+ const targetState = stateMachine.states[normalizedTargetPhase];
7791
7792
  const instructions = targetState.default_instructions;
7792
7793
  const transitionInfo = {
7793
7794
  instructions,
@@ -7797,12 +7798,12 @@ ${continueTransition.additional_instructions}`;
7797
7798
  };
7798
7799
  logger5.info("Explicit phase transition processed", {
7799
7800
  fromPhase: currentPhase,
7800
- toPhase: targetPhase,
7801
+ toPhase: normalizedTargetPhase,
7801
7802
  reason: transitionInfo.transitionReason,
7802
7803
  isModeled: transitionInfo.isModeled
7803
7804
  });
7804
7805
  return {
7805
- newPhase: targetPhase,
7806
+ newPhase: normalizedTargetPhase,
7806
7807
  instructions: transitionInfo.instructions,
7807
7808
  transitionReason: reason || transitionInfo.transitionReason,
7808
7809
  isModeled: transitionInfo.isModeled
@@ -12447,7 +12448,8 @@ var WhatsNextHandler = class extends ConversationRequiredToolHandler {
12447
12448
  var ProceedToPhaseHandler = class extends ConversationRequiredToolHandler {
12448
12449
  async executeWithConversation(args, context, conversationContext) {
12449
12450
  validateRequiredArgs(args, ["target_phase", "review_state"]);
12450
- const { target_phase, reason = "", review_state } = args;
12451
+ const { reason = "", review_state } = args;
12452
+ const target_phase = args.target_phase.toLowerCase();
12451
12453
  const conversationId = conversationContext.conversationId;
12452
12454
  const currentPhase = conversationContext.currentPhase;
12453
12455
  this.logger.debug("Processing proceed_to_phase request", {
@@ -10,7 +10,7 @@ var args = process.argv.slice(2);
10
10
  if (args.length === 0) {
11
11
  const isLocal = existsSync(join(__dirname, "../../mcp-server/dist/index.js"));
12
12
  if (isLocal) {
13
- const { startMcpServer } = await import("./dist-6TO57O6M.js");
13
+ const { startMcpServer } = await import("./dist-W7VMGB3G.js");
14
14
  await startMcpServer();
15
15
  } else {
16
16
  const mcpServerModule = "@codemcp/workflows-server";
@@ -18,6 +18,6 @@ if (args.length === 0) {
18
18
  await startMcpServer();
19
19
  }
20
20
  } else {
21
- const { runCli } = await import("./cli-NHYEKRXH.js");
21
+ const { runCli } = await import("./cli-UWGNSSFS.js");
22
22
  await runCli();
23
23
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemcp/workflows-cli",
3
- "version": "6.0.4",
3
+ "version": "6.1.0",
4
4
  "description": "CLI tools for responsible-vibe development workflows",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -0,0 +1,182 @@
1
+ ---
2
+ name: 'skilled-bugfix'
3
+ description: 'A focused workflow for bug fixing: Reproduce, Analyze, Fix, Verify - optimized for debugging and fixing existing issues'
4
+ initial_state: 'reproduce'
5
+
6
+ # Enhanced metadata for better discoverability
7
+ metadata:
8
+ domain: 'skilled'
9
+ complexity: 'medium'
10
+ bestFor:
11
+ - 'Bug fixes'
12
+ - 'Issue resolution'
13
+ - 'Error debugging'
14
+ - 'Performance problems'
15
+ useCases:
16
+ - 'Fixing a crash or error'
17
+ - 'Resolving incorrect behavior'
18
+ - 'Performance optimization'
19
+ examples:
20
+ - 'Fix login authentication error'
21
+ - 'Resolve memory leak issue'
22
+ - 'Fix incorrect calculation in reports'
23
+
24
+ # States with default instructions and transitions
25
+ states:
26
+ reproduce:
27
+ description: 'Reproduce and understand the bug'
28
+ default_instructions: |
29
+ Gather specific information to reliably reproduce the reported bug:
30
+ - What are the exact OS, browser/runtime versions, and hardware specs?
31
+ - What is the precise sequence of actions that trigger the bug?
32
+ - What error messages, logs, or stack traces are available?
33
+ - Does this happen every time or intermittently?
34
+ - How many users are affected and what is the business impact?
35
+
36
+ Create test cases that demonstrate the problem. Document your findings and create tasks as needed.
37
+ transitions:
38
+ - trigger: 'bug_reproduced'
39
+ to: 'analyze'
40
+ transition_reason: 'Bug reproduced successfully, ready to analyze root cause'
41
+
42
+ - trigger: 'bug_not_reproducible'
43
+ to: 'reproduce'
44
+ instructions: >
45
+ Unable to reproduce the bug with current information. Gather more details about the environment,
46
+ conditions, or steps that might be missing. Contact the reporter for additional information if needed.
47
+ Continue attempting reproduction with new information.
48
+ transition_reason: 'Bug could not be reproduced, need more information'
49
+
50
+ analyze:
51
+ description: 'Analyze the bug and identify root cause'
52
+ default_instructions: |
53
+ Examine the code paths involved in the bug, identify the root cause, and understand why the issue occurs. Use debugging tools, add logging, and trace through the problematic code.
54
+
55
+ - Use the **architecture** skill to understand the architectural conventions of this project
56
+ - Use the **application-design** skill to understand authentication, routing, error handling, or form patterns that may be involved
57
+
58
+ Document your analysis and create tasks as needed.
59
+ transitions:
60
+ - trigger: 'need_more_reproduction'
61
+ to: 'reproduce'
62
+ additional_instructions: 'Analysis revealed need for additional reproduction scenarios. Focus on reproducing the specific conditions identified during analysis.'
63
+ transition_reason: 'Analysis revealed need for additional reproduction work'
64
+
65
+ - trigger: 'root_cause_identified'
66
+ to: 'fix'
67
+ additional_instructions: 'Document the root cause approach and update task progress.'
68
+ transition_reason: 'Root cause identified, ready to implement fix'
69
+ review_perspectives:
70
+ - perspective: 'architect'
71
+ prompt: "Review root cause analysis and ensure the proposed fix doesn't introduce architectural issues or technical debt. Consider the broader system impact of the proposed solution."
72
+ - perspective: 'security_expert'
73
+ prompt: "Evaluate if the bug has security implications and ensure the fix doesn't introduce new vulnerabilities. Review the security aspects of the proposed solution."
74
+
75
+ - trigger: 'abandon_bug'
76
+ to: 'reproduce'
77
+ additional_instructions: 'Bug analysis abandoned. Clean up any analysis work and prepare for new bug reports.'
78
+ transition_reason: 'Bug analysis abandoned'
79
+
80
+ fix:
81
+ description: 'Implement the bug fix'
82
+ default_instructions: |
83
+ Implement the solution based on your analysis:
84
+
85
+ - Check whether there is a design document in the project and follow it
86
+ - Use the **coding** skill to implement the fix. Apply this skill to all coding tasks of this phase!
87
+ - Use the **testing** skill to write targeted tests that cover the bug scenario. Apply this skill to all test tasks of this phase!
88
+
89
+ Before implementing, assess the approach:
90
+ - How critical is this system? What is the blast radius if the fix causes issues?
91
+ - Should this be a minimal fix or a more comprehensive solution?
92
+
93
+ Make targeted changes that address the root cause without introducing new issues. Be careful to maintain existing functionality while fixing the bug.
94
+ transitions:
95
+ - trigger: 'need_more_analysis'
96
+ to: 'analyze'
97
+ additional_instructions: 'Fix implementation revealed additional complexity or issues. Focus on analyzing the newly discovered aspects of the problem.'
98
+ transition_reason: 'Fix work revealed need for additional analysis'
99
+
100
+ - trigger: 'fix_implemented'
101
+ to: 'verify'
102
+ additional_instructions: 'Document the fix approach and update task progress.'
103
+ transition_reason: 'Fix implemented, ready for verification'
104
+ review_perspectives:
105
+ - perspective: 'senior_software_developer'
106
+ prompt: 'Review fix implementation, code quality, and ensure the solution properly addresses the root cause. Check for potential side effects and code maintainability.'
107
+ - perspective: 'performance_engineer'
108
+ prompt: "Verify that the fix doesn't introduce performance regressions or new bottlenecks. Assess the performance impact of the implemented solution."
109
+
110
+ - trigger: 'abandon_bug'
111
+ to: 'reproduce'
112
+ additional_instructions: 'Bug fix abandoned. Clean up any fix work and prepare for new bug reports.'
113
+ transition_reason: 'Bug fix abandoned'
114
+
115
+ verify:
116
+ description: 'Verify the fix and ensure no regressions'
117
+ default_instructions: |
118
+ Test the fix thoroughly to ensure the original bug is resolved and no new issues were introduced.
119
+
120
+ - Use the **testing** skill to run existing tests and write new ones covering the bug scenario
121
+ - Verify the solution is robust and handles edge cases
122
+ transitions:
123
+ - trigger: 'fix_needs_adjustment'
124
+ to: 'fix'
125
+ additional_instructions: 'Verification revealed issues with the current fix. Focus on addressing the specific problems identified during verification.'
126
+ transition_reason: 'Verification found issues requiring fix adjustments'
127
+
128
+ - trigger: 'need_more_analysis'
129
+ to: 'analyze'
130
+ additional_instructions: "Verification revealed the fix doesn't fully address the root cause. Focus on deeper analysis of the remaining issues."
131
+ transition_reason: 'Verification revealed need for additional analysis'
132
+
133
+ - trigger: 'bug_fixed'
134
+ to: 'finalize'
135
+ transition_reason: 'Bug fix complete and verified, ready for next issue'
136
+
137
+ - trigger: 'abandon_bug'
138
+ to: 'reproduce'
139
+ additional_instructions: 'Bug verification abandoned. Clean up any verification work and prepare for new bug reports.'
140
+ transition_reason: 'Bug verification abandoned'
141
+
142
+ finalize:
143
+ description: 'Code cleanup and documentation finalization'
144
+ default_instructions: |
145
+ Ensure code quality and documentation accuracy through systematic cleanup and review.
146
+
147
+ **STEP 1: Code Cleanup**
148
+ Systematically clean up development artifacts:
149
+ - Remove all temporary debug output statements used during bug investigation (console logging, print statements, debug output functions)
150
+ - Address each TODO/FIXME comment by either implementing the solution or documenting why it's deferred
151
+ - Remove completed TODOs and convert remaining ones to proper issue tracking if needed
152
+ - Remove temporary debugging code, test code blocks, and commented-out code
153
+ - Ensure proper error handling replaces temporary debug logging
154
+
155
+ **STEP 2: Documentation Review**
156
+ Review and update documentation to reflect the bug fix:
157
+ - Check whether there is a design document in the project and update it if the fix changed any design details
158
+ - Compare documentation against the actual bug fix implementation
159
+ - Update only the documentation sections that have functional changes
160
+ - Remove references to investigation iterations, progress notes, and temporary decisions
161
+ - Ensure documentation describes the final fixed state, not the debugging process
162
+ - Ask the user to review document updates
163
+
164
+ **STEP 3: Final Validation**
165
+ - Use the **testing** skill to run and verify all tests
166
+ - Verify documentation accuracy with a final review
167
+ - Ensure bug fix is ready for production
168
+ - Update task progress and mark completed work as you finalize the bug fix
169
+ transitions:
170
+ - trigger: 'need_fix_changes'
171
+ to: 'fix'
172
+ additional_instructions: 'Finalization revealed issues with the bug fix. Focus on addressing the specific problems identified during final review.'
173
+ transition_reason: 'Finalization revealed issues requiring fix changes'
174
+
175
+ - trigger: 'finalization_complete'
176
+ to: 'reproduce'
177
+ transition_reason: 'Bug fix complete and finalized, ready for next issue'
178
+
179
+ - trigger: 'abandon_bug'
180
+ to: 'reproduce'
181
+ additional_instructions: 'Bug finalization abandoned. Clean up any finalization work and prepare for new bug reports.'
182
+ transition_reason: 'Bug finalization abandoned'
@@ -0,0 +1,171 @@
1
+ ---
2
+ name: 'skilled-epcc'
3
+ description: "A comprehensive development workflow based on Anthropic's best practices: Explore, Plan, Code, Commit - ideal for smaller features and iterative development"
4
+ initial_state: 'explore'
5
+
6
+ # Enhanced metadata for better discoverability
7
+ metadata:
8
+ domain: 'skilled'
9
+ complexity: 'medium'
10
+ bestFor:
11
+ - 'Medium-sized features'
12
+ - 'Iterative development'
13
+ - 'Research-heavy tasks'
14
+ - 'Exploratory coding'
15
+ useCases:
16
+ - 'Adding a new API endpoint'
17
+ - 'Implementing a new algorithm'
18
+ - 'Integrating a third-party service'
19
+ examples:
20
+ - 'Add user profile management'
21
+ - 'Implement search functionality'
22
+ - 'Create data export feature'
23
+
24
+ # States with default instructions and transitions
25
+ states:
26
+ explore:
27
+ description: 'Research and exploration phase - understanding the problem space'
28
+ default_instructions: |
29
+ Research the codebase to understand existing patterns and gather context about the problem space.
30
+
31
+ - If uncertain about conventions or rules, ask the user about them
32
+ - Read relevant files and documentation
33
+ - Check whether there is a requirements document in the project and if so, read it carefully
34
+ - If the project is still empty, use the **starting-project** skill to understand how to set it up correctly
35
+ - Use the **architecture** skill to understand the architectural conventions of this project
36
+
37
+ Focus on understanding without writing code yet. Document your findings and create tasks as needed.
38
+ transitions:
39
+ - trigger: 'exploration_complete'
40
+ to: 'plan'
41
+ additional_instructions: 'Present the plan to the user, describing the impact of the changes.'
42
+ transition_reason: 'Sufficient understanding gained, ready to create implementation plan'
43
+
44
+ plan:
45
+ description: 'Planning phase - creating a detailed implementation strategy'
46
+ default_instructions: |
47
+ Create a detailed implementation strategy based on your exploration:
48
+
49
+ - Check whether there is a requirements document in the project and base your strategy on it
50
+ - Check whether there is a design document in the project and adhere to it; if not, elaborate design options and present them to the user
51
+ - Use the **architecture** skill to ensure architectural decisions align with SAB conventions
52
+ - Use the **application-design** skill when planning authentication, routing, error handling, or forms
53
+
54
+ Break down the work into specific, actionable tasks. Consider edge cases, dependencies, and potential challenges. Document the planning work thoroughly and create implementation tasks as part of the code phase as needed.
55
+ transitions:
56
+ - trigger: 'need_more_exploration'
57
+ to: 'explore'
58
+ additional_instructions: 'Focus on the specific areas that need clarification and ask the user about needs and preferences.'
59
+ transition_reason: 'Planning work revealed need for more exploration'
60
+
61
+ - trigger: 'plan_complete'
62
+ to: 'code'
63
+ transition_reason: 'Implementation plan is complete and ready for coding'
64
+ review_perspectives:
65
+ - perspective: 'architect'
66
+ prompt: 'Review implementation strategy, design decisions, and integration approach for soundness and maintainability. Ensure the plan aligns with existing system architecture and follows best practices.'
67
+ - perspective: 'security_expert'
68
+ prompt: 'Assess security considerations and potential risks in the planned implementation approach. Review data handling, authentication, and potential vulnerabilities.'
69
+
70
+ - trigger: 'abandon_feature'
71
+ to: 'explore'
72
+ instructions: >
73
+ Feature development abandoned during planning. Return to exploration state for new tasks.
74
+ Task history will remain for future reference.
75
+ additional_instructions: 'Feature development abandoned during planning. Clean up any planning work and prepare for new tasks.'
76
+ transition_reason: 'User decided to abandon feature during planning phase'
77
+
78
+ code:
79
+ description: 'Implementation phase - writing and building the solution'
80
+ default_instructions: |
81
+ Follow your plan to build the solution:
82
+
83
+ - Check whether there is a design document in the project and follow it; if not, elaborate design options and present them to the user
84
+ - Check whether there is a requirements document in the project and ensure all requirements are met
85
+ - Use the **coding** skill to implement components, styling, and coding patterns. Apply this skill to all coding tasks of this phase!
86
+ - Use the **testing** skill to write and run tests. Apply this skill to all test tasks of this phase!
87
+
88
+ 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. Update task progress and create new tasks as needed.
89
+ transitions:
90
+ - trigger: 'need_replanning'
91
+ to: 'plan'
92
+ additional_instructions: "Consider what you've learned during coding and adjust the plan accordingly. Document the changes and reasons."
93
+ transition_reason: 'Implementation work revealed need to revise the plan'
94
+
95
+ - trigger: 'need_more_exploration'
96
+ to: 'explore'
97
+ additional_instructions: 'Focus on the specific areas that are blocking implementation progress.'
98
+ transition_reason: 'Implementation work revealed need for more exploration'
99
+
100
+ - trigger: 'code_complete'
101
+ to: 'commit'
102
+ transition_reason: 'Core implementation is complete, ready for finalization'
103
+ review_perspectives:
104
+ - perspective: 'senior_software_developer'
105
+ prompt: 'Review code quality, best practices, testing coverage, and readiness for production deployment. Ensure the implementation follows coding standards and is maintainable.'
106
+ - perspective: 'performance_engineer'
107
+ prompt: 'Evaluate performance impact, resource efficiency, and scalability of the implemented solution. Check for potential bottlenecks or optimization opportunities.'
108
+
109
+ - trigger: 'abandon_feature'
110
+ to: 'explore'
111
+ instructions: >
112
+ Feature development abandoned during implementation. Clean up any incomplete code and return to exploration.
113
+ Task history and any completed work will remain for future reference.
114
+ additional_instructions: 'Clean up any incomplete code and prepare for new tasks.'
115
+ transition_reason: 'User decided to abandon feature during implementation'
116
+
117
+ commit:
118
+ description: 'Code cleanup and documentation finalization'
119
+ default_instructions: >
120
+ Ensure code quality and documentation accuracy through systematic cleanup and review.
121
+
122
+ **STEP 1: Code Cleanup**
123
+
124
+ Systematically clean up development artifacts:
125
+
126
+ 1. **Remove Debug Output**: Search for and remove all temporary debug output statements used during development.
127
+ Look for language-specific debug output methods (console logging, print statements, debug output functions).
128
+ Remove any debugging statements that were added for development purposes.
129
+
130
+ 2. **Review TODO/FIXME Comments**:
131
+ - Address each TODO/FIXME comment by either implementing the solution or documenting why it's deferred
132
+ - Remove completed TODOs
133
+ - Convert remaining TODOs to proper issue tracking if needed
134
+
135
+ 3. **Remove Debugging Code Blocks**:
136
+ - Remove temporary debugging code, test code blocks, and commented-out code
137
+ - Clean up any experimental code that's no longer needed
138
+ - Ensure proper error handling replaces temporary debug logging
139
+
140
+ **STEP 2: Documentation Review**
141
+
142
+ Review and update documentation to reflect final implementation:
143
+
144
+ 1. Check whether there is a requirements, architecture, or design document in the project and update any that are affected by the implementation
145
+ 2. **Compare Against Implementation**: Review documentation against actual implemented functionality
146
+ 3. **Update Changed Sections**: Only modify documentation sections that have functional changes
147
+ 4. **Remove Development Progress**: Remove references to development iterations, progress notes, and temporary decisions
148
+ 5. **Focus on Final State**: Ensure documentation describes the final implemented state, not the development process
149
+ 6. **Ask User to Review Document Updates**
150
+
151
+ **STEP 3: Final Validation**
152
+
153
+ - Use the **testing** skill to run and verify all tests
154
+ - Verify documentation accuracy with a final review
155
+ - Ensure code is ready for production/delivery
156
+
157
+ Update task progress and mark completed work as you finalize the feature.
158
+ transitions:
159
+ - trigger: 'need_code_changes'
160
+ to: 'code'
161
+ additional_instructions: 'Focus on the problems identified during final review.'
162
+ transition_reason: 'Final review found issues requiring code changes'
163
+
164
+ - trigger: 'commit_complete'
165
+ to: 'explore'
166
+ transition_reason: 'Feature delivery complete, ready for next task'
167
+
168
+ - trigger: 'abandon_feature'
169
+ to: 'explore'
170
+ additional_instructions: 'Clean up any finalization artifacts and prepare for new tasks.'
171
+ transition_reason: 'User decided to abandon feature during finalization'