Skip to content

Workflow — Generate a product

Generated from the architecture model

This page is rendered from model/**/*.yaml by tools/docs_model during mkdocs build. Edit the YAML, not this page; hand-written design lives on the linked service, platform and plane pages.

Workflow id generate-product · version 1 · Draft (Draft → InReview → Published → Deprecated, BC-04)
Coordinator microservice-assembly-coordinator · family Blueprint & Microservice Assembly
Owner service WorkflowEngineService (BC-38) under Run Control (BC-03)
Starts on RecipeApproved from GenerationRecipeService (event)
Steps 10 · gated 1 · agents 4
Budget per run 2000000 tokens · cap 200.0 USD · 480 min
Descriptor workflow-definition-v1 · schema
Status target

Executes an approved generation recipe: scaffolds every module from its template in the sandbox, fills backend, frontend and database from the domain model, validates by build and test, records the outputs with provenance and proposes the change set under approval.

Authored design, Draft (D54, D57)

These definitions were authored on 2026-10-14 from the coordinator cards as design assumptions. None is published, evaluated or has run; agents are named by id as design bindings, not as tested integrations.

Definition

flowchart TD
    start(("RecipeApproved"))
    scaffold_modules["Scaffold the modules"]
    fan_out_fill[/"Fill in parallel"/]
    fill_backend["Fill the backend"]
    fill_frontend["Fill the frontend"]
    fill_database["Fill the database"]
    join_fill[/"Join"/]
    build_and_test[["tool: Build and test"]]
    record_outputs["Record the outputs"]
    approve_proposal(["Approve the change proposal"])
    propose_change_set[["tool: Propose the change set"]]
    start --> scaffold_modules
    scaffold_modules --> fan_out_fill
    fan_out_fill --> fill_backend
    fan_out_fill --> fill_frontend
    fan_out_fill --> fill_database
    fill_backend --> join_fill
    fill_frontend --> join_fill
    fill_database --> join_fill
    join_fill --> build_and_test
    build_and_test --> record_outputs
    record_outputs --> approve_proposal
    approve_proposal --> propose_change_set
    done(("WorkflowRunCompleted"))
    propose_change_set --> done
    class approve_proposal gated
    classDef gated stroke:#B45309,stroke-width:2px
Hold "Alt" / "Option" to enable pan & zoom

Shapes: rectangle = agent attempt · double rectangle = tool call · stadium = human decision · diamond = condition evaluated by the engine · parallelogram = fan-out or join · circle = timer · cylinder = sub-workflow · flag = compensation. A thick amber border marks a gated step.

Steps

# Step Kind Runs Gate Class Depends on Retry Timeout Compensation What it does
1 Scaffold the modules
scaffold-modules
agent microservice-generator none sandbox — exponential ×2 PT30M — Runs the templates named by the recipe in the sandbox, one module at a time, with the recipe's parameters.
2 Fill in parallel
fan-out-fill
parallel engine none sandbox scaffold-modules none PT1M — Backend, frontend and database work proceed in parallel on the scaffold.
3 Fill the backend
fill-backend
agent backend-developer none sandbox fan-out-fill exponential ×2 PT30M — Handlers, DTOs, validation, authorization and tenant enforcement from the domain model.
4 Fill the frontend
fill-frontend
agent frontend-developer none sandbox fan-out-fill exponential ×2 PT30M — Screens, components and clients from the UX Blueprint and the API contracts.
5 Fill the database
fill-database
agent database-engineer none sandbox fan-out-fill exponential ×2 PT30M — Mappings, migrations and seeds from the domain model and the Database Blueprint.
6 Join
join-fill
parallel engine none sandbox fill-backend, fill-frontend, fill-database none PT1M — Waits for the three branches.
7 Build and test
build-and-test
tool build-and-test none sandbox join-fill fixed ×2 PT45M — Compiles and runs the generated tests in the sandbox; a failure returns to the branches up to twice with the results.
8 Record the outputs
record-outputs
agent microservice-generator none sandbox build-and-test exponential ×2 PT30M — Records every generated output with its template version, recipe version and content hash through GenerationRecipeService.
9 Approve the change proposal
approve-proposal
human engine approval shared-write record-outputs none P7D — Approval of the exact change set before it reaches the system of record.
10 Propose the change set
propose-change-set
tool propose-change-set none shared-write approve-proposal fixed ×1 PT30M withdraw the proposal; the sandbox outputs stay recorded Opens the pull request with the change set, the provenance and the validation results attached.

Gates and approvals

  • shared-write: the change proposal in the system of record, bound to the exact change-set version (D21); skipped when the project policy allows autonomous proposals Compensation steps run in reverse order of the succeeded steps on failure after the last checkpoint; a step without a compensation leaves its sandbox output in place and the run ends Failed with the evidence (ADR-0014, recovery not replay).

Inputs, outputs and events

Direction Name Descriptor
in recipe artifact-v1
in manifests artifact-v1
in module-blueprints blueprint-module-v1
out generated-outputs change-set-v1
out change-proposal pull-request-proposal-v1

Starts on RecipeApproved; emits GeneratedOutputRecorded, GenerationCompleted, ChangeProposalOpened, plus the engine's WorkflowRunStarted, StepReady, StepRunStateChanged and WorkflowRunCompleted / WorkflowRunFailed and Run Control's run and attempt events (ADR-0014).

Decisions and traceability

FR: FR-05 Governed tool boundary · FR-06 Exact-version approvals · FR-08 Validated artifacts with lineage · FR-11 Compatible templates and libraries through release gatesXL: XL-09 Generation yields a usable consumer · XL-10 Controlled repository changeFUX: FUX-05 Exact-version human decisions · FUX-06 Source-backed artifactsADRs: ADR-0014, ADR-0024 · ADR index

Definition authored 2026-10-14 from the coordinator card microservice-assembly-coordinator (D54); Draft until an evaluation gate (ADR-0021) and a review publish it as a BC-04 asset release.