Skip to content
Source
Sign inSign up
TanStack/db
Open History to see the last commit

law-restructuring.md

52 lines2.9 KB

1# Law restructuring
2​
3**Use when:** laws overlap, need a missing distinction, or might be better
4expressed by merging, splitting, replacing, or removing them.
5​
6**Inputs:** the original laws with their authority, motivations, examples, and
7limits. Include existing oracle owners. Do not simplify labels without first
8recovering the obligations they represent.
9​
10## Operation
11​
121. Decompose the laws into traceable obligations, conditions, distinctions,
13 and promised observations. Check that these parts can reconstruct each
14 original claim; invented categories can lose the essential constraint.
15 If public wording and an executable owner disagree, retain both claims and
16 the unresolved authority. A passing test alone cannot retire public wording.
172. Propose a different organization and state the operation: merge under a
18 common principle, split by authority or checkpoint, replace a concept, or
19 retire an obligation with an explicit reason. Fewer words or model fields
20 alone do not establish improvement.
213. Map every original obligation to where it is preserved, narrowed, strengthened,
22 rejected, or still unresolved in the candidate. State what insight originally
23 made the obligation necessary. A claim may be defeated, but needs a reason
24 and a design decision rather than disappearing from the mapping.
254. Derive old and proposed predictions for a witness exercising each distinction
26 that the reorganization could erase. Compare both allowed and forbidden
27 outcomes. Check whether the change accidentally forbids a valid implementation
28 or admits one of the formerly rejected wrong designs.
295. When an independent preservation check is useful and authorized, give a fresh
30 agent the original obligation, its sources, and one candidate. Hide sibling
31 candidates and the author's preferred outcome. Ask what insight survives,
32 what is defeated, and what smallest repair is needed. Without that separation,
33 describe the result as a trace audit, not independent validation.
34​
35**Return:** the proposed organization, the old-to-new obligation mapping,
36witnesses and their evidence status, losses, and unresolved design decisions.
37Keeping the existing laws separate is a valid result.
38​
39**Control:** reconstruct each original obligation from the candidate and check
40its discriminating witness. A semantic change may be justified, but is not an
41equivalent refactor. Merging prose does not require merging executable owners
42whose models or production boundaries differ.
43​
44**Distortion:** neat categories that erase obligations, speculative connections
45presented as established, or preserving familiar wording instead of useful
46insight.
47​
48**Stop when:** the alternative's preservation and losses are explicit, or the
49source obligations cannot be reconstructed. Do not adopt a replacement merely
50because this operation produced it.
51​
52Adapted from Field Lab's structural recombinator and position-preservation assay.