@kody-ade/kody-engine 0.4.332 → 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 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.332",
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 (profileName && profileName !== slug2) failures.push("capability profile name must match model.slug");
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/templates/", "loops/"], "agentLoop", failures);
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 && (!profile.workflow || typeof profile.workflow !== "object")) {
18321
- failures.push("workflow profile must include workflow object");
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
  }
@@ -38,6 +38,19 @@ Use these contracts when deciding whether a file belongs in the bundle:
38
38
 
39
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.
40
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
+
41
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.
42
55
 
43
56
  Use the current Kody vocabulary:
@@ -63,6 +63,8 @@ Required files:
63
63
  - `capabilities/<slug>/profile.json`
64
64
  - `capabilities/<slug>/capability.md`
65
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
+
66
68
  Add colocated prompt/scripts only if the capability needs a new implementation. Reuse existing capabilities, implementation profiles, skills, or scripts when they fit.
67
69
 
68
70
  # Final Output Contract
@@ -50,6 +50,8 @@ Do not call Bash, Write, Edit, mkdir, cat, tee, printf, python, node, git, gh, o
50
50
 
51
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.
52
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
+
53
55
  # Final Output Contract
54
56
 
55
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.332",
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",