workflow_registry.rs had zero call sites -- lib.rs declared the module and
nothing ever called load() or get(). So templates/workflows/*.toml was never
read, and because the client's TEMPLATE_PRESETS carries only {kind, order_idx}
with no config, PhaseSpec.config defaulted to Value::Null and every
wizard-created mission stored a null mission_phases.config.
Every per-phase setting was therefore inert. `loop = "until_no_more_int_items"`
and `commit_policy = "on_green_tests"` described a scheduler that does not
exist AND had no path to the database. benchmark_runner and security_scan
already read phase_config(); they were reading from null.
- Mission create derives phases from the recipe when none are sent, and
backfills config per phase (matched on kind+order_idx, then kind) when the
caller sends shape without config. An explicit config always wins.
- phases_for_create takes Option<&WorkflowRecipe> rather than reaching for the
global, because the registry resolves its directory relative to the process
cwd -- which under cargo test is the crate root, not the repo root.
- GET /api/workflows serves the catalog; the wizard fetches it and falls back
to TEMPLATE_PRESETS. Adding a TOML now adds a template with no FE change.
- load() runs at boot so a malformed recipe appears in the boot log instead of
silently producing a mission with no phase config.
Also fixes a latent bug in all five recipes: `default_team_template` was
written below the first [[phases]] block, and TOML scopes a bare key after a
table header INTO that table -- so it parsed as
phases[last].config.default_team_template and the real field was always None.
Invisible while the registry was dead code. Moved above the phases, with a
test asserting it neither returns None nor leaks into a phase config.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
30 lines
1.1 KiB
TOML
30 lines
1.1 KiB
TOML
key = "research_and_code"
|
|
title = "Research + Coding Loop"
|
|
blurb = "Research a topic against a repo, then loop the coding team through the produced INT-XX items until done."
|
|
requires_repo = true
|
|
|
|
default_team_template = "rust_sdlc"
|
|
|
|
[[phases]]
|
|
kind = "research"
|
|
order_idx = 0
|
|
[phases.config]
|
|
produces = ["md", "pdf"]
|
|
default_topology = "hub_spoke"
|
|
|
|
[[phases]]
|
|
kind = "coding"
|
|
order_idx = 1
|
|
[phases.config]
|
|
# Loop policy: keep iterating until the artifact yields no more
|
|
# unconsumed INT-XX items. Scheduler stops when `consumed_int_ids`
|
|
# equals the artifact's declared set.
|
|
loop = "until_no_more_int_items"
|
|
# Preamble injected at the head of each iteration's task text so
|
|
# the agents know where the repo lives + how to commit. Covered by
|
|
# Slice 3.5c's `workspace-repo-commit-protocol` skill.
|
|
# Only commit when tests pass. Enforced by the team's TEST_PASS
|
|
# marker before the committer runs. If a coding role wants to bypass
|
|
# (rare — pure docs commit), it emits COMMIT_POLICY_OVERRIDE: <reason>.
|
|
commit_policy = "on_green_tests"
|