@codemcp/workflows 6.0.3 → 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.
- package/package.json +2 -2
- package/packages/cli/dist/{chunk-RTDQR2KY.js → chunk-D2Q6Y3QQ.js} +5 -4
- package/packages/cli/dist/{cli-CZ4FMSWR.js → cli-UWGNSSFS.js} +50 -12
- package/packages/cli/dist/{dist-KZOA4GL5.js → dist-W7PPKVFG.js} +1 -1
- package/packages/cli/dist/{dist-6TO57O6M.js → dist-W7VMGB3G.js} +7 -5
- package/packages/cli/dist/index.js +2 -2
- package/packages/cli/package.json +1 -1
- package/packages/cli/resources/workflows/skilled-bugfix.yaml +182 -0
- package/packages/cli/resources/workflows/skilled-epcc.yaml +171 -0
- package/packages/cli/resources/workflows/skilled-greenfield.yaml +206 -0
- package/packages/core/dist/transition-engine.js +6 -4
- package/packages/core/dist/transition-engine.js.map +1 -1
- package/packages/core/package.json +1 -1
- package/packages/core/resources/workflows/skilled-bugfix.yaml +182 -0
- package/packages/core/resources/workflows/skilled-epcc.yaml +171 -0
- package/packages/core/resources/workflows/skilled-greenfield.yaml +206 -0
- package/packages/docs/.vitepress/dist/404.html +2 -2
- package/packages/docs/.vitepress/dist/assets/{app.Dz3lZH3M.js → app.BRB3NIl4.js} +1 -1
- package/packages/docs/.vitepress/dist/assets/chunks/{theme.q5Ewb3F1.js → theme.DMKMhwGo.js} +1 -1
- package/packages/docs/.vitepress/dist/assets/workflows_skilled-bugfix.md.YyOU6NjA.js +1 -0
- package/packages/docs/.vitepress/dist/assets/workflows_skilled-bugfix.md.YyOU6NjA.lean.js +1 -0
- package/packages/docs/.vitepress/dist/assets/workflows_skilled-epcc.md.BGeI6g1n.js +1 -0
- package/packages/docs/.vitepress/dist/assets/workflows_skilled-epcc.md.BGeI6g1n.lean.js +1 -0
- package/packages/docs/.vitepress/dist/assets/workflows_skilled-greenfield.md.CKxrbPQ-.js +1 -0
- package/packages/docs/.vitepress/dist/assets/workflows_skilled-greenfield.md.CKxrbPQ-.lean.js +1 -0
- package/packages/docs/.vitepress/dist/dev/ARCHITECTURE.html +3 -3
- package/packages/docs/.vitepress/dist/dev/DEVELOPMENT.html +3 -3
- package/packages/docs/.vitepress/dist/dev/LOGGING.html +3 -3
- package/packages/docs/.vitepress/dist/dev/PUBLISHING.html +3 -3
- package/packages/docs/.vitepress/dist/hashmap.json +1 -1
- package/packages/docs/.vitepress/dist/index.html +3 -3
- package/packages/docs/.vitepress/dist/user/advanced-engineering.html +3 -3
- package/packages/docs/.vitepress/dist/user/agent-setup.html +3 -3
- package/packages/docs/.vitepress/dist/user/beads-integration.html +3 -3
- package/packages/docs/.vitepress/dist/user/crowd-mcp-integration.html +3 -3
- package/packages/docs/.vitepress/dist/user/custom-workflows.html +3 -3
- package/packages/docs/.vitepress/dist/user/git-commit-feature.html +3 -3
- package/packages/docs/.vitepress/dist/user/how-it-works.html +3 -3
- package/packages/docs/.vitepress/dist/user/long-term-memory.html +3 -3
- package/packages/docs/.vitepress/dist/user/packaged-workflows.html +3 -3
- package/packages/docs/.vitepress/dist/user/tutorial.html +3 -3
- package/packages/docs/.vitepress/dist/user/workflow-selection.html +3 -3
- package/packages/docs/.vitepress/dist/workflows/adr.html +3 -3
- package/packages/docs/.vitepress/dist/workflows/big-bang-conversion.html +3 -3
- package/packages/docs/.vitepress/dist/workflows/boundary-testing.html +3 -3
- package/packages/docs/.vitepress/dist/workflows/bugfix.html +3 -3
- package/packages/docs/.vitepress/dist/workflows/business-analysis.html +3 -3
- package/packages/docs/.vitepress/dist/workflows/c4-analysis.html +3 -3
- package/packages/docs/.vitepress/dist/workflows/epcc.html +3 -3
- package/packages/docs/.vitepress/dist/workflows/game-beginner.html +3 -3
- package/packages/docs/.vitepress/dist/workflows/greenfield.html +3 -3
- package/packages/docs/.vitepress/dist/workflows/minor.html +3 -3
- package/packages/docs/.vitepress/dist/workflows/posts.html +3 -3
- package/packages/docs/.vitepress/dist/workflows/sdd-bugfix-crowd.html +3 -3
- package/packages/docs/.vitepress/dist/workflows/sdd-bugfix.html +3 -3
- package/packages/docs/.vitepress/dist/workflows/sdd-feature-crowd.html +3 -3
- package/packages/docs/.vitepress/dist/workflows/sdd-feature.html +3 -3
- package/packages/docs/.vitepress/dist/workflows/sdd-greenfield-crowd.html +3 -3
- package/packages/docs/.vitepress/dist/workflows/sdd-greenfield.html +3 -3
- package/packages/docs/.vitepress/dist/workflows/skilled-bugfix.html +26 -0
- package/packages/docs/.vitepress/dist/workflows/skilled-bugfix.yaml +182 -0
- package/packages/docs/.vitepress/dist/workflows/skilled-epcc.html +26 -0
- package/packages/docs/.vitepress/dist/workflows/skilled-epcc.yaml +171 -0
- package/packages/docs/.vitepress/dist/workflows/skilled-greenfield.html +26 -0
- package/packages/docs/.vitepress/dist/workflows/skilled-greenfield.yaml +206 -0
- package/packages/docs/.vitepress/dist/workflows/slides.html +3 -3
- package/packages/docs/.vitepress/dist/workflows/tdd.html +3 -3
- package/packages/docs/.vitepress/dist/workflows/waterfall.html +3 -3
- package/packages/docs/.vitepress/dist/workflows.html +3 -3
- package/packages/docs/package.json +1 -1
- package/packages/mcp-server/dist/index.js +7 -5
- package/packages/mcp-server/package.json +1 -1
- package/packages/mcp-server/resources/workflows/skilled-bugfix.yaml +182 -0
- package/packages/mcp-server/resources/workflows/skilled-epcc.yaml +171 -0
- package/packages/mcp-server/resources/workflows/skilled-greenfield.yaml +206 -0
- package/packages/visualizer/dist/services/workflow-list.ts +3 -0
- package/packages/visualizer/package.json +1 -1
- package/resources/workflows/skilled-bugfix.yaml +182 -0
- package/resources/workflows/skilled-epcc.yaml +171 -0
- 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
|
|
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
|
|
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
|
-
|
|
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[
|
|
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:
|
|
3944
|
+
toPhase: normalizedTargetPhase,
|
|
3944
3945
|
reason: transitionInfo.transitionReason,
|
|
3945
3946
|
isModeled: transitionInfo.isModeled
|
|
3946
3947
|
});
|
|
3947
3948
|
return {
|
|
3948
|
-
newPhase:
|
|
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-
|
|
5
|
+
} from "./chunk-D2Q6Y3QQ.js";
|
|
6
6
|
import "./chunk-R5U7XKVJ.js";
|
|
7
7
|
|
|
8
8
|
// src/cli.ts
|
|
@@ -180,9 +180,18 @@ var ConfigGenerator = class {
|
|
|
180
180
|
*/
|
|
181
181
|
getDefaultMcpConfig() {
|
|
182
182
|
const isWindows = process.platform.startsWith("win");
|
|
183
|
+
if (isWindows) {
|
|
184
|
+
return {
|
|
185
|
+
workflows: {
|
|
186
|
+
command: "cmd",
|
|
187
|
+
args: ["/c", "npx", "@codemcp/workflows-server@latest"]
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
}
|
|
183
191
|
return {
|
|
184
192
|
workflows: {
|
|
185
|
-
command:
|
|
193
|
+
command: "npx",
|
|
194
|
+
args: ["@codemcp/workflows-server@latest"]
|
|
186
195
|
}
|
|
187
196
|
};
|
|
188
197
|
}
|
|
@@ -253,8 +262,17 @@ var ClaudeConfigGenerator = class extends ConfigGenerator {
|
|
|
253
262
|
async generate(outputDir) {
|
|
254
263
|
const systemPrompt = this.getSystemPrompt();
|
|
255
264
|
const mcpServers = this.getDefaultMcpConfig();
|
|
256
|
-
const
|
|
257
|
-
|
|
265
|
+
const claudeDir = join2(outputDir, ".claude");
|
|
266
|
+
const agentsDir = join2(claudeDir, "agents");
|
|
267
|
+
await mkdir(agentsDir, { recursive: true });
|
|
268
|
+
const agentContent = `---
|
|
269
|
+
name: Responsible Vibe
|
|
270
|
+
description: AI assistant that helps users develop software features using structured development workflows.
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
${systemPrompt}`;
|
|
274
|
+
const agentPath = join2(agentsDir, "vibe.md");
|
|
275
|
+
await this.writeFile(agentPath, agentContent);
|
|
258
276
|
const mcpConfig = {
|
|
259
277
|
mcpServers
|
|
260
278
|
};
|
|
@@ -279,7 +297,7 @@ var ClaudeConfigGenerator = class extends ConfigGenerator {
|
|
|
279
297
|
deny: ["Read(./.env)", "Read(./.env.*)", "Read(./secrets/**)"]
|
|
280
298
|
}
|
|
281
299
|
};
|
|
282
|
-
const settingsPath = join2(
|
|
300
|
+
const settingsPath = join2(claudeDir, "settings.json");
|
|
283
301
|
const finalSettings = await this.mergeWithExistingConfig(
|
|
284
302
|
settingsPath,
|
|
285
303
|
settings
|
|
@@ -620,9 +638,18 @@ var SkillGenerator = class {
|
|
|
620
638
|
*/
|
|
621
639
|
getDefaultMcpConfig() {
|
|
622
640
|
const isWindows = process.platform.startsWith("win");
|
|
641
|
+
if (isWindows) {
|
|
642
|
+
return {
|
|
643
|
+
workflows: {
|
|
644
|
+
command: "cmd",
|
|
645
|
+
args: ["/c", "npx", "@codemcp/workflows-server@latest"]
|
|
646
|
+
}
|
|
647
|
+
};
|
|
648
|
+
}
|
|
623
649
|
return {
|
|
624
650
|
workflows: {
|
|
625
|
-
command:
|
|
651
|
+
command: "npx",
|
|
652
|
+
args: ["@codemcp/workflows-server@latest"]
|
|
626
653
|
}
|
|
627
654
|
};
|
|
628
655
|
}
|
|
@@ -950,14 +977,26 @@ var isLocal = existsSync3(join5(__dirname3, "../../core/dist/index.js"));
|
|
|
950
977
|
var generateSystemPrompt2;
|
|
951
978
|
var StateMachineLoader2;
|
|
952
979
|
if (isLocal) {
|
|
953
|
-
const coreModule = await import("./dist-
|
|
980
|
+
const coreModule = await import("./dist-W7PPKVFG.js");
|
|
954
981
|
generateSystemPrompt2 = coreModule.generateSystemPrompt;
|
|
955
982
|
StateMachineLoader2 = coreModule.StateMachineLoader;
|
|
956
983
|
} else {
|
|
957
|
-
const coreModule = await import("./dist-
|
|
984
|
+
const coreModule = await import("./dist-W7PPKVFG.js");
|
|
958
985
|
generateSystemPrompt2 = coreModule.generateSystemPrompt;
|
|
959
986
|
StateMachineLoader2 = coreModule.StateMachineLoader;
|
|
960
987
|
}
|
|
988
|
+
function parseFlag(args, flag) {
|
|
989
|
+
for (let i = 0; i < args.length; i++) {
|
|
990
|
+
const arg = args[i];
|
|
991
|
+
if (arg.startsWith(`${flag}=`)) {
|
|
992
|
+
return arg.slice(flag.length + 1);
|
|
993
|
+
}
|
|
994
|
+
if (arg === flag && i + 1 < args.length) {
|
|
995
|
+
return args[i + 1];
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
return void 0;
|
|
999
|
+
}
|
|
961
1000
|
async function parseCliArgs() {
|
|
962
1001
|
const args = process.argv.slice(2);
|
|
963
1002
|
if (args.includes("--help") || args.includes("-h")) {
|
|
@@ -971,8 +1010,7 @@ async function parseCliArgs() {
|
|
|
971
1010
|
handleSetupList();
|
|
972
1011
|
return { shouldExit: true };
|
|
973
1012
|
} else if (subcommand) {
|
|
974
|
-
const
|
|
975
|
-
const mode = modeIndex !== -1 ? args[modeIndex + 1] : "skill";
|
|
1013
|
+
const mode = parseFlag(args, "--mode") ?? "skill";
|
|
976
1014
|
if (mode !== "skill" && mode !== "config") {
|
|
977
1015
|
console.error('\u274C Error: --mode must be "skill" or "config"');
|
|
978
1016
|
process.exit(1);
|
|
@@ -1015,8 +1053,7 @@ async function parseCliArgs() {
|
|
|
1015
1053
|
handleCrowdList();
|
|
1016
1054
|
return { shouldExit: true };
|
|
1017
1055
|
} else if (subcommand === "copy") {
|
|
1018
|
-
const
|
|
1019
|
-
const outputDir = outputDirIndex !== -1 ? args[outputDirIndex + 1] : void 0;
|
|
1056
|
+
const outputDir = parseFlag(args, "--output-dir");
|
|
1020
1057
|
handleCrowdCopy(outputDir);
|
|
1021
1058
|
return { shouldExit: true };
|
|
1022
1059
|
} else {
|
|
@@ -1417,5 +1454,6 @@ async function runCli() {
|
|
|
1417
1454
|
}
|
|
1418
1455
|
}
|
|
1419
1456
|
export {
|
|
1457
|
+
parseFlag,
|
|
1420
1458
|
runCli
|
|
1421
1459
|
};
|
|
@@ -7781,13 +7781,14 @@ ${continueTransition.additional_instructions}`;
|
|
|
7781
7781
|
workflowName,
|
|
7782
7782
|
reason
|
|
7783
7783
|
});
|
|
7784
|
-
|
|
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[
|
|
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:
|
|
7801
|
+
toPhase: normalizedTargetPhase,
|
|
7801
7802
|
reason: transitionInfo.transitionReason,
|
|
7802
7803
|
isModeled: transitionInfo.isModeled
|
|
7803
7804
|
});
|
|
7804
7805
|
return {
|
|
7805
|
-
newPhase:
|
|
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 {
|
|
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-
|
|
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-
|
|
21
|
+
const { runCli } = await import("./cli-UWGNSSFS.js");
|
|
22
22
|
await runCli();
|
|
23
23
|
}
|
|
@@ -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'
|