@kody-ade/kody-engine 0.4.107 → 0.4.109
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 +1 -1
- package/dist/executables/plan/prompt.md +11 -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 +30 -7
- package/package.json +1 -1
- package/templates/kody.yml +1 -1
package/dist/bin/kody.js
CHANGED
|
@@ -880,7 +880,7 @@ var init_loadPriorArt = __esm({
|
|
|
880
880
|
// package.json
|
|
881
881
|
var package_default = {
|
|
882
882
|
name: "@kody-ade/kody-engine",
|
|
883
|
-
version: "0.4.
|
|
883
|
+
version: "0.4.109",
|
|
884
884
|
description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
|
|
885
885
|
license: "MIT",
|
|
886
886
|
type: "module",
|
|
@@ -83,6 +83,15 @@ COMMIT_MSG: plan: <very short title>
|
|
|
83
83
|
PR_SUMMARY:
|
|
84
84
|
<A deep, detailed implementation plan in markdown with the following sections, in order. Omit a section only if its trigger condition is not met — do not leave placeholders. Depth is expected; brevity for its own sake is not a goal.
|
|
85
85
|
|
|
86
|
+
## Requirement coverage
|
|
87
|
+
Enumerate EVERY discrete ask in the issue (and any answered clarifications) as a
|
|
88
|
+
checklist, each mapped to where this plan delivers it:
|
|
89
|
+
- <verbatim ask> → <the section/file in this plan that addresses it>
|
|
90
|
+
- <verbatim ask> → ⚠ MISSING — <what's needed, or why it can't be planned>
|
|
91
|
+
Do not finalize a plan that still has a ⚠ MISSING row unless that row is also
|
|
92
|
+
listed under "Ambiguities & assumptions" with a concrete blocker. Silently
|
|
93
|
+
dropping an ask the issue made is a planning failure.
|
|
94
|
+
|
|
86
95
|
## Existing patterns found
|
|
87
96
|
For each major part of the change, name the sibling module in this repo that
|
|
88
97
|
already solves a similar problem and state how this plan reuses it.
|
|
@@ -176,6 +185,8 @@ No filler. No marketing language. Depth over brevity.>
|
|
|
176
185
|
- Read-only. Do NOT modify any file.
|
|
177
186
|
- Do NOT run git or gh commands.
|
|
178
187
|
- No speculative scope — plan only what the issue asks for, but plan it THOROUGHLY.
|
|
188
|
+
- **Deliver the full ask or split it — never silently shrink it.** Planning a reduced version of what the issue requested is the most damaging failure mode. When any of these phrases (or their intent) describe a *stated requirement* rather than a genuine deferred phase, treat it as a BLOCKER: `"v1"`, `"v2 later"`, `"simplified"`, `"basic version"`, `"minimal"`, `"static for now"`, `"hardcoded for now"`, `"placeholder"`, `"stub"`, `"will be wired later"`, `"future enhancement"`. If the full ask is genuinely too large for one plan, output `FAILED: scope too large — split into <sub-issues>` — do NOT quietly plan less than was asked.
|
|
189
|
+
- **Authority limits on narrowing scope.** You may narrow or split scope ONLY for concrete constraints: output/context-token budget, information you cannot obtain, or a dependency conflict. You may NOT narrow scope because a part looks hard, complex, or time-consuming — difficulty is never a license to reduce the ask.
|
|
179
190
|
- **Plan length ≤ ~1500 lines / ~15k tokens.** Larger plans get truncated by output token caps before the closing `DONE` marker — and a truncated plan is worse than a smaller one. If a feature legitimately needs more, output `FAILED: scope too large for single plan — split into <list of sub-issues>` instead of overrunning.
|
|
180
191
|
- If the issue is ambiguous and you cannot make progress without input, output `FAILED: <what's unclear>` instead of a plan.
|
|
181
192
|
- If the Research floor cannot be met because required files are missing or unreadable, output `FAILED: <what could not be read>` instead of a half-blind plan.
|
|
@@ -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,22 +16,45 @@ 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
|
|
|
33
34
|
4. Drop duplicate findings, keep every distinct `file:line` citation. Do not invent citations — only pass through what the subagents reported from files they actually read.
|
|
34
35
|
|
|
36
|
+
# Review stance — do not go soft
|
|
37
|
+
|
|
38
|
+
Default to skepticism: assume the diff contains a defect until the code proves otherwise, and surface every issue you can demonstrate with a `file:line`. Watch for the ways a reviewer quietly goes easy — each is a failure here:
|
|
39
|
+
|
|
40
|
+
- Downgrading a real BLOCK to a WARN or a Suggestion so the review feels less harsh.
|
|
41
|
+
- Accepting "looks right" without confirming the change is actually wired (apply the depth ladder below).
|
|
42
|
+
- Treating a stub or placeholder shipped against a *stated* requirement as acceptable. Phrases like `"v1"`, `"basic version"`, `"simplified"`, `"minimal"`, `"static for now"`, `"hardcoded for now"`, `"placeholder"`, `"stub"`, `"will be wired later"`, `"future enhancement"` — when they describe a behavior the issue actually asked for — are a **FAIL**, not a note.
|
|
43
|
+
- Returning **PASS** when a whole dimension came back `BLOCKED`/`NEEDS_CONTEXT`.
|
|
44
|
+
|
|
45
|
+
Severity reflects the risk in the code, never how it feels to report it.
|
|
46
|
+
|
|
47
|
+
# Implementation depth — existence is not implementation
|
|
48
|
+
|
|
49
|
+
For every change in the diff, don't stop at "the code is there". Walk the ladder:
|
|
50
|
+
|
|
51
|
+
1. **Exists** — the function / route / field / component is present.
|
|
52
|
+
2. **Substantive** — it has real logic, not a stub, `TODO`, `return null`, or an echo of its input.
|
|
53
|
+
3. **Wired** — its output is actually consumed: the query result is returned, the fetched response is used, the new config key is read where it matters, the handler is registered/exported, the component is rendered. Grep the symbol's usages to confirm it's consumed, not just defined.
|
|
54
|
+
4. **Functional** — it produces the right result for the issue's cases.
|
|
55
|
+
|
|
56
|
+
Missing *wiring* is the most common defect — a query that exists but whose result is never returned, a fetch whose response is ignored, a config default added in code but absent from the schema. A change that reaches only Exists/Substantive but isn't wired is a correctness **FAIL**, not a style note.
|
|
57
|
+
|
|
35
58
|
# Required output
|
|
36
59
|
|
|
37
60
|
Your FINAL message must be exactly this markdown — no preamble, no DONE/COMMIT_MSG/PR_SUMMARY markers. The entire final message IS the review comment, posted verbatim:
|
|
@@ -39,7 +62,7 @@ Your FINAL message must be exactly this markdown — no preamble, no DONE/COMMIT
|
|
|
39
62
|
```
|
|
40
63
|
## Verdict: PASS | CONCERNS | FAIL
|
|
41
64
|
|
|
42
|
-
> Reviewed in parallel by
|
|
65
|
+
> Reviewed in parallel by specialist subagents (security · correctness · structure · architecture when the diff is structural).
|
|
43
66
|
|
|
44
67
|
### Summary
|
|
45
68
|
<2-3 sentences: what this PR does, is the approach sound>
|
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.109",
|
|
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",
|
package/templates/kody.yml
CHANGED