generated from coulomb/repo-seed
85 lines
2.7 KiB
Markdown
85 lines
2.7 KiB
Markdown
# Workflow Generation Pipeline
|
|
|
|
`infospace-bench` replaces the old `markitect infospace process` concept with
|
|
explicit workflow declarations in `infospace.yaml`.
|
|
|
|
The boundary is intentionally narrow:
|
|
|
|
- `infospace-bench` owns concrete workflow declarations, source artifact
|
|
selection, generated artifact provenance, run records, and CLI behavior.
|
|
- `markitect-tool` owns deterministic Markdown rendering and parsing. The
|
|
workflow layer calls it only through `infospace_bench.markdown_adapter`.
|
|
- Assisted generation is represented as provider-neutral requests. Actual
|
|
model/provider calls must arrive through an explicit adapter, not through the
|
|
workflow definition itself.
|
|
|
|
## Declaration Shape
|
|
|
|
```yaml
|
|
workflows:
|
|
- id: source-summary
|
|
description: Render deterministic summaries for source artifacts.
|
|
inputs:
|
|
source:
|
|
kind: source
|
|
static_macros:
|
|
discipline: Viable System Model
|
|
stages:
|
|
- id: render-summary
|
|
kind: template
|
|
input: source
|
|
template: workflows/templates/summary.md
|
|
output:
|
|
path: artifacts/generated/{{ input.slug }}-summary.md
|
|
artifact_id: generated/{{ input.slug }}-summary.md
|
|
kind: generated
|
|
title: "{{ input.title }} Summary"
|
|
expected_evaluations:
|
|
- metrics
|
|
```
|
|
|
|
Workflow template files use the `markitect-tool` `{{ variable.path }}` template
|
|
syntax. Current deterministic stage data includes:
|
|
|
|
- `input`: selected artifact metadata and content
|
|
- `macros`: workflow-level plus stage-level static macros
|
|
- `workflow`: the workflow declaration
|
|
- `stage`: the current stage declaration
|
|
- `stages`: previous deterministic stage outputs, keyed by stage ID
|
|
|
|
## Deterministic Runs
|
|
|
|
`kind: template` stages render Markdown and write generated artifacts. Each
|
|
generated artifact is registered in `artifacts/index.yaml` with provenance:
|
|
|
|
- `workflow_id`
|
|
- `stage_id`
|
|
- `input_artifact_id`
|
|
|
|
Runs write trace records under:
|
|
|
|
```text
|
|
output/workflows/runs/<run-id>.yaml
|
|
```
|
|
|
|
These records are file-backed evidence for later `kontextual-engine` integration
|
|
without making this repo a workflow engine.
|
|
|
|
## Assisted Boundary
|
|
|
|
`kind: assisted` stages render a provider-neutral prompt request during planning.
|
|
Running an assisted stage requires an explicit `AssistedGenerationAdapter`.
|
|
Without one, the runner raises `assisted_stage_requires_adapter`, which keeps
|
|
provider behavior optional, auditable, and outside the application workflow
|
|
declaration.
|
|
|
|
## CLI
|
|
|
|
```bash
|
|
python3 -m infospace_bench workflow inspect infospaces/bootstrap-pilot
|
|
python3 -m infospace_bench workflow plan infospaces/bootstrap-pilot source-summary
|
|
python3 -m infospace_bench workflow run infospaces/bootstrap-pilot source-summary
|
|
```
|
|
|
|
All commands emit JSON for scripted migration and parity checks.
|