@kody-ade/kody-engine 0.4.92 → 0.4.93
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/kody.js
CHANGED
|
@@ -877,7 +877,7 @@ var init_loadPriorArt = __esm({
|
|
|
877
877
|
// package.json
|
|
878
878
|
var package_default = {
|
|
879
879
|
name: "@kody-ade/kody-engine",
|
|
880
|
-
version: "0.4.
|
|
880
|
+
version: "0.4.93",
|
|
881
881
|
description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
|
|
882
882
|
license: "MIT",
|
|
883
883
|
type: "module",
|
|
@@ -1,32 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chore",
|
|
3
|
-
"role": "
|
|
4
|
-
"
|
|
5
|
-
"describe": "Chore / docs / dep-bump flow — run → review (→ fix on concerns/fail). Skips planning entirely. Children run sequentially in one process via the container loop.",
|
|
3
|
+
"role": "primitive",
|
|
4
|
+
"describe": "Make a chore / docs / dep-bump change end-to-end in ONE session: minimal investigation → change → verify, then branch, commit, open PR. Low-ceremony (no heavy planning) — single-session, no multi-stage orchestration.",
|
|
6
5
|
"inputs": [
|
|
7
6
|
{
|
|
8
7
|
"name": "issue",
|
|
9
8
|
"flag": "--issue",
|
|
10
9
|
"type": "int",
|
|
11
10
|
"required": true,
|
|
12
|
-
"describe": "GitHub issue number to
|
|
11
|
+
"describe": "GitHub issue number to implement."
|
|
13
12
|
},
|
|
14
13
|
{
|
|
15
14
|
"name": "base",
|
|
16
15
|
"flag": "--base",
|
|
17
16
|
"type": "string",
|
|
18
17
|
"required": false,
|
|
19
|
-
"describe": "Optional base branch override (stacked-PR).
|
|
18
|
+
"describe": "Optional base branch override (stacked-PR). Used by goal-tick so each task PR forks from the previous task's head ref."
|
|
20
19
|
}
|
|
21
20
|
],
|
|
22
21
|
"claudeCode": {
|
|
23
22
|
"model": "inherit",
|
|
24
|
-
"permissionMode": "
|
|
25
|
-
"maxTurns":
|
|
26
|
-
"
|
|
23
|
+
"permissionMode": "acceptEdits",
|
|
24
|
+
"maxTurns": null,
|
|
25
|
+
"maxTurnTimeoutSec": 1200,
|
|
27
26
|
"systemPromptAppend": null,
|
|
28
|
-
"
|
|
29
|
-
"
|
|
27
|
+
"cacheable": true,
|
|
28
|
+
"enableVerifyTool": true,
|
|
29
|
+
"verifyAttempts": 4,
|
|
30
|
+
"tools": [
|
|
31
|
+
"Read",
|
|
32
|
+
"Write",
|
|
33
|
+
"Edit",
|
|
34
|
+
"Bash",
|
|
35
|
+
"Grep",
|
|
36
|
+
"Glob",
|
|
37
|
+
"mcp__kody-verify"
|
|
38
|
+
],
|
|
39
|
+
"hooks": ["block-git"],
|
|
30
40
|
"skills": [],
|
|
31
41
|
"commands": [],
|
|
32
42
|
"subagents": [],
|
|
@@ -34,79 +44,31 @@
|
|
|
34
44
|
"mcpServers": []
|
|
35
45
|
},
|
|
36
46
|
"cliTools": [],
|
|
47
|
+
"lifecycle": "pr-branch",
|
|
48
|
+
"lifecycleConfig": {
|
|
49
|
+
"label": {
|
|
50
|
+
"name": "kody:running",
|
|
51
|
+
"color": "fbca04",
|
|
52
|
+
"description": "kody: implementing the change"
|
|
53
|
+
},
|
|
54
|
+
"context": "task",
|
|
55
|
+
"sync": false,
|
|
56
|
+
"verify": true,
|
|
57
|
+
"advance": false,
|
|
58
|
+
"mirrorState": true,
|
|
59
|
+
"finalize": true
|
|
60
|
+
},
|
|
37
61
|
"scripts": {
|
|
38
62
|
"preflight": [
|
|
39
|
-
{
|
|
40
|
-
"script": "setLifecycleLabel",
|
|
41
|
-
"with": {
|
|
42
|
-
"label": "kody-flow:chore",
|
|
43
|
-
"color": "c5def5",
|
|
44
|
-
"description": "kody flow: chore / docs / dep-bump"
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"script": "setLifecycleLabel",
|
|
49
|
-
"with": {
|
|
50
|
-
"label": "kody:orchestrating",
|
|
51
|
-
"color": "1d76db",
|
|
52
|
-
"description": "kody: orchestrating a multi-stage flow"
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
{ "script": "loadIssueContext" },
|
|
56
|
-
{ "script": "loadTaskState" }
|
|
63
|
+
{ "script": "runFlow" }
|
|
57
64
|
],
|
|
58
|
-
"postflight": [
|
|
59
|
-
{ "script": "finishFlow",
|
|
60
|
-
"with": { "reason": "review-passed", "label": "kody:done", "color": "0e8a16", "description": "kody: PR ready for human review/merge" },
|
|
61
|
-
"runWhen": { "data.taskState.core.lastOutcome.type": "REVIEW_PASS" } },
|
|
62
|
-
|
|
63
|
-
{ "script": "finishFlow",
|
|
64
|
-
"with": { "reason": "fix-applied", "label": "kody:done", "color": "0e8a16", "description": "kody: PR ready for human review/merge" },
|
|
65
|
-
"runWhen": { "data.taskState.core.lastOutcome.type": "FIX_COMPLETED" } },
|
|
66
|
-
|
|
67
|
-
{ "script": "finishFlow",
|
|
68
|
-
"with": { "reason": "review-failed", "label": "kody:failed", "color": "e11d21", "description": "kody: flow failed" },
|
|
69
|
-
"runWhen": { "data.taskState.core.lastOutcome.type": "REVIEW_FAILED" } },
|
|
70
|
-
|
|
71
|
-
{ "script": "finishFlow",
|
|
72
|
-
"with": { "reason": "aborted", "label": "kody:failed", "color": "e11d21", "description": "kody: flow failed" },
|
|
73
|
-
"runWhen": { "data.taskState.core.lastOutcome.type": ["RUN_FAILED", "FIX_FAILED", "AGENT_NOT_RUN"] } },
|
|
74
|
-
|
|
75
|
-
{ "script": "persistFlowState" }
|
|
76
|
-
]
|
|
65
|
+
"postflight": []
|
|
77
66
|
},
|
|
78
|
-
"children": [
|
|
79
|
-
{
|
|
80
|
-
"exec": "run",
|
|
81
|
-
"target": "issue",
|
|
82
|
-
"next": {
|
|
83
|
-
"RUN_COMPLETED": "review",
|
|
84
|
-
"*": "abort"
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
"exec": "review",
|
|
89
|
-
"target": "pr",
|
|
90
|
-
"next": {
|
|
91
|
-
"REVIEW_PASS": "done",
|
|
92
|
-
"REVIEW_CONCERNS": "fix",
|
|
93
|
-
"REVIEW_FAIL": "fix",
|
|
94
|
-
"*": "abort"
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
"exec": "fix",
|
|
99
|
-
"target": "pr",
|
|
100
|
-
"next": {
|
|
101
|
-
"FIX_COMPLETED": "done",
|
|
102
|
-
"*": "abort"
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
],
|
|
106
67
|
"output": {
|
|
107
68
|
"actionTypes": [
|
|
108
|
-
"
|
|
109
|
-
"
|
|
69
|
+
"CHORE_COMPLETED",
|
|
70
|
+
"CHORE_FAILED",
|
|
71
|
+
"AGENT_NOT_RUN"
|
|
110
72
|
]
|
|
111
73
|
}
|
|
112
74
|
}
|
|
@@ -1,6 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
You are Kody, an autonomous engineer. Make a small chore / docs / dependency-bump change end-to-end in ONE session. Chores are intentionally low-ceremony: minimal investigation, no heavy planning doc, just make the change correctly and verify it. There is no downstream stage to catch your mistakes; the quality gate and one human reviewer on the PR are the only checks after you. The wrapper handles git/gh — you do not.
|
|
2
|
+
|
|
3
|
+
# Repo
|
|
4
|
+
- {{repoOwner}}/{{repoName}}, default branch: {{defaultBranch}}
|
|
5
|
+
- current branch (already checked out): {{branch}}
|
|
6
|
+
|
|
7
|
+
{{conventionsBlock}}{{coverageBlock}}{{toolsUsage}}# Issue #{{issue.number}}: {{issue.title}}
|
|
8
|
+
{{issue.body}}
|
|
9
|
+
|
|
10
|
+
# Recent comments (most recent first, truncated)
|
|
11
|
+
{{issue.commentsFormatted}}
|
|
12
|
+
|
|
13
|
+
Comments posted **after** the issue body are clarifications, scope changes, and answers to questions — they are part of the specification and OVERRIDE the original body wherever they conflict. The trigger comment itself may add or narrow scope; obey it. Read every comment above before changing anything.
|
|
14
|
+
|
|
15
|
+
{{memoryContext}}
|
|
16
|
+
|
|
17
|
+
# Required steps (all in this one session — no handoff)
|
|
18
|
+
|
|
19
|
+
1. **Investigate just enough.** A chore does not need a research doc or a formal plan, but it does need correctness:
|
|
20
|
+
- Read the **full** contents of every file you will change (not just a grep hit).
|
|
21
|
+
- For a dependency bump: check the lockfile/manifest for the current version and how the dep is imported/used; skim its changelog or breaking-changes if the bump crosses a major.
|
|
22
|
+
- For docs: read the surrounding doc and any code it references so the change stays accurate.
|
|
23
|
+
- If the issue body/comments contain URLs, use the Playwright MCP tools (`mcp__playwright__browser_navigate`, `mcp__playwright__browser_snapshot`) to load and read each before changing. If one can't be loaded, note it in PR_SUMMARY rather than guessing.
|
|
24
|
+
- If the chore is bigger than a chore (needs design decisions, touches behavior across modules, or needs a real test plan), do NOT improvise — output `FAILED: not a chore — needs feature/bug flow: <why>` so it gets reclassified.
|
|
25
|
+
|
|
26
|
+
2. **Make the change.** Stay strictly within the issue's scope. Mirror existing conventions (formatting, import style, doc voice). Do not "improve" adjacent code.
|
|
27
|
+
|
|
28
|
+
3. **Tests.** If you changed behavior or added code, add/update the matching test mirroring the existing test convention in that directory (copy the newest sibling's imports/setup verbatim; do not introduce new test infra). Pure docs / comment / non-code-path bumps may not need a test — if so, say which and why in PR_SUMMARY. "It's just a chore" is NOT a blanket excuse to skip a test for a code change.
|
|
29
|
+
|
|
30
|
+
4. **Verify — before declaring DONE, call the `verify` tool (mcp__kody-verify__verify).** It runs typecheck/lint/tests with the project's configured commands and returns `{ ok, failures, attemptsRemaining }`. If `ok: true`, proceed to DONE. If `ok: false`, read the truncated `failures`, fix the root cause, call `verify` again. Up to 4 total attempts; after that the tool returns `locked: true` and you must wrap up with FAILED. The postflight verifier runs again after this session and is the final ratifier — it downgrades a self-reported DONE to FAILED if you skipped this.
|
|
31
|
+
|
|
32
|
+
**Allowed fixes between attempts** include installing missing third-party deps. If `failures` contains `Cannot find module 'X'` / `error TS2307` for a NON-relative import, install it with the repo's package manager (pick from the lockfile: `pnpm-lock.yaml` → pnpm, `package-lock.json` → npm, `yarn.lock` → yarn, `bun.lockb` → bun). Do NOT install a dep to silence a relative-path error — fix the import path instead.
|
|
33
|
+
|
|
34
|
+
5. Your FINAL message must use this exact format (or a single `FAILED: <reason>` line on failure):
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
DONE
|
|
38
|
+
COMMIT_MSG: <conventional-commit message, e.g. "chore: bump X to 1.2.3" or "docs: clarify Y">
|
|
39
|
+
PR_SUMMARY:
|
|
40
|
+
<2-6 short bullet points naming exactly what you changed (files, version numbers, doc sections), plus any URL you could not fetch or any code change you left untested (with the reason). No marketing fluff. No restating the issue.>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
# Rules
|
|
44
|
+
- **No speculative refactors.** Stay inside the issue's scope. Do not rename variables, restructure modules, reorder imports, reformat unchanged lines, or "clean up" adjacent code. Scope drift is a hard failure even if it works. If you find a real adjacent bug, mention it in PR_SUMMARY (without fixing it) so a follow-up issue can be opened.
|
|
45
|
+
- Do NOT run **any** `git` or `gh` commands. The wrapper handles all git/gh. If a quality gate fails, that's the failure — do not investigate it via git.
|
|
46
|
+
- Stay on the current branch (`{{branch}}`). It is already checked out.
|
|
47
|
+
- Do NOT modify files under: `.kody/`, `.kody-engine/`, `.kody-lean/`, `node_modules/`, `dist/`, `build/`, `.env`, or any `*.log`.
|
|
48
|
+
- Do NOT post issue comments — the wrapper handles that.
|
|
49
|
+
- Pre-existing quality-gate failures unrelated to your change are NOT your responsibility unless your edits touched related code.
|
|
50
|
+
- Keep reasoning concise. A chore is small — long monologues waste turns.
|
|
51
|
+
{{systemPromptAppend}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kody-ade/kody-engine",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.93",
|
|
4
4
|
"description": "kody — autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|