@kody-ade/kody-engine 0.3.2 → 0.3.4

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
@@ -3,7 +3,7 @@
3
3
  // package.json
4
4
  var package_default = {
5
5
  name: "@kody-ade/kody-engine",
6
- version: "0.3.2",
6
+ version: "0.3.4",
7
7
  description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
8
8
  license: "MIT",
9
9
  type: "module",
@@ -4182,11 +4182,14 @@ function updateVersionInFile(file, newVersion, cwd) {
4182
4182
  fs18.writeFileSync(abs, updated);
4183
4183
  return true;
4184
4184
  }
4185
+ var FIRST_RELEASE_COMMIT_CAP = 100;
4185
4186
  function generateChangelog(cwd, newVersion, lastTag) {
4186
- const range = lastTag ? `${lastTag}..HEAD` : "HEAD";
4187
+ const logArgs = ["log", "--pretty=format:%s||%h", "--no-merges"];
4188
+ if (lastTag) logArgs.splice(1, 0, `${lastTag}..HEAD`);
4189
+ else logArgs.splice(1, 0, `-n${FIRST_RELEASE_COMMIT_CAP}`, "HEAD");
4187
4190
  let log = "";
4188
4191
  try {
4189
- log = execFileSync15("git", ["log", range, "--pretty=format:%s||%h", "--no-merges"], {
4192
+ log = execFileSync15("git", logArgs, {
4190
4193
  cwd,
4191
4194
  encoding: "utf-8",
4192
4195
  stdio: ["ignore", "pipe", "pipe"]
@@ -4343,9 +4346,13 @@ async function runPrepare(args) {
4343
4346
  }
4344
4347
  const base = ctx.config.git.defaultBranch;
4345
4348
  const title = `chore: release ${tag}`;
4349
+ const bodyMax = 6e4;
4350
+ const rawEntry = entry.length > bodyMax ? `${entry.slice(0, bodyMax)}
4351
+
4352
+ _\u2026 truncated; see CHANGELOG.md_` : entry;
4346
4353
  const body = `Automated release PR opened by kody.
4347
4354
 
4348
- ${entry}
4355
+ ${rawEntry}
4349
4356
 
4350
4357
  Merge this and then run \`kody release --mode finalize\`.`;
4351
4358
  let prUrl = "";
@@ -30,7 +30,8 @@
30
30
  "Edit",
31
31
  "Bash",
32
32
  "Grep",
33
- "Glob"
33
+ "Glob",
34
+ "mcp__playwright"
34
35
  ],
35
36
  "hooks": [],
36
37
  "skills": [],
@@ -19,7 +19,7 @@ You are Kody, an autonomous engineer. Apply the feedback below to the existing P
19
19
  # Required steps
20
20
  1. **Extract** every actionable item from the feedback. A structured review uses headings like `### Concerns`, `### Suggestions`, and `### Bugs`; each bullet under those headings is a distinct item. `### Strengths`, `### Summary`, and `### Bottom line` are NOT items — skip them. If the feedback has no headings (plain inline feedback), treat the whole feedback as one item.
21
21
  2. **Number each item** internally (Item 1, Item 2, …). You will account for every one of them in your final message below.
22
- 3. **Research** — read only what's needed to act on the items. Make the minimum edits required to implement each one.
22
+ 3. **Research** — read only what's needed to act on the items. Make the minimum edits required to implement each one. If the feedback or PR body links to external URLs (reproduction sites, bug recordings, spec pages), use the **Playwright MCP** tools (`mcp__playwright__browser_navigate`, `mcp__playwright__browser_snapshot`) to load them — do not rely on your interpretation of the URL alone.
23
23
  4. **Verify** — run each quality command with Bash. Fix the root cause of any failure you introduced by this round of edits.
24
24
  5. Your FINAL message MUST use this exact format (or a single `FAILED: <reason>` line on failure). The `FEEDBACK_ACTIONS:` block is REQUIRED — omitting it or leaving it empty makes your DONE invalid.
25
25
 
@@ -20,7 +20,8 @@
20
20
  "Read",
21
21
  "Grep",
22
22
  "Glob",
23
- "Bash"
23
+ "Bash",
24
+ "mcp__playwright"
24
25
  ],
25
26
  "hooks": [],
26
27
  "skills": [],
@@ -40,10 +41,10 @@
40
41
  "name": "playwright",
41
42
  "install": {
42
43
  "required": false,
43
- "checkCommand": "npx --no-install playwright --version",
44
+ "checkCommand": "ls \"$HOME/.cache/ms-playwright\" 2>/dev/null | grep -q '^chromium'",
44
45
  "installCommand": "npx --yes playwright install --with-deps chromium"
45
46
  },
46
- "verify": "npx --no-install playwright --version",
47
+ "verify": "ls \"$HOME/.cache/ms-playwright\" 2>/dev/null | grep -q '^chromium'",
47
48
  "usage": ""
48
49
  }
49
50
  ],
@@ -43,6 +43,10 @@ plan under the Required output structure below.
43
43
 
44
44
  ---
45
45
 
46
+ # External references (MUST be fetched before planning)
47
+
48
+ If the issue body or recent comments contain URLs (http/https), you MUST use the **Playwright MCP** tools (`mcp__playwright__browser_navigate`, `mcp__playwright__browser_snapshot`, optionally `mcp__playwright__browser_take_screenshot`) to load each one and read its content **before** you start planning. Referenced pages — especially demos, specs, and design mocks — are part of the specification. Features visible in a linked demo are in scope unless the issue explicitly excludes them. If a URL cannot be loaded, record that as an Ambiguity rather than silently dropping it.
49
+
46
50
  # Research floor (MUST be done before writing the plan)
47
51
 
48
52
  Before producing the final plan, you MUST have read:
@@ -20,7 +20,8 @@
20
20
  "Read",
21
21
  "Grep",
22
22
  "Glob",
23
- "Bash"
23
+ "Bash",
24
+ "mcp__playwright"
24
25
  ],
25
26
  "hooks": [],
26
27
  "skills": [],
@@ -40,10 +41,10 @@
40
41
  "name": "playwright",
41
42
  "install": {
42
43
  "required": false,
43
- "checkCommand": "npx --no-install playwright --version",
44
+ "checkCommand": "ls \"$HOME/.cache/ms-playwright\" 2>/dev/null | grep -q '^chromium'",
44
45
  "installCommand": "npx --yes playwright install --with-deps chromium"
45
46
  },
46
- "verify": "npx --no-install playwright --version",
47
+ "verify": "ls \"$HOME/.cache/ms-playwright\" 2>/dev/null | grep -q '^chromium'",
47
48
  "usage": ""
48
49
  }
49
50
  ],
@@ -2,6 +2,16 @@ You are a senior engineer **researching** a GitHub issue. Your job is to fill in
2
2
 
3
3
  Use Read / Grep / Glob / Bash (read-only) to study the codebase as much as needed. Then emit a final message with the research doc wrapped in the required markers (see "Required output").
4
4
 
5
+ ## External references — MANDATORY first step
6
+
7
+ Before you study the repo, scan the issue body and recent comments for **every URL** (http/https). For each one:
8
+
9
+ - Use the **Playwright MCP** tools available to you (`mcp__playwright__browser_navigate`, `mcp__playwright__browser_snapshot`, optionally `mcp__playwright__browser_take_screenshot`) to actually load the page and read its content. This is not optional — links in the issue are part of the specification.
10
+ - If a URL cannot be loaded (auth-gated, 404, timeout, browser crash), say so explicitly in the "External references" section — do NOT paraphrase or invent content you did not fetch.
11
+ - Never treat a URL as decorative context. Every link must appear in your "External references" section with a real 2–4 sentence summary of what you saw, or an explicit note that you couldn't fetch it.
12
+
13
+ If the issue contains zero URLs, write "## External references\n\nNone." and move on — do not fabricate links.
14
+
5
15
  ---
6
16
 
7
17
  # Repo
@@ -32,6 +42,9 @@ PR_SUMMARY:
32
42
  ## Understood request
33
43
  One paragraph restating what the issue is asking for, in your own words.
34
44
 
45
+ ## External references
46
+ Per the MANDATORY step above — one bullet per URL found in the issue body/comments. Each bullet: the URL, and a 2–4 sentence summary of what the page actually contains (fetched via Playwright MCP), or an explicit note that it could not be loaded (with the reason). If the issue has no URLs, write `None.` here.
47
+
35
48
  ## Repo context
36
49
  **Issue-specific only.** Surface whatever you actually discover during your
37
50
  read-only exploration — files, modules, or existing patterns the implementer
@@ -21,7 +21,8 @@
21
21
  "Read",
22
22
  "Grep",
23
23
  "Glob",
24
- "Bash"
24
+ "Bash",
25
+ "mcp__playwright"
25
26
  ],
26
27
  "hooks": [],
27
28
  "skills": [],
@@ -41,10 +42,10 @@
41
42
  "name": "playwright",
42
43
  "install": {
43
44
  "required": false,
44
- "checkCommand": "npx --no-install playwright --version",
45
+ "checkCommand": "ls \"$HOME/.cache/ms-playwright\" 2>/dev/null | grep -q '^chromium'",
45
46
  "installCommand": "npx --yes playwright install --with-deps chromium"
46
47
  },
47
- "verify": "npx --no-install playwright --version",
48
+ "verify": "ls \"$HOME/.cache/ms-playwright\" 2>/dev/null | grep -q '^chromium'",
48
49
  "usage": ""
49
50
  }
50
51
  ],
@@ -1,5 +1,7 @@
1
1
  You are Kody, a senior code reviewer. Review PR #{{pr.number}} carefully and post ONE structured review comment. Do NOT edit any files. Do NOT run any `git` or `gh` commands. Use Read / Grep / Glob / Bash only to inspect the diff and surrounding code.
2
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.
4
+
3
5
  # PR #{{pr.number}}: {{pr.title}}
4
6
 
5
7
  Base: {{pr.baseRefName}} ← Head: {{pr.headRefName}}
@@ -31,7 +31,8 @@
31
31
  "Glob",
32
32
  "Bash",
33
33
  "Write",
34
- "Edit"
34
+ "Edit",
35
+ "mcp__playwright"
35
36
  ],
36
37
  "hooks": [],
37
38
  "skills": [],
@@ -51,10 +52,10 @@
51
52
  "name": "playwright",
52
53
  "install": {
53
54
  "required": false,
54
- "checkCommand": "npx --no-install playwright --version",
55
+ "checkCommand": "ls \"$HOME/.cache/ms-playwright\" 2>/dev/null | grep -q '^chromium'",
55
56
  "installCommand": "npx --yes playwright install --with-deps chromium"
56
57
  },
57
- "verify": "npx --no-install playwright --version",
58
+ "verify": "ls \"$HOME/.cache/ms-playwright\" 2>/dev/null | grep -q '^chromium'",
58
59
  "usage": "Use `npx playwright test <file>` to run a Playwright spec. Write ad-hoc specs under `.kody/ui-review/*.spec.ts`. If `npx playwright test` errors with `Cannot find package '@playwright/test'`, install it once with `npm install -D @playwright/test` (or the repo's package-manager equivalent) before retrying — the `playwright` browser binaries are already set up by preflight, but the per-repo test framework may not be. Prefer `page.goto(process.env.UI_REVIEW_BASE_URL)` — the base URL is injected as `UI_REVIEW_BASE_URL` at run time. Capture screenshots with `await page.screenshot({ path: '.kody/ui-review/<name>.png' })` and reference those paths in your final review.",
59
60
  "allowedUses": [
60
61
  "test",
@@ -2,6 +2,8 @@ You are Kody, a senior UI/UX reviewer. Review PR #{{pr.number}} by reading the d
2
2
 
3
3
  You MAY write throwaway Playwright specs and screenshots under `.kody/ui-review/` — that directory is ignored by the repo.
4
4
 
5
+ You have two browsing options: the `playwright-cli` skill (Bash-based, good for running written specs) AND the **Playwright MCP** tools (`mcp__playwright__browser_navigate`, `mcp__playwright__browser_snapshot`, `mcp__playwright__browser_take_screenshot`) for ad-hoc exploration. For visiting reference URLs cited in the PR body or linked issue (design mocks, demos, spec pages), prefer the MCP tools — they return structured accessibility snapshots without requiring a written spec file.
6
+
5
7
  # PR #{{pr.number}}: {{pr.title}}
6
8
 
7
9
  Base: {{pr.baseRefName}} ← Head: {{pr.headRefName}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
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",