# 0002. Discovery's outputs reach the agents as parsed text; run id and approval are run inputs | | | |---|---| | Status | Proposed | | Date | 2026-11-02 | | Decided by | Built as a default; awaiting product owner confirmation | | Requirements changed | Feature AC4 and ASM-01 US-001 (the approval and run-status preconditions) | ## Context A workflow can't run or chain another workflow (`docs/platform-issues/workflow-composition/`). The Artifacts step's only output is `artifacts`: per-file records with base64 content. Review decisions are written to the activity log, not onto artifacts. ## Decision - **Front steps.** `a1` (Artifacts) selects the Discovery run's artifacts by exact id. `p1` (Parse Assessment Files) turns `a1.artifacts` into `parsed_content` and `file_metadata`. Every agent that reads Discovery takes both, as `discovery_documents` and `discovery_files`. - **No model copies Discovery's records** between steps. - **Run inputs:** `artifact_ids` (unless the export fixes them), `discovery_execution_id`, and `discovery_approval_ref`, the decision record approving the Discovery run. - **`discovery_completed`** is read as "the critic and report documents are both present". A failed run registers only the outputs it reached. - **References** to Discovery records are written `discovery:{execution_id}/{agent_id}/{record_key}`, because Discovery's records carry no record-level reference of their own. ## Consequences - **The approval can't be verified by the agents;** they trust the reference they're given. The fix is platform-side: record the run outcome on its artifacts (workflow-composition question 3). - **An output too large to inline** (over 8 MiB live) arrives with no content and is skipped by the parser. The agents report it as a missing document. - **The person starting the run has to find the right artifact ids.**