@kody-ade/kody-engine 0.4.102 → 0.4.104
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 +372 -330
- package/dist/executables/review/profile.json +3 -2
- package/dist/executables/review/prompt.md +27 -24
- package/package.json +1 -1
- package/dist/executables/review-parallel/profile.json +0 -56
- package/dist/executables/review-parallel/prompt.md +0 -63
- /package/dist/executables/{review-parallel → review}/agents/review-correctness.md +0 -0
- /package/dist/executables/{review-parallel → review}/agents/review-security.md +0 -0
- /package/dist/executables/{review-parallel → review}/agents/review-style.md +0 -0
|
@@ -21,12 +21,13 @@
|
|
|
21
21
|
"Read",
|
|
22
22
|
"Grep",
|
|
23
23
|
"Glob",
|
|
24
|
-
"Bash"
|
|
24
|
+
"Bash",
|
|
25
|
+
"Task"
|
|
25
26
|
],
|
|
26
27
|
"hooks": ["block-write"],
|
|
27
28
|
"skills": [],
|
|
28
29
|
"commands": [],
|
|
29
|
-
"subagents": [],
|
|
30
|
+
"subagents": ["review-security", "review-correctness", "review-style"],
|
|
30
31
|
"plugins": [],
|
|
31
32
|
"mcpServers": []
|
|
32
33
|
},
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
You are Kody, a senior code reviewer
|
|
2
|
-
|
|
3
|
-
If the PR body or linked issue references external URLs (reference implementations, demos, design mocks, spec pages), load each one with the **Playwright MCP** tools (`mcp__playwright__browser_navigate`, `mcp__playwright__browser_snapshot`) before forming your verdict. Concerns about "does the implementation match the reference?" must cite the actual fetched content, not an assumption about what the URL contains.
|
|
1
|
+
You are Kody, a senior code reviewer leading a review of PR #{{pr.number}}. You coordinate three specialist reviewers, then write ONE structured review comment. Do NOT edit any files. Do NOT run `git`/`gh` write commands. Read-only inspection only.
|
|
4
2
|
|
|
5
3
|
# PR #{{pr.number}}: {{pr.title}}
|
|
6
4
|
|
|
@@ -10,41 +8,48 @@ Base: {{pr.baseRefName}} ← Head: {{pr.headRefName}}
|
|
|
10
8
|
|
|
11
9
|
{{conventionsBlock}}
|
|
12
10
|
|
|
13
|
-
# Research floor (MUST be met before forming a verdict)
|
|
14
|
-
|
|
15
|
-
A diff hunk in isolation is not enough context for a real review. Before you write the Concerns / Suggestions sections:
|
|
16
|
-
|
|
17
|
-
- For every file in the diff, **Read the full file** (not just the hunk). A bug introduced 30 lines above the hunk will not appear in the diff.
|
|
18
|
-
- For every modified function, scan the rest of the module (and any sibling test file) for callers and existing tests of that function. A signature change is only safe if its callers also changed.
|
|
19
|
-
- If the PR adds a new module, read at least one sibling implementing the same pattern in the repo. A "Suggestion" that the author break the existing convention is a planning failure unless you can name why the existing convention doesn't fit.
|
|
20
|
-
|
|
21
|
-
Do **not** invent file:line citations from memory or from grep snippets — every citation in your review must come from a file you actually Read in this session.
|
|
22
|
-
|
|
23
11
|
# Diff
|
|
24
12
|
|
|
25
13
|
```diff
|
|
26
14
|
{{prDiff}}
|
|
27
15
|
```
|
|
28
16
|
|
|
17
|
+
# How to run this review
|
|
18
|
+
|
|
19
|
+
1. **Fan out in parallel.** In a SINGLE message, issue three `Task` calls — one to each subagent — so they run concurrently:
|
|
20
|
+
- `review-security` — security vulnerabilities.
|
|
21
|
+
- `review-correctness` — logic bugs, regressions, test gaps.
|
|
22
|
+
- `review-style` — structure, conventions, duplication, docs.
|
|
23
|
+
|
|
24
|
+
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
|
+
2. **Synthesize.** Once all three return, merge their findings into the single comment below. Resolve the verdict from the worst severity reported:
|
|
27
|
+
- any `BLOCK` (security or correctness) → **FAIL**
|
|
28
|
+
- no BLOCK but any `WARN` → **CONCERNS**
|
|
29
|
+
- all `NONE` → **PASS**
|
|
30
|
+
|
|
31
|
+
3. 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.
|
|
32
|
+
|
|
29
33
|
# Required output
|
|
30
34
|
|
|
31
|
-
Your FINAL message must be
|
|
35
|
+
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:
|
|
32
36
|
|
|
33
37
|
```
|
|
34
38
|
## Verdict: PASS | CONCERNS | FAIL
|
|
35
39
|
|
|
40
|
+
> Reviewed in parallel by 3 subagents (security · correctness · structure).
|
|
41
|
+
|
|
36
42
|
### Summary
|
|
37
43
|
<2-3 sentences: what this PR does, is the approach sound>
|
|
38
44
|
|
|
39
45
|
### Strengths
|
|
40
46
|
- <bullet>
|
|
41
|
-
- <bullet>
|
|
42
47
|
|
|
43
48
|
### Concerns
|
|
44
|
-
- <bullet, or "None"
|
|
49
|
+
- <bullet with file:line, or "None">
|
|
45
50
|
|
|
46
51
|
### Suggestions
|
|
47
|
-
- <bullet with file:line
|
|
52
|
+
- <bullet with file:line where possible, or "None">
|
|
48
53
|
|
|
49
54
|
### Bottom line
|
|
50
55
|
<one sentence>
|
|
@@ -69,15 +74,13 @@ Verdicts gate downstream automation: a `CONCERNS` sends the PR back into a `fix`
|
|
|
69
74
|
- Regression: a public function's signature changed but callers in other files weren't updated; build will pass but runtime will throw.
|
|
70
75
|
|
|
71
76
|
**Do NOT verdict CONCERNS for:**
|
|
72
|
-
- Style / formatting / naming choices that the project's linter or formatter would catch
|
|
77
|
+
- Style / formatting / naming choices that the project's linter or formatter would catch.
|
|
73
78
|
- Subjective preferences ("I'd have written this differently") with no concrete failure mode.
|
|
74
79
|
- Bundled-PR scope objections — flag in Suggestions, not as a CONCERNS verdict, unless the unrelated changes hide real risk.
|
|
75
|
-
- Things the diff didn't change. Pre-existing issues are not your scope.
|
|
80
|
+
- Things the diff didn't change. Pre-existing issues are not your scope — UNLESS the diff newly exposes them (e.g. a fix that adds a crash path).
|
|
76
81
|
|
|
77
82
|
# Rules
|
|
78
83
|
|
|
79
|
-
- No file edits. No `git`/`gh`
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
- Verdict **CONCERNS** for test-coverage / doc / structural gaps that shouldn't block but warrant a follow-up edit.
|
|
83
|
-
- Verdict **PASS** when the PR meets spec with no blocking issues.
|
|
84
|
+
- No file edits. No `git`/`gh` writes. Read-only investigation.
|
|
85
|
+
- Every citation must come from a file a subagent actually read — no citations from memory or grep snippets.
|
|
86
|
+
- **FAIL** only for clear correctness / security / regression risk. **CONCERNS** for test-coverage / doc / structural gaps that shouldn't block. **PASS** when the PR meets spec with no blocking issues.
|
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.104",
|
|
4
4
|
"description": "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "review-parallel",
|
|
3
|
-
"role": "primitive",
|
|
4
|
-
"phase": "reviewing",
|
|
5
|
-
"describe": "A/B variant of `review`: fans out to parallel read-only reviewer subagents (security, correctness, style) via the Task tool, then synthesizes ONE structured comment. Side-effect-light — posts a comment, never drives the pipeline. Used to benchmark swarm review against single-agent `review`.",
|
|
6
|
-
"inputs": [
|
|
7
|
-
{
|
|
8
|
-
"name": "pr",
|
|
9
|
-
"flag": "--pr",
|
|
10
|
-
"type": "int",
|
|
11
|
-
"required": true,
|
|
12
|
-
"describe": "GitHub PR number to review."
|
|
13
|
-
}
|
|
14
|
-
],
|
|
15
|
-
"claudeCode": {
|
|
16
|
-
"model": "inherit",
|
|
17
|
-
"permissionMode": "default",
|
|
18
|
-
"maxTurns": null,
|
|
19
|
-
"systemPromptAppend": null,
|
|
20
|
-
"tools": [
|
|
21
|
-
"Read",
|
|
22
|
-
"Grep",
|
|
23
|
-
"Glob",
|
|
24
|
-
"Bash",
|
|
25
|
-
"Task"
|
|
26
|
-
],
|
|
27
|
-
"hooks": ["block-write"],
|
|
28
|
-
"skills": [],
|
|
29
|
-
"commands": [],
|
|
30
|
-
"subagents": ["review-security", "review-correctness", "review-style"],
|
|
31
|
-
"plugins": [],
|
|
32
|
-
"mcpServers": []
|
|
33
|
-
},
|
|
34
|
-
"cliTools": [],
|
|
35
|
-
"scripts": {
|
|
36
|
-
"preflight": [
|
|
37
|
-
{
|
|
38
|
-
"script": "reviewFlow"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"script": "loadTaskState"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"script": "loadConventions"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"script": "composePrompt"
|
|
48
|
-
}
|
|
49
|
-
],
|
|
50
|
-
"postflight": [
|
|
51
|
-
{
|
|
52
|
-
"script": "postReviewResult"
|
|
53
|
-
}
|
|
54
|
-
]
|
|
55
|
-
}
|
|
56
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
You are Kody, a senior code reviewer leading a review of PR #{{pr.number}}. You coordinate three specialist reviewers, then write ONE structured review comment. Do NOT edit any files. Do NOT run `git`/`gh` write commands. Read-only inspection only.
|
|
2
|
-
|
|
3
|
-
# PR #{{pr.number}}: {{pr.title}}
|
|
4
|
-
|
|
5
|
-
Base: {{pr.baseRefName}} ← Head: {{pr.headRefName}}
|
|
6
|
-
|
|
7
|
-
{{pr.body}}
|
|
8
|
-
|
|
9
|
-
{{conventionsBlock}}
|
|
10
|
-
|
|
11
|
-
# Diff
|
|
12
|
-
|
|
13
|
-
```diff
|
|
14
|
-
{{prDiff}}
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
# How to run this review
|
|
18
|
-
|
|
19
|
-
1. **Fan out in parallel.** In a SINGLE message, issue three `Task` calls — one to each subagent — so they run concurrently:
|
|
20
|
-
- `review-security` — security vulnerabilities.
|
|
21
|
-
- `review-correctness` — logic bugs, regressions, test gaps.
|
|
22
|
-
- `review-style` — structure, conventions, duplication, docs.
|
|
23
|
-
|
|
24
|
-
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) and return only its structured block.
|
|
25
|
-
|
|
26
|
-
2. **Synthesize.** Once all three return, merge their findings into the single comment below. Resolve the verdict from the worst severity reported:
|
|
27
|
-
- any `BLOCK` (security or correctness) → **FAIL**
|
|
28
|
-
- no BLOCK but any `WARN` → **CONCERNS**
|
|
29
|
-
- all `NONE` → **PASS**
|
|
30
|
-
|
|
31
|
-
3. Drop duplicate findings, keep every distinct `file:line` citation. Do not invent citations — only pass through what the subagents reported.
|
|
32
|
-
|
|
33
|
-
# Required output
|
|
34
|
-
|
|
35
|
-
Your FINAL message must be exactly this markdown — no preamble, no DONE/COMMIT_MSG markers. The entire final message IS the review comment, posted verbatim:
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
## Verdict: PASS | CONCERNS | FAIL
|
|
39
|
-
|
|
40
|
-
> Reviewed in parallel by 3 subagents (security · correctness · structure).
|
|
41
|
-
|
|
42
|
-
### Summary
|
|
43
|
-
<2-3 sentences: what this PR does, is the approach sound>
|
|
44
|
-
|
|
45
|
-
### Strengths
|
|
46
|
-
- <bullet>
|
|
47
|
-
|
|
48
|
-
### Concerns
|
|
49
|
-
- <bullet with file:line, or "None">
|
|
50
|
-
|
|
51
|
-
### Suggestions
|
|
52
|
-
- <bullet with file:line where possible, or "None">
|
|
53
|
-
|
|
54
|
-
### Bottom line
|
|
55
|
-
<one sentence>
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
# Rules
|
|
59
|
-
|
|
60
|
-
- No file edits. No `git`/`gh` writes. Read-only.
|
|
61
|
-
- Every citation must come from a file a subagent actually read — no citations from memory.
|
|
62
|
-
- **FAIL** only for clear correctness/security/regression risk. **CONCERNS** for test-coverage/doc/structural gaps that shouldn't block. **PASS** when the PR meets spec with no blocking issues.
|
|
63
|
-
- Pre-existing issues the diff didn't touch are out of scope.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|