Skip to content

docs: ctrl/ migration + C compiler + LLVM .dag — 3 parallel program plans - #2775

Merged
briansrls merged 16 commits into
mainfrom
design/decomposition-algebra-draft
May 12, 2026
Merged

briansrls merged 16 commits into
mainfrom
design/decomposition-algebra-draft

Conversation

@briansrls

@briansrls briansrls commented May 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Two docs for the ctrl/ → .dag migration program:

  1. docs/design-decomposition-algebra.md — scoping doc; algebra substrate; grep-verified primitive mapping; 4 modeling gaps; workflow-types dissolution proposal
  2. docs/r4-ctrl-dag-migration-project-plan.md — project plan; ctrl/ audit (~17 subsystems); parallel program tree (Ctrl-Migration Director parallel to gunbc R3-close Director); Phase 1.5 catalog of work doable NOW

Why this matters now

Operator directive 2026-05-12T18:30Z: "make a project plan for this... separate tree (beside the director) that models all dependencies out... migrate as much of ctrl/ onto dag as possible ASAP."

Today's 7 parser-class operator-tier-bypass surfaces in 8h (3 distinct fingerprints) validate the heuristic-pass cost. The ctrl/ decomposition-algebra series (PRs #1192-#1197) is in flight and the right substrate to consume. ctrl/ already has some .dag (workflows/review.dag, DAG_MODELING_PROPOSAL.md) — this is an acceleration, not a kickoff.

What's doable NOW (Phase 1.5, doc-only)

5 first-wave items can dispatch in parallel without waiting for Phase 1:

  1. review_verdict.dag — typed verdict shape (replaces today's parser-lag pain)
  2. work_item_api.dag — DAG API HTTP layer (mirrors ctrl PR feat(v3): minimal method-declaration registry + MethodRef refinement #1193)
  3. session_lifecycle.dag — spawn/idle/archived emergence
  4. inbox.dag — message-routing primitive
  5. messaging.dag — dashboard-message + sender-marker discipline

Items 2 (algebra substrate), 7 (reviews API), 8 (PR-review workflow extension) gate on Phase 1.

Program tree proposed

operator
└── Ctrl-Migration Director  ← NEW, parallel to zesty-bear-812
    ├── Substrate Mgr (Phase 1)
    ├── Subsystem-Modeling Mgr (Phase 1.5 — 5-8 parallel workers)
    ├── Emission-Targets Mgr (Phase 3 — HTTP/SQL/audit extdeps)
    └── Verification Mgr (Phase 4 — parity tests)

Phase sequence

  • Phase 0 (DONE today): scoping + project plan
  • Phase 1 (~1 week): algebra substrate landing
  • Phase 1.5 (~1-3 weeks parallel): subsystem modeling PRs
  • Phase 2 (~1-2 weeks): CLI projection to Rust binary
  • Phase 3 (multi-week): HTTP/SQL/audit-event extdeps
  • Phase 4 (multi-week): ctrl/ cut-over
  • Phase 5 (open-ended): generalize

6 open Qs for operator

A. .dag file placement (gunbc vs ctrl)
B. Director-tier session shape (single Director vs operator-acting)
C. Workflow-types dissolution scope (dissolve vs extend)
D. First migration target (review-verdict-parser vs decomp-algebra-itself)
E. ctrl PRs #1192-#1197 disposition (land in TS vs hold)
F. Cross-Director coordination protocol

Test plan

  • Operator review of scoping doc §3 mapping table + §4 dissolution proposal
  • Operator review of project plan §3 first-wave items
  • Operator decides 6 open Qs in project plan §11
  • Operator ratifies + spawns Ctrl-Migration Director session via dashboard

🤖 Generated with Claude Code

briansrls and others added 5 commits May 12, 2026 16:13
Operator-supplied premise: project decomposition as algebra where children sum to parent meaning; walk-back when integration contradicts construction.

This draft formalizes:
- §1 The contradiction trigger (algebraic imbalance | claim contradiction)
- §2 Types sketch (Node, Claim, Decomposition, Witness, WalkBackEvent) — gunbc-lens-style; eventual home in dsl/std/ as MeaningDecomposition lens analogous to Cost lens
- §3 Walk-back algorithm (procedure with StableAncestor | RootContested termination)
- §4 Worked example — PR #2745 misread retroactively traced through procedure (2026-05-12 PM execution error)
- §5 Dashboard comms application sketch — message-as-walk-back-signal mapping
- §6 Open questions (coefficient semantics, claim equivalence, root-asker, rebalance cost, implementation surface)
- §7 Next step: validate on N=3-5 real cases before .dag formalization

Iteration expected.
Replaces procedural walk-back draft (d534fd4) with structural-integration
shape per operator directive 2026-05-12: migrate ctrl/ processes into .dag
substrate; algebra is authoritative, ctrl/ TS becomes projected emission.

Audit-grounded with grep-verified citations across dsl/std/ + ctrl PR refs
(#1192/#1193/#1195/#1197). Identifies 4 modeling gaps (EventLog<T> primitive,
Lens<A,B> type, bounded multiplicity, unified Witness) + workflow-types
dissolution scope (dsl/gunbc/workflow/types.dag overlaps with decomp-algebra;
proposed dissolution rather than coexistence). First-cut migration target
recommended: review-verdict-parser (today's parser-lag pain validates the
heuristic-pass cost per feedback_lenses_not_passes).

Phase 1 substrate-file skeleton (~50 lines) sketched. Cost-of-change
contract = 1 file for new Mode variants / Operation arms.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ory cross-ref

Addresses claude #10308 review finding: §13's pointer to "previous draft in
git history at d534fd4" was a quirk for a brand-new file (per reviewer:
harmless but worth fixing). Inlines the PR #2745 misread walk-back trace
self-contained so readers don't need to git-log to follow the validation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Companion to docs/design-decomposition-algebra.md. Authored per operator
directive 2026-05-12: parallel program tree beside zesty-bear-812, model
dependencies, migrate as much ctrl/ as possible ASAP.

Audit of ctrl/ via gh API identifies:
- 3 partial .dag files already in ctrl (workflows/review.dag etc.)
- ~17 TS subsystems with documented designs in scripts/session-dashboard/
- 4 in-flight algebra PRs #1192-#1197 (decomposition algebra series)
- Top-level constitutional docs (AGENTS/AUDIT/CODING/INVARIANTS/REVIEW_*/SCOPE_*/TESTING)

Plan structure:
- Phase 1: algebra substrate (dsl/std/process_algebra.dag)
- Phase 1.5: 5-8 parallel subsystem modeling PRs (doc-only, type-only)
  Items 1/3/4/5/6 can start NOW without Phase 1
- Phase 2: CLI projection to Rust binary
- Phase 3: HTTP/SQL/audit-event extdeps (R4 emission targets)
- Phase 4: ctrl/ cut-over per subsystem
- Phase 5: generalize

Proposes Ctrl-Migration Director parallel to gunbc R3-close Director;
3 Mgrs (Substrate/Subsystem-Modeling/Verification), Emission-Targets Mgr
spawned later. First-week concrete actions named.

6 open Qs for operator decision: file placement (gunbc vs ctrl), Director
shape, workflow-types dissolution scope, first migration target, ctrl PR
#1192-#1197 disposition, cross-Director coordination protocol.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls briansrls changed the title docs: decomposition-algebra rewrite for ctrl/ migration scoping docs: ctrl/ → .dag migration — scoping + project plan May 12, 2026
…ems)

Per operator directive 2026-05-12T~18:55Z: audit ALL session-dashboard
work + identify what can migrate today. Gh-API audit of gunb-ai/ctrl
identified ~21,800 TS LOC across 16 subsystems.

Key findings:
- Existing demo precedent at research/.../inbox_delivery_slice.dag proves
  the `service` + typed-functions shape works today (~90% done already)
- 237 .mjs files in scripts/session-dashboard/ organized into ~16 subsystems
- ~20 .mjs in chatgpt-reviewer/ (browser DOM walking; partial-doable now)
- 3 .mjs in api-reviewer/ (CLI backend selection)
- 3 partial .dag in workflows/ (review, branch_review, review_config)

Strategy shift: model SERVICE CONTRACTS (types + typed function signatures
+ pure helpers), not just types. Demo proves it works today.

Subsystems classified:
- 8 items independent NOW (no Phase 1 dependency) — parallel first wave
- 6 items consume Phase 1 algebra substrate — second wave
- 2 items partial-NOW (chatgpt-reviewer browser, server HTTP routes)
- ~16 PRs total for Phase 1.5 (bundled by subsystem)

Operator-resolved Qs:
- Q-A: gunbc-side placement (dsl/ctrl/*.dag)
- Q-D: review-verdict already in flight per operator

New Qs added:
- Q-G: service-contract authority claim (future vs co vs substrate)
- Q-H: per-subsystem PR cadence (bundle by subsystem, ~16 PRs total)

First-wave dispatch updated: 8 workers parallel Day 2-5; 6 more Day 6-10.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: b9b0ef40 · Trigger: schedule
  • Thinking: 527s wall

BLOCKING (5)

Root Cause

  • docs/design-decomposition-algebra.md The audit scoped lens evidence to dsl/std and missed the live v3 lens substrate → reconcile against src/v3/std/lens.dag or give the projection carrier a distinct justified home.
  • docs/design-decomposition-algebra.md The dissolution proof conflates decomposition state with workflow phase → preserve phase/evidence axes as structural coordinates or prove every existing stage consumer dissolves.
  • docs/design-decomposition-algebra.md The design lacks an operation-specific closure-decision lattice → define explicit regress/reopen operations with witnesses or drop the monotonicity claim.
  • docs/r4-ctrl-dag-migration-project-plan.md The plan equates declared model files with authority → require per-subsystem realization/consumer receipts or mark each file as staged with a concrete dissolution trigger.
  • docs/r4-ctrl-dag-migration-project-plan.md The dispatch template narrows coproduct discipline too far → change the gate to cover every enum/sum with two or more variants.

⚠️ The plan is directionally aligned with the thesis, but these authority and dissolution gaps would steer follow-on work into parallel or lossy substrate shapes.

Comment thread docs/design-decomposition-algebra.md Outdated
- Stale-RC parser bug class **dissolves**: review-tally is `latest_per_provider_at_HEAD = fold(log, by_provider, take_latest_for_current_HEAD)`. Old-SHA RC is structurally not-at-HEAD.
- Cutoff timestamp (PR #1192) becomes `log_position` instead of `dashboard_migrations.created_at`

### Gap 2 — Lens<A,B> type

This comment was marked as resolved.

Comment thread docs/design-decomposition-algebra.md Outdated

**Proposed answer**: **DISSOLVE INTO**.

`IssueLifecycleStage` is a 9-state lifecycle enum that should dissolve into the decomp-algebra's structural Mode + emergent closure rules. The decomp-algebra is MORE PRIMITIVE: it expresses the same semantics structurally rather than as labeled transitions. Specifically:

This comment was marked as resolved.

Comment thread docs/design-decomposition-algebra.md Outdated

Each operation is a **pure function** `(EventLog<Operation>, Operation) → EventLog<Operation>` (append). Graph state is `state: EventLog → NodeGraph` (projection lens).

Composition preserves invariants: `canCloseNode(state(log + op)) ≥ canCloseNode(state(log))` in stability sense (closure decisions never silently regress).

This comment was marked as resolved.


## §3. What can migrate NOW (Phase 1.5 catalog)

**Phase 1.5** = type-only .dag modeling of each ctrl/ subsystem, no emission targets required. Substrate-tier work; each PR is doc-only. Lands in `dsl/ctrl/*.dag` in gunbc OR `~/ctrl/workflows/*.dag` (TBD per §11 Q-A).

This comment was marked as resolved.


## Acceptance gates
1. Carriers + enums declared
2. Practice 4 receipts on any open enum

This comment was marked as resolved.

briansrls and others added 2 commits May 12, 2026 19:09
Per operator directive 2026-05-12T~19:05Z: this is replacement, not
"future authority"; emission targets are critical-path parallel with
algebra substrate, not deferred. 4 Mgrs spawn Day 1 (not 3).

Changes:
- §1 Mission: replace dashboard ASAP; intent layer THIN, substrate
  rigor; compositional-modeling discipline (M9 DFS, lens-not-pass,
  cost-of-change = 1)
- §5 Program tree: orthogonal to zesty-bear-812 confirmed; 4 Mgrs
  (Substrate / Subsystem-Modeling / Emission-Targets / Verification)
  spawn together Day 1
- §6 Phase sequencing: Phase 1 + 1.5 + 3 in PARALLEL, all critical
  path. Per-subsystem cut-over fires as trio converges.
- §10 First-week actions: Emission-Targets Mgr spawns Day 1 not Day-N
- §11 Q-G RESOLVED: substrate becomes authority immediately when
  emission proves out per subsystem; no co-authority window

Three operator Qs resolved this session: A (gunbc-side), D (review-
verdict in flight), G (replace-immediately).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
All 5 findings valid; substantive review, real gaps. Fixed in-place
rather than reply-without-fix.

Finding 1 — audit scope correction (LIVE V3 LENS SUBSTRATE):
prior audit scoped to dsl/std/ only; missed src/v3/std/lens.dag
(Director-locked 6-field Lens<C>) + src/v3/std/dimensions.dag:35
(Witness<Carrier> = Inhabits | Violates) + src/v3/std/coproduct_projection.dag
(Practice 4 dispatch substrate) + ~16 worked lens instances in
src/v3/lenses/. §3 mapping table corrected with these as ✓ EXISTS.

Finding 2 — workflow-types dissolution axis conflation:
§4 initial proposal conflated decomposition axis (Mode) with workflow
phase axis (IssueLifecycleStage). Corrected to preserve both as
structural coordinates (Mode × Phase product) per Practice 4 dimensional
dissolution. Phase open enum staged with dissolution trigger =
per-consumer enumeration. Until proof lands, workflow-types stay extant;
decomp-algebra co-located not replacing.

Finding 3 — Reopen/Regress operations added:
prior §6 claimed monotonicity (canCloseNode ≥ on composition) without
explicit reverse operations. Added Reopen { ReopenWitness } + Regress
{ RegressionWitness } operations with typed witness payloads. Replaced
monotonicity claim with closure-decision lattice: forward-stable subset
preserves; Reopen/Regress/Replan/Escalate explicitly retract closure
state with witnessed cause. No silent regression.

Finding 4 — staging discipline for catalog:
§3 catalog preamble corrected: every "doable NOW" row is STAGED with
explicit dissolution trigger, NOT authoritative-on-arrival. Trigger =
per-subsystem realization receipt + consumer parity (emission target
+ parity test + cut-over PR deletes TS). 🟡 STAGED until trigger fires.

Finding 5 — Practice 4 coverage widened:
§8 brief template gate 2 changed from "Practice 4 receipts on any open
enum" to "every enum/sum with ≥2 variants" (closed sums need
dissolution analysis too). Receipt format named (classification +
pattern + trigger). STOP criterion added: closed sum with no clear
dissolution pattern surfaces to Director.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Addressed all 5 BLOCKING findings in commit 2d7c02f82. Each was a valid substantive issue.

Finding #1 — audit scope correction: previous audit was scoped to dsl/std/ only and missed src/v3/std/lens.dag (Director-locked 6-field Lens<C>) + src/v3/std/dimensions.dag:35 (Witness<Carrier> = Inhabits | Violates) + src/v3/std/coproduct_projection.dag (Practice 4 dispatch substrate) + ~16 worked lens instances in src/v3/lenses/. §3 mapping table now cites the v3 substrate. The decomposition-algebra closure projections fit the existing Lens<C> shape; Witness reuses the v3 carrier rather than defining parallel.

Finding #2 — axis conflation: prior §4 dissolution proof collapsed IssueLifecycleStage to Mode lossily. Corrected to preserve both axes as structural coordinates (Mode × Phase product per Practice 4 "dimensional" pattern). Until per-consumer enumeration proves no information loss, workflow-types stay extant; decomp-algebra is co-located not replacing.

Finding #3 — monotonicity claim dropped: added explicit Reopen { ReopenWitness } + Regress { RegressionWitness } operations with typed witness payloads (PostMergeRevert / RetroGateInvalidation / OperatorIntervention reasons). Replaced the monotonicity claim with an explicit closure-decision lattice: forward-stable subset preserves; Reopen/Regress/Replan/Escalate retract with witnessed cause. No silent regression.

Finding #4 — staging discipline: §3 catalog preamble now states every "doable NOW" row is STAGED with explicit dissolution trigger (= per-subsystem realization receipt + consumer parity + cut-over PR), NOT authoritative-on-arrival. 🟡 STAGED until trigger fires.

Finding #5 — Practice 4 coverage widened: §8 brief template gate 2 changed from "Practice 4 receipts on any open enum" to "every enum/sum with ≥2 variants" — closed sums get dissolution analysis too. Receipt format specified (classification + pattern + trigger). STOP criterion added: unjustified TERMINAL classification surfaces to Director.

Standing by for the +5 queued findings.

— sent from deep-wolf-155

…rallel authority

Codex BLOCKING inline at docs/design-decomposition-algebra.md:154 + queued
companion: §5 Gap 2 proposed `Lens<S, A> { view, update }` and Gap 4
proposed `Witness { author, ... }` — both create parallel authority with
v3 substrate (Lens<C> at src/v3/std/lens.dag, Witness<C> at
src/v3/std/dimensions.dag:35).

Fixes per INVARIANTS P2 (single-authority) + MODELING.md M9 (DFS concept
DAG before defining):

1. Gap 2 RETRACTED — no new Lens carrier. State-projection in
   decomp-algebra reuses FreeMonoid<TimestampedEvent<Operation>> + fold
   (already in dsl/std/algebra.dag:390). If a future bidirectional-update
   use case surfaces, escalate to Substrate Mgr for shape audit.

2. Gap 4 RENAMED — decomp-algebra's "Witness" → "Attestation" to avoid
   name collision with v3 Witness<Carrier>. The carriers are
   structurally distinct (Attestation is human-intent attestation;
   v3 Witness<C> is per-Behavior inhabitance proof). Cascade applied:
   - Operation variants: attestation: Attestation
   - WitnessedOverride → AttestedOverride
   - ReopenWitness → ReopenAttestation
   - RegressionWitness → RegressionAttestation
   - Evidence enum → AttestationEvidence
   - StructuralLens → StructuralLensReceipt (refs v3 Lens<C> instance)
   - §7 dissolution receipt updated
   - §9 substrate skeleton updated
   - §13 worked example refs updated

Per feedback_self_hosting_md_authority_audit_before_substrate_naming.md:
same-name carriers across namespaces invite confusion; namespace clarity
preserved.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Inline BLOCKING at docs/design-decomposition-algebra.md:154 addressed in commit 924589d8f.

§5 Gap 2 RETRACTED — no new Lens<S, A> carrier. State-projection in decomp-algebra reuses FreeMonoid<TimestampedEvent<Operation>> + fold (already in dsl/std/algebra.dag:390). Introducing a parallel Lens carrier would have violated INVARIANTS P2 / M9 against the Director-locked Lens<C> 6-field shape at src/v3/std/lens.dag.

§5 Gap 4 RENAMED (preemptive, since the queued findings likely include the parallel Witness collision): Witness → Attestation. The decomp-algebra Attestation is human-intent attestation (drain note, replan reason, etc.); v3 Witness<Carrier> at src/v3/std/dimensions.dag:35 is per-Behavior inhabitance proof. Structurally distinct purposes; rename preserves namespace clarity per feedback_self_hosting_md_authority_audit_before_substrate_naming.md.

Cascade applied across §6 Operation variants (WitnessedOverride → AttestedOverride; ReopenWitness → ReopenAttestation; RegressionWitness → RegressionAttestation), §7 dissolution receipts, §9 substrate skeleton, §13 worked example.

Standing by for the remaining queued findings.

— sent from deep-wolf-155

…ne BLOCKING #2)

Codex BLOCKING inline at docs/design-decomposition-algebra.md:108: prior
dissolution proof would drop stage-bound pipeline coordinate facts
(StageRunKey, ClaimLease, SignalType, PipelineArtifact, ArtifactType,
MetricRecord) used downstream — violates P2 facts-flow-forward.

Grep verified at dsl/gunbc/workflow/types.dag:
- StageRunKey:159 — threads through StageOutcome / PipelineArtifact /
  MetricRecord / RetryDue / TerminalStateReached
- ClaimLease:166 — lease-execution claim
- SignalType:235 — idempotency-keyed signal payload tag
- PipelineArtifact:120,212-214 — stage-output artifact
- ArtifactType:214,226 — artifact taxonomy
- Metrics:225,318 — per-stage telemetry

Fix: only stage-VALUE collapses to (Mode, Phase); run-keyed pipeline
facts remain structurally distinct as forward-flowing coordinates.
Per feedback_projections_must_compose_facts.md + INVARIANTS P2.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Inline BLOCKING at docs/design-decomposition-algebra.md:108 addressed in commit 3d2f36eea.

Grep-verified pipeline facts at dsl/gunbc/workflow/types.dag that the initial dissolution proposal would have dropped:

  • StageRunKey:159 — threads through StageOutcome:184, PipelineArtifact:213, MetricRecord:225, RetryDue:239, TerminalStateReached:243
  • ClaimLease:166 — lease-execution claim
  • SignalType:235 — idempotency-keyed signal payload tag
  • PipelineArtifact:120, 212-214 — stage-output artifact
  • ArtifactType:214, 226 — artifact taxonomy
  • Metrics: MetricRecord:225, artifacts_stored:318

Fix: only the stage-VALUE collapses into (Mode, Phase); the run-keyed pipeline facts remain structurally distinct as forward-flowing coordinates. Per feedback_projections_must_compose_facts.md + INVARIANTS P2 facts-flow-forward. Table added to §4 preserving each fact + its preservation strategy.

— sent from deep-wolf-155

…CKING #3)

Codex BLOCKING inline at docs/design-decomposition-algebra.md:231: prior
"forward-stable subset" framing was still false. Decompose adds children
→ retracts parent closure (COMPOSITE_HAS_OPEN_CHILDREN). Replan adds
reconcile child → same. Declare(Bucket) introduces BUCKET_NOT_DRAINED.
No Operation subset is universally monotonic in canCloseNode.

Fix: drop the monotonicity claim entirely. Replace with typed effects-
per-operation classification — each operation's effect on closure-
eligibility is type-signature-visible. Consumers MUST NOT assume
monotonicity across event-log composition.

Effects-per-operation classification added: Declare/Decompose/Drain/
Replan/Escalate/Pause/Reopen/Regress/AttestedOverride each with explicit
closure-eligibility effect (neutral / improves / retracts).

The only operational invariant retained: every closure-eligibility
transition is witnessed by an explicit Operation; no silent transitions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Inline BLOCKING at docs/design-decomposition-algebra.md:231 addressed in commit 2ad2b2dd1.

Codex is right — the "forward-stable subset" framing was still false. Decompose adds children → parent retracts to COMPOSITE_HAS_OPEN_CHILDREN. Replan adds reconcile child → same. Declare(Bucket) introduces BUCKET_NOT_DRAINED. No Operation subset is universally monotonic in canCloseNode.

Monotonicity claim DROPPED entirely. Replaced with typed effects-per-operation classification — each operation's effect on closure-eligibility is type-signature-visible (neutral / improves / retracts), so consumers know what to expect from each operation explicitly rather than relying on a false universal law.

The only operational invariant retained: every closure-eligibility transition is witnessed by an explicit Operation; no silent transitions.

— sent from deep-wolf-155

… (codex inline BLOCKING #4)

Codex BLOCKING inline at docs/r4-ctrl-dag-migration-project-plan.md:61:
§3 strategy paragraph claimed "contract becomes authority from PR-merge"
which contradicted line 73 staging discipline AND violated INVARIANTS P2
(declarations alone are staging, not landed authority).

Fix: §3 strategy paragraph now explicitly states .dag files are 🟡 STAGED
on merge, NOT 🟢 AUTHORITY. Authority requires generated consumer or
emission target. Trio convergence (emission + parity + cut-over PR
deletes TS file) is the named dissolution trigger.

Consistent with feedback_no_textual_enforcement_bridges.md: textual
claims of authority don't substitute for structural enforcement.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Inline BLOCKING at docs/r4-ctrl-dag-migration-project-plan.md:61 addressed in commit bfde97311.

Codex is right — the §3 strategy paragraph claimed authority-on-PR-merge while line 73's staging discipline (added in prior fix round) walked it back. Internal contradiction violating INVARIANTS P2.

Strategy paragraph now explicitly states .dag files are 🟡 STAGED on merge, NOT 🟢 AUTHORITY. Authority requires a generated consumer or emission target. The named dissolution trigger that retires staged state: trio convergence (emission target + parity test + cut-over PR deletes the TS file). The phased framing (Phase 1.5 + Phase 3 + Phase 4 parallel) explicitly times the staged→authority transition per subsystem.

— sent from deep-wolf-155

…t scope (codex inline BLOCKING #5)

Two changes:

1. Codex BLOCKING at line 303: brief template scope bullet still said
   "Practice 4 receipts for any open enum" while acceptance gate #2 (line
   314) said "every enum/sum with ≥2 variants". Aligned scope bullet
   with gate per codex inline BLOCKING #5.

2. Operator directive 2026-05-12T~19:20Z: deep-wolf-155 operates at
   CEO/PM tier above gunbc R3-close Director zesty-bear-812. Ctrl-
   Migration Director spawned as CHILD under PM via dashboard-ops
   work-items create — node://adhoc-dc298bc7-9f7 (status=ready,
   2026-05-12T19:20:39Z). Auto-spawn fires within ~30s.

§5 tree updated to reflect:
- deep-wolf-155 (CEO/PM, root) above zesty-bear-812
- Ctrl-Migration Director as new child of deep-wolf-155
- PM owns inter-program coordination
- Each Director independent on program scope

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Inline BLOCKING at docs/r4-ctrl-dag-migration-project-plan.md:303 addressed in commit f8199ce21.

Codex right — line 303 scope bullet still said "any open enum" while line 314 acceptance gate said "every enum/sum with ≥2 variants." Aligned scope bullet with gate (closed sums in scope; 🟢/🟡/🔴 classification for every N≥2 coproduct).

Also in this commit: program tree updated per operator directive 2026-05-12T~19:20Z. Ctrl-Migration Director spawned as a child under deep-wolf-155 (PM/CEO operating above zesty-bear-812 gunbc R3-close Director) via dashboard-ops work-items create at node://adhoc-dc298bc7-9f7 (status=ready). Auto-spawn fires the new Director session within ~30s.

— sent from deep-wolf-155

Per operator directive 2026-05-12T~19:30Z: parallel program plan to
ctrl-migration. Promotes existing research-viability artifacts at
~/ctrl/research/.../c-compiler-in-dag/ to executing production program.

Existing research is well-developed:
- PLAN.md (Brian-approved 2026-05-04 with A1-A10 locks)
- W0 shared IR primitives (5 files in extdeps/common/ir/)
- W4 LLVM IR spike (DONE — substrate + emit + types + trivial program)
- W7 XLS/Verilog spike (DONE)
- Phase-2 expression evaluator (DONE)
- 3 lens-counterfactual real-world bug case studies
- gunbc src/v3/lenses/ has 16 production lens instances ready to consume

This doc proposes the EXECUTION shape that consumes the research plan:
- Phase A (~1-2 weeks): promote research → production substrate
  (~6-9 PRs moving W0/W4/W7/phase-2-evaluator into gunbc dsl/extdeps/)
- Phase B (~6-12 months parallel): Frontend (W3a + W11) + IR (W2 + W2d)
  + Lens-Application (W8 + W10) + Pressure-Test
- Phase C (multi-month): emission targets (codegen, runtime, linker)
- Phase D (open-ended): "LLVM entirely" if pursued

Proposed program tree: NEW C-Compiler+LLVM Director under PM/CEO,
parallel to zesty-bear-812 (gunbc R3-close) + clever-ant-97 (ctrl-
migration). 5 Mgrs (Substrate, Frontend, IR, Lens-Application,
Pressure-Test).

Scope decision required (Q-A): interpretation (a) "C frontend + LLVM IR
substrate" (existing research scope; proposed) vs (b) "LLVM entirely"
(optimizer + codegen as .dag; multi-year).

6 open Qs for operator decision (§9).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls briansrls changed the title docs: ctrl/ → .dag migration — scoping + project plan docs: ctrl/ migration + C compiler + LLVM .dag — 3 parallel program plans May 12, 2026
…aude #10327 exploratory observations)

Per claude #10327 review observations on PR #2775 (APPROVE-with-exploratory):

1. "Ambitious blast radius for a plan in DRAFT; worth a checkpoint after
   Wave 1 lands one full trio (algebra ✓ + subsystem ✓ + emission ✓)
   before fanning the rest out, otherwise you risk 16 staged .dag files
   with no dissolution receipts firing."

   → §7 now requires WAVE-1-TRIO CHECKPOINT at ~Day 7-10 before Wave 2
   dispatch. If trio doesn't converge by Day 10, pause Wave 2 + surface
   to PM for re-scope.

2. "Parallel ≠ independent: Phase 1.5 PRs that land before their
   matching Phase 3 emission target are deliberately accepting staged-
   debt, and the Verification Mgr is the throttle."

   → §6 now states parallel-with-throttle explicitly. Verification Mgr
   enforces staged-debt budget: if 3+ subsystems merged with no matching
   emission, Subsystem-Modeling Mgr PAUSES new dispatch until catch-up.

Both observations were exploratory (review verdict was APPROVE not
BLOCKING), but substantive design feedback worth incorporating
structurally rather than acknowledging.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Addressing claude #10327's two exploratory observations in commit ad2f6e40a (APPROVE-with-exploratory, not BLOCKING — but worth incorporating structurally):

Observation 1 — "ambitious blast radius for a plan in DRAFT; worth a checkpoint after Wave 1 lands one full trio before fanning the rest out, otherwise 16 staged .dag files with no dissolution receipts firing."

→ §7 now requires WAVE-1-TRIO CHECKPOINT at ~Day 7-10 before Wave 2 dispatch. Verification Mgr validates one Wave-1 subsystem's full trio (algebra ✓ + Phase 1.5 modeling PR merged ✓ + Phase 3 emission target landed ✓ + parity test passes ✓). If trio fails to converge by Day 10, pause Wave 2 + surface to PM for re-scope.

Observation 2 — "parallel ≠ independent: Phase 1.5 PRs that land before their matching Phase 3 emission target are deliberately accepting staged-debt, and the Verification Mgr is the throttle."

→ §6 now states parallel-with-throttle explicitly. Verification Mgr enforces a staged-debt budget: if 3+ subsystems have merged 🟡 STAGED .dag files with no matching Phase 3 emission target landed, Subsystem-Modeling Mgr PAUSES new Phase 1.5 dispatch until Emission-Targets Mgr catches up. Prevents runaway staged-debt accumulation.

Both observations were exploratory (verdict APPROVE not BLOCKING) but substantive design feedback worth landing structurally rather than just acknowledging.

— sent from deep-wolf-155

Per operator directive 2026-05-12T~20:00Z: "define the remainder of R3
now, including all dependencies, so we can max parallelize all the work."

Comprehensive audit of §1.8 ledger:
- 102 R3-load-bearing gates total
- ~32 CLOSED (31%); ~40 IN-FLIGHT (39%); ~31 OPEN (30%)
- 2 lanes 100% done: T-Omni-Shape-B, T-Free-Consequences-Demonstration
- Standing gate #75 PASSING

Critical-path identified:
- Cluster M (T-Tests-As-Data-Completeness): gate #84 dissolves ~80-90 of
  101 SG-0 hand-Rust test entries in single closure. Phase 1 (#85/#86
  substrate) dispatch-ready NOW. Total 4-8w to full Cluster M closure.
- Cluster F (T-LP-Retirement): gates #81/#82/#83/#95 carve-promoted-IN-R3
  per Director 2026-05-09. F-α + F-β.1 parallel-dispatchable NOW.
  Total 3-4w to full Cluster F closure.

14 gates identified as dispatch-ready NOW (no prerequisite blocking).
Wave-1 dispatch plan covers 13-15 parallel workers across 3 R3 Mgrs.

Worker spawn capacity analysis:
- Substrate Mgr: 16 max, 1 active → +15 budget
- Debt-Paydown Mgr: 8 max, 0 active → +8 budget
- Verification Mgr: 8 max, 3 active → +5 budget
- Total +28 R3 spawn budget; currently at ~5; can scale 5-6x

Throughput levers ranked:
1. Land review-parser fix (eliminates per-PR PM bypass overhead)
2. Pre-author Wave-1 briefs in bulk
3. Spawn to Mgr capacity
4. Cluster M Phase 1 immediate dispatch (critical-path)
5. F-β.1 canvas immediate authoring
6. PB Mgr successor spawn (currently no active session)
7. Class-authorization batch merges (Director-ratified)

6 open Qs for operator decision.

Honest 6-8 week timeline to R3 close-ready with full Wave-1 dispatch
+ brief queue depth + parser fix landing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls
briansrls merged commit 0cff473 into main May 12, 2026
5 checks passed
@briansrls
briansrls deleted the design/decomposition-algebra-draft branch May 12, 2026 20:05
@briansrls

Copy link
Copy Markdown
Contributor Author

Both cursor/composer-2 BLOCKING findings (review #10356) verified valid and fix-forwarded in #2780:

Finding 1 — docs/design-decomposition-algebra.md:492 INVARIANTS labels corrected. Verified against INVARIANTS.md:

  • P1 line 11/23 = "Modeling Faithfulness" (not single-authority — that's a consequence)
  • P2 line 12/144 = "Boundary Discipline" (illegal-states-unrepresentable is docs/modeling-discipline.md Practice 2, downstream)
  • P5 line 15/290 = "Progress Is Dissolution" (Pure Bootstrap is the separate docs/design-pure-bootstrap-zero.md thesis)

Finding 2 — docs/r4-c-compiler-and-llvm-in-dag-program-plan.md:246 §8 reconciled with §3. Confirmed the inconsistency was real: §3 describes ~6-9 PRs of .dag substrate promotion into dsl/extdeps/ (real tree additions); §8 said "doc-shape promotion only" which contradicted that. Reframed: "no compiler RUNTIME code in Phase A" — .dag substrate authoring IS the Phase A work; what's excluded is Rust runtime / parser-emitter execution / codegen invocation (Phase B / Phase C).

Fix-forward: #2780.

— sent from deep-wolf-155

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: 1915de6a · Trigger: schedule
  • Thinking: 270s wall

BLOCKING (4)

Root Cause

  • docs/design-decomposition-algebra.md The Reopen/Regress correction was applied to the conceptual section but not propagated to the substrate skeleton → make §9’s Operation enum and receipts match the closure-retraction operation set.
  • docs/r4-ctrl-dag-migration-project-plan.md Stale sequential-dispatch text survived the ASAP parallel rewrite → update §7 to match §5/§6/§10 with four Day-1 managers, no co-authority window, and Wave 2 gated by the trio checkpoint.
  • docs/r4-c-compiler-and-llvm-in-dag-program-plan.md Phase A promotes research scaffolds by destination path instead of first classifying each concept against std/ and external specs → add an M9/extdeps-fidelity gate before promotion.

Non-blocking — Strengths

  • docs/design-decomposition-algebra.md Classified as design/docs (c); review focused on thesis alignment, PM intent preservation, and design assumptions.

Non-blocking — Improvements (fix in-PR if easy, else defer to roadmap)

  • docs/r3-remaining-work-dependency-graph.md The T-Workflow-As-Data row reports Total 8 while the status columns sum to 12; fix the arithmetic so R3 dispatch planning stays auditable for the T-Workflow-As-Data lane.

⚠️ The prior comments are resolved, but the remaining plan/skeleton inconsistencies would steer follow-on work into lossy or parallel-authority shapes.

| ProseAttestation { text: String }

// === Operation (closed sum, TERMINAL) ===
type Operation = // 🟢 TERMINAL

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BLOCKING: The §9 substrate Operation sketch omits Reopen and Regress even though §6 makes them required witnessed closure-retraction operations, so the implementation outline silently drops facts in violation of INVARIANTS P2 facts-flow-forward.


**Day 1**:
- Director ratifies project plan + companion scope doc
- Director spawns 3 Mgr sessions (Substrate / Subsystem-Modeling / Verification)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BLOCKING: §7 still spawns only three managers and defers Emission-Targets despite §6 and §10 making emission a parallel critical path, which weakens the P5 staged-debt guard.

- Worker L: `dsl/ctrl/pools.dag` (catalog #7 — big 7-file group)
- Worker M: `dsl/ctrl/scheduler.dag` (catalog #9)
- Worker N: `dsl/ctrl/chatgpt_reviewer.dag` (catalog #13 — partial; contract today, browser-execution deferred)
- Review verdict (catalog #1) parallel-tracked under operator's existing text-parsing fix work; merges in as a co-authority once both stabilize.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BLOCKING: Review verdict “merges in as a co-authority” contradicts the no-co-authority window and creates parallel authority under INVARIANTS P2.

- `product.dag` — product type
- `ssa_value.dag` — SSA value primitive

**Promotion**: `dsl/extdeps/common/ir/` in gunbc per PLAN.md §"Bidirectional-extdeps reframe."

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BLOCKING: Promoting shared IR primitives wholesale into dsl/extdeps/common/ir without an M9/std reuse and extdeps-spec grounding gate risks parallel substrate for existing std.bit, std.integer, and std.constructors.Product.

@briansrls

Copy link
Copy Markdown
Contributor Author

Operator (briansrls) + codex BLOCKING batch closure — fix-forwarded in #2788.

5 BLOCKINGs addressed:

  1. r4-ctrl plan:189 (operator BLOCKING Add SVG viz, test helpers, and makegen scaffold #1) — Practice 4 receipt scope corrected: "any open enum" → "every enum/sum with ≥2 variants (including closed sums)" per docs/modeling-discipline.md Practice 4.

  2. design-decomposition-algebra.md §9 (operator BLOCKING Codex/graph viz test helpers #2 + codex BLOCKING Add SVG viz, test helpers, and makegen scaffold #1, two-reviewer convergence) — §9 Operation enum extended with Reopen + Regress variants matching §6 closure-retraction operations (lines 264-265, 271-303, 318-319). Added preamble citing INVARIANTS P2 (facts-flow-forward); ReopenAttestation/RegressionAttestation carriers noted as imported from §6 declaration set.

  3. r4-ctrl plan §7 (operator BLOCKING . #3 + codex BLOCKING Codex/graph viz test helpers #2, two-reviewer convergence) — 3-mgr stale text replaced with 4-mgr parallel Day-1 spawn (Substrate / Subsystem-Modeling / Emission-Targets / Verification) per §6 parallel critical-path framing. Emission-Targets is NOT Day-N-deferred; deferring it weakened the P5 staged-debt guard. Day-1 design briefs for HTTP/SQL/audit-event extdeps added so Phase 3 PRs land in lockstep with Phase 1.5 modeling PRs.

  4. r4-ctrl plan:281 (operator BLOCKING Consolidate binaries into gunbc-dag package #4) — "merges in as a co-authority once both stabilize" framing replaced with explicit no-co-authority cut-over per Q-G operator directive 2026-05-12T~19:05Z: "cut-over PR lands when emission proves out AND deletes TS authority in the same PR".

  5. r4-c-compiler plan:54 (operator BLOCKING Add cloud resource + secret modeling with DAG upsert patterns #5 + codex BLOCKING . #3, two-reviewer convergence) — W0 wholesale promotion replaced with per-concept M9/std-reuse + extdeps-spec grounding gate. Explicit per-file decision matrix (bitvector → extend std.bit; integer → reuse std.integer; array → reuse std container primitives; product → reuse std.constructors.Product; ssa_value → new extdeps carrier with SSA spec citation). Prevents parallel substrate for existing std primitives.

1 non-blocking improvement addressed:
6. r3-dep-graph T-WAD row — Total reconciled from 8 to 12 (matching status-column sum 4+3+5); footnote flags 2-gate delta vs canonical §1.8 count (10) for status-drift sweep post-Wave-1 cleanup. Arithmetic restored for dispatch-planning auditability.

Two-reviewer convergence note: 3 of the 5 BLOCKINGs (#2, #3, #5) were flagged independently by both operator and codex. Per feedback_independent_cross_validation, that convergence is structural-fact signal. The other 2 (operator #1 + #4) are single-reviewer but corroborated against discipline (Practice 4 + Q-G no-co-authority).

Fix-forward: #2788.

— sent from deep-wolf-155

briansrls added a commit that referenced this pull request May 12, 2026
…wording (#2780)

* docs: decomposition-algebra modeling project (DRAFT)

Operator-supplied premise: project decomposition as algebra where children sum to parent meaning; walk-back when integration contradicts construction.

This draft formalizes:
- §1 The contradiction trigger (algebraic imbalance | claim contradiction)
- §2 Types sketch (Node, Claim, Decomposition, Witness, WalkBackEvent) — gunbc-lens-style; eventual home in dsl/std/ as MeaningDecomposition lens analogous to Cost lens
- §3 Walk-back algorithm (procedure with StableAncestor | RootContested termination)
- §4 Worked example — PR #2745 misread retroactively traced through procedure (2026-05-12 PM execution error)
- §5 Dashboard comms application sketch — message-as-walk-back-signal mapping
- §6 Open questions (coefficient semantics, claim equivalence, root-asker, rebalance cost, implementation surface)
- §7 Next step: validate on N=3-5 real cases before .dag formalization

Iteration expected.

* docs: decomposition-algebra rewrite for ctrl/ migration scoping

Replaces procedural walk-back draft (d534fd4) with structural-integration
shape per operator directive 2026-05-12: migrate ctrl/ processes into .dag
substrate; algebra is authoritative, ctrl/ TS becomes projected emission.

Audit-grounded with grep-verified citations across dsl/std/ + ctrl PR refs
(#1192/#1193/#1195/#1197). Identifies 4 modeling gaps (EventLog<T> primitive,
Lens<A,B> type, bounded multiplicity, unified Witness) + workflow-types
dissolution scope (dsl/gunbc/workflow/types.dag overlaps with decomp-algebra;
proposed dissolution rather than coexistence). First-cut migration target
recommended: review-verdict-parser (today's parser-lag pain validates the
heuristic-pass cost per feedback_lenses_not_passes).

Phase 1 substrate-file skeleton (~50 lines) sketched. Cost-of-change
contract = 1 file for new Mode variants / Operation arms.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(decomp-algebra): inline §13 validation case study; drop git-history cross-ref

Addresses claude #10308 review finding: §13's pointer to "previous draft in
git history at d534fd4" was a quirk for a brand-new file (per reviewer:
harmless but worth fixing). Inlines the PR #2745 misread walk-back trace
self-contained so readers don't need to git-log to follow the validation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs: ctrl/ → .dag migration project plan (parallel program tree)

Companion to docs/design-decomposition-algebra.md. Authored per operator
directive 2026-05-12: parallel program tree beside zesty-bear-812, model
dependencies, migrate as much ctrl/ as possible ASAP.

Audit of ctrl/ via gh API identifies:
- 3 partial .dag files already in ctrl (workflows/review.dag etc.)
- ~17 TS subsystems with documented designs in scripts/session-dashboard/
- 4 in-flight algebra PRs #1192-#1197 (decomposition algebra series)
- Top-level constitutional docs (AGENTS/AUDIT/CODING/INVARIANTS/REVIEW_*/SCOPE_*/TESTING)

Plan structure:
- Phase 1: algebra substrate (dsl/std/process_algebra.dag)
- Phase 1.5: 5-8 parallel subsystem modeling PRs (doc-only, type-only)
  Items 1/3/4/5/6 can start NOW without Phase 1
- Phase 2: CLI projection to Rust binary
- Phase 3: HTTP/SQL/audit-event extdeps (R4 emission targets)
- Phase 4: ctrl/ cut-over per subsystem
- Phase 5: generalize

Proposes Ctrl-Migration Director parallel to gunbc R3-close Director;
3 Mgrs (Substrate/Subsystem-Modeling/Verification), Emission-Targets Mgr
spawned later. First-week concrete actions named.

6 open Qs for operator decision: file placement (gunbc vs ctrl), Director
shape, workflow-types dissolution scope, first migration target, ctrl PR
#1192-#1197 disposition, cross-Director coordination protocol.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(project-plan): comprehensive ctrl/ subsystem catalog (16 subsystems)

Per operator directive 2026-05-12T~18:55Z: audit ALL session-dashboard
work + identify what can migrate today. Gh-API audit of gunb-ai/ctrl
identified ~21,800 TS LOC across 16 subsystems.

Key findings:
- Existing demo precedent at research/.../inbox_delivery_slice.dag proves
  the `service` + typed-functions shape works today (~90% done already)
- 237 .mjs files in scripts/session-dashboard/ organized into ~16 subsystems
- ~20 .mjs in chatgpt-reviewer/ (browser DOM walking; partial-doable now)
- 3 .mjs in api-reviewer/ (CLI backend selection)
- 3 partial .dag in workflows/ (review, branch_review, review_config)

Strategy shift: model SERVICE CONTRACTS (types + typed function signatures
+ pure helpers), not just types. Demo proves it works today.

Subsystems classified:
- 8 items independent NOW (no Phase 1 dependency) — parallel first wave
- 6 items consume Phase 1 algebra substrate — second wave
- 2 items partial-NOW (chatgpt-reviewer browser, server HTTP routes)
- ~16 PRs total for Phase 1.5 (bundled by subsystem)

Operator-resolved Qs:
- Q-A: gunbc-side placement (dsl/ctrl/*.dag)
- Q-D: review-verdict already in flight per operator

New Qs added:
- Q-G: service-contract authority claim (future vs co vs substrate)
- Q-H: per-subsystem PR cadence (bundle by subsystem, ~16 PRs total)

First-wave dispatch updated: 8 workers parallel Day 2-5; 6 more Day 6-10.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(project-plan): replace-ASAP framing + parallel critical paths

Per operator directive 2026-05-12T~19:05Z: this is replacement, not
"future authority"; emission targets are critical-path parallel with
algebra substrate, not deferred. 4 Mgrs spawn Day 1 (not 3).

Changes:
- §1 Mission: replace dashboard ASAP; intent layer THIN, substrate
  rigor; compositional-modeling discipline (M9 DFS, lens-not-pass,
  cost-of-change = 1)
- §5 Program tree: orthogonal to zesty-bear-812 confirmed; 4 Mgrs
  (Substrate / Subsystem-Modeling / Emission-Targets / Verification)
  spawn together Day 1
- §6 Phase sequencing: Phase 1 + 1.5 + 3 in PARALLEL, all critical
  path. Per-subsystem cut-over fires as trio converges.
- §10 First-week actions: Emission-Targets Mgr spawns Day 1 not Day-N
- §11 Q-G RESOLVED: substrate becomes authority immediately when
  emission proves out per subsystem; no co-authority window

Three operator Qs resolved this session: A (gunbc-side), D (review-
verdict in flight), G (replace-immediately).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs: address codex BLOCKING review #10331 (5 findings on PR #2775)

All 5 findings valid; substantive review, real gaps. Fixed in-place
rather than reply-without-fix.

Finding 1 — audit scope correction (LIVE V3 LENS SUBSTRATE):
prior audit scoped to dsl/std/ only; missed src/v3/std/lens.dag
(Director-locked 6-field Lens<C>) + src/v3/std/dimensions.dag:35
(Witness<Carrier> = Inhabits | Violates) + src/v3/std/coproduct_projection.dag
(Practice 4 dispatch substrate) + ~16 worked lens instances in
src/v3/lenses/. §3 mapping table corrected with these as ✓ EXISTS.

Finding 2 — workflow-types dissolution axis conflation:
§4 initial proposal conflated decomposition axis (Mode) with workflow
phase axis (IssueLifecycleStage). Corrected to preserve both as
structural coordinates (Mode × Phase product) per Practice 4 dimensional
dissolution. Phase open enum staged with dissolution trigger =
per-consumer enumeration. Until proof lands, workflow-types stay extant;
decomp-algebra co-located not replacing.

Finding 3 — Reopen/Regress operations added:
prior §6 claimed monotonicity (canCloseNode ≥ on composition) without
explicit reverse operations. Added Reopen { ReopenWitness } + Regress
{ RegressionWitness } operations with typed witness payloads. Replaced
monotonicity claim with closure-decision lattice: forward-stable subset
preserves; Reopen/Regress/Replan/Escalate explicitly retract closure
state with witnessed cause. No silent regression.

Finding 4 — staging discipline for catalog:
§3 catalog preamble corrected: every "doable NOW" row is STAGED with
explicit dissolution trigger, NOT authoritative-on-arrival. Trigger =
per-subsystem realization receipt + consumer parity (emission target
+ parity test + cut-over PR deletes TS). 🟡 STAGED until trigger fires.

Finding 5 — Practice 4 coverage widened:
§8 brief template gate 2 changed from "Practice 4 receipts on any open
enum" to "every enum/sum with ≥2 variants" (closed sums need
dissolution analysis too). Receipt format named (classification +
pattern + trigger). STOP criterion added: closed sum with no clear
dissolution pattern surfaces to Director.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(decomp-algebra): address codex inline BLOCKING — Lens/Witness parallel authority

Codex BLOCKING inline at docs/design-decomposition-algebra.md:154 + queued
companion: §5 Gap 2 proposed `Lens<S, A> { view, update }` and Gap 4
proposed `Witness { author, ... }` — both create parallel authority with
v3 substrate (Lens<C> at src/v3/std/lens.dag, Witness<C> at
src/v3/std/dimensions.dag:35).

Fixes per INVARIANTS P2 (single-authority) + MODELING.md M9 (DFS concept
DAG before defining):

1. Gap 2 RETRACTED — no new Lens carrier. State-projection in
   decomp-algebra reuses FreeMonoid<TimestampedEvent<Operation>> + fold
   (already in dsl/std/algebra.dag:390). If a future bidirectional-update
   use case surfaces, escalate to Substrate Mgr for shape audit.

2. Gap 4 RENAMED — decomp-algebra's "Witness" → "Attestation" to avoid
   name collision with v3 Witness<Carrier>. The carriers are
   structurally distinct (Attestation is human-intent attestation;
   v3 Witness<C> is per-Behavior inhabitance proof). Cascade applied:
   - Operation variants: attestation: Attestation
   - WitnessedOverride → AttestedOverride
   - ReopenWitness → ReopenAttestation
   - RegressionWitness → RegressionAttestation
   - Evidence enum → AttestationEvidence
   - StructuralLens → StructuralLensReceipt (refs v3 Lens<C> instance)
   - §7 dissolution receipt updated
   - §9 substrate skeleton updated
   - §13 worked example refs updated

Per feedback_self_hosting_md_authority_audit_before_substrate_naming.md:
same-name carriers across namespaces invite confusion; namespace clarity
preserved.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(decomp-algebra): preserve stage-bound pipeline facts (codex inline BLOCKING #2)

Codex BLOCKING inline at docs/design-decomposition-algebra.md:108: prior
dissolution proof would drop stage-bound pipeline coordinate facts
(StageRunKey, ClaimLease, SignalType, PipelineArtifact, ArtifactType,
MetricRecord) used downstream — violates P2 facts-flow-forward.

Grep verified at dsl/gunbc/workflow/types.dag:
- StageRunKey:159 — threads through StageOutcome / PipelineArtifact /
  MetricRecord / RetryDue / TerminalStateReached
- ClaimLease:166 — lease-execution claim
- SignalType:235 — idempotency-keyed signal payload tag
- PipelineArtifact:120,212-214 — stage-output artifact
- ArtifactType:214,226 — artifact taxonomy
- Metrics:225,318 — per-stage telemetry

Fix: only stage-VALUE collapses to (Mode, Phase); run-keyed pipeline
facts remain structurally distinct as forward-flowing coordinates.
Per feedback_projections_must_compose_facts.md + INVARIANTS P2.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(decomp-algebra): drop false monotonicity claim (codex inline BLOCKING #3)

Codex BLOCKING inline at docs/design-decomposition-algebra.md:231: prior
"forward-stable subset" framing was still false. Decompose adds children
→ retracts parent closure (COMPOSITE_HAS_OPEN_CHILDREN). Replan adds
reconcile child → same. Declare(Bucket) introduces BUCKET_NOT_DRAINED.
No Operation subset is universally monotonic in canCloseNode.

Fix: drop the monotonicity claim entirely. Replace with typed effects-
per-operation classification — each operation's effect on closure-
eligibility is type-signature-visible. Consumers MUST NOT assume
monotonicity across event-log composition.

Effects-per-operation classification added: Declare/Decompose/Drain/
Replan/Escalate/Pause/Reopen/Regress/AttestedOverride each with explicit
closure-eligibility effect (neutral / improves / retracts).

The only operational invariant retained: every closure-eligibility
transition is witnessed by an explicit Operation; no silent transitions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(project-plan): correct authority claim per P2 staging discipline (codex inline BLOCKING #4)

Codex BLOCKING inline at docs/r4-ctrl-dag-migration-project-plan.md:61:
§3 strategy paragraph claimed "contract becomes authority from PR-merge"
which contradicted line 73 staging discipline AND violated INVARIANTS P2
(declarations alone are staging, not landed authority).

Fix: §3 strategy paragraph now explicitly states .dag files are 🟡 STAGED
on merge, NOT 🟢 AUTHORITY. Authority requires generated consumer or
emission target. Trio convergence (emission + parity + cut-over PR
deletes TS file) is the named dissolution trigger.

Consistent with feedback_no_textual_enforcement_bridges.md: textual
claims of authority don't substitute for structural enforcement.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(project-plan): Ctrl-Migration Director spawned + line 303 receipt scope (codex inline BLOCKING #5)

Two changes:

1. Codex BLOCKING at line 303: brief template scope bullet still said
   "Practice 4 receipts for any open enum" while acceptance gate #2 (line
   314) said "every enum/sum with ≥2 variants". Aligned scope bullet
   with gate per codex inline BLOCKING #5.

2. Operator directive 2026-05-12T~19:20Z: deep-wolf-155 operates at
   CEO/PM tier above gunbc R3-close Director zesty-bear-812. Ctrl-
   Migration Director spawned as CHILD under PM via dashboard-ops
   work-items create — node://adhoc-dc298bc7-9f7 (status=ready,
   2026-05-12T19:20:39Z). Auto-spawn fires within ~30s.

§5 tree updated to reflect:
- deep-wolf-155 (CEO/PM, root) above zesty-bear-812
- Ctrl-Migration Director as new child of deep-wolf-155
- PM owns inter-program coordination
- Each Director independent on program scope

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs: C compiler + LLVM in .dag execution promotion plan

Per operator directive 2026-05-12T~19:30Z: parallel program plan to
ctrl-migration. Promotes existing research-viability artifacts at
~/ctrl/research/.../c-compiler-in-dag/ to executing production program.

Existing research is well-developed:
- PLAN.md (Brian-approved 2026-05-04 with A1-A10 locks)
- W0 shared IR primitives (5 files in extdeps/common/ir/)
- W4 LLVM IR spike (DONE — substrate + emit + types + trivial program)
- W7 XLS/Verilog spike (DONE)
- Phase-2 expression evaluator (DONE)
- 3 lens-counterfactual real-world bug case studies
- gunbc src/v3/lenses/ has 16 production lens instances ready to consume

This doc proposes the EXECUTION shape that consumes the research plan:
- Phase A (~1-2 weeks): promote research → production substrate
  (~6-9 PRs moving W0/W4/W7/phase-2-evaluator into gunbc dsl/extdeps/)
- Phase B (~6-12 months parallel): Frontend (W3a + W11) + IR (W2 + W2d)
  + Lens-Application (W8 + W10) + Pressure-Test
- Phase C (multi-month): emission targets (codegen, runtime, linker)
- Phase D (open-ended): "LLVM entirely" if pursued

Proposed program tree: NEW C-Compiler+LLVM Director under PM/CEO,
parallel to zesty-bear-812 (gunbc R3-close) + clever-ant-97 (ctrl-
migration). 5 Mgrs (Substrate, Frontend, IR, Lens-Application,
Pressure-Test).

Scope decision required (Q-A): interpretation (a) "C frontend + LLVM IR
substrate" (existing research scope; proposed) vs (b) "LLVM entirely"
(optimizer + codegen as .dag; multi-year).

6 open Qs for operator decision (§9).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(project-plan): Wave-1-trio checkpoint + staged-debt throttle (claude #10327 exploratory observations)

Per claude #10327 review observations on PR #2775 (APPROVE-with-exploratory):

1. "Ambitious blast radius for a plan in DRAFT; worth a checkpoint after
   Wave 1 lands one full trio (algebra ✓ + subsystem ✓ + emission ✓)
   before fanning the rest out, otherwise you risk 16 staged .dag files
   with no dissolution receipts firing."

   → §7 now requires WAVE-1-TRIO CHECKPOINT at ~Day 7-10 before Wave 2
   dispatch. If trio doesn't converge by Day 10, pause Wave 2 + surface
   to PM for re-scope.

2. "Parallel ≠ independent: Phase 1.5 PRs that land before their
   matching Phase 3 emission target are deliberately accepting staged-
   debt, and the Verification Mgr is the throttle."

   → §6 now states parallel-with-throttle explicitly. Verification Mgr
   enforces staged-debt budget: if 3+ subsystems merged with no matching
   emission, Subsystem-Modeling Mgr PAUSES new dispatch until catch-up.

Both observations were exploratory (review verdict was APPROVE not
BLOCKING), but substantive design feedback worth incorporating
structurally rather than acknowledging.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(r3): remaining-work dependency graph + max-parallelization plan

Per operator directive 2026-05-12T~20:00Z: "define the remainder of R3
now, including all dependencies, so we can max parallelize all the work."

Comprehensive audit of §1.8 ledger:
- 102 R3-load-bearing gates total
- ~32 CLOSED (31%); ~40 IN-FLIGHT (39%); ~31 OPEN (30%)
- 2 lanes 100% done: T-Omni-Shape-B, T-Free-Consequences-Demonstration
- Standing gate #75 PASSING

Critical-path identified:
- Cluster M (T-Tests-As-Data-Completeness): gate #84 dissolves ~80-90 of
  101 SG-0 hand-Rust test entries in single closure. Phase 1 (#85/#86
  substrate) dispatch-ready NOW. Total 4-8w to full Cluster M closure.
- Cluster F (T-LP-Retirement): gates #81/#82/#83/#95 carve-promoted-IN-R3
  per Director 2026-05-09. F-α + F-β.1 parallel-dispatchable NOW.
  Total 3-4w to full Cluster F closure.

14 gates identified as dispatch-ready NOW (no prerequisite blocking).
Wave-1 dispatch plan covers 13-15 parallel workers across 3 R3 Mgrs.

Worker spawn capacity analysis:
- Substrate Mgr: 16 max, 1 active → +15 budget
- Debt-Paydown Mgr: 8 max, 0 active → +8 budget
- Verification Mgr: 8 max, 3 active → +5 budget
- Total +28 R3 spawn budget; currently at ~5; can scale 5-6x

Throughput levers ranked:
1. Land review-parser fix (eliminates per-PR PM bypass overhead)
2. Pre-author Wave-1 briefs in bulk
3. Spawn to Mgr capacity
4. Cluster M Phase 1 immediate dispatch (critical-path)
5. F-β.1 canvas immediate authoring
6. PB Mgr successor spawn (currently no active session)
7. Class-authorization batch merges (Director-ratified)

6 open Qs for operator decision.

Honest 6-8 week timeline to R3 close-ready with full Wave-1 dispatch
+ brief queue depth + parser fix landing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs: fix cursor #10356 findings — correct INVARIANTS labels + Phase A scope wording

Both BLOCKING findings on already-merged PR #2775 (cursor/composer-2 review #10356):

1. docs/design-decomposition-algebra.md:492 — INVARIANTS labels were wrong:
   - P1 is "Modeling Faithfulness" (single-authority is a consequence)
   - P2 is "Boundary Discipline" (illegal-states-unrepresentable is
     docs/modeling-discipline.md Practice 2, downstream of P2)
   - P5 is "Progress Is Dissolution" (Pure Bootstrap is the separate
     docs/design-pure-bootstrap-zero.md thesis)

2. docs/r4-c-compiler-and-llvm-in-dag-program-plan.md:246 — §8 said
   Phase A is "doc-shape promotion only" but §3 describes ~6-9 PRs
   promoting .dag substrate into dsl/extdeps/. Reconciled: "no compiler
   runtime code in Phase A" — typed .dag substrate promotion IS the work
   (real tree additions); Rust runtime / parser-emitter execution /
   codegen invocation are Phase B / Phase C scope.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request May 12, 2026
…-blocking) (#2788)

* docs: fix PR #2775 operator+codex BLOCKING batch (5 BLOCKINGs + 1 non-blocking)

Operator (briansrls) + codex BLOCKING reviews on already-merged PR #2775:

1. r4-ctrl plan line 189 — "Practice 4 dissolution receipt for any open enum"
   reframed to "every enum/sum with ≥2 variants (including closed sums)" per
   modeling-discipline Practice 4 (operator BLOCKING #1)

2. design-decomposition-algebra.md §9 Operation enum — added Reopen + Regress
   variants matching §6 closure-retraction operations; added preamble citing
   INVARIANTS P2 facts-flow-forward; ReopenAttestation/RegressionAttestation
   imports noted (operator BLOCKING #2 + codex BLOCKING #1, two-reviewer
   convergence)

3. r4-ctrl plan §7 Day-1 — 3-mgr stale text replaced with 4-mgr parallel
   Day-1 spawn (Substrate / Subsystem-Modeling / Emission-Targets /
   Verification) per §6 parallel critical-path framing; Emission-Targets
   is NOT Day-N-deferred (operator BLOCKING #3 + codex BLOCKING #2,
   two-reviewer convergence)

4. r4-ctrl plan line 281 — "merges in as a co-authority" framing replaced
   with "cut-over PR lands when emission proves out AND deletes TS authority
   in the same PR (no co-authority window per Q-G operator directive)"
   (operator BLOCKING #4)

5. r4-c-compiler plan W0 promotion (line 54) — added M9/std-reuse +
   extdeps-spec grounding gate before Phase A promotion; explicit per-file
   decision matrix (bitvector/integer/array/product/ssa_value) with
   reuse-or-extend defaults to prevent parallel substrate for std.bit,
   std.integer, std.constructors.Product (operator BLOCKING #5 + codex
   BLOCKING #3, two-reviewer convergence)

6. r3-dep-graph T-WAD row arithmetic — Total reconciled from 8 to 12
   (matching status-column sum 4+3+5); footnote flags 2-gate delta vs
   canonical §1.8 count = 10 for status-drift sweep post-Wave-1
   (codex non-blocking improvement)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs: fix PR #2788 operator+codex BLOCKING batch — array cardinality + dual-schedule + prose-only import

Operator (briansrls) + codex BLOCKING reviews on PR #2788. Two-reviewer
convergence on findings #1 and #2.

1. r4-c-compiler plan array.dag promotion (line 61) — fix-forward gate
   originally allowed "reuse List<T> / fixed-size array" which drops LLVM
   array's cardinality fact ([N x T]) per INVARIANTS P2 facts-flow-forward
   / MODELING M9. Rewritten with MUST-preserve-cardinality requirement +
   3 concrete options (FixedArray/Vector reuse if exists, List<T>
   extension, or new LlvmArray<T,N> in std/ BEFORE extdeps); plain
   List<T> reuse explicitly forbidden. (operator BLOCKING #1 + codex
   BLOCKING #1, two-reviewer convergence)

2. r4-ctrl plan dual schedule-authority (line 286) — earlier fix-forward
   added Day-1 Emission-Targets spawn at line 255 but left stale "Day
   11-14: Emission-Targets Mgr spawned" at line 286, creating two
   schedule authorities for P5 staged-debt guard. Rewrote line 286 as
   "Emission-Targets Mgr (already spawned Day 1) continues HTTP/SQL/audit
   extdeps PR cycle ..." matching the trio-convergence framing.
   (operator BLOCKING #2 + codex BLOCKING #2, two-reviewer convergence)

3. design-decomposition-algebra.md §9 ReopenAttestation/RegressionAttestation
   prose-only import — earlier fix-forward note said carriers "imported
   from §6 declaration set" but §6 is a Markdown prose section, not a
   substrate file. Rewrote to clarify: carriers are co-declared in this
   same substrate file (dsl/std/process_algebra.dag) alongside
   Operation; §6 prose is conceptual rationale, not import source.
   (codex non-blocking improvement)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request May 12, 2026
…#2777)

* docs(briefs): R4 ctrl-migration Subsystem-Modeling Mgr standing brief

Phase 1.5 Mgr-tier standing program for the ctrl/ → .dag migration
(parent program tree authored via PR #2775; landing as DRAFT pending
that PR's merge so authority chain is clean).

Operationalizes project-plan §3 (16-subsystem catalog) / §6 (parallel-
critical-path with staged-debt throttle) / §7 (Wave-1 / Wave-2 dispatch
shape) / §8 (per-worker brief template) as the Mgr-tier standing
program. Carries forward 7 cross-role discipline items from MEMORY.md
that apply to every dispatch this lane fires.

Key load-bearing elements:
- Wave-1-trio checkpoint (per claude #10327): block Wave-2 dispatch
  until one full trio (algebra ✓ + Phase 1.5 PR ✓ + Phase 3 emission ✓)
  converges; recommended anchor = catalog #8 (PR digests) for smallest
  Phase 3 footprint
- Staged-debt budget: 3 unmatched Phase 1.5 stagings pauses dispatch
  (structural enforcement, not soft signal)
- Per-worker brief template: Practice-4 receipts for EVERY enum/sum
  with ≥2 variants (per codex #10331 finding #5, not just open enums)
- Wave-1 / Wave-2 split derived from §3 catalog dependency annotations

Mgr session merry-newt-448 / work-item adhoc-5d3bbf79-ce5.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(briefs): scaffold + trio-anchor worker brief + dispatch queue

Per Director ratification of Q1(a) + Q2(b) (msg_c1daa5ae 2026-05-12):

- dsl/ctrl/README.md — scaffold + path/module/receipt conventions
- docs/briefs/r4-ctrl-migration-pr-digests-worker.md — trio-anchor
  worker brief (catalog #8; smallest Phase 3 footprint)
- Mgr-brief Working-state: Director ratifications recorded; artifact
  index added; full 8-item Wave-1 dispatch queue ordered
  smallest-surface-first

Worker briefs for catalog #10/#16/#14/#12/#11/#3/#5 land in follow-up
PRs (one canonical brief per subsystem per
feedback_one_canonical_subissue_per_workitem.md).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(briefs): apply Emission-Mgr placement correction to trio anchor

Per Emission-Targets Mgr deep-ibex-326 msg_c83099ac 2026-05-12:
dsl/extdeps/github/ owns GitHub-API source-of-record facts only.
PR-digest rendering is gunbc-owned, not an extdep field.

Updates:
- pr-digests-worker brief: Phase-3 partner renamed
  dsl/extdeps/github/digest_render.dag → dsl/gunbc/digest_render.dag
  (consumes dsl/extdeps/github/pulls.dag + dsl/std/render.dag)
- pr-digests-worker brief: explicit DO-NOT placement directive in
  acceptance gate 3 + STOP-criterion clarifies new GitHub source
  carriers must land in extdeps, not gunbc
- dsl/ctrl/README.md: 3-tier placement discipline (extdeps =
  third-party facts; gunbc = rendering/projection/policy; std =
  domain-agnostic primitives) explicit in consumer-receipt rule
- Mgr standing brief Working-state: cross-Mgr ping refs recorded;
  placement-correction memorialized; future worker briefs MUST
  name correct placement before dispatch (standing checklist item)

Direct application of feedback_extdeps_header_discriminator_before_
field_placement.md to this lane. Trio anchor no longer gates on
Emission Mgr's HTTP/SQL PR #2778 — converges via parallel
gunbc-owned render landing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(briefs+audit): Director template-revise + receipt-trail ledger

Three concurrent Mgr ratifications landed 2026-05-12 in one cycle:

1. Director clever-ant-97 (msg_0707a7c8 + msg_d1589d17) — template
   revise: replace dsl/extdeps/github/digest_render.dag trigger with
   neutral 3-part Phase-3 trigger (digest source-fact authority +
   gunbc/std render projection + named parity harness green); do NOT
   inflate PullRequest with render/digest fields; update STOP
   criterion to route source-fact gaps to Emission, not invent on
   gunbc side.

2. Emission-Targets Mgr deep-ibex-326 (msg_f9d2bfab) — confirms #8
   trio anchor + extdep-gap finding: pulls.dag has PullRequest/
   PullRequestRef/IssueComment but NOT GithubPr/CiState/ConflictState.
   Initial brief invented those names — direct
   substrate-grep-before-authoring miss. Memorialized in Mgr brief
   self-correction + added grep-real-type-names discipline to
   per-worker-brief checklist.

3. Verification Mgr deep-badger-38 (msg_5f8db22f + msg_6faaf178) —
   receipt-trail ledger ratified. Single SoT landed at
   docs/audit/r4-ctrl-phase15-subsystem-receipt-trail.md with 4-tuple
   bool columns, derived open_receipt_debt flag, count≥3 dispatch-
   pause gate, full ownership division (Subsystem-Modeling owns row
   inserts; Verification owns column semantics + parity flips;
   Emission flips phase3_emission_landed). First row (catalog #8
   placeholder) inserted.

PR-digests worker brief revised:
- Module header carries neutral 3-part Phase-3 trigger
- Service-block sketch uses REAL PullRequest carrier from
  dsl/extdeps/github/pulls.dag (verified on main 2026-05-12)
- CI/conflict input facts noted as source-fact placeholders pending
  Emission-Mgr placement (NOT defined on gunbc side; NOT fields on
  PullRequest)
- STOP criterion updated per Director: route source-fact gaps to
  Emission, narrow to existing PullRequest fields, or wait

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(briefs): narrow trio-anchor scope to smaller-first-path

Per Emission-Targets Mgr deep-ibex-326 msg_c5b7d419 2026-05-12 ratification:
take the smaller first path; do not block trio anchor on new CI/conflict/
mergeability carriers; no pull_digest.dag prerequisite.

PR-digests worker brief:
- Carrier-import scope narrowed to existing PullRequest / PullRequestRef /
  PullReview (ListReviews output) / Diff operation output / IssueComment —
  all verified on main 2026-05-12
- Gunbc-side carriers shrunk: MergeReadinessVerdict reasons derive from
  existing fields only (draft/state/merged_at + review states); no
  CI/conflict reason types
- Service block reduced to 4 signatures: extract_attached_urls /
  render_pr_summary_line / merge_readiness_verdict / classify_rest_fallback
- render_ci_digest + render_conflict_digest deferred to follow-up
  Phase 1.5 PR (post-landing only if parity proves load-bearing)
- STOP criterion replaced: do NOT block this PR on CI/conflict source-fact
  placement; surface unrenderable-digest gaps to Mgr as follow-up routing,
  not prerequisite

Mgr brief Working-state: scope-narrow memorialized; removes Emission-side
prerequisite from trio anchor critical path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(briefs): remove live-file assumption for dsl/std/markdown_render.dag

Per Director clever-ant-97 msg_96a23421 2026-05-12: dsl/std/markdown_render.dag
is NOT on main (verified — only a forward-reference comment in
dsl/std/render.dag mentions it as a future format-specific wrapper).

Citations replaced in both brief files:
- "composing dsl/std/render.dag + dsl/std/markdown_render.dag" →
  "render projection over dsl/std/render.dag; any Markdown-specific
  wrapper is a separate authority decision, not assumed live"
- Director attribution + 2026-05-12 verification date inline

No other behavioral changes; rest of placement correction (source facts
from extdeps.github.pulls, no PullRequest inflation, gunbc-owned digest
projection, receipt ledger shape) remains intact.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(briefs): fix cursor/composer-2 BLOCKING — extdep→gunbc projection

Per cursor/composer-2 review on PR #2777 2026-05-12T20:13Z: two stale
"render-helpers extdep" references in Wave-1-trio rationale sections
contradicted the corrected placement (gunbc-owned render projection,
not extdep) encoded elsewhere in the PR.

- Mgr brief §"Wave-1-trio checkpoint" / Recommended trio anchor:
  "smallest possible Phase 3 deliverable (a render-helpers extdep,
   essentially zero new external authority)" →
  "smallest possible — a gunbc-owned render projection over
   dsl/std/render.dag (proposed dsl/gunbc/digest_render.dag),
   consuming GitHub source facts already in dsl/extdeps/github/pulls.
   dag. Per INVARIANTS P1 + feedback_extdeps_header_discriminator_
   before_field_placement.md: extdeps own third-party source facts;
   rendering/projection is gunbc-owned. The trio's Phase-3 emission
   is NOT an extdep landing."

- PR-digests worker brief §"Wave-1-trio-anchor status":
  "Phase 3 render-helpers extdep ✓" →
  "Phase 3 gunbc-owned render projection over dsl/std/render.dag ✓
   + named parity-harness gate green ✓"
  plus explicit "Phase-3 is gunbc-owned render projection, NOT a new
  extdep" attribution to Director/Emission ratification 2026-05-12

Grep-verified: zero remaining "render-helpers" or "render helpers"
strings across briefs / README / ledger.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(briefs+audit): address operator codex BLOCKING (4 findings, a6bd5f5)

Per operator review on PR #2777 2026-05-12T20:11Z (4 BLOCKING):

#1 Ledger trio gate algebra ambiguity — clarified N/A semantics in
   docs/audit/r4-ctrl-phase15-subsystem-receipt-trail.md: algebra_landed
   ∈ {true, —} is treated as satisfied; only false is unsatisfied.
   open_receipt_debt explicitly does NOT reference algebra_landed (it's
   a per-row receipt, not a global gate). Wave-1-trio gate spelled
   out as the conjunction over the satisfied-set. Admits non-consumer
   trio anchor (catalog #8) without misclassification.

#2 Mgr brief restated throttle predicate — replaced restatement in
   §"Staged-debt budget" with single-source reference to ledger's
   open_receipt_debt + dispatch-pause gate. Mgr enforces; Verification
   owns column semantics; predicate adjustments land in ledger first.

#3 AttachedUrlSource dimensional check miss — split conflated sum
   into two independent coordinates per Practice 4:
   - AttachedUrlContainer: PrBody | IssueCommentBody | PullReviewBody
     | ReviewCommentBody  (source-container dimension)
   - AttachedUrlTextContext: Prose | InlineCode
     (text-context dimension)
   AttachedUrl record now carries both coordinates separately.
   Practice-4 receipts required on both sums.

#4 MergeReadinessVerdict bare-list cardinality — replaced
   NotReady(reasons: List<String>) with structural-cardinality form:
   NotReady { first_reason: String, more_reasons: List<String> }
   The ≥1 invariant is now encoded in the carrier shape; NotReady
   with zero reasons is uninhabitable by construction.

Acceptance gate 2 updated: 4 Practice-4 receipts (was 3) reflecting
dimensional split. Cost-of-change gate updated to cover new variant
additions on both AttachedUrl coordinate sums.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(audit): tighten algebra_landed type to bool | "—"

Reinforces operator-codex BLOCKING #1 (inline at ledger:21) fix landed
in c3eccb3: column type now structurally encodes the N/A admissibility
(was 'bool', now 'bool | "—"') and the evidence cell clarifies that
"—" is a structural assertion of non-consumer-status, not a placeholder
for "unknown". The §"N/A semantics" block remains the authoritative
gate-semantics definition.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(briefs): tighten staged-debt operational-meaning to include parity

Reinforces operator-codex BLOCKING #2 (inline at mgr brief :54) fix
landed in c3eccb3: the §"Staged-debt budget" §-tail operational
paragraph now explicitly states that clearing open_receipt_debt
requires BOTH phase3_emission_landed AND parity_passed (matching the
ledger's predicate exactly), removing the residual "Phase-3 partner"
phrasing that read as ignoring parity. The ledger remains the single
authority for the predicate; this brief defers verbatim.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs: fix competing-authority triggers (operator BLOCKING README:5)

Per operator inline review on PR #2777 dsl/ctrl/README.md:5 2026-05-12
T21:29Z: the README declared trio convergence as the STAGED→AUTHORITY
trigger, while the worker brief header AND the README's own line :3
declared the ctrl-side cut-over (TS deletion) as the authority event.
Two triggers for one authority flip violates INVARIANTS P2/P5 single-
trigger discipline.

Resolution: single-trigger discipline made explicit across all three
files. The ONLY event that flips STAGED → AUTHORITY for a subsystem
is the ctrl PR cut-over (Phase 4) deleting the corresponding TS
files. Trio convergence (algebra + Phase 1.5 PR + Phase 3 emission +
parity) is the *gating precondition* that authorizes cut-over
dispatch, not the authority flip itself.

- dsl/ctrl/README.md §"Authority": rewritten to name cut-over as the
  single trigger; trio as gating precondition.
- worker brief module-header receipt: STAGED → AUTHORITY trigger
  named as the cut-over event; trio reframed as the precondition
  list that authorizes cut-over dispatch.
- Mgr brief §"Wave-1-trio checkpoint": Wave-1-trio convergence
  qualified as "gating precondition for Phase 4 cut-over dispatch,
  NOT itself the STAGED→AUTHORITY flip."

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs: split parity-proof + deletion gates; remove ReviewCommentBody

Two operator BLOCKING findings (codex sha 42218c5 + inline at worker
brief :77) addressed:

#1 (codex BLOCKING / README): tightened §"Authority" to explicitly
   split the two gates by named role, matching the codex framing:
   - Parity-proof gate (readiness): trio convergence; proves the
     .dag substrate can stand in for TS; does NOT itself flip
     authority.
   - Source-authority deletion gate (STAGED → AUTHORITY flip):
     ctrl PR cut-over deleting TS files; only event that flips
     authority; the PR's merge IS the deletion receipt.
   Parity-proof is the precondition for cut-over dispatch; not
   sufficient alone. No overlap window between substrates.

#2 (inline BLOCKING / worker brief :77): AttachedUrlContainer
   widened to include ReviewCommentBody without matching source-fact
   import (extract_attached_urls only takes PullRequest +
   List<IssueComment> + List<PullReview>; no List<ReviewComment>).
   Resolved by dropping ReviewCommentBody from this worker's scope:
   AttachedUrlContainer = PrBody | IssueCommentBody | PullReviewBody,
   one-to-one with the imported source-fact set. ReviewCommentBody
   gates on a follow-up Phase 1.5 PR that adds ListReviewComments
   to imports. Until then no AttachedUrl value can claim a
   ReviewComment source — INVARIANTS P2 single-authority holds.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs: align Wave-1-trio algebra-leg wording with ledger SoT

Per cursor/composer-2 APPROVE_WITH_COMMENTS review on PR #2777
2026-05-12T21:46Z (2 P2 findings + 1 cosmetic):

1. Mgr brief :68 — "algebra ✓ (Phase 1 substrate landed)" omitted
   the ledger's N/A case for non-consumer rows. Rewritten to:
   "algebra_landed ✓ (per ledger N/A semantics: ∈ {true, —} is
   satisfied — non-consumer Wave-1 anchor like catalog #8 satisfies
   this leg with —, does NOT require Phase 1 substrate first)" with
   inline link to ledger §N/A semantics / §Wave-1-trio gate. P2
   compliance: ledger is sole SoT for predicates; brief defers.

2. README §"Authority" parity-proof gate — same shorthand widened
   to ledger-column names + N/A semantics + pointer to ledger as
   single source of truth.

3. Worker brief :39 cosmetic — broken **/doubled-** fixed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request May 12, 2026
…gs) (#2803)

* docs(audit): refresh stale ledger footnote post-#2777 merge

Per Verification Mgr deep-badger-38 (msg_b9efcbd3) + Director
clever-ant-97 (msg_e7c8caa7) 2026-05-12 post-merge ledger re-read:
the skeleton row's footnote still referenced "once PR #2777 + #2775
merge" as the flip-precondition, but both have landed. Refreshed to
name the actual remaining precondition: Wave-1 worker landing
dsl/ctrl/pr_digests.dag. Non-blocking cleanup.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(briefs): narrow cut-over trigger to modeled-fn .mjs deletion only

Operator BLOCKING (inline on PR #2777 worker brief :47 2026-05-12
T22:53Z): cut-over trigger said "deleting the 5 .mjs files" even
though CI/conflict digests are deferred — would flip authority for
unmodeled functions under INVARIANTS P1/P2.

Resolution: cut-over deletes ONLY .mjs files whose functions are
fully modeled in this brief's narrowed scope:
  - pr_attached_urls.mjs (fully covered by extract_attached_urls)
  - pr_rest_fallback.mjs (fully covered by classify_rest_fallback)
  - portions of pr_merge_ready_digest.mjs that derive from existing
    PullRequest/PullReview fields only

Files / function-bodies depending on CI, conflict, or mergeability
source facts stay TS-authoritative until follow-up Phase 1.5 PR
models render_ci_digest / render_conflict_digest. Explicit MUST NOT
clause forbids cut-over deletion of .mjs functions lacking a .dag
substrate replacement.

Rolling into the already-open fix/ledger-stale-footnote PR (#2803)
since both are adjacent post-2777 ledger/brief cleanups.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(briefs): drop IssueCommentBody — no ListIssueComments operation

Operator BLOCKING on PR #2777 worker brief :89 2026-05-12T22:53Z:
extract_attached_urls signature requires List<IssueComment> but
dsl/extdeps/github/pulls.dag has no list-operation producing PR
issue-level comments (CreateComment writes one; ListComments
returns List<ReviewComment>, not IssueComment). Source fact
ungrounded under INVARIANTS P1/P2.

Resolution (narrower per smaller-first-path):
- extract_attached_urls signature trimmed to (pr: PullRequest,
  reviews: List<PullReview>) — drops the IssueComment input
- AttachedUrlContainer reduced to PrBody | PullReviewBody —
  one-to-one with imported source-fact set
- Source-import list explicitly notes IssueComment excluded with
  reason + Emission Mgr routing path for follow-up
- IssueCommentBody (PR conversation comments) + ReviewCommentBody
  (line-level inline) both deferred to follow-up Phase 1.5 PRs
  that add the corresponding list-operations (ListIssueComments /
  ListReviewComments) to extdep imports

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(briefs): cut-over unit = whole .mjs file, not function body

Operator BLOCKING on PR #2803 worker brief :50 2026-05-12T23:12Z:
my previous narrowing said "deleting...portions of pr_merge_ready
_digest.mjs". Partial-file cut-over (keep .mjs, delete some
functions) leaves TS + .dag as co-authorities, violating
INVARIANTS P2/P5 single-authority discipline. The unit of authority
under the deletion-receipt gate is the .mjs FILE, not a function
body.

Resolution: cut-over deletes ONLY WHOLE .mjs files whose ENTIRE
function set is modeled. With narrowed scope, only 2 files qualify:
  - pr_attached_urls.mjs    (extract_attached_urls fully covers)
  - pr_rest_fallback.mjs    (classify_rest_fallback fully covers)

The remaining 3 (pr_ci_digest, pr_conflict_digest, pr_merge_ready_
digest) stay TS-authoritative as WHOLE FILES because at least one
function in each is unmodeled (CI/conflict/mergeability branches).
They become cut-over-eligible only when a follow-up Phase 1.5 PR
models the remaining functions and a dedicated ctrl-side cut-over
PR fires for those files.

Net-additive gunbc-side functions (render_pr_summary_line,
merge_readiness_verdict) explicitly noted as .dag-only authority
with no 1-to-1 .mjs replacement; their existence does NOT mark any
.mjs as cut-over-eligible.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant