@kody-ade/kody-engine 0.4.108 → 0.4.110
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 +791 -138
- package/dist/executables/goal-scheduler/scheduler.sh +0 -0
- package/dist/executables/pool-serve/profile.json +28 -0
- package/dist/executables/release-deploy/deploy.sh +0 -0
- package/dist/executables/release-prepare/prepare.sh +0 -0
- package/dist/executables/release-publish/publish.sh +0 -0
- package/dist/executables/resolve/apply-prefer.sh +0 -0
- package/dist/executables/revert/revert.sh +0 -0
- package/dist/executables/review/agents/review-architecture.md +33 -0
- package/dist/executables/review/agents/review-security.md +5 -2
- package/dist/executables/review/profile.json +1 -1
- package/dist/executables/review/prompt.md +8 -7
- package/dist/executables/runner-serve/profile.json +28 -0
- package/package.json +20 -19
- package/templates/kody.yml +1 -1
|
File without changes
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pool-serve",
|
|
3
|
+
"role": "utility",
|
|
4
|
+
"describe": "Always-on warm-pool owner, co-located on the kody-litellm machine. Supervises the LiteLLM proxy and serves the pool API the dashboard calls to claim a pre-booted, frozen runner. Listens on $POOL_API_PORT (default 4100); auth via $POOL_API_KEY (derived from $KODY_MASTER_KEY). Usage: `kody pool-serve`.",
|
|
5
|
+
"inputs": [],
|
|
6
|
+
"claudeCode": {
|
|
7
|
+
"model": "inherit",
|
|
8
|
+
"permissionMode": "acceptEdits",
|
|
9
|
+
"maxTurns": null,
|
|
10
|
+
"systemPromptAppend": null,
|
|
11
|
+
"tools": [],
|
|
12
|
+
"hooks": [],
|
|
13
|
+
"skills": [],
|
|
14
|
+
"commands": [],
|
|
15
|
+
"subagents": [],
|
|
16
|
+
"plugins": [],
|
|
17
|
+
"mcpServers": []
|
|
18
|
+
},
|
|
19
|
+
"cliTools": [],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"preflight": [
|
|
22
|
+
{
|
|
23
|
+
"script": "poolServe"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"postflight": []
|
|
27
|
+
}
|
|
28
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review-architecture
|
|
3
|
+
description: Architecture/structure reviewer for structural PRs. Inspects how a diff affects component boundaries, coupling, dependency direction, single responsibility, and blast radius — not line-level style. Returns findings only; never edits files.
|
|
4
|
+
tools: Read, Grep, Glob, Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are an architecture reviewer examining one pull request. Read-only: never edit files, never run `git`/`gh` write commands. Use Read / Grep / Glob and read-only `git diff` / `git show` to inspect.
|
|
8
|
+
|
|
9
|
+
You are dispatched only when a diff is **structural** — it adds/moves/deletes modules, changes a public interface/export, or wires a new dependency between areas. Judge the *shape* of the change: boundaries and coupling, not line-level style (another reviewer owns that) or runtime correctness (another owns that).
|
|
10
|
+
|
|
11
|
+
Method:
|
|
12
|
+
- Map what moved: which modules/layers the diff touches and the new dependency edges it introduces. Read the full changed files plus at least one sibling already living in the target area.
|
|
13
|
+
- Then check:
|
|
14
|
+
- **Single responsibility** — does each new/changed module do one clear job, or has it become a god-module / god-route?
|
|
15
|
+
- **Dependency direction** — does the new edge point the right way (a shared/core util must not import a feature/app layer; nothing should import "upward")? Flag layering violations and any new import cycle.
|
|
16
|
+
- **Reuse before rewrite** — does this add a new abstraction where an existing sibling already solves the problem? Name the sibling it should have reused.
|
|
17
|
+
- **Blast radius** — for a changed public interface, grep its call sites: how many are affected, and were they all updated? A signature/contract change with un-updated callers is a real risk.
|
|
18
|
+
- **Premature abstraction** — a new layer/interface with a single implementation and no second caller is a smell; say so rather than bless it.
|
|
19
|
+
- Cite real `file:line` from files you actually read. Never invent citations.
|
|
20
|
+
|
|
21
|
+
Return ONLY this block — no preamble:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
ARCHITECTURE
|
|
25
|
+
- status: DONE | NEEDS_CONTEXT | BLOCKED
|
|
26
|
+
- severity: BLOCK | WARN | NONE
|
|
27
|
+
- findings:
|
|
28
|
+
- <file:line — the boundary/coupling/responsibility issue, the existing pattern it should follow, and the concrete risk it creates, or "None">
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Use `BLOCK` only for a structural change with a real, demonstrable risk — a new dependency cycle, a layering violation that breaks a stated invariant, or a public-interface change with un-updated callers. Design preferences with no concrete failure mode are `WARN`. If on inspection the diff is not actually structural, return `severity: NONE` and say so in one line.
|
|
32
|
+
|
|
33
|
+
`status`: `DONE` = you reviewed the structural change. `NEEDS_CONTEXT` = you need a file or boundary the lead must supply — say exactly what. `BLOCKED` = you could not read the diff/files at all — say why. Never emit `severity: NONE` to fake a clean review when you were actually blocked; report the block.
|
|
@@ -11,8 +11,11 @@ Scope yourself strictly to security. Ignore style, naming, and general correctne
|
|
|
11
11
|
Method:
|
|
12
12
|
- Read the FULL changed files, not just the hunks — a vulnerability often lives outside the diff window.
|
|
13
13
|
- For every request handler, query, or external call in the diff, check: is user input validated? Is it parameterized? Is authorization checked before the sensitive action? Are secrets read from env, not hardcoded?
|
|
14
|
+
- **STRIDE per touched component.** For each component the diff adds or changes (a route, handler, query, parser, deserializer, external call, auth check), walk the six threats and note any the change actually enables: **S**poofing (is an identity forgeable?), **T**ampering (can input/state be mutated in transit or at rest?), **R**epudiation (is a security-relevant action left unlogged?), **I**nformation disclosure (is data leaked via response/log/error?), **D**enial of service (does attacker-controlled input drive unbounded work?), **E**levation of privilege (is authorization checked before the sensitive action?).
|
|
14
15
|
- Cite real `file:line` from files you actually read. Never invent citations.
|
|
15
16
|
|
|
17
|
+
Confidence filter — before reporting, suppress false positives. Do NOT report: input that is not attacker-controlled; a sink the tainted value never actually reaches; escaping/validation the framework already applies; or a "best practice" with no demonstrable exploit on this diff. If you cannot trace a path from an attacker-controlled source to the sink in files you read, it is not a finding.
|
|
18
|
+
|
|
16
19
|
Return ONLY this block — no preamble:
|
|
17
20
|
|
|
18
21
|
```
|
|
@@ -20,9 +23,9 @@ SECURITY
|
|
|
20
23
|
- status: DONE | NEEDS_CONTEXT | BLOCKED
|
|
21
24
|
- severity: BLOCK | WARN | NONE
|
|
22
25
|
- findings:
|
|
23
|
-
- <file:line —
|
|
26
|
+
- <file:line — the issue, the STRIDE category, and a concrete step-by-step exploit path (attacker sends X → reaches Y unchecked → gains Z), or "None">
|
|
24
27
|
```
|
|
25
28
|
|
|
26
|
-
Use `BLOCK` only for a real, exploitable vulnerability introduced by this diff. Pre-existing issues the diff didn't touch are out of scope.
|
|
29
|
+
Every `BLOCK`/`WARN` finding MUST include a concrete exploit path. If you cannot write the step-by-step path, the finding isn't real — drop it. Use `BLOCK` only for a real, exploitable vulnerability introduced by this diff. Pre-existing issues the diff didn't touch are out of scope.
|
|
27
30
|
|
|
28
31
|
`status`: `DONE` = you reviewed the full diff. `NEEDS_CONTEXT` = you need a file or context the lead must supply to finish — say exactly what. `BLOCKED` = you could not read the diff/files at all — say why. Never emit `severity: NONE` to fake a clean review when you were actually blocked; report the block.
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"hooks": ["block-write"],
|
|
30
30
|
"skills": [],
|
|
31
31
|
"commands": [],
|
|
32
|
-
"subagents": ["review-security", "review-correctness", "review-style"],
|
|
32
|
+
"subagents": ["review-security", "review-correctness", "review-style", "review-architecture"],
|
|
33
33
|
"plugins": [],
|
|
34
34
|
"mcpServers": []
|
|
35
35
|
},
|
|
@@ -16,17 +16,18 @@ Base: {{pr.baseRefName}} ← Head: {{pr.headRefName}}
|
|
|
16
16
|
|
|
17
17
|
# How to run this review
|
|
18
18
|
|
|
19
|
-
1. **Fan out in parallel.** In a SINGLE message, issue
|
|
20
|
-
- `review-security` — security vulnerabilities.
|
|
21
|
-
- `review-correctness` — logic bugs, regressions, test gaps.
|
|
22
|
-
- `review-style` — structure, conventions, duplication, docs.
|
|
19
|
+
1. **Fan out in parallel.** In a SINGLE message, issue the `Agent` calls — one per subagent — so they run concurrently:
|
|
20
|
+
- `review-security` — security vulnerabilities. **Always.**
|
|
21
|
+
- `review-correctness` — logic bugs, regressions, test gaps. **Always.**
|
|
22
|
+
- `review-style` — structure, conventions, duplication, docs. **Always.**
|
|
23
|
+
- `review-architecture` — component boundaries, coupling, dependency direction, blast radius. **Only when the diff is structural**: it adds/moves/deletes modules, changes a public interface/export, or wires a new dependency between areas. Skip it for a localized change (a single function body, a copy tweak, a test-only or config-only diff) — a fourth reviewer with nothing to say only costs time.
|
|
23
24
|
|
|
24
25
|
Give each subagent the same context: PR #{{pr.number}}, the base/head refs above, and the diff. Instruct each to read the full changed files (not just hunks) before reporting, and to return only its structured block.
|
|
25
26
|
|
|
26
27
|
2. **Check each reviewer's `status` before trusting its verdict.** A reviewer that returns `NEEDS_CONTEXT` or `BLOCKED` did not actually complete its review — do NOT treat its `severity: NONE` as a clean pass. Do NOT re-dispatch the same reviewer with the same instructions; change something: give it the context it asked for, or note in the comment that this dimension could not be reviewed. A review missing a whole dimension cannot be **PASS**.
|
|
27
28
|
|
|
28
|
-
3. **Synthesize.** Once all
|
|
29
|
-
- any `BLOCK` (security or
|
|
29
|
+
3. **Synthesize.** Once all dispatched subagents have genuinely completed, merge their findings into the single comment below. Resolve the verdict from the worst severity reported:
|
|
30
|
+
- any `BLOCK` (security, correctness, or architecture) → **FAIL**
|
|
30
31
|
- no BLOCK but any `WARN` → **CONCERNS**
|
|
31
32
|
- all `NONE` → **PASS**
|
|
32
33
|
|
|
@@ -61,7 +62,7 @@ Your FINAL message must be exactly this markdown — no preamble, no DONE/COMMIT
|
|
|
61
62
|
```
|
|
62
63
|
## Verdict: PASS | CONCERNS | FAIL
|
|
63
64
|
|
|
64
|
-
> Reviewed in parallel by
|
|
65
|
+
> Reviewed in parallel by specialist subagents (security · correctness · structure · architecture when the diff is structural).
|
|
65
66
|
|
|
66
67
|
### Summary
|
|
67
68
|
<2-3 sentences: what this PR does, is the approach sound>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "runner-serve",
|
|
3
|
+
"role": "utility",
|
|
4
|
+
"describe": "Idle HTTP server for a warm-pool one-shot runner. Boots with no issue, listens on $PORT (default 8080), and on an authed POST /run (X-Api-Key/Bearer $RUNNER_API_KEY) clones the repo and runs `kody run --issue N`, then exits so Fly auto_destroy reclaims the machine. Usage: `kody runner-serve`.",
|
|
5
|
+
"inputs": [],
|
|
6
|
+
"claudeCode": {
|
|
7
|
+
"model": "inherit",
|
|
8
|
+
"permissionMode": "acceptEdits",
|
|
9
|
+
"maxTurns": null,
|
|
10
|
+
"systemPromptAppend": null,
|
|
11
|
+
"tools": [],
|
|
12
|
+
"hooks": [],
|
|
13
|
+
"skills": [],
|
|
14
|
+
"commands": [],
|
|
15
|
+
"subagents": [],
|
|
16
|
+
"plugins": [],
|
|
17
|
+
"mcpServers": []
|
|
18
|
+
},
|
|
19
|
+
"cliTools": [],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"preflight": [
|
|
22
|
+
{
|
|
23
|
+
"script": "runnerServe"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"postflight": []
|
|
27
|
+
}
|
|
28
|
+
}
|
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.110",
|
|
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",
|
|
@@ -12,6 +12,23 @@
|
|
|
12
12
|
"templates",
|
|
13
13
|
"kody.config.schema.json"
|
|
14
14
|
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"kody:run": "tsx bin/kody.ts",
|
|
17
|
+
"serve": "tsx bin/kody.ts serve",
|
|
18
|
+
"serve:vscode": "tsx bin/kody.ts serve vscode",
|
|
19
|
+
"serve:claude": "tsx bin/kody.ts serve claude",
|
|
20
|
+
"build": "tsup && node scripts/copy-assets.cjs",
|
|
21
|
+
"check:modularity": "tsx scripts/check-script-modularity.ts",
|
|
22
|
+
"pretest": "pnpm check:modularity",
|
|
23
|
+
"test": "vitest run tests/unit tests/int --no-coverage",
|
|
24
|
+
"test:e2e": "vitest run tests/e2e --no-coverage",
|
|
25
|
+
"test:all": "vitest run tests --no-coverage",
|
|
26
|
+
"typecheck": "tsc --noEmit",
|
|
27
|
+
"lint": "biome check",
|
|
28
|
+
"lint:fix": "biome check --write",
|
|
29
|
+
"format": "biome format --write",
|
|
30
|
+
"prepublishOnly": "pnpm build"
|
|
31
|
+
},
|
|
15
32
|
"dependencies": {
|
|
16
33
|
"@actions/cache": "^6.0.0",
|
|
17
34
|
"@anthropic-ai/claude-agent-sdk": "0.2.119",
|
|
@@ -33,21 +50,5 @@
|
|
|
33
50
|
"url": "git+https://github.com/aharonyaircohen/kody-engine.git"
|
|
34
51
|
},
|
|
35
52
|
"homepage": "https://github.com/aharonyaircohen/kody-engine",
|
|
36
|
-
"bugs": "https://github.com/aharonyaircohen/kody-engine/issues"
|
|
37
|
-
|
|
38
|
-
"kody:run": "tsx bin/kody.ts",
|
|
39
|
-
"serve": "tsx bin/kody.ts serve",
|
|
40
|
-
"serve:vscode": "tsx bin/kody.ts serve vscode",
|
|
41
|
-
"serve:claude": "tsx bin/kody.ts serve claude",
|
|
42
|
-
"build": "tsup && node scripts/copy-assets.cjs",
|
|
43
|
-
"check:modularity": "tsx scripts/check-script-modularity.ts",
|
|
44
|
-
"pretest": "pnpm check:modularity",
|
|
45
|
-
"test": "vitest run tests/unit tests/int --no-coverage",
|
|
46
|
-
"test:e2e": "vitest run tests/e2e --no-coverage",
|
|
47
|
-
"test:all": "vitest run tests --no-coverage",
|
|
48
|
-
"typecheck": "tsc --noEmit",
|
|
49
|
-
"lint": "biome check",
|
|
50
|
-
"lint:fix": "biome check --write",
|
|
51
|
-
"format": "biome format --write"
|
|
52
|
-
}
|
|
53
|
-
}
|
|
53
|
+
"bugs": "https://github.com/aharonyaircohen/kody-engine/issues"
|
|
54
|
+
}
|
package/templates/kody.yml
CHANGED