@kody-ade/kody-engine 0.4.369 → 0.4.371
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 +156 -240
- package/package.json +1 -1
- package/dist/capabilities/agent-creator/capability.md +0 -13
- package/dist/capabilities/agent-creator/profile.json +0 -7
- package/dist/capabilities/agent-factory/capability.md +0 -10
- package/dist/capabilities/agent-factory/profile.json +0 -6
- package/dist/capabilities/capability-creator/capability.md +0 -13
- package/dist/capabilities/capability-creator/profile.json +0 -7
- package/dist/capabilities/goal-creator/capability.md +0 -13
- package/dist/capabilities/goal-creator/profile.json +0 -7
- package/dist/capabilities/loop-creator/capability.md +0 -13
- package/dist/capabilities/loop-creator/profile.json +0 -7
- package/dist/capabilities/workflow-creator/capability.md +0 -13
- package/dist/capabilities/workflow-creator/profile.json +0 -7
- package/dist/implementations/agent-creator/profile.json +0 -65
- package/dist/implementations/agent-creator/prompt.md +0 -86
- package/dist/implementations/agent-factory/profile.json +0 -65
- package/dist/implementations/agent-factory/prompt.md +0 -142
- package/dist/implementations/capability-creator/profile.json +0 -65
- package/dist/implementations/capability-creator/prompt.md +0 -120
- package/dist/implementations/goal-creator/profile.json +0 -65
- package/dist/implementations/goal-creator/prompt.md +0 -91
- package/dist/implementations/loop-creator/profile.json +0 -65
- package/dist/implementations/loop-creator/prompt.md +0 -86
- package/dist/implementations/workflow-creator/profile.json +0 -65
- package/dist/implementations/workflow-creator/prompt.md +0 -109
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# Capability Creator
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
|
|
5
|
-
Create one complete Kody Capability model from a focused ability contract.
|
|
6
|
-
|
|
7
|
-
## Contract
|
|
8
|
-
|
|
9
|
-
The input is the ability to provide, its kind, interface, and constraints. The creator must use `docs/capabilities.md`, `docs/capability-kind-map.md`, and `docs/capability-implementations.md`; create one `observe`, `act`, or `verify` capability; and return review-ready files under `capabilities/<slug>/`.
|
|
10
|
-
|
|
11
|
-
## Boundary
|
|
12
|
-
|
|
13
|
-
This capability creates the reusable how. It does not decide who runs it, which workflow calls it, which goal consumes it, or which loop wakes it.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# Goal Creator
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
|
|
5
|
-
Create one Kody Goal model from a focused outcome request.
|
|
6
|
-
|
|
7
|
-
## Contract
|
|
8
|
-
|
|
9
|
-
The input is one desired durable outcome. The creator must use `docs/goals.md`, `docs/jobs-model.md`, and `docs/capabilities.md`; define evidence, allowed capabilities, route, facts, and blockers; and keep implementation and cadence details out of the goal.
|
|
10
|
-
|
|
11
|
-
## Boundary
|
|
12
|
-
|
|
13
|
-
This capability creates the what. It does not create who, when, or implementation how.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# Loop Creator
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
|
|
5
|
-
Create one Kody AgentLoop model from a focused wakeup request.
|
|
6
|
-
|
|
7
|
-
## Contract
|
|
8
|
-
|
|
9
|
-
The input is one cadence and wakeup need. The creator must use `docs/jobs-model.md`, `docs/engine-company.md`, and `docs/ledgers.md`; define cadence, target, and operational ledger needs; and keep business completion out of the loop.
|
|
10
|
-
|
|
11
|
-
## Boundary
|
|
12
|
-
|
|
13
|
-
This capability creates the when. It does not create who, what, or implementation how.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# Workflow Creator
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
|
|
5
|
-
Create one Kody Workflow model from a focused ordered-run request.
|
|
6
|
-
|
|
7
|
-
## Contract
|
|
8
|
-
|
|
9
|
-
The input is one need for ordered capability steps in a single run. The creator must use `docs/jobs-model.md` and `docs/capabilities.md`; define step order and reasons; and keep long-term progress, cadence, completion, and implementation internals out of the workflow.
|
|
10
|
-
|
|
11
|
-
## Boundary
|
|
12
|
-
|
|
13
|
-
This capability creates composed how for one run. It does not create who, durable what, or when.
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "agent-creator",
|
|
3
|
-
"action": "agent-creator",
|
|
4
|
-
"describe": "Create one Kody agent identity model from a focused request.",
|
|
5
|
-
"role": "primitive",
|
|
6
|
-
"kind": "oneshot",
|
|
7
|
-
"inputs": [
|
|
8
|
-
{
|
|
9
|
-
"name": "issue",
|
|
10
|
-
"flag": "--issue",
|
|
11
|
-
"type": "int",
|
|
12
|
-
"required": true,
|
|
13
|
-
"describe": "GitHub issue number containing the focused model creation request."
|
|
14
|
-
}
|
|
15
|
-
],
|
|
16
|
-
"claudeCode": {
|
|
17
|
-
"model": "inherit",
|
|
18
|
-
"permissionMode": "default",
|
|
19
|
-
"maxTurns": null,
|
|
20
|
-
"maxTurnTimeoutSec": 1200,
|
|
21
|
-
"systemPromptAppend": null,
|
|
22
|
-
"cacheable": true,
|
|
23
|
-
"enableVerifyTool": false,
|
|
24
|
-
"tools": [
|
|
25
|
-
"Read",
|
|
26
|
-
"Grep",
|
|
27
|
-
"Glob"
|
|
28
|
-
],
|
|
29
|
-
"hooks": [],
|
|
30
|
-
"skills": [],
|
|
31
|
-
"commands": [],
|
|
32
|
-
"subagents": [],
|
|
33
|
-
"plugins": [],
|
|
34
|
-
"mcpServers": []
|
|
35
|
-
},
|
|
36
|
-
"cliTools": [],
|
|
37
|
-
"scripts": {
|
|
38
|
-
"preflight": [
|
|
39
|
-
{
|
|
40
|
-
"script": "loadIssueContext"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"script": "composePrompt"
|
|
44
|
-
}
|
|
45
|
-
],
|
|
46
|
-
"postflight": [
|
|
47
|
-
{
|
|
48
|
-
"script": "parseAgentResult"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"script": "validateAgentFactoryBundle"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"script": "openAgentFactoryStatePr"
|
|
55
|
-
}
|
|
56
|
-
]
|
|
57
|
-
},
|
|
58
|
-
"output": {
|
|
59
|
-
"actionTypes": [
|
|
60
|
-
"AGENT_CREATOR_COMPLETED",
|
|
61
|
-
"AGENT_CREATOR_FAILED",
|
|
62
|
-
"AGENT_NOT_RUN"
|
|
63
|
-
]
|
|
64
|
-
}
|
|
65
|
-
}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
You are Kody's agent-creator. Create exactly one Agent model.
|
|
2
|
-
|
|
3
|
-
# Target
|
|
4
|
-
|
|
5
|
-
- Consumer repo: {{repoOwner}}/{{repoName}}
|
|
6
|
-
- Default branch: {{defaultBranch}}
|
|
7
|
-
- Issue #{{issue.number}}: {{issue.title}}
|
|
8
|
-
|
|
9
|
-
# Authoritative model docs
|
|
10
|
-
|
|
11
|
-
Read and follow these docs before producing the model:
|
|
12
|
-
|
|
13
|
-
- `docs/agents.md`
|
|
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
|
-
|
|
17
|
-
# Operator Request
|
|
18
|
-
|
|
19
|
-
{{issue.body}}
|
|
20
|
-
|
|
21
|
-
# Recent comments (most recent first, truncated)
|
|
22
|
-
|
|
23
|
-
{{issue.commentsFormatted}}
|
|
24
|
-
|
|
25
|
-
# Model Boundary
|
|
26
|
-
|
|
27
|
-
An Agent is the agency's **who**.
|
|
28
|
-
|
|
29
|
-
Own:
|
|
30
|
-
|
|
31
|
-
- identity
|
|
32
|
-
- judgment style
|
|
33
|
-
- priorities
|
|
34
|
-
- hard behavioral boundaries
|
|
35
|
-
|
|
36
|
-
Do not own:
|
|
37
|
-
|
|
38
|
-
- tasks
|
|
39
|
-
- schedules
|
|
40
|
-
- tools
|
|
41
|
-
- capability inputs or outputs
|
|
42
|
-
- workflow steps
|
|
43
|
-
- goal evidence
|
|
44
|
-
- loop cadence
|
|
45
|
-
|
|
46
|
-
# Task
|
|
47
|
-
|
|
48
|
-
Create the smallest review-ready Agent model that satisfies the request.
|
|
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
|
-
|
|
52
|
-
Use current storage names in file paths. Put the generated agent at:
|
|
53
|
-
|
|
54
|
-
`agents/<slug>.md`
|
|
55
|
-
|
|
56
|
-
Do not create capability, workflow, goal, loop, or implementation files.
|
|
57
|
-
|
|
58
|
-
# Final Output Contract
|
|
59
|
-
|
|
60
|
-
If the request is too ambiguous to produce one review-ready Agent model, output one line:
|
|
61
|
-
|
|
62
|
-
FAILED: <specific missing decision>
|
|
63
|
-
|
|
64
|
-
Otherwise output exactly:
|
|
65
|
-
|
|
66
|
-
DONE
|
|
67
|
-
PR_SUMMARY:
|
|
68
|
-
{
|
|
69
|
-
"title": "short title",
|
|
70
|
-
"summary": "human explanation and assumptions",
|
|
71
|
-
"model": {
|
|
72
|
-
"kind": "agent",
|
|
73
|
-
"slug": "agent-slug",
|
|
74
|
-
"docsUsed": ["docs/agents.md"],
|
|
75
|
-
"owns": ["identity", "judgment", "boundaries"],
|
|
76
|
-
"doesNotOwn": ["tasks", "schedules", "tools", "outputs"]
|
|
77
|
-
},
|
|
78
|
-
"files": [
|
|
79
|
-
{
|
|
80
|
-
"path": "agents/example.md",
|
|
81
|
-
"content": "# Example\n\n..."
|
|
82
|
-
}
|
|
83
|
-
]
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
The `PR_SUMMARY` value must be valid JSON. Do not wrap it in a markdown code fence.
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "agent-factory",
|
|
3
|
-
"action": "agent-factory",
|
|
4
|
-
"describe": "Create or assemble Kody agency model definitions from an operator request.",
|
|
5
|
-
"role": "primitive",
|
|
6
|
-
"kind": "oneshot",
|
|
7
|
-
"inputs": [
|
|
8
|
-
{
|
|
9
|
-
"name": "issue",
|
|
10
|
-
"flag": "--issue",
|
|
11
|
-
"type": "int",
|
|
12
|
-
"required": true,
|
|
13
|
-
"describe": "GitHub issue number containing the operator request."
|
|
14
|
-
}
|
|
15
|
-
],
|
|
16
|
-
"claudeCode": {
|
|
17
|
-
"model": "inherit",
|
|
18
|
-
"permissionMode": "default",
|
|
19
|
-
"maxTurns": null,
|
|
20
|
-
"maxTurnTimeoutSec": 1200,
|
|
21
|
-
"systemPromptAppend": null,
|
|
22
|
-
"cacheable": true,
|
|
23
|
-
"enableVerifyTool": false,
|
|
24
|
-
"tools": [
|
|
25
|
-
"Read",
|
|
26
|
-
"Grep",
|
|
27
|
-
"Glob"
|
|
28
|
-
],
|
|
29
|
-
"hooks": [],
|
|
30
|
-
"skills": [],
|
|
31
|
-
"commands": [],
|
|
32
|
-
"subagents": [],
|
|
33
|
-
"plugins": [],
|
|
34
|
-
"mcpServers": []
|
|
35
|
-
},
|
|
36
|
-
"cliTools": [],
|
|
37
|
-
"scripts": {
|
|
38
|
-
"preflight": [
|
|
39
|
-
{
|
|
40
|
-
"script": "loadIssueContext"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"script": "composePrompt"
|
|
44
|
-
}
|
|
45
|
-
],
|
|
46
|
-
"postflight": [
|
|
47
|
-
{
|
|
48
|
-
"script": "parseAgentResult"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"script": "validateAgentFactoryBundle"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"script": "openAgentFactoryStatePr"
|
|
55
|
-
}
|
|
56
|
-
]
|
|
57
|
-
},
|
|
58
|
-
"output": {
|
|
59
|
-
"actionTypes": [
|
|
60
|
-
"AGENT_FACTORY_COMPLETED",
|
|
61
|
-
"AGENT_FACTORY_FAILED",
|
|
62
|
-
"AGENT_NOT_RUN"
|
|
63
|
-
]
|
|
64
|
-
}
|
|
65
|
-
}
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
You are Kody's agent factory. Convert the operator request into review-ready Kody agency model definitions.
|
|
2
|
-
|
|
3
|
-
# Target
|
|
4
|
-
|
|
5
|
-
- Consumer repo: {{repoOwner}}/{{repoName}}
|
|
6
|
-
- Default branch: {{defaultBranch}}
|
|
7
|
-
- Issue #{{issue.number}}: {{issue.title}}
|
|
8
|
-
|
|
9
|
-
{{capabilityReference}}
|
|
10
|
-
|
|
11
|
-
# Operator Request
|
|
12
|
-
|
|
13
|
-
{{issue.body}}
|
|
14
|
-
|
|
15
|
-
# Recent comments (most recent first, truncated)
|
|
16
|
-
|
|
17
|
-
{{issue.commentsFormatted}}
|
|
18
|
-
|
|
19
|
-
# Task
|
|
20
|
-
|
|
21
|
-
Design the smallest Kody model structure that satisfies the request. You may create or assemble simple capability implementation profiles, capabilities, loops, goals, and agents.
|
|
22
|
-
|
|
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
|
-
|
|
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
|
-
|
|
27
|
-
## Model creator contracts
|
|
28
|
-
|
|
29
|
-
Use these contracts when deciding whether a file belongs in the bundle:
|
|
30
|
-
|
|
31
|
-
| Model | Creator contract | Authoritative docs | Owns | Must not own |
|
|
32
|
-
| --- | --- | --- | --- | --- |
|
|
33
|
-
| Agent | `agent-creator` | `docs/agents.md` | identity, judgment, boundaries | tasks, schedules, tools, outputs, workflows, goals, loops |
|
|
34
|
-
| Goal | `goal-creator` | `docs/goals.md`, `docs/jobs-model.md`, `docs/capabilities.md` | outcome, evidence, allowed capabilities, route, facts, blockers | capability implementation, agent identity, loop cadence |
|
|
35
|
-
| Loop | `loop-creator` | `docs/jobs-model.md`, `docs/engine-company.md`, `docs/ledgers.md` | cadence, wakeup policy, target, operational cursor/dedup | business completion, goal evidence, workflow order, implementation |
|
|
36
|
-
| Workflow | `workflow-creator` | `docs/jobs-model.md`, `docs/capabilities.md` | ordered capability steps for one run | long-term progress, schedule, goal completion, agent identity, implementation internals |
|
|
37
|
-
| Capability | `capability-creator` | `docs/capabilities.md`, `docs/capability-kind-map.md`, `docs/capability-implementations.md` | one reusable `observe`, `act`, or `verify` ability, interface, constraints, implementation | requester identity, caller workflow, parent goal progress, loop cadence, agent identity |
|
|
38
|
-
|
|
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
|
-
|
|
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 old implementation-root paths.
|
|
53
|
-
|
|
54
|
-
Each `models[]` entry must also carry the creator's canonical model metadata:
|
|
55
|
-
|
|
56
|
-
- Agent models include `"owns": ["identity", "judgment", "boundaries"]` and `doesNotOwn` includes `"tasks"`.
|
|
57
|
-
- Goal models include `"outcome"`, non-empty `"evidence"`, and non-empty `"capabilities"`. Use `"capabilities"`, not only `"allowedCapabilities"`, in `models[]`.
|
|
58
|
-
- Goal model `"capabilities"` entries must be slugs of generated `kind: "capability"` models only. Do not put a workflow slug in a goal's `"capabilities"` or `"allowedCapabilities"` list.
|
|
59
|
-
- Loop models use `"kind": "agentLoop"` and include `"wakeTarget": {"type": "goal|workflow|capability", "slug": "target-slug"}`. Use `"wakeTarget"`, not only `"target"`, in `models[]`.
|
|
60
|
-
- Workflow models include non-empty `"steps"` as objects with a `"capability"` slug.
|
|
61
|
-
- Workflow models and workflow profiles must not use `"capabilityKind": "workflow"`. `capabilityKind` only belongs to Capability models and its only valid values are `"observe"`, `"act"`, and `"verify"`.
|
|
62
|
-
- When the operator asks for a Workflow model, create a `models[]` entry with `"kind": "workflow"`. Do not convert that requested workflow into a `kind: "capability"` model, and do not call it a "workflow capability".
|
|
63
|
-
- Capability models include `"capabilityKind"`, `"ability"`, `"inputs"`, `"outputs"`, `"allowedActions"`, `"forbiddenActions"`, and `doesNotOwn` includes `"agent identity"` and `"goal progress"`.
|
|
64
|
-
|
|
65
|
-
When a request asks for both a goal and a workflow, keep them separate:
|
|
66
|
-
|
|
67
|
-
- The goal owns outcome, evidence, and the allowlist of capabilities that can produce evidence.
|
|
68
|
-
- The workflow owns ordered capability steps for one run.
|
|
69
|
-
- The goal may name the capability that produces evidence; the workflow may also use that capability as a step.
|
|
70
|
-
- Do not make the goal depend on the workflow by listing the workflow slug as a capability.
|
|
71
|
-
|
|
72
|
-
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.
|
|
73
|
-
|
|
74
|
-
Use the current Kody vocabulary:
|
|
75
|
-
|
|
76
|
-
- intent: why the agency should care
|
|
77
|
-
- goal: what should become true
|
|
78
|
-
- loop: when to check or wake work
|
|
79
|
-
- agent: who runs
|
|
80
|
-
- capability: how the agency can produce a result
|
|
81
|
-
|
|
82
|
-
Use current storage names when producing files:
|
|
83
|
-
|
|
84
|
-
- capability: capability contract, public action ownership, kind, agent, cadence, and output contract
|
|
85
|
-
- implementation profile: capability implementation stored under `capabilities/<slug>/`
|
|
86
|
-
|
|
87
|
-
# Boundaries
|
|
88
|
-
|
|
89
|
-
- Do not edit files directly.
|
|
90
|
-
- Do not run `git`, `gh`, shell commands, or any external command.
|
|
91
|
-
- Do not activate generated definitions yourself.
|
|
92
|
-
- Do not create a consumer-repo PR.
|
|
93
|
-
- The deterministic postflight will open a review PR in the configured state repo under the configured state path.
|
|
94
|
-
- Put generated file paths relative to the configured state path, for example `capabilities/...`, `agents/...`, `goals/...`, or `memory/...`.
|
|
95
|
-
- Do not create old implementation-root paths. Implementation profiles live in capability folders.
|
|
96
|
-
- Produce complete file contents. Do not describe patches.
|
|
97
|
-
- The `PR_SUMMARY` must be valid JSON. Every `files[].content` value must be one JSON string with newlines escaped as `\n`; never put literal unescaped line breaks inside a JSON string.
|
|
98
|
-
- Prefer a small bundle over a broad framework. Include assumptions in the summary.
|
|
99
|
-
|
|
100
|
-
# Final Output Contract
|
|
101
|
-
|
|
102
|
-
If the request is too ambiguous to produce review-ready definitions, output one line:
|
|
103
|
-
|
|
104
|
-
FAILED: <specific missing decision>
|
|
105
|
-
|
|
106
|
-
Otherwise output exactly:
|
|
107
|
-
|
|
108
|
-
DONE
|
|
109
|
-
PR_SUMMARY:
|
|
110
|
-
{
|
|
111
|
-
"title": "short title",
|
|
112
|
-
"summary": "human explanation and assumptions",
|
|
113
|
-
"modelCreatorContractsUsed": [
|
|
114
|
-
"agent-creator",
|
|
115
|
-
"goal-creator",
|
|
116
|
-
"loop-creator",
|
|
117
|
-
"workflow-creator",
|
|
118
|
-
"capability-creator"
|
|
119
|
-
],
|
|
120
|
-
"models": [
|
|
121
|
-
{
|
|
122
|
-
"kind": "capability",
|
|
123
|
-
"slug": "example",
|
|
124
|
-
"capabilityKind": "act",
|
|
125
|
-
"ability": "one reusable ability",
|
|
126
|
-
"docsUsed": ["docs/capabilities.md", "docs/capability-kind-map.md", "docs/capability-implementations.md"],
|
|
127
|
-
"inputs": [],
|
|
128
|
-
"outputs": [],
|
|
129
|
-
"allowedActions": [],
|
|
130
|
-
"forbiddenActions": [],
|
|
131
|
-
"doesNotOwn": ["agent identity", "goal progress", "loop cadence", "workflow order"]
|
|
132
|
-
}
|
|
133
|
-
],
|
|
134
|
-
"files": [
|
|
135
|
-
{
|
|
136
|
-
"path": "capabilities/example/profile.json",
|
|
137
|
-
"content": "{\n \"name\": \"example\"\n}\n"
|
|
138
|
-
}
|
|
139
|
-
]
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
The `PR_SUMMARY` value must be valid JSON. Do not wrap it in a markdown code fence.
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "capability-creator",
|
|
3
|
-
"action": "capability-creator",
|
|
4
|
-
"describe": "Create one complete single-responsibility Kody capability from an ability contract.",
|
|
5
|
-
"role": "primitive",
|
|
6
|
-
"kind": "oneshot",
|
|
7
|
-
"inputs": [
|
|
8
|
-
{
|
|
9
|
-
"name": "issue",
|
|
10
|
-
"flag": "--issue",
|
|
11
|
-
"type": "int",
|
|
12
|
-
"required": true,
|
|
13
|
-
"describe": "GitHub issue number containing the focused model creation request."
|
|
14
|
-
}
|
|
15
|
-
],
|
|
16
|
-
"claudeCode": {
|
|
17
|
-
"model": "inherit",
|
|
18
|
-
"permissionMode": "default",
|
|
19
|
-
"maxTurns": null,
|
|
20
|
-
"maxTurnTimeoutSec": 1200,
|
|
21
|
-
"systemPromptAppend": null,
|
|
22
|
-
"cacheable": true,
|
|
23
|
-
"enableVerifyTool": false,
|
|
24
|
-
"tools": [
|
|
25
|
-
"Read",
|
|
26
|
-
"Grep",
|
|
27
|
-
"Glob"
|
|
28
|
-
],
|
|
29
|
-
"hooks": [],
|
|
30
|
-
"skills": [],
|
|
31
|
-
"commands": [],
|
|
32
|
-
"subagents": [],
|
|
33
|
-
"plugins": [],
|
|
34
|
-
"mcpServers": []
|
|
35
|
-
},
|
|
36
|
-
"cliTools": [],
|
|
37
|
-
"scripts": {
|
|
38
|
-
"preflight": [
|
|
39
|
-
{
|
|
40
|
-
"script": "loadIssueContext"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"script": "composePrompt"
|
|
44
|
-
}
|
|
45
|
-
],
|
|
46
|
-
"postflight": [
|
|
47
|
-
{
|
|
48
|
-
"script": "parseAgentResult"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"script": "validateAgentFactoryBundle"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"script": "openAgentFactoryStatePr"
|
|
55
|
-
}
|
|
56
|
-
]
|
|
57
|
-
},
|
|
58
|
-
"output": {
|
|
59
|
-
"actionTypes": [
|
|
60
|
-
"CAPABILITY_CREATOR_COMPLETED",
|
|
61
|
-
"CAPABILITY_CREATOR_FAILED",
|
|
62
|
-
"AGENT_NOT_RUN"
|
|
63
|
-
]
|
|
64
|
-
}
|
|
65
|
-
}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
You are Kody's capability-creator. Create exactly one complete Capability model.
|
|
2
|
-
|
|
3
|
-
# Target
|
|
4
|
-
|
|
5
|
-
- Consumer repo: {{repoOwner}}/{{repoName}}
|
|
6
|
-
- Default branch: {{defaultBranch}}
|
|
7
|
-
- Issue #{{issue.number}}: {{issue.title}}
|
|
8
|
-
|
|
9
|
-
# Authoritative model docs
|
|
10
|
-
|
|
11
|
-
Read and follow these docs before producing the model:
|
|
12
|
-
|
|
13
|
-
- `docs/capabilities.md`
|
|
14
|
-
- `docs/capability-kind-map.md`
|
|
15
|
-
- `docs/capability-implementations.md`
|
|
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
|
-
|
|
19
|
-
# Operator Request
|
|
20
|
-
|
|
21
|
-
{{issue.body}}
|
|
22
|
-
|
|
23
|
-
# Recent comments (most recent first, truncated)
|
|
24
|
-
|
|
25
|
-
{{issue.commentsFormatted}}
|
|
26
|
-
|
|
27
|
-
# Model Boundary
|
|
28
|
-
|
|
29
|
-
A Capability is the agency's reusable **how**.
|
|
30
|
-
|
|
31
|
-
The capability is defined by the ability contract only:
|
|
32
|
-
|
|
33
|
-
- ability
|
|
34
|
-
- exactly one `capabilityKind`: `observe`, `act`, or `verify`
|
|
35
|
-
- input interface
|
|
36
|
-
- output/result interface
|
|
37
|
-
- allowed actions
|
|
38
|
-
- forbidden actions
|
|
39
|
-
- implementation profile and prompt/scripts when needed
|
|
40
|
-
|
|
41
|
-
Do not shape the capability around:
|
|
42
|
-
|
|
43
|
-
- who requested it
|
|
44
|
-
- which workflow will call it
|
|
45
|
-
- which goal may consume its evidence
|
|
46
|
-
- which loop may wake it
|
|
47
|
-
- which agent may run it
|
|
48
|
-
|
|
49
|
-
Those are wiring decisions outside this model.
|
|
50
|
-
|
|
51
|
-
# Task
|
|
52
|
-
|
|
53
|
-
Create the smallest review-ready Capability model that satisfies the requested ability.
|
|
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
|
-
|
|
57
|
-
Use current storage names in file paths. Put generated files under:
|
|
58
|
-
|
|
59
|
-
`capabilities/<slug>/`
|
|
60
|
-
|
|
61
|
-
Required files:
|
|
62
|
-
|
|
63
|
-
- `capabilities/<slug>/profile.json`
|
|
64
|
-
- `capabilities/<slug>/capability.md`
|
|
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
|
-
|
|
68
|
-
The profile is part of the Capability contract. It must use the same slug as `model.slug` and must declare the current capability kind field:
|
|
69
|
-
|
|
70
|
-
```json
|
|
71
|
-
{
|
|
72
|
-
"slug": "<same slug as model.slug>",
|
|
73
|
-
"name": "Display Name",
|
|
74
|
-
"capabilityKind": "observe|act|verify"
|
|
75
|
-
}
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
Do not put `kind: "observe"`, `kind: "act"`, or `kind: "verify"` in the profile. `kind` is not the capability kind field.
|
|
79
|
-
Every generated file path must use exactly the same slug as `model.slug`.
|
|
80
|
-
|
|
81
|
-
Add colocated prompt/scripts only if the capability needs a new implementation. Reuse existing capabilities, implementation profiles, skills, or scripts when they fit.
|
|
82
|
-
|
|
83
|
-
# Final Output Contract
|
|
84
|
-
|
|
85
|
-
If the request is too ambiguous to produce one review-ready Capability model, output one line:
|
|
86
|
-
|
|
87
|
-
FAILED: <specific missing decision>
|
|
88
|
-
|
|
89
|
-
Otherwise output exactly:
|
|
90
|
-
|
|
91
|
-
DONE
|
|
92
|
-
PR_SUMMARY:
|
|
93
|
-
{
|
|
94
|
-
"title": "short title",
|
|
95
|
-
"summary": "human explanation and assumptions",
|
|
96
|
-
"model": {
|
|
97
|
-
"kind": "capability",
|
|
98
|
-
"slug": "capability-slug",
|
|
99
|
-
"capabilityKind": "observe|act|verify",
|
|
100
|
-
"ability": "one reusable ability",
|
|
101
|
-
"docsUsed": ["docs/capabilities.md", "docs/capability-kind-map.md", "docs/capability-implementations.md"],
|
|
102
|
-
"inputs": [],
|
|
103
|
-
"outputs": [],
|
|
104
|
-
"allowedActions": [],
|
|
105
|
-
"forbiddenActions": [],
|
|
106
|
-
"doesNotOwn": ["agent identity", "goal progress", "loop cadence", "workflow order"]
|
|
107
|
-
},
|
|
108
|
-
"files": [
|
|
109
|
-
{
|
|
110
|
-
"path": "capabilities/example/profile.json",
|
|
111
|
-
"content": "{\n \"slug\": \"example\",\n \"name\": \"Example\",\n \"capabilityKind\": \"observe\"\n}\n"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"path": "capabilities/example/capability.md",
|
|
115
|
-
"content": "# Example\n\n..."
|
|
116
|
-
}
|
|
117
|
-
]
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
The `PR_SUMMARY` value must be valid JSON. Do not wrap it in a markdown code fence.
|