@kody-ade/kody-engine 0.2.63 → 0.3.1

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.
Files changed (32) hide show
  1. package/README.md +24 -24
  2. package/dist/bin/{kody2.js → kody.js} +270 -164
  3. package/dist/executables/bug/profile.json +6 -6
  4. package/dist/executables/chore/profile.json +6 -6
  5. package/dist/executables/classify/profile.json +1 -1
  6. package/dist/executables/feature/profile.json +6 -6
  7. package/dist/executables/fix/profile.json +20 -3
  8. package/dist/executables/fix/prompt.md +1 -1
  9. package/dist/executables/fix-ci/profile.json +1 -1
  10. package/dist/executables/init/profile.json +1 -1
  11. package/dist/executables/plan/profile.json +23 -3
  12. package/dist/executables/plan/prompt.md +117 -9
  13. package/dist/executables/plan-verify/profile.json +2 -2
  14. package/dist/executables/plan-verify/prompt.md +1 -1
  15. package/dist/executables/research/profile.json +25 -3
  16. package/dist/executables/research/prompt.md +4 -0
  17. package/dist/executables/resolve/profile.json +1 -1
  18. package/dist/executables/review/profile.json +20 -3
  19. package/dist/executables/run/profile.json +1 -1
  20. package/dist/executables/run/prompt.md +2 -2
  21. package/dist/executables/spec/profile.json +4 -4
  22. package/dist/executables/sync/profile.json +1 -1
  23. package/dist/executables/types.ts +3 -3
  24. package/dist/executables/ui-review/profile.json +10 -4
  25. package/dist/executables/ui-review/prompt.md +8 -8
  26. package/dist/plugins/commands/kody-live-probe.md +2 -2
  27. package/dist/plugins/skills/kody-live-marker/SKILL.md +3 -3
  28. package/dist/plugins/test-plugin/.claude-plugin/plugin.json +2 -2
  29. package/dist/plugins/test-plugin/skills/kody-plugin-marker/SKILL.md +2 -2
  30. package/kody.config.schema.json +3 -3
  31. package/package.json +4 -4
  32. package/templates/{kody2.yml → kody.yml} +16 -16
@@ -8,7 +8,7 @@
8
8
  */
9
9
 
10
10
  import type { AgentResult } from "../agent.js"
11
- import type { Kody2Config } from "../config.js"
11
+ import type { KodyConfig } from "../config.js"
12
12
  import type { Phase } from "../state.js"
13
13
 
14
14
  // ────────────────────────────────────────────────────────────────────────────
@@ -101,7 +101,7 @@ export interface InputSpec {
101
101
  }
102
102
 
103
103
  export interface ClaudeCodeSpec {
104
- /** "inherit" → use Kody2Config.agent.model. Or a concrete "provider/model". */
104
+ /** "inherit" → use KodyConfig.agent.model. Or a concrete "provider/model". */
105
105
  model: string
106
106
  permissionMode: "default" | "acceptEdits" | "plan" | "bypassPermissions"
107
107
  /** null = unbounded. */
@@ -184,7 +184,7 @@ export interface Context {
184
184
  /** Project root. */
185
185
  cwd: string
186
186
  /** Loaded kody.config.json. */
187
- config: Kody2Config
187
+ config: KodyConfig
188
188
  /** Stream-output verbosity. */
189
189
  verbose?: boolean
190
190
  quiet?: boolean
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ui-review",
3
3
  "role": "primitive",
4
- "describe": "UI/UX review of an open PR: browses the running preview with Playwright, compares behavior to diff intent, posts one structured review comment. Read-only on the repo (no commits); writes a throwaway Playwright spec under .kody2/.",
4
+ "describe": "UI/UX review of an open PR: browses the running preview with Playwright, compares behavior to diff intent, posts one structured review comment. Read-only on the repo (no commits); writes a throwaway Playwright spec under .kody/.",
5
5
  "kind": "oneshot",
6
6
  "inputs": [
7
7
  {
@@ -38,7 +38,13 @@
38
38
  "commands": [],
39
39
  "subagents": [],
40
40
  "plugins": [],
41
- "mcpServers": []
41
+ "mcpServers": [
42
+ {
43
+ "name": "playwright",
44
+ "command": "npx",
45
+ "args": ["-y", "@playwright/mcp@latest"]
46
+ }
47
+ ]
42
48
  },
43
49
  "cliTools": [
44
50
  {
@@ -49,7 +55,7 @@
49
55
  "installCommand": "npx --yes playwright install --with-deps chromium"
50
56
  },
51
57
  "verify": "npx --no-install playwright --version",
52
- "usage": "Use `npx playwright test <file>` to run a Playwright spec. Write ad-hoc specs under `.kody2/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: '.kody2/ui-review/<name>.png' })` and reference those paths in your final review.",
58
+ "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.",
53
59
  "allowedUses": [
54
60
  "test",
55
61
  "--version"
@@ -60,7 +66,7 @@
60
66
  "outputArtifacts": [],
61
67
  "scripts": {
62
68
  "preflight": [
63
- { "script": "setLifecycleLabel", "with": { "label": "kody:reviewing", "color": "d93f0b", "description": "kody2: reviewing a PR" } },
69
+ { "script": "setLifecycleLabel", "with": { "label": "kody:reviewing", "color": "d93f0b", "description": "kody: reviewing a PR" } },
64
70
  { "script": "reviewFlow" },
65
71
  { "script": "loadTaskState" },
66
72
  { "script": "loadConventions" },
@@ -1,6 +1,6 @@
1
1
  You are Kody, a senior UI/UX reviewer. Review PR #{{pr.number}} by reading the diff AND browsing the running app with Playwright. Post ONE structured review comment. Do NOT edit any tracked source files. Do NOT run any `git` or `gh` commands.
2
2
 
3
- You MAY write throwaway Playwright specs and screenshots under `.kody2/ui-review/` — that directory is ignored by the repo.
3
+ You MAY write throwaway Playwright specs and screenshots under `.kody/ui-review/` — that directory is ignored by the repo.
4
4
 
5
5
  # PR #{{pr.number}}: {{pr.title}}
6
6
 
@@ -46,23 +46,23 @@ If the response is not 2xx or 3xx, the preview is unreachable. In that case, SKI
46
46
 
47
47
  2. **Plan the browse session.** For each UI-affecting change, pick 1–3 routes from the QA context that exercise it. If the change requires an authenticated role, grab credentials from the QA guide above. If no credentials are available for a role the change depends on, note that as a gap and browse only public pages.
48
48
 
49
- 3. **Write a Playwright spec.** Create exactly one file at `.kody2/ui-review/browse.spec.ts`. Use `process.env.UI_REVIEW_BASE_URL` as the base URL. For each route you plan to check, write a test that:
49
+ 3. **Write a Playwright spec.** Create exactly one file at `.kody/ui-review/browse.spec.ts`. Use `process.env.UI_REVIEW_BASE_URL` as the base URL. For each route you plan to check, write a test that:
50
50
  - navigates there,
51
51
  - performs the minimum interaction to exercise the change (click, submit, fill),
52
- - takes a screenshot at `.kody2/ui-review/<slug>.png`,
52
+ - takes a screenshot at `.kody/ui-review/<slug>.png`,
53
53
  - asserts at least one piece of visible content so the test fails loudly on a blank / error page.
54
54
 
55
- Include a `playwright.config.ts` at `.kody2/ui-review/playwright.config.ts` only if you need custom config; otherwise rely on defaults (headless chromium).
55
+ Include a `playwright.config.ts` at `.kody/ui-review/playwright.config.ts` only if you need custom config; otherwise rely on defaults (headless chromium).
56
56
 
57
57
  4. **Run it.** Invoke:
58
58
 
59
59
  ```bash
60
- UI_REVIEW_BASE_URL={{previewUrl}} npx playwright test .kody2/ui-review/browse.spec.ts --reporter=line
60
+ UI_REVIEW_BASE_URL={{previewUrl}} npx playwright test .kody/ui-review/browse.spec.ts --reporter=line
61
61
  ```
62
62
 
63
63
  Capture both stdout and exit code. If Playwright is not installed, the executor will have tried to install it in preflight — if it still fails, report the install error and fall back to a diff-only review.
64
64
 
65
- 5. **Inspect screenshots.** Use the Read tool on each `.png` under `.kody2/ui-review/` so the visual state is in your context. Note anything that looks broken, empty, misaligned, or inconsistent with the diff's intent.
65
+ 5. **Inspect screenshots.** Use the Read tool on each `.png` under `.kody/ui-review/` so the visual state is in your context. Note anything that looks broken, empty, misaligned, or inconsistent with the diff's intent.
66
66
 
67
67
  6. **Write the review.** Your FINAL MESSAGE must be the markdown review comment — no preamble, no DONE / COMMIT_MSG markers. The entire final message is posted verbatim to the PR.
68
68
 
@@ -71,7 +71,7 @@ If the response is not 2xx or 3xx, the preview is unreachable. In that case, SKI
71
71
  ```
72
72
  ## Verdict: PASS | CONCERNS | FAIL
73
73
 
74
- _UI review by kody2 — browsed {{previewUrl}}_
74
+ _UI review by kody — browsed {{previewUrl}}_
75
75
 
76
76
  ### Summary
77
77
  <2-3 sentences: what this PR changes in the UI, and whether the running app matches that intent>
@@ -95,7 +95,7 @@ _UI review by kody2 — browsed {{previewUrl}}_
95
95
 
96
96
  # Rules
97
97
 
98
- - No commits. No `git` / `gh` invocations. No edits to files outside `.kody2/ui-review/`.
98
+ - No commits. No `git` / `gh` invocations. No edits to files outside `.kody/ui-review/`.
99
99
  - Verdict **FAIL** only for clear visual regressions, broken flows, or correctness/accessibility issues that block merge.
100
100
  - Verdict **CONCERNS** for clarity/polish/edge-case gaps that shouldn't block.
101
101
  - Verdict **PASS** when the PR's UI changes work as intended and nothing obvious is broken.
@@ -1,9 +1,9 @@
1
1
  ---
2
- description: Internal Kody2 live-test slash command. Prints a confirmation token proving commands are loaded.
2
+ description: Internal Kody live-test slash command. Prints a confirmation token proving commands are loaded.
3
3
  ---
4
4
 
5
5
  # /kody-live-probe
6
6
 
7
7
  Print the literal token `COMMAND_LOADED_OK` in your next message, followed by the current ISO timestamp on a new line.
8
8
 
9
- Do not perform any other action — this command is a no-op confirmation signal for Kody2 infrastructure validation.
9
+ Do not perform any other action — this command is a no-op confirmation signal for Kody infrastructure validation.
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: kody-live-marker
3
- description: Internal Kody2 live-test skill. Activates when a prompt mentions "kody-live-marker" and provides a confirmation token.
3
+ description: Internal Kody live-test skill. Activates when a prompt mentions "kody-live-marker" and provides a confirmation token.
4
4
  ---
5
5
 
6
6
  # kody-live-marker
7
7
 
8
- This skill exists only to verify that Kody2's synthetic plugin wiring actually loads skills into the agent's session.
8
+ This skill exists only to verify that Kody's synthetic plugin wiring actually loads skills into the agent's session.
9
9
 
10
10
  ## When to activate
11
11
 
@@ -13,6 +13,6 @@ When the user's prompt contains the phrase "kody-live-marker" or explicitly asks
13
13
 
14
14
  ## What to do
15
15
 
16
- Include the literal token `SKILL_LOADED_OK` somewhere in your final message. Include the skill's description verbatim: "Internal Kody2 live-test skill."
16
+ Include the literal token `SKILL_LOADED_OK` somewhere in your final message. Include the skill's description verbatim: "Internal Kody live-test skill."
17
17
 
18
18
  Do not use this skill for anything else. It is a no-op confirmation signal for infrastructure validation.
@@ -1,6 +1,6 @@
1
1
  {
2
- "name": "kody2-test-plugin",
2
+ "name": "kody-test-plugin",
3
3
  "version": "1.0.0",
4
- "description": "Kody2 internal live-test plugin. Ships a single skill that proves external-plugin loading works.",
4
+ "description": "Kody internal live-test plugin. Ships a single skill that proves external-plugin loading works.",
5
5
  "skills": ["./skills/"]
6
6
  }
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: kody-plugin-marker
3
- description: Kody2 external-plugin live-test skill. Activates when prompt mentions "kody-plugin-marker" and outputs a confirmation token.
3
+ description: Kody external-plugin live-test skill. Activates when prompt mentions "kody-plugin-marker" and outputs a confirmation token.
4
4
  ---
5
5
 
6
6
  # kody-plugin-marker
7
7
 
8
- This skill is bundled inside a standalone plugin directory (not copied into a synthetic plugin). Its purpose is to verify that Kody2's `plugins: string[]` profile field successfully loads an external plugin as-is.
8
+ This skill is bundled inside a standalone plugin directory (not copied into a synthetic plugin). Its purpose is to verify that Kody's `plugins: string[]` profile field successfully loads an external plugin as-is.
9
9
 
10
10
  ## When to activate
11
11
 
@@ -84,7 +84,7 @@
84
84
  },
85
85
  "issueContext": {
86
86
  "type": "object",
87
- "description": "kody2: how many and how much of the issue's comments the agent sees in its prompt. Higher = more context but larger prompts. Defaults: 50 comments, 10000 bytes each.",
87
+ "description": "kody: how many and how much of the issue's comments the agent sees in its prompt. Higher = more context but larger prompts. Defaults: 50 comments, 10000 bytes each.",
88
88
  "properties": {
89
89
  "commentLimit": {
90
90
  "type": "integer",
@@ -103,7 +103,7 @@
103
103
  },
104
104
  "testRequirements": {
105
105
  "type": "array",
106
- "description": "kody2 enforces that newly added files matching `pattern` ship with a sibling test file matching `requireSibling`. Misses fail the run; the agent gets one retry with the gap as feedback. Empty array or absent = no enforcement.",
106
+ "description": "kody enforces that newly added files matching `pattern` ship with a sibling test file matching `requireSibling`. Misses fail the run; the agent gets one retry with the gap as feedback. Empty array or absent = no enforcement.",
107
107
  "items": {
108
108
  "type": "object",
109
109
  "required": ["pattern", "requireSibling"],
@@ -127,7 +127,7 @@
127
127
  "model": {
128
128
  "type": "string",
129
129
  "pattern": "^[^/]+/.+$",
130
- "description": "Single 'provider/model' string used by kody2 (single-session pipeline). Use 'claude/...' or 'anthropic/...' for direct Anthropic API; anything else routes through LiteLLM proxy.",
130
+ "description": "Single 'provider/model' string used by kody (single-session pipeline). Use 'claude/...' or 'anthropic/...' for direct Anthropic API; anything else routes through LiteLLM proxy.",
131
131
  "examples": ["claude/claude-sonnet-4-6", "minimax/MiniMax-M2.7-highspeed"]
132
132
  },
133
133
  "modelMap": {
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.2.63",
4
- "description": "kody2 — autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
3
+ "version": "0.3.1",
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",
7
7
  "bin": {
8
- "kody2": "dist/bin/kody2.js"
8
+ "kody": "dist/bin/kody.js"
9
9
  },
10
10
  "files": [
11
11
  "dist",
@@ -33,7 +33,7 @@
33
33
  "homepage": "https://github.com/aharonyaircohen/kody-engine",
34
34
  "bugs": "https://github.com/aharonyaircohen/kody-engine/issues",
35
35
  "scripts": {
36
- "kody2": "tsx bin/kody2.ts",
36
+ "kody": "tsx bin/kody.ts",
37
37
  "build": "tsup && node scripts/copy-assets.cjs",
38
38
  "test": "vitest run tests/unit tests/int --no-coverage",
39
39
  "test:e2e": "vitest run tests/e2e --no-coverage",
@@ -1,28 +1,28 @@
1
- # Drop this file at .github/workflows/kody2.yml in your repo.
1
+ # Drop this file at .github/workflows/kody.yml in your repo.
2
2
  #
3
3
  # Two triggers, two modes:
4
- # - issue_comment / workflow_dispatch with issue_number → `kody2 ci`
5
- # (the @kody2 issue/PR automation flow)
6
- # - workflow_dispatch with sessionId → `kody2 chat`
4
+ # - issue_comment / workflow_dispatch with issue_number → `kody ci`
5
+ # (the @kody issue/PR automation flow)
6
+ # - workflow_dispatch with sessionId → `kody chat`
7
7
  # (dashboard-driven Gemini chat session)
8
8
  #
9
- # All orchestration lives in the kody2 npm package; future capabilities ship
9
+ # All orchestration lives in the kody npm package; future capabilities ship
10
10
  # via `npm publish`, not by editing this file.
11
11
  #
12
12
  # Required repo secrets: at least one model provider key (e.g. MINIMAX_API_KEY,
13
- # ANTHROPIC_API_KEY). kody2 reads any *_API_KEY secret automatically via
13
+ # ANTHROPIC_API_KEY). kody reads any *_API_KEY secret automatically via
14
14
  # toJSON(secrets) — no need to list them here.
15
15
  #
16
16
  # Recommended: KODY_TOKEN secret — a fine-grained PAT or GitHub App token
17
- # with `repo` + `read:org` + `workflow` scopes. Without it, kody2's
17
+ # with `repo` + `read:org` + `workflow` scopes. Without it, kody's
18
18
  # commits/PR-creation still work via github.token, but three things degrade:
19
19
  # 1. PR body updates fail with "token lacks read:org scope" (cosmetic).
20
- # 2. Pushes from kody2 won't trigger downstream workflows.
20
+ # 2. Pushes from kody won't trigger downstream workflows.
21
21
  # 3. Any commit that modifies `.github/workflows/*` is REJECTED by
22
22
  # GitHub — the default GITHUB_TOKEN can't touch workflow files.
23
23
  # Set KODY_TOKEN in repo Settings → Secrets → Actions.
24
24
 
25
- name: kody2
25
+ name: kody
26
26
 
27
27
  on:
28
28
  workflow_dispatch:
@@ -55,13 +55,13 @@ jobs:
55
55
  if: >-
56
56
  ${{ github.event_name == 'workflow_dispatch' ||
57
57
  (github.event_name == 'issue_comment' &&
58
- contains(github.event.comment.body, '@kody2') &&
59
- github.event.comment.user.login != 'kody2-bot' &&
58
+ contains(github.event.comment.body, '@kody') &&
59
+ github.event.comment.user.login != 'kody-bot' &&
60
60
  github.event.comment.user.type != 'Bot') }}
61
61
  runs-on: ubuntu-latest
62
62
  timeout-minutes: 360
63
63
  concurrency:
64
- group: kody2-${{ inputs.sessionId || inputs.issue_number || github.event.issue.number || github.sha }}
64
+ group: kody-${{ inputs.sessionId || inputs.issue_number || github.event.issue.number || github.sha }}
65
65
  cancel-in-progress: false
66
66
  permissions:
67
67
  issues: write
@@ -78,13 +78,13 @@ jobs:
78
78
  node-version: 22
79
79
 
80
80
  - name: Write pip cache key for LiteLLM
81
- run: echo "litellm[proxy]" > .kody2-pip-requirements.txt
81
+ run: echo "litellm[proxy]" > .kody-pip-requirements.txt
82
82
 
83
83
  - uses: actions/setup-python@v5
84
84
  with:
85
85
  python-version: "3.12"
86
86
  cache: "pip"
87
- cache-dependency-path: .kody2-pip-requirements.txt
87
+ cache-dependency-path: .kody-pip-requirements.txt
88
88
 
89
89
  - env:
90
90
  ALL_SECRETS: ${{ toJSON(secrets) }}
@@ -94,7 +94,7 @@ jobs:
94
94
  DASHBOARD_URL: ${{ inputs.dashboardUrl }}
95
95
  run: |
96
96
  if [ -n "$SESSION_ID" ]; then
97
- npx -y -p @kody-ade/kody-engine@latest kody2 chat
97
+ npx -y -p @kody-ade/kody-engine@latest kody chat
98
98
  else
99
- npx -y -p @kody-ade/kody-engine@latest kody2 ci
99
+ npx -y -p @kody-ade/kody-engine@latest kody ci
100
100
  fi