DUNIN7 · LOOMWORKS · RECORD
record.dunin7.com
Status Current
Path phases/phase-51-marketing-site-and-companion-email/loomworks-phase-51-step-0-inspection-brief-v0_1.md

Loomworks — Phase 51 Step 0 Inspection Brief

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).


1. What this is

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.


2. Reading order before running

CC reads in this order before starting verifications:

  1. loomworks-phase-51-scoping-note-v0_1.md (parent document; in project knowledge).
  2. current-status-manifest-v0_36.md (in project knowledge — substrate state, named principles, residues).
  3. phase-50-cr-companion-as-authority-and-public-form-v0_1.md (engine repo docs/phase-crs/; the CR Phase 51 extends).
  4. phase-50-implementation-notes-v0_2.md (engine repo docs/phase-impl-notes/; the §7 13-item carry-forward and §8 build findings).
  5. phase-48-cr-credit-completion-and-operator-sign-in-v0_1.md §9 (engine repo docs/phase-crs/; the SMTP plumbing Phase 51 extends).
  6. This brief.

3. Baseline state to verify

Before running verifications, CC confirms the substrate is at the expected baseline. Phase 50 close per session handoff §6:

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.


4. Eight 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).

4.1 Verification 1 — Phase 48 SMTP wiring shape

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.

Evidence expected.

Verdict criteria.

4.2 Verification 2 — Seam post-grant-write hook surface for email composition

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.

Evidence expected.

Verdict criteria.

4.3 Verification 3 — Voice template loader for 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.

Evidence expected.

Verdict criteria.

4.4 Verification 4 — Phase 45 dispatcher testability with fixture-replayed LLM

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.

Evidence expected.

Verdict criteria.

4.5 Verification 5 — Phase 50 endpoint body shape and jurisdiction-field tolerance

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.

Evidence expected.

Verdict criteria.

4.6 Verification 6 — CORS env-var posture for marketing-site domain registration

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.

Evidence expected.

Verdict criteria.

4.7 Verification 7 — <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.

Evidence expected.

Verdict criteria.

4.8 Verification 8 — Phase 50 impl notes §7 carry-forward items 12 and 13

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.

Evidence expected.

Verdict criteria.


5. After verification

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.


6. CC kickoff prompt — paste-ready

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.


7. Companion documents


DUNIN7 — Done In Seven LLC — Miami, Florida Loomworks Phase 51 Step 0 Inspection Brief — v0.1 — 2026-05-09