@kody-ade/kody-engine 0.2.52 → 0.2.53
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/dist/bin/kody2.js +3 -3
- package/dist/executables/chore/profile.json +78 -0
- package/dist/executables/chore/prompt.md +5 -0
- package/dist/executables/feature/profile.json +84 -0
- package/dist/executables/feature/prompt.md +5 -0
- package/dist/executables/spec/profile.json +67 -0
- package/dist/executables/spec/prompt.md +5 -0
- package/package.json +1 -1
package/dist/bin/kody2.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// package.json
|
|
4
4
|
var package_default = {
|
|
5
5
|
name: "@kody-ade/kody-engine",
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.53",
|
|
7
7
|
description: "kody2 \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
|
|
8
8
|
license: "MIT",
|
|
9
9
|
type: "module",
|
|
@@ -4434,14 +4434,14 @@ var skipAgent = async (ctx) => {
|
|
|
4434
4434
|
// src/scripts/startFlow.ts
|
|
4435
4435
|
import { execFileSync as execFileSync16 } from "child_process";
|
|
4436
4436
|
var API_TIMEOUT_MS6 = 3e4;
|
|
4437
|
-
var startFlow = async (ctx,
|
|
4437
|
+
var startFlow = async (ctx, profile, _agentResult, args) => {
|
|
4438
4438
|
const entry = args?.entry;
|
|
4439
4439
|
if (!entry) {
|
|
4440
4440
|
process.stderr.write("[kody2 startFlow] missing `with.entry` \u2014 skipping\n");
|
|
4441
4441
|
return;
|
|
4442
4442
|
}
|
|
4443
4443
|
const target = args?.target ?? "issue";
|
|
4444
|
-
const flowName =
|
|
4444
|
+
const flowName = profile.name;
|
|
4445
4445
|
const issueNumber = ctx.args.issue;
|
|
4446
4446
|
if (!issueNumber) {
|
|
4447
4447
|
process.stderr.write("[kody2 startFlow] no --issue arg \u2014 skipping\n");
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "chore",
|
|
3
|
+
"describe": "Sub-orchestrator for chore / docs / dep-bump issues — run → review (→ fix on concerns/fail). Skips planning entirely. No agent.",
|
|
4
|
+
"inputs": [
|
|
5
|
+
{
|
|
6
|
+
"name": "issue",
|
|
7
|
+
"flag": "--issue",
|
|
8
|
+
"type": "int",
|
|
9
|
+
"required": true,
|
|
10
|
+
"describe": "GitHub issue number to drive the flow on."
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"claudeCode": {
|
|
14
|
+
"model": "inherit",
|
|
15
|
+
"permissionMode": "default",
|
|
16
|
+
"maxTurns": 0,
|
|
17
|
+
"maxThinkingTokens": null,
|
|
18
|
+
"systemPromptAppend": null,
|
|
19
|
+
"tools": [],
|
|
20
|
+
"hooks": [],
|
|
21
|
+
"skills": [],
|
|
22
|
+
"commands": [],
|
|
23
|
+
"subagents": [],
|
|
24
|
+
"plugins": [],
|
|
25
|
+
"mcpServers": []
|
|
26
|
+
},
|
|
27
|
+
"cliTools": [],
|
|
28
|
+
"scripts": {
|
|
29
|
+
"preflight": [
|
|
30
|
+
{
|
|
31
|
+
"script": "setLifecycleLabel",
|
|
32
|
+
"with": {
|
|
33
|
+
"label": "kody:orchestrating",
|
|
34
|
+
"color": "1d76db",
|
|
35
|
+
"description": "kody2: orchestrating a multi-stage flow"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{ "script": "loadIssueContext" },
|
|
39
|
+
{ "script": "loadTaskState" },
|
|
40
|
+
{ "script": "skipAgent" }
|
|
41
|
+
],
|
|
42
|
+
"postflight": [
|
|
43
|
+
{ "script": "startFlow", "with": { "entry": "run", "target": "issue" },
|
|
44
|
+
"runWhen": { "data.taskState.core.lastOutcome": null } },
|
|
45
|
+
|
|
46
|
+
{ "script": "dispatch", "with": { "next": "review", "target": "pr" },
|
|
47
|
+
"runWhen": { "data.taskState.core.lastOutcome.type": "RUN_COMPLETED" } },
|
|
48
|
+
|
|
49
|
+
{ "script": "finishFlow",
|
|
50
|
+
"with": { "reason": "review-passed", "label": "kody:done", "color": "0e8a16", "description": "kody2: PR ready for human review/merge" },
|
|
51
|
+
"runWhen": { "data.taskState.core.lastOutcome.type": "REVIEW_PASS" } },
|
|
52
|
+
|
|
53
|
+
{ "script": "dispatch", "with": { "next": "fix", "target": "pr" },
|
|
54
|
+
"runWhen": { "data.taskState.core.lastOutcome.type": ["REVIEW_CONCERNS", "REVIEW_FAIL"] } },
|
|
55
|
+
|
|
56
|
+
{ "script": "finishFlow",
|
|
57
|
+
"with": { "reason": "review-failed", "label": "kody:failed", "color": "e11d21", "description": "kody2: flow failed" },
|
|
58
|
+
"runWhen": { "data.taskState.core.lastOutcome.type": "REVIEW_FAILED" } },
|
|
59
|
+
|
|
60
|
+
{ "script": "finishFlow",
|
|
61
|
+
"with": { "reason": "fix-applied", "label": "kody:done", "color": "0e8a16", "description": "kody2: PR ready for human review/merge" },
|
|
62
|
+
"runWhen": { "data.taskState.core.lastOutcome.type": "FIX_COMPLETED" } },
|
|
63
|
+
|
|
64
|
+
{ "script": "finishFlow",
|
|
65
|
+
"with": { "reason": "aborted", "label": "kody:failed", "color": "e11d21", "description": "kody2: flow failed" },
|
|
66
|
+
"runWhen": { "data.taskState.core.lastOutcome.type": ["RUN_FAILED", "FIX_FAILED", "AGENT_NOT_RUN"] } },
|
|
67
|
+
|
|
68
|
+
{ "script": "persistFlowState" }
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"output": {
|
|
72
|
+
"actionTypes": [
|
|
73
|
+
"FLOW_STARTED",
|
|
74
|
+
"FLOW_COMPLETED",
|
|
75
|
+
"FLOW_ABORTED"
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "feature",
|
|
3
|
+
"describe": "Sub-orchestrator for feature / refactor issues — research → plan → run → review (→ fix on concerns/fail). No agent — the postflight entries ARE the transition table, evaluated top-to-bottom via runWhen.",
|
|
4
|
+
"inputs": [
|
|
5
|
+
{
|
|
6
|
+
"name": "issue",
|
|
7
|
+
"flag": "--issue",
|
|
8
|
+
"type": "int",
|
|
9
|
+
"required": true,
|
|
10
|
+
"describe": "GitHub issue number to drive the flow on."
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"claudeCode": {
|
|
14
|
+
"model": "inherit",
|
|
15
|
+
"permissionMode": "default",
|
|
16
|
+
"maxTurns": 0,
|
|
17
|
+
"maxThinkingTokens": null,
|
|
18
|
+
"systemPromptAppend": null,
|
|
19
|
+
"tools": [],
|
|
20
|
+
"hooks": [],
|
|
21
|
+
"skills": [],
|
|
22
|
+
"commands": [],
|
|
23
|
+
"subagents": [],
|
|
24
|
+
"plugins": [],
|
|
25
|
+
"mcpServers": []
|
|
26
|
+
},
|
|
27
|
+
"cliTools": [],
|
|
28
|
+
"scripts": {
|
|
29
|
+
"preflight": [
|
|
30
|
+
{
|
|
31
|
+
"script": "setLifecycleLabel",
|
|
32
|
+
"with": {
|
|
33
|
+
"label": "kody:orchestrating",
|
|
34
|
+
"color": "1d76db",
|
|
35
|
+
"description": "kody2: orchestrating a multi-stage flow"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{ "script": "loadIssueContext" },
|
|
39
|
+
{ "script": "loadTaskState" },
|
|
40
|
+
{ "script": "skipAgent" }
|
|
41
|
+
],
|
|
42
|
+
"postflight": [
|
|
43
|
+
{ "script": "startFlow", "with": { "entry": "research", "target": "issue" },
|
|
44
|
+
"runWhen": { "data.taskState.core.lastOutcome": null } },
|
|
45
|
+
|
|
46
|
+
{ "script": "dispatch", "with": { "next": "plan", "target": "issue" },
|
|
47
|
+
"runWhen": { "data.taskState.core.lastOutcome.type": "RESEARCH_COMPLETED" } },
|
|
48
|
+
|
|
49
|
+
{ "script": "dispatch", "with": { "next": "run", "target": "issue" },
|
|
50
|
+
"runWhen": { "data.taskState.core.lastOutcome.type": "PLAN_COMPLETED" } },
|
|
51
|
+
|
|
52
|
+
{ "script": "dispatch", "with": { "next": "review", "target": "pr" },
|
|
53
|
+
"runWhen": { "data.taskState.core.lastOutcome.type": "RUN_COMPLETED" } },
|
|
54
|
+
|
|
55
|
+
{ "script": "finishFlow",
|
|
56
|
+
"with": { "reason": "review-passed", "label": "kody:done", "color": "0e8a16", "description": "kody2: PR ready for human review/merge" },
|
|
57
|
+
"runWhen": { "data.taskState.core.lastOutcome.type": "REVIEW_PASS" } },
|
|
58
|
+
|
|
59
|
+
{ "script": "dispatch", "with": { "next": "fix", "target": "pr" },
|
|
60
|
+
"runWhen": { "data.taskState.core.lastOutcome.type": ["REVIEW_CONCERNS", "REVIEW_FAIL"] } },
|
|
61
|
+
|
|
62
|
+
{ "script": "finishFlow",
|
|
63
|
+
"with": { "reason": "review-failed", "label": "kody:failed", "color": "e11d21", "description": "kody2: flow failed" },
|
|
64
|
+
"runWhen": { "data.taskState.core.lastOutcome.type": "REVIEW_FAILED" } },
|
|
65
|
+
|
|
66
|
+
{ "script": "finishFlow",
|
|
67
|
+
"with": { "reason": "fix-applied", "label": "kody:done", "color": "0e8a16", "description": "kody2: PR ready for human review/merge" },
|
|
68
|
+
"runWhen": { "data.taskState.core.lastOutcome.type": "FIX_COMPLETED" } },
|
|
69
|
+
|
|
70
|
+
{ "script": "finishFlow",
|
|
71
|
+
"with": { "reason": "aborted", "label": "kody:failed", "color": "e11d21", "description": "kody2: flow failed" },
|
|
72
|
+
"runWhen": { "data.taskState.core.lastOutcome.type": ["RESEARCH_FAILED", "PLAN_FAILED", "RUN_FAILED", "FIX_FAILED", "AGENT_NOT_RUN"] } },
|
|
73
|
+
|
|
74
|
+
{ "script": "persistFlowState" }
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
"output": {
|
|
78
|
+
"actionTypes": [
|
|
79
|
+
"FLOW_STARTED",
|
|
80
|
+
"FLOW_COMPLETED",
|
|
81
|
+
"FLOW_ABORTED"
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "spec",
|
|
3
|
+
"describe": "Sub-orchestrator for spec / RFC / design-doc issues — research → plan (stop). Terminates at the plan artifact; no run, no PR. No agent.",
|
|
4
|
+
"inputs": [
|
|
5
|
+
{
|
|
6
|
+
"name": "issue",
|
|
7
|
+
"flag": "--issue",
|
|
8
|
+
"type": "int",
|
|
9
|
+
"required": true,
|
|
10
|
+
"describe": "GitHub issue number to drive the flow on."
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"claudeCode": {
|
|
14
|
+
"model": "inherit",
|
|
15
|
+
"permissionMode": "default",
|
|
16
|
+
"maxTurns": 0,
|
|
17
|
+
"maxThinkingTokens": null,
|
|
18
|
+
"systemPromptAppend": null,
|
|
19
|
+
"tools": [],
|
|
20
|
+
"hooks": [],
|
|
21
|
+
"skills": [],
|
|
22
|
+
"commands": [],
|
|
23
|
+
"subagents": [],
|
|
24
|
+
"plugins": [],
|
|
25
|
+
"mcpServers": []
|
|
26
|
+
},
|
|
27
|
+
"cliTools": [],
|
|
28
|
+
"scripts": {
|
|
29
|
+
"preflight": [
|
|
30
|
+
{
|
|
31
|
+
"script": "setLifecycleLabel",
|
|
32
|
+
"with": {
|
|
33
|
+
"label": "kody:orchestrating",
|
|
34
|
+
"color": "1d76db",
|
|
35
|
+
"description": "kody2: orchestrating a multi-stage flow"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{ "script": "loadIssueContext" },
|
|
39
|
+
{ "script": "loadTaskState" },
|
|
40
|
+
{ "script": "skipAgent" }
|
|
41
|
+
],
|
|
42
|
+
"postflight": [
|
|
43
|
+
{ "script": "startFlow", "with": { "entry": "research", "target": "issue" },
|
|
44
|
+
"runWhen": { "data.taskState.core.lastOutcome": null } },
|
|
45
|
+
|
|
46
|
+
{ "script": "dispatch", "with": { "next": "plan", "target": "issue" },
|
|
47
|
+
"runWhen": { "data.taskState.core.lastOutcome.type": "RESEARCH_COMPLETED" } },
|
|
48
|
+
|
|
49
|
+
{ "script": "finishFlow",
|
|
50
|
+
"with": { "reason": "spec-ready", "label": "kody:done", "color": "0e8a16", "description": "kody2: spec/plan artifact ready" },
|
|
51
|
+
"runWhen": { "data.taskState.core.lastOutcome.type": "PLAN_COMPLETED" } },
|
|
52
|
+
|
|
53
|
+
{ "script": "finishFlow",
|
|
54
|
+
"with": { "reason": "aborted", "label": "kody:failed", "color": "e11d21", "description": "kody2: flow failed" },
|
|
55
|
+
"runWhen": { "data.taskState.core.lastOutcome.type": ["RESEARCH_FAILED", "PLAN_FAILED", "AGENT_NOT_RUN"] } },
|
|
56
|
+
|
|
57
|
+
{ "script": "persistFlowState" }
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"output": {
|
|
61
|
+
"actionTypes": [
|
|
62
|
+
"FLOW_STARTED",
|
|
63
|
+
"FLOW_COMPLETED",
|
|
64
|
+
"FLOW_ABORTED"
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kody-ade/kody-engine",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.53",
|
|
4
4
|
"description": "kody2 — autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|