LEGAL DEBUG


Decompiling the law, one clause at a time.

§ Chambers Online § v.MMXXVI § Build 0badf2f2

— Section 01 / Bug Report

The Bug Report


The legal system, like any sufficiently old codebase, accumulates technical debt. Precedent layered on precedent, statute patched over statute — a spaghetti of subsections that once solved a narrow problem and now quietly governs the unrelated.

A citizen files a grievance the way a developer files a ticket: { symptom, expected behaviour, actual behaviour }. But the parser is ceremonial, the compiler is adversarial, and the stack trace is written in 14th-century Latin. LegalDebug reads that trace aloud — carefully, patiently, and in plain English.

“The law is a program written by many hands across many centuries, none of whom ever met. The least we can do is read the comments.”
— Section 02 / Debug Panels

Flip the Clause


Hover — or tap — any card to translate a clause from jurisprudential into human. Parchment on the front; terminal on the back.

§ 101 · Mens Rea

Mens Rea

The “guilty mind” — the mental state required before conduct becomes criminal.

§ → { }
// decompiled
fn is_crime(act, mind) {
  if !mind.intent { return false; }
  return act.prohibited;
}

Did you mean to do it? Usually that matters more than what actually happened._

{ } → §
§ 204 · Stare Decisis

Stare Decisis

The doctrine by which courts follow the precedents established by prior rulings.

§ → { }
// decompiled
while (case.unresolved) {
  let prior = history.last_match(case);
  if prior { return prior.ruling; }
  history.push(new_ruling(case));
}

Don’t reinvent the wheel — cite the wheel, and the axle, and the cart._

{ } → §
§ 318 · Habeas Corpus

Habeas Corpus

A writ compelling a custodian to bring a detained person before the court.

§ → { }
// decompiled
assert(detainee.present_in_court);
assert(custodian.shows_cause);
if (!lawful) release(detainee);

Produce the body. Explain yourself. Or let them go._

{ } → §
§ 442 · Res Judicata

Res Judicata

The principle that a matter once judged cannot be litigated again between the same parties.

§ → { }
// decompiled
if (cache.has(case.fingerprint)) {
  throw AlreadyDecided;
}
cache.store(case, ruling);

The matter is memoized. Please do not submit the same argument twice._

{ } → §
— Section 03 / Stack Trace

The Stack Trace


Every modern ruling is a function call that reaches down, frame by frame, through the centuries. The stack is where law remembers itself.

  1. at court.decide(case_2026) /modern/jurisprudence.law:12
  2. at precedent.apply(1998_Helsinki_v_State) /continental/treaties.law:884
  3. at common_law.inherit(1772_Somerset) /english/common.law:1611
  4. at statute.compile(Magna_Carta_cl.39) /english/runnymede.law:1215
  5. at roman_law.bootstrap(Corpus_Iuris_Civilis) /byzantine/justinian.law:0534

Eight centuries of call frames, and each one still on the stack. No wonder the response time is measured in years.

— Section 04 / The Patch

The Patch


A debugger doesn’t demand a rewrite. It offers the smallest faithful change that restores correct behaviour. So with the law.

statute/consumer_rights.law @@ −412,7 +412,9 @@
  Section 412. In the matter of contractual disputes,
- the burden of proof shall rest upon the aggrieved party,
- unless said party is a body corporate of record.
+ the burden of proof shall rest upon the party
+ possessing superior access to the evidentiary record.
+ Plain-language summary shall accompany all filings.
  Applicable to all matters heard after the enactment date.

We do not propose to delete the statute. We propose to refactor it: preserve intent, clarify expression, reduce the cognitive load required to obey the law honestly.

  • // intent Fairness should not depend on which party can afford a better parser.
  • // method Rewrite the clause in the active voice; attach a summary; keep the section number.
  • // risk Minimal — jurisprudence evaluated, tests green, appeals untouched.