@kody-ade/kody-engine 0.4.174 → 0.4.177

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/README.md CHANGED
@@ -1,6 +1,64 @@
1
- # @kody-ade/kody-engine
1
+ # kody
2
2
 
3
- `kody` — autonomous development engine. A single-session Claude Code agent behind a generic executor and declarative JSON executable profiles.
3
+ [![npm](https://img.shields.io/npm/v/@kody-ade/kody-engine.svg)](https://www.npmjs.com/package/@kody-ade/kody-engine)
4
+ [![CI](https://github.com/aharonyaircohen/kody-engine/actions/workflows/ci.yml/badge.svg)](https://github.com/aharonyaircohen/kody-engine/actions/workflows/ci.yml)
5
+ [![license](https://img.shields.io/npm/l/@kody-ade/kody-engine.svg)](LICENSE)
6
+ [![node](https://img.shields.io/node/v/@kody-ade/kody-engine.svg)](package.json)
7
+
8
+ **An autonomous development engine that runs in your GitHub Actions.**
9
+
10
+ Comment `@kody` on an issue and it implements the change, commits, and opens a
11
+ PR — all inside CI, no bot server to host. Comment on a PR to apply review
12
+ feedback, fix failing CI, resolve merge conflicts, or run a UI/QA pass. It's a
13
+ single-session Claude Code agent behind a generic executor and declarative JSON
14
+ profiles.
15
+
16
+ ```
17
+ You: open an issue → comment "@kody run"
18
+ kody: reads the issue → writes the code → runs your tests → opens a PR
19
+ ```
20
+
21
+ ## Why kody
22
+
23
+ - **No infrastructure.** Runs on the GitHub Actions you already have. One ~20-line
24
+ workflow file, installed via `npx`. Nothing to deploy or keep online.
25
+ - **Whole PR lifecycle, not just authoring.** `run`, `fix`, `fix-ci`, `resolve`,
26
+ `review`, `ui-review`, `qa-engineer`, scheduled jobs — one agent, many verbs.
27
+ - **Declarative & extensible.** Every command is a folder of `profile.json` +
28
+ `prompt.md` + shell. Add a command by dropping a folder — no engine changes.
29
+ - **Bring your own model.** Anthropic native, or any provider via the built-in
30
+ LiteLLM proxy.
31
+
32
+ ## Quickstart
33
+
34
+ In the repo you want kody to work on:
35
+
36
+ ```bash
37
+ npx -y -p @kody-ade/kody-engine@latest kody init
38
+ ```
39
+
40
+ Then add **one** repo secret — a model provider key (e.g. `ANTHROPIC_API_KEY`) —
41
+ commit the generated `kody.config.json` + `.github/workflows/kody.yml`, and
42
+ comment `@kody run` on any issue. That's it. See
43
+ [Install in a consumer repo](#install-in-a-consumer-repo) for tokens and
44
+ triggers.
45
+
46
+ ## Permissions & safety
47
+
48
+ kody runs an autonomous agent in your CI with a GitHub token and your model
49
+ key. It's built to keep that blast radius small:
50
+
51
+ - **Least-privilege by default.** Needs `contents` / `pull-requests` / `issues`
52
+ write. A dedicated `KODY_TOKEN` PAT is optional, only for triggering
53
+ downstream CI.
54
+ - **Write allowlist.** The agent commits through `commitAndPush`, which blocks
55
+ writes outside an allowlisted set of `.kody/` paths — it can't touch your
56
+ runtime state.
57
+ - **Locked-toolbox mode.** A job can declare `tools: [...]` to drop `Bash` and
58
+ shell entirely, running only a fixed set of high-level intents.
59
+ - **Review like any contributor.** kody opens PRs; you merge them.
60
+
61
+ See [SECURITY.md](SECURITY.md) to report a vulnerability.
4
62
 
5
63
  ## Architecture
6
64
 
@@ -87,6 +145,8 @@ A **job** is a stateful, bounded goal expressed as a labeled GitHub issue (`kody
87
145
 
88
146
  `job-scheduler` wakes on cron (default `*/5 * * * *`) or empty `workflow_dispatch`, finds every open `kody:job` issue, and calls `job-tick` once per issue. The tick agent reads the issue body (human-owned prose) and a dedicated state comment (bot-owned JSON), decides the next step, and emits a fenced `kody-job-next-state` block the postflight persists. Children are spawned via `gh workflow run kody.yml` (not `@kody` comments — the default `GITHUB_TOKEN` can dispatch workflows but can't post auto-triggering comments).
89
147
 
148
+ **Locked-toolbox jobs** (v0.4.175). A job file can add `tools: [...]` to its frontmatter to run the tick in a *locked toolbox*: the agent gets only those named tools (as `mcp__kody-duty__<name>`) plus `submit_state` — `Bash` and `Read` are revoked entirely. This removes the escape hatch where a job posted a raw `@kody <verb>` comment that the webhook silently drops for bot authors, so the job looked done while its verb never ran. The in-process kody-duty MCP server exposes high-level intents instead — `list_prs_to_repair`, `sync_pr` / `fix_ci_pr` / `resolve_pr` (each dispatches the matching `workflow_dispatch`, never a comment), `recommend_to_operator`, and `read_ledger`. Jobs without `tools:` keep the full Bash/gh toolbox unchanged.
149
+
90
150
  ### `ui-review`
91
151
 
92
152
  PR-bound UI review. Drives the running preview deployment via the Playwright MCP server alongside the usual diff review, posts one structured review comment.
@@ -213,3 +273,14 @@ To enable in a consumer repo: ensure `.gitignore` un-ignores the vault if `.kody
213
273
  A profile is declarative JSON + an adjacent `prompt.md`. See any directory under [src/executables/](src/executables/) for examples. Adding a new command = new directory + profile + prompt + any `.sh` scripts + registering any new shared TS utilities under [src/scripts/](src/scripts/). No executor, entry, or dispatch changes.
214
274
 
215
275
  See [AGENTS.md](AGENTS.md) for the full architectural contract.
276
+
277
+ ## Contributing
278
+
279
+ Contributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for the dev
280
+ loop and the invariants to respect, and [AGENTS.md](AGENTS.md) for the deep
281
+ architecture. By participating you agree to the
282
+ [Code of Conduct](CODE_OF_CONDUCT.md).
283
+
284
+ ## License
285
+
286
+ [MIT](LICENSE) © Aharon Yair Cohen