fix(workflow,kernel): split plan stage 'produces' (slot name) from 'kind' (artifact kind)
ExecutionPlanCompiler treated the plan's single 'produces' string as a
registry kind id, while the architect prompt described it as a unique
artifact id referenced by needs/edges — the model followed the prompt,
invented descriptive ids (files_created), and every freestyle plan
failed to compile. Collapsing both onto one string is also unsound:
two stages producing the same kind would collide on slot name and make
artifact_validated edge conditions ambiguous.
Plan stages now carry an optional 'kind' selecting the registered kind
(mirroring TOML's produces = { name, kind }); 'produces' stays the
unique slot name. Missing 'kind' falls back to the old produces-as-kind
reading so existing plans still compile. Vocabulary entry, architect
prompt, and execution_plan schemas updated to match.
This commit is contained in:
@@ -24,7 +24,8 @@ Emit a JSON object that validates against the `execution_plan` schema:
|
||||
"id": "<short_snake_case_id>",
|
||||
"role": "<role name, e.g. implementer>",
|
||||
"prompt": "<the full prompt that stage will execute>",
|
||||
"produces": "<artifact_id this stage emits>",
|
||||
"produces": "<unique artifact_id this stage emits, your choice of name>",
|
||||
"kind": "<one of the available artifact kinds listed in your context>",
|
||||
"needs": ["<artifact_id consumed from an earlier stage>"],
|
||||
"tools": ["file_read", "file_write", "file_edit", "ShellTool"]
|
||||
}
|
||||
@@ -48,8 +49,12 @@ Emit a JSON object that validates against the `execution_plan` schema:
|
||||
|
||||
**stages** — ordered list; each stage must:
|
||||
- Have a unique `id` in `snake_case`.
|
||||
- Declare `produces`: the artifact id this stage emits. Artifact ids must be declared in
|
||||
your config's `[[artifacts]]` table.
|
||||
- Declare `produces`: the artifact id this stage emits. Pick a unique descriptive
|
||||
`snake_case` name; this is how `needs` and edge conditions reference the artifact.
|
||||
- Declare `kind`: the artifact kind, exactly one id from the "Available artifact kinds"
|
||||
list in your context. Stages that write or edit files use `file_written`; stages that
|
||||
run commands use `process_result`; stages whose output is structured JSON use an
|
||||
llm-emitted kind.
|
||||
- Declare `needs`: every upstream artifact id the stage's prompt references. Every id in
|
||||
`needs` must be `produces`d by a strictly earlier stage.
|
||||
- Include `tools` only for stages that write or edit files:
|
||||
|
||||
Reference in New Issue
Block a user