Repository navigation
docs: fix cursor #10356 findings — INVARIANTS labels + Phase A scope wording - #2780
Merged
Merged
Conversation
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>
…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>
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>
…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>
…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>
…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>
… (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>
…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>
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>
…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>
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>
…ecomposition-algebra-draft
…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>
4 tasks
briansrls
commented
May 12, 2026
briansrls
left a comment
Contributor
Author
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
c8537c70· Trigger:schedule - Thinking:
108s wall
Non-blocking — Strengths
docs/design-decomposition-algebra.mdThe corrected invariant labels match INVARIANTS.md and avoid treating Pure Bootstrap as P5 itself.docs/r4-c-compiler-and-llvm-in-dag-program-plan.mdThe Phase A wording preserves real .dag substrate promotion while keeping Rust runtime, parser/emitter execution, and codegen out of scope.
✅ Docs-only PR; no blocking concerns.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix-forward for cursor/composer-2 BLOCKING review #10356 on already-merged PR #2775.
docs/design-decomposition-algebra.md:492— corrected INVARIANTS labels (P1 = Modeling Faithfulness, P2 = Boundary Discipline, P5 = Progress Is Dissolution; the previous labels were docs/modeling-discipline.md Practice names and docs/design-pure-bootstrap-zero.md thesis names, not INVARIANTS.md principle names)docs/r4-c-compiler-and-llvm-in-dag-program-plan.md:246— reconciled §8 with §3 (Phase A promotes typed.dagsubstrate intodsl/extdeps/per §3 ~6-9 PRs — real tree additions, NOT "doc-shape promotion only"; what Phase A excludes is compiler RUNTIME code: Rust runtime, parser/emitter execution, codegen invocation — those are Phase B / Phase C)Test plan
git diffconfirms exactly 2 single-line editscargo fmt --all --checkpasses (pre-push hook)🤖 Generated with Claude Code