DUNIN7 · LOOMWORKS · RECORD
record.dunin7.com
Status Current
Path phases/phase-50-companion-as-authority-and-public-form/loomworks-phase-50-cr-drafting-handoff-v0_1.md

Loomworks — Phase 50 CR Drafting Handoff

Version. 0.1 Date. 2026-05-08 Audience. A fresh Claude.ai chat (same project, so project knowledge is shared) that drafts the Phase 50 CR. Provenance. Produced after loomworks-phase-50-scoping-note-v0_2.md (which absorbed phase-50-step-0-findings-v0_1.md). All architectural decisions are settled in v0.2 of the scoping note; this handoff transposes those decisions into drafting instructions.


1. What this is

The Phase 50 scoping note v0.2 is CR-ready. The Step 0 findings are absorbed. The two open Operator decisions (form-submission actor; rate-limit form) are settled. There is no more scoping work to do — the next deliverable is a single CR document drafted in a fresh Claude.ai chat.

The fresh 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, and route paths are marked with [CC verifies] where the CR drafter could not read live ground truth.

The CR target filename: phase-50-cr-companion-as-authority-and-public-form-v0_1.md.

The CR's structural template: phase-49-cr-companion-intelligence-v0_3.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.


2. Decisions the CR implements

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

  1. Phase 50 = items 2, 3 (engine half), 8. Items 6, 10, 12, voice tuning are out of CR scope (continuations or deferrals). Marketing site, SMTP, captcha, modify-the-proposal action, threshold-driven autonomy are out of Phase 50 scope (Phase 51+ or future).
  1. Item 2 alpha posture: always-require-approval. Companion proposes; Operator commits via Phase 45 ApprovalCard surface; auto-issue gated by future config flag. delegation_required=True is the dispatch default — Phase 49 Finding 5 inherits cleanly.
  1. System-actor sentinel for form-submission Memory events. Sentinel ActorRef(kind="contributor", contributor_id=<deterministic UUID>) per the _BOOTSTRAP_ACTOR precedent. The deterministic UUID is reserved for "form_submitter" (or comparable; CR specifies the canonical identifier name). Form details — email, display_name, use_case, audience, source — land in event payload. CR drafter verifies the deterministic-UUID generation pattern from the existing _BOOTSTRAP_ACTOR site and follows it.
  1. grant_request_received is a routine Memory event via append_event. No Phase 38 declare-and-register treatment. No DST/DRT events. No lifespan hook. The event_kind field is free-form String(64); the value grant_request_received lands directly.
  1. slowapi rate-limit middleware. Add slowapi to pyproject.toml. Wire as FastAPI middleware. Apply @limiter.limit("10/hour") (or comparable conservative rate; CR finalizes the limit value after CC verifies what makes sense at alpha) to POST /authority/grant-request. Clean upgrade path to redis-backed limiter when production load warrants.
  1. CORS allowlist extension via env var. LOOMWORKS_CORS_ORIGINS (or whatever the canonical name is — CR drafter verifies against any existing config-env-var naming convention; if loomworks_cors_origins config field exists, follow that). Production deploys add the marketing-site origin (https://loomworks.com per deployment strategy v0.2). Dev/test continues with the existing permissive posture.
  1. Parameterize read_credit_management_assertions(category: str = "model_profile"). One-line refactor with backward-compatible default. Item 8 calls with category="conversion_credit_policy". No sibling function. Phase 49's model_profile callers continue to work without modification.
  1. Override resolution rule for item 8: most-specific-scope wins. Order: referrer_id-scoped > campaign_ref-scoped > global. Resolution lives at the caller (the conversion observer), not in the read seam.
  1. <GrantDecisionApprovalCard> is a sibling component to <ProposalApprovalCard>. Both wrap <NotificationCard> (composition pattern). No subclass extension. Component scaffolding (notification metadata read, Approve/Decline button wiring, dispatch invocation) shared via <NotificationCard>.
  1. Voice loader path: loomworks/orchestration/credit_voice.py. Item 2's prompts/credit_voice/grant_proposal.md template loads through the same loader used by Phase 49's three credit_voice templates.
  1. AI-invisibility carve-out. prompts/credit_voice/grant_proposal.md carries the same top-of-file carve-out comment shape as Phase 49's three templates. The grant-decision rationale may name credit tiers (haiku/sonnet/opus) — that's what the proposal is — and the carve-out names this as bounded named exception, scoped to the physical-correspondence condition.
  1. Audit-trail integrity. Item 2 uses standard Phase 45 routes, so Phase 49 Finding 3's inline-emission discipline does not directly apply. The proposal lands as a held assertion in Credit Management Engagement Memory with provenance pointing at the form-submission Memory event; approval flows through Phase 45's existing dispatch which already emits the right events; grant issuance through seam.issue_grant writes to credit.credit_grant with grant_kind='form_initiated'.

3. CR target shape

3.1 Sections to include (mirroring Phase 49 CR v0.3 structure)

3.2 Build step shape (per Phase 49 v0.3 precedent)

Each of the five active build steps in §16 contains:

3.3 CR archival

The CR archives to docs/phase-crs/phase-50-cr-companion-as-authority-and-public-form-v0_1.md in the engine repo at Step 0, before Step 1 begins. Same discipline as Phase 47/48/49.


4. CR-drafting-time verifications

The CR drafter reads live ground truth at draft time for these substrate shapes. Where the live string can't be confirmed at draft time, mark with [CC verifies]. Phase 49 Section 2 named the principle: CR sketches of substrate column or filter shapes defer to live ground truth.

  1. register_action_dispatcher exact signature. Phase 49 extended it with delegation_required: bool = True and on_decline: Callable | None = None. Verify the full kwarg list and types. (V1 confirmed the signature exists; CR drafter reads the exact form.)
  1. process_approval and process_decline exact signatures. Verify what arguments they receive and what they return; CR §12 specifies how the GrantDecisionApprovalCard's Approve/Decline buttons invoke them.
  1. <NotificationCard> props and composition shape. The Operator Layer component file. CR §13 specifies how <GrantDecisionApprovalCard> and <ProposalApprovalCard> compose against this.
  1. _BOOTSTRAP_ACTOR deterministic UUID generation pattern. The existing site that creates the sentinel ActorRef. CR §11 uses the same pattern for the form-submitter sentinel.
  1. append_event signature and event_kind constraint. Verify that event_kind is String(64) and that grant_request_received fits the field. CR §11 specifies the call shape.
  1. _on_api_key_saved_for_conversion exact location and signature. Verify file path and function signature; CR §14 specifies the override-read insertion point.
  1. register_on_api_key_saved registration site. Verify how the observer is registered (likely an import-time side effect per Phase 48 §12.6); CR §14 confirms the existing pattern stays intact.
  1. CORS configuration mechanism. Verify whether config-env-var pattern exists or whether a new env-var name lands. CR §10 specifies the env-var name and the allowlist extension shape.
  1. slowapi installation pattern + FastAPI app construction site. Verify where the FastAPI app is constructed and where middleware is added. CR §10 specifies the middleware wiring.
  1. read_credit_management_assertions exact signature. Phase 49 has the function in loomworks/credit/cross_engagement_memory.py; verify the current signature so the parameterization is a clean one-liner. CR §9 specifies the refactor.
  1. Voice loader at loomworks/orchestration/credit_voice.py. Verify the module path and the loader function signature. Phase 49 templates load through this. CR §15 specifies how grant_proposal.md integrates.
  1. Existing public endpoint pydantic patterns. Phase 47 / Phase 48 public endpoints (POST /claim/grant, POST /signup, etc.). CR §10 mirrors the validation/error-response posture.
  1. Companion identity for Credit Management Engagement. Verify whether CME has a Companion record at all (V4 surfaced that it lacks a bound Operator; whether it has its own Companion identity for the dispatch surface is a separate question worth confirming). CR §12 reflects whatever the live state is.
  1. Existing held-assertion authoring path. Verify how Phase 16 contributions create held assertions; CR §12 specifies the proposal-authoring shape.

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


5. Drafting discipline

Live-string-from-codebase, not placeholder-from-CR. 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. Phase 47's CR specified claude-sonnet-4-20250514 while the live string was claude-sonnet-4-6; pre-flight rejected the placeholder. The Phase 49 CR avoided that class of finding by reading live strings at draft time. The Phase 50 CR continues that discipline.

Step 0 inspection blocks at each build step. Per §3.2 above. The build step says "before implementing, CC reads {specific files} and confirms {specific facts}." This is the reads-actual-data-structure-from-live-database discipline.

Halt thresholds per build step. Each build step carries a halt threshold — what triggers CC to stop and seek guidance rather than continue. Phase 47/48/49 standard: ">30 tests touched" for blast-radius decisions. Phase 50 reuses this and adds: any divergence from v0.2 scoping decisions triggers halt.

Reserved-slot buffer language. Per Phase 49 v0.3 §15, slots 6-8 in Phase 50's build read as "(reserved — buffer for amendments arising from steps 1-5)" and "(reserved — buffer)". Reserved-not-skipped: unconsumed if no amendment arises; the buffer's value is its presence, not its consumption. CR §16 carries this language.

Test posture progression. Mirror Phase 49: green-with-permissive-fixture in early steps; green-with-real-substrate-shapes by final steps. Item 8 (step 1) lands green against a permissive override fixture; final integration tests in step 4 exercise real Memory reads.

Carry-forward discipline. Standard for any new schema work. No anticipated retire/invalidate transitions in Phase 50, but the discipline applies if any surface during construction.


6. Scope boundaries (don't cross)

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

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 50 CR drafting. Read first: loomworks-phase-50-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-50-cr-companion-as-authority-and-public-form-v0_1.md. Mirror the structural
shape of phase-49-cr-companion-intelligence-v0_3.md. The scoping note
loomworks-phase-50-scoping-note-v0_2.md is authoritative for scope; CC's Step 0
findings phase-50-step-0-findings-v0_1.md is authoritative for the verified
state of the codebase.

Do not draft sections for items in the handoff's §6 "scope boundaries" list —
those are Phase 51 or future.

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-50-cr-companion-as-authority-and-public-form-v0_1.md. The current chat's role ends with this handoff document.

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 49's kickoff
  5. CC archives the CR at docs/phase-crs/ per CR §3.3
  6. CC runs Step 0 inspection per the CR's pre-flight items
  7. CC reports findings; if naming-only divergences, CC proceeds; if architectural divergences, halt and report (same discipline as Phase 49, where the Step 4 amendment scoping document landed mid-build via the substrate-friction-discipline-pattern path)
  8. CC implements per the CR; reports build summary at completion
  9. New scoping chat opens for Phase 51 with carry-forward as relevant

Standard Phase 47/48/49 pattern.

If a mid-build amendment surfaces (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.


11. Companion documents


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