Skip to content

Commit 22e5a3e

Browse files
docs(lockdown): replay 2026-05-27 owner directive to main (CLAUDE.md + banners + ROADMAP cleanup + STATE.a2ml) (#179)
## Why this PR exists The 2026-05-27 owner directive — *no more legacy-preservation patching, the work is the four-layer redesign* — landed on the \`proof/l1-region-threading-design\` branch (PR #175 against that branch). However, the L2 hybrid path (PRs #176 + #177) shipped directly to **main**, leaving the lockdown stranded on a DIRTY+superseded branch. This PR replays the directive to main so every future session sees it. ## What this PR changes | File | Change | |---|---| | \`CLAUDE.md\` | **APPENDS** a new "🛑 Owner directive 2026-05-27" section to the existing disambiguation-focused file. Preserves all existing content. | | \`formal/PRESERVATION-DESIGN.md\` | Adds 🛑 CANONICAL banner at top with 4-item anti-pattern list. | | \`formal/PRESERVATION-HANDOFF.md\` | Strengthens banner from "🟠 Superseded" to "🛑 ARCHAEOLOGY ONLY". Names \`step_preserves_type_at_pre\` etc. as in-class patching helpers. | | \`ROADMAP.adoc\` | Preservation table row → "🔴 provably false, do not attempt to close". v0.1.0 checkbox → "re-derive preservation in the four-layer architecture". 250-line §"Preservation closure plan" body **removed** (git history retains it). | | \`.machine_readable/6a2/STATE.a2ml\` | \`next_action\` and \`last_action\` rewritten to layered framing. New \`@directive\` block (canonical=CLAUDE.md, source=owner, date=2026-05-27) so machine consumers see the same do/do-not list. | ## What this PR does NOT change - No \`.v\` files. The Coq code is untouched. - No other \`.machine_readable/*\` files. Audited (META / ECOSYSTEM / AGENTIC / NEUROSYM / PLAYBOOK / ANCHOR / CLADE) — no stale patching references found. - No CI / workflow files. Audited — none preservation-specific. - Does not close PR #153 (superseded design branch). Will be closed in a follow-up after this lands. - Does not close issue #171 (strategic question). Will be closed once this lands. ## Why admin-merge is appropriate This is a pure documentation/policy commit. No code, no proofs, no behaviour change. Its purpose is to **block a known anti-pattern** that has already wasted multiple session-hours. Each hour CI sits on it is an hour another session could re-walk the patching path the directive forbids. If CI is green, please consider \`--admin\`-merging directly. Otherwise auto-merge \`--squash\` is enabled. ## Test plan - [x] \`cat CLAUDE.md\` renders the directive section as the second major block after disambiguation - [x] \`formal/PRESERVATION-DESIGN.md\` shows the 🛑 CANONICAL banner immediately after the title - [x] \`formal/PRESERVATION-HANDOFF.md\` shows 🛑 ARCHAEOLOGY ONLY banner - [x] \`ROADMAP.adoc\` no longer contains "Phase 1 — Lemma B" / "Phase 5 — Admitted → Qed" - [x] \`.machine_readable/6a2/STATE.a2ml\` parses (a2ml structural integrity preserved; @state/@blockers/@artifacts/@directive/@EnD all matched) - [x] No \`.v\` files modified (no rebuild needed) - [x] No CI workflow files modified 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 7fbfaf0 commit 22e5a3e

5 files changed

Lines changed: 296 additions & 305 deletions

File tree

.machine_readable/6a2/STATE.a2ml

Lines changed: 60 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -6,51 +6,72 @@
66

77
@state(version="2.0"):
88
phase: "implementation"
9-
next_action: "Discharge ~8 per-goal cases in step_preserves_type_at_pre + ~11 in step_output_context_eq_at_pre (port from upstream's per-goal sections, ~2-3h each). Then re-attack preservation's 12 cascading goals using step_preserves_type + step_output_context_eq as oracles (~4-8h, may need region-env weakening for non-values)."
10-
last_action: "Path 3 (at-pre helper) landed 2026-05-26 eve. step_preserves_type AND step_output_context_eq both now Qed (was Admitted with 1 shared admit each at S_Region_Step r=r1 cross-case). Two new helper lemmas introduced (Admitted with most cases auto-closed by verbatim block copy). 4 proof commits + 1 doc commit pushed to lemma-b-phase2 (ephapax#146)."
11-
updated: 2026-05-26T19:00:00Z
9+
next_action: "Layered preservation work, NOT legacy patching. Per owner directive 2026-05-27 (see CLAUDE.md): do not attempt to close Theorem preservation in formal/Semantics.v (provably false via Counterexample.v); do not extend Semantics.v with closure-support lemmas (step_preserves_type_at_pre and similar are all in this anti-pattern class); do not close residual Semantics_L1.v axioms via ad-hoc proof tricks. Affirmative work: per-layer preservation derivation against the four-layer redesign in formal/PRESERVATION-DESIGN.md. L2 modality landed in-place (PRs #176 + #177); 6 L1 supporting lemmas regressed to Admitted post-L2-hybrid — bullet-rewrite needed for the 3 new Affine-only constructors of has_type_l1 in Semantics_L1.v."
10+
last_action: "Doc lockdown landed on main (PR TBD): CLAUDE.md adds owner-directive §, PRESERVATION-DESIGN.md + PRESERVATION-HANDOFF.md gain banners, ROADMAP.adoc §preservation-closure-plan obsoleted, this STATE.a2ml updated. The lockdown originated on the proof/l1-region-threading-design branch (PR #175 against that branch); replayed to main because the design branch is DIRTY+superseded by the L2 hybrid path (#176+#177). PR #153 to be closed as superseded."
11+
updated: 2026-05-27T11:30:00Z
12+
13+
@directive(source="owner", date="2026-05-27", canonical="CLAUDE.md"):
14+
# Captured durable directive — preservation work is the four-layer redesign,
15+
# NOT closure of the legacy theorem. Pre-discovery patching paths are
16+
# closed.
17+
#
18+
# DO NOT:
19+
# - close `Theorem preservation` in formal/Semantics.v (provably false)
20+
# - extend Semantics.v with closure-support lemmas (Lemma B variants,
21+
# step_preserves_type_at_pre, step_output_context_eq_at_pre,
22+
# region_add_typing_for_non_values, strengthened subst variants)
23+
# - close residual Semantics_L1.v axioms via proof tricks
24+
# - follow any pre-2026-05-26 "preservation closure plan"
25+
# - patch the legacy Typing.v judgment
26+
#
27+
# DO:
28+
# - read formal/PRESERVATION-DESIGN.md first
29+
# - work per-layer: preservation_l1, preservation_l2, etc.
30+
# - escalate before patching when a side-condition is needed
31+
#
32+
# Anti-pattern detector: sibling-region-disjointness side conditions,
33+
# region-weakening predicates indexed on syntactic shape, admit-shuffling
34+
# between Semantics.v and a new lemma. Any of these → escalate.
35+
#
36+
# Companion memory: feedback_ephapax_no_patching_legacy_preservation.md
37+
@end
1238

1339
@blockers:
14-
# Formal proofs NOT fully closed; current shape (verified by coqc 8.18 on
15-
# 2026-05-26 eve):
16-
# - formal/Semantics.v `step_preserves_type` (line 4355): Qed ✓
17-
# - formal/Semantics.v `step_output_context_eq` aka Lemma B: Qed ✓
18-
# - formal/Semantics.v `step_preserves_type_at_pre` (NEW, line ~3625):
19-
# Admitted with `all: admit.` catch-all. 27 of 35 cases closed via
20-
# verbatim copy of step_preserves_type's tactic blocks (Cluster A+B).
21-
# 8 per-goal cases remaining: S_StringConcat_Step2, S_Let_Step,
22-
# S_LetLin_Step, S_App_Step2, S_If_Step, S_Pair_Step1, S_Pair_Step2,
23-
# S_Case_Step.
24-
# - formal/Semantics.v `step_output_context_eq_at_pre` (NEW, line ~5698):
25-
# Admitted with `all: admit.` catch-all. ~24-27 of 35 cases closed via
26-
# verbatim copy. S_Region_Step block deliberately excluded (would
27-
# self-reference). ~11 cases remaining.
28-
# - formal/Semantics.v `preservation`: 12 cascading goals — SEPARATE
29-
# structural problem (region-env weakening for non-values), NOT the
30-
# shared admit closed by Path 3.
40+
# Layered work in progress; legacy preservation deliberately not addressed.
3141
#
32-
# Path 3 (at-pre helper) lands. Path 1 (mutual induction) and Path 2
33-
# (structural recursion via expr_free_of_region) both AVOIDED — Path 2
34-
# was blocked by counterexample, Path 1 would have been heavier refactor.
35-
# Path 3 wins by sidestepping the cross-case via shared-env framing.
42+
# Current state (verified by coqc 8.18 on main, post-#176/#177):
43+
# - formal/Semantics.v `preservation`: Admitted — PROVABLY FALSE per
44+
# Counterexample.v (three Qed lemmas). NOT to be closed.
45+
# - formal/Semantics.v `step_preserves_type`, `step_output_context_eq`,
46+
# and their at_pre helpers are Qed but support legacy-preservation
47+
# closure attempts that are now ruled out. Retained for diagnostic
48+
# value; no new lemmas in this class.
49+
# - formal/Semantics_L1.v `preservation_l1`: in progress; 6 supporting
50+
# lemmas regressed to Admitted post-L2-hybrid (PRs #176+#177).
51+
# Bullet-structure rewrite needed for 3 new Affine-only constructors.
52+
# - formal/TypingL1.v: now m-indexed (`has_type_l1 m R G e T R' G'`),
53+
# `linear_to_affine` Qed zero axioms.
54+
# - formal/Echo.v: K-free scaffold, no postulates, forward-looking
55+
# (not yet wired into has_type_l1).
56+
# - formal/Modality.v: thin-poset Linear ≤ Affine, all Qed.
3657
#
37-
# Other proof-debt items (out of standards#134 scope):
38-
# - src/abi/Ephapax/ABI/Invariants.idr E1-E6: E1 (preservation) OWED;
39-
# E2 (linear consumption) PARTIAL (head form discharged via
40-
# splitLinearCoverage PR#85); E3 (region no-escape) PARTIAL (narrow
41-
# form discharged via noEscapeTheorem); E4 (no-runtime-GC) OWED;
42-
# E5 (WASM compilation) OWED; E6 (IR lowering) OWED.
43-
# - 30 unsafe Rust blocks (was 49); concentrated in
44-
# src/ephapax-runtime/src/{lib,list}.rs and src/ephapax-interp/src/lib.rs.
45-
# Per-block contract audit out of scope for standards#134.
46-
# Estate proof-debt arm: standards#134 (OPEN; 4/5 sub-tasks DONE pre-2026-05-26).
58+
# Other proof-debt items (out of preservation scope):
59+
# - src/abi/Ephapax/ABI/Invariants.idr E1-E6: E1 (preservation) OWED at
60+
# the Idris2 layer too; E2/E3 PARTIAL; E4/E5/E6 OWED.
61+
# - 30 unsafe Rust blocks; per-block contract audit out of scope.
4762
@end
4863

4964
@artifacts:
50-
# Doc-only commits parked on `lemma-b-phase2` (PR ephapax#146):
51-
# 032e8ea - audit reconciliation (docs/reports/audit/audit-2026-05-26-standards-134-reconciliation.md)
52-
# 83e1e31 - handoff case-count correction (formal/PRESERVATION-HANDOFF.md)
53-
# 36ff88e - Option 2 obstacle + Path 1 pivot (docs/reports/audit/audit-2026-05-26-lemma-b-option-2-obstacle.md)
54-
# Plus this STATE update + session note (docs/sessions/SESSION-2026-05-26-lemma-b-pivot.adoc).
65+
# Layered files on main (post-L2-hybrid):
66+
# formal/Counterexample.v — 3 Qed lemmas; preservation FALSE
67+
# formal/Echo.v — L3 scaffold, K-free
68+
# formal/Modality.v — L2 thin poset, all Qed
69+
# formal/TypingL1.v — m-indexed has_type_l1 (post-#176)
70+
# formal/Semantics_L1.v — in progress; 6 supporting Admitted
71+
# Doc lockdown:
72+
# CLAUDE.md — owner directive §
73+
# formal/PRESERVATION-DESIGN.md — CANONICAL banner
74+
# formal/PRESERVATION-HANDOFF.md — ARCHAEOLOGY ONLY banner
75+
# ROADMAP.adoc — closure-plan section removed
5576
@end
5677
@end

CLAUDE.md

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,140 @@ Most questions touch exactly one layer. The design rationale is in `formal/PRESE
6868
- The legacy preservation closure plan is superseded by `formal/PRESERVATION-DESIGN.md` (four-layer redesign). `formal/PRESERVATION-HANDOFF.md` carries the historical diagnostic record only.
6969
- Ephapax-affine type proofs are **NOT** done — `formal/` mechanises a single legacy judgment + L1's `has_type_l1`; there is no separate mechanised ephapax-affine until L2 + the Linear ⇒ Affine weakening lemma land. See `PRESERVATION-DESIGN.md §12.15`.
7070
- All commits GPG-signed (key `4A03639C1EB1F86C7F0C97A91835A14A2867091E`), email `6759885+hyperpolymath@users.noreply.github.com`. Auto-merge ON for every PR.
71+
72+
---
73+
74+
## 🛑 Owner directive 2026-05-27 — preservation work
75+
76+
> Read this before touching anything in `formal/`. Several Claude sessions
77+
> burned hours walking the pre-discovery patching path. This block
78+
> exists so that doesn't happen again.
79+
80+
### TL;DR
81+
82+
Ephapax preservation as originally stated in `formal/Semantics.v` is
83+
**provably false**. `formal/Counterexample.v` exhibits a concrete
84+
configuration that types, steps, and lands at an untypable post-state
85+
— all three lemmas `Qed`. The work is therefore **not** to close
86+
`Theorem preservation` in `Semantics.v`. The work is the **four-layer
87+
principled redesign** (L1 region capabilities / L2 modality (now
88+
`m`-indexed into `has_type_l1`) / L3 echo / L4 dyadic mode) documented
89+
in `formal/PRESERVATION-DESIGN.md`. Preservation is **re-derived** in
90+
the new architecture from explicit invariants, not forced through
91+
the old one.
92+
93+
### DO NOT
94+
95+
These are anti-patterns that have wasted real session time. Refuse
96+
them if asked; if asked anyway, push back and link this section.
97+
98+
1. **DO NOT close `Theorem preservation` in `formal/Semantics.v`.**
99+
It is FALSE. No proof technique closes it because no proof
100+
exists. The `Admitted.` is correct.
101+
102+
2. **DO NOT extend `formal/Semantics.v`** with new lemmas aimed at
103+
closing the legacy preservation: not Lemma B variants
104+
(`sibling_typing_transfers_across_step` /
105+
`step_output_context_eq` / `step_preserves_type_at_pre` /
106+
`step_output_context_eq_at_pre` were earlier attempts in this
107+
class), not `region_add_typing_for_non_values`, not strengthened
108+
substitution lemmas. The legacy judgment lacks the structural
109+
invariant the counterexample demands; no lemma collection bolted
110+
onto it will help.
111+
112+
3. **DO NOT close any residual axiom in `formal/Semantics_L1.v`
113+
(e.g. `region_liveness_at_split_l1` if it returns) by adding
114+
proof tricks, side-conditions discharged ad-hoc, or strengthened
115+
lemma signatures within the current judgment shape.** This is
116+
*the same kind of patching that produced the legacy admits*, one
117+
layer up. The post-L2-hybrid main carries the `Modality`
118+
parameter directly in `has_type_l1`; closures that previously
119+
looked like "an L1 fix" are now cross-layer and must be
120+
reasoned-about at the layered level.
121+
122+
4. **DO NOT follow the "Preservation closure plan" steps in
123+
historical PRs / branches / comments.** Anything dated before
124+
2026-05-26 (the counterexample landing) that proposes closing
125+
`preservation` to `Qed.` is pre-discovery. PRs #92, #102, #104,
126+
#106, #114, #116, #117, #121, #146 are part of the historical
127+
reduction-from-910-goals record; treat them as archaeology, not
128+
instructions.
129+
130+
5. **DO NOT patch the legacy `Typing.v` judgment.** It is the
131+
pre-redesign judgment. `Counterexample.v` depends on its
132+
falsity for the regression theorem. Leave it.
133+
134+
### DO
135+
136+
1. **DO read `formal/PRESERVATION-DESIGN.md` first.** It is the
137+
canonical design source. The four-layer architecture, the
138+
missing-invariant statement, and the per-layer plan are all
139+
there.
140+
141+
2. **DO continue the layered build:**
142+
- L1 (`TypingL1.v` + `Semantics_L1.v`): R-threading + modality
143+
parameter (post-L2-hybrid). Residual admits are L1 design
144+
follow-ups, not legacy patching.
145+
- L2: modality landed in-place via PRs #176 + #177
146+
(`has_type_l1` now carries `m : Modality`;
147+
`linear_to_affine` Qed with zero axioms). 6 L1 supporting
148+
lemmas in `Semantics_L1.v` regressed to Admitted post-L2 —
149+
bullet-structure rewrite needed for the 3 new Affine-only
150+
constructors.
151+
- L3 (`Echo.v`): K-free, forward-looking. Not wired into L1/L2
152+
judgments yet — that's L1 ⇒ L3 follow-up.
153+
- L4: not started; design in §7 of the design doc.
154+
155+
3. **DO derive preservation per-layer.** `preservation_l1` is
156+
proved in the L1 vocabulary, against the L1 judgment, using L1
157+
invariants. The same shape for L2 / L3 / L4 as each lands.
158+
159+
4. **DO escalate before patching.** If a proof attempt requires
160+
adding a side-condition to fix a sibling-region-disjointness
161+
issue (or analogous cross-rule constraint), that is the signal
162+
to escalate to a layer-design discussion — the architecture is
163+
asking for a new invariant, not a clever lemma.
164+
165+
### Anti-pattern detector
166+
167+
If your session is producing any of the following, stop and
168+
escalate to the owner:
169+
170+
- `sibling-region-disjointness` side conditions on compound rules,
171+
- region-weakening predicates indexed on syntactic shape,
172+
- admit-shuffling between `Semantics.v` and a new lemma,
173+
- "the previous-PR-line-of-attack just needs one more lemma,"
174+
- proposing to close `Theorem preservation` in `Semantics.v` to
175+
`Qed.` by any chain of reasoning,
176+
- adding new `Axiom` declarations to discharge L1/L2 gaps.
177+
178+
### If you're unsure
179+
180+
Two questions to ask before touching `formal/`:
181+
182+
1. **Am I about to add an `Admitted` or `Axiom` to close a gap in
183+
the old judgment?** If yes — stop. The old judgment is provably
184+
incomplete; the right answer is to encode the missing invariant
185+
in a new layer, not to admit it.
186+
187+
2. **Am I about to close an L1/L2/L3 admit by reasoning that
188+
crosses layers?** If yes — check `PRESERVATION-DESIGN.md` for
189+
the cross-layer dependency annotations. The layered design
190+
intentionally splits some closures across layers; trying to
191+
close them within one layer alone is the trap.
192+
193+
If unsure: ask the owner before writing code. Pause to escalate
194+
costs less than a 4-hour patching session.
195+
196+
### Memory hooks
197+
198+
If you have access to the user's auto-memory store, relevant
199+
entries include:
200+
201+
- `feedback_ephapax_no_patching_legacy_preservation.md` — the
202+
durable directive captured 2026-05-27 (this section).
203+
- `project_ephapax_four_layer_redesign.md` — current project state.
204+
- `project_ephapax_l2_modality_landed.md` — L2 hybrid landing
205+
(PRs #176 + #177).
206+
- `feedback_ephapax_affine_proofs_not_done.md` — what counts as
207+
"done" for the ephapax-affine half.

0 commit comments

Comments
 (0)