DUNIN7 · LOOMWORKS · RECORD
record.dunin7.com
Status Current
Path phases/phase-52-jurisdiction-routing/loomworks-phase-52-cr-drafting-handoff-v0_1.md

Loomworks — Phase 52 CR Drafting Handoff

Version. 0.1 Date. 2026-05-10 Audience. A fresh Claude.ai chat (same project, so project knowledge is shared) that drafts the Phase 52 CR. The current chat may also draft the CR directly per the Phase 50 compressed-analog precedent. Provenance. Produced after loomworks-phase-52-scoping-note-v0_2.md (which absorbed phase-52-step-0-findings-v0_1.md). All architectural decisions are settled in v0.2 of the scoping note (P52-D1 through P52-D10); this handoff transposes those decisions into drafting instructions.


1. What this is

The Phase 52 scoping note v0.2 is CR-ready. The Step 0 findings are absorbed. All v0.1 §11 open questions are resolved (P52-D2 reshaped per V1; P52-D5 operational-items posture confirmed; P52-D8 tag name settled; marker-tag convention settled; V6 absorbed as sharper generalization in §13). Three small CR-drafting-time verifications remain (per §11 of scoping v0.2): build_claim_url exact call-site count, settings module exact location, routing-skill module exact path. None block CR drafting from beginning. There is no more scoping work to do — the next deliverable is a single CR document.

The receiving chat reads this handoff, then the scoping note v0.2, then the Step 0 findings. Then it drafts the CR. The CR specifies architectural decisions firmly; substrate field names, function signatures, table names, model identifiers, route paths, and module locations are marked with [CC verifies at Step 0] where the CR drafter could not read live ground truth, or with [CC verifies at CR drafting] where Step 0 findings flagged exact-string verifications worth doing at drafting time.

The CR target filename: phase-52-cr-jurisdiction-routing-v0_1.md.

The CR's structural template: phase-51-cr-marketing-site-and-companion-email-v0_1.md in the engine repo's docs/phase-crs/. Mirror its section shape — pre-flight items, build steps with Step-0-equivalent inspection blocks, acceptance gates, halt conditions, kickoff prompt at the end. Adapt to Phase 52's single-sub-arc shape: the CR is smaller than Phase 51 (no marketing-site sub-arc, no Operator-Layer sub-arc by default, fewer build steps, fewer acceptance gates).


2. Decisions the CR implements

These are settled. The CR drafter does not re-decide them; it transposes them into CR sections.

  1. Phase 52 = Sub-arc 1 only (engine: routing-skill registry + settings field + jurisdiction_routing_decided Memory event + routing-decision step in seam + build_claim_url extension). Sub-arc 2 (Operator Layer) is empty by default; if Item 1 trigger fires during build, mid-build amendment scoping absorbs. Sub-arc 3 (marketing site) is empty — Phase 52 doesn't touch the marketing repo. Items 1 and 2 from the Phase 51 §19 carry-forward stay deferred-pending-trigger; items 4–13 stay out-of-scope per scoping v0.1 §8.
  1. P52-D1 — Routing-skill registry mirrors Phase 45's register_action_dispatcher pattern. Replace-on-duplicate, Optional resolve. Per V3 finding. Phase 38 grammar dict (raises on duplicate) and Phase 16 ExtractionSkillRegistry class are alternative templates available if drafting surfaces a fit problem with Phase 45 — but the v0.2 baseline is Phase 45's pattern. Function naming follows Phase 45's verbatim shape; [CC verifies at CR drafting] exact register_action_dispatcher signature.
  1. P52-D2 — Routing-decision step lands BEFORE build_claim_url is called; build_claim_url extended with optional base_url: str | None = None parameter. Per V1 finding. The actual seam sequence has claim_url construction before composition (composer takes claim_url via context), not after as v0.1 read. v0.2 sub-decision: extend the helper additively (option (a) of V1's three options); routing-aware variant (option (b)) and inline formatting (option (c)) set aside. Default behavior when base_url is None reads settings.webauthn_rp_origin, preserving backward compatibility with all existing callers.
  1. P52-D3 — jurisdiction_routing_decided Memory event mirrors Phase 50's grant_request_received exactly. Per V4 finding. Typed MemoryObject subclass; Literal[…] object_type; append_event(event_kind="jurisdiction_routing_decided"); optional OBJECT_TYPE_REGISTRY entry per the Phase 50 deferral precedent. Schema: jurisdiction, destination_instance_label, destination_instance_url, source_grant_request_event_id, decided_at.
  1. P52-D4 — Items 1 and 2 deferred-pending-trigger. Item 1 (modify-the-email-body extension) waits for Operator iteration to surface a concrete need. Item 2 (CORS wildcard pattern support) waits for Cloudflare Pages preview-URL form testing to become load-bearing. If either trigger fires during Phase 52 build, mid-build amendment scoping per substrate-friction-discipline-pattern absorbs; reserved buffer slots accommodate.
  1. P52-D5 — Operational items as parallel non-CR track; deploy-target-naming discipline applied. Engine deployment via M4 tunnel, mailbox provisioning, cloudflared upgrade proceed independently. The deploy target is named in scoping (api.loomworks.dunin7.com via M4 tunnel as the Authority instance URL; loomworks_authority_instance_url settings field per P52-D9; marketing site domain loomworks.doneinseven.com inherited live from Phase 51) per the V6 two-question absorption recipe ("where does it live?" / "when does it go live?") applied to each cascade. Smoke-test acceptance gates conditional on engine deployment landing by Phase 52 close; deferred-until-deployment fallback if not.
  1. P52-D6 — Build-time estimate. 0.75–1.25 hours total. Substrate sub-arc 1 only. Smallest substrate phase since the credit-system arc opened.
  1. P52-D7 — Reserved buffer slots: 3 slots, unconsumed if no amendment arises. Mirrors Phase 50 / 51 pattern.
  1. P52-D8 — Tag name: phase-52-jurisdiction-routing on engine repo only. No tags on Operator Layer or marketing repos by default — Phase 52 has no work in those repos. If sub-arc 2 lands actual work via Item 1 trigger, marker tag follows Phase 51 V7 precedent.
  1. P52-D9 — Settings field name: loomworks_authority_instance_url: str = "". Per V5 finding. No Authority-engine-URL setting exists today; webauthn_rp_origin is Operator-Layer surface (different surface, not reusable). Phase 52 introduces the new field per loomworks_* convention. Empty-string default signals "not configured"; routing-skill default registration handles the empty case.
  1. P52-D10 — Jurisdiction-read approach: _load_grant_request mirror reading source GrantRequestReceived event via metadata["source_grant_request_event_id"]. Per V2 finding. Pure additive; no Phase 50 surface modification. Threading jurisdiction onto held-proposal metadata at _author_proposal_assertion (V2 option (b)) is recorded as set-aside-but-available for Phase 53+ candidates per scoping v0.2 §8.
  1. Build sequencing. Per scoping v0.2 §6.1: 3 active + 3 reserved buffer slots (P52-D7). Two checkpoints (A after Step 2, B after Step 3 final-before-tagging). Tag: phase-52-jurisdiction-routing per P52-D8, on engine repo only.
  1. Carry-forward. Per scoping v0.2 §8: Items 1, 2 deferred-pending-trigger; Items 4, 5, 6, 7, 8 conditional / opportunistic / speculative; Items 9, 10 continuing parallel work; Items 11, 12 substrate-gap-dependent or conditional; Item 13 methodology consolidation. Phase 53+ candidates: multi-instance fleet groundwork; engagement creation arc kickoff; threading fields onto held-proposal metadata at _author_proposal_assertion (V2 set-aside).
  1. Halt thresholds. Per scoping v0.2 §9: routing-skill registry shape requires more than Phase 45's pattern can absorb; build_claim_url extension surfaces tighter coupling than V1's read implies; _load_grant_request mirror reveals shape Phase 52 didn't anticipate; Item 1 or Item 2 trigger fires; jurisdiction field flow contradicts V2 verdict.

3. CR target shape

3.1 Sections to include (mirroring Phase 51 CR v0.1 structure, adapted for single-sub-arc)

3.2 Build step shape (per Phase 51 v0.1 precedent)

Each of the three active build steps in §14 contains:

Phase 52's build steps span one repo only (engine). Steps 1–3 hit the engine repo; no cross-repo work. The Step-0-equivalent inspection blocks reflect this — substrate steps reference engine files exclusively.

3.3 Reserved-slot buffer language (per Phase 49/50/51 precedent)

Per Phase 49 v0.3 §15 / Phase 50 / Phase 51's full carry of the convention, slots 4–6 in Phase 52's build read as "(reserved — buffer for amendments arising from steps 1–3)" and "(reserved — buffer)". Reserved-not-skipped: unconsumed if no amendment arises; the buffer's value is its presence, not its consumption. Phase 50 left all three unconsumed; Phase 51 left all three unconsumed. CR §14 carries this language.


4. CR-drafting-time verifications

Step 0 absorbed six verifications cleanly, so CR drafting starts from a strong evidence base. The remaining drafting-time verifications focus on details that didn't fit in Step 0 — exact line numbers, exact strings, exact import paths, exact module locations. These follow the same discipline as Phase 51 drafting: live-string-from-codebase, not placeholder-from-CR.

CR drafter verifies the following at draft time (read live; substitute exact strings into CR sections):

  1. seam.issue_grant exact module path and current grant_kind='form_initiated' branch shape. Step 0 V1 verified the seam sequence (claim_url before composition; composer takes claim_url via context); CR drafter reads the exact branch and specifies §10's routing-decision-step insertion site against live line numbers. Phase 51's inline-composition design is the V1 baseline; Phase 52 inserts new code into the same branch.
  1. _load_grant_request exact import path and signature. Step 0 V2 confirmed the helper exists and is reusable; CR drafter reads the exact module path and signature so §10 can specify the import statement and call shape directly.
  1. build_claim_url exact module path, signature, and call-site count. Step 0 V1 named the helper as the extension target; CR drafter reads the exact signature, the existing call-sites, and any type-checking implications of adding base_url: str | None = None so §11 specifies the extension exactly. v0.2 baseline assumption: one call-site (form-initiated grant path). If CR drafting reveals more call-sites, the §11 backward-compat test surface widens.
  1. webauthn_rp_origin settings field exact location. Step 0 V5 named this as the existing field that build_claim_url reads as default; CR drafter reads the exact field declaration so §8 (new field) and §11 (extended helper default) can specify the convention precisely.
  1. register_action_dispatcher exact module path and signature. Step 0 V3 named Phase 45's pattern as Phase 52's mirror; CR drafter reads the exact signature, replace-on-duplicate behavior, and Optional return shape so §7 specifies register_jurisdiction_route against verbatim sibling.
  1. Phase 50 grant_request_received Memory event registration exact module location. Step 0 V4 verified the mirror is exact; CR drafter reads the registration block (typed MemoryObject subclass + Literal object_type + append_event call + optional OBJECT_TYPE_REGISTRY entry) so §9 ships a parallel block against verbatim template.
  1. Settings module exact location and pydantic-settings class shape. Step 0 V5 confirmed Phase 52 needs a new field; CR drafter reads the exact module path and class declaration so §8 specifies the field add (insertion location, default value, ordering against existing fields) precisely.
  1. Engine repo docs/phase-crs/ directory listing. Confirms CR number ordering for Phase 52 (likely CR-2026-067 if Phase 51 was 066); CR drafter reads the directory and assigns the next number.
  1. Routing-skill module location convention. v0.2 §5.1.1 sketches loomworks/seam/routing/jurisdiction_router.py; CR drafter confirms against actual seam directory layout (existence of loomworks/seam/; subdirectory conventions; __init__.py patterns). If the sketched path doesn't fit the existing seam convention, §7 adjusts to the closest conventional path; the v0.2 sketch is provisional.

If any of items 1–9 reveal architectural divergence (not just naming or exact-string), CR drafter halts and surfaces — does not draft and hope.


5. Drafting discipline

Live-string-from-codebase, not placeholder-from-CR. Same discipline as Phase 50 / 51. When the CR specifies model identifiers, table names, column names, route paths, or any concrete string that already exists in the codebase, use the live string. Step 0 absorbed this discipline at the six-verification level; CR drafting continues it at the exact-line-number level.

Step 0 inspection blocks at each build step. Per §3.2 above. Each build step says "before implementing, CC reads {specific files} and confirms {specific facts}." Phase 52's build steps lean lightest on this so far — Step 0 absorbed six scoping-time verifications and only three substrate sub-tasks remain — but the per-step inspections remain, scoped to the step's specific touch points.

Halt thresholds per build step. Each build step carries a halt threshold. Phase 47/48/49/50/51 standard: ">30 tests touched" for blast-radius decisions. Phase 52 reuses this and adds: any divergence from v0.2 scoping decisions triggers halt; any discovery that build_claim_url has more call-sites than v0.2 baseline triggers halt-and-amendment.

Reserved-slot buffer language. Per §3.3 above. Slots 4–6 are reserved-not-skipped.

Test posture progression. Mirror Phase 51: green-against-mocked-substrate-shapes in early steps; green-with-real-substrate-fold-in by final step. Step 1 (registry + settings + event registration) lands green against unit-level mocks; Step 2 (routing-decision in seam + build_claim_url extension) exercises the email composition path with the V1-baseline sequence; Step 3 (smoke-test posture) runs against mocked engine unconditionally and live engine conditional on operational track per P52-D5.

Backward-compat discipline for build_claim_url. P52-D2's extend-with-optional-base_url choice creates a backward-compat test surface: every existing call-site must continue to produce identical output when base_url is unset. CR §11 ships an explicit backward-compat test (existing call-site behavior preserved) alongside the new positive test (base_url parameter overrides default). If CR drafting reveals more call-sites than the v0.2 baseline of one, the backward-compat surface widens proportionally.

No voice content shipping in Phase 52. Unlike Phase 49 / 50 / 51 (which shipped voice templates with as-shipped baseline content), Phase 52 ships no voice content. The routing-skill produces no Companion-rendered prose; jurisdiction_routing_decided is a substrate Memory event without a voice surface. CR doesn't have a §7-equivalent voice-template section.


6. Scope boundaries (don't cross)

The CR drafter does not draft sections for any of the following — these are out of Phase 52:

If the CR drafter finds itself drafting any of the above, it has crossed the seam — back up.


7. Halt-and-escalate signals during drafting

The receiving chat halts drafting and reports back to the Operator (rather than continuing) if any of the following arises:

In all cases, halt-and-surface is preferred to draft-and-hope.


8. Companion documents during drafting

If the receiving chat needs project-knowledge searches mid-draft, candidates include:

The receiving chat does not need to read all of these front-loaded; pull as needed during section-specific drafting.


9. Paste-ready kickoff prompt for the new chat

Open a new Claude.ai chat with the same project (so project knowledge is shared) and paste:


Open Phase 52 CR drafting. Read first: loomworks-phase-52-cr-drafting-handoff-v0_1.md.
That document specifies the reading order, the decisions to implement, the
CR-drafting-time verifications, and the drafting discipline. Follow it.

The target output is a single CR document at
phase-52-cr-jurisdiction-routing-v0_1.md. Mirror the structural shape of
phase-51-cr-marketing-site-and-companion-email-v0_1.md, adapted for
Phase 52's single-sub-arc shape (smaller CR; no marketing-site sub-arc,
no Operator-Layer sub-arc by default, fewer build steps, fewer
acceptance gates). The scoping note loomworks-phase-52-scoping-note-v0_2.md
is authoritative for scope; CC's Step 0 findings phase-52-step-0-findings-v0_1.md
is authoritative for the verified state of the codebase (already absorbed into
v0.2; use the findings document for exact-string verifications during drafting).

Do not draft sections for items in the handoff's §6 "scope boundaries" list —
those are Phase 53+ or out-of-Phase-52 entirely.

Halt and surface to me rather than draft-and-hope if any of the §7
halt-and-escalate signals arise.

Begin by reading the handoff in full, then the scoping note v0.2, then the
Step 0 findings. Plan the section structure before drafting prose. Confirm the
plan with me before drafting if uncertain.

The receiving chat reads this, then begins. The CR drafts iteratively across the chat as sections build up.


10. After the CR is drafted

The receiving chat hands the Operator a downloadable phase-52-cr-jurisdiction-routing-v0_1.md. The current chat's role ends with this handoff document (or, if compressed-analog path is taken, with both this handoff and the CR).

Operator workflow from there:

  1. Download the CR from the receiving chat.
  2. Add to project knowledge (replaces nothing; appends as new file).
  3. Open a fresh CC session on DUNIN7-M4.
  4. Paste a CC kickoff prompt referencing the CR — same shape as Phase 51's kickoff.
  5. CC archives the CR at docs/phase-crs/ per CR §3.4.
  6. CC runs Step 0 inspection per the CR's pre-flight items (smaller list than Phase 51's because Step 0 absorbed six items).
  7. CC reports findings; if naming-only divergences, CC proceeds; if architectural divergences, halt and report (same discipline as Phase 49/50/51).
  8. CC implements per the CR; reports build summary at completion (~0.75–1.25 hours per P52-D6).
  9. New scoping chat opens for Phase 53 with carry-forward as relevant.

Standard Phase 47/48/49/50/51 pattern.

If a mid-build amendment surfaces (Phase 49 Finding 6 trajectory — Operator-elective amendment scoping), the discipline is now established: build doesn't halt; Operator decides architecturally with options + halt-threshold review; sub-step lands before continuing. Phase 49's phase-49-step-4-amendment-scoping-v0_1.md is the canonical instance; Phase 50 left all three reserved slots unconsumed; Phase 51 — [verify against impl notes v0.2] — left reserved slots unconsumed (the cleanest cadence to date). Phase 52's most likely mid-build amendment trigger is Item 1 (modify-the-email-body) firing during build per P52-D4.


11. Companion documents


DUNIN7 — Done In Seven LLC — Miami, Florida Loomworks Phase 52 CR Drafting Handoff — v0.1 — 2026-05-10