From d666e3a4824e1e903b27fb51c94016bd5d7b3447 Mon Sep 17 00:00:00 2001 From: Lex Date: Wed, 19 Aug 2026 17:54:06 +0800 Subject: [PATCH 1/2] docs(dag): 'one objective, one live DAG' downgraded from Invariant to Convention MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CONTEXT.md claimed an engine-enforced invariant; the implementation is orchestrator guidance only (dag.create and the tool start accept a session with a live workflow; the wake model and lease tolerate multiples). The divergence was the defect (audit INV-A) — this records the truth: a modeling convention with documented bounded consequences, including the cross-workflow write-set caveat. Engine enforcement remains available as a future decision if the convention proves insufficient. Closes #348 --- .specgit.yaml | 7 +++---- packages/opencode/src/dag/CONTEXT.md | 5 ++++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.specgit.yaml b/.specgit.yaml index 7a1959b65..9cfb244c0 100644 --- a/.specgit.yaml +++ b/.specgit.yaml @@ -1,8 +1,7 @@ version: 1 -delivery: issue368 +delivery: issue348 context: kind: branch - branch: feat/368-issue368 + branch: feat/348-issue348 issues: - - 368 -pr: 369 + - 348 diff --git a/packages/opencode/src/dag/CONTEXT.md b/packages/opencode/src/dag/CONTEXT.md index 87f180fa9..7f2824dd3 100644 --- a/packages/opencode/src/dag/CONTEXT.md +++ b/packages/opencode/src/dag/CONTEXT.md @@ -22,12 +22,15 @@ Workflow Orchestration turns one user objective into one durable DAG. Its model- ## Invariants -- One user objective has at most one live DAG; route expansion stays inside that DAG. - Block composition is the recommended authoring path and is selected heuristically from the objective; custom Blocks/Nodes remain supported. - Workflow Authoring Check is the only raw source-to-Prepared Workflow Graph authority used by tool actions, CLI, generation, and packaging. - Parsing, file-only compatibility, strict action decoding, Block compilation, and profile diagnostics are not reimplemented by callers. - `portable` validation does not load user environment catalogs. `environment` validation reads current catalogs and verifies actual model availability. - No workflow event or durable mutation occurs before a valid Prepared Workflow Graph exists. + +## Conventions + +- One user objective has at most one live DAG; route expansion stays inside that DAG (issue #348: a modeling convention enforced by orchestrator guidance — workflow-routing and orchestration-policy — not by the engine; `dag.create` and the workflow tool's start accept a session with a live workflow. The runtime tolerates the violation with bounded consequences: the wake model aggregates across workflows and a goal is blocked by any DAG lease. When two live DAGs share one workspace, the plan block's disjoint-write-set discipline does NOT carry across workflows — authors must keep concurrent workflows on disjoint worktrees or serialize them). - The model-facing schema contains fields the model owns. Session/Project identity, admission audit state, model assignment, and other runtime-derived fields remain hidden. - Model-facing graph actions expose only `spec_path`; graph fields live in YAML so provider tool-call serialization cannot turn a nested graph into a string. - Legacy YAML may be adapted at the file boundary without making legacy fields valid inline input. From 603d3499f9987e6d312071ba1ff0b0ba6235f040 Mon Sep 17 00:00:00 2001 From: Lex Date: Wed, 19 Aug 2026 17:54:43 +0800 Subject: [PATCH 2/2] chore(specgit): record PR binding in delivery record --- .specgit.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.specgit.yaml b/.specgit.yaml index 9cfb244c0..e33e7aaef 100644 --- a/.specgit.yaml +++ b/.specgit.yaml @@ -5,3 +5,4 @@ context: branch: feat/348-issue348 issues: - 348 +pr: 373