@kody-ade/kody-engine 0.4.331 → 0.4.333
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 +13 -5
- package/dist/executables/agent-creator/prompt.md +4 -0
- package/dist/executables/agent-factory/prompt.md +15 -0
- package/dist/executables/capability-creator/prompt.md +6 -0
- package/dist/executables/goal-creator/prompt.md +4 -0
- package/dist/executables/loop-creator/prompt.md +4 -0
- package/dist/executables/workflow-creator/prompt.md +6 -0
- package/package.json +1 -1
package/dist/bin/kody.js
CHANGED
|
@@ -15,7 +15,7 @@ var init_package = __esm({
|
|
|
15
15
|
"package.json"() {
|
|
16
16
|
package_default = {
|
|
17
17
|
name: "@kody-ade/kody-engine",
|
|
18
|
-
version: "0.4.
|
|
18
|
+
version: "0.4.333",
|
|
19
19
|
description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
|
|
20
20
|
license: "MIT",
|
|
21
21
|
type: "module",
|
|
@@ -18296,8 +18296,12 @@ function validateFilesForKind(kind, slug2, files, strictSingleModel, failures) {
|
|
|
18296
18296
|
if (strictSingleModel) rejectOtherRoots(paths, [`capabilities/${slug2}/`], "capability", failures);
|
|
18297
18297
|
const profile = parseJsonFile(files, `capabilities/${slug2}/profile.json`, failures);
|
|
18298
18298
|
if (profile) {
|
|
18299
|
+
const profileSlug = stringField6(profile.slug);
|
|
18299
18300
|
const profileName = stringField6(profile.name);
|
|
18300
|
-
if (
|
|
18301
|
+
if (profileSlug && profileSlug !== slug2) failures.push("capability profile slug must match model.slug");
|
|
18302
|
+
if (!profileSlug && profileName && profileName !== slug2) {
|
|
18303
|
+
failures.push("capability profile name must match model.slug when slug is absent");
|
|
18304
|
+
}
|
|
18301
18305
|
if (profile.agent !== void 0)
|
|
18302
18306
|
failures.push("capability profile must not set agent; agent wiring belongs outside capability creation");
|
|
18303
18307
|
if (!["observe", "act", "verify"].includes(stringField6(profile.capabilityKind))) {
|
|
@@ -18312,13 +18316,17 @@ function validateFilesForKind(kind, slug2, files, strictSingleModel, failures) {
|
|
|
18312
18316
|
if (kind === "agentLoop") {
|
|
18313
18317
|
if (!paths.some((filePath) => filePath.endsWith("/state.json")))
|
|
18314
18318
|
failures.push("agentLoop must produce a state.json file");
|
|
18315
|
-
if (strictSingleModel) rejectOtherRoots(paths, ["goals/
|
|
18319
|
+
if (strictSingleModel) rejectOtherRoots(paths, ["goals/", "loops/"], "agentLoop", failures);
|
|
18316
18320
|
}
|
|
18317
18321
|
if (kind === "workflow") {
|
|
18318
18322
|
requirePath(paths, `capabilities/${slug2}/profile.json`, "workflow capability profile", failures);
|
|
18319
18323
|
const profile = parseJsonFile(files, `capabilities/${slug2}/profile.json`, failures);
|
|
18320
|
-
if (profile
|
|
18321
|
-
|
|
18324
|
+
if (profile) {
|
|
18325
|
+
const hasWorkflowObject = Boolean(profile.workflow && typeof profile.workflow === "object");
|
|
18326
|
+
const hasTopLevelSteps = Array.isArray(profile.steps) && profile.steps.length > 0;
|
|
18327
|
+
if (!hasWorkflowObject && !hasTopLevelSteps) {
|
|
18328
|
+
failures.push("workflow profile must include workflow object or top-level steps");
|
|
18329
|
+
}
|
|
18322
18330
|
}
|
|
18323
18331
|
}
|
|
18324
18332
|
}
|
|
@@ -12,6 +12,8 @@ Read and follow these docs before producing the model:
|
|
|
12
12
|
|
|
13
13
|
- `docs/agents.md`
|
|
14
14
|
|
|
15
|
+
These docs are contract references. If the consumer repo does not contain them or `Read` fails, continue from the model boundary below and still list the referenced doc paths in `model.docsUsed`.
|
|
16
|
+
|
|
15
17
|
# Operator Request
|
|
16
18
|
|
|
17
19
|
{{issue.body}}
|
|
@@ -45,6 +47,8 @@ Do not own:
|
|
|
45
47
|
|
|
46
48
|
Create the smallest review-ready Agent model that satisfies the request.
|
|
47
49
|
|
|
50
|
+
Do not call Bash, Write, Edit, mkdir, cat, tee, printf, python, node, git, gh, or any external command. Your only mutation channel is `PR_SUMMARY.files`; the deterministic postflight opens the state-repo review PR from that JSON.
|
|
51
|
+
|
|
48
52
|
Use current storage names in file paths. Put the generated agent at:
|
|
49
53
|
|
|
50
54
|
`agents/<slug>.md`
|
|
@@ -22,6 +22,8 @@ Design the smallest Kody model structure that satisfies the request. You may cre
|
|
|
22
22
|
|
|
23
23
|
Treat each generated model as if it were produced by its model-specific creator. Do not let the factory invent mixed-responsibility files.
|
|
24
24
|
|
|
25
|
+
The docs named in the creator contracts are contract references. If the consumer repo does not contain them or `Read` fails, continue from the table below and still list the referenced doc paths in each model's `docsUsed`.
|
|
26
|
+
|
|
25
27
|
## Model creator contracts
|
|
26
28
|
|
|
27
29
|
Use these contracts when deciding whether a file belongs in the bundle:
|
|
@@ -36,6 +38,19 @@ Use these contracts when deciding whether a file belongs in the bundle:
|
|
|
36
38
|
|
|
37
39
|
If one generated model needs information from another, reference the other model by slug. Do not copy that model's responsibility into the file.
|
|
38
40
|
|
|
41
|
+
Use these exact model kinds and required file shapes:
|
|
42
|
+
|
|
43
|
+
| Model kind | Required files |
|
|
44
|
+
| --- | --- |
|
|
45
|
+
| `agent` | `agents/<slug>.md` |
|
|
46
|
+
| `goal` | `goals/templates/<slug>/state.json` |
|
|
47
|
+
| `agentLoop` | a `state.json` under `goals/<slug>/` or `loops/<slug>/` |
|
|
48
|
+
| `workflow` | `capabilities/<slug>/profile.json` containing a `workflow` object or top-level `steps` |
|
|
49
|
+
| `capability` | `capabilities/<slug>/profile.json` and `capabilities/<slug>/capability.md` |
|
|
50
|
+
|
|
51
|
+
Do not use `kind: "loop"`; the loop model kind is `agentLoop`.
|
|
52
|
+
Do not use `agents/<slug>/identity.json`, `goals/<slug>/goal.json`, `workflows/<slug>/workflow.json`, or `executables/<slug>/...`.
|
|
53
|
+
|
|
39
54
|
Capability files must be shaped by ability, kind, interface, and constraints. Do not include fields or prose that make the capability depend on who asked for it, which workflow calls it, which goal consumes it, which loop wakes it, or which agent may run it.
|
|
40
55
|
|
|
41
56
|
Use the current Kody vocabulary:
|
|
@@ -14,6 +14,8 @@ Read and follow these docs before producing the model:
|
|
|
14
14
|
- `docs/capability-kind-map.md`
|
|
15
15
|
- `docs/executables.md`
|
|
16
16
|
|
|
17
|
+
These docs are contract references. If the consumer repo does not contain them or `Read` fails, continue from the model boundary below and still list the referenced doc paths in `model.docsUsed`.
|
|
18
|
+
|
|
17
19
|
# Operator Request
|
|
18
20
|
|
|
19
21
|
{{issue.body}}
|
|
@@ -50,6 +52,8 @@ Those are wiring decisions outside this model.
|
|
|
50
52
|
|
|
51
53
|
Create the smallest review-ready Capability model that satisfies the requested ability.
|
|
52
54
|
|
|
55
|
+
Do not call Bash, Write, Edit, mkdir, cat, tee, printf, python, node, git, gh, or any external command. Your only mutation channel is `PR_SUMMARY.files`; the deterministic postflight opens the state-repo review PR from that JSON.
|
|
56
|
+
|
|
53
57
|
Use current storage names in file paths. Put generated files under:
|
|
54
58
|
|
|
55
59
|
`capabilities/<slug>/`
|
|
@@ -59,6 +63,8 @@ Required files:
|
|
|
59
63
|
- `capabilities/<slug>/profile.json`
|
|
60
64
|
- `capabilities/<slug>/capability.md`
|
|
61
65
|
|
|
66
|
+
In `profile.json`, include `"slug": "<slug>"`. The `"name"` field may be a display name, but if `slug` is absent then `name` must equal the slug.
|
|
67
|
+
|
|
62
68
|
Add colocated prompt/scripts only if the capability needs a new implementation. Reuse existing capabilities, implementation profiles, skills, or scripts when they fit.
|
|
63
69
|
|
|
64
70
|
# Final Output Contract
|
|
@@ -14,6 +14,8 @@ Read and follow these docs before producing the model:
|
|
|
14
14
|
- `docs/jobs-model.md`
|
|
15
15
|
- `docs/capabilities.md`
|
|
16
16
|
|
|
17
|
+
These docs are contract references. If the consumer repo does not contain them or `Read` fails, continue from the model boundary below and still list the referenced doc paths in `model.docsUsed`.
|
|
18
|
+
|
|
17
19
|
# Operator Request
|
|
18
20
|
|
|
19
21
|
{{issue.body}}
|
|
@@ -48,6 +50,8 @@ Do not own:
|
|
|
48
50
|
|
|
49
51
|
Create the smallest review-ready managed Goal model that satisfies the requested outcome.
|
|
50
52
|
|
|
53
|
+
Do not call Bash, Write, Edit, mkdir, cat, tee, printf, python, node, git, gh, or any external command. Your only mutation channel is `PR_SUMMARY.files`; the deterministic postflight opens the state-repo review PR from that JSON.
|
|
54
|
+
|
|
51
55
|
Use current storage names in file paths. Put generated templates under:
|
|
52
56
|
|
|
53
57
|
`goals/templates/<slug>/state.json`
|
|
@@ -14,6 +14,8 @@ Read and follow these docs before producing the model:
|
|
|
14
14
|
- `docs/engine-company.md`
|
|
15
15
|
- `docs/ledgers.md`
|
|
16
16
|
|
|
17
|
+
These docs are contract references. If the consumer repo does not contain them or `Read` fails, continue from the model boundary below and still list the referenced doc paths in `model.docsUsed`.
|
|
18
|
+
|
|
17
19
|
# Operator Request
|
|
18
20
|
|
|
19
21
|
{{issue.body}}
|
|
@@ -45,6 +47,8 @@ Do not own:
|
|
|
45
47
|
|
|
46
48
|
Create the smallest review-ready AgentLoop model that satisfies the requested wakeup behavior.
|
|
47
49
|
|
|
50
|
+
Do not call Bash, Write, Edit, mkdir, cat, tee, printf, python, node, git, gh, or any external command. Your only mutation channel is `PR_SUMMARY.files`; the deterministic postflight opens the state-repo review PR from that JSON.
|
|
51
|
+
|
|
48
52
|
Use current storage names in file paths. Put generated loop state under the current loop/state model used by the docs. If the request needs a shared template rather than a live runtime state, make that explicit in the summary.
|
|
49
53
|
|
|
50
54
|
# Final Output Contract
|
|
@@ -13,6 +13,8 @@ Read and follow these docs before producing the model:
|
|
|
13
13
|
- `docs/jobs-model.md`
|
|
14
14
|
- `docs/capabilities.md`
|
|
15
15
|
|
|
16
|
+
These docs are contract references. If the consumer repo does not contain them or `Read` fails, continue from the model boundary below and still list the referenced doc paths in `model.docsUsed`.
|
|
17
|
+
|
|
16
18
|
# Operator Request
|
|
17
19
|
|
|
18
20
|
{{issue.body}}
|
|
@@ -44,8 +46,12 @@ Do not own:
|
|
|
44
46
|
|
|
45
47
|
Create the smallest review-ready Workflow model that satisfies the requested ordered run behavior.
|
|
46
48
|
|
|
49
|
+
Do not call Bash, Write, Edit, mkdir, cat, tee, printf, python, node, git, gh, or any external command. Your only mutation channel is `PR_SUMMARY.files`; the deterministic postflight opens the state-repo review PR from that JSON.
|
|
50
|
+
|
|
47
51
|
Prefer placing workflow steps on the public capability that owns the composed action. Do not create a workflow when a single capability is enough.
|
|
48
52
|
|
|
53
|
+
Put the workflow contract in `capabilities/<slug>/profile.json`. Prefer a `workflow` object with `steps`; top-level `steps` are only for existing profiles that already use that shape.
|
|
54
|
+
|
|
49
55
|
# Final Output Contract
|
|
50
56
|
|
|
51
57
|
If the request is too ambiguous to produce one review-ready Workflow model, output one line:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kody-ade/kody-engine",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.333",
|
|
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",
|