AIFACTORY-FEAT-108: Workflow definition: Architecture decomposition¶
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.
A design artefact, not a tracker
This backlog is generated from model/backlog/ and validated against the architecture model. No work item exists in any tracker, and no item carries a date, an estimate or an assignee (ADR-0029).
Epic Factory assets: workflow definitions, agents and skills · Increment I1 Generate a microservice · State elaborated · Route solution-architect · Build order 86 of 185 (Factory code)
The workflow definition architecture-decomposition as a published asset: Decomposes a validated Vision Blueprint into bounded contexts and modules with their domain models, producing the Service Blueprint from which BlueprintService derives the context map. It has 6 steps, names the agents domain-modeler, enterprise-architect and the tools blueprint-submit-version, blueprint-validate, and is executed by WorkflowEngineService under Run Control.
| Delivers | — |
| Stubs | — |
| Realizes | workflows: architecture-decomposition adrs: ADR-0014, ADR-0024, ADR-0026 |
| Requirements | FR-08, FR-11, FUX-11, XL-09 |
| Depends on | — |
| Sources | model/workflows/architecture-decomposition.yaml |
Scenarios to trace (7, catalog): SCN-architecture-decomposition-001 ✓, SCN-architecture-decomposition-002 ✓, SCN-architecture-decomposition-003 ✓, SCN-architecture-decomposition-004 ✓, SCN-architecture-decomposition-005 ✓, SCN-architecture-decomposition-006 ✓, SCN-architecture-decomposition-007 ✓
AIFACTORY-US-074: The Architecture decomposition workflow runs from its published definition¶
behavior · persona requester
As a requester, I want the architecture decomposition workflow to run from its published definition with the agents, tools and gates it declares, so that service-blueprint, validation-receipt are produced the same way on every run, with evidence.
The integration PBI of the definition architecture-decomposition. The run is never submitted by a person: when BlueprintService publishes BlueprintValidated for a Vision Blueprint with passed true, the readiness correlation of WorkflowEngineService for the project satisfies the one required member vision-blueprint (blueprint-vision-v1) and submits exactly one run through SubmitRun of RunControlService with a service token that names the project, the release resolved from the alias when the correlation opened and the idempotency key scope, operation, workflow release and bundle fingerprint; a newer Vision version supersedes an open correlation. RunControlService accepts the run and publishes RunAccepted; WorkflowEngineService loads the Draft release through AgentRegistryService, opens its projection and marks the six steps ready in the declared order: identify-contexts and draft-service-blueprint on the enterprise-architect release, model-domains on the domain-modeler release, the tools blueprint-submit-version and blueprint-validate, and the condition check-valid, which loops back to the draft at most twice. Every agent and tool step declares failure_policy Retry and the shared-write step submit-version declares idempotency_key documentHash, which is what lets its Retry hold (ADR-0014). The run outputs are the last service-blueprint-draft as service-blueprint and the receipt; on a passed receipt BlueprintService itself derives the context map and the domain model and publishes ContextMapDerived and DomainModelDerived, the signals that activate module-blueprints and database-blueprint. The run reports exactly one outcome and stays within the declared budget. The behaviour of the steps is specified in AIFACTORY-US-1141 to AIFACTORY-US-1144; this PBI proves the whole chain on the recorded fixture.
Acceptance criteria
| AC1 | Given the Draft release of architecture-decomposition (workflow-definition-v1) is loadable by AgentRegistryService with its readiness activation, 6 steps, input mappings, retry policies, timeouts, the failure_policy Retry of the five agent and tool steps and the idempotency_key documentHash of architecture-decomposition/submit-version exactly as in model/workflows/architecture-decomposition.yaml, when BlueprintService/BlueprintValidated arrives for a Vision Blueprint with passed true, then the WorkflowEngineService/ReadinessCorrelation of the project submits one run through RunControlService/SubmitRun with a service token naming the project, WorkflowEngineService/ReadinessRunSubmitted is published and a repeated signal with the same fingerprint returns the same run. |
| AC2 | Given RunControlService/RunAccepted for that release with input vision-blueprint, when the engine opens the run, then WorkflowEngineService/WorkflowRunStarted is emitted and architecture-decomposition/identify-contexts, architecture-decomposition/model-domains, architecture-decomposition/draft-service-blueprint, architecture-decomposition/submit-version, architecture-decomposition/validate and architecture-decomposition/check-valid become ready in that order, each agent step on the pinned release of enterprise-architect or domain-modeler. |
| AC3 | Given every step succeeds, when the run completes, then service-blueprint (blueprint-service-v1) and validation-receipt (blueprint-validation-receipt-v1) are the run outputs under the run envelope, WorkflowEngineService/WorkflowRunCompleted is emitted once, RunControlService/RunCompleted follows exactly once and BlueprintService/ContextMapDerived and BlueprintService/DomainModelDerived exist for the validated version (ADR-0014, FR-08). |
| AC4 | Given a step settles Failed with a non-transient failure class, exhausts its retry budget or the condition architecture-decomposition/check-valid reaches its iteration limit, when the engine applies the compensation policy of model/workflows/architecture-decomposition.yaml, then WorkflowEngineService/WorkflowRunFailed names the failed step and the failure class, the sandbox outputs stay as evidence, every Draft version stays a Draft and RunControlService/RunFailed is published exactly once; given the project policy gates blueprint drafts, the run waits on RunControlService/ApprovalRequested and resumes only on the matching RunControlService/ApprovalDecided (ADR-0026). |
| AC5 | Given the recorded fixture inputs of model/workflows/architecture-decomposition.yaml, when the fixture run executes in the pipeline, then its outputs match the recorded ones field by field, every step output validates against its descriptor and the run stays within the declared budget of 600000 tokens (ADR-0024). |
| Traces: workflows | architecture-decomposition |
| Traces: steps | architecture-decomposition/identify-contexts, architecture-decomposition/model-domains, architecture-decomposition/draft-service-blueprint, architecture-decomposition/submit-version, architecture-decomposition/validate, architecture-decomposition/check-valid |
| Traces: agents | domain-modeler, enterprise-architect |
| Traces: tools | blueprint-submit-version, blueprint-validate |
| Traces: services | WorkflowEngineService, RunControlService, AgentRegistryService, BlueprintService |
| Traces: aggregates | WorkflowEngineService/ReadinessCorrelation |
| Traces: apis | RunControlService/SubmitRun |
| Traces: events | BlueprintService/BlueprintValidated, BlueprintService/ContextMapDerived, BlueprintService/DomainModelDerived, WorkflowEngineService/ReadinessRunSubmitted, WorkflowEngineService/WorkflowRunStarted, WorkflowEngineService/WorkflowRunCompleted, WorkflowEngineService/WorkflowRunFailed, RunControlService/RunAccepted, RunControlService/RunCompleted, RunControlService/RunFailed, RunControlService/ApprovalRequested, RunControlService/ApprovalDecided |
| Traces: descriptors | workflow-definition-v1, readiness-bundle-v1, blueprint-vision-v1, blueprint-service-v1, blueprint-validation-receipt-v1 |
| Traces: adrs | ADR-0014, ADR-0024, ADR-0026 |
| Traces: requirements | FR-08, FR-11, FUX-11, XL-09 |
| Depends on | AIFACTORY-US-1141, AIFACTORY-US-1142, AIFACTORY-US-1143, AIFACTORY-US-1144, feature:workflow-engine-service, feature:run-control-service, feature:agent-registry-service-thin, feature:blueprint-service, feature:wf-vision-to-blueprint |
| Sources | model/workflows/architecture-decomposition.yaml, model/agents/architecture/enterprise-architect.yaml, model/agents/architecture/domain-modeler.yaml, docs/planes/agent-runtime/workflow-definitions/architecture-decomposition.md |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-169 Author the release of the workflow definition architecture-decomposition from the model |
implementation | A Draft release of architecture-decomposition (workflow-definition-v1) with its readiness activation on BlueprintValidated of kind Vision, its 6 steps, input mappings, retry policies, timeouts, the on_false loop of check-valid, the compensation policy and the budget as in model/workflows/architecture-decomposition.yaml, with the failure_policy Retry of identify-contexts, model-domains, draft-service-blueprint, submit-version and validate copied as it stands and the idempotency_key documentHash of submit-version; loadable by AgentRegistryService and accepted by ValidateWorkflowDefinition of WorkflowEngineService. | ConnectSoft.AI.SoftwareFactory.WorkflowEngineService |
AIFACTORY-TASK-170 Author the agent releases domain-modeler, enterprise-architect with their prompts and skills |
implementation | Draft releases of enterprise-architect and domain-modeler with their instructions, the skills enterprise-architect-identify-contexts, enterprise-architect-draft-service-blueprint and domain-modeler-model-domains among their bound skills, the tool bindings and the model profile reasoning-high; each release passes a smoke evaluation of the suite architecture-core-v1 on a fixture Vision Blueprint. | ConnectSoft.AI.SoftwareFactory.AgentTemplate |
AIFACTORY-TASK-171 Fixture run of architecture-decomposition against recorded inputs |
verification | The definition runs end to end on a fixture project in the acceptance environment from a BlueprintValidated of kind Vision through the readiness correlation to RunCompleted; every step output validates against its descriptor and the outputs service-blueprint and validation-receipt match the recorded ones field by field (AC1 to AC3 and AC5 of AIFACTORY-US-074). | ConnectSoft.AI.SoftwareFactory.WorkflowEngineService |
AIFACTORY-TASK-721 Verify architecture-decomposition-runs-from-its-definition by running the declared command |
verification | Run dotnet test -c Release --filter Category=WorkflowFixture; it passes and proves AC1 to AC5 of AIFACTORY-US-074, including the failure path of AC4 (WorkflowRunFailed then RunFailed exactly once) and, at chain level, the wait on a gated submit-version; the gate itself is proven by AIFACTORY-TASK-4568. |
ConnectSoft.AI.SoftwareFactory.WorkflowEngineService |
AIFACTORY-US-1141: The Enterprise Architect names the bounded contexts and the Domain Modeler models each domain¶
behavior · persona requester
As a requester, I want the bounded contexts of my validated Vision Blueprint named with their responsibilities and each modelled as aggregates, invariants and events, so that the Service Blueprint rests on a domain model in the ubiquitous language instead of a guess.
The two read-class agent steps that open architecture-decomposition. When the engine marks identify-contexts ready it resolves vision-blueprint from input.vision-blueprint, the validated Vision Blueprint the readiness bundle carried; the enterprise-architect release runs the skill enterprise-architect-identify-contexts with the tools its card allows for read class (knowledge-search, graph-query, list-files, read-range) and returns context-candidates (artifact-v1): each candidate context with its responsibility, the capabilities of the vision it owns and its relationships to the others. When model-domains becomes ready it receives the same blueprint and context-candidates from steps.identify-contexts.context-candidates; the domain-modeler release runs domain-modeler-model-domains and returns domain-models (artifact-v1): per context the aggregates with a root entity, an identity and at least one invariant, the entities, value objects and the published events, each event naming its aggregate, which is what SVC-002 and SVC-003 later check. Neither step writes outside the run envelope, calls a service of another context or needs an approval. Each attempt records exactly one outcome; both steps declare failure_policy Retry, so a Failed attempt of failure class transient is retried under the exponential budget of 3 attempts with backoff 30s, an attempt of any other failure class is not retried, and a step that exceeds PT30M or exhausts its budget fails the run with the evidence; nothing has succeeded before it that needs compensation.
Acceptance criteria
| AC1 | Given a run accepted with input vision-blueprint (blueprint-vision-v1), when the engine marks architecture-decomposition/identify-contexts ready and enterprise-architect executes it with enterprise-architect-identify-contexts, then context-candidates (artifact-v1) names every candidate context with its responsibility, owned capabilities and relationships, is recorded once under the run envelope and architecture-decomposition/model-domains becomes ready (SCN-architecture-decomposition-001). |
| AC2 | Given steps.identify-contexts.context-candidates is recorded, when domain-modeler executes architecture-decomposition/model-domains, then domain-models (artifact-v1) holds per context the aggregates, each with a root entity, an identity and at least one invariant, the value objects and the published events each naming its aggregate, and is recorded once under the run envelope (SCN-architecture-decomposition-002). |
| AC3 | Given an attempt of either step exceeds its timeout PT30M, settles Failed with a failure class other than transient, or settles Failed with failure class transient until the exponential budget of 3 attempts is spent, when the engine applies the policy of model/workflows/architecture-decomposition.yaml, then the attempt fails with evidence, WorkflowEngineService/WorkflowRunFailed names the step and no shared system is changed (ADR-0014). |
| Traces: workflows | architecture-decomposition |
| Traces: steps | architecture-decomposition/identify-contexts, architecture-decomposition/model-domains |
| Traces: agents | enterprise-architect, domain-modeler |
| Traces: services | WorkflowEngineService |
| Traces: events | WorkflowEngineService/StepReady, WorkflowEngineService/WorkflowRunFailed |
| Traces: descriptors | blueprint-vision-v1, artifact-v1 |
| Traces: scenarios | SCN-architecture-decomposition-001, SCN-architecture-decomposition-002 |
| Traces: adrs | ADR-0014 |
| Traces: requirements | FR-11 |
| Depends on | feature:workflow-engine-service, feature:run-control-service |
| Sources | model/workflows/architecture-decomposition.yaml, model/skills/architecture/enterprise-architect-identify-contexts.yaml, model/skills/architecture/domain-modeler-model-domains.yaml, model/scenarios/architecture-decomposition.yaml |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-4561 Recorded fixture for identify-contexts and model-domains |
fixture | A fixture Vision Blueprint with three capabilities and the expected context-candidates and domain-models artifacts (artifact-v1), where every aggregate has a root entity, an identity and an invariant and every event names its aggregate, as the oracle of SCN-architecture-decomposition-001 and SCN-architecture-decomposition-002. | ConnectSoft.AI.SoftwareFactory.AgentTemplate |
AIFACTORY-TASK-4562 Verify the two analysis steps of the Draft release against the definition |
verification | A check of the release authored by AIFACTORY-TASK-169 against model/workflows/architecture-decomposition.yaml proves that the steps identify-contexts and model-domains carry kind agent, the agents enterprise-architect and domain-modeler, the skills enterprise-architect-identify-contexts and domain-modeler-model-domains, side_effect_class read, failure_policy Retry, the exponential retry of 3 attempts with backoff 30s, timeout PT30M and the mappings vision-blueprint from input.vision-blueprint and context-candidates from steps.identify-contexts.context-candidates; nothing is authored here. | ConnectSoft.AI.SoftwareFactory.WorkflowEngineService |
AIFACTORY-TASK-4563 Prove the analysis steps on the fixture |
verification | A fixture run proves SCN-architecture-decomposition-001 and SCN-architecture-decomposition-002 (AC1 to AC3 of AIFACTORY-US-1141), including the timeout and retry exhaustion path with a WorkflowRunFailed that names the step; both outputs validate against artifact-v1. | ConnectSoft.AI.SoftwareFactory.WorkflowEngineService |
AIFACTORY-US-1142: The Enterprise Architect assembles the Service Blueprint from the domain models¶
behavior · persona requester
As a requester, I want contexts, modules, operations and events assembled into one Service Blueprint document, so that the platform can validate it and derive the context map that every later module is generated from.
The sandbox-class agent step draft-service-blueprint of architecture-decomposition. When the engine marks it ready it resolves vision-blueprint from input.vision-blueprint and domain-models from steps.model-domains.domain-models; on a revision pass after check-valid took its false branch the findings of steps.validate.validation-receipt are attached as feedback. The enterprise-architect release runs the skill enterprise-architect-draft-service-blueprint, writes the Service Blueprint document with write-file inside the isolated workspace and returns service-blueprint-draft (blueprint-service-v1): the contexts and their modules, the operations and the published events, the security scope and the quality constraints, so that every feature of the vision maps to an aggregate or an operation (SVC-001) and every rule of the Service rule set can be met. On a revision pass the new draft addresses each finding by rule id (SVC-001 to SVC-005) or by schema path. The step writes nothing outside the run envelope and needs no approval; the document becomes a shared object only in the next step. It declares failure_policy Retry with the exponential budget of 3 attempts and backoff 30s for a Failed attempt of failure class transient; an attempt that exceeds PT30M, fails with another failure class or exhausts the budget fails the run with the evidence, the sandbox output staying in place (ADR-0014, recovery not replay).
Acceptance criteria
| AC1 | Given steps.model-domains.domain-models is recorded, when enterprise-architect executes architecture-decomposition/draft-service-blueprint with enterprise-architect-draft-service-blueprint, then service-blueprint-draft validates against blueprint-service-v1, maps every feature of the vision to an aggregate or an operation, is recorded once under the run envelope and architecture-decomposition/submit-version becomes ready with it mapped as document (SCN-architecture-decomposition-003). |
| AC2 | Given a revision pass after architecture-decomposition/check-valid took its false branch, when the step re-runs, then the findings of steps.validate.validation-receipt are in its context as feedback and the new draft addresses each finding by rule id SVC-001 to SVC-005 or by schema path (SCN-architecture-decomposition-003, ADR-0026). |
| AC3 | Given an attempt exceeds PT30M, settles Failed with a non-transient failure class or exhausts the exponential budget of 3 attempts, when the engine applies the compensation policy of model/workflows/architecture-decomposition.yaml, then the attempt fails with evidence, the sandbox output stays in place, WorkflowEngineService/WorkflowRunFailed names the step and no shared system is changed (SCN-architecture-decomposition-003, ADR-0014). |
| Traces: workflows | architecture-decomposition |
| Traces: steps | architecture-decomposition/draft-service-blueprint |
| Traces: agents | enterprise-architect |
| Traces: services | WorkflowEngineService |
| Traces: events | WorkflowEngineService/StepReady, WorkflowEngineService/WorkflowRunFailed |
| Traces: descriptors | blueprint-service-v1, blueprint-validation-receipt-v1 |
| Traces: scenarios | SCN-architecture-decomposition-003 |
| Traces: adrs | ADR-0014, ADR-0026 |
| Traces: requirements | FR-11 |
| Depends on | AIFACTORY-US-1141, feature:workflow-engine-service, feature:run-control-service |
| Sources | model/workflows/architecture-decomposition.yaml, model/skills/architecture/enterprise-architect-draft-service-blueprint.yaml, model/blueprints.yaml, model/scenarios/architecture-decomposition.yaml |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-4564 Fixture Service Blueprint drafts with and without findings as feedback |
fixture | The expected service-blueprint-draft (blueprint-service-v1) for the fixture domain models, and a second fixture with a receipt carrying an SVC-003 finding as feedback together with the revised draft that resolves it, as the oracle of SCN-architecture-decomposition-003. | ConnectSoft.AI.SoftwareFactory.AgentTemplate |
AIFACTORY-TASK-4565 Prove the draft step and its revision pass on the fixture |
verification | A fixture run proves SCN-architecture-decomposition-003 (AC1 to AC3 of AIFACTORY-US-1142); the draft validates against blueprint-service-v1, the revision pass carries the receipt as feedback and resolves the finding by rule id, and the timeout path ends in a WorkflowRunFailed that names the step. | ConnectSoft.AI.SoftwareFactory.WorkflowEngineService |
AIFACTORY-US-1143: The Service Blueprint draft is stored as a Draft version and validated with a receipt against the SVC rules¶
behavior · persona requester
As a requester, I want the drafted Service Blueprint stored as a Draft version of my project and validated against its schema and the SVC rules, so that a verdict with findings exists for every draft, and a passed one yields the context map and domain model the next workflows start from.
The two tool steps of architecture-decomposition, whose service behaviour BlueprintService and ToolAdapterService deliver; this PBI binds them and proves what the definition expects. submit-version resolves document from steps.draft-service-blueprint.service-blueprint-draft; the engine emits StepReady with actionClass shared-write and Run Control dispatches the attempt. The tool blueprint-submit-version goes through the fixed pipeline of ToolAdapterService and reaches Blueprints.SubmitDraftVersion, which stores the document as a project-scope Draft BlueprintVersion of kind Service, idempotent on its document hash. Draft versions are autonomous by default; when the project policy (BC-20) gates blueprint drafts the invocation waits AwaitingApproval on an approval requested through RunControl.RequestApproval with proposalKind tool-invocation that names the run and the step and is bound to the request hash and the exact tool version, and a rejected or expired decision denies it and fails the attempt policy-denied (D64). The step declares idempotency_key documentHash, so Run Control may retry a Failed attempt of failure class transient under the fixed budget of 2 attempts; an Uncertain attempt is never retried and waits for an operator through ConfirmToolEffect. validate resolves version-ref and calls Blueprints.Validate: the version is checked against blueprint-service-v1 and the rules SVC-001 to SVC-005 and a receipt with verdict, document hash and findings is returned and recorded whether it passed or not; the call writes only the receipt. BlueprintService itself moves the version from Draft to Validated for a passed receipt, derives the context map and the domain model per context and publishes BlueprintValidated, ContextMapDerived and DomainModelDerived; a failed receipt leaves the version Draft and derives nothing. A version reference of another tenant is answered NOT_FOUND like an unknown one and the attempt takes the failure class permanent (ADR-0015).
Acceptance criteria
| AC1 | Given steps.draft-service-blueprint.service-blueprint-draft is recorded and the project policy does not gate blueprint drafts, when architecture-decomposition/submit-version runs blueprint-submit-version through BlueprintService/Blueprints.SubmitDraftVersion, then a Draft BlueprintService/BlueprintVersion of kind Service exists in project scope, version-ref (blueprint-version-ref-v1) is recorded once and the same document submitted again returns the same version reference (SCN-architecture-decomposition-004, D64). |
| AC2 | Given the project policy gates blueprint drafts, when architecture-decomposition/submit-version is reached, then the ToolAdapterService/ToolInvocation waits AwaitingApproval, the approval is requested through RunControlService/RunControl.RequestApproval with proposalKind tool-invocation, bound to the invocation request hash and the exact tool version, RunControlService/ApprovalRequested names the run and the step before any write, the write happens only on an approving RunControlService/ApprovalDecided, and a rejected or expired decision yields ToolAdapterService/ToolInvocationDenied and an attempt failed policy-denied without a Draft version (SCN-architecture-decomposition-004, ADR-0026). |
| AC3 | Given an attempt of architecture-decomposition/submit-version settles Failed with failure class transient, when Run Control evaluates it, then it is retried under the fixed budget of 2 attempts because the step declares idempotency_key documentHash, another failure class is not retried, and an Uncertain attempt raises ToolAdapterService/ToolEffectUncertain and is settled only through ToolAdapterService/ConfirmToolEffect, never by an automatic retry (SCN-architecture-decomposition-004, ADR-0014). |
| AC4 | Given steps.submit-version.version-ref is recorded, when architecture-decomposition/validate runs blueprint-validate through BlueprintService/Blueprints.Validate, then validation-receipt (blueprint-validation-receipt-v1) with findings by rule id SVC-001 to SVC-005 or schema path is recorded once whether it passed or not, BlueprintService/BlueprintValidated carries passed and the document hash, and for a passed receipt the version is Validated and BlueprintService/ContextMapDerived and BlueprintService/DomainModelDerived follow, while a failed one leaves it Draft (SCN-architecture-decomposition-005). |
| AC5 | Given a version reference of another tenant, or an attempt of architecture-decomposition/validate that exceeds PT5M or settles Failed with failure class transient until the fixed budget of 2 attempts is spent, when the step runs, then the other tenant is answered NOT_FOUND with no receipt and the attempt takes failure class permanent without a retry, and the exhausted case fails with evidence; the version keeps its state in both cases (SCN-architecture-decomposition-005, ADR-0015). |
| Traces: workflows | architecture-decomposition |
| Traces: steps | architecture-decomposition/submit-version, architecture-decomposition/validate |
| Traces: tools | blueprint-submit-version, blueprint-validate |
| Traces: services | BlueprintService, ToolAdapterService, RunControlService, WorkflowEngineService |
| Traces: aggregates | BlueprintService/BlueprintVersion, ToolAdapterService/ToolInvocation |
| Traces: apis | BlueprintService/Blueprints.SubmitDraftVersion, BlueprintService/Blueprints.Validate, ToolAdapterService/ConfirmToolEffect, RunControlService/RunControl.RequestApproval |
| Traces: events | BlueprintService/BlueprintValidated, BlueprintService/ContextMapDerived, BlueprintService/DomainModelDerived, RunControlService/ApprovalRequested, RunControlService/ApprovalDecided, ToolAdapterService/ToolInvocationDenied, ToolAdapterService/ToolEffectUncertain |
| Traces: descriptors | blueprint-service-v1, blueprint-version-ref-v1, blueprint-validation-receipt-v1 |
| Traces: scenarios | SCN-architecture-decomposition-004, SCN-architecture-decomposition-005 |
| Traces: adrs | ADR-0014, ADR-0015, ADR-0026 |
| Traces: requirements | FR-08 |
| Depends on | AIFACTORY-US-1142, feature:blueprint-service, feature:tool-adapter-service, feature:run-control-service, feature:workflow-engine-service |
| Sources | model/workflows/architecture-decomposition.yaml, model/tools/blueprint-submit-version.yaml, model/tools/blueprint-validate.yaml, model/services/template-library/BlueprintService.yaml, model/blueprints.yaml, model/scenarios/architecture-decomposition.yaml |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-4566 Fixture Service Blueprint documents with their expected receipts and derived models |
fixture | One fixture Service Blueprint that passes SVC-001 to SVC-005 with its expected blueprint-version-ref-v1, receipt, Validated state, context map and per-context domain models, one that fails SVC-002 with its receipt and Draft state and no derivation, and a version reference of another tenant with the expected NOT_FOUND and no receipt. | ConnectSoft.AI.SoftwareFactory.BlueprintService |
AIFACTORY-TASK-4567 Verify submit-version and validate of the Draft release against the definition |
verification | A check of the release authored by AIFACTORY-TASK-169 against model/workflows/architecture-decomposition.yaml proves that the steps submit-version and validate name the tools blueprint-submit-version and blueprint-validate, carry side_effect_class shared-write and sandbox, failure_policy Retry, the idempotency_key documentHash on submit-version only, the fixed retry of 2 attempts with backoff 10s, the timeouts PT2M and PT5M and the mappings document from steps.draft-service-blueprint.service-blueprint-draft and version-ref from steps.submit-version.version-ref; the tool bindings are consumed from feature tool-adapter-service and nothing is authored here. | ConnectSoft.AI.SoftwareFactory.WorkflowEngineService |
AIFACTORY-TASK-4568 Prove the submit and validate steps for a Service Blueprint on the fixture |
verification | A fixture run proves SCN-architecture-decomposition-004 and SCN-architecture-decomposition-005 (AC1 to AC5 of AIFACTORY-US-1143), including the idempotent resubmission, the gated path with ApprovalRequested naming the run and the step and ToolInvocationDenied on rejection, the transient retry and the Uncertain path settled through ConfirmToolEffect, the passed receipt followed by ContextMapDerived and DomainModelDerived, the failed receipt leaving the version Draft, and the NOT_FOUND of another tenant. | ConnectSoft.AI.SoftwareFactory.WorkflowEngineService |
AIFACTORY-US-1144: The engine checks the Service Blueprint receipt and sends findings back to the draft at most twice¶
behavior · persona requester
As a requester, I want a failed validation of my Service Blueprint to send its findings back to the draft a bounded number of times and then fail the run with the report, so that the blueprint improves on real findings without looping forever or hiding the verdict.
The condition step of architecture-decomposition. When check-valid becomes ready the engine evaluates steps.validate.validation-receipt.passed == true over the recorded receipt; the condition is read class, calls no service, never retries and completes within PT1M. When the receipt passed, the condition completes with one outcome, no further step exists, and the run completes with the last draft as service-blueprint and the receipt as validation-receipt. When it did not, the engine takes the on_false branch to draft-service-blueprint with steps.validate.validation-receipt as feedback: the draft, submit and validate steps re-run in order, the revised document gets its own Draft version and its own receipt, and the iteration count of the run rises by one. The branch is taken at most 2 times; when the receipt is still failed after the second iteration the run fails with the validation report as evidence, WorkflowRunFailed names check-valid with the failure class validation, Run Control records Failed exactly once and every Draft version created on the way stays a Draft, never Validated, so no context map is derived and module-blueprints is never activated. A missing or unreadable receipt fails the condition with evidence instead of being read as passed (ADR-0026, D61).
Acceptance criteria
| AC1 | Given steps.validate.validation-receipt is recorded with passed true, when the engine evaluates architecture-decomposition/check-valid, then the condition completes with exactly one outcome, no service is called and WorkflowEngineService/WorkflowRunCompleted follows with the run outputs set (SCN-architecture-decomposition-006). |
| AC2 | Given the receipt has passed false and fewer than 2 iterations were counted, when the engine evaluates architecture-decomposition/check-valid, then it takes the false branch to architecture-decomposition/draft-service-blueprint with the receipt as feedback, the submit and validate steps re-run on the revised draft and the iteration count rises by one (SCN-architecture-decomposition-007). |
| AC3 | Given the receipt is still passed false after the second iteration, when the engine evaluates architecture-decomposition/check-valid, then WorkflowEngineService/WorkflowRunFailed names check-valid with failure class validation and the report as evidence, RunControlService/RunFailed is published exactly once and no Draft version became Validated (SCN-architecture-decomposition-007, ADR-0014). |
| AC4 | Given the receipt is missing or unreadable or the evaluation exceeds PT1M, when the engine evaluates architecture-decomposition/check-valid, then the condition is not retried, the step fails with evidence and the run follows the compensation policy of model/workflows/architecture-decomposition.yaml (SCN-architecture-decomposition-006, ADR-0026). |
| Traces: workflows | architecture-decomposition |
| Traces: steps | architecture-decomposition/check-valid, architecture-decomposition/draft-service-blueprint |
| Traces: services | WorkflowEngineService |
| Traces: events | WorkflowEngineService/WorkflowRunCompleted, WorkflowEngineService/WorkflowRunFailed, RunControlService/RunFailed |
| Traces: descriptors | blueprint-validation-receipt-v1 |
| Traces: scenarios | SCN-architecture-decomposition-006, SCN-architecture-decomposition-007 |
| Traces: adrs | ADR-0014, ADR-0026 |
| Traces: requirements | FR-08 |
| Depends on | AIFACTORY-US-1143, feature:workflow-engine-service, feature:run-control-service |
| Sources | model/workflows/architecture-decomposition.yaml, model/services/agent-mesh/WorkflowEngineService.yaml, model/scenarios/architecture-decomposition.yaml |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-4569 Fixture receipt sequences for the pass, loop and limit paths of check-valid |
fixture | Recorded receipt sequences (passed true; passed false then true; passed false three times) that drive check-valid of architecture-decomposition through the pass, a single loop and the iteration limit, each with the expected run outcome and iteration count. | ConnectSoft.AI.SoftwareFactory.WorkflowEngineService |
AIFACTORY-TASK-4570 Prove the condition and the bounded loop of architecture-decomposition on the fixture |
verification | A fixture run proves SCN-architecture-decomposition-006 and SCN-architecture-decomposition-007 (AC1 to AC4 of AIFACTORY-US-1144); one outcome on pass, a loop back to draft-service-blueprint with feedback and iteration count on a failed receipt, and WorkflowRunFailed naming check-valid with failure class validation after the second iteration. | ConnectSoft.AI.SoftwareFactory.WorkflowEngineService |