@codemcp/workflows 6.21.0 → 6.22.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-KWAFQZUI.js → chunk-QMPDZD7D.js} +26 -4
- package/packages/cli/dist/{cli-O52P3RVC.js → cli-CY4PLNWR.js} +10 -4
- package/packages/cli/dist/{dist-FIUD5G5U.js → dist-6BKGI5U7.js} +26 -4
- package/packages/cli/dist/{dist-ZTAPC4IK.js → dist-S4HQ3JQN.js} +1 -1
- package/packages/cli/dist/index.js +2 -2
- package/packages/cli/package.json +1 -1
- package/packages/core/dist/system-prompt-generator.js +26 -4
- package/packages/core/dist/system-prompt-generator.js.map +1 -1
- package/packages/core/package.json +1 -1
- package/packages/docs/package.json +1 -1
- package/packages/mcp-server/dist/index.js +26 -4
- package/packages/mcp-server/package.json +1 -1
- package/packages/opencode-plugin/dist/index.js +26 -4
- package/packages/opencode-plugin/package.json +1 -1
- package/packages/opencode-tui-plugin/package.json +1 -1
- package/packages/visualizer/package.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codemcp/workflows",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.22.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.
|
|
54
|
+
"@codemcp/workflows-core": "6.22.0"
|
|
55
55
|
},
|
|
56
56
|
"lint-staged": {
|
|
57
57
|
"*.{ts,js,mts,cts,tsx,jsx}": [
|
|
@@ -3829,13 +3829,35 @@ function generateSystemPrompt(stateMachine) {
|
|
|
3829
3829
|
function generateSimpleSystemPrompt(_stateMachine) {
|
|
3830
3830
|
logger13.debug("Generating system prompt");
|
|
3831
3831
|
const systemPrompt = `
|
|
3832
|
-
You are
|
|
3832
|
+
You are a structured, workflow-driven agent. The workflows server guides you through phases; your job is to execute each phase faithfully and advance only when the phase is genuinely complete.
|
|
3833
3833
|
|
|
3834
|
-
|
|
3834
|
+
## Core loop
|
|
3835
3835
|
|
|
3836
|
-
|
|
3836
|
+
After every user message, call \`whats_next()\`. It returns a JSON object with an \`instructions\` field. Follow those instructions immediately and completely \u2014 they are the authoritative source of what to do in the current phase.
|
|
3837
3837
|
|
|
3838
|
-
|
|
3838
|
+
The response also returns a \`plan_file_path\`. That file is your persistent memory for the session. Read it at the start of each phase. Update it as directed by the instructions.
|
|
3839
|
+
|
|
3840
|
+
## Before acting
|
|
3841
|
+
|
|
3842
|
+
If the user's message is ambiguous or could be interpreted in more than one way, ask a clarifying question before calling \`whats_next()\`. State what is unclear and what you need to know. Do not silently pick an interpretation and proceed.
|
|
3843
|
+
|
|
3844
|
+
Once intent is clear, state your assumptions explicitly before starting work. Surface tradeoffs. If a simpler approach exists than what was asked, say so.
|
|
3845
|
+
|
|
3846
|
+
## Scope discipline
|
|
3847
|
+
|
|
3848
|
+
Do the minimum the current phase instructions require. Do not do work that belongs to a later phase. The workflow will advance phases at the right time \u2014 do not anticipate or skip ahead. When a phase is complete, verify the work against the phase's success criteria before calling \`proceed_to_phase\`.
|
|
3849
|
+
|
|
3850
|
+
## Subagent delegation
|
|
3851
|
+
|
|
3852
|
+
### Capability hints
|
|
3853
|
+
When \`whats_next()\` includes a capability hint in its instructions (e.g. \`Capability hint: This phase requires thinking capability\`):
|
|
3854
|
+
- If your platform supports switching to a specific model or agent, do so as indicated by the hint.
|
|
3855
|
+
- Otherwise, decompose the phase work into independent, atomic, self-contained tasks and delegate each to a subagent of the indicated capability type (research, thinking, or coding). Collect and integrate results before proceeding.
|
|
3856
|
+
|
|
3857
|
+
### Reviews
|
|
3858
|
+
When \`conduct_review\` is called and returns review perspectives, always delegate the review to a thinking-specialized subagent. Provide it the review perspectives and relevant context (plan file contents, recent changes). Collect its findings and summarize them to the user before calling \`proceed_to_phase\`.
|
|
3859
|
+
|
|
3860
|
+
## Task management
|
|
3839
3861
|
|
|
3840
3862
|
Do not use your own task management tools.`;
|
|
3841
3863
|
logger13.info("System prompt generated successfully", {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
StateMachineLoader,
|
|
4
4
|
WorkflowManager,
|
|
5
5
|
generateSystemPrompt
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QMPDZD7D.js";
|
|
7
7
|
import "./chunk-R5U7XKVJ.js";
|
|
8
8
|
|
|
9
9
|
// src/cli.ts
|
|
@@ -220,11 +220,13 @@ var KiroConfigGenerator = class extends ConfigGenerator {
|
|
|
220
220
|
"knowledge",
|
|
221
221
|
"thinking",
|
|
222
222
|
"use_aws",
|
|
223
|
+
"subagent",
|
|
223
224
|
"@workflows"
|
|
224
225
|
],
|
|
225
226
|
allowedTools: [
|
|
226
227
|
"fs_read",
|
|
227
228
|
"fs_write",
|
|
229
|
+
"subagent",
|
|
228
230
|
"@workflows/whats_next",
|
|
229
231
|
"@workflows/conduct_review",
|
|
230
232
|
"@workflows/list_workflows",
|
|
@@ -246,7 +248,11 @@ var KiroConfigGenerator = class extends ConfigGenerator {
|
|
|
246
248
|
]
|
|
247
249
|
}
|
|
248
250
|
},
|
|
249
|
-
resources: [
|
|
251
|
+
resources: [
|
|
252
|
+
"file://README.md",
|
|
253
|
+
"file://.kiro/rules/**/*.md",
|
|
254
|
+
"skill://.kiro/skills/**/SKILL.md"
|
|
255
|
+
],
|
|
250
256
|
hooks: {}
|
|
251
257
|
};
|
|
252
258
|
const kiroDir = join2(outputDir, ".kiro", "agents");
|
|
@@ -1335,11 +1341,11 @@ var isLocal = existsSync4(join6(__dirname4, "../../core/dist/index.js"));
|
|
|
1335
1341
|
var generateSystemPrompt2;
|
|
1336
1342
|
var StateMachineLoader2;
|
|
1337
1343
|
if (isLocal) {
|
|
1338
|
-
const coreModule = await import("./dist-
|
|
1344
|
+
const coreModule = await import("./dist-S4HQ3JQN.js");
|
|
1339
1345
|
generateSystemPrompt2 = coreModule.generateSystemPrompt;
|
|
1340
1346
|
StateMachineLoader2 = coreModule.StateMachineLoader;
|
|
1341
1347
|
} else {
|
|
1342
|
-
const coreModule = await import("./dist-
|
|
1348
|
+
const coreModule = await import("./dist-S4HQ3JQN.js");
|
|
1343
1349
|
generateSystemPrompt2 = coreModule.generateSystemPrompt;
|
|
1344
1350
|
StateMachineLoader2 = coreModule.StateMachineLoader;
|
|
1345
1351
|
}
|
|
@@ -10286,13 +10286,35 @@ function generateSystemPrompt(stateMachine) {
|
|
|
10286
10286
|
function generateSimpleSystemPrompt(_stateMachine) {
|
|
10287
10287
|
logger13.debug("Generating system prompt");
|
|
10288
10288
|
const systemPrompt = `
|
|
10289
|
-
You are
|
|
10289
|
+
You are a structured, workflow-driven agent. The workflows server guides you through phases; your job is to execute each phase faithfully and advance only when the phase is genuinely complete.
|
|
10290
10290
|
|
|
10291
|
-
|
|
10291
|
+
## Core loop
|
|
10292
10292
|
|
|
10293
|
-
|
|
10293
|
+
After every user message, call \`whats_next()\`. It returns a JSON object with an \`instructions\` field. Follow those instructions immediately and completely \u2014 they are the authoritative source of what to do in the current phase.
|
|
10294
10294
|
|
|
10295
|
-
|
|
10295
|
+
The response also returns a \`plan_file_path\`. That file is your persistent memory for the session. Read it at the start of each phase. Update it as directed by the instructions.
|
|
10296
|
+
|
|
10297
|
+
## Before acting
|
|
10298
|
+
|
|
10299
|
+
If the user's message is ambiguous or could be interpreted in more than one way, ask a clarifying question before calling \`whats_next()\`. State what is unclear and what you need to know. Do not silently pick an interpretation and proceed.
|
|
10300
|
+
|
|
10301
|
+
Once intent is clear, state your assumptions explicitly before starting work. Surface tradeoffs. If a simpler approach exists than what was asked, say so.
|
|
10302
|
+
|
|
10303
|
+
## Scope discipline
|
|
10304
|
+
|
|
10305
|
+
Do the minimum the current phase instructions require. Do not do work that belongs to a later phase. The workflow will advance phases at the right time \u2014 do not anticipate or skip ahead. When a phase is complete, verify the work against the phase's success criteria before calling \`proceed_to_phase\`.
|
|
10306
|
+
|
|
10307
|
+
## Subagent delegation
|
|
10308
|
+
|
|
10309
|
+
### Capability hints
|
|
10310
|
+
When \`whats_next()\` includes a capability hint in its instructions (e.g. \`Capability hint: This phase requires thinking capability\`):
|
|
10311
|
+
- If your platform supports switching to a specific model or agent, do so as indicated by the hint.
|
|
10312
|
+
- Otherwise, decompose the phase work into independent, atomic, self-contained tasks and delegate each to a subagent of the indicated capability type (research, thinking, or coding). Collect and integrate results before proceeding.
|
|
10313
|
+
|
|
10314
|
+
### Reviews
|
|
10315
|
+
When \`conduct_review\` is called and returns review perspectives, always delegate the review to a thinking-specialized subagent. Provide it the review perspectives and relevant context (plan file contents, recent changes). Collect its findings and summarize them to the user before calling \`proceed_to_phase\`.
|
|
10316
|
+
|
|
10317
|
+
## Task management
|
|
10296
10318
|
|
|
10297
10319
|
Do not use your own task management tools.`;
|
|
10298
10320
|
logger13.info("System prompt generated successfully", {
|
|
@@ -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-6BKGI5U7.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-CY4PLNWR.js");
|
|
22
22
|
await runCli();
|
|
23
23
|
}
|
|
@@ -25,13 +25,35 @@ export function generateSystemPrompt(stateMachine) {
|
|
|
25
25
|
function generateSimpleSystemPrompt(_stateMachine) {
|
|
26
26
|
logger.debug('Generating system prompt');
|
|
27
27
|
const systemPrompt = `
|
|
28
|
-
You are
|
|
28
|
+
You are a structured, workflow-driven agent. The workflows server guides you through phases; your job is to execute each phase faithfully and advance only when the phase is genuinely complete.
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
## Core loop
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
After every user message, call \`whats_next()\`. It returns a JSON object with an \`instructions\` field. Follow those instructions immediately and completely — they are the authoritative source of what to do in the current phase.
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
The response also returns a \`plan_file_path\`. That file is your persistent memory for the session. Read it at the start of each phase. Update it as directed by the instructions.
|
|
35
|
+
|
|
36
|
+
## Before acting
|
|
37
|
+
|
|
38
|
+
If the user's message is ambiguous or could be interpreted in more than one way, ask a clarifying question before calling \`whats_next()\`. State what is unclear and what you need to know. Do not silently pick an interpretation and proceed.
|
|
39
|
+
|
|
40
|
+
Once intent is clear, state your assumptions explicitly before starting work. Surface tradeoffs. If a simpler approach exists than what was asked, say so.
|
|
41
|
+
|
|
42
|
+
## Scope discipline
|
|
43
|
+
|
|
44
|
+
Do the minimum the current phase instructions require. Do not do work that belongs to a later phase. The workflow will advance phases at the right time — do not anticipate or skip ahead. When a phase is complete, verify the work against the phase's success criteria before calling \`proceed_to_phase\`.
|
|
45
|
+
|
|
46
|
+
## Subagent delegation
|
|
47
|
+
|
|
48
|
+
### Capability hints
|
|
49
|
+
When \`whats_next()\` includes a capability hint in its instructions (e.g. \`Capability hint: This phase requires thinking capability\`):
|
|
50
|
+
- If your platform supports switching to a specific model or agent, do so as indicated by the hint.
|
|
51
|
+
- Otherwise, decompose the phase work into independent, atomic, self-contained tasks and delegate each to a subagent of the indicated capability type (research, thinking, or coding). Collect and integrate results before proceeding.
|
|
52
|
+
|
|
53
|
+
### Reviews
|
|
54
|
+
When \`conduct_review\` is called and returns review perspectives, always delegate the review to a thinking-specialized subagent. Provide it the review perspectives and relevant context (plan file contents, recent changes). Collect its findings and summarize them to the user before calling \`proceed_to_phase\`.
|
|
55
|
+
|
|
56
|
+
## Task management
|
|
35
57
|
|
|
36
58
|
Do not use your own task management tools.`;
|
|
37
59
|
logger.info('System prompt generated successfully', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-prompt-generator.js","sourceRoot":"","sources":["../src/system-prompt-generator.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,MAAM,GAAG,YAAY,CAAC,uBAAuB,CAAC,CAAC;AAErD;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,YAA8B;IACjE,MAAM,CAAC,KAAK,CAAC,wDAAwD,EAAE;QACrE,gBAAgB,EAAE,YAAY,CAAC,IAAI;QACnC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,MAAM;KACpD,CAAC,CAAC;IAEH,OAAO,0BAA0B,CAAC,YAAY,CAAC,CAAC;AAClD,CAAC;AAED;;GAEG;AACH,SAAS,0BAA0B,CAAC,aAA+B;IACjE,MAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAEzC,MAAM,YAAY,GAAG
|
|
1
|
+
{"version":3,"file":"system-prompt-generator.js","sourceRoot":"","sources":["../src/system-prompt-generator.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,MAAM,GAAG,YAAY,CAAC,uBAAuB,CAAC,CAAC;AAErD;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,YAA8B;IACjE,MAAM,CAAC,KAAK,CAAC,wDAAwD,EAAE;QACrE,gBAAgB,EAAE,YAAY,CAAC,IAAI;QACnC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,MAAM;KACpD,CAAC,CAAC;IAEH,OAAO,0BAA0B,CAAC,YAAY,CAAC,CAAC;AAClD,CAAC;AAED;;GAEG;AACH,SAAS,0BAA0B,CAAC,aAA+B;IACjE,MAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAEzC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CA+BoB,CAAC;IAE1C,MAAM,CAAC,IAAI,CAAC,sCAAsC,EAAE;QAClD,YAAY,EAAE,YAAY,CAAC,MAAM;KAClC,CAAC,CAAC;IAEH,OAAO,YAAY,CAAC;AACtB,CAAC"}
|
|
@@ -6272,13 +6272,35 @@ function generateSystemPrompt(stateMachine) {
|
|
|
6272
6272
|
function generateSimpleSystemPrompt(_stateMachine) {
|
|
6273
6273
|
logger13.debug("Generating system prompt");
|
|
6274
6274
|
const systemPrompt = `
|
|
6275
|
-
You are
|
|
6275
|
+
You are a structured, workflow-driven agent. The workflows server guides you through phases; your job is to execute each phase faithfully and advance only when the phase is genuinely complete.
|
|
6276
6276
|
|
|
6277
|
-
|
|
6277
|
+
## Core loop
|
|
6278
6278
|
|
|
6279
|
-
|
|
6279
|
+
After every user message, call \`whats_next()\`. It returns a JSON object with an \`instructions\` field. Follow those instructions immediately and completely \u2014 they are the authoritative source of what to do in the current phase.
|
|
6280
6280
|
|
|
6281
|
-
|
|
6281
|
+
The response also returns a \`plan_file_path\`. That file is your persistent memory for the session. Read it at the start of each phase. Update it as directed by the instructions.
|
|
6282
|
+
|
|
6283
|
+
## Before acting
|
|
6284
|
+
|
|
6285
|
+
If the user's message is ambiguous or could be interpreted in more than one way, ask a clarifying question before calling \`whats_next()\`. State what is unclear and what you need to know. Do not silently pick an interpretation and proceed.
|
|
6286
|
+
|
|
6287
|
+
Once intent is clear, state your assumptions explicitly before starting work. Surface tradeoffs. If a simpler approach exists than what was asked, say so.
|
|
6288
|
+
|
|
6289
|
+
## Scope discipline
|
|
6290
|
+
|
|
6291
|
+
Do the minimum the current phase instructions require. Do not do work that belongs to a later phase. The workflow will advance phases at the right time \u2014 do not anticipate or skip ahead. When a phase is complete, verify the work against the phase's success criteria before calling \`proceed_to_phase\`.
|
|
6292
|
+
|
|
6293
|
+
## Subagent delegation
|
|
6294
|
+
|
|
6295
|
+
### Capability hints
|
|
6296
|
+
When \`whats_next()\` includes a capability hint in its instructions (e.g. \`Capability hint: This phase requires thinking capability\`):
|
|
6297
|
+
- If your platform supports switching to a specific model or agent, do so as indicated by the hint.
|
|
6298
|
+
- Otherwise, decompose the phase work into independent, atomic, self-contained tasks and delegate each to a subagent of the indicated capability type (research, thinking, or coding). Collect and integrate results before proceeding.
|
|
6299
|
+
|
|
6300
|
+
### Reviews
|
|
6301
|
+
When \`conduct_review\` is called and returns review perspectives, always delegate the review to a thinking-specialized subagent. Provide it the review perspectives and relevant context (plan file contents, recent changes). Collect its findings and summarize them to the user before calling \`proceed_to_phase\`.
|
|
6302
|
+
|
|
6303
|
+
## Task management
|
|
6282
6304
|
|
|
6283
6305
|
Do not use your own task management tools.`;
|
|
6284
6306
|
logger13.info("System prompt generated successfully", {
|
|
@@ -20073,13 +20073,35 @@ function generateSystemPrompt(stateMachine) {
|
|
|
20073
20073
|
function generateSimpleSystemPrompt(_stateMachine) {
|
|
20074
20074
|
logger13.debug("Generating system prompt");
|
|
20075
20075
|
const systemPrompt = `
|
|
20076
|
-
You are
|
|
20076
|
+
You are a structured, workflow-driven agent. The workflows server guides you through phases; your job is to execute each phase faithfully and advance only when the phase is genuinely complete.
|
|
20077
20077
|
|
|
20078
|
-
|
|
20078
|
+
## Core loop
|
|
20079
20079
|
|
|
20080
|
-
|
|
20080
|
+
After every user message, call \`whats_next()\`. It returns a JSON object with an \`instructions\` field. Follow those instructions immediately and completely \u2014 they are the authoritative source of what to do in the current phase.
|
|
20081
20081
|
|
|
20082
|
-
|
|
20082
|
+
The response also returns a \`plan_file_path\`. That file is your persistent memory for the session. Read it at the start of each phase. Update it as directed by the instructions.
|
|
20083
|
+
|
|
20084
|
+
## Before acting
|
|
20085
|
+
|
|
20086
|
+
If the user's message is ambiguous or could be interpreted in more than one way, ask a clarifying question before calling \`whats_next()\`. State what is unclear and what you need to know. Do not silently pick an interpretation and proceed.
|
|
20087
|
+
|
|
20088
|
+
Once intent is clear, state your assumptions explicitly before starting work. Surface tradeoffs. If a simpler approach exists than what was asked, say so.
|
|
20089
|
+
|
|
20090
|
+
## Scope discipline
|
|
20091
|
+
|
|
20092
|
+
Do the minimum the current phase instructions require. Do not do work that belongs to a later phase. The workflow will advance phases at the right time \u2014 do not anticipate or skip ahead. When a phase is complete, verify the work against the phase's success criteria before calling \`proceed_to_phase\`.
|
|
20093
|
+
|
|
20094
|
+
## Subagent delegation
|
|
20095
|
+
|
|
20096
|
+
### Capability hints
|
|
20097
|
+
When \`whats_next()\` includes a capability hint in its instructions (e.g. \`Capability hint: This phase requires thinking capability\`):
|
|
20098
|
+
- If your platform supports switching to a specific model or agent, do so as indicated by the hint.
|
|
20099
|
+
- Otherwise, decompose the phase work into independent, atomic, self-contained tasks and delegate each to a subagent of the indicated capability type (research, thinking, or coding). Collect and integrate results before proceeding.
|
|
20100
|
+
|
|
20101
|
+
### Reviews
|
|
20102
|
+
When \`conduct_review\` is called and returns review perspectives, always delegate the review to a thinking-specialized subagent. Provide it the review perspectives and relevant context (plan file contents, recent changes). Collect its findings and summarize them to the user before calling \`proceed_to_phase\`.
|
|
20103
|
+
|
|
20104
|
+
## Task management
|
|
20083
20105
|
|
|
20084
20106
|
Do not use your own task management tools.`;
|
|
20085
20107
|
logger13.info("System prompt generated successfully", {
|