Part of making FlowSpec the universal spec substrate for the A(i)-Team execution stage (theaiteam-dev/the-ai-team-plugin#51, PRD 010): one immutable steps/expect grammar, per-surface adapters. Web exists (agent-browser); CLI adapter has its own issue. This issue: Conduit-flow surface.
Context
Conduit flows are already fixture-driven (e.g. nitpick-flow runs against seeded cards; example flows run against duckdb fixtures). What's missing is a declarative, agent-immutable statement of what a green run means — today that definition lives in mutable test code, which is exactly the "agent fixes the test instead of the bug" hole FlowSpec exists to close.
Sketch
name: review-fanout-produces-findings
description: Seeded PR card fans out reviewers and coordinator emits a verdict
surface: conduit
steps:
- seed: fixtures/sample-pr-card.json
- run_flow: flow.yaml
expect:
- card_field: {path: "$.verdict", in: ["approve", "reject", "rework"]}
- file_exists: "{owned_dir}/findings.json"
- json_file: {path: "{owned_dir}/coverage.json", field: "$.dnf_children", equals: 0}
- station_completed: coordinate
- no_station_failed: true
Proposed verbs / assertions
| Steps |
Assertions |
seed: <fixture card path> |
card_field: {path, equals/in/matches} |
run_flow: <flow.yaml> (kernel invocation) |
file_exists: / json_file: {path, field, equals} (owned-dir aware) |
env: {KEY: val} |
station_completed: <name> / no_station_failed |
budget: {max_tokens} optional guard |
coverage: {dnf_children: 0} sugar |
Design notes
- Adapter shells out to the Conduit kernel (
conduit run flow.yaml against the seeded card) and reads the run's output dirs/journal — no new orchestration, just declarative assertions over what the kernel already emits.
{owned_dir} templating resolves per-run output scoping (conduit-harness #92 conventions).
- Nondeterminism: LLM-station outputs assert on shape/schema/enums, not exact text — the grammar should encourage
matches/in/schema-ish checks for transform stations and exact checks for deterministic stations.
- Same immutability hook:
specs/ protected, so flow behavior contracts can't be quietly loosened by the agents building the stations.
Why
Gives conduit-surface repos (conduit-harness, nitpick-flow, arcane/autocut flows) the same graduation path as web: DoD → protected spec → CI, feeding the earned-auto-merge ladder in PRD 010.
Part of making FlowSpec the universal spec substrate for the A(i)-Team execution stage (theaiteam-dev/the-ai-team-plugin#51, PRD 010): one immutable
steps/expectgrammar, per-surface adapters. Web exists (agent-browser); CLI adapter has its own issue. This issue: Conduit-flow surface.Context
Conduit flows are already fixture-driven (e.g. nitpick-flow runs against seeded cards; example flows run against duckdb fixtures). What's missing is a declarative, agent-immutable statement of what a green run means — today that definition lives in mutable test code, which is exactly the "agent fixes the test instead of the bug" hole FlowSpec exists to close.
Sketch
Proposed verbs / assertions
seed: <fixture card path>card_field: {path, equals/in/matches}run_flow: <flow.yaml>(kernel invocation)file_exists:/json_file: {path, field, equals}(owned-dir aware)env: {KEY: val}station_completed: <name>/no_station_failedbudget: {max_tokens}optional guardcoverage: {dnf_children: 0}sugarDesign notes
conduit run flow.yamlagainst the seeded card) and reads the run's output dirs/journal — no new orchestration, just declarative assertions over what the kernel already emits.{owned_dir}templating resolves per-run output scoping (conduit-harness #92 conventions).matches/in/schema-ish checks for transform stations and exact checks for deterministic stations.specs/protected, so flow behavior contracts can't be quietly loosened by the agents building the stations.Why
Gives conduit-surface repos (conduit-harness, nitpick-flow, arcane/autocut flows) the same graduation path as web: DoD → protected spec → CI, feeding the earned-auto-merge ladder in PRD 010.