@kody-ade/kody-engine-lite 0.1.73 → 0.1.75

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
@@ -3,102 +3,53 @@
3
3
  [![npm](https://img.shields.io/npm/v/@kody-ade/kody-engine-lite)](https://www.npmjs.com/package/@kody-ade/kody-engine-lite)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
5
5
 
6
- **Issue → PR in one command.** Comment `@kody` on a GitHub issue and Kody autonomously classifies, plans, builds, tests, reviews, fixes, and ships a pull request.
6
+ **Comment `@kody` on a GitHub issue. Get back a tested, reviewed PR. Free and open source.**
7
7
 
8
- Kody is a 7-stage autonomous SDLC pipeline that runs in GitHub Actions. It uses Claude Code (or any LLM via LiteLLM) to turn issues into production-ready PRs with quality gates, AI-powered failure diagnosis, risk-based human approval, and shared context between stages.
8
+ Kody wraps Claude Code with a 7-stage autonomous pipeline classify, plan, build, verify, review, fix, ship with quality gates between every stage. If verify catches a bug, it gets fixed before review ever sees it. No blind retries, no context drift, no babysitting.
9
9
 
10
- > **Kody is the only AI coding tool that generates repo-customized prompts.** Every other tool sends the same generic instructions regardless of your codebase. Kody analyzes your repo's patterns, conventions, and gaps — then generates tailored instruction files for every pipeline stage. The AI writes code that looks like it belongs in your project because it was taught *from* your project. [Learn more →](docs/FEATURES.md#repo-aware-step-files-kodysteps)
10
+ - **Repo-aware prompts** `bootstrap` analyzes your codebase and generates customized instructions for every stage, not generic "write clean code" prompts
11
+ - **Quality gates** — runs your repo's typecheck, tests, and lint between stages + AI code review in a fresh session
12
+ - **AI failure diagnosis** — classifies errors as fixable/infrastructure/pre-existing before retrying
13
+ - **Self-improving** — learns conventions, remembers architectural decisions, discovers existing patterns
14
+ - **Runs anywhere** — locally from your terminal or via GitHub Actions
15
+ - **Anthropic-compatible models** — Anthropic natively, or other providers (MiniMax, Gemini, etc.) via LiteLLM proxy
11
16
 
12
- ## Why Kody?
13
-
14
- Most AI coding tools are **autocomplete** (Copilot) or **chat-based** (Cursor, Cline). You still drive. Kody is an **autonomous pipeline** — comment `@kody`, walk away, come back to a PR.
15
-
16
- - **Repo-aware prompts** — auto-generated step files with your repo's patterns, gaps, and acceptance criteria
17
- - **7 stages with quality gates** — not a single agent conversation
18
- - **Fire and forget** — runs in GitHub Actions, no IDE required
19
- - **Any LLM** — route through LiteLLM to use MiniMax, GPT, Gemini, or local models
20
- - **Free** with free-tier models — no subscriptions, no per-seat pricing
21
-
22
- [How Kody compares to Copilot, Devin, Cursor, OpenHands, and others →](docs/COMPARISON.md)
23
-
24
- ## Pipeline
17
+ [Why Kody? →](docs/ABOUT.md) · [Full comparison →](docs/COMPARISON.md)
25
18
 
26
19
  ```
27
- ┌─────────────────────────────────────────────────────────────┐
28
- @kody on issue │
29
- └──────────────────────────┬──────────────────────────────────┘
30
-
31
- ┌──────────────────────────▼──────────────────────────────────┐
32
- │ ① TASKIFY Tier: cheap │
33
- │ Classify task, detect complexity, ask questions task.json │
34
- └──────────────────────────┬──────────────────────────────────┘
35
-
36
- ┌────────────▼────────────┐
37
- LOW? skip to ③ │
38
- │ MEDIUM? continue │
39
- │ HIGH? continue │
40
- └────────────┬────────────┘
41
-
42
- ┌──────────────────────────▼──────────────────────────────────┐
43
- ② PLAN Tier: strong │
44
- │ TDD implementation plan (deep reasoning) → plan.md │
45
- └──────────────────────────┬──────────────────────────────────┘
46
-
47
- ┌────────────▼────────────┐
48
- │ HIGH risk? │
49
- │ 🛑 Pause for approval │──── @kody approve
50
- └────────────┬────────────┘
51
-
52
- ┌──────────────────────────▼──────────────────────────────────┐
53
- │ ③ BUILD Tier: mid │
54
- │ Implement code via Claude Code tools → code + git commit│
55
- └──────────────────────────┬──────────────────────────────────┘
56
-
57
- ┌──────────────────────────▼──────────────────────────────────┐
58
- │ ④ VERIFY (deterministic gate) │
59
- │ typecheck + tests + lint │
60
- │ ┌───────────────────────────────────────────────────┐ │
61
- │ │ Fail? → AI diagnosis → autofix → retry (up to 2) │ │
62
- │ └───────────────────────────────────────────────────┘ │
63
- └──────────────────────────┬──────────────────────────────────┘
64
-
65
- ┌──────────────────────────▼──────────────────────────────────┐
66
- │ ⑤ REVIEW Tier: strong │
67
- │ Code review: PASS/FAIL + Critical/Major/Minor → review.md │
68
- └──────────────────────────┬──────────────────────────────────┘
69
-
70
- ┌──────────────────────────▼──────────────────────────────────┐
71
- │ ⑥ REVIEW-FIX Tier: mid │
72
- │ Fix Critical and Major findings → code + commit│
73
- └──────────────────────────┬──────────────────────────────────┘
74
-
75
- ┌──────────────────────────▼──────────────────────────────────┐
76
- │ ⑦ SHIP (deterministic) │
77
- │ Push branch + create PR with Closes #N → ship.md + PR│
78
- └──────────────────────────┬──────────────────────────────────┘
79
-
80
- ┌──────────────────────────▼──────────────────────────────────┐
81
- │ ✅ PR created & ready for review │
82
- └─────────────────────────────────────────────────────────────┘
20
+ @kody on issue
21
+
22
+
23
+ ① TASKIFY ─── classify, scope, detect complexity, ask questions
24
+
25
+
26
+ PLAN ────── TDD implementation plan (deep reasoning)
27
+ │ 🛑 HIGH risk? Pause for human approval
28
+
29
+ ③ BUILD ───── implement via Claude Code tools
30
+
31
+
32
+ ④ VERIFY ──── typecheck + tests + lint
33
+ │ ✗ fail → AI diagnosis → autofix → retry
34
+
35
+ ⑤ REVIEW ──── AI code review (fresh session, no build bias)
36
+
37
+
38
+ ⑥ REVIEW-FIX ─ fix Critical and Major findings
39
+
40
+
41
+ SHIP ────── push branch, create PR, close issue
83
42
  ```
84
43
 
85
- **Tiers are configurable** — cheap/mid/strong map to any model via `modelMap` in config. Defaults: haiku/sonnet/opus. Route to MiniMax, GPT, Gemini, or local models via [LiteLLM](docs/LITELLM.md).
86
-
87
- **Shared sessions** — stages in the same group share a Claude Code session: taskify+plan (explore), build+autofix+review-fix (implementation), review (fresh perspective). No cold-start re-exploration between stages.
88
-
89
- [Pipeline details →](docs/PIPELINE.md)
90
-
91
44
  ## Quick Start
92
45
 
93
- **Prerequisites:** Node.js >= 22, [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code), [GitHub CLI](https://cli.github.com/), git
46
+ **Prerequisites:** A GitHub repo + an Anthropic API key (or [compatible provider](docs/LITELLM.md) key).
94
47
 
95
- ### 1. Install
48
+ For local CLI usage, you also need: Node.js >= 22, [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code), [GitHub CLI](https://cli.github.com/), git.
96
49
 
97
- ```bash
98
- npm install -g @kody-ade/kody-engine-lite
99
- ```
50
+ ### 1. Set up GitHub
100
51
 
101
- ### 2. Set up GitHub
52
+ Add your API key as a secret — via [GitHub web UI](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository) or CLI:
102
53
 
103
54
  ```bash
104
55
  gh secret set ANTHROPIC_API_KEY --repo owner/repo
@@ -106,21 +57,28 @@ gh secret set ANTHROPIC_API_KEY --repo owner/repo
106
57
 
107
58
  Then in GitHub: **Settings → Actions → General → "Allow GitHub Actions to create and approve pull requests"**
108
59
 
109
- ### 3. Initialize
60
+ ### 2. Initialize
61
+
62
+ Copy the [workflow template](templates/kody.yml) to `.github/workflows/kody.yml` and add a `kody.config.json` to your repo root. Or use the CLI to auto-generate both:
110
63
 
111
64
  ```bash
65
+ npm install -g @kody-ade/kody-engine-lite
112
66
  cd your-project
113
67
  kody-engine-lite init
114
68
  ```
115
69
 
116
- This analyzes your project and generates:
117
- - **Workflow** (`.github/workflows/kody.yml`)
118
- - **Config** (`kody.config.json` auto-detected quality commands, git, GitHub settings)
119
- - **Project memory** (`.kody/memory/` — architecture and conventions)
120
- - **Customized step files** (`.kody/steps/` — see below)
121
- Then commits and pushes everything.
70
+ ### 3. Bootstrap
71
+
72
+ Create a new GitHub issue (e.g., "Setup Kody") and comment:
73
+
74
+ ```
75
+ @kody bootstrap
76
+ ```
122
77
 
123
- > **Note:** GitHub labels for lifecycle tracking are created automatically during `@kody bootstrap`.
78
+ This analyzes your codebase with an LLM and generates:
79
+ - **Project memory** (`.kody/memory/` — architecture and conventions)
80
+ - **Customized step files** (`.kody/steps/` — repo-aware prompts for every stage)
81
+ - **GitHub labels** for lifecycle tracking (14 labels)
124
82
 
125
83
  ### 4. Use
126
84
 
@@ -130,36 +88,46 @@ Comment on any GitHub issue:
130
88
  @kody
131
89
  ```
132
90
 
133
- ### Switch to a different model (optional)
91
+ Kody picks up the issue and works through the pipeline autonomously. You'll see:
92
+ - Labels updating in real-time: `kody:planning` → `kody:building` → `kody:review` → `kody:done`
93
+ - Progress comments on the issue at each stage
94
+ - A PR with a rich description, passing quality checks, and `Closes #N`
95
+
96
+ If the task is HIGH-risk, Kody pauses after planning and asks for approval before writing code.
134
97
 
135
- Set the `provider` field in `kody.config.json` — Kody auto-generates the LiteLLM config, starts the proxy, and routes all stages through your provider:
98
+ ### Switch to a different model (optional)
136
99
 
137
100
  ```json
138
- // kody.config.json — use MiniMax (or any LLM)
101
+ // kody.config.json
139
102
  { "agent": { "provider": "minimax" } }
140
103
  ```
141
104
 
142
- Add the provider's API key to `.env`:
143
105
  ```
106
+ # .env
144
107
  ANTHROPIC_COMPATIBLE_API_KEY=your-key-here
145
108
  ```
146
109
 
147
- That's it. Kody auto-starts the LiteLLM proxy and loads API keys from `.env`. For per-tier model control, configure `modelMap` in `kody.config.json`. [Full LiteLLM guide →](docs/LITELLM.md)
110
+ Kody auto-starts the LiteLLM proxy. [Full LiteLLM guide →](docs/LITELLM.md)
148
111
 
149
112
  ## Commands
150
113
 
151
114
  | Command | What it does |
152
115
  |---------|-------------|
153
116
  | `@kody` | Run full pipeline on an issue |
117
+ | `@kody review` | Review any PR — structured findings + GitHub approve/request-changes |
118
+ | `@kody fix` | Re-run from build with human PR feedback + Kody's review as context |
119
+ | `@kody fix-ci` | Fix failing CI checks (auto-triggered with loop guard) |
120
+ | `@kody rerun` | Resume from failed or paused stage |
121
+ | `@kody rerun --from <stage>` | Resume from a specific stage |
154
122
  | `@kody approve` | Resume after questions or risk gate |
155
- | `@kody fix` | Re-run from build. Reads PR review comments as context |
156
- | `@kody fix-ci` | Fix failing CI checks (auto-triggered on Kody PRs) |
157
- | `@kody rerun` | Resume from the failed or paused stage |
158
123
  | `@kody bootstrap` | Regenerate project memory and step files |
159
124
 
160
125
  ```bash
161
- kody-engine-lite init [--force] # Setup repo
162
- kody-engine-lite run --issue-number 42 --local
126
+ kody-engine-lite init [--force] # Setup repo: workflow + config
127
+ kody-engine-lite bootstrap [--force] # Generate memory + step files + labels
128
+ kody-engine-lite run --issue-number 42 --local --cwd ./project
129
+ kody-engine-lite run --task "Add retry utility" --local
130
+ kody-engine-lite review --pr-number 42 # Standalone PR review
163
131
  kody-engine-lite fix --issue-number 42 --feedback "Use middleware pattern"
164
132
  kody-engine-lite fix-ci --pr-number 42
165
133
  kody-engine-lite rerun --issue-number 42 --from verify
@@ -169,30 +137,26 @@ kody-engine-lite rerun --issue-number 42 --from verify
169
137
 
170
138
  ## Key Features
171
139
 
172
- - **[Repo-Aware Step Files](docs/FEATURES.md#repo-aware-step-files-kodysteps)** — auto-generated per-stage instructions grounded in your actual code patterns, gaps, and acceptance criteria. Edit `.kody/steps/*.md` to customize how Kody works in your repo.
173
- - **[Shared Sessions](docs/FEATURES.md#shared-sessions)** — stages in the same group share a Claude Code session, eliminating cold-start re-exploration
174
- - **[Risk Gate](docs/FEATURES.md#risk-gate)** — HIGH-risk tasks pause for human approval before building
175
- - **[AI Failure Diagnosis](docs/FEATURES.md#ai-powered-failure-diagnosis)** — classifies errors (fixable/infrastructure/pre-existing/abort) before retry
176
- - **[Question Gates](docs/FEATURES.md#question-gates)** — asks product/architecture questions when the task is unclear
177
- - **[Any LLM](docs/LITELLM.md)** — route through LiteLLM to use MiniMax, GPT, Gemini, local models
178
- - **[Retrospective](docs/FEATURES.md#retrospective-system)** — analyzes each run, identifies patterns, suggests improvements
179
- - **[Auto-Learning](docs/FEATURES.md#auto-learning-memory)** — extracts coding conventions from each successful run
180
- - **[Pattern Discovery](docs/FEATURES.md#pattern-discovery)** — plan stage searches for existing patterns before proposing new approaches
181
- - **[Decision Memory](docs/FEATURES.md#decision-memory)** — architectural decisions from code reviews are saved and enforced in future tasks
140
+ - **Repo-Aware Step Files** — auto-generated prompts with your repo's patterns, gaps, and acceptance criteria ([details](docs/FEATURES.md#repo-aware-step-files-kodysteps))
141
+ - **Standalone PR Review** — `@kody review` on any PR for structured code review with GitHub approve/request-changes ([details](docs/FEATURES.md#standalone-pr-review))
142
+ - **Shared Sessions** — stages share Claude Code sessions, no cold-start re-exploration ([details](docs/FEATURES.md#shared-sessions))
143
+ - **Risk Gate** — HIGH-risk tasks pause for human approval before building ([details](docs/FEATURES.md#risk-gate))
144
+ - **AI Failure Diagnosis** — classifies errors as fixable/infrastructure/pre-existing/abort before retry ([details](docs/FEATURES.md#ai-powered-failure-diagnosis))
145
+ - **Question Gates** — asks product/architecture questions when the task is unclear ([details](docs/FEATURES.md#question-gates))
146
+ - **Auto Fix-CI** — CI fails on a PR? Kody fetches logs, diagnoses, and pushes a fix ([details](docs/FEATURES.md#auto-fix-ci))
147
+ - **Pattern Discovery** — searches for existing patterns before proposing new ones ([details](docs/FEATURES.md#pattern-discovery))
148
+ - **Decision Memory** — architectural decisions extracted from reviews persist across tasks ([details](docs/FEATURES.md#decision-memory))
149
+ - **Auto-Learning** — extracts coding conventions from each successful run ([details](docs/FEATURES.md#auto-learning-memory))
150
+ - **Retrospective** — analyzes each run, identifies patterns, suggests improvements ([details](docs/FEATURES.md#retrospective-system))
151
+ - **Anthropic-Compatible Models** — route through LiteLLM to use other providers like MiniMax, Gemini, etc. ([setup guide](docs/LITELLM.md))
182
152
 
183
153
  ## Documentation
184
154
 
185
- | Doc | What's in it |
186
- |-----|-------------|
187
- | [Pipeline](docs/PIPELINE.md) | Stage details, shared sessions, complexity skipping, artifacts |
188
- | [Bootstrap](docs/BOOTSTRAP.md) | Project memory, step files, labels — what bootstrap generates and when to run it |
189
- | [Features](docs/FEATURES.md) | Risk gate, diagnosis, sessions, retrospective, auto-learn, pattern discovery, decision memory, PR feedback |
190
- | [LiteLLM](docs/LITELLM.md) | Non-Anthropic model setup, auto-start, tested providers |
191
- | [CLI](docs/CLI.md) | Full command reference — all flags, env vars, and examples |
192
- | [Configuration](docs/CONFIGURATION.md) | Config file reference, env vars, workflow setup |
193
- | [Comparison](docs/COMPARISON.md) | vs Copilot, Devin, Cursor, Cline, OpenHands, SWE-agent |
194
- | [Architecture](docs/ARCHITECTURE.md) | Source tree, state machine diagram, development guide |
195
- | [FAQ](docs/FAQ.md) | Common questions about usage, models, security, cost |
155
+ **Understand Kody:** [About](docs/ABOUT.md) · [Features](docs/FEATURES.md) · [Pipeline](docs/PIPELINE.md) · [Comparison](docs/COMPARISON.md)
156
+
157
+ **Set up & use:** [CLI](docs/CLI.md) · [Configuration](docs/CONFIGURATION.md) · [Bootstrap](docs/BOOTSTRAP.md) · [LiteLLM](docs/LITELLM.md)
158
+
159
+ **Reference:** [Architecture](docs/ARCHITECTURE.md) · [FAQ](docs/FAQ.md)
196
160
 
197
161
  ## License
198
162
 
package/dist/bin/cli.js CHANGED
@@ -3421,8 +3421,10 @@ async function checkModelHealth(baseUrl, apiKey, model = "claude-haiku-4-5") {
3421
3421
  return { ok: false, error: `HTTP ${res.status}: ${body2.slice(0, 200)}` };
3422
3422
  }
3423
3423
  const body = await res.json();
3424
- if (!body.content?.[0]?.text) {
3425
- return { ok: false, error: "Empty response from model" };
3424
+ const hasAnthropicContent = !!body.content?.[0]?.text;
3425
+ const hasOpenAIContent = !!body.choices?.[0]?.message?.content;
3426
+ if (!hasAnthropicContent && !hasOpenAIContent) {
3427
+ return { ok: false, error: `Unexpected response format: ${JSON.stringify(body).slice(0, 200)}` };
3426
3428
  }
3427
3429
  return { ok: true };
3428
3430
  } catch (err) {
@@ -3633,7 +3635,7 @@ async function runModelHealthCheck(config) {
3633
3635
  logger.warn(`Skipping model health check \u2014 ${keyName} not set`);
3634
3636
  return;
3635
3637
  }
3636
- const model = config.agent.modelMap.cheap;
3638
+ const model = usesProxy ? "claude-haiku-4-5" : config.agent.modelMap.cheap;
3637
3639
  logger.info(`Model health check (${model} via ${usesProxy ? "LiteLLM" : "Anthropic"})...`);
3638
3640
  const result = await checkModelHealth(baseUrl, apiKey, model);
3639
3641
  if (result.ok) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine-lite",
3
- "version": "0.1.73",
3
+ "version": "0.1.75",
4
4
  "description": "Autonomous SDLC pipeline: Kody orchestration + Claude Code + LiteLLM",
5
5
  "license": "MIT",
6
6
  "type": "module",