A request names work the Orchestration engine kept instead of carrying its files: a record or latest link from an earlier document of links (checked, and of the request's tenant and Customer case), latest/<work>, or an Execution's id. The kept files and the record that the work completed are the agent's sources. Nothing starts, and the caller is told why, when the reference does not resolve to completed work it may use. A sequence's next agent is given what was kept of the one before, the same way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2.5 KiB
2.5 KiB
Step K2: building on kept work by reference (ADR-0004, phase 2)
Built 2026-10-21 on feat/sources-from, from feat/delivery-store.
What was built
sources_from: a request names work kept earlier instead of carrying its files. It may be:- a link from an earlier document of links, its
recordor itslatest: what a platform step maps from an earlier step's output. The signature is checked; the link must be of the request's tenant when the request names one, and of its Customer case when it names one; latest/<work>: the newest completed Execution of that work in the request's Customer case;- an Execution's id in the request's Customer case.
- a link from an earlier document of links, its
- What the agent is sent: the kept files as
sources, with the Orchestration engine's record that the work completed (execution.json: status, Customer case, Execution, the request, the work). A request naming no Customer case takes the kept work's. - Nothing starts, and the caller is told why, when the reference resolves to nothing, to work that did not end
completed, to another tenant or Customer case, when the link was changed, when nothing is kept here, or whensourcesis given as well. The reply is a completed task with{"status": "not_started", "reason": ...}. - The sequence on the same footing: an agent after another is given what was kept of the one before (
Delivery.sources), as a request naming it insources_fromwould be. Without a store, it is given the files relayed, as before. Store.files,Delivery.resolve,Delivery.sources; the recordexecution.jsonmoved todelivery.py.- The card offers
sources_from.
Verified
- 12 tests in
test_sources_from.py: each of the three forms; alatestlink followed to the newest work; a changed link, another tenant, another Customer case, nothing kept, work that ended with warnings, andsourceswithsources_fromeach starting nothing; a sequence's next agent given what was kept; the card. - 589 tests pass;
ruffandmypyclean. - Deployed on the local platform; the card offers
sources_from. No agent was run: the owner runs it through the platform.
Using it from the platform
A second workflow step on the Orchestration engine with work: operating_model and sources_from mapped from the first step's record; or, in a later workflow, sources_from: latest/solution_architecture with the Customer case. The operating model agent's own fields (who operates it, business outcomes) go in that step's scope.