Loxihart ChiselLoxihartGuardCore/v2

Incremental Refactoring Planner & Safe Migration Workbench

LOXIHART CHISEL / PHASE 1-6 REFACTOR BENCH
REFACTOR BENCH/PHASE 1-6 EVIDENCE ENGINE

Cut dead code along verified seams. Never swing blind.

Loxihart Chisel turns multi-file repository migrations into ordered, reversible waves. Every proposed cut must clear the three-question pre-cut gate, carry an explicit file-and-line citation or UNKNOWN verification step, halt on protected schema or auth boundaries, and bind a single-step rollback SHA before execution.

Three-Question Pre-Cut Gate

Enforced before Phase 3 refactoring waves unlock

1. Boundary

Maps every client, server, schema, and public contract seam touched by the change and names what breaks downstream if wrong.

2. Minimum

Locks the smallest surgical change that resolves the confirmed finding without rewriting working adjacent modules.

3. Evidence

Requires a file:line reference, commit SHA, or exact command output. Unverified assumptions stay quarantined as UNKNOWN.

Interactive Wave & Approval Gate Inspector

Preview how Loxihart Chisel sequences migration waves, flags protected boundaries, and compiles Phase 6 audit reports.

SCOPE_MODE=FULL: Multi-wave system migration with threat model, Dual RLS verification, and Phase 6 report. Every protected boundary emits an explicit human APPROVAL REQUIRED block.
Migration Waves (3)Krosebrook/Refactor-Studio
SELECTED CUT

Replace permissive Supabase USING (true) policies with Base44 Dual RLS & FLS

TIER-2 VERIFICATION

node scripts/verify-security-guards.mjs

Status: passed

SINGLE-STEP ROLLBACK

git revert d8aed2b1

Blast radius: high

Phase 2 Finding Citation

Closes cross-tenant exposure found in Krosebrook/Refactor-Studio supabase/migrations/20260416231856:292

Patch Snippet
// filename: base44/entities/User.jsonc
"tenant_id": { "type": "string", "rls": { "update": { "user_condition": { "collaborator_role": "editor" } } } }

STOP-GATE ACTIVE: Human Approval Required Before Execution

## APPROVAL REQUIRED

Action: Replace permissive Supabase USING (true) policies with Base44 Dual RLS & FLS
File(s): base44/entities/User.jsonc, base44/entities/RefactorPlan.jsonc, src/lib/chiselServer.js
Reason: Closes cross-tenant exposure found in Krosebrook/Refactor-Studio supabase/migrations/20260416231856:292
Risk: HIGH blast radius across boundary dependencies
Rollback: git revert d8aed2b1

Reply YES to proceed. Reply NO to skip this change and continue.