Source: docs/audit-dag-deepdive-2026-08-19.md (INV-A, Medium) — needs a product/architecture decision, not immediate code.
Evidence
CONTEXT.md lists "one user goal → at most one live DAG" as an Invariant. Implementation:
- dag.create (dag.ts:340-434) does not check for an existing live workflow on the session
- workflow tool start (tool/workflow.ts:607-675) likewise
- automation lease tolerates multiple DAGs (per-workflow register; owner() returns "any dag"; wake batches aggregate across workflows)
- no cross-process constraint; crash recovery adopts all running/paused/stepping workflows indiscriminately
- the only "enforcement" is model guidance (workflow-routing.md:18, orchestration-policy.md:273-277)
Consequence: bounded (wake model tolerates it; goal blocked by "any dag"), but when two live DAGs share one workspace, ADR-0002's three-way-disjoint discipline (delegated to plan discipline) fails completely across workflows.
Options (pick one, eliminate the divergence)
- (a) engine enforcement: create / tool-start rejects (or warns on) a second live workflow for the session
- (b) downgrade CONTEXT.md to convention and document the cross-workspace consequence
Source: docs/audit-dag-deepdive-2026-08-19.md (INV-A, Medium) — needs a product/architecture decision, not immediate code.
Evidence
CONTEXT.md lists "one user goal → at most one live DAG" as an Invariant. Implementation:
Consequence: bounded (wake model tolerates it; goal blocked by "any dag"), but when two live DAGs share one workspace, ADR-0002's three-way-disjoint discipline (delegated to plan discipline) fails completely across workflows.
Options (pick one, eliminate the divergence)