DUNIN7 · LOOMWORKS · RECORD
record.dunin7.com
Status Current
Path session-handoffs/loomworks-session-handoff-2026-05-08-evening-v0_1.md

Loomworks — Session Handoff 2026-05-08 evening

Version. 0.1 Date. 2026-05-08 Provenance. Claude.ai session that drafted CR-2026-064 (v0.1 → v0.2 amendment → v0.3 Step 4b absorption), walked CC through the 8-step Phase 49 execution plus Step 4b, held at Checkpoints A and B (impl notes v0.1 → v0.2), and closed at Step 16 tag. Operator: Marvin Percival. Status. Session handoff. Self-sufficient — a fresh chat with this document plus the rest of project knowledge can pick up the manifest v0.35 update and Phase 50 scoping.


1. What this is

Phase 49 — Companion Intelligence — closed cleanly on 2026-05-08 evening. The seven active items the v0.3 scoping carved out plus Step 4b are in. Both repos tagged phase-49-companion-intelligence and pushed.

Test posture: engine 2,023 passed (+71 over Phase 48), 26 skipped (no new skips), Alembic 0064. Operator Layer 128 vitest passed (+28 over Phase 48), 28 test files, 11 prerendered routes (+1 — /settings), eslint/tsc/build clean. All 19 acceptance gates green (gate 5 was removed in CR v0.3 per P49-D17). One Operator-elective amendment cycle (Step 4 → Step 4 amendment scoping → CR v0.3 → Step 4b). Zero halt-amend events. Zero buffer-slot consumption (slots 10–13 unconsumed, not skipped).

The substrate-vs-Companion-intelligence seam from Phase 48 v0.2 §2 held cleanly through Phase 49. Phase 50 picks up at the boundary Phase 49 left it: three primary build items (Companion-as-Authority decision logic, public credit-request form, conversion-credit asset_id override) plus seven secondary or future items.


2. What this session produced

| Document | Version | Where | |---|---|---| | phase-49-cr-companion-intelligence-v0_1.md | v0.1 | Drafted by CC. Archived at docs/phase-crs/ in engine repo at Step 0. Superseded. | | phase-49-cr-companion-intelligence-v0_2.md | v0.2 | T1/T2/T3 amendment absorbed before kickoff (phase-49-cr-amendment-v0_2-v0_1.md). Archived. Superseded by v0.3. | | phase-49-cr-companion-intelligence-v0_3.md | v0.3 | Step 4b absorption (A2 + B2 full migration + C2). Active CR. Archived at docs/phase-crs/. | | phase-49-cr-amendment-v0_2-v0_1.md | v0.1 | Pre-kickoff amendment specifying T1/T2/T3 tightenings to CR v0.1. | | phase-49-step-0-findings-v0_1.md | v0.1 | CC's Step 0 verifications against the live codebase. Preserved at docs/phase-impl-notes/. | | phase-49-step-4-amendment-scoping-v0_1.md | v0.1 | Mid-build amendment scoping (Q1 binding tables / Q2 dispatch path / Q3 pipeline invocation). Operator approved A2 + B2 + C2; preserved at docs/phase-impl-notes/ as part of the Phase 49 Discovery record. | | phase-49-implementation-notes-v0_1.md | v0.1 | Initial substrate-half + frontend-folded notes drafted by CC at Checkpoints A/B. Superseded. | | phase-49-implementation-notes-v0_2.md | v0.2 | Added sixth methodology finding (substrate-friction-discipline-pattern). Active impl notes. Archived at docs/phase-impl-notes/. | | loomworks-phase-49-scoping-note-v0_1.md / v0_2.md / v0_3.md | v0.1 → v0.3 | Scoping iterations; v0.3 was CR-ready. Preserved in project knowledge. | | loomworks-session-handoff-2026-05-08-evening-v0_1.md | v0.1 | This document. |

The manifest v0.35 update is the next workstream; this handoff is its primary input alongside the impl notes v0.2.


3. Build narrative — commit-by-commit

3.1 Engine repo (DUNIN7/loomworks-engine)

Two commits since the Phase 48 baseline tag (phase-48-credit-completion-and-operator-signin at 14bf89b):

| Commit | What | |---|---| | c00a7a1 | Phase 49 substrate (CR-2026-064 v0.3 §15 Steps 0-9 + 4b): companion intelligence — all source/tests/Migration 0064 + CR archives v0.1/v0.2/v0.3 + Step 0 findings + Step 4 amendment scoping | | f27aba3 | Phase 49 Checkpoints A/B: implementation notes (v0.1 + v0.2) |

Tag phase-49-companion-intelligence (annotated, object cf24958) points at f27aba3.

The two-commit shape (substrate + impl notes) matches Phase 47/48 discipline: substrate work is one logical unit; impl notes are commentary on that build, written after both checkpoints landed. Step 4 amendment scoping landed in the substrate commit because it's a Discovery artifact produced during the build, not commentary after.

3.2 Operator Layer repo (DUNIN7/loomworks)

One commit since the Phase 48 baseline (e060fd7):

| Commit | What | |---|---| | 6a3653b | Phase 49 Operator Layer (CR-2026-064 v0.3 §15): companion intelligence — all frontend slices |

Tag phase-49-companion-intelligence (annotated, object 9c8c116) points at 6a3653b.

The single-commit shape on the frontend side is correct: Steps 1/2/4/4b/7/8 each shipped engine + frontend together; Step 15 was thin (chat-surface dialog integration only). The frontend work didn't progress in distinct frontend-only phases.

3.3 Per-step coverage (engine, abbreviated)

The implementation notes v0.2 carry the full step-by-step record. This handoff captures the high-level trajectory:


4. Pre-flight dispositions worth carrying forward

Phase 49's Step 0 added two new generalizable lessons; together with Phase 47's five and Phase 48's five, they form a growing pre-flight discipline list:

1. CR sketches of substrate column or filter shapes defer to live ground truth. CR §8.2 sketched payload->>'category' for the cross-engagement Memory read seam. The Phase 16 Assertion model has no top-level category; the free-form metadata dict is the home. Resolution: payload->'metadata'->>'category'. The principle: when a CR sketches a JSONB filter path or column reference for a model the CR didn't read, the sketch is a placeholder for verification.

2. "Seed-resident" framings are misleading when declared types are MemoryObjects. Scoping v0.2 named an "Accounting seed bump" as a missed deliverable. Step 0 §8.8 settled it: DeclaredShapeTypes/RenderTypes are MemoryObjects, not seed-resident — they're events in the engagement's event log, consistent with manifest §2's "rooms as facets of the event log" principle. The principle: an engagement's specification grammar evolves through Memory contributions, not at seed-creation time only. Scoping v0.3 §3.6 absorbed this; future CRs naming seed bumps for grammar evolution should re-check whether the work is actually post-bootstrap event appending.

These extend the prior phases' pre-flight dispositions: persons table plural; key_source vocabulary; live model strings; system_config Fernet encryption; admin auth posture (Phase 47); CR sign-in placeholder names; function signatures verified at pre-flight; frontend baseline staleness; closest-fit reuse; reserved-slot buffer is for amendment absorption (Phase 48).


5. Determinations made during construction (selected, architecturally significant)

Ten determinations land in impl notes v0.2 §3. The most architecturally significant for future phases:

5.1 Voice composition is one-LLM-call away from the converse pipeline (Step 6 / 7 / 8)

Context. Tier-drop and near-exhaustion both compose voice into the system prompt for the SAME turn that detected the transition. State updates (previous_responder_model UPDATE; near_exhaustion_pct_seen_at SET) happen post-LLM-call. Next turn's detection reads the freshly-set state and skips the voice. The exhaustion-choice voice is structurally different — CreditExhaustedError raises before* the LLM call, and the response is composed without an LLM (deterministic templates per branch).

Discipline. When voice composition fires on a transition signal, place the state update post-call so the same turn's voice fires once and subsequent turns see the post-transition state. When the transition signal precludes the LLM call (the credits-exhausted case), shift to deterministic templates. The seam is the LLM-call presence; voice composition policy follows.

5.2 Bimodal dispatch with delegation_required + on_decline (Step 4b)

Context. Phase 45's verify_companion_authorization requires a personal-Memory delegation; reconciliation is Operator-direct (no Companion in the loop). Custom bypass routes were the initial in-flight resolution; Step 4b absorbed the architectural distinction.

Resolution. register_action_dispatcher(..., delegation_required: bool = True, on_decline: Callable | None = None). Default True preserves all existing dispatchers' Companion-mediated behavior. Explicit False opts into Operator-direct. process_approval reads the flag and skips verify_companion_authorization when False, building a person-actor instead of Companion-actor. New process_decline runs on_decline symmetric with on-approve — reconciliation refusal advances proposal state.

Discipline. Reusable. Future Phase 50+ action types pick a side per their own authorization model. Phase 49 surfaces both sides within its own surface area: reconciliation is the first explicit Operator-direct case via register_action_dispatcher; self-suspend / self-delete from Step 8 also use Operator-direct via me_lifecycle routes (route-level rather than dispatcher-level expression of the same mode).

5.3 Substrate-friction-discipline-pattern (Step 4 → Step 4b trajectory)

Context. Step 4 prerequisite inspection surfaced three substrate frictions exceeding naming-only resolution scope (binding-table schema mismatch, Phase 45 delegation-gate mismatch, Phase 11 dispatch-trigger mismatch). Halting on each and re-opening the CR was wrong-shape (none individually was a halt-threshold violation); absorbing each in-flight without architectural review was wrong-shape (the resolutions accumulated to architectural significance Phase 50 would inherit).

Resolution. A third path: surface as Operator-elective amendment scoping document during the build. Three properties make it distinct from halt-amend: (i) build doesn't halt — substrate work continues with in-flight resolutions in place; (ii) Operator decides architecturally with options + halt-threshold review; (iii) sub-step lands before continuing. The Phase 49 Step 4 → phase-49-step-4-amendment-scoping-v0_1.md → CR v0.3 → Step 4b sequence is the canonical instance.

Discipline. Reusable for any future phase where prerequisite inspection surfaces architectural friction. The pattern expects an Operator-elective amendment scoping doc separate from the CR proper, separate from halt-amend, that captures the questions, options, recommendations, and halt-threshold review for each candidate amendment.

5.4 Inline ShapeEvent + RenderEvent emission (Step 4b / C2)

Context. The reconciliation proposal applier writes the corrective FORAY flow row directly. Without ShapeEvent + RenderEvent emission, the canonical event log declares the pipeline (DST/DRT events) but never records instances; readers reasonably conclude after a year that the pipeline never fires.

Resolution. The reconciliation dispatcher appends shape_produced (state='confirmed') + render_produced (state='produced') events via append_event before/around the flow-row insert. The corrective flow's flow_metadata.shape_event_id joins back to the appended ShapeEvent. The full audit trail DST → ShapeEvent → DRT → RenderEvent → flow-row is queryable per correction.

Discipline. When closed-loop methodology requires Render-as-action through the engagement pipeline but Phase 11 dispatch can't be reasonably invoked at the trigger point, emit the events inline rather than skipping them. Future generalization (Phase 11 gaining an approval-initiated entry point) consumes the same events. The cost is ~30 LOC + a handful of tests; the benefit is methodology claim integrity at runtime, not just in code documentation.

5.5 Schema field defaults preserve happy-path callers (Step 8)

Context. ConverseResponse extended with request_action: Literal["exhaustion_choice_dialog"] | None = None. Existing converse callers don't read the field; the Phase 40 vocabulary-wall test passes unchanged because the field is operator-vocabulary (signals what the chat surface should mount).

Discipline. Reusable for any contract extension on existing endpoints: defaults match prior behavior, new state is explicit. Same pattern as Phase 48 §5.5 (LoginSecondFactorResponse extension); the discipline holds across phases.


6. Six methodology findings recorded for next manifest consolidation pass

Per CR v0.3 §15.2 (T3 absorption) plus the Step 4b → Checkpoint A v0.2 sixth-finding addition. Distinct from build carry-forward in §8 — these are knowledge artifacts feeding manifest v0.35, not Phase 50 build dependencies. The full text lives at impl notes v0.2 §6.

Finding 1 — AI-invisibility credit-system carve-out as a bounded named exception. Three concrete instances landed (tier_drop.md, near_exhaustion.md, exhaustion_choice.md); each carries a top-of-file carve-out comment. Future credit-adjacent surfaces follow the same explicit pattern. Records this as a class of legitimate exception rather than letting the principle silently erode.

Finding 2 — First post-bootstrap specification-grammar extension. DST/DRT events as MemoryObjects, not seed-resident. ensure_reconciliation_specialists_declared(db) is the first substrate-side exercise of the engagement-spec-grammar-evolves-through-Memory pattern. Future Operator-driven version of this is the elevation pathway through their Companion (per Discovery arc).

Finding 3 — First closed-loop application class build instance. Accounting Engagement consumes its own observations (Phase 48 reconciliation evaluator's ReconciliationProposal events) and Renders are action (corrective FORAY flow row). Full DST → ShapeEvent → DRT → RenderEvent → flow-row audit trail per Step 4b / C2. Phase 50's item 2 (Companion-as-Authority) is the first delivery-class instance of the same proposer/committer pattern.

Finding 4 — Phase 38 declare-and-register pattern parallel. Engagement specification grammar (Phase 49 item 9) and upload-pathway transformation skills (queued direction) are two surfacings of the same declare-grammar / register-specialists / engine-matches-at-runtime pattern. Phase 10/11 binding-table schema (Anthropic-keyed) is one concrete realization of "register"; Phase 49 lifespan-direct path is a second; both serve the same methodology.

Finding 5 — Bimodal dispatch: Companion-mediated vs Operator-direct. Phase 45 was originally designed around Companion-acts-on-Operator's-behalf; Phase 49 surfaced a second authorization mode. register_action_dispatcher(..., delegation_required: bool) plus on_decline for symmetric refusal. Reconciliation is the first explicit instance; self-suspend / self-delete also use Operator-direct via me_lifecycle routes — bimodality is broader than reconciliation alone, even within Phase 49's surface area.

Finding 6 — Substrate-friction-discipline-pattern. Third path between halt-amend and naming-only resolution: Operator-elective amendment scoping. Three properties make it distinct: (i) build doesn't halt, (ii) Operator decides architecturally with options + halt-threshold review, (iii) sub-step lands before continuing. The Phase 49 Step 4 → amendment scoping → CR v0.3 → Step 4b sequence is the canonical instance. Process methodology finding alongside the five substrate findings — reusable for any future phase where prerequisite inspection surfaces architectural friction.

Manifest v0.35 absorption priority. Findings 5 and 6 are the highest-priority absorptions because Phase 50's item 2 (Companion-as-Authority) directly inherits Finding 5 (Companion-mediated dispatch is its authorization model) and may face Finding 6 trajectory if substrate friction surfaces during its build. Findings 1–4 absorb at consolidation pace.


7. Phase 48 → Phase 49 carry-forward closures

The twelve-item carry-forward Phase 48 left Phase 49 (loomworks-session-handoff-2026-05-08-v0_2.md §8) closed per the v0.3 scoping seven-active-item allocation:

| Item | Phase 49 disposition | |---|---| | 1. Companion exhaustion-choice voice and surface | Closed (Step 8) — three-choice dialog + voice template + me_lifecycle routes | | 2. Companion-as-Authority decision logic for grants | Carries forward to Phase 50 — primary scope | | 3. Public credit-request form | Carries forward to Phase 50 — external dependency on marketing site | | 4. Near-exhaustion warning | Closed (Step 7) — threshold detection + voice template + <BalanceChip> color tones | | 5. Tier-drop voice | Closed (Step 6) — voice template + dual-converse-path insertion | | 6. Model profile assertions in Credit Management Memory | Carries forward as Operator content authoring (P49-D12 — soft deadline before alpha exhaustion in production) | | 7. Exhaustion-choice settings UI | Closed (Step 2) — /settings page is first proper user-facing settings surface | | 8. Operator override path for conversion-credit asset_id | Carries forward to Phase 50 — Memory-driven policy override | | 9. Reconciliation proposal applier | Closed (Steps 4 + 4b) — with closed-loop audit trail integrity preserved | | 10. Phase 42 turns reconciler coverage | Carries forward — gated on Phase 42 amendment that surfaces token usage | | 11. Admin grants list view | Closed (Step 1) — pagination + filter scope + auth | | 12. Reactivation in-session chrome | Carries forward as conditional — revisit if cross-tab edge case becomes real |

Seven items closed in their entirety. Three items carry forward as Phase 50 primary build (2, 3, 8). Two items carry forward as conditional or content-dependent (6, 12). One item carries forward as substrate-gap-dependent (10).


8. Phase 50 carry-forward

Items intentionally not built in Phase 49, recorded for Phase 50 scoping. This list refines and extends the Phase 48 → Phase 49 carry-forward.

8.1 Phase 50 primary build

  1. Item 2 — Companion-as-Authority decision logic for grant requests. The visible production exercise of Companion-proposes / Operator-commits. The Companion in Credit Management Engagement reads Memory (model profile assertions extended for grant decisions, plus campaign data, plus referral policy, plus eligibility heuristics), proposes a grant decision, surfaces in the Manifestation room (or via ApprovalCard, mirroring the Phase 49 item 9 closest-fit reuse pattern); the Operator approves; the Shaping/Rendering pipeline issues the grant via the seam. Inherits Phase 49 Finding 5: Companion-mediated dispatch (delegation_required=True). Inherits Phase 49 Finding 3 closed-loop pattern as delivery-class counterpart.
  1. Item 3 — Public credit-request form + marketing-site coordination. External dependency (the marketing site itself). POST /authority/grant-request endpoint creates a Memory event in Credit Management Engagement that item 2's decision logic acts on. Phase 50 timing tracks marketing-site readiness.
  1. Item 8 — Operator override path for conversion-credit asset_id. Memory-driven policy override on Phase 48's default-mirror. Operator authors override assertions in Credit Management Memory; the conversion-detection observer reads them when computing the conversion-credit asset_id.

8.2 Phase 50 secondary or conditional

  1. Item 6 — Operator content authoring (continuation). Per P49-D12, content authoring runs in parallel with the build. Phase 49 ships against fixture content / empty list; real Operator-authored content lands as soft deadline. Continues into Phase 50 if not complete; Phase 50 item 2 also depends on extended Memory content (campaign data, referral policy, eligibility heuristics — all Operator-authored).
  1. Voice tuning iterations. Per P49-D15. Voice quality emerges through Operator iteration on the three credit_voice templates. Iteration that lands after Phase 49 tag is ongoing Operator work, not a Phase 49 amendment — the Phase 49 tag captures the as-shipped voice baseline. Phase 50 may absorb tuning findings into a methodology consolidation pass.
  1. Item 10 — Phase 42 turns reconciler coverage. Phase 48 reconciliation evaluator covers Phase 31 companion_turn events; Phase 42 conversation_turns doesn't carry credits_consumed. Phase 50 either adds the column and writes it from the converse pipeline, or introduces a parallel persistent token-usage signal source. Substrate gap; smaller scope.
  1. Item 12 — Reactivation in-session chrome. Conditional on cross-tab edge case proving real. Default position: not present at alpha scale. Revisit if observed.

8.3 Future, not Phase 50

  1. Persona-prompt artifact. Out of scope for Phase 49 / Phase 50; the artifact lands when persona has emerged across enough voice surfaces for capture to be productive — Arc 2 Companion-brain work. Phase 49's three credit_voice templates are recorded input to this future artifact (per impl notes v0.2 §5).
  1. Cross-Operator stewardship of promoted fragments. Methodology-level open question from the Discovery arc (loomworks-knowledge-elevation-pathway-investigation-v0_1.md). Not a build dependency; absorbs into manifest consolidation pace.
  1. Phase 45 OVA-spec scope sharpening — watch-this. May surface as a Phase 50+ amendment if a real gap arrives.
  1. Factored PeriodicTask abstraction. Each evaluator currently clones the Phase 44 template inline. Tracked as deferred work in loomworks-queued-directions-and-deferred-work-v0_2.md.
  1. Engagement creation assistance + Discovery-to-seed skill. Tracked in queued directions.
  1. Upload facility extension. Tracked in queued directions; Finding 4 (Phase 38 declare-and-register parallel) sharpens the relevance.

9. Phase 50 shape, sketched

Phase 50 picks up the substrate-vs-Companion seam at the boundary Phase 49 left it. The shape:

Companion-as-Authority as primary work. Item 2 is the visible production exercise of the proposer/committer pattern Phase 49 warmed up via item 9 (Accounting reconciliation as closed-loop class). Phase 50 instances the delivery-class version of the same pattern at the governance scale the methodology depends on. The Discovery arc's elevation-pathway findings (loomworks-knowledge-elevation-pathway-investigation-v0_1.md) land most directly here.

Public form + marketing-site coordination as the external dependency. Item 3's external-deliverable dependency is the gating constraint for Phase 50's timing. Phase 50 has to time against marketing-site readiness, which Loomworks doesn't control.

Conversion-credit asset_id override as Memory-driven policy work. Item 8 extends Phase 48's default-mirror policy with Memory-driven Operator override. Smaller scope; absorbs alongside item 2 as part of the Companion-intelligence layer in Credit Management Engagement.

Methodological inheritance from Phase 49. Phase 50 inherits more methodology from Phase 49 than Phase 49 inherited from Phase 48:

Phase 50 vs. Phase 51 boundary. If Phase 50 scope balloons, the natural sub-seam is (a) item 2 + item 8 (Companion-intelligence in Credit Management) versus (b) item 3 (public form + marketing-site coordination — external timing). Item 2 + item 8 together fit the Companion-intelligence-feature pattern Phase 49 demonstrated; item 3 is qualitatively different (external dependency). Whether Phase 50 absorbs all three or splits at the item 2/8 boundary is a Phase 50 scoping decision, not a Phase 49 one.


10. Operator items pending

  1. Manifest v0.35 update. The six methodology findings feed manifest v0.35 absorption. Highest-priority absorption: Findings 5 and 6 (Phase 50 inherits both directly). Next chat opens against this. Pickup pointer recorded in CC's memory at loomworks_manifest_v0_35_queued.md.
  1. Loomworks engagement seed bump consideration. Phase 49 introduced user-facing vocabulary (Settings, exhaustion preference, near-exhaustion warning, tier-drop acknowledgement) that's incremental on credit/lifecycle vocabulary in seed v0.9. Recommendation per scoping v0.3 §13.1: defer; revisit at manifest v0.35 close or later. Not a Phase 50 blocker.
  1. Queued directions update. loomworks-queued-directions-and-deferred-work-v0_2.md should pick up a small touch noting Phase 49's Finding 4 connection point to upload-pathway extension. Not blocking; can absorb at manifest v0.35 pace.
  1. Push of main to origin (both repos). Local main on both repos sits ahead of origin/main (engine +2, frontend +1). Tag is the ship marker; main can be pushed at session-handoff convenience. Tagged commits are reachable on origin via tag refs.

11. Companion documents


12. Phase 49 trajectory note

Worth recording as the final framing for this handoff. Phase 49 demonstrated three CR-level versions (v0.1 → v0.2 amendment T1/T2/T3 → v0.3 Step 4b absorption), two impl-note versions (v0.1 → v0.2 sixth methodology finding), one Operator-elective amendment cycle (Step 4 → Step 4 amendment scoping → CR v0.3 → Step 4b), zero halt-amend events, and zero buffer-slot consumption. The discipline pattern — surface friction at the right scope, decide architecturally, sub-step before continuing — is now the canonical reusable shape. Finding 6 names it explicitly so Phase 50 inherits the discipline rather than re-discovering it.

The substrate-vs-Companion-intelligence seam from Phase 48 v0.2 §2 held cleanly through Phase 49. Phase 50 picks up at the boundary Phase 49 left it.


DUNIN7 — Done In Seven LLC — Miami, Florida Loomworks Session Handoff — 2026-05-08 evening — v0.1