@kody-ade/kody-engine 0.4.12 → 0.4.14
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 +106 -1
- package/dist/bin/kody.js +1286 -557
- package/dist/executables/goal-scheduler/scheduler.sh +7 -28
- package/dist/executables/goal-tick/tick.sh +20 -0
- package/dist/executables/qa-engineer/profile.json +13 -4
- package/dist/executables/qa-engineer/prompt.md +36 -4
- package/dist/executables/release-deploy/deploy.sh +0 -0
- package/dist/executables/release-prepare/prepare.sh +0 -0
- package/dist/executables/release-publish/publish.sh +0 -0
- package/dist/executables/resolve/apply-prefer.sh +0 -0
- package/dist/executables/revert/revert.sh +0 -0
- package/kody.config.schema.json +11 -0
- package/package.json +15 -14
package/README.md
CHANGED
|
@@ -50,6 +50,9 @@ kody plan --issue <N> # research + implementati
|
|
|
50
50
|
kody research --issue <N> # map repo context, surface gaps
|
|
51
51
|
kody review --pr <N> # structured diff review
|
|
52
52
|
kody ui-review --pr <N> [--preview-url <URL>] # UI review — browses preview via Playwright MCP
|
|
53
|
+
kody qa-engineer [--url <URL>] [--scope ...] # free-form QA — browses, opens findings as goal task issues
|
|
54
|
+
[--goal <id>] [--issue <N>]
|
|
55
|
+
[--auth-profile <storageState.json>]
|
|
53
56
|
kody classify --issue <N> # pick a flow type (feature/bug/spec/chore)
|
|
54
57
|
|
|
55
58
|
# flow orchestrators (no agent of their own — transition tables)
|
|
@@ -86,12 +89,114 @@ A **job** is a stateful, bounded goal expressed as a labeled GitHub issue (`kody
|
|
|
86
89
|
|
|
87
90
|
### `ui-review`
|
|
88
91
|
|
|
89
|
-
Drives the running preview deployment via the Playwright MCP server alongside the usual diff review.
|
|
92
|
+
PR-bound UI review. Drives the running preview deployment via the Playwright MCP server alongside the usual diff review, posts one structured review comment.
|
|
90
93
|
|
|
91
94
|
- Preview URL: `--preview-url` → `$PREVIEW_URL` → `http://localhost:3000`. Unreachable → falls back to diff-only.
|
|
92
95
|
- Credentials: `.kody/qa-guide.md` (committed, scaffolded by `kody init` with `CHANGE_ME` placeholders).
|
|
93
96
|
- Auto-discovery: routes, roles, login/admin paths, Payload CMS collections, API routes, env vars — fed to the agent as context.
|
|
94
97
|
|
|
98
|
+
For free-form QA passes (no diff, no PR), see [`qa-engineer`](#qa-engineer) below.
|
|
99
|
+
|
|
100
|
+
### `qa-engineer`
|
|
101
|
+
|
|
102
|
+
Free-form QA pass. Browses a running site with Playwright MCP, exercises UI states (happy / empty / error / loading / mobile / a11y), and turns findings into a kody goal whose tasks are individually triageable, severity-labelled bug issues. Read-only on the repo (no commits except the goal's own `state.json`).
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# broad smoke against the project's qa.fallbackUrl
|
|
106
|
+
kody qa-engineer
|
|
107
|
+
|
|
108
|
+
# focused pass; opens a new qa-<scope>-<date> goal + N task issues
|
|
109
|
+
kody qa-engineer --scope "checkout flow"
|
|
110
|
+
|
|
111
|
+
# attach findings to an existing goal (resolves URL from goal-<id>'s Vercel deployment)
|
|
112
|
+
kody qa-engineer --goal admin-chat-memory-recall-ui
|
|
113
|
+
|
|
114
|
+
# explicit URL overrides everything; useful for testing a deployed PR preview
|
|
115
|
+
kody qa-engineer --url https://my-feature-branch.vercel.app --scope "search UX"
|
|
116
|
+
|
|
117
|
+
# pre-authenticated session via committed Playwright storageState
|
|
118
|
+
kody qa-engineer --scope "admin" --auth-profile .kody/qa-storage-state.json
|
|
119
|
+
|
|
120
|
+
# PASS verdicts (no findings) skip goal creation; --issue routes the report to a comment
|
|
121
|
+
kody qa-engineer --scope "smoke" --issue 1234
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**URL resolution chain.** `resolveQaUrl` walks the chain in order; first non-empty source wins:
|
|
125
|
+
|
|
126
|
+
1. `--url <URL>` — explicit
|
|
127
|
+
2. `--goal <id>` → latest successful Vercel deployment for the `goal-<id>` branch (via `repos/.../deployments?ref=goal-<id>` + statuses)
|
|
128
|
+
3. `$PREVIEW_URL` env var
|
|
129
|
+
4. `kody.config.json` → `qa.fallbackUrl` (per-project)
|
|
130
|
+
5. error — no localhost defaults; CI has no localhost to fall back to.
|
|
131
|
+
|
|
132
|
+
Configure the project default in `kody.config.json`:
|
|
133
|
+
|
|
134
|
+
```json
|
|
135
|
+
{
|
|
136
|
+
"qa": { "fallbackUrl": "https://dev.example.com" }
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**Output modes.**
|
|
141
|
+
|
|
142
|
+
| Trigger | What happens |
|
|
143
|
+
|---|---|
|
|
144
|
+
| Findings + no `--goal` | Appends a new `qa-<scope>-<date>` entry to the `kody:goals-manifest` issue (description = full report markdown). Opens N task issues, each labelled `goal:<id>` + `severity:Px` + `kody:qa-finding`. Writes `.kody/goals/<id>/state.json` (state: `active`) and pushes — `goal-scheduler` picks it up next tick. |
|
|
145
|
+
| Findings + `--goal <id>` | Skips manifest body mutation (the existing goal owns its description). Posts the report markdown as a comment on the manifest issue. Opens N task issues with `goal:<id>` labels. |
|
|
146
|
+
| Zero findings + `--issue <N>` | Posts the report as a comment on issue N. No goal touched. |
|
|
147
|
+
| Zero findings + no `--issue` | Opens a single `kody:qa-finding`-labelled record issue with the full report body. |
|
|
148
|
+
|
|
149
|
+
**Agent-emitted JSON contract.** The prompt requires the agent's final message to end with a machine-readable block:
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
<!-- KODY_QA_REPORT_JSON
|
|
153
|
+
```json
|
|
154
|
+
{
|
|
155
|
+
"findings": [
|
|
156
|
+
{
|
|
157
|
+
"severity": "P0|P1|P2|P3",
|
|
158
|
+
"title": "Short imperative — becomes the issue title",
|
|
159
|
+
"route": "/admin/...",
|
|
160
|
+
"steps": "1. ...\n2. ...",
|
|
161
|
+
"expected": "...",
|
|
162
|
+
"actual": "...",
|
|
163
|
+
"evidence": ".kody/qa-reports/<scope>/<finding>.png"
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
-->
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
If the block is missing or malformed, the postflight falls back to single-issue mode and logs a warning. Severity rubric: P0 blocks core flow / data loss / security → verdict FAIL; P1 broken non-critical feature → typically FAIL; P2 degraded UX → typically CONCERNS; P3 polish → doesn't affect verdict.
|
|
172
|
+
|
|
173
|
+
**GHA usage.** Trigger from any issue comment (auto-dispatched by the existing kody.yml workflow):
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
@kody qa-engineer --goal add-per-user-chat-memory-recall-ui --scope "memory recall UI"
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
…or via `workflow_dispatch`:
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
gh workflow run kody.yml -F executable=qa-engineer \
|
|
183
|
+
-F args="--goal admin-chat-memory-recall-ui --scope 'admin chat'"
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**Auto-discovery & credentials.** Same as `ui-review`: `discoverQaContext` scans the repo for routes/roles/admin path/Payload collections/env vars; `loadQaGuide` reads committed credentials from `.kody/qa-guide.md`. The agent only logs in if a route under test requires it.
|
|
187
|
+
|
|
188
|
+
**Artifacts.** Screenshots and DOM snapshots go to `.kody/qa-reports/<scope-slug>/`; the Playwright MCP also writes to `.playwright-mcp/`. Both should be in `.gitignore` and `.prettierignore` — `kody init` doesn't yet scaffold these, add them manually:
|
|
189
|
+
|
|
190
|
+
```gitignore
|
|
191
|
+
.kody/qa-reports/
|
|
192
|
+
.playwright-mcp/
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
.kody/**
|
|
197
|
+
.playwright-mcp/**
|
|
198
|
+
```
|
|
199
|
+
|
|
95
200
|
### `memorize` — vault wiki
|
|
96
201
|
|
|
97
202
|
A scheduled watch (cron `0 3 * * *`) that synthesizes recently merged PRs into a markdown knowledge base at `.kody/vault/` and opens a PR with the changes. Pages are entity-centric (`architecture/`, `conventions/`, `decisions/`, `components/`), not per-PR logs. Future kody runs see the relevant pages via the `loadVaultContext` preflight, which is wired into `run` / `fix` / `resolve` and exposes them as `{{vaultContext}}` in the prompt.
|