CR number. CR-2026-090
Version. 0.3
Date. 2026-05-12
Status. Amendment cycle 2; supersedes v0.2. v0.1 + v0.2 both preserved alongside as superseded; all three archived at engine repo docs/phase-crs/.
Target tag. phase-57-marketing-engagement-creation (annotated; engine + Operator Layer).
Authoritative inputs. loomworks-phase-57-scoping-note-v0_2.md; loomworks-phase-57-cr-drafting-handoff-v0_1.md; phase-57-step-0-findings-v0_1.md (engine repo docs/phase-impl-notes/, on branch phase-57-step-0 at 69adb17); current-status-manifest-v0_41.md. Amendment-cycle-1 inputs added at v0.2: phase-57-halt-surface-2026-05-12-v0_1.md (engine repo docs/phase-impl-notes/ on branch phase-57-marketing-engagement-creation at a00f4a3; also in project knowledge); loomworks-phase-57-cr-amendment-scoping-note-v0_1.md; loomworks-phase-57-cr-amendment-handoff-v0_1.md. Amendment-cycle-2 inputs added at v0.3: phase-57-halt-surface-2026-05-12-step-2b-v0_1.md (engine repo docs/phase-impl-notes/ on branch phase-57-marketing-engagement-creation; also in project knowledge); loomworks-phase-57-cr-amendment-2-scoping-note-v0_1.md; loomworks-phase-57-cr-amendment-2-handoff-v0_1.md. Precedent CRs: Phase 56 (phase-56-cr-conversational-creation-surface-voice-v0_2.md), Phase 55 (phase-55-cr-engagement-creation-assistance-v0_1.md), and for multi-cycle CR-version-bump shape: phase-49-cr-amendment-v0_2-v0_1.md (Phase 49 carries v0.1 / v0.2 / v0.3 under the same archival convention).
Drafter posture. Drafted by Claude.ai per amendment-cycle-2 handoff §12 kickoff. Eight original CR-time verifications (CRV-1 through CRV-8) embedded as Step 0 pre-flight per Phase 53/55 precedent; ran pre-halt at the original Step 0 of the build cycle. Eight CR-amendment-cycle-1-time verifications (CRV-A1 through CRV-A8) embedded as Step 2a pre-flight; CC ran them at amendment-cycle-1 start and all HELD. Six CR-amendment-cycle-2-time diagnostic verifications (CRV-B1 through CRV-B6) embedded as Step 2c pre-flight per the cycle-2 handoff §8 — CC runs them at amendment-cycle-2 execution start as Sub-arc 5a, files a diagnostic findings note (Sub-arc 5b) that identifies root layer + fix sites, then implements the fix (Sub-arcs 5c–5f). Diagnostic-first execution posture per P57-B2: scoping cannot pre-specify the fix layer or fix shape; the diagnostic IS the architectural work for the cycle. Naming-only divergences absorb in-flight; architectural divergences halt and surface a follow-on phase-57-halt-surface-<timestamp>-v0_1.md note.
Amendment record (cycle 1, recorded at v0.2; preserved verbatim). Amendment cycle 1 absorbed per phase-57-halt-surface-2026-05-12-v0_1.md and loomworks-phase-57-cr-amendment-scoping-note-v0_1.md. Sub-arc 4 (OL surface alignment with engine identity contract) added; Step 2a inserted; Step 2 renamed Step 2b. OL vitest count 150 (was 149). Gate 5 amended; Gate 5b new (subsequent gates renumbered with +1 offset). One reserved buffer slot consumed (one remained). Engine substrate unchanged. Three methodology candidates (A + B + C) carry to v0.21 / v0.42. One queued direction added (OL surface-vs-contract audit, Phase 58+). Two minor accuracy fixes within sections the handoff §7.2 labeled "Unchanged" recorded in §4 discovery-record bookkeeping (§13 OL bullet; §17 OL close expected-vitest comment); both fixes correct factual claims about post-amendment OL state.
Amendment record (cycle 2, this version). Amendment cycle 2 absorbed per phase-57-halt-surface-2026-05-12-step-2b-v0_1.md and loomworks-phase-57-cr-amendment-2-scoping-note-v0_1.md. Sub-arc 5 (route-to-substrate runtime binding for /operator/create-engagement) added; Step 2c inserted between Step 2a (cycle-1 Sub-arc 4, complete) and Step 2b (live usage event, paused). Diagnostic-first execution posture: CRV-B1 through CRV-B6 run as Step 2c first activity (Sub-arc 5a); diagnostic findings document (Sub-arc 5b) drives the production fix (Sub-arcs 5c–5f). Test count update deferred to CRV-B findings, with documented floor (+1 net) and ceiling (+1 OL vitest + +1 engine vitest); CR §16 table carries floor and ceiling. Gate 5 amended further; Gate 5c new (subsequent gates renumbered with +1 offset; total 18 → 19). Both reserved buffer slots now consumed (Step 6 by Sub-arc 4 at cycle 1; Step 7 by Sub-arc 5 at cycle 2) — first Phase since Phase 49 to consume both. Engine substrate Step 1 unchanged; cycle-1 Sub-arc 4 OL substrate unchanged. One new methodology candidate at scoping (Candidate F — diagnosis-as-architecture-when-runtime-binding-fails); Candidate C (substrate-friction-discipline-pattern-second-build-mode-firing) reaches three-instance evidence within an eight-phase window and clears the v0.21 promotion threshold; halt-surface §6 Candidates D and E carry forward; total methodology candidates at Phase 57 close: thirteen. One queued direction added (OL route-to-substrate runtime-binding audit, Phase 58+; possibly consolidates with the cycle-1-derived OL surface-vs-contract audit).
Phase 57 ships the first real-Operator usage of the Phase 55/56 conversational engagement creation surface. The marketing engagement (sibling to the Loomworks engagement under DUNIN7) is created live by the Operator using pre-drafted content from loomworks-marketing-creation-flow-content-v0_3.md and the Discovery-record terminal-turn path.
The phase has two outputs:
/operator engagement list.tests/fixtures/voice-calibration/real_operator_marvin_<YYYY-MM-DD>.md. First concrete instance of the persona-vs-real-Operator-contrast pattern named at scoping v0.1 §12.
One substrate addition closes the only known gap on the creation surface: the Field 6 per-field elicitation prompt component. The substrate is otherwise complete — Seed.additional_assertions: dict[str, str] exists, Phase 53's extraction skill parses Field 6, and the skill validates the structure. The gap is elicitation-only (V2 GAP-CONFIRMED-AS-EXPECTED at Step 0).
Amendment cycle 1 (v0.2) adds Sub-arc 4 — OL surface alignment with engine identity contract — to absorb the halt-surface finding that the Operator Layer signin form's empty-email guard contradicts the engine's WebAuthn discoverable-credential identity contract and the standing DUNIN7 principle that email must not be used for identity. The fix is OL-side only; engine substrate is correct and untouched. Phase 57's product + methodology deliverables are preserved unchanged.
Amendment cycle 2 (v0.3) adds Sub-arc 5 — route-to-substrate runtime binding for /operator/create-engagement — to absorb the cycle-2 halt-surface finding that the route does not engage the Phase 55/56 scaffolded conversation flow at runtime, despite Sub-arcs 1 and 4 being correct and verified. The diagnostic exchange ("Tell me what the capital of NZ is" → "Wellington") confirmed intent classification is landing on general_conversation rather than create_engagement_entry/_active/_commit. The fix layer (OL converse-submission path / engine classifier or dispatcher context-scoping / shared) is determined at Step 2c diagnostic-execution time, not pre-decided in scoping. Engine substrate Step 1 and cycle-1 Sub-arc 4 OL substrate are correct and untouched. Phase 57's product + methodology deliverables are preserved unchanged.
Phase 55 (phase-55-engagement-creation-assistance) shipped the conversational creation surface — intent classifier, dispatcher routing, three scaffolding prompt templates (create_engagement_active.md, create_engagement_commit.md, intent_classifier.md), field_coverage map, terminal-turn affordance.
Phase 56 (phase-56-conversational-creation-surface-voice) voice-tuned that surface with plain-terms-discipline: three per-field elicitation prompts at prompts/intent_instructions/create_engagement/ (voice.md, constraints.md, success.md); the load_per_field_components loader at prompt_assets.py; dispatcher splice at prompt.py:817; voice principles document at docs/voice-principles-v0_1.md; persona calibration fixtures at tests/fixtures/voice-calibration/; calibration-gated tests at tests/test_phase_56_conversational_creation_surface_voice.py with helper at tests/helpers/voice_calibration.py; terminal-turn matcher token-set in router.py covering legacy + plain-terms phrasings.
Phase 57 closes the Field 6 gap (Phase 56 explicitly scoped Fields 3–5 only) and exercises the surface end-to-end on a real engagement for the first time.
Substrate baseline (from handoff §2; CC re-confirmed at Step 0).
Engine repo DUNIN7/loomworks-engine at /Users/dunin7/loomworks-engine:
phase-56-conversational-creation-surface-voice at engine commit 0044e3b (annotated tag object 49457cb).main HEAD be7fba5 — one docs-only commit ahead of the tag (Phase 56 close handoff commit; post-tag-docs-on-main pattern methodology candidate noted at scoping v0.2 §New methodology observations).0064.main.phase-57-step-0 branch at 69adb17 (unmerged; Step 0 findings file).phase-56-step-0 branch exists locally (never pushed) — deleted at Phase 57 close per P57-D7 Option A retroactive cleanup.phase-55-step-0 not present locally (silently deleted between Phase 56 close and Phase 57 Step 0 per V0 DRIFT; silent Option-A application methodology candidate).
Operator Layer repo DUNIN7/loomworks at /Users/dunin7/loomworks:
phase-56-conversational-creation-surface-voice at OL commit 2cc0ebc (annotated tag object 2db3c88).Marketing site repo: not in Phase 57 scope. Workshop repo: not in Phase 57 scope.
Substrate baseline at amendment-cycle-1 start (post-cycle-1-halt, pre-resume; per amendment-cycle-1 handoff §2).
Engine repo on branch phase-57-marketing-engagement-creation at a00f4a3 — CR archive commit + Field 6 substrate commit from Step 0 + Step 1; 2,280 always-run + 32 skipped (1 always-run + 2 calibration-gated added at Step 1); Alembic 0064 unchanged; working tree clean; halt-surface note filed at docs/phase-impl-notes/phase-57-halt-surface-2026-05-12-v0_1.md on the branch.
Operator Layer repo on branch phase-57-marketing-engagement-creation at 2cc0ebc (= Phase 56 commit; no OL changes yet — the amendment changes this); 149 vitest; 11 prerendered routes; lint/tsc/build clean; working tree clean.
Local stack at amendment-cycle-1 resume time: engine API up on :8000 with /healthz returning 200; CORS resolved (LOOMWORKS_ENV=development in local .env); OL dev server up on :3001; Marvin's Person row + passkey credential present in dev DB.
Halt-surface trajectory leading to amendment cycle 1 (per phase-57-halt-surface-2026-05-12-v0_1.md). Step 2 entry surfaced an architectural finding: the Operator Layer signin form at /operator/create-engagement (which redirects to /signin when unauthenticated) presents a required-email field. The Operator named a long-standing DUNIN7 principle — email must not be used for identity; email-hijack creates account-takeover via password-reset-to-email — that was not previously named in any source-of-truth document. CC's diagnostic established three findings against the live source on branch phase-57-marketing-engagement-creation: (1) the engine identity model is WebAuthn passkey — SignupBeginRequest, LoginBeginRequest, PersonRow all treat email as Optional; /auth/login/complete looks up the Person by credential_id not by email; the discoverable-credential flow is supported when email = None on /auth/login/begin; (2) the OL signin form's client-side gate at IdentifierStep.tsx:31 contradicts the engine contract by requiring email input where the engine does not — signin-flow.ts:42 POSTs {email: email.trim()} and the engine would accept {} cleanly; (3) the drift was not surfaced at Phase 41 / 48 / 50 close because the standing principle was not named in any source-of-truth document. The engine correctly embodies the standing principle; the contradiction is at the OL client-side gate only; the fix is OL-side and small.
Substrate baseline at amendment-cycle-2 start (post-cycle-2-halt, pre-resume; per amendment-cycle-2 handoff §2).
Engine repo on branch phase-57-marketing-engagement-creation at the cycle-2 halt-surface commit (parent 7a6220c = CR v0.2 archive). Five Phase-57 commits pre-cycle-2-halt-surface: CR v0.1 archive (09907d6); Step 1 substrate (a00f4a3); cycle-1 halt-surface note (39e4f00); CR v0.2 archive (7a6220c); cycle-2 halt-surface note (filed at docs/phase-impl-notes/phase-57-halt-surface-2026-05-12-step-2b-v0_1.md). Tests: 2,280 always-run + 32 skipped — unchanged from cycle-1 close baseline. Alembic head: 0064 unchanged. Working tree clean after the cycle-2 halt-surface note lands.
Operator Layer repo on branch phase-57-marketing-engagement-creation at e435b30 (cycle-1 Sub-arc 4 commit; no new OL commits at cycle-2 halt). Tests: 150 vitest passed; 11 prerendered routes; lint/tsc/build clean. Working tree clean.
Local stack at amendment-cycle-2 resume time: engine API up on :8000 with /healthz returning 200; CORS resolved (LOOMWORKS_ENV=development in local .env); OL dev server up on :3001; banner revision present at ChatView.tsx:254; banner string "Setting up a new project" confirmed correct on live surface (cycle-2 halt-surface §2.1 first real-Operator confirmation; Candidate E positive observation). Marvin's Person row + passkey credential present in dev DB; signin works (cycle-1 Sub-arc 4 landed).
No mid-build commits to revert. Phase 57 Sub-arcs 1 + 4 substrate are correct and stay. The cycle-2 amendment adds work; it does not undo cycle-1 work.
Halt-surface trajectory leading to amendment cycle 2 (per phase-57-halt-surface-2026-05-12-step-2b-v0_1.md). Step 2b entry surfaced a runtime-binding finding: the /operator/create-engagement route loads with the correct banner ("Setting up a new project" — first real-Operator confirmation of the Phase 56 plain-terms-discipline revision), but the Companion responds in general-purpose chat tone to messages submitted from this route — the diagnostic exchange ("Tell me what the capital of NZ is" → "Wellington") confirmed intent classification is landing on general_conversation rather than create_engagement_entry/_active/_commit. Three prior unrelated chat pairs visible in scrollback (state-leakage flag). The friction is upstream of Field 6 — the entire scaffolded conversation flow does not engage from this route. Sub-arc 1 (Field 6 prompt) is correct + loaded; Sub-arc 4 is correct + landed; CRV-1 through CRV-8 + CRV-A1 through CRV-A8 all HELD. The break is at the runtime binding layer between the OL surface's converse submission and the engine's classifier/dispatcher path — a layer Step 0 and CRV-A structurally could not probe (Step 0 V8 confirmed the route renders; CRV-A verified OL signin contract alignment; neither asks "does a message submitted from this specific surface drive the substrate the surface was scoped to drive?"). CC named <ChatView mode="create-engagement">'s converse-submission mode-discriminator propagation as the most likely root cause but explicitly did NOT pre-decide; enumerated six diagnostics for the cycle-2 scoping chat.
Substrate-presence is not substrate-engagement (cycle-2 halt-surface §3 framing). Step 0 verifies that substrate EXISTS in the right places with the right signatures; it does not verify that the runtime path from a specific route through to the intended substrate fires. Cycle-1 added OL surface contract alignment as a verification surface. Cycle-2 adds route-to-substrate runtime binding as a verification surface. Both are layers Step 0 structurally could not probe — Step 0's aperture is presence + structure + readiness, not engagement. The pattern crystallizes as Candidate D in the cycle-2 halt-surface (per-route-companion-routing-not-asserted-at-step-0); paired with the scoping-stage Candidate F (diagnosis-as-architecture-when-runtime-binding-fails) named at the cycle-2 scoping chat.
Third build-mode firing of substrate-friction-discipline-pattern. The cycle-2 trajectory is the third instance (Phase 49 Step 4 first — the canonical instance; Phase 57 amendment cycle 1, Sub-arc 4 OL signin alignment, second; Phase 57 amendment cycle 2, Sub-arc 5 route-to-substrate runtime binding, third). Three-instance evidence within an eight-phase window (Phases 49 / 50–56 unconsumed / 57 cycle 1 / 57 cycle 2) clears the v0.21 promotion threshold per manifest v0.39 §2 / v0.40 §2 two-instance promotion convention. Candidate C carries forward at three-instance evidence; the name should be amended at v0.21 to drop the "second" qualifier — the pattern is substrate-friction-discipline-pattern build-mode firing.
All ten settled at scoping v0.2 (eight items) plus handoff (two items: D7 elevation to Option A, and D10 newly added at v0.2). CC executes against them; does not re-decide.
| Item | Setting | Source |
|------|---------|--------|
| P57-D1 | Shape B — usage event with bounded substrate tuning (one prompt component at Step 1). | Scoping v0.2 §Shape selection |
| P57-D2 | Stop at engagement-exists. Downstream marketing-engagement substrate (render specialists, marketing-shaped artifacts, marketing-engagement-specific assertion types) is Phase 58+. | Scoping v0.2 §Open construction decisions |
| P57-D3 | Discovery-record terminal-turn path. Not the brief-commit path. | Scoping v0.2 §Open construction decisions |
| P57-D4 | Author Field 6 prompt at Step 1. New file at prompts/intent_instructions/create_engagement/additional_assertions.md; ~11 lines; structural mirror of Phase 56's voice.md / constraints.md / success.md; +1 test. | Scoping v0.2 §Open construction decisions |
| P57-D5 | Real-Operator transcript fixture at tests/fixtures/voice-calibration/real_operator_marvin_<YYYY-MM-DD>.md. Filename distinguishes from persona fixtures. Date is literal Step 2 capture date. | Scoping v0.2 §Open construction decisions |
| P57-D6 | Closed. Field 6 surface fallback design no longer needed since Shape B confirmed and Step 1 lands the elicitation prompt directly. | Scoping v0.2 §Open construction decisions |
| P57-D7 | Option A — delete at close. Step 0 inspection branches are deleted at phase close. Phase 57 applies retroactively: phase-56-step-0 is also deleted at Phase 57 close. Going-forward convention: every phase deletes its Step 0 inspection branch at close. (The silent cleanup of phase-55-step-0 between Phase 56 close and Phase 57 Step 0 demonstrated Option A is the natural drift; Option A formalizes it.) | Handoff §4 (elevated from v0.2 Option B provisional) |
| P57-D8 | Independent engagement under DUNIN7. Marketing engagement is sibling of the Loomworks engagement, not a subsidiary. | Scoping v0.2 §Open construction decisions |
| P57-D9 | Sonnet for default Companion operation. Flagged for Phase 58+ at first-rendered-output cost surface; not a Phase 57 settled decision but recorded for downstream pickup. | Scoping v0.2 §Open construction decisions |
| P57-D10 | Capture-during-Step-2-only. V4 POSTURE-GAP friction phrases captured in Step 4 implementation notes; no Step 1 posture pre-tuning. Future micro-tuning phase informed by Step 2 evidence. | Handoff §4 (added at scoping v0.2 §Open construction decisions §New at v0.2) |
All ten amendment-cycle-1 construction decisions settled at the amendment-cycle-1 scoping note (loomworks-phase-57-cr-amendment-scoping-note-v0_1.md). CC executed against them at amendment-cycle-1 build time; does not re-decide.
| Item | Setting | Source |
|------|---------|--------|
| P57-A1 | Remove the empty-email guard; omit email from /auth/login/begin POST body when empty; update field surface text to indicate optionality. Email field stays present (narrows allowCredentials as a passkey hint when supplied); the discoverable-credential path is the normal path. | Amendment-cycle-1 scoping note §P57-A1 |
| P57-A2 | One new vitest. Exercises empty-email submission → no emailEmptyError set → POST body omits email → mock returns a WebAuthn challenge → form transitions to the passkey step. Rejected alternatives: zero tests (regression-prone for a client-side gate); two tests (the with-email path is already covered by existing 149). | Amendment-cycle-1 scoping note §P57-A2 |
| P57-A3 | Narrow audit limited to the signin form only. Sign-up, claim-flow, account-recovery, and other identity-adjacent OL surfaces deliberately out of amendment scope. OL surface-vs-contract audit queued as a Phase 58+ candidate. | Amendment-cycle-1 scoping note §P57-A3 |
| P57-A4 | Public marketing form out of scope. The Phase 51 form takes email + jurisdiction as contact metadata for grant-request intake; the grant flows through Companion-as-Authority approval (Phase 50), not through email-keyed authentication. Principle distinguishes identity from contact. CRV-A7 verified HOLDS at amendment-execution time. | Amendment-cycle-1 scoping note §P57-A4 |
| P57-A5 | CR version phase-57-cr-marketing-engagement-creation-v0_2.md. v0.1 preserved alongside as superseded; both archived at engine repo docs/phase-crs/. (Superseded at cycle 2 by P57-B5: v0.3 active, v0.1 + v0.2 archived as superseded.) | Amendment-cycle-1 scoping note §P57-A5 |
| P57-A6 | New Sub-arc 4: OL surface alignment with engine identity contract. Separate sub-arc keeps the engine / OL boundary visible. Rejected alternative: Sub-arc 1e extension of Field 6 prompt authoring (would muddy the engine / OL boundary). | Amendment-cycle-1 scoping note §P57-A6 |
| P57-A7 | Test count update: OL vitest 149 → 150. Engine 2,280 always-run + 32 skipped unchanged. Alembic 0064 unchanged. | Amendment-cycle-1 scoping note §P57-A7 |
| P57-A8 | Two CR §12 gate updates. Gate 5 amended to include Sub-arc 4 readiness. New Gate 5b: OL signin surface accepts empty email and proceeds to the WebAuthn discoverable-credential path. Subsequent gates renumbered with +1 offset. Total gates 17 → 18. (Subsequent renumbering extended at cycle 2 by P57-B8.) | Amendment-cycle-1 scoping note §P57-A8 |
| P57-A9 | Three methodology candidates carry to v0.21 / v0.42. Candidate A (engine-correct-surface-drifted); Candidate B (standing-principle-not-named-in-source-of-truth-documents-allows-contradicting-surface-to-ship); Candidate C (new at amendment scoping — substrate-friction-discipline-pattern-second-build-mode-firing, two-instance evidence at v0.2: Phase 49 Step 4 + Phase 57 Step 2). (Candidate C reaches three-instance evidence at cycle 2 per P57-B9.) | Amendment-cycle-1 scoping note §P57-A9 |
| P57-A10 | One reserved buffer slot consumed. One remained available at v0.2 if Steps 2b–5 surface a second halt-and-amend cycle. First consumed reserved slot since Phase 49 Step 4; eight consecutive zero-consumption phases (50–56 + Phase 57 pre-halt) ended at this amendment. (Second slot consumed at cycle 2 per P57-B10.) | Amendment-cycle-1 scoping note §P57-A10 |
All ten amendment-cycle-2 construction decisions settled at the amendment-cycle-2 scoping note (loomworks-phase-57-cr-amendment-2-scoping-note-v0_1.md). CC executes against them at amendment-cycle-2 build time; does not re-decide. The architectural shift from cycle 1: the fix shape is not pre-decided in scoping — the diagnostics produce the fix shape at CRV-B execution time. The architectural decisions settled here are the investigation envelope + execution posture + acceptance criteria, not the implementation surface.
| Item | Setting | Source |
|------|---------|--------|
| P57-B1 | Sub-arc 5 framing — route-to-substrate runtime binding for /operator/create-engagement. Scope absorbs whatever the cycle-2 halt-surface §4 diagnostics surface as the root layer: OL converse-submission path (most likely per halt-surface §4.5 — <ChatView mode> prop drives banner but may not drive submission discriminator); engine classifier/dispatcher context-scoping (if §4.3 surfaces state leakage from conversation_turns not being scoped to creation mode); engine intent threshold/labeling (if §4.2 surfaces classifier returning general_conversation at high confidence); or shared. Investigation envelope is the six diagnostics; not a pre-specified fix. Rejected alternative: pre-decide "OL passes intent_hint=create_engagement_entry" before diagnostics confirm (would risk fixing the wrong layer). Rejected alternative: scope expansion to audit all OL→engine route bindings (broader than necessary; Phase 58+ candidate). | Amendment-cycle-2 scoping note §P57-B1 |
| P57-B2 | Diagnostic-first execution posture for Step 2c. CC runs CRV-B1 through CRV-B6 (per cycle-2 halt-surface §4) as Step 2c's first activity, before any production code change. The CRV-B findings produce a brief diagnostic-findings document committed to docs/phase-impl-notes/phase-57-step-2c-diagnostic-findings-v0_1.md on the engine repo's phase-57-marketing-engagement-creation branch. Content: per-CRV verdict; root-layer identification (OL/engine/shared); specific file:line change sites; test surface specification. Only after the diagnostic findings note lands does CC execute the production fix. Codifies new methodology candidate F (diagnosis-as-architecture-when-runtime-binding-fails). | Amendment-cycle-2 scoping note §P57-B2 |
| P57-B3 | Scrollback isolation in creation mode is in scope. The visible-prior-chat-pairs flag from cycle-2 halt-surface §2.1 may be the same issue as the runtime-binding failure (classifier sees prior general_conversation turns as context). Fix presents a creation-mode-scoped (or empty) scrollback on /operator/create-engagement. Layer (OL fetch / engine scope) determined at CRV-B3 time. Rejected alternative: treat scrollback leakage as cosmetic and defer (the visible scrollback may itself be confusing the runtime binding). | Amendment-cycle-2 scoping note §P57-B3 |
| P57-B4 | Test surface floor: ≥1 e2e/integration test pins the wire path. Closes the Phase 55 e2e gap halt-surface §4.6 named — no existing test exercises OL surface → engine classifier → creation-flow handlers end-to-end. Harness (OL vitest mocked / engine pytest / new e2e) per CRV-B6 findings. Rejected alternative: zero new tests (regression-prone). Rejected alternative: full Phase 55 e2e suite (out of scope; the floor is one test that pins this specific route-to-substrate binding). | Amendment-cycle-2 scoping note §P57-B4 |
| P57-B5 | CR version phase-57-cr-marketing-engagement-creation-v0_3.md. v0.1, v0.2, and v0.3 all preserved alongside; all three archived at engine repo docs/phase-crs/. v0.3 is active; v0.2 marked superseded; v0.1 already marked superseded. Multi-version archival precedent: Phase 49 has v0.1, v0.2, v0.3 archived under the same convention. | Amendment-cycle-2 scoping note §P57-B5 |
| P57-B6 | New Sub-arc 5: route-to-substrate runtime binding for /operator/create-engagement. Separate sub-arc keeps the runtime-binding problem class visible alongside engine substrate (Sub-arc 1), the original Sub-arcs 2/3, and the cycle-1 OL surface alignment (Sub-arc 4). Rejected alternative: extend Sub-arc 4 to absorb (signin-alignment-specific; runtime-binding problem class is structurally different — they happen to both surface as OL-side findings but address different layers). Rejected alternative: split Sub-arc 5 into two sub-arcs (OL submission + engine classification) before CRV-B confirms the layer (would pre-decide what CRV-B is meant to find). | Amendment-cycle-2 scoping note §P57-B6 |
| P57-B7 | Test count update — deferred to CRV-B findings, with a documented floor and ceiling. Floor: +1 net test (per P57-B4). Ceiling: +1 OL vitest AND +1 engine vitest if CRV-B6 surfaces shared-fix shape. Alembic 0064 unchanged across all candidate fix shapes (no migration consumed). CR §16 v0.3 test count table reads: OL vitest 150 → 151 (most likely; OL-side fix) OR 150 (if pure-engine fix); engine always-run 2,280 → 2,281 (if engine-side or shared fix) OR 2,280 (if pure-OL fix); calibration-gated 32 unchanged across candidates. The acceptance gate accepts the +1 net floor; the implementation notes record the as-shipped counts at Phase 57 close. | Amendment-cycle-2 scoping note §P57-B7 |
| P57-B8 | Three CR §12 gate updates. Gate 5 amended further to include Sub-arc 5 readiness. New Gate 5c: route-to-substrate runtime binding verified — submitting a message from /operator/create-engagement engages create_engagement_entry (or _active on follow-on turns) per classifier log; per-field loader splices the correct creation-flow prompt component; Companion response shape is consistent with creation-flow scaffolding, not general_conversation. Subsequent gates renumber with +1 offset. Total gates: 18 (post-cycle-1) → 19. | Amendment-cycle-2 scoping note §P57-B8 |
| P57-B9 | Methodology candidates carry forward — thirteen total at Phase 57 close. Cycle-2 halt-surface §6 enumerated twelve (1–6 pre-build/Step-0; 7–9 cycle-1 candidates A/B/C; 10 the cycle-1 CR-amendment-drafting-prose observation; 11/12 new at cycle-2 halt-surface as Candidates D per-route-companion-routing-not-asserted-at-step-0 and E — the banner-plain-terms-discipline-confirmed-on-first-real-Operator-pass positive observation). Cycle-2 scoping adds Candidate F: diagnosis-as-architecture-when-runtime-binding-fails, single-instance evidence shipped at P57-B2's diagnostic-first execution posture; generalizes the substrate-friction-discipline-pattern at a finer-grained scoping-vs-execution boundary. Candidate C reaches three-instance evidence (Phase 49 Step 4 + Phase 57 cycle 1 + Phase 57 cycle 2 — three consecutive instances within an eight-phase window); clears the v0.21 promotion threshold per manifest v0.39 §2 / v0.40 §2 two-instance promotion convention; the name should be amended at v0.21 to drop the "second" qualifier — the pattern is substrate-friction-discipline-pattern build-mode firing. Step 4 implementation notes carry thirteen candidates rather than the twelve halt-surface §6 projected. | Amendment-cycle-2 scoping note §P57-B9 |
| P57-B10 | Second reserved buffer slot consumed. Both Phase 57 reserved slots are now consumed (Step 6 at cycle 1, Sub-arc 4; Step 7 at cycle 2, Sub-arc 5). First phase since Phase 49 to consume both reserved slots in a single phase. The reserved-slot pre-commitment design fires exactly as intended at its threshold case — a phase that requires two halt-and-amend cycles still completes within its reserved budget without derailing or expanding scope. Manifest v0.39 §2 reserved-slot-as-halt-condition-pre-commitment framing carries forward, strengthened by this evidence: the pattern is not just the slots exist to absorb amendment but the slots' count is calibrated to actual mid-build amendment frequency at the worst case observed. No reserved slots remain; any further mid-build amendment requires explicit Operator authorization (itself a halt-and-surface condition per §11). | Amendment-cycle-2 scoping note §P57-B10 |
Discovery-record posture: positions named alongside corrections; alternatives that didn't fire preserved.
Position 1 — Pre-scoping. Phase 32 (the marketing engagement) was the first-line recommendation in both Phase 55 close handoff §9 and Phase 56 close handoff §9. Two consecutive close-handoff recommendations.
Position 2 (v0.1) — Recommendation Candidate I, Shape B. Phase 32 framed as a usage event with bounded substrate tuning. The Field 6 elicitation gap surfaced as the probable Step 0 finding that would drive the "bounded tuning" envelope. Calibration capture identified as the methodology byproduct.
Reshape candidates anticipated at v0.1 → v0.2 (none fired). Operator-reframe to Shape A (pure usage); Operator-reframe to Shape C (bundled prep with §1.3 refactor candidates or Phase 31 plain-terms residue); Step 0 reshape on V2 (Field 6 gap discovered as non-gap); Step 0 reshape on V3 (multi-value handling broken); Operator-reframe to Candidate II or III. None of these reshapes fired at v0.2 absorption.
Position 3 (v0.2) — Confirmatory narrowing; Shape B settled. Step 0 returned State 2 / no halt-condition firings: V0 HOLDS-WITH-DRIFT (two items absorbed as methodology candidates); V1 HOLDS (surface inventory matches manifest v0.41 §1); V2 GAP-CONFIRMED-AS-EXPECTED (Field 6 elicitation absent as predicted); V3 MULTI-VALUE-ACCEPTED (the surface elicits multi-value fields cleanly); V4 POSTURE-GAP minor (the pre-drafted-content posture surfaces minor friction worth capturing but not pre-tuning); V5 HOLDS (Discovery-record terminal-turn path clean); V6 HOLDS (marketing v0.3 content maps cleanly to Fields 1–6); V7 HOLDS (Phase 31 plain-terms residue isolated; doesn't bite Phase 32); V8 HOLDS (OL surface renders). The substrate-evidence-can-re-rationalize-selection pattern did not fire — v0.1 framing was on-target. The trajectory shape is confirmatory narrowing, not reshape. Worth recording as the baseline against which reshape trajectories stand out.
Position 4 (v0.2) — Two methodology candidates surfaced incidentally to V0.
phase-55-step-0. Between Phase 56 close and Phase 57 Step 0, phase-55-step-0 was silently deleted. Strengthens the Step 0 branch lifecycle named principle's "decision-by-default produces silent cleanup" framing. Methodology candidate refinement.
Position 5 (handoff) — P57-D7 elevated to Option A. The silent cleanup of phase-55-step-0 showed Option A is the natural drift. Option A formalizes the convention going forward and applies retroactively to phase-56-step-0 at Phase 57 close.
Carry to v0.42 manifest absorption and v0.21 methodology consolidation:
The trajectory leading to v0.2 is worth preserving in full for v0.42 manifest absorption and v0.21 methodology consolidation. This is the second build-mode firing of the substrate-friction-discipline-pattern (manifest v0.39 §2); the first such firing since Phase 49 (Step 4 → phase-49-step-4-amendment-scoping-v0_1.md → CR v0.3 → Step 4b — the canonical instance).
Position 1 (Phase 57 scoping v0.1 → v0.2 → CR-2026-090 v0_1). Phase 57 anticipated zero OL substrate changes. The CR explicitly named this at §16 test count predictions (OL vitest: 149 unchanged) and §6 (What Phase 57 does NOT deliver). Step 0 (V1–V8) verified engine-side substrate exhaustively; OL-side substrate was not Step 0's aperture because the scoping note did not anticipate OL substrate work.
Position 2 (Step 2 entry, pre-halt). Local stack readiness friction surfaced (CORS preflight 405 on OL :3001 → engine :8000). Resolved with LOOMWORKS_ENV=development added to local .env. CR §12 gate 5 (live OL stack ready) appeared met. Step 2 ready to begin. Note recorded in the halt-surface: gate 5 was met at the infrastructure layer but had not been validated at the architectural layer; the architectural validation happened only when the Operator looked at the signin surface and named the standing principle.
Position 3 (halt-surface diagnostic). Three findings against the live engine + OL source on the phase-57-marketing-engagement-creation branch:
SignupBeginRequest, LoginBeginRequest, PersonRow all treat email as Optional).IdentifierStep.tsx:31 contradicts the engine contract by requiring email input where the engine does not.The principle is correctly embodied in the engine; the contradiction is at the OL client-side gate only. The fix is one-line in scope.
Position 4 (this amendment at v0.2). Narrow OL surface alignment scoped strictly to the signin form entry point. Sub-arc 4 added; one new build step (Step 2a) inserted before the paused Step 2 (renamed Step 2b for clarity). One vitest. Surface text updated. Engine untouched. Audit of sibling OL identity-adjacent surfaces (sign-up, claim, account recovery) queues as a Phase 58+ candidate rather than expanding amendment scope.
The four positions are preserved. Position 1 (no OL changes anticipated) is not erased by Position 4 (one OL change required). Position 1 was correct given the information accessible to Phase 57 scoping at the time; Position 4 corrects with the principle now named and the contradiction identified.
Two from the halt-surface; one new at amendment-cycle-1 scoping. All carry to v0.42 manifest absorption and v0.21 methodology consolidation.
engine-correct-surface-drifted. Single-instance evidence at cycle-1 halt. The engine's data model correctly implements a standing principle; the OL surface added a client-side requirement that contradicts the engine contract; the drift was not caught at any prior phase close (Phases 41/48/50 each shipped surfaces adjacent to identity without surfacing the contradiction). Generalizes to: surface implementations can drift from their underlying contract; surface-vs-contract audits catch this; the audit needs a trigger. The trigger at this instance was the first real-Operator usage event.standing-principle-not-named-in-source-of-truth-documents-allows-contradicting-surface-to-ship. Single-instance evidence at cycle-1 halt. The standing DUNIN7 principle (email must not be used for identity) existed in the Operator's head as background knowledge but was not named in what-dunin7-is-building, the current-status manifest, any phase scoping note, any CR, or any investigation document. Three phases (41/48/50) made identity-adjacent surface decisions without the principle being a checkable document constraint. Generalizes to: DUNIN7 principles that aren't written down can't be enforced by phase planning; they surface as findings during usage events rather than at scoping time. Remediation: name the email-not-identity principle in what-dunin7-is-building at v0.21. This amendment does not perform the remediation; the remediation belongs to v0.21 consolidation work.substrate-friction-discipline-pattern-second-build-mode-firing. Two-instance evidence at v0.2 (Phase 49 Step 4 first; Phase 57 Step 2 second). The two instances were usefully different in shape — Phase 49 was engine-side architectural friction at impl time; Phase 57 cycle 1 was OL-side surface-vs-contract drift at first usage. The pattern shape generalized; two-instance evidence was the standard promotion threshold per manifest v0.39 §2 / v0.40 §2 precedents. (At cycle 2: this candidate reaches three-instance evidence; see §4 amendment-cycle-2 trajectory below.)Two minor departures from the amendment-cycle-1 handoff §7.2 instruction recorded here for discovery-record posture, both narrow accuracy fixes within sections the handoff labeled "Unchanged."
Both fixes are within the handoff's "Unchanged" interpretation when read as the structure and the commands are unchanged; both fixes correct factual claims that strict prose preservation would render inaccurate. Recording the departures here per the discovery-record posture rather than silently re-writing.
The trajectory leading to v0.3 is worth preserving in full for v0.42 manifest absorption and v0.21 methodology consolidation. This is the third build-mode firing of the substrate-friction-discipline-pattern (manifest v0.39 §2; manifest v0.41 §1 reframed as structural rather than coincidental). Three-instance evidence within an eight-phase window: Phase 49 Step 4 → Phase 49 Step 4 amendment scoping → CR v0.3 → Step 4b (the canonical instance); Phase 57 amendment cycle 1 (Sub-arc 4 OL signin alignment); Phase 57 amendment cycle 2 (this — Sub-arc 5 route-to-substrate binding). The reserved-slot pre-commitment design is firing exactly as intended — slots exist precisely to absorb mid-build amendment without derailing the phase, and Phase 57 now exercises both of its slots to design specification.
Position 5 — Cycle-1 amendment execution. CR v0.2 produced. CC archived v0.2; ran CRV-A1 through CRV-A8 (all HELD); implemented Sub-arc 4 components 4a/4b/4c/4d at the verified file locations; OL vitest 149 → 150; Sub-arc 4 commit at OL e435b30. Checkpoint A extended; Operator confirmed Sub-arc 4 fix. Step 2b began. Signin worked clean.
Position 6 — Cycle-2 halt-surface diagnostic. Surface evidence on the live /operator/create-engagement route post-Sub-arc-4-signin: surface loads with the correct banner ("Setting up a new project" — Phase 56 Sub-arc 3a revision, plain-terms-discipline reading cleanly on the live surface; first real-Operator confirmation of the banner copy; cycle-2 halt-surface §6 Candidate E positive observation). Diagnostic exchange returned general-purpose Companion behavior, not creation-flow scaffolding. Three prior unrelated chat pairs visible in scrollback (state-leakage flag). The friction is upstream of Field 6 — the entire scaffolded conversation flow does not engage from this route. Sub-arc 1 (Field 6 prompt) is correct + loaded; Sub-arc 4 is correct + landed; CRV-1 through CRV-A8 all HELD. The break is at the runtime binding layer between the OL surface's converse submission and the engine's classifier/dispatcher path — a layer Step 0 and CRV-A structurally could not probe (Step 0 V8 confirmed the route renders; CRV-A verified OL signin contract alignment; neither asks "does a message submitted from this specific surface drive the substrate the surface was scoped to drive?"). CC named <ChatView mode="create-engagement">'s converse-submission mode-discriminator propagation as the most likely root cause but explicitly did NOT pre-decide; enumerated six diagnostics (CRV-B1 through CRV-B6) for the cycle-2 scoping chat.
Position 7 (this amendment at v0.3). Narrow runtime-binding fix scoped to the /operator/create-engagement route's submission path. Sub-arc 5 added; one new build step (Step 2c) inserted between Step 2a (cycle-1 Sub-arc 4 signin alignment) and Step 2b (live usage event) for the diagnostic-first runtime-binding fix. The fix shape (OL only / engine only / shared) is determined at CRV-B execution time, not pre-decided here. At least one new test pins the corrected wire path. Scope explicitly does NOT include broader Phase 41/48/50/55 route-binding audit (queued as Phase 58+ candidate alongside the cycle-1 OL surface-vs-contract audit).
The seven positions are preserved. Position 1 (no OL changes anticipated) is not erased by Position 7 (a second OL change and possibly an engine change required). Position 4 (Sub-arc 4 alone resolves OL surface alignment) is not erased by Position 7 (runtime route-to-substrate binding is a separate broken layer; Sub-arc 4 was scoped to fix signin and could not have caught this). The progression Position 1 → 4 → 7 traces the substrate-friction-discipline-pattern firing twice in a single phase — exactly the case manifest v0.39 §2's reserved-slot pre-commitment was designed for.
Three candidates added at cycle 2 (two from the cycle-2 halt-surface §6; one new at cycle-2 scoping) plus the cycle-1 Candidate C reaching three-instance evidence. All carry to v0.42 manifest absorption and v0.21 methodology consolidation. Phase 57 close carries thirteen methodology candidates in total per P57-B9.
per-route-companion-routing-not-asserted-at-step-0. Remediation candidate. Names what Step 0 inspection briefs should add to catch route-to-substrate runtime-binding gaps earlier: a verification that for each route the CR assumes will drive a specific substrate, a message submitted from that route at substrate-readiness time actually engages the intended classifier label / dispatcher branch / prompt component. Step 0 currently verifies presence + structure + readiness; the cycle-2 gap is at runtime engagement. Paired with Candidate F (build-discipline pattern)."Setting up a new project" at ChatView.tsx:254) read cleanly to the first real Operator looking at the surface; no friction noted in the cycle-2 halt-surface §2.1 capture beyond the underlying runtime-binding break. Generalizes to: plain-terms-discipline applied at Phase 56 substrate-tuning time was correct; subsequent real-Operator confirmation validates the approach. Single-instance positive evidence; carries to v0.21 as supporting evidence for the plain-terms-discipline named principle.diagnosis-as-architecture-when-runtime-binding-fails. Single-instance evidence at cycle-2 scoping. Names the pattern that cycle 2 differs structurally from cycle 1: cycle 1's halt-surface produced three findings that pre-specified the fix; the cycle-1 scoping note settled the fix shape (P57-A1: remove the gate; omit email; update text); CRV-A1 through CRV-A8 verified the fix's specific surface (file:line, constant names, test conventions). Cycle 2's halt-surface produced ONE finding (the runtime binding is broken) plus six diagnostic items; the cycle-2 scoping note settles the investigation envelope + execution posture (P57-B1 + P57-B2) but cannot settle the fix shape — the diagnostics produce it. The candidate names this as a distinct sub-pattern within substrate-friction-discipline-pattern's three-instance evidence: when substrate is present and correct but runtime engagement fails, scoping's role is to authorize the diagnostic work and constrain its envelope; the diagnostic IS the architectural work for the cycle. Cycle 1 and cycle 2 are both substrate-friction-discipline-pattern firings, but at different granularities: cycle 1's friction was surface-vs-contract (analyzable at halt-surface filing time); cycle 2's friction is runtime-binding (analyzable only via live diagnostics at execution time). Paired with Candidate D (remediation candidate). Carries to v0.21 as a sharpening of substrate-friction-discipline-pattern.In addition, the v0.2 amendment-cycle-1 CR drafting produced a methodology observation that carries to v0.21 / v0.42 (cycle-2 halt-surface §6 Candidate 10): the CR-amendment-drafting-prose-overclaim observation — strict-preservation prose can produce factual inaccuracies when the underlying state has changed; "Unchanged" instructions need a finer-grained reading at sections affected by the amendment. Cycle 2 applies the discipline preemptively (see §8 backwards-compat language and §16 test count language — both avoid claiming byte-identical existing behavior where Sub-arc 5 wire-path semantics may alter what existing tests assert).
The cycle-2 handoff §7.2 instructs preserving v0.2's section order and numbering; insert sub-sections rather than reorganizing. Per cycle-1 methodology candidate 10 (CR-amendment-drafting-prose-overclaim discipline), several sections the handoff lists as appendable (not edited in place) need narrow factual updates where Sub-arc 5 alters claims that would otherwise carry from v0.2 verbatim:
These updates apply cycle-1 methodology candidate 10's discipline: amendment-cycle CR-drafting prose should default to "+N net tests; existing test scope reviewed at execution time" rather than claiming byte-identical existing test behavior when the amendment may alter wire-path semantics. Recording the discipline application here per discovery-record posture.
1a. Field 6 per-field elicitation prompt component.
prompts/intent_instructions/create_engagement/additional_assertions.md. New file.voice.md / constraints.md / success.md (CRV-1 verifies the file shape verbatim at Step 0 pre-flight).docs/voice-principles-v0_1.md. The prompt elicits Field 6 content per marketing v0.3's framing — "additional assertions" rendered as labeled key-value pairs the Operator wants associated with the engagement. The prompt asks for one open-ended question per the per-field elicitation pattern.
1b. field_coverage map extension.
field_coverage map is constructed (CRV-2 confirms the construction site and verifies the key convention).additional_assertions (matching the prompt filename; aligns with Phase 56's filename-to-key convention). CRV-2 verifies the existing keys verbatim — if Phase 56 used numeric keys (field_3 etc.) instead, CR absorbs in-flight as naming-only divergence and uses field_6.1c. Active-template scaffolding update.
prompts/create_engagement_active.md.operation_data["field_coverage"] is extended to include the Field 6 entry. Insertion point is after the existing Field 5 (success) entry, following the existing ordering convention. CRV-3 verifies the exact insertion point and ordering at Step 0 pre-flight.1d. Test exercising new prompt component loading.
tests/test_phase_57_marketing_engagement_creation.py (new test module following the Phase 56 naming pattern).load_per_field_components loader successfully loads the new additional_assertions.md component as part of the per-field prompt assembly. Always-run test.prompt_assets.py loader API (no loader changes per CRV-4).1e. (Not anticipated.) Loader extension. Only required if CRV-4 reveals the loader is hardcoded to specific keys. Default expectation per V1: loader handles arbitrary keys; no loader change needed.
Not substrate work; Operator-paced. Documented here for CR completeness.
/operator/create-engagement on the running stack (local OL against local engine).extract_discovery_to_seed_skill + induct_seed cascade runs (CRV-7 confirms signatures at pre-flight; V5 HOLDS at Step 0)./operator engagement list with induction pass clean.3a. Real-Operator transcript fixture.
tests/fixtures/voice-calibration/real_operator_marvin_<YYYY-MM-DD>.md where date is the literal Step 2 capture date.persona_*.md) by the real_operator_marvin_ prefix.3b. Calibration-gated tests.
tests/test_phase_57_marketing_engagement_creation.py.LOOMWORKS_RUN_CALIBRATION=1 environment variable per Phase 56 P56-D7 precedent. Skip in CI; pass locally with env var set. CRV-6 verifies the gating pattern, skipif decorator usage, and helper invocation against tests/test_phase_56_conversational_creation_surface_voice.py + tests/helpers/voice_calibration.py.3c. Implementation notes document.
docs/phase-impl-notes/phase-57-implementation-notes-v0_1.md.loomworks-explain-affordance-investigation-v0_1.md §6.4 candidate selection downstream); V4 POSTURE-GAP friction phrases captured during the live conversation (input to future micro-tuning phase per P57-D10); persona-vs-real-Operator delta notes (input to v0.21 methodology consolidation); any Step 1 substrate refinement made; as-shipped wording of the Field 6 prompt for reproducibility. At v0.2: amendment cycle 1 trajectory captured alongside the original Sub-arc 3c content — second build-mode firing of substrate-friction-discipline-pattern; Sub-arc 4 components as-shipped; any Step 2a refinements made; the standing DUNIN7 principle named in §3 of the cycle-1 halt-surface note (the first naming in a Loomworks document; awaiting v0.21 canonical naming in what-dunin7-is-building). At v0.3: amendment cycle 2 trajectory captured alongside cycle-1 content — third build-mode firing of substrate-friction-discipline-pattern (within Phase 57, the second firing; reaching three-instance evidence across phases); Sub-arc 5 components as-shipped at the layer CRV-B identifies; the diagnostic findings document filename and key findings referenced; any Step 2c refinements made; thirteen methodology candidates carried forward per P57-B9.Three substantive components plus one new vitest. All OL-side. Engine substrate is correct and untouched. The work resolves the cycle-1 halt-surface finding: the OL signin form's client-side empty-email guard contradicts the engine's WebAuthn discoverable-credential identity contract and the standing DUNIN7 principle that email must not be used for identity.
CR-amendment-cycle-1-time verifications CRV-A1 through CRV-A8 (specified in §10 Step 2a pre-flight) supplied exact paths, line numbers, constant locations, and existing test conventions at amendment-cycle-1 execution time. All CRV-A held; Sub-arc 4 components 4a/4b/4c/4d landed at OL commit e435b30.
4a. Signin form empty-email guard removal.
IdentifierStep.tsx (cycle-1 halt-surface §2 Finding 2 cites IdentifierStep.tsx:31; CRV-A1 confirmed exact path and current line at amendment-cycle-1-execution time).``` if (!email.trim()) { setLocalError(SIGNIN.emailEmptyError); return; } ``` Replaced with: proceed to submission unconditionally (no email-required gate at the client). The engine accepts the empty-email POST cleanly per cycle-1 halt-surface Finding 1 and runs the WebAuthn discoverable-credential path.
SIGNIN.emailEmptyError likely became orphaned. CRV-A2 verified the constant's location and other call-sites at amendment-cycle-1-execution time. If no other call-sites: delete the constant. If orphaned but otherwise harmless: leave with a one-line comment noting Phase 57 amendment cycle 1 removed the sole caller. Recommended: delete. As-shipped disposition recorded in implementation notes.4b. POST body construction.
signin-flow.ts (cycle-1 halt-surface §2 Finding 2 cites signin-flow.ts:42; CRV-A3 confirmed exact path and POST body construction line at amendment-cycle-1-execution time)./auth/login/begin previously constructed as { email: email.trim() }. Changed to omit the email field when empty. Idiomatic TypeScript shape:
```ts
const body = email.trim() ? { email: email.trim() } : {};
```
Exact TypeScript idiom selected at amendment-cycle-1-execution time within the existing file's style. Engine accepts {} cleanly per cycle-1 halt-surface Finding 1 — LoginBeginRequest.email: str | None = None, so an absent field and a null field are equivalent under Pydantic.
4c. Field surface text — optionality indication.
IdentifierStep.tsx (label) plus any helper-text component the form composes (CRV-A4 verified). The strings probably live in a strings constants module such as SIGNIN.identifierLabel / SIGNIN.identifierPlaceholder / SIGNIN.identifierHelper (exact constants verified at amendment-cycle-1-execution time).Email (unchanged) or Email (optional) — selected at amendment-cycle-1-execution time.Email (optional) if not already.4d. Vitest pinning the corrected discoverable-credential path.
tests/components/signin/ or analogous (CRV-A5 verified exact placement and naming convention against the 149-test surface at amendment-cycle-1 start).localError does NOT get set to emailEmptyError → POST body to /auth/login/begin is {} (or omits the email field equivalently) → mocked /auth/login/begin returns a WebAuthn challenge → form transitions to the passkey step. The test mocks the engine boundary at the fetch / API layer; does not exercise live engine.submits empty email to discoverable-credential path or proceeds to passkey step without requiring email input. CC selected final name at amendment-cycle-1-execution time within existing test-naming conventions on the branch./operator/create-engagement (new at amendment cycle 2)
Diagnostic-first execution per P57-B2. The cycle-2 halt-surface produced ONE finding (the runtime binding is broken between /operator/create-engagement and the Phase 55/56 creation-flow substrate) plus SIX diagnostic items (CRV-B1 through CRV-B6); the cycle-2 scoping note settles the investigation envelope and execution posture, NOT the fix layer or fix shape. CR-amendment-cycle-2-time verifications CRV-B1 through CRV-B6 (specified in §10 Step 2c pre-flight) run at amendment-cycle-2 execution time and produce a diagnostic findings document that drives the production fix. The architectural artifact for cycle 2 is the diagnostic findings document at Sub-arc 5b, NOT this CR section — this section describes the diagnostic-first posture and the provisional 5a–5f decomposition; post-CRV-B specifics are execution-time work recorded in the diagnostic findings document and implementation notes.
The provisional decomposition below is what the CR v0.3 §5 / §10 Step 2c sections describe; CRV-B-driven adjustments absorb at execution time per the §11 halt-thresholds. Components may collapse (e.g. 5c + 5d into one commit if findings indicate same layer) or expand (e.g. 5c into 5c-engine + 5c-OL if shared-fix shape).
5a. Diagnostic phase (CRV-B1 through CRV-B6 from cycle-2 halt-surface §4).
prompt.py:817 dispatcher; classify_intent exit in src/loomworks/orchestration/classifier.py; field_coverage initialization in the converse flow handler; load_intent_instruction in prompt_assets.py; ChatView.tsx converse-submission path; existing test coverage probe). Submits diagnostic messages from /operator/create-engagement. Captures findings. Removes temporary logging.5b. Diagnostic findings document.
docs/phase-impl-notes/phase-57-step-2c-diagnostic-findings-v0_1.md on engine repo's phase-57-marketing-engagement-creation branch. Single-file commit.diagnosis-as-architecture-when-runtime-binding-fails).5c. Runtime-binding fix.
5d. Scrollback isolation fix.
general_conversation-labeled turns as context, it's more likely to continue classifying as general_conversation). Fix presents a creation-mode-scoped (or empty) scrollback on /operator/create-engagement.conversation_turns that classifier-conditions on creation-mode also produces a creation-mode-scoped fetch), 5d may collapse into 5c as a single commit. If the fixes attach at different layers, 5d stands separate.5e. Test surface — at least one test pinning the corrected wire path.
5f. Local stack restart + lightweight post-fix confirmation.
/operator/create-engagement; confirms via temporary console log / classifier log / observed response shape that the route now engages create_engagement_entry (or _active on follow-on turns).Cited verbatim for clarity; the CR does not modify these in Sub-arc 1 nor in cycle-1 Sub-arc 4. Cycle-2 Sub-arc 5 MAY touch these surfaces — diagnostic findings determine which. The cycle-2 CR does NOT claim these surfaces are byte-identical-stable across Sub-arc 5 per cycle-1 methodology candidate 10's CR-amendment-drafting-prose-overclaim discipline.
prompt.py:817 — dispatcher splice (CRV-1 confirmed line at pre-flight; CRV-B1 inspects at Sub-arc 5a; may or may not be touched by Sub-arc 5c).prompt_assets.py — load_per_field_components loader (CRV-4 confirmed arbitrary-key handling; CRV-B4 inspects at Sub-arc 5a; may or may not be touched by Sub-arc 5c).src/loomworks/orchestration/classifier.py — classify_intent exit point (CRV-B2 inspects at Sub-arc 5a; may or may not be touched by Sub-arc 5c, depending on whether classifier semantics or classifier context is the root layer).field_coverage initialization site (CRV-B3 inspects at Sub-arc 5a; may or may not be touched by Sub-arc 5c).router.py — terminal-turn matcher token-set (unchanged across cycles).classifier.py / routing.py — IntentLabel literals (18 per manifest v0.41; unchanged across cycles; any addition would trigger §11 halt for cycle-2 scope).prompts/intent_instructions/create_engagement/ (voice.md, constraints.md, success.md) — unchanged across cycles.field_coverage line addition per Sub-arc 1c.Cited verbatim for clarity. Cycle-2 Sub-arc 5 MAY touch these surfaces — diagnostic findings determine which. Per cycle-1 methodology candidate 10's discipline, byte-identical-stable claims are deferred to execution-time review.
ChatView.tsx — banner string at ChatView.tsx:254 (cycle-2 halt-surface §2.1 confirmed reading cleanly on the live surface; Candidate E positive observation). The banner content stays — Sub-arc 5 may touch ChatView.tsx's converse-submission path (CRV-B5) but not the banner string.ChatView.tsx converse-submission path (CRV-B5 inspects at Sub-arc 5a; this is the most likely Sub-arc 5c surface per cycle-2 halt-surface §4.5).e435b30 (signin alignment) — IdentifierStep.tsx, signin-flow.ts, signin strings module, signin vitest — Cycle-2 Sub-arc 5 does NOT touch the signin surfaces. The cycle-1 fix is correct and stays.
Engine substrate is unchanged at amendment cycle 1. Sub-arc 4 is OL-only. No engine endpoint, no engine schema, no Memory event, no _ANCHOR_PRIORITY entry, no Alembic migration. SignupBeginRequest, LoginBeginRequest, PersonRow, begin_signup, and the /auth/login/complete lookup-by-credential_id path all stay as cycle-1 halt-surface Finding 1 documented them.
Engine substrate at amendment cycle 2: may or may not change. Sub-arc 5 may touch engine surfaces (classifier semantics, classifier context, dispatcher branching, converse flow handler scoping) per CRV-B findings. Alembic head stays at 0064 across all candidate fix shapes (§11 halt condition: any migration consumed by Sub-arc 5 would re-open scoping). No Memory event, no _ANCHOR_PRIORITY entry, no endpoint added by Sub-arc 5.
Per scoping v0.2 §What Phase 57 does NOT deliver:
create_project.md plain-terms revision. V7 SURFACED-TO-OPERATOR "constraints" leak in the older creation path. Phase 31 is the Phase-31-path; marketing engagement runs the Phase-55-path; V7 residue isolated. Phase 58+ carry-forward.draft_engagement; raw-Markdown variant of extract_discovery_to_seed_skill. Non-urgent; remain queued.loomworks-explain-affordance-investigation-v0_1.md.origin/phase-* refs from pre-Phase-55 backfill remain out-of-scope (separate Operator-elective).Added at amendment cycle 1:
loomworks-queued-directions-and-deferred-work-v0_12.md (next version bump from v0.11) at Phase 57 close. The Phase 57 amendment fixes the signin entry point Marvin uses; the broader audit is well-shaped as a dedicated future phase with its own scoping arc and its own Step 0 inspection brief.what-dunin7-is-building v0.21 absorption. Per amendment-cycle-1 scoping note settled item 5 (inheriting cycle-1 halt-surface §5 settled item 5): the standing DUNIN7 principle (email must not be used for identity) is named in the cycle-1 halt-surface §3 for the first-time-in-a-Loomworks-document record; canonical naming in what-dunin7-is-building is downstream v0.21 consolidation work, not Phase 57 scope.Added at amendment cycle 2:
/chat, /operator/ other than create-engagement, /onboarding, etc.) whose mode props may not propagate to converse-submission in the same way <ChatView mode="create-engagement"> may not. Queued as a Phase 58+ candidate (OL route-to-substrate runtime-binding audit) at the queued-directions document at Phase 57 close. Possibly consolidates with the cycle-1-derived OL surface-vs-contract audit* candidate at Phase 58 scoping (the two queued audits may consolidate into one Phase 58+ phase or split into two; that decision belongs to Phase 58 scoping)./operator/create-engagement; broader observations about the OL surface → engine classifier wire path that surface during CRV-B but aren't the specific cycle-2 fix carry to Phase 58+ via the queued direction. The findings document is scoped to the cycle-2 fix; broader notes go into Phase 57 implementation notes (§3c) for the Phase 58+ audit's scoping.what-dunin7-is-building v0.21 absorption of Candidate F. The methodology candidate F (diagnosis-as-architecture-when-runtime-binding-fails) and Candidate C three-instance promotion both carry to v0.21 consolidation work; Phase 57 closes carrying thirteen methodology candidates, not absorbing them.tests/test_phase_57_marketing_engagement_creation.py. (Satisfied pre-cycle-1-halt at engine a00f4a3; 2,280 always-run.)LOOMWORKS_RUN_CALIBRATION=1 gating.tests/components/signin/ or analogous (CRV-A5 verified). Test behavior: empty email submit → no emailEmptyError set → POST body to /auth/login/begin omits the email field → mocked engine returns a WebAuthn challenge → form transitions to the passkey step. Existing 149 OL vitest stay green. Post-Sub-arc-4 OL count: 150.
Tests must pass at Checkpoint A (substrate gate, extended at amendment cycle 1 to cover Step 2a OL substrate; extended further at amendment cycle 2 as Checkpoint A2 to cover Step 2c Sub-arc 5 fix and lightweight-confirmation observation) and Checkpoint B (final gate). The calibration-gated tests are confirmed to pass locally with LOOMWORKS_RUN_CALIBRATION=1 and confirmed to skip without it before close.
prompt.py:817 in Sub-arc 1; no schema or migration change. The Field 6 addition is purely additive (new prompt file + new map entry + new active-template line).SIGNIN.emailEmptyError constant change. Existing imports and call-sites of the signin form continue to work.0064. Eighth consecutive phase of typed-MemoryObject-without-migration through Phase 57 close (Phase 57 adds no MemoryObject subclass, no _ANCHOR_PRIORITY entry, no endpoint via Sub-arcs 1 or 4). Sub-arc 4 does not touch the engine; backwards-compat at the engine layer is total through cycle 1.IntentLabel additions through cycle 1. Creation-flow labels carried from Phase 55/56; no Phase 57 cycle-1 additions.
Amendment cycle 1 backwards-compat summary. Existing 149 OL vitest stay green; the new vitest pins the corrected behavior; engine substrate is untouched so all engine backwards-compat carries. The OL signin form remains functionally compatible with previously-registered passkey credentials — narrowing allowCredentials via a supplied email continues to work, and the new empty-email path activates the engine's existing discoverable-credential branch. No data migration, no client-side state migration, no API contract change.
Amendment cycle 2 backwards-compat (qualified pending CRV-B findings). Per cycle-1 methodology candidate 10's CR-amendment-drafting-prose-overclaim discipline, byte-identical-stable existing-test-behavior claims for Sub-arc 5 are deferred to execution-time review. The cycle-2 fix may touch the OL converse-submission path (most likely root cause per cycle-2 halt-surface §4.5), the engine classifier semantics or classifier context-scoping, the dispatcher branching, or the converse flow handler scoping — depending on what CRV-B1 through CRV-B6 surface as the root layer. Each of these surfaces interacts with existing test coverage in different ways:
ChatView.tsx converse-submission path passes a mode discriminator the engine reads), existing 150 OL vitest and 2,280 engine always-run tests likely stay green except for any vitest that asserted byte-identical absent-mode-discriminator behavior on the converse-submission path. Sub-arc 5e adds +1 OL vitest pinning the corrected path; final OL count 150 or 151.The diagnostic findings document (Sub-arc 5b) names the specific existing-test interactions surfaced; the implementation notes record the as-shipped existing-test adjustments and rationale. The CR does NOT pre-commit to byte-identical existing behavior at v0.3 because such a claim could be falsified at CRV-B execution time and the cycle-1 methodology candidate 10 discipline applies.
MemoryObject subclass, no _ANCHOR_PRIORITY entry, no endpoint added by Sub-arc 5.IntentLabel additions at cycle 2. If CRV-B2 surfaces a need for a new label, that's a §11 halt condition (cycle-2 envelope is runtime-binding, not classifier taxonomy expansion).
No new surfaces. No new MemoryObject subclass; no new _ANCHOR_PRIORITY entry; no new endpoint. Existing FORAY surfaces (Phase 16 upload anchors; Phase 53 discovery_to_seed_extracted anchor at priority "standard"; standard induct_seed anchor) carry the Discovery-record path unchanged.
Amendment cycle 1 touches no Memory event, no _ANCHOR_PRIORITY entry, no engine endpoint, no FORAY hook. The signin path is the WebAuthn flow at the auth boundary; it does not write Memory events of its own. FORAY surfaces are unchanged at v0.2.
Amendment cycle 2 touches no FORAY hook. Sub-arc 5 is a runtime-binding fix between OL converse submission and engine classification — neither layer writes new Memory events of its own, and the existing converse Memory event surfaces (Phase 42 reconciler coverage; Phase 55 creation-flow Memory anchors) are unchanged. FORAY surfaces are unchanged at v0.3.
Six active steps + one new step (Step 2c) inserted at amendment cycle 2 + two reserved buffer slots (both now consumed). Reserved-slot-as-halt-condition-pre-commitment per manifest v0.39 §2; both Phase 57 slots are now consumed (Step 6 by Sub-arc 4 at cycle 1; Step 7 by Sub-arc 5 at cycle 2). First phase since Phase 49 to consume both reserved slots — the reserved-slot pre-commitment design fires exactly as intended at its threshold case (P57-B10). Methodology candidate C captures this trajectory at three-instance evidence; the v0.21 promotion threshold is cleared.
Auto-mode posture: Step 0 + Step 1 auto-proceed. Checkpoint A halts before Step 2 and extends at amendment cycle 1 to cover Step 2a (Sub-arc 4) completion; at amendment cycle 2 Checkpoint A extends further to Checkpoint A2 to cover Step 2c (Sub-arc 5) lightweight-confirmation observation — Operator confirms substrate (Field 6) AND Sub-arc 4 fix AND Sub-arc 5 fix (route-to-substrate binding works at lightweight-confirmation level) before Step 2b live usage proceeds. The Operator-confirmation surface at Checkpoint A2 is the diagnostic findings document (Sub-arc 5b) + the lightweight confirmation observation (Sub-arc 5f). Steps 2b–4 are Operator-paced (Step 2b is the live conversation; Steps 3/4 are CC capture). Checkpoint B (final) halts before tagging.
Status at amendment cycle 2. DONE pre-cycle-1-halt. CR archival path updates from v0_2 to v0_3 at amendment-cycle-2 execution time (CC re-archives the amended CR; preserves v0_1 + v0_2 alongside as superseded).
What. Standard pre-flight. CC archives this CR to engine repo at docs/phase-crs/phase-57-cr-marketing-engagement-creation-v0_3.md (preserves phase-57-cr-marketing-engagement-creation-v0_1.md and phase-57-cr-marketing-engagement-creation-v0_2.md alongside as superseded). Confirms baseline tags, test counts, Alembic head. Creates branch phase-57-marketing-engagement-creation from main on engine and OL repos. (Branch already exists pre-amendment-cycle-2-resume; CC re-archives the CR on the existing branch.)
Pre-flight reads. CR-time deltas — exact strings, file paths, signatures, naming conventions that scoping-time Step 0 didn't enumerate and that the CR drafter could not verify from Claude.ai. CC ran these against the live engine repo at the original Step 0 of the build cycle; all CRV-1 through CRV-8 verdicts captured. Naming-only divergences absorbed in-flight; no architectural divergences fired.
prompts/intent_instructions/create_engagement/voice.md (or constraints.md or success.md) verbatim. Confirmed structural shape Phase 57's additional_assertions.md mirrors. Expected: ~11 lines; plain-terms-discipline applied; one elicitation question per prompt; format aligned with Phase 56 precedent.field_coverage map key convention. Verified existing keys and their construction site. Keys match prompt component filenames per V1 (so voice, constraints, success — Phase 57 adds additional_assertions).field_coverage. Located the site in prompts/create_engagement_active.md where the Companion populates operation_data["field_coverage"]. Phase 56 added entries for Fields 3–5; Phase 57 adds the Field 6 entry at the same construction site, following existing ordering convention (Field 6 entry inserted after the Field 5 entry).load_per_field_components loader signature and key handling. Read the loader at prompt_assets.py. Confirmed it handles arbitrary keys (per V1). No loader change required.tests/fixtures/voice-calibration/persona_*.md. Confirmed the format Phase 57's real-Operator transcript fixture mirrors. Format settled by Phase 56 P56-D2.tests/test_phase_56_conversational_creation_surface_voice.py for the four P56 calibration-gated tests. Confirmed the LOOMWORKS_RUN_CALIBRATION=1 env-var gating pattern, the skipif decorator usage, and the test-helper invocation at tests/helpers/voice_calibration.py. Phase 57's gated tests mirror this pattern exactly.extract_discovery_to_seed_skill, and induct_seed. Confirmed path Step 2b exercises is unchanged from Phase 56 close. V5 HOLDS at Step 0.docs/voice-principles-v0_1.md and the Phase 56 close session handoff for the explicit-refspec convention promoted at manifest v0.41 §2. Confirmed the close commands Phase 57 uses verbatim. P57-D7 Option A retroactive cleanup added as Step 5 actions.
CR archival. Copy this CR file to engine repo docs/phase-crs/phase-57-cr-marketing-engagement-creation-v0_3.md (preserving v0_1 + v0_2 alongside as superseded).
Branch creation. git checkout -b phase-57-marketing-engagement-creation on engine and OL (already in place at amendment-cycle-2 resume).
Mode posture. Auto-proceed.
Acceptance gate. All eight CRV verdicts captured. Branch present on both repos. CR archived (v0_3 alongside v0_1 + v0_2). Baseline tag + test counts + Alembic head confirmed against cycle-2 handoff §2.
Halt threshold. Any CRV produces an architectural divergence (not naming-only) → halt-surface note + Operator-elective amendment cycle in a fresh Claude.ai chat. (None fired at original Step 0.) Baseline divergence (test count off by more than ±2 routine noise; Alembic head different; working tree dirty; tag missing) → halt before any further work.
Time. ~10 min for CR re-archival at cycle-2 resume.
Status at amendment cycle 2. DONE pre-cycle-1-halt. Engine substrate at a00f4a3 on the build branch; +1 always-run test added (2,280 always-run total); +1 calibration-gated and +1 additional gated test (32 skipped total) per the cycle-1 halt-surface §6 state-at-halt record. Unchanged at cycle 2.
What. Authored additional_assertions.md per 1a. Extended field_coverage map per 1b. Updated active-template per 1c. Added +1 test per 1d.
Build (executed pre-cycle-1-halt).
prompts/intent_instructions/create_engagement/additional_assertions.md (~11 lines).field_coverage map construction site (per CRV-2/3) to add the additional_assertions entry.prompts/create_engagement_active.md to add the Field 6 entry to the Companion-judgement site (per CRV-3 insertion point and ordering).tests/test_phase_57_marketing_engagement_creation.py with one always-run test exercising the new prompt component loading.Tests. +1 always-run.
Mode posture. Auto-proceed. (Done.)
Acceptance gate. New prompt file present at the specified path with ~11 lines following Phase 56 structural shape. field_coverage map carries the new entry. Active-template Companion-judgement site references Field 6. New test green. Existing 2,279 tests still green. Lint clean. Satisfied at engine a00f4a3.
Time. ~30 min. (Done.)
Status at amendment cycle 2. DONE at amendment cycle 1. OL Sub-arc 4 substrate at OL e435b30 on the build branch; +1 OL vitest added (150 OL vitest total). All CRV-A1 through CRV-A8 held; Sub-arc 4 components 4a/4b/4c/4d landed at the verified file locations. Unchanged at cycle 2.
What (executed at amendment cycle 1). Removed the empty-email guard at the OL signin form (per Sub-arc 4a); omitted the email field from the /auth/login/begin POST body when empty (per Sub-arc 4b); updated field surface text (label / placeholder / helper) to indicate optionality (per Sub-arc 4c); added one vitest pinning the corrected discoverable-credential path (per Sub-arc 4d). Deleted the now-orphan SIGNIN.emailEmptyError constant per CRV-A2 disposition (or left orphaned-but-harmless — as-shipped disposition in implementation notes).
Pre-flight reads (executed at amendment cycle 1). CR-amendment-cycle-1-time verifications CRV-A1 through CRV-A8 per cycle-1 handoff §8. CC ran these against the live OL repo on branch phase-57-marketing-engagement-creation at 2cc0ebc. All HELD.
IdentifierStep.tsx exact path and current line numbers. Cycle-1 halt-surface cites IdentifierStep.tsx:31. Verified the file's location in the OL repo's tree and confirmed the empty-email-guard block's current line range. Path the CR's Sub-arc 4a edit at the verified location.SIGNIN.emailEmptyError constant — location and all call-sites. Determined the strings file/module. Determined whether removing the sole caller (Sub-arc 4a) orphans the constant. Plan: delete if orphaned, leave with a one-line comment if any other caller remains. Recorded the decision in implementation notes.signin-flow.ts exact path and POST body construction at the cited line. Cycle-1 halt-surface cites signin-flow.ts:42. Verified the current shape of the body construction and any surrounding TypeScript style conventions; specified the new idiomatic conditional body in TypeScript within the existing file's style./auth/login/begin boundary). The new Sub-arc 4d vitest matches the existing convention./auth/login/begin POST body absent-email engine behavior. Cycle-1 halt-surface Finding 1 established this. Re-read the engine LoginBeginRequest schema and the route handler to triple-confirm at the time of execution. Verdict HELD: engine accepts email: None cleanly via Pydantic optional default; absent field and null field are equivalent.2cc0ebc. Re-confirmed on the OL repo's phase-57-marketing-engagement-creation branch at amendment-cycle-1-execution time. Verdict: 149.Build (executed at amendment cycle 1).
IdentifierStep.tsx at the location CRV-A1 verified — removed the empty-email guard block (4a).signin-flow.ts at the location CRV-A3 verified — changed the POST body construction to omit email when empty (4b).SIGNIN.emailEmptyError constant per CRV-A2 resolution.Tests. +1 OL vitest. OL vitest count 149 → 150.
Mode posture. Auto-proceed. (Done.)
Acceptance gate. All four Sub-arc 4 components landed at the verified file locations. The new vitest passes; existing 149 OL vitest still pass; lint/tsc/build clean on OL. OL vitest count 150 (was 149). Implementation notes capture the as-shipped surface-text strings and the SIGNIN.emailEmptyError constant disposition. Satisfied at OL e435b30.
Time. ~30 min. (Done.)
What. Run CRV-B1 through CRV-B6 as Sub-arc 5a; file the diagnostic findings document as Sub-arc 5b; implement the runtime-binding fix as Sub-arc 5c (and possibly Sub-arc 5d collapsed); add at least one test pinning the corrected wire path as Sub-arc 5e; restart the local stack and lightweight-confirm as Sub-arc 5f.
Pre-flight reads. CR-amendment-cycle-2-time diagnostic verifications CRV-B1 through CRV-B6 per cycle-2 handoff §8. CC runs these against live engine + OL on branch heads (phase-57-marketing-engagement-creation at the cycle-2 halt-surface engine commit; OL at e435b30). Naming-only divergences (line numbers shifted; file paths slightly different from cycle-2 halt-surface §4's literal cites; constant names slightly different) absorb in-flight. Architectural divergences (a fourth root layer the §4 diagnostics didn't anticipate; all six CRV-Bs return HOLDS meaning substrate IS engaged but response shape is wrong for another reason; fix requires migration or Phase 42/55 semantic change) halt and surface a follow-on phase-57-halt-surface-2026-05-12-step-2c-v0_1.md (or whatever the calendar date at halt time is) note in engine repo docs/phase-impl-notes/.
The six CRV-B diagnostics, verbatim from cycle-2 halt-surface §4:
prompt.py:817 against actual request flow from this route. Add temporary logging at the dispatcher's if intent == "create_engagement_active": branch (line 839). Submit a message from /operator/create-engagement. Does the branch fire? If yes: substrate IS engaged but the Companion response is being generated some other way. If no: route never reaches the creation-flow dispatch.classify_intent's exit point in src/loomworks/orchestration/classifier.py. Submit "I want to start a project" from /operator/create-engagement. Capture the assigned IntentLabel + confidence. Expected: create_engagement_entry with high confidence. If actual: general_conversation or anything else, that's the proximate gap.field_coverage is initialized for this engagement-creation session — or that an engagement-creation session exists at all. Determine whether the OL surface spins a fresh creation context or shares converse-pipeline state with /chat. The three prior unrelated chat pairs visible in cycle-2 halt-surface §2.1 suggest state leakage.create_engagement_active.md scaffolding. Add temporary logging in load_intent_instruction(intent) at prompt_assets.py. Submit from this surface. Capture which .md template the dispatcher loads. Expected: create_engagement_active.md (after the entry turn classifies). If actual: any other template or the stub responder, that confirms the route is not driving the creation flow.<ChatView mode="create-engagement"> mode prop propagates to the engine. Inspect ChatView.tsx's converse submission path. Does the mode prop translate to a request parameter the engine reads? If the OL submits to a generic /converse endpoint without any creation-mode discriminator, the engine has no way to know this is a creation-flow conversation regardless of how correctly the substrate is shaped. This is the most likely root cause per cycle-2 halt-surface §4.5 — banner-rendering uses the mode prop, but converse-submission may not.
After CRV-B1 through CRV-B6, CC writes the diagnostic findings document at docs/phase-impl-notes/phase-57-step-2c-diagnostic-findings-v0_1.md. The findings drive Sub-arc 5c (fix), Sub-arc 5d (scrollback fix, possibly collapsed), and Sub-arc 5e (test surface). The CR does NOT pre-decide the fix layer or fix shape — the diagnostic findings document is the architectural artifact (P57-B2).
Build.
docs/phase-impl-notes/phase-57-step-2c-diagnostic-findings-v0_1.md on engine branch. Single-file commit. Per-CRV verdict; root-layer identification; specific file:line change sites; test surface specification./operator/create-engagement; confirm via temporary console log / classifier log / observed response shape that the route now engages create_engagement_entry (or _active on follow-on turns). Lightweight confirmation observation; not the live usage event.Tests. Floor: +1 net test. Ceiling: +1 OL vitest + +1 engine test. As-shipped counts at Phase 57 close per the diagnostic findings document.
Mode posture. Auto-proceed for diagnostics + findings filing + fix + lightweight post-fix confirmation. Checkpoint A2 extends Checkpoint A — Operator confirms Sub-arc 5 fix (route-to-substrate binding works at lightweight-confirmation level) via the diagnostic findings document + Sub-arc 5f observation before Step 2b proceeds.
Acceptance gate. All six CRV-B verdicts captured in the diagnostic findings document at docs/phase-impl-notes/phase-57-step-2c-diagnostic-findings-v0_1.md. Sub-arc 5c fix landed at the layer the findings document identifies. Sub-arc 5d scrollback fix landed (possibly collapsed into 5c). Sub-arc 5e test surface added (≥+1 net test). Sub-arc 5f lightweight post-fix confirmation observation captured: submitting a creation-flow opener from /operator/create-engagement engages create_engagement_entry per classifier log; per-field loader splices the correct creation-flow prompt component; Companion response shape is consistent with creation-flow scaffolding, not general_conversation. Implementation notes capture as-shipped fix surfaces, test counts, and any existing-test adjustments. Lint/tsc/build clean on OL; engine tests green.
Halt threshold (Step 2c). Per §11. Highlights: any CRV-B verification produces an architectural divergence beyond the enumerated diagnostic space; Sub-arc 4 or Step 1 substrate state has drifted since cycle-1 close (engine HEAD or OL HEAD differs from the cycle-1-close commit); CRV-B findings produce a fix shape requiring migration (Alembic head would advance beyond 0064); CRV-B findings produce a fix shape touching Phase 41/42/55 substrate beyond cosmetic/parameter-shape edits; lightweight post-fix confirmation (Sub-arc 5f) fails; test count divergence beyond ±1 from CRV-B prediction; any reserved buffer expansion required.
Time. Sub-arc 5a (diagnostics): ~20–40 min depending on findings depth. Sub-arc 5b (findings doc): ~15 min. Sub-arc 5c (fix): ~15–45 min depending on layer scope. Sub-arc 5d (scrollback): may collapse with 5c. Sub-arc 5e (test): ~15–30 min depending on harness. Sub-arc 5f (confirmation): ~5–10 min. Total: ~70–150 min depending on findings.
Status at amendment cycle 2. Paused at cycle-2 halt; resumes after Step 2c clears Checkpoint A2. Unchanged in shape from v0.2.
What. Operator runs the marketing engagement creation. CC ensures local stack ready, observes the conversation, captures the live conversation log for fixture creation at Step 3.
Build (Operator-paced).
/operator/create-engagement on the running stack (local OL against local engine). With the Sub-arc 4 fix landed (cycle 1), the redirect to /signin accepts an empty-email submission and proceeds to the WebAuthn discoverable-credential flow; the browser presents the registered passkey; /auth/login/complete resolves identity by credential_id; the Operator is signed in. With the Sub-arc 5 fix landed (cycle 2), submitted messages engage create_engagement_entry / _active / _commit per the classifier and dispatcher logs; the scaffolded creation-flow conversation proceeds; per-field loader splices voice.md / constraints.md / success.md / additional_assertions.md at the Companion-judgement sites the active template specifies.extract_discovery_to_seed_skill + induct_seed cascade runs./operator engagement list with induction pass clean.Tests. 0 new (the live event is the exercise).
Mode posture. Operator-paced.
Acceptance gate. Marketing engagement live in the local engine database. Engagement appears in /operator engagement list. Discovery record visible in Memory. Candidate seed produced. Induction pass clean. Marketing v0.3 content (Fields 1–6 with eight Field-6 entries) fully reflected in the inducted seed.
Halt threshold.
field_coverage correctly populated). Halt for diagnosis; Step 1 substrate may need amendment.Status at amendment cycle 2. Unchanged from v0.2. Operator-paced; CC captures.
What. CC captures the Step 2b conversation as a real-Operator fixture per Sub-arc 3a. Authors ~1–2 calibration-gated tests per Sub-arc 3b.
Build. Per §5 Sub-arc 3a and 3b. New fixture at tests/fixtures/voice-calibration/real_operator_marvin_<date>.md. New gated tests in tests/test_phase_57_marketing_engagement_creation.py.
Tests. +1–2 calibration-gated.
Mode posture. Auto-proceed.
Acceptance gate. Fixture file present with correct filename convention. Gated tests pass with LOOMWORKS_RUN_CALIBRATION=1; skip without it.
Halt threshold. Real-Operator transcript capture reveals a format incompatibility with Phase 56's persona fixture format (CRV-5 failure).
Time. ~30 min.
Status at amendment cycle 2. Unchanged from v0.2 in shape. The implementation notes document now carries two amendment cycles (cycles 1 + 2), the three build-mode firings of substrate-friction-discipline-pattern across Phase 57 (cycle 1 + cycle 2 within the phase; plus the three-instance evidence reaching back to Phase 49 Step 4), and any Step 2c refinement observations alongside the original Sub-arc 3c content. Methodology candidate count is thirteen per P57-B9.
What. CC files the Phase 57 implementation notes document at docs/phase-impl-notes/phase-57-implementation-notes-v0_1.md per Sub-arc 3c.
Build. Per §5 Sub-arc 3c. The document carries: original Sub-arc 3c content (conversation trajectory; comprehension-gap observations; V4 POSTURE-GAP friction phrases; persona-vs-real-Operator delta notes; any Step 1 substrate refinement made; as-shipped wording of the Field 6 prompt); amendment cycle 1 content (second build-mode firing of substrate-friction-discipline-pattern; Sub-arc 4 components as-shipped; any Step 2a refinements; the standing DUNIN7 principle named in §3 of cycle-1 halt-surface note); amendment cycle 2 content (third build-mode firing of substrate-friction-discipline-pattern within Phase 57; reaching three-instance evidence across phases; Sub-arc 5 components as-shipped at the layer CRV-B identified; the diagnostic findings document path and key findings; any Step 2c refinements made; the thirteen methodology candidates carried forward per P57-B9; the <ChatView mode="create-engagement"> mode-discriminator propagation as-shipped behavior; the scrollback isolation fix layer and behavior; Candidate F single-instance evidence framing; Candidate C three-instance evidence reaching v0.21 promotion threshold; Candidate D paired remediation framing; Candidate E positive observation context).
Tests. 0 new.
Mode posture. Auto-proceed.
Acceptance gate. Implementation notes document filed at the specified path carrying all three layers of content (original + cycle 1 + cycle 2). Test counts, methodology candidates, and Sub-arc 5 as-shipped surfaces reproducible from the notes.
Halt threshold. None new at cycle 2; Step 4 is documentation work.
Time. ~30–45 min (extended at cycle 2 to absorb two amendment cycles' worth of content).
Status at amendment cycle 2. Unchanged from v0.2 in shape. Refined close protocol with explicit refspecs (per manifest v0.41 §2 named principle); tag phase-57-marketing-engagement-creation on both engine and OL repos (annotated); P57-D7 Option A retroactive cleanup applied (delete phase-56-step-0 + phase-57-step-0 locally).
What. Push main on both repos via explicit refspecs; delete build branches locally + remotely; tag both repos annotated; push tags via explicit refspecs; verify tags landed on origin.
Build. Per §17 refined close protocol script. Checkpoint B halts before tag-push for Operator final confirmation.
Tests. 0 new.
Mode posture. Auto-proceed up to Checkpoint B; halts; resumes post-confirmation.
Acceptance gate. Both repos at clean main with all Phase 57 commits merged forward. Both repos tagged annotated phase-57-marketing-engagement-creation. Tags pushed via explicit refspecs and verified via git ls-remote origin 'refs/tags/...'. P57-D7 retroactive cleanup applied: phase-56-step-0 and phase-57-step-0 deleted locally.
Halt threshold.
test -f guard catches this and halts).Time. ~15 min.
(reserved — consumed by Sub-arc 4 work / Step 2a per P57-A10)
Phase 57's two reserved buffer slots: Step 6 consumed at amendment cycle 1 by the Sub-arc 4 budget. First consumed reserved slot since Phase 49 Step 4 (the canonical instance of substrate-friction-discipline-pattern); eight consecutive zero-consumption phases (50/51/52/53/54/55/56 + Phase 57 pre-cycle-1-halt) ended at cycle 1. Per manifest v0.41 §1's observation that the no-mid-build-amendment pattern is "structural rather than coincidental," cycle-1 consumption logged as the design intent firing correctly — slots exist to absorb mid-build amendment without derailing the phase. Methodology candidate C (now at three-instance evidence at cycle 2) captures the cadence.
(reserved — consumed by Sub-arc 5 work / Step 2c per P57-B10)
Phase 57's second reserved buffer slot is now consumed by the Sub-arc 5 budget. Both slots consumed; first phase since Phase 49 to consume both reserved slots in a single phase. Per P57-B10: the reserved-slot pre-commitment design fires exactly as intended at its threshold case — a phase that requires two halt-and-amend cycles still completes within its reserved budget without derailing or expanding scope. Reserved-not-skipped principle preserved at full strength: the slots' value was both their presence (pre-commitment) AND their consumption (design firing at threshold case). No reserved slots remain; any further mid-build amendment during Steps 2b–5 requires explicit Operator authorization, itself a §11 halt-and-surface condition.
Per friction-discipline-pattern-family mid-build boundary. CC halts and writes a phase-57-halt-surface-<timestamp>-v0_1.md note in engine repo docs/phase-impl-notes/ on any of:
LoginBeginRequest has shifted shape since the cycle-1 halt-surface diagnostic; the Phase 51 marketing form submission handler keys off email-as-identity (CRV-A7 CONTRADICTED, scope re-opens). Any Sub-arc 4 component (4a/4b/4c/4d) surfaces unexpected drift from CR specification. OL vitest count diverges beyond ±1 from the predicted 150. IdentifierStep.tsx or signin-flow.ts already changed since cycle-1 halt-surface diagnostic time in a way that invalidates the findings. (None fired at amendment cycle 1.)e435b30. The cycle-2 baseline is invalid; halt and surface./operator/create-engagement still produces a general_conversation response. The fix didn't work; need to re-diagnose. A third amendment cycle would breach reserved budget per P57-B10 and would itself be a halt condition.
Mid-build amendment scoping runs in a separate Claude.ai chat per the standard pattern (substrate-friction-discipline-pattern from manifest v0.39 §2 — note-first; Operator-elective amendment cycle). Amendment cycle 1 (cycle-1 halt-surface → cycle-1 amendment scoping → CR v0.2 → Sub-arc 4) closed at OL e435b30. Amendment cycle 2 (cycle-2 halt-surface → cycle-2 amendment scoping → CR v0.3 → Sub-arc 5) is the active instance at v0.3. No further reserved slots remain; any third amendment cycle would require explicit Operator authorization (itself a halt-and-surface condition).
Naming-only divergences across both amendment cycles absorb in-flight per friction-discipline (a temporary-logging file path differs from cycle-2 halt-surface §4's literal cite; a constant name shifts; a request-body parameter name in the OL converse-submission path is what's actually present rather than the speculative "mode discriminator" name). Architectural divergences halt and surface.
Nineteen items per scoping v0.2 §Acceptance gates plus amendment-cycle-1 amendments per P57-A8 (Gate 5 amended; new Gate 5b inserted; subsequent gates renumbered with +1 offset from old 6→7 onwards) plus amendment-cycle-2 amendments per P57-B8 (Gate 5 amended further; new Gate 5c inserted; subsequent gates renumbered with +1 offset from previous post-cycle-1 numbering).
| # | Gate | Where verified |
|---|------|---------------|
| 1 | Step 0 findings absorbed; v0.2 produced at cycle 1; v0.3 produced at cycle 2; CR drafting handoff filed (already met by this CR's existence); both amendment scoping notes absorbed (already met by this CR's existence at v0.3). | Pre-existing |
| 2 | Field 6 per-field elicitation prompt component landed at prompts/intent_instructions/create_engagement/additional_assertions.md (or final filename per CRV resolution); +1 test green. (Satisfied pre-cycle-1-halt at engine a00f4a3.) | Step 1 |
| 3 | field_coverage map extended to include the Field 6 entry; dispatcher splice route exercised. (Satisfied pre-cycle-1-halt.) | Step 1 |
| 4 | Active-template scaffolding at prompts/create_engagement_active.md updated for Field 6 elicitation; existing tests still green. (Satisfied pre-cycle-1-halt.) | Step 1 |
| 5 | (Amended at amendment cycle 1; amended further at amendment cycle 2.) Live OL stack ready at Step 2 entry: /operator/create-engagement accessible; banner revision present; Sub-arc 4 fix landed (see Gate 5b); Sub-arc 5 fix landed (see Gate 5c); lint/tsc/build/test clean on OL including the new sign-in vitest at OL count 150 from cycle 1 and any new Sub-arc 5e test (count per P57-B7 floor +1 / ceiling +1 OL + +1 engine). | Checkpoint A2 (extended further) |
| 5b | (New at amendment cycle 1.) OL signin surface accepts empty email and proceeds to the WebAuthn discoverable-credential path. IdentifierStep.tsx empty-email guard removed; signin-flow.ts POST body omits the email field when empty; field label / placeholder / helper text indicate optionality (plain-terms-discipline, no methodology vocabulary in user-facing copy); SIGNIN.emailEmptyError constant deleted or orphaned-but-harmless per CRV-A2 resolution; new vitest pins the corrected behavior at the OL count-150 boundary. (Satisfied at amendment cycle 1; OL e435b30.) | Step 2a |
| 5c | (New at amendment cycle 2.) Route-to-substrate runtime binding verified at lightweight-confirmation level. Submitting a creation-flow opener from /operator/create-engagement engages create_engagement_entry (or _active on follow-on turns) per classifier log (CRV-B2 verifies); per-field loader splices the correct creation-flow prompt component per load_intent_instruction log (CRV-B4 verifies); dispatcher splice at prompt.py:817 fires the create_engagement_active branch per dispatcher log (CRV-B1 verifies); Companion response shape is consistent with creation-flow scaffolding, not general_conversation. Scrollback on /operator/create-engagement is creation-mode-scoped (or empty) per P57-B3 (CRV-B3 verifies). The diagnostic findings document at docs/phase-impl-notes/phase-57-step-2c-diagnostic-findings-v0_1.md is present on the build branch and identifies the root layer + fix sites + test surface specification. New test(s) per P57-B7 floor/ceiling pin the corrected wire path. Plain-terms-discipline applied to any user-visible surface text Sub-arc 5d introduces. | Step 2c |
| 8 | Marketing engagement created live in the local engine database via /operator/create-engagement. Engagement appears in /operator engagement list. (Was Gate 6 in v0.1; Gate 7 in v0.2; renumbered +1 at cycle 2.) | Step 2b |
| 9 | Discovery record produced and uploaded via Phase 16 pipeline; visible in Memory. (Was Gate 7 in v0.1; Gate 8 in v0.2.) | Step 2b |
| 10 | Phase 53 extract_discovery_to_seed_skill produced a candidate seed against the Discovery record. (Was Gate 8 in v0.1; Gate 9 in v0.2.) | Step 2b |
| 11 | induct_seed produced an induction-pass-clean Status on the marketing engagement. (Was Gate 9 in v0.1; Gate 10 in v0.2.) | Step 2b |
| 12 | Marketing v0.3 content (Fields 1–6 with eight Field-6 entries) fully reflected in the inducted seed. (Was Gate 10 in v0.1; Gate 11 in v0.2.) | Step 2b |
| 13 | Real-Operator transcript captured as tests/fixtures/voice-calibration/real_operator_marvin_<date>.md. Distinguished from persona fixtures by filename. (Was Gate 11 in v0.1; Gate 12 in v0.2.) | Step 3 |
| 14 | ~1–2 calibration-gated tests added exercising the new fixture; gates green with LOOMWORKS_RUN_CALIBRATION=1; skip in CI by default. (Was Gate 12 in v0.1; Gate 13 in v0.2.) | Step 3 |
| 15 | Phase 57 implementation notes document filed at docs/phase-impl-notes/phase-57-implementation-notes-v0_1.md carrying trajectory, comprehension-gap observations, V4 POSTURE-GAP friction phrases, persona-vs-real-Operator deltas, amendment-cycle-1 observations (Sub-arc 4 as-shipped surface; methodology candidates A + B + C; standing-principle first-time-in-Loomworks-document record), and amendment-cycle-2 observations (Sub-arc 5 as-shipped surface at the layer CRV-B identified; the diagnostic findings document path; methodology candidates D + E + F; Candidate C three-instance evidence reaching v0.21 promotion threshold; thirteen total methodology candidates carried forward per P57-B9; the <ChatView mode="create-engagement"> mode-discriminator propagation as-shipped behavior; scrollback isolation fix layer + behavior). (Was Gate 13 in v0.1; Gate 14 in v0.2.) | Step 4 |
| 16 | Engine test count within v0.3 floor/ceiling (~2,280 always-run + 31–32 skipped; +0 to +1 from Sub-arc 5e per P57-B7); OL vitest count 150 or 151 (per P57-B7 floor/ceiling); lint/tsc/build clean on OL; Alembic head unchanged at 0064. (Was Gate 14 in v0.1; Gate 15 in v0.2; OL count window widened at amendment cycle 2.) | Checkpoint B |
| 17 | P57-D7 Option A retroactive cleanup applied: phase-56-step-0 deleted locally; phase-57-step-0 deleted locally (after findings merged forward). (Was Gate 15 in v0.1; Gate 16 in v0.2.) | Step 5 |
| 18 | Refined close protocol firing on both repos via explicit refspecs (refs/heads/..., refs/tags/...). (Was Gate 16 in v0.1; Gate 17 in v0.2.) | Step 5 |
| 19 | Tags phase-57-marketing-engagement-creation landed on both engine and OL repos; pushed; verified via git ls-remote origin 'refs/tags/...'. (Was Gate 17 in v0.1; Gate 18 in v0.2.) | Step 5 / Checkpoint B |
Total: 19 items (was 17 at v0.1; 18 at v0.2). Gate 5c inserted between Gate 5b and old Gate 7 (now Gate 8 at v0.3) per the cycle-2 handoff §7.2 explicit instruction. Subsequent gates renumber with +1 offset from old 7 onwards.
After Phase 57 close:
phase-57-marketing-engagement-creation at the post-Step-4 engine commit. Substrate: 2,280 always-run tests or 2,281 per P57-B7 (floor 2,280; ceiling 2,281 if CRV-B6 surfaces engine-side or shared fix) + 31–32 skipped; Alembic 0064 unchanged across all candidate fix shapes per P57-B7. New prompt file at prompts/intent_instructions/create_engagement/additional_assertions.md. New test module at tests/test_phase_57_marketing_engagement_creation.py. New diagnostic findings document at docs/phase-impl-notes/phase-57-step-2c-diagnostic-findings-v0_1.md (Sub-arc 5b). New Sub-arc 5 production change(s) at layer + file:line CRV-B identifies (Sub-arcs 5c–5e); specific paths recorded in implementation notes at Step 4 rather than pre-specified at CR draft time per the cycle-2 diagnostic-first execution posture per P57-B2. New fixture at tests/fixtures/voice-calibration/real_operator_marvin_<YYYY-MM-DD>.md. New implementation notes at docs/phase-impl-notes/phase-57-implementation-notes-v0_1.md (carrying cycle-1 + cycle-2 observations per Gate 15). Halt-surface notes at docs/phase-impl-notes/phase-57-halt-surface-2026-05-12-v0_1.md (cycle 1) and docs/phase-impl-notes/phase-57-halt-surface-2026-05-12-step-2b-v0_1.md (cycle 2). Existing surfaces at prompts/create_engagement_active.md, the field_coverage map site, and prompt_assets.py / prompt.py:817 may carry Sub-arc 5 edits depending on CRV-B findings; per cycle-1 methodology candidate 10 (CR-amendment-drafting-prose-overclaim discipline), this CR does NOT pre-claim "unchanged in shape" for Sub-arc-5-touchable surfaces — as-shipped surface state is recorded in implementation notes. phase-56-step-0 and phase-57-step-0 deleted locally.phase-57-marketing-engagement-creation at the post-Sub-arc-5 OL commit (was post-Step-2a at v0.2; cycle-2 commits extend if CRV-B6 surfaces OL-side or shared fix). 150 OL vitest (per P57-B7 floor — pure-engine fix) or 151 (per P57-B7 ceiling — OL-side or shared fix); 11 prerendered routes unchanged. Sub-arc 4 surface changes (landed at cycle 1; preserved verbatim from v0.2's §13): IdentifierStep.tsx empty-email guard removed; signin-flow.ts POST body construction conditioned on email presence; field surface text (label / placeholder / helper) indicates optionality; SIGNIN.emailEmptyError constant deleted (or orphaned-but-harmless per CRV-A2 disposition); new vitest under tests/components/signin/ (or analogous per CRV-A5) pins the corrected discoverable-credential path. Sub-arc 5 surface changes (added at cycle 2): layer + file:line per CRV-B findings; possible touch points include the OL converse-submission path in ChatView.tsx, mode-discriminator propagation (e.g. <ChatView mode="create-engagement">), scrollback fetch scoping for /operator/create-engagement per P57-B3, and a new OL vitest (or contribution to an engine pytest module) pinning the corrected route-to-substrate runtime binding. Plain-terms-discipline applied to any user-visible surface text Sub-arc 5d introduces. Specific Sub-arc 5 file:line paths recorded in implementation notes at Step 4 rather than pre-specified at v0.3 draft time per the diagnostic-first posture per P57-B2.engine-correct-surface-drifted (new at amendment cycle 1; single-instance).standing-principle-not-named-in-source-of-truth-documents-allows-contradicting-surface-to-ship (new at amendment cycle 1; single-instance; remediation: name email-not-identity in what-dunin7-is-building at v0.21).substrate-friction-discipline-pattern-build-mode-firing (was substrate-friction-discipline-pattern-second-build-mode-firing at cycle 1; three-instance evidence reached at cycle 2 — Phase 49 Step 4 + Phase 57 cycle 1 + Phase 57 cycle 2 within an eight-phase window; clears the v0.21 promotion threshold per manifest v0.39 §2 / v0.40 §2 two-instance convention; name to be amended at v0.21 to drop the "second" qualifier per P57-B9). cr-amendment-drafting-prose-overclaim-when-handoff-says-unchanged (new at amendment cycle 1; carried from cycle-1 CR amendment drafting; one-instance discipline observation).per-route-companion-routing-not-asserted-at-step-0 (new at cycle-2 halt-surface §6; remediation candidate naming what Step 0 inspection briefs should add to catch route-to-substrate runtime-binding gaps earlier; paired with Candidate F)."Setting up a new project" at ChatView.tsx:254 confirmed correct on live surface — first real-Operator-confirmed instance of plain-terms-discipline holding on a user-facing surface).diagnosis-as-architecture-when-runtime-binding-fails (new at amendment cycle 2 scoping; single-instance evidence; generalizes substrate-friction-discipline-pattern at a finer-grained scoping-vs-execution boundary: when substrate is present and correct but runtime engagement fails, scoping's role is to authorize the diagnostic work and constrain its envelope; the diagnostic IS the architectural work; paired with Candidate D's remediation half).Per scoping v0.2 §Carry-forward inventory:
Out-of-scope (carry beyond Phase 57):
draft_engagement; raw-Markdown variant of extract_discovery_to_seed_skill).create_project.md plain-terms revision.origin/phase-* refs from pre-Phase-55 backfill (out-of-scope cleanup; separate Operator-elective).instruction-refinement-during-absorption minor candidate.Newly enabled by Phase 57:
Added at amendment cycle 1 (preserved verbatim from v0.2):
engine-correct-surface-drifted. Single-instance evidence at the Phase 57 halt-surface. Generalization: surface implementations can drift from their underlying contract; the drift surfaces at first real usage; the audit needs a trigger.standing-principle-not-named-in-source-of-truth-documents-allows-contradicting-surface-to-ship. Single-instance evidence at the Phase 57 halt-surface. Remediation: name the email-not-identity principle in what-dunin7-is-building at v0.21. This amendment does not perform the remediation; v0.21 consolidation does.substrate-friction-discipline-pattern-second-build-mode-firing. Two-instance evidence at cycle 1 (Phase 49 Step 4 + Phase 57 cycle 1); pattern shape reliable; carries as the standard mid-build resolution shape. (Reaches three-instance evidence at cycle 2; see Added at amendment cycle 2 below.)loomworks-queued-directions-and-deferred-work-v0_12.md (next version bump from v0.11) at Phase 57 close. Phase 57 amendment candidates A + B feed the eventual phase's scoping.Added at amendment cycle 2:
per-route-companion-routing-not-asserted-at-step-0. Single-instance evidence at the cycle-2 halt-surface §6. Remediation candidate: names what Step 0 inspection briefs should add (per-route verification of which Companion handler engages on which route) to catch route-to-substrate runtime-binding gaps earlier in the build cycle. Paired with Candidate F (Candidate F names the build-discipline pattern that handles this class of finding once it surfaces; Candidate D names the inspection brief amendment that catches it sooner).ChatView.tsx:254 confirmed correct on live surface at cycle-2 halt-surface time ("Setting up a new project"). Single-instance positive evidence. First real-Operator-confirmed instance of plain-terms-discipline holding on a user-facing surface across a full halt-surface → amendment-scoping cycle. Generalization-pending: positive observations may warrant a distinct register from negative findings in halt-surface documents (currently halt-surfaces enumerate problems; this candidate suggests they should also enumerate confirmed-correct surfaces to preserve positive evidence alongside negative).diagnosis-as-architecture-when-runtime-binding-fails. Single-instance evidence at amendment cycle 2 scoping. Names the pattern that cycle 2 differs structurally from cycle 1: cycle 1's halt-surface produced three findings that pre-specified the fix; cycle 2's halt-surface produced one finding (the runtime binding is broken) plus six diagnostic items, and the cycle-2 scoping note settles the investigation envelope + execution posture but cannot settle the fix shape — the diagnostics produce it. Distinct sub-pattern within substrate-friction-discipline-pattern's three-instance evidence: when substrate is present and correct but runtime engagement fails, scoping's role is to authorize the diagnostic work and constrain its envelope; the diagnostic IS the architectural work. Cycle-1 and cycle-2 are both substrate-friction-discipline-pattern firings, but at different granularities: cycle 1's friction was surface-vs-contract (analyzable at halt-surface filing time); cycle 2's friction is runtime-binding (analyzable only via live diagnostics at execution time). v0.21 framing candidate: the pattern's three documented instances now span surface-vs-substrate-contract (Phase 49 / Phase 57 cycle 1) and runtime-binding (Phase 57 cycle 2) sub-patterns; the pattern's resolution shape (note-first → fresh-chat scoping → Operator-elective amendment) adapts based on whether scoping can pre-settle the fix or whether the fix requires diagnostic-first execution.<ChatView> (or analogous components) and verifies the route-to-substrate runtime binding holds (correct intent classification engages on submission from that route; correct prompt component splices; correct response shape). Filed for inclusion in loomworks-queued-directions-and-deferred-work-v0_12.md (next version bump from v0.11) at Phase 57 close, alongside the cycle-1-derived OL surface-vs-contract audit. Phase 58 scoping may consolidate the two into a single broader OL-substrate-interaction-audit phase, since they address adjacent problem classes — surface-vs-contract drift (cycle 1) and runtime-binding gaps (cycle 2) — both surfaced at first real usage and both requiring a systematic audit trigger.
Resume Phase 57 build at amendment cycle 2 per CR-2026-090 v0.3
(phase-57-cr-marketing-engagement-creation-v0_3.md). v0.1 + v0.2
are both superseded; all three archived at engine repo docs/phase-crs/.
Baseline confirmation at amendment-cycle-2 start (post-halt, pre-resume):
- Engine repo /Users/dunin7/loomworks-engine on branch
phase-57-marketing-engagement-creation at the cycle-2 halt-surface
commit (parent of the cycle-2 halt-surface note file).
Tests: 2,280 always-run + 32 skipped (unchanged from cycle-1 close).
Alembic head 0064 unchanged. Working tree clean.
Cycle-1 halt-surface note present at
docs/phase-impl-notes/phase-57-halt-surface-2026-05-12-v0_1.md.
Cycle-2 halt-surface note present at
docs/phase-impl-notes/phase-57-halt-surface-2026-05-12-step-2b-v0_1.md.
Step 0 findings present at
docs/phase-impl-notes/phase-57-step-0-findings-v0_1.md.
Step 1 substrate present at
prompts/intent_instructions/create_engagement/additional_assertions.md.
phase-57-step-0 branch at 69adb17 (unmerged; for P57-D7 retroactive
cleanup at Step 5). phase-56-step-0 branch exists locally (never
pushed; scheduled for P57-D7 Option A retroactive cleanup at Step 5).
- Operator Layer repo /Users/dunin7/loomworks on branch
phase-57-marketing-engagement-creation at commit e435b30
(cycle-1 Sub-arc 4 commit; no new OL commits at cycle-2 halt).
150 vitest passed; 11 prerendered routes; lint/tsc/build clean.
- Local stack ready (engine API up on :8000, /healthz 200, CORS resolved
via LOOMWORKS_ENV=development in local .env; OL dev server up on :3001;
banner string "Setting up a new project" confirmed correct on live
surface at ChatView.tsx:254 per cycle-2 halt-surface §2.1; Marvin's
Person row + passkey credential present in dev DB; signin works per
cycle-1 Sub-arc 4 landed).
Per CR §10 Step 0: re-archive this CR (v0.3) to engine repo
docs/phase-crs/phase-57-cr-marketing-engagement-creation-v0_3.md
(preserving v0_1 + v0_2 alongside as superseded; all three present).
CRV-1 through CRV-8 ran pre-halt at Step 0 of the original build
cycle; their verdicts hold. CRV-A1 through CRV-A8 ran at amendment-
cycle-1 Step 2a; all HELD; verdicts hold.
Per CR §10 Step 2c (new at amendment cycle 2): begin with Sub-arc 5a
diagnostic phase. Run CRV-B1 through CRV-B6 against live engine + OL
on branch heads. CRV-Bs are diagnostic-first: each captures live
runtime evidence at one of six surface points (prompt.py:817 dispatcher;
classify_intent exit in src/loomworks/orchestration/classifier.py;
field_coverage initialization in the converse flow handler;
load_intent_instruction in prompt_assets.py; ChatView.tsx converse-
submission path; existing test coverage probe). Add temporary logging
at each point; submit diagnostic messages from /operator/create-engagement
including the cycle-2-halt-surface confirmation exchange ("Tell me
what the capital of NZ is" should NOT engage create_engagement_entry
once Sub-arc 5 lands; a creation-flow opener like "I want to create
a new engagement" should engage it); capture findings; remove temporary
logging before commit. No production code changes during Sub-arc 5a.
Per CR §10 Step 2c (Sub-arc 5b): produce the diagnostic findings
document at docs/phase-impl-notes/phase-57-step-2c-diagnostic-findings-v0_1.md.
Per-CRV verdict; root-layer identification (OL / engine / shared);
specific file:line change sites; test surface specification per
P57-B7 (OL vitest mocked / engine pytest / new e2e — CRV-B6 decides).
Single-file commit. Halt and surface to Operator at Checkpoint A2
before Sub-arc 5c production change(s).
Per CR §10 Step 2c (Sub-arcs 5c-5f): execute the production fix per
the diagnostic findings document. Components may collapse or expand
per CRV-B-driven adjustments; the §10 / §5 provisional decomposition
(5c runtime-binding fix; 5d scrollback isolation per P57-B3; 5e test
surface floor/ceiling per P57-B7; 5f lightweight post-fix confirmation)
is the planning shape, not the binding spec. Plain-terms-discipline
on any user-visible surface text Sub-arc 5d introduces. Halt and
re-diagnose if Sub-arc 5f confirmation fails — a third amendment
cycle would breach reserved budget per P57-B10 and is itself a §11
halt condition.
Per CR §10: seven active build steps (Step 0 + Step 1 done pre-halt;
Step 2a done at cycle 1 with CRV-A all-HELD; Step 2c is the
resumption point at amendment cycle 2; Step 2b follows the route-
to-substrate binding fix; Steps 3-5 unchanged from v0.2). Both
reserved buffer slots (Step 6 + Step 7) are now consumed.
Per CR §10: auto-mode posture — Sub-arc 5a auto-proceeds (read-only
diagnostic); Sub-arc 5b auto-proceeds (single-file commit, findings
document); Checkpoint A2 extends further to cover Sub-arc 5b
(Operator confirms diagnostic findings before Sub-arc 5c production
change); Sub-arcs 5c-5f auto-proceed in sequence after Checkpoint A2
confirmation; Step 2b is Operator-paced (live conversation); Steps
3/4 are CC capture; Checkpoint B (final) halts before tagging.
Per CR §3 + §3.A + §3.B: ten construction decisions P57-D1 through
P57-D10 plus ten amendment-cycle-1 decisions P57-A1 through P57-A10
plus ten amendment-cycle-2 decisions P57-B1 through P57-B10 are
settled. CC executes against them; does not re-decide. The diagnostic
findings document at Sub-arc 5b is the architectural artifact for
the fix shape per P57-B2 — scoping does NOT pre-specify; CC produces
findings, surfaces them, Operator confirms, fix lands.
Per CR §11: halt-and-surface is preferred to draft-and-hope. Halt
thresholds at amendment cycle 2: CRV-B architectural divergence
beyond the enumerated diagnostic space (e.g. a fourth root layer
not anticipated; all six CRV-Bs return HOLDS meaning substrate IS
engaged but response shape is wrong for another reason); Sub-arc 4
or Step 1 substrate state has drifted since cycle-1 close (engine
HEAD differs from cycle-1-close; OL HEAD differs from e435b30); CRV-B
findings produce a fix shape that requires migration (Alembic head
would advance beyond 0064; out of scope); CRV-B findings produce a
fix shape that touches Phase 41/42/55 substrate beyond cosmetic/
parameter-shape edits (would re-open Phase 42/55 scope); Sub-arc 5f
lightweight post-fix confirmation fails; test count divergence
beyond +/-1 from CRV-B prediction; any reserved buffer expansion
required (no reserved slots remain; third amendment cycle requires
explicit Operator authorization and is itself a halt-and-surface
condition).
Per CR §17: refined close protocol with explicit refspecs (manifest
v0.41 §2). P57-D7 Option A retroactive cleanup applied at Step 5
(delete phase-56-step-0 + phase-57-step-0 locally after findings
merged forward).
Tag name: phase-57-marketing-engagement-creation. Annotated. Lands
on both engine and OL repos at Checkpoint B (final).
Begin at Step 2c Sub-arc 5a (CRV-B1 through CRV-B6 diagnostic phase).
After diagnostic capture, file Sub-arc 5b findings document. Halt
at extended Checkpoint A2 for Operator confirmation of findings
before Sub-arc 5c production change.
| Surface | Pre-Phase-57 | Phase-57 delta (v0.1) | Phase-57 delta (v0.2 amendment) | Phase-57 delta (v0.3 amendment) | Post-Phase-57 | |---------|-------------|----------------------|--------------------------------|--------------------------------|--------------| | Engine always-run | 2,279 | +1 | 0 | floor 0 / ceiling +1 (per P57-B7; +1 if CRV-B6 surfaces engine-side or shared fix) | 2,280 or 2,281 | | Engine skipped (calibration-gated) | 30 (= 26 pre-P56 + 4 P56-gated) | +1 to +2 | 0 | 0 | 31–32 | | OL vitest | 149 | 0 | +1 (Sub-arc 4d) | floor 0 / ceiling +1 (per P57-B7; +1 if CRV-B6 surfaces OL-side or shared fix) | 150 or 151 | | Alembic migration head | 0064 | 0 | 0 | 0 (per P57-B7; no migration consumed across any candidate fix shape) | 0064 | | Prerendered OL routes | 11 | 0 | 0 | 0 | 11 |
Per cycle-1 methodology candidate 10 (CR-amendment-drafting-prose-overclaim discipline), v0.3 does NOT pre-claim "existing 2,279 substrate tests stay green" or "existing 149 OL vitest stay green" if Sub-arc 5 may alter wire-path semantics existing tests assert. Sub-arc 5e (test surface floor/ceiling per P57-B7) may add a new test AND may require adjustments to existing tests whose semantics shift; CRV-B6 surfaces both at execution time, and the diagnostic findings document (Sub-arc 5b) specifies the test surface posture. As-shipped existing-test deltas are recorded in implementation notes at Step 4 per Gate 15. Calibration-gated tests pass with LOOMWORKS_RUN_CALIBRATION=1; skip in CI by default per P56-D7 precedent. Amendment cycle 1 added +1 OL vitest exercising the empty-email discoverable-credential path. Amendment cycle 2 adds floor +1 net test / ceiling +1 OL vitest + +1 engine vitest pinning the corrected route-to-substrate runtime binding per P57-B4 / P57-B7.
Total Phase-57 net test delta (v0.3 floor): +1 engine always-run + +1 OL vitest + +1 engine skipped + +1 net Sub-arc 5e = +4 floor. Total Phase-57 net test delta (v0.3 ceiling): +1 engine always-run + +1 OL vitest + +2 engine skipped + +1 OL Sub-arc 5e + +1 engine Sub-arc 5e = +6 ceiling.
Aligned with Phase 56 CR-2026-080 v0.2 §3.1 close-protocol refinement and manifest v0.41 §2 named principle (explicit refspecs). Executed at Step 5 by CC; Checkpoint B halts before tag-push for Operator final confirmation. Unchanged at amendment cycle 1 — the close-protocol commands are step-5 work; they do not depend on Sub-arc 4 specifics. Unchanged at amendment cycle 2 per the cycle-2 handoff §7.2 — close-protocol commands do not depend on Sub-arc 5 specifics either; only the OL vitest expected-count comment widens to accept 150 or 151 per P57-B7 floor/ceiling.
cd /Users/dunin7/loomworks-engine
# 1. Confirm Step 0 findings present on main before Step 0 branch deletion
test -f docs/phase-impl-notes/phase-57-step-0-findings-v0_1.md \
&& echo "Step 0 findings present on main" \
|| { echo "ERROR: Step 0 findings missing"; exit 1; }
# 1b. Confirm cycle-2 diagnostic findings present on main (new at cycle 2)
test -f docs/phase-impl-notes/phase-57-step-2c-diagnostic-findings-v0_1.md \
&& echo "Sub-arc 5b diagnostic findings present on main" \
|| { echo "ERROR: Sub-arc 5b diagnostic findings missing"; exit 1; }
# 2. Confirm build branch is up-to-date with main (assuming build commits
# were made directly on main, or were merged forward)
git status
git log --oneline -5
# 3. Confirm tests green at close
.venv/bin/pytest -q
# Expected: 2,280 or 2,281 passed (per P57-B7 floor/ceiling), 31-32 skipped
# 4. Confirm working tree clean
git status --porcelain
# Expected: empty
# 5. Push main to origin via explicit refspec
git push origin refs/heads/main
# 6. Delete local build branch (if it exists as a separate branch)
git branch | grep phase-57-marketing-engagement-creation \
&& git branch -d phase-57-marketing-engagement-creation \
|| echo "Build branch already merged or not separate"
# 7. Delete remote build branch via explicit refspec (only if pushed during build)
git ls-remote origin 'refs/heads/phase-57-marketing-engagement-creation' \
&& git push origin :refs/heads/phase-57-marketing-engagement-creation \
|| echo "Build branch not on origin; skip remote delete"
# 8. Prune remote-tracking refs
git remote prune origin
# 9. P57-D7 Option A retroactive cleanup
git branch -D phase-56-step-0
git branch -D phase-57-step-0
# 10. [CHECKPOINT B HALT — Operator final-confirms before tags land]
# 11. Create annotated tag
git tag -a phase-57-marketing-engagement-creation \
-m "Phase 57 close: marketing engagement creation"
# 12. Push tag via explicit refspec
git push origin refs/tags/phase-57-marketing-engagement-creation
# 13. Verify tag landed on origin
git ls-remote origin 'refs/tags/phase-57-marketing-engagement-creation'
cd /Users/dunin7/loomworks
# 1. Confirm working tree clean (Sub-arc 4 + Sub-arc 5 changes already committed)
git status --porcelain
# Expected: empty
# 2. Confirm tests green
npm test -- --run
# Expected: 150 or 151 vitest passed (per P57-B7 floor/ceiling;
# 150 = pure-engine Sub-arc 5 fix; 151 = OL-side or shared fix
# adding the Sub-arc 5e OL vitest)
npm run lint
npm run tsc
npm run build
# Expected: all clean
# 3. Push main to origin via explicit refspec
git push origin refs/heads/main
# 4. [CHECKPOINT B HALT — Operator final-confirms before tags land]
# 5. Create annotated tag at the post-Sub-arc-5 OL commit
git tag -a phase-57-marketing-engagement-creation \
-m "Phase 57 close: marketing engagement creation"
# 6. Push tag via explicit refspec
git push origin refs/tags/phase-57-marketing-engagement-creation
# 7. Verify tag landed on origin
git ls-remote origin 'refs/tags/phase-57-marketing-engagement-creation'
git push origin refs/heads/<branch> — not git push origin <branch>.git push origin :refs/heads/<branch> — not git push origin --delete <branch>.git push origin refs/tags/<tag> — not git push origin <tag>.git ls-remote origin 'refs/heads/<name>' and git ls-remote origin 'refs/tags/<name>' — separate invocations.
The convention prevents the error: src refspec ... matches more than one failure mode that Phase 56 encountered and resolved in-session.
DUNIN7 — Done In Seven LLC — Miami, Florida Loomworks Phase 57 CR — Marketing Engagement Creation — v0.3 — 2026-05-12