Version. 0.1
Date. 2026-05-09
Status. Pre-CR scoping evidence brief. Hands to CC. Mirrors loomworks-phase-50-step-0-inspection-brief-v0_1.md.
Author. Claude.ai. Operator: Marvin Percival.
Companion document. loomworks-phase-51-scoping-note-v0_1.md (parent — the brief presupposes its draft sketches and §10 candidate verification list).
Pre-CR live-codebase verification for Phase 51 — Marketing Site (new repo) + SMTP automation for form-initiated grants + Companion-driven email composition + Phase 45 end-to-end integration testing.
Phase 51 scoping note v0.1 records the build shape and architectural decisions (Option A; P51-D1 through P51-D13). Several of those decisions rest on assumptions about what the Phase 48 SMTP plumbing, the Phase 50 seam, and the Phase 50 endpoint look like as actually shipped. The scoping note carries [CC verifies] markers across the substrate touch-points. This brief enumerates those verifications, gives CC a paste-ready way to run them, and defines what CC produces as a result.
CC verifies, evidence-cites, and reports verdicts. CC does not propose remediation, does not edit the scoping note, does not draft the CR, does not start build.
The brief assumes Option A is the working shape (Phase 51 = engine + Operator Layer + new marketing repo, three sub-arcs). If P51-Shape-D1 redirects after CC reports, scoping v0.2 reshapes and a fresh Step 0 brief lands for the new shape. v0.1 of this brief is right for Option A.
CC reads in this order before starting verifications:
loomworks-phase-51-scoping-note-v0_1.md (parent document; in project knowledge).current-status-manifest-v0_36.md (in project knowledge — substrate state, named principles, residues).phase-50-cr-companion-as-authority-and-public-form-v0_1.md (engine repo docs/phase-crs/; the CR Phase 51 extends).phase-50-implementation-notes-v0_2.md (engine repo docs/phase-impl-notes/; the §7 13-item carry-forward and §8 build findings).phase-48-cr-credit-completion-and-operator-sign-in-v0_1.md §9 (engine repo docs/phase-crs/; the SMTP plumbing Phase 51 extends).Before running verifications, CC confirms the substrate is at the expected baseline. Phase 50 close per session handoff §6:
DUNIN7/loomworks-engine, tag phase-50-companion-as-authority-and-public-form at engine c01124d (annotated tag object 67ba251). 2,095 tests passed, 26 skipped, Alembic head 0064. Working tree clean on main. Pushed to origin.DUNIN7/loomworks, tag phase-50-companion-as-authority-and-public-form at frontend e4c09e0 (annotated tag object fd8177a). 139 vitest passed, 29 test files, 11 prerendered routes. eslint/tsc/build clean.DUNIN7/loomworks-ui, unchanged from Phase 48 baseline. Not in Phase 51 scope.DUNIN7/loomworks-marketing does NOT yet exist. Phase 51 sub-arc 3 creates it at Step 4. The brief's verifications all run against the engine and Operator Layer.If the live baseline diverges (test count off by more than ±2 routine noise, Alembic head different, working tree dirty, tag missing), CC stops at the start and reports before running any verifications.
Each verification has four parts: ask (what to verify), look at (where to read), evidence expected (what the finding should cite), verdict criteria (when each verdict applies).
Ask. Confirm loomworks.email.service.send_email(to, template_name, context) (Phase 48 CR §9) — module location, current signature, task-lifecycle pattern, error-handling posture. Phase 51 sub-arc 1 Step 1 reuses this surface to send form-initiated-grant emails. The scoping note §5.1.1 assumes the API is reusable as-is, called from inside the seam after the grant transaction commits, fire-and-forget with error-logging on send failure.
Look at.
src/loomworks/email/ — provider.py, smtp_relay.py, templates.py, service.py (per Phase 48 CR §9.2).POST /admin/grants (the operator-curated path that uses claim_email.txt) — confirms the post-write fire-and-forget integration shape.Evidence expected.
send_email.POST /admin/grants is invoked synchronously inside the request handler, scheduled as a fire-and-forget background task, or some other shape.get_email_provider() + EmailProvider Protocol per Phase 48 CR §9.3).smtp_relay per Phase 48 §9.4).Verdict criteria.
send_email API matches scoping note §5.1.1's read; sub-arc 1 Step 1 wires the seam call to the existing service without changes to the email module. CR §5.1.1 carries.send_email API has shifted since Phase 48 in a way that requires re-design before the seam wiring fits, or the email module isn't where Phase 48 CR placed it. Scoping note v0.2 absorbs.
Ask. Confirm seam.issue_grant(grant_kind='form_initiated', initiated_by=None, recipient_email, asset_id, amount, ...) (Phase 50 CR §13) — module location, current signature, post-write extensibility. Phase 51 sub-arc 1 Step 2 inserts a synchronous Companion-driven email composition step between the grant-row write and the fire-and-forget send. The scoping note §5.1.3 frames this as a synchronous inline composition (NOT a Phase 45 dispatch — there's no held artifact, no approval gate, per P51-D2). The composition output feeds send_email.
Look at.
seam.py or wherever issue_grant lives.issue_grant body for grant_kind='form_initiated' (Phase 50) and grant_kind='operator_curated' (Phase 47/48) — confirms what each path currently does post-write.Evidence expected.
issue_grant.grant_kind values — what fires, in what order, what's awaited vs scheduled.grant_kind branch.<GrantDecisionApprovalCard> Approve eventually reaches seam.issue_grant with the expected payload.Verdict criteria.
send_email call between row-write commit and end-of-function. CR §5.1.3 carries the inline-composition design as drafted.grant_email.md
Ask. Confirm the voice template loader pattern Phase 49/50 used (prompts/credit_voice/tier_drop.md, near_exhaustion.md, exhaustion_choice.md, grant_proposal.md) — directory path, loading function, variable substitution mechanism, AI-invisibility carve-out comment shape. Phase 51 sub-arc 1 Step 2 lands grant_email.md as the fifth template in the family. The scoping note §5.1.2 assumes sibling-pattern composition with the same loader and carve-out comment.
Look at.
prompts/credit_voice/ directory and the four existing templates.loomworks/credit/companion_intelligence/voice_composition.py per Phase 50 scoping reads).Evidence expected.
<placeholder> form is in use).grant_proposal.md currently consumes (the Phase 50 template's variable surface is the closest analog for grant_email.md).Verdict criteria.
grant_email.md slots in as a fifth sibling.
Ask. Confirm the Phase 45 dispatcher (register_action_dispatcher, process_approval, process_decline per Phase 49 bimodal dispatch) is exercisable in tests with fixture-replayed LLM responses through the real dispatcher path. Phase 51 sub-arc 1 Step 3 establishes end-to-end integration test coverage for grant-decision dispatch (closing the substrate-tests-with-mocked-LLM gap from Phase 50 impl notes §7). The scoping note P51-D4 specifies fixture-replayed LLM through the real dispatcher (NOT real LLM in tests, NOT mocked dispatcher with real LLM).
Look at.
vcr.py, responses, custom replay, or none).process_approval / equivalent calls when a grant_request_received event arrives at the registered delegation_required=True dispatcher.Evidence expected.
register_action_dispatcher, process_approval, process_decline.llm_client.complete(...) call site that test fixtures can replace) or whether LLM access is scattered.Verdict criteria.
Ask. Confirm the POST /authority/grant-request request body shape as Phase 50 shipped, specifically pydantic validation strictness and tolerance for additional fields. Phase 51 sub-arc 3 Step 5 introduces a jurisdiction question on the marketing-site form (per P51-D7). The scoping note recommends adding jurisdiction as an optional field on the existing endpoint (option (a) — additive, no breaking change) over remapping onto the existing source field (option (b)). This verification produces the evidence base for that decision.
Look at.
POST /authority/grant-request route handler and its pydantic body model.Config or model_config — extra = 'forbid' vs 'allow' vs 'ignore'.source field's current usage — whether it's freeform string or has implicit conventions (e.g., 'marketing-site' / 'conference' / 'referral' per Phase 50 CR §10.3).grant_request_received Memory event payload — confirms a new optional field would be carried through to the Companion's reading surface.Evidence expected.
extra handling.jurisdiction: str | None = None field is one-line additive or requires touching downstream Memory-event payload construction.source field semantics — strict enum, freeform, or convention-only.Verdict criteria.
jurisdiction lands as a one-line model addition + payload propagation. CR §5.3.4 carries the option (a) path.source (e.g., source: 'marketing-site:US' | 'marketing-site:EU' | 'marketing-site:OTHER'). CR §5.3.4 shifts to option (b).
Ask. Confirm loomworks_cors_origins env-var allowlist mechanism (Phase 50 V9 — lowercase config field per scoping v0.2 absorption). Phase 51 sub-arc 3 needs the marketing site's eventual production domain (loomworks.com per deployment strategy v0.2, or a staging Cloudflare Pages preview URL for alpha) added to the allowlist. The scoping note §9 halt-threshold flagged this as Step 0 verification before relying on it.
Look at.
LOOMWORKS_CORS_ORIGINS (or loomworks_cors_origins) reading.Evidence expected.
*.pages.dev for Cloudflare Pages preview URLs).Verdict criteria.
<GrantDecisionApprovalCard> Approve response shape
Ask. Confirm <GrantDecisionApprovalCard> (Phase 50 frontend; Operator Layer repo) — component file location, Approve action's call shape, response shape that the component reads back from the seam. Phase 51 sub-arc 2 is conditional on whether the response shape needs adjustment to surface email-send status (P51-D2 holds → likely no Operator Layer change; P51-D2 reverses to second-approval-gate → significant Operator Layer work). The scoping note §5.2 estimates 0–8 vitest depending on this.
Look at.
<GrantDecisionApprovalCard> component file (Phase 50 CR §13 named it as a sibling to <ProposalApprovalCard>).Evidence expected.
<GrantDecisionApprovalCard>.Verdict criteria.
Ask. The current-status manifest v0.36 §1 references "three additional items from impl notes v0.2 §7 whose specifics are in the engine-repo notes," and Phase 51 scoping note v0.1 §11 explicitly defers the items 12 and 13 disposition to Step 0 V8. CC reads phase-50-implementation-notes-v0_2.md §7 and reports the verbatim phrasing of the three additional items (one of which — Phase 45 end-to-end integration testing — is already absorbed into Phase 51 scoping as item 4 of the carry-forward; the other two are unenumerated).
Look at.
docs/phase-impl-notes/phase-50-implementation-notes-v0_2.md, §7 carry-forward.Evidence expected.
Verdict criteria.
CC produces phase-51-step-0-findings-v0_1.md at /Users/dunin7/loomworks-engine/docs/phase-impl-notes/. One section per verification. Each section: verdict (HOLDS / PARTIALLY HOLDS / BREAKS / INCONCLUSIVE; verifications 5 and 7 also accept the per-option HOLDS variants; verification 8 also accepts NOT NEEDED), evidence (file paths, line numbers, function signatures, exact strings as found), implication for scoping note (carry / naming-only divergence / architectural amendment).
CC then tells Marvin which of three states the findings put Phase 51 in:
CC does not propose remediation in the findings document. CC does not edit the scoping note. CC does not start CR drafting. CC does not start implementation. CC reports.
Place this brief at /Users/dunin7/loomworks-engine/docs/phase-impl-notes/loomworks-phase-51-step-0-inspection-brief-v0_1.md (or wherever you prefer; adjust the first line of the kickoff accordingly). Then open a new CC session on DUNIN7-M4 and paste:
Read /Users/dunin7/loomworks-engine/docs/phase-impl-notes/loomworks-phase-51-step-0-inspection-brief-v0_1.md
Run all eight verifications against the live codebase at /Users/dunin7/loomworks-engine. For verification 7, also read /Users/dunin7/loomworks (Operator Layer). Phase 50 tags for reference: phase-50-companion-as-authority-and-public-form at engine c01124d / frontend e4c09e0.
Reading order before running: loomworks-phase-51-scoping-note-v0_1.md (in project knowledge); current-status-manifest-v0_36.md (in project knowledge); phase-50-cr-companion-as-authority-and-public-form-v0_1.md (engine repo docs/phase-crs/); phase-50-implementation-notes-v0_2.md (engine repo docs/phase-impl-notes/); phase-48-cr-credit-completion-and-operator-sign-in-v0_1.md §9 (engine repo docs/phase-crs/); this brief.
Produce findings at /Users/dunin7/loomworks-engine/docs/phase-impl-notes/phase-51-step-0-findings-v0_1.md.
One section per verification. Each section: verdict (HOLDS / PARTIALLY HOLDS / BREAKS / INCONCLUSIVE; verifications 5 and 7 also accept per-option HOLDS variants; verification 8 also accepts NOT NEEDED), evidence (file paths, line numbers, function signatures, exact strings as found), implication for scoping note (carry / naming-only divergence / architectural amendment).
Do not propose remediation. Do not edit the scoping note. Do not start CR drafting or implementation.
Report back with the findings document.
The receiving CC session reads the brief, runs the verifications, produces the findings document, and reports.
loomworks-phase-51-scoping-note-v0_1.md — parent scoping note. CC reads this first (the brief presupposes its draft sketches and Operator-decision settings).current-status-manifest-v0_36.md — current substrate state and named principles.phase-50-cr-companion-as-authority-and-public-form-v0_1.md (engine repo docs/phase-crs/) — Phase 50 CR (active); reference for §13 dispatcher pattern, §10.3 endpoint shape, §10.2 CORS posture.phase-50-implementation-notes-v0_2.md (engine repo docs/phase-impl-notes/) — Phase 50 build-record; §7 13-item carry-forward, §8 build findings.phase-48-cr-credit-completion-and-operator-sign-in-v0_1.md §9 (engine repo docs/phase-crs/) — Phase 48 SMTP plumbing CR; relevant for Verification 1.phase-50-step-0-findings-v0_1.md (engine repo docs/phase-impl-notes/) — Phase 50 Step 0 precedent findings shape.loomworks-phase-50-step-0-inspection-brief-v0_1.md — precedent for this brief's structure.DUNIN7 — Done In Seven LLC — Miami, Florida Loomworks Phase 51 Step 0 Inspection Brief — v0.1 — 2026-05-09