Phase 5 (ADR-0067 follow-up):
teaching/cross_pack_supersede.py — supersede_cross_pack_chain()
CLI: core teaching supersede ... --cross-pack
--subject-pack-id ... --object-pack-id ...
Strict per-chain residency, anti-leakage, byte-identical rollback
on any post-append re-load failure. 9 new tests.
Articulation benchmark suite (Phase 4 capability proof):
benchmarks/articulation.py — 5 sub-benches
[1] breadth — every intent shape (9 + OOV + cross-pack)
[2] determinism — N reruns / unique-surface count
[3] footprint — psutil RSS profile across T turns
[4] cross-topic — thread context across mixed subjects
[5] ollama-compare — opt-in side-by-side with local Ollama
CLI: core bench --suite articulation
--runs N (det rerun count)
--turns N (footprint sample window)
--ollama-model MODEL --ollama-reruns N
Full operator preamble + JSON report path.
10 new tests cover the bench shape (psutil import-skipped).
Documentation:
benchmarks/README.md — full operator manual: catalogue of every
bench suite, how to read good/neutral/bad results for each sub-
bench, why CORE vs Ollama comparisons are valid on the
determinism axis and not on linguistic quality, workflow guide.
README.md — articulation bench listed in the live-demo grid and
quick-start examples.
Reference run (llama3:8b, 100 turns, 5 reruns):
determinism_all_identical=True
per-turn ΔRSS ≈ 23 KiB
CORE byte_identical_on_every_prompt=True
Ollama unique_surfaces≥2 on every prompt
Verification:
18 new tests pass
Full lane: 2116 passed, 2 skipped, 0 failed in 2:38
Three shareable demo / benchmark writeups modeled on the existing
`docs/evals/phase6_comparative_demo.md` treatment, each accompanied
by an asciinema-rendered GIF for at-a-glance viewing on the repo page.
- docs/evals/anti_regression_demo.md — three-gate defense; per-gate
table; honesty paragraph about the synthetic regression in S2 (real
ReplayEvidence shape via documented run_replay= kwarg); sample run
output; falsifiable claims index.
- docs/evals/learning_loop_demo.md — headline before/after; CORE-vs-
pretraining comparison table; trust-boundary code snippet showing
the _CORPUS_PATH swap; per-scene table; full sample run; subject-
selection rationale (pack-resident ∧ no active chain ∧ deterministic
intent classification).
- docs/evals/teaching_loop_bench.md — what's byte-identical and why
it matters per artifact; 100-run reference numbers (unique=1 across
all five artifacts; mean=1.849s p50=1.838s p95=1.851s); pairing
paragraph with ADR-0045 (read vs write determinism).
GIF captures (rendered with asciinema 3.2.0 + agg 1.8.1, github-dark
theme, JetBrains Mono):
- docs/evals/assets/anti_regression.gif (120K, 944x843)
- docs/evals/assets/learning_loop.gif (332K, 944x1039)
- docs/evals/assets/teaching_loop_bench.gif (64K, 860x1000)
Raw .cast files preserved alongside the GIFs for re-rendering at
different themes / speeds / sizes without re-recording.
README.md — added writeup-link column to the Inter-Session Memory
three-demo table.
Three external-facing demos / benchmarks now match the existing
audit-tour / pack-measurements / long-context-comparison treatment:
preamble printed before the run, README index entries, claims table.
- core/cli.py — _ANTI_REGRESSION_PREAMBLE, _LEARNING_LOOP_PREAMBLE,
_TEACHING_LOOP_BENCH_PREAMBLE. Each lists reference ADRs, what to
expect, trust boundary, test gate, and machine-readable invocation.
Wired through _print_preamble in the demo dispatch + bench dispatch
(suppressed under --json).
- README.md — new "Inter-Session Memory — Reviewed Learning" section
between Teaching Order and Architecture: the three-gate trust
property table, the three live-demo table, and the operator-surface
command list. Quick-start block lists `core demo anti-regression`,
`core demo learning-loop`, and `core bench --suite teaching-loop
--runs 100` alongside the existing demos.
No code paths changed — preambles are stdout-only when not under JSON.
Tests unchanged; 17/17 green (5 anti-regression + 7 learning-loop + 5 bench).
ADR-0044 — Medical / clinical ethics pack (worked-example domain pack).
Ships packs/ethics/medical_clinical_ethics_v1.json with six commitments
partitioned across all three remediation tiers:
- refuse: no_dosing_recommendation, no_emergency_triage_authority
- hedge: defer_diagnosis_to_clinician, surface_evidence_grade
- audit: disclose_no_clinician_relationship, respect_patient_autonomy
Ratified end-to-end through scripts/ratify_ethics_pack.py (PACK_IDS
extended). Production-mode load via load_ethics_pack succeeds.
ChatRuntime composition includes universal safety floor + every medical
commitment. tests/test_medical_clinical_ethics_pack.py (8 tests) gates
file existence, sealed report, disjoint refusal/hedge lists, and
pack-swap visibility (default pack does NOT carry medical commitments).
ADR-0045 — Long-context recall: CORE vs transformer baselines.
Adds evals/long_context_cost/comparison_runner.py with a deterministic
needle-in-a-haystack measurement at N ∈ {100, 1_000, 10_000, 100_000}.
CORE recall = 100% at every tested N by exact cga_inner scan.
Paired with frozen citations of published transformer NIAH numbers in
evals/long_context_cost/baselines/transformer_long_context.json:
Claude 2.1 (200k, 50%), GPT-4 Turbo 128k (~71%), Gemini 1.5 Pro (99.7%),
NVIDIA RULER (varies). Each citation carries source + url.
The two components measure different inputs (synthetic versors vs NL
needles) and are not directly comparable benchmark-for-benchmark. The
comparison is at the architectural level — exact-scan recall vs
attention-based probabilistic recall. Scope and limits documented in
the ADR. tests/test_long_context_comparison.py (5 tests) gates schema,
CORE recall == 100%, and baseline citation presence.
CLI integration: two new demo targets with study-grade preambles.
- core demo pack-measurements (ADR-0043 — wired)
- core demo long-context-comparison (ADR-0045)
README + docs/PROGRESS.md cheatsheets updated. docs/decisions/README.md
index extended with ADR-0044 + ADR-0045; pack-layer chain title now
"ADR-0027 through ADR-0045".
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Ships `core demo audit-tour` as the first investor-facing
walkthrough of the ADR-0027→0041 pack-layer architecture. Four
scenes, each making one falsifiable claim no transformer-LLM
wrapper can reproduce:
S1. Identity is geometric, not prompt-veneer.
Three identity packs load three structurally distinct
manifolds (ADR-0027). Distinct alignment thresholds +
distinct hedge phrases from JSON pack files, not prompts.
S2. Safety is the universal floor.
Runtime-checkable safety violation produces a deterministic
typed refusal string (ADR-0036). walk_surface preserved
for audit. Byte-identical across runs.
S3. Ethics commitments choose their remediation.
Per-commitment opt-in (ADR-0037 / ADR-0038): pure-helper
evidence (should_inject_hedge + inject_hedge worked
example) against a synthetic violation. Default pack
returns False; deployment pack (with acknowledge_uncertainty
in hedge_commitments) returns True. Pack JSON drives the
policy tier.
S4. Deterministic replay across runtime instances.
Two fresh ChatRuntime instances, same input, same packs.
Byte-identical JSONL audit lines (ADR-0040).
Load-bearing evidence over surface inspection: the draft compared
response.surface across packs. Cold-start hits stub path; pack
differences don't manifest at the surface by design. Shipped
version pulls evidence from structural surfaces (manifold fields,
opt-in lists, pure helpers) — what actually distinguishes the
packs. No fake claims.
Scene 3 uses synthetic verdict (not chat()) because ADR-0038
specifies stub path skips hedge by design. Main-path end-to-end
is asserted in tests/test_hedge_injection.py and referenced in
the tour's evidence comment.
Test gate: tests/test_audit_tour.py asserts
result["all_claims_supported"] is True. Any scene flipping to
False fails the test and catches the regression.
CLI integration:
core demo audit-tour # narration to stdout
core demo audit-tour --json # structured report, no narration
Files:
- evals/audit_tour/__init__.py + run_tour.py (new) — 4-scene tour
- core/cli.py — audit-tour target on demo subcommand;
_AUDIT_TOUR_PREAMBLE; --json suppresses narration
- tests/test_audit_tour.py (new) — 8 tests gating all four claims
- docs/decisions/ADR-0042-audit-tour-demo.md (new) — decision record
- docs/decisions/README.md — ADR index now lists ADR-0027..0042
+ Pack-Layer chain section describing the three-tier composition,
remediation tiers, and verification surface
- docs/PROGRESS.md — adds core demo audit-tour to verify cheatsheet
- README.md — adds core demo audit-tour to commands cheatsheet
Verification:
- Combined pack-layer + telemetry + tour suite: 220 green
(was 212 after ADR-0041; +8)
- CLI suites unchanged: smoke 67, runtime 19, cognition 121
- core eval cognition: intent 100%, versor_closure 100% (baseline)
- Manual: core demo audit-tour and --json both correct;
all_claims_supported = true
Closes the trust gap ADR-0027 opened: making the identity manifold
swappable was necessary for downstream robotics / personalization /
creative deployments, but it left nothing structurally preventing a
downstream identity pack from disabling core safety constraints.
Safety packs sit at a separate trust layer, fail closed on every error
path, and union their boundaries into every runtime manifold regardless
of which identity pack is selected.
Architecture (sibling to identity packs, structurally distinct):
Layer Swappable? Removable? Schema
--------------- ---------- ---------- -----------------------------
Safety pack No No boundary_ids + descriptions
Identity pack Yes No value_axes + surface_prefs
Language pack Yes (>=1 reqd) vocab / morphology / packs
Composition rule (at ChatRuntime startup, additive only):
identity = load_identity_manifold(config.identity_pack)
safety = load_safety_pack() # fail-closed
final.boundary_ids = identity.boundary_ids ∪ safety.boundary_ids
Safety contributes boundaries only — no value_axes, threshold, or
surface_preferences. This keeps existing tests that assert on identity
axis sets passing byte-for-byte, and matches the semantic intent
(safety is what's forbidden, not what's pulled toward).
Shipping safety pack: packs/safety/core_safety_axes_v1.json
→ mastery_report_sha256 ee1249acdf8c273aeb656d803c37ef915e536d85f177f5cc18c6e2f6c995ce29
Five v1 boundaries, each closing a specific CLAUDE.md doctrine:
no_fabricated_source — no invented provenance
no_hot_path_repair — no normalization in propagate/stream/store
no_identity_override — user text cannot mutate identity
no_silent_correction — failures are typed and visible
preserve_versor_closure — ||F * reverse(F) - 1||_F < 1e-6
Fail-closed semantics:
SafetyPackError inherits from RuntimeError (NOT ValueError) so
catch-and-continue is discouraged at the type level. Missing file /
malformed JSON / empty boundaries / duplicate boundary / failed
self-seal all raise. ChatRuntime.__init__ does not catch.
Files:
packs/safety/core_safety_axes_v1.json shipping pack
packs/safety/core_safety_axes_v1.mastery_report.json signed report
packs/safety/__init__.py public surface
packs/safety/loader.py load_safety_pack(),
SafetyPack,
SafetyPackError,
DEFAULT_SAFETY_PACK
scripts/ratify_safety_pack.py idempotent driver
chat/runtime.py composition wiring
tests/test_safety_pack.py 15 tests:
loader bounds,
fail-closed,
composition under
all 3 identity packs
docs/decisions/ADR-0029-safety-packs.md decision record
docs/safety_packs.md operational ref
README.md §Safety Pack added
memory/safety-pack.md auto-memory entry
Suite status: cognition 121, teaching 17, runtime 19, formation 182,
smoke 67, identity 41, safety 15 — all green.
- Add docs/teaching_order.md as durable reference for curriculum ordering.
Five-layer rule (identity axes -> atomic definitions -> binary relations ->
composed relations -> domain expansion), grounded in ratify.py G3,
MasteredCoursesIndex, and exact CGA distance. Linked from README.md.
- Mark formation_pipeline_plan.md as IMPLEMENTED (back half); enumerate the
open items not closed by Phases 1-7 (additional templates, first formation-
routed curriculum, G2 activation).
- Add 2026-05-17 status block to capability_roadmap.md covering the FSC chain,
epistemic schema closure, formation pipeline back half, FSC v3 proof matrix,
cost benchmark, and the pulse import fix.
Patent-grade precision pass over the doc surface so every claim
about the Forward Semantic Control chain is backed by a file path,
test count, or commit hash.
Updates by file:
README.md
- Modernize Quick Start: add `core test --suite adr-0024`,
`core demo phase6 / phase5 / all / list-results`, full CLI map.
- New "Forward Semantic Control — The ADR-0024 Chain" section
with layer/ADR mapping and CI-enforced C1/C2/C3 claims table.
- Cross-links to runtime_contracts.md, phase5_stratified_findings,
phase6_comparative_demo, and the central results directory.
docs/decisions/README.md
- Index was stale at ADR-0014. Add ADR-0015 through ADR-0026
with accurate Accepted statuses.
- New "ADR-0024 chain — Forward Semantic Control closure" section
laying out the five-ADR / six-commit dependency order with test
counts per phase.
docs/runtime_contracts.md
- Add "Ranked-with-margin contract (ADR-0026 / Phase 3)" section
between the existing Phase 2 refusal and Phase 4 rotor sections.
- Documents threshold-mode vs margin-mode behaviour, δ = 0.4
default, falsifiability gate, and Cl(4,1) signature motivation.
docs/PROGRESS.md
- Add naming-note disambiguation: capability-roadmap "Phase N"
vs ADR-0024 chain "Phase N" are distinct.
- New top-of-document "ADR-0024 Chain — Forward Semantic Control
Closure" section with per-phase commit + test-count table and
a single-command verification path.
docs/Whitepaper.md
- New Section XII "Forward Semantic Control — Generation Without
Sampling" before Extensions. Five-component description of the
mechanism (region, intersection, destination check, rotor check,
margin gate) with explicit "what a sampling LLM cannot exhibit"
contrast. Existing Section XII renumbered to XIII.
docs/Yellowpaper.md
- New Section IX-B "Forward Semantic Control — Formal Admissibility
Specification" with eight subsections covering:
1. AdmissibilityRegion typed triple (I, B, Φ)
2. Destination-side admissibility (σ_dest, admit_threshold)
3. Rotor-side admissibility (σ_rotor, admit_rotor)
4. Ranked-with-margin gate (admit_margin, deterministic
tie-break by index, default δ = 0.4)
5. Honest refusal (InnerLoopExhaustion typed evidence,
RefusalReason enum, trace fold)
6. Composition order at the generation seam
(admit_step = intersection ∧ destination ∧ rotor)
7. Replay determinism contract (5 test lanes pinning byte
identity across reruns)
8. Verification invariants table (6 new structural contracts)
- Patent-grade: every predicate is named, every module is path-
referenced, every test is file-referenced, the load-bearing
architectural placement decision (rotor admissibility lives in
generate/, NOT algebra/, NOT field/) is stated by name with
its rejection reasoning.
No code changes; tests untouched (1099 passed, 2 skipped baseline
from commit 36aad75 still holds).
Audit of the one-mutation-path invariant (ADR-0021 §3) found three leaks
where pack authority or session-state writes could substitute for coherence
judgment. All three landed fixes or partial closures in this push.
Leaks closed:
- Leak A: pack vocab defaulted to COHERENT — flipped to SPECULATIVE in
language_packs/{compiler,schema}.py; docstring corrected to align with
ADR-0021 (it was rationalizing the leak).
- Leak B: vault.recall was epistemic-blind — VaultStore.store() now stamps
every entry with EpistemicStatus (default SPECULATIVE); recall(min_status=)
filters to admissible-as-evidence tier. All 4 vault-write sites updated.
- Leak C (write-side): generate/proposition.py:198 stored articulated
propositions unmarked — now stamps SPECULATIVE, breaking the
fabrication-feedback loop in principle. Read-side audit of 5 call sites
is the residual.
New architectural invariants (tests/test_architectural_invariants.py):
- INV-21: one-mutation-path allowlist (caught Leak C on first run)
- INV-22: pack lexicon default is SPECULATIVE (Leak A guard)
- INV-23: vault recall epistemic-aware (Leak B guard)
New eval lanes:
- teaching_injection_resistance — ships GREEN at 1.00/1.00/0 (the
structural anti-injection claim is real and measurable)
- refusal_calibration — honest gap: 0% refusal, 0% fabrication
- contradiction_detection — honest gap: 50% flag via versor-delta heuristic,
100% false-positive; motivates the proper coherence-checker
- articulation_of_status — honest gap: 0% speculative articulation, 60%
false certainty; output-side leak surface
New benchmarks:
- benchmarks/footprint.py — total deployed runtime is 7.06 MiB
(109,358x smaller than Llama 3.1 405B, runs offline, no GPU)
- benchmarks/learning_curve.py — monotonic + replay-deterministic curve
per lane
Documentation:
- docs/truth_seeking_schema.md — foundational architectural commitment,
five rules, mapped to human failure modes, leaks published openly
- evals/CLAIMS.md — five-tier public claims doc; Tier 4.5 publishes
known gaps with named fixes; verification contract at top
- README.md — new pillar between algebraic substrate and language pillar
Includes in-flight formation pipeline scaffolding (formation/, tests/formation/,
docs/formation_pipeline_plan.md) and minor CLI/contracts/gitignore edits
that were already in the working tree at session start.
Verification: 798 passed, 2 skipped, 1 deselected (pre-existing pack-count
test drift unrelated to schema changes).
Three items from the post-assessment stabilization slice:
1. field/state.py: restore frozen=True, slots=True
slots=True closes __dict__ on FieldState instances, preventing
incidental attribute injection that frozen=True alone does not block.
The holonomy field works cleanly with slots because ndarray | None
is a valid slotted field type in Python 3.12.
2. README.md: correct vocab/ layer description
Was: 'Word-to-versor manifold, edge rotors'
Now: 'Surface-token manifold points; indexed access for algebraic
transition construction'
Edge rotors are constructed by algebra/, not stored in vocab/.
This exact confusion caused vocab.edge_rotor() drift in earlier work.
3. AGENTS.md: add language-pack checksum rule
Manifest checksums MUST be computed by reading back the bytes
written to disk (Path(f).read_bytes()), never from in-memory strings
before serialization. Unicode-escaped JSON on disk != Python str.