Skip to content

Latest commit

 

History

History
364 lines (310 loc) · 33.9 KB

DESIGN.md

File metadata and controls

364 lines (310 loc) · 33.9 KB

Design and architecture

TScert verifies TypeScript programs against an operational calculus proved sound in Lean 4 (SEMANTICS.md). Lean computes proposals (expression and binding types, generic instantiations, footprints, and loop-head invariants) and checks every unit in one forward pass against proved rules. Acceptance depends only on the checked pass, never on how proposals were synthesized.

This document owns TScert's design principles, pipeline architecture, soundness statement (mode8Accepted_sound), trust surface, general mechanisms, and documentation/implementation maps. Companion documents own the census methodology (CENSUS.md), the calculus (SEMANTICS.md), the type system (POSITIVE-TYPES.md, RECURSIVE-EQUATIONS.md), typing and state rules (EXPRESSION-TYPING.md, STATE-AND-REFINEMENT.md, FOOTPRINTS.md, ARITHMETIC.md), the single pass (SINGLE-PASS.md), and the source boundary (SOURCE-MODEL.md, SOURCE-ELABORATION.md, SOURCE-CONTRACTS.md, SOURCE-FRAGMENT.md). Cited literature lives in REFERENCES.md.

Principles

  • Soundness is absence of stuck states and wrong values. An accepted unit run in any well-typed environment and heap evaluates to a value of its declared return type, diverges, or throws an exception in the exception family (Wright and Felleisen 1994). Exceptions are admitted outcomes; termination is unproved.
  • Types state sound runtime invariants. Every type describes only what holds for all conforming JavaScript values: mutable arrays, dictionaries, Set, and Map are invariant; methods are read-only and contravariant in parameters; records are open (fresh object literals carry exact own-key bounds); type assertions (e as T, e!) generate obligations rather than assumptions; any is refused.
  • Utility justifies complexity. Rarely used JavaScript corner cases are excluded by explicit, enforced restrictions at the fragment boundary rather than approximated silently.
  • Proposals are untrusted; the pass decides. Synthesized types, footprints, generic instances, and loop-head facts are untrusted proposals. Refusal means unverified, never disproved.
  • One mechanism per concern. Each verification concern has one shared mechanism (General mechanisms); new source forms compile into existing calculus rules.
  • Minimal, explicit trust. Every assumption outside the Lean proof is listed in the Trust surface and enters mode8Accepted_sound as an explicit input premise or trusted tool boundary. Library contracts are TypeScript declarations filtered through reviewed, text-pinned overlays.
  • Wire formats have one strict shape. Internal and boundary JSON documents carry no version or schema tags; decoders reject unknown fields and tests/json-field-names.mts enforces Lean/TypeScript agreement.

Architecture

The pipeline separates untrusted proposal synthesis from proved verification. Stages 2–4 constitute elaboration.

Stages

  1. Parse source and collect declarations. The TypeScript front end (tools/fragment-parse.mts) parses strict TypeScript source into a Fragment AST (with semantics-preserving desugarings such as switch to labeled blocks) and collects a declaration graph of referenced types and external values.
  2. Build execution plans in Lean. (FlowJson.lean) constructs a type-independent statement graph and evaluation/binding schedules recording operand order, defaults, destructuring, finally, and exception edges.
  3. Synthesize types and effects in Lean. A forward walk (Synthesis.lean) proposes expression types, binding types, generic instantiations (instancesFromWalk), and function footprints (PassProposals.proposals).
  4. Lower the typed calculus program in Lean. The front (FragmentFront.lean) and lowering (Lowering.lean) translate annotations and proposals into a calculus program graph (Request) and its checking obligations.
  5. Propose loop-head facts. Head inference (HeadInference.lean) proposes candidate linear invariants at loop heads.
  6. Check in one forward pass. (SinglePass.lean) visits each node of the unit's graph once in topological order (modulo back-edges to loop heads), applying proved expression rules (HeapExpressionRules) and checking every edge into a loop head against its invariant. Failed loop-head candidates are dropped and the pass iterates (FilePlans.passGroupInferred).

LANGUAGES.md catalogues each intermediate representation by trust tier.

Types at program points

A source span is a byte-offset pair in source text; an execution point is a node in a body's statement graph (one span can appear at several points, such as a duplicated finally block). Binding types attach to execution points; expression types attach to (point, span) pairs. Mutable bindings carry fixed storage contracts bounding all writes, distinct from narrower current-content facts at a point.

Types denote nodes in a common recursive equation graph indexed by type labels (RECURSIVE-EQUATIONS.md). Lowering also emits a diagnostic source map linking graph nodes and slots to source locations; it has no role in acceptance.

Incompleteness

Synthesized types, footprints, or loop-head candidates can be too weak or too strong for a safe program, or subtype search can exhaust its budget. Recursive subtyping validates finite subtype certificates (RECURSIVE-EQUATIONS.md); refusal classification is owned by OBLIGATION-DIAGNOSTICS.md.

The pipeline entry point

pipeline/verify-source.mts orchestrates parsing and per-SCC unit verification (pipeline/unit-scheduler.mts driving a bounded persistent --unit-worker 8 pool) under a strict --project tsconfig.json, with per-unit logs, memory isolation, and time limits. Each unit receives its own verdict; the file outcome is the first non-accepted unit verdict:

  • verified: every unit accepted by the pass;
  • unsupported: source parsing or front elaboration refused a construct;
  • unverified: the pass refused a typing or state obligation;
  • exhausted: a resource budget was reached before deciding an obligation;
  • error: a tool failure.

The stage store

All pipeline stages and control operations execute through one content-addressed cache (STAGE-STORE.md). Keys hash implementation identity (binary, keyed .mts sources, runtime) and complete inputs; parses and TypeScript diagnostics are keyed as observed stages by recorded file-system observations, reusing retained declaration sessions (STAGE-STORE.md). Timeouts are recorded at their limit and storage is LRU-bounded. Replayed results enter the Trust surface.

What "verified" means

The headline soundness theorem is SourceClaimJson.PassUnit.mode8Accepted_sound (PassUnitRun.lean):

Mode8Accepted f i  ⟹  PassUnitSafe f i

Its premise Mode8Accepted is an inductive predicate with one constructor matching mode 8's single per-SCC acceptance print site (UnitCheck.unitResult, used by --check-unit 8 and --unit-worker 8):

  • Mode8Accepted.unit — per-SCC planning via UnitCheck.unitPlan and passGroupMode8 acceptance (unitVerdict_sound).

For stage-store unit hits, replayedUnit_sound (PassUnitRun.lean) proves Mode8Accepted and PassUnitSafe under SHA-256 collision resistance and store integrity from the canonical UnitInput.wire and published UnitOutput bytes. Cross-SCC DAG composition across certified and link-checked Stated edges is proved by sccDag_safe and sccDag_units_safe (PassUnitCross.lean).

PassUnitSafe establishes safety (ControlFlow.SafeGraph and Safe in SEMANTICS.md) for every function and nested closure in the unit's recursive group: given inputs satisfying their declared types (EnvOk), valid references (RootsOk), and an admissible kinded world and heap (WorldAdm, HeapOk), execution never gets stuck and any normal return satisfies the return contract (including type-guard and assertion promises). Generic units satisfy this guarantee for every admissible assignment of their type parameters.

Acceptance/soundness invariant by construction. Every elaborated FunctionPlan crosses one exhaustive conversion (FunctionPlan.certify, referenced by PassUnit.MemberSafe) to CertifiedPlan. Adding a new plan constructor fails compilation until its checker and soundness theorem exist. The proofs are checked by Lean 4 with zero sorry and zero project axioms (Verification.Tests.AxiomCheck, Verification.Paper.TolerantFrames.Tests.AxiomCheck). See SINGLE-PASS-THEOREM.md for the full theorem chain and TRUST-REDUCTION.md for options to narrow remaining review boundaries.

Modules and code units

A module's code units are its top-level functions and its module-initialization body (top-level statements, constants, classes, enums). Mutually recursive functions (by mentioned names) form one strongly connected unit certified together. Each unit is checked over the file's front, assuming the signatures of the module bindings and imports it references; initialization enforces declaration-order safety. Imported modules with bodies are checked by their own interface stages (SOURCE-CONTRACTS.md). Composing per-unit guarantees into whole-module execution soundness is tracked in WORK.md.

Generic bodies

Each generic type parameter is represented by a parameter row in the type graph. Bounded parameters T extends A denote intersections with A; Awaitable and Resolvable qualifications restrict admissible instantiations (SOURCE-CONTRACTS.md). Generic function, class, and closure bodies are checked universally over all admissible row reassignments (nodeChecked_reassign, ordinary_requestSafe, qualified_requestSafe, passCheckerReassign_lexical), while call sites check synthesized instantiations (Synthesis.matchBinder) against bounds.

Closures are graph code

Every function, closure, method, and constructor body lowers to a calculus control-flow graph (SEMANTICS.md). Mutable captures are heap cells (cellLocals); parameter defaults run at entry in source order; rest parameters allocate fresh array spines; .bind constructs a forwarding CallCode.bound descriptor.

Function coverage and release thresholds

Owned by CENSUS.md.

Statement coverage

Owned by CENSUS.md.

Trust surface

Everything outside the Lean proof enters as a trusted tool, an input-slot contract (EnvOk / RootsOk in mode8Accepted_sound), or a host-environment invariant. Core TCB layers: (1) front-end parsing and TypeScript resolution, (2) AST-to-calculus lowering and JSON decoding, (3) operational-model faithfulness to ECMA-262, (4) Lean 4 kernel and verifier binary, (5) caller, import, library-overlay, and host-family contracts, and (6) stage-store replay integrity.

Trusted tools.

Assumption Where it is stated
The parser represents strict TypeScript faithfully: it admits only the supported fragment and its desugarings (control flow, scopes, patterns, classes, for...of/for...in, Modifies annotations, intrinsics, derived forms) preserve JavaScript execution. tools/fragment-parse.mts (fragment-classes, fragment-expressions, fragment-guards, fragment-statements, fragment-support), fragment.mts, SOURCE-ELABORATION.md
JSDoc @requires clauses on function declarations and written imports are parsed and attached faithfully to unit requests and imported signatures; unsupported clauses and async preconditions are refused. tools/bound-annotations.mts, functionDecl (tools/fragment-statements.mts), writtenImport (tools/fragment-parse.mts), ARITHMETIC.md
Lowering preserves control flow, lexical binding, evaluation order, annotations, key-adding copy isolation (growSites), fresh class allocation, slot-vs-cell confinement (cellLocals), and short-circuit condition translation. Source/Fragment.lean, Source/SourceFacts.lean, Source/Lowering.lean, SOURCE-ELABORATION.md
Strict JSON decoders represent submitted Fragments, declarations, and module interfaces faithfully, rejecting unknown fields. Source/Fragment.lean, Claims/ModuleInterfaces.lean, RequestCli.lean, REQUEST-PROTOCOL.md
TypeScript's checker resolves every name to its declaration in the strict tsconfig.json project and detects source/declaration errors; the parser verifies TypeScript read identical source bytes. tools/declaration-graph.mts
TypeScript's type evaluation (typeof, keyof, T[K], conditional/mapped/template types, probe-declaration applications, enum constant values, overload resolution) matches runtime semantics. tools/computed-types.mts, tools/type-probe.mts, declaration-graph.mts, SOURCE-CONTRACTS.md
Regex-literal capture-shape analysis reports exact group counts, names, and always-participating groups under ECMA-262 (differential-tested against Node). tools/regexp-shape.mts, tests/regexp-shapes.mts
The calculus operational model agrees with JavaScript on supported operations (IEEE-754 floats, jsPow, bitwise/remainder ops, string/prototype rules). Semantics/Calculus/Calculus.lean, ExecutionModelTests.lean, tests/node-runs.mts
Lean 4's kernel, compiler (@[csimp] replacements proved equal), and verifier binary (custom runtime init) are sound. lean/lakefile.toml, runtime_init.c
Unit dependency mention scans and census import-edge resolution accurately report deep-status dependency closures (affecting census reporting only, never unit acceptance). Front.dependencies (Claims/Elaboration.lean), censusEdges (dev/census.mts)
Census aggregation maps per-SCC --unit-worker 8 unit verdicts and omitted-unit refusals accurately to shallow and deep counts (reporting only). unitRound (pipeline/verify-source.mts), dev/census.mts
Replayed verifier checks match fresh execution for the exact inputs bound by their content key (documents, arguments, binary, keyed pipeline code, runtime, clean DYLD_/LD_ environment). STAGE-STORE.md, pipeline/stage-{execution,store}.mts, pipeline/stages.mts, RequestCli.lean
Replayed control operations match fresh execution under the same content-key validation (including TSCERT_TEST_MUTATIONS for mutation tests). STAGE-STORE.md, pipeline/stages.mts (tested), tests/single-pass-mutations.mts
Replayed parses and module stages match fresh execution: front-end reads go solely through tools/files.mts, compiler reads are sandboxed, Node resolution/loader observations are validated, and isolated module lowering agrees with in-importer lowering (conjectured). STAGE-STORE.md, tools/{files,compiler-channel}.mts, pipeline/{in-process-execution,stages}.mts, tests/observed-stages.mts
Retained declaration sessions with shared work agree byte-for-byte with fresh compilers (conjectured; differential-tested across reuse orders and invalidations). STAGE-STORE.md, tools/declaration-session.mts, tests/{session-reuse,shared-work}.mts

Assumed values. Each entry is an input slot contract (EnvOk) or reviewed library overlay; external implementations may throw but must never return a value outside their contract.

Assumption Where it is stated
An imported value meets its declaration (overloads, guards, postconditions, Modifies effects on bodyless declarations, enum emit objects, imported class Symbol.hasInstance, canonical unique symbol identities). IMPORT, OVERLOADS in SOURCE-CONTRACTS.md
External callers satisfy exported functions' @requires preconditions, parameter @invariant clauses, Modifies callback-effect parameters, and @representation handle invariants. tools/fragment-statements.mts, tools/type-term.mts, tools/declaration-graph.mts, ARITHMETIC.md
An ambient declaration of the checked file (declare function/const/class/enum) holds of the supplied runtime value; non-local globals enter only via reviewed overlays. AMBIENT; collectDeclarations
A host family's stable members read immutable values for object lifetime (F2) and realize as prototype-free host objects (F1′); compiler-API audited JSDoc node shapes (kinds 345, 346), node methods/callbacks (T3), sync API request footprints (T6), host enums, and RemoteNodeList views match audited package behavior. HOST-FAMILIES.md#trust-rows, COMPILER-API.md, tools/compiler-api.mts, tests/compiler-api{,-shapes}.mts
Module-function bindings retain their values (reassignment refused; in scripts, global-object access preserves bindings and standard call/apply/bind). moduleFunction, confined (tools/fragment-expressions.mts), SOURCE-ELABORATION.md
Each Node module function the overlay of library modules lists meets its entry (node:fs, node:child_process, node:crypto, node:url, node:path, node:os, node:module, node:assert/strict, audited prototype chains and default-import bindings, without --experimental-vfs). modulesOverlay in tools/library-modules.mts, SOURCE-CONTRACTS.md
The host's values of each type the overlay of library types states meet its statement (Uint8Array/Uint16Array/Int32Array/Float64Array/Buffer fixed-length non-detached view spines and prototypes, ArrayBuffer/DataView/PrivateDataView, TextDecoder, Intl.Segmenter/Segments, URL). typesOverlay in tools/library-types.mts, globalsOverlay (tools/library-globals.mts), tools/intrinsics.mts, SOURCE-CONTRACTS.md
The DOM's host objects a text-measurement client uses meet their entries (CanvasRenderingContext2D, OffscreenCanvas*, TextMetrics, Element/HTMLElement, document, navigator, getComputedStyle, Intl.DateTimeFormat, assuming no synchronous custom-element or mutation-event callback mutates modeled state). typesOverlay in tools/library-types.mts, tools/library-globals.mts, tools/intrinsics.mts, SOURCE-CONTRACTS.md
Node's process and console meet their reviewed entries (argv, env, execPath, pid, platform, arch, exit, kill, console.log/error, setTimeout, structuredClone, EventEmitter delivery). globalsOverlay in tools/library-globals.mts, SOURCE-CONTRACTS.md
A global variable's binding holds the value its reviewed entries describe throughout execution (no unobserved reassignment; hoisted spread collection reads standard data properties). GLOBAL; selectGlobal, SOURCE-ELABORATION.md
Each standard library global meets its reviewed overlay entry (BigInt, Symbol, String, Number, Boolean, Math, Object, Array, RegExp, Error hierarchy, Reflect, Map/Set/WeakMap, Date, Promise, JSON, parseInt/parseFloat, atob). globalsOverlay in tools/library-globals.mts, SOURCE-CONTRACTS.md
Array.prototype meets ArrayProto (reviewed native signatures, footprints, ordinary array construction, push append relation, map/indexOf/slice length and presence postconditions). overlay in tools/array-prototype.mts, SOURCE-CONTRACTS.md
String.prototype, Number.prototype, BigInt.prototype and Boolean.prototype meet StringProto, NumberProto, BigIntProto, and BooleanProto (own non-mutating methods, including codePointAt and string integer/length postconditions). primitiveOverlay in tools/array-prototype.mts, Semantics/Footprints/StringPostconditions.lean
Function.prototype.toString meets FunctionProto (pure string return on callables, TypeError otherwise). functionOverlay in tools/array-prototype.mts, SOURCE-CONTRACTS.md
Set.prototype, Map.prototype and Date.prototype hold the listed natives unmodified with audited read/internal-slot footprints. interfaceOverlay in tools/array-prototype.mts, SOURCE-CONTRACTS.md
The intrinsics meet their signatures (%Await%, %AsyncReturn%, %Promise*%, %Iterate*%, %Spread:*%, %RestFrom:*%, %ForIn%, %HasProperty%, %ElementAt%, %ByteAt%/%ByteLength%/%ByteSet%, %Freeze:*%, %Enum:*%, %InstanceOf:*%, %NewPrivateBuffer%/%NewPrivateDataView%, %RegExp:*%, %Dispatch:*%; job queue and non-settling promises unmodeled). tools/intrinsics.mts, SOURCE-CONTRACTS.md
Initial-environment callables and host-object methods satisfy their signatures over kinded worlds (Safe, HeapOk/Shaped, RefsOk, view-write confinement); initial states inhabit admissible kinded worlds. Promise/PromiseWith/ConstructPromise, EntryHolds/RootsOk in mode8Accepted_sound, SOURCE-CONTRACTS.md
Values thrown by external or input functions belong to builtinExc (source values meeting the array invariant). Thrown in Safe (builtinExc), SEMANTICS.md

Assumed of the host. Invariants on every runtime value a unit receives.

Assumption Where it is stated
Caller contract: values conforming to structural annotations are plain data objects (no proxies or accessors) with distinct owned field locations, matching exactOptionalPropertyTypes and key-exclusion bounds; class instances own private slots; Error instances hold string message/name non-enumerably and preserve Error.prototype. EnvOk in mode8Accepted_sound, SOURCE-ELABORATION.md, SOURCE-CONTRACTS.md
External code preserves effect-bearing contracts (Modifies), class prototypes/methods, standard Symbol.hasInstance lookup, native Set/Map internal slots and iterators (%InstanceOf:Map%/%InstanceOf:Set%), and Function callability. EnvOk, tools/fragment-classes.mts, tools/intrinsics.mts, SOURCE-CONTRACTS.md
Array and prototype invariants: objects owning [] are genuine built-in arrays with standard Array.prototype and Array[Symbol.species], owning none of constructor, then, toJSON, or ArrayProto keys, and holding elements at canonical numeric own keys (numericOwn); built-in prototypes (Object, Array, Function, String) are unmodified and own no extra keys or proxies; string keys follow escapeKey. builtinInvariant (POSITIVE-TYPES.md), RequestJson.arrayExcludedKeys, inKeyRefusal (Source/Fragment.lean), escapeKey (Calculus.lean)
Open-read allowlist keys (auditedOpenReadKeys, receiverOpenReadKeys) are absent or transparent across all admitted host families and prototypes. tools/host-operations.mts, tests/compiler-api.mts (C5), SOURCE-CONTRACTS.md
External writes adding keys to writable-index objects respect the index contract and key class; spread/Object.assign symbol-key omission matches type bounds; standard Object.assign and Function.prototype.{call,apply,bind} are unmodified. SOURCE-MODEL.md, tools/fragment-parse.mts
A native regex (what a regex literal evaluates to) keeps RegExp.prototype, standard methods, and immutable pattern/flags, mutating only lastIndex; structural RegExp values meet ⟦RegExp⟧. tools/regexp.mts, SOURCE-CONTRACTS.md
Promise<T> values are genuine native promises with unmodified prototypes/species; Object.prototype and Function.prototype own no Symbol.toStringTag. tools/declaration-graph.mts, SOURCE-CONTRACTS.md

General mechanisms

Each verification concern extends one shared mechanism:

Concern Mechanism Owner
Heap facts preserved across calls/writes Tolerant frames and region footprints FOOTPRINTS.md
Call side effects Effect-qualified signatures proposed and certified from callee code SOURCE-ELABORATION.md
Program-point state and narrowing Heap knowledge, witness links, and branch refinement STATE-AND-REFINEMENT.md
Integer indices, lengths, and bounds Linear facts, certificates, and JSDoc clauses ARITHMETIC.md, ANNOTATIONS.md
Type narrowing guards Guards lowered to typed Tag tests SOURCE-ELABORATION.md
Union subtyping and candidate pruning Positive formulas, clause meet, and structure-directed selection POSITIVE-TYPES.md
Generic and recursive declarations Parameterized recursive type equations RECURSIVE-EQUATIONS.md
Tagged library object families Host families (tag sets, guard tables, stable members) HOST-FAMILIES.md
External and built-in contracts Text-pinned overlays and audited prototype contracts SOURCE-CONTRACTS.md
Cross-module imports Certified module interfaces SOURCE-CONTRACTS.md
Excluded constructs Enforced fragment restrictions and controls SOURCE-FRAGMENT.md
Refusals in TScert's own source Seven-route refusal policy and recorded rewrites SOURCE-REWRITES.md
Incremental pipeline caching Content-addressed stage store and observed replays STAGE-STORE.md
Rule tables exported from Lean Generated sections checked against verifier export GENERATED-SECTIONS.md

Documentation map

Document Owns
README.md Overview, examples, CLI installation, and reader entry paths
AGENTS.md Contributor rules, commands, test tiers, and conventions
DESIGN.md Principles, architecture, mode8Accepted_sound, trust surface, and doc/code maps
SEMANTICS.md Operational calculus, kinded worlds, heaps, safety, callable promises, and operational TCB
POSITIVE-TYPES.md Positive recursive types, clause meet, candidate selection, subtyping, and certificates
RECURSIVE-EQUATIONS.md Parameterized recursive equations, unfolding, variance, and instantiation
EXPRESSION-TYPING.md Core expression typing rules and soundness
STATE-AND-REFINEMENT.md Heap-state assertions, links, separation, and branch refinement
FOOTPRINTS.md Tolerant frames, region footprints, survival, and native footprints
ARITHMETIC.md Linear integer facts, safe-integer arithmetic rules, and quantified/indexed facts
SINGLE-PASS.md Single-pass verifier overview, owning SINGLE-PASS-FRONT.md, SINGLE-PASS-THEOREM.md, SINGLE-PASS-PROOF.md, and SINGLE-PASS-CONTROLS.md
SOURCE-MODEL.md TypeScript value, heap, and prototype mapping to the calculus
SOURCE-ELABORATION.md Synthesis, lowering of every source form, and inferred call effects
SOURCE-CONTRACTS.md Reading declarations/annotations, library overlays, and certified imports
SOURCE-FRAGMENT.md Refusal index of excluded TypeScript constructs
SOURCE-REWRITES.md Refusal-resolution policy and recorded rewrites of TScert's own code
ANNOTATIONS.md Surface syntax and semantics of every annotation TScert reads
HOST-FAMILIES.md Tagged host-object family mechanism; COMPILER-API.md is its TypeScript compiler-API instance
LANGUAGES.md Intermediate representations and wire formats by trust tier
REQUEST-PROTOCOL.md Verifier CLI, wire format, and claim-text encoding
FRAGMENT-FORMAT.md Fragment AST JSON schema
SOURCE-CLAIMS.md Unit claims, execution-graph documents, and source identity
OBLIGATION-DIAGNOSTICS.md Failure records, source maps, outcome classification, and diagnostic text
STAGE-STORE.md Content-addressed caching, observed stages, sessions, and replay trust
CENSUS.md Function-coverage benchmark, release thresholds, and statement coverage
GENERATED-SECTIONS.md Verifier-exported rule sections and checking pipeline
TRUST-REDUCTION.md Options for narrowing or proving trusted bridges
AGENT-GUIDE.md Using the tscert CLI and sound TypeScript refactoring
GLOSSARY.md Technical terminology index linked to owners
REFERENCES.md Bibliography of cited papers, specifications, and tools
WORK.md Open work ledger and dated status table; drafts/ holds design drafts
STYLE.md Visual style for commit-record pages and deep-dive decks
tests/README.md Pipeline cases, controls, and suite layout

Implementation map

lean/Verification/ is organized into four top-level areas:

Area Entry points
Operational semantics & TCB (Semantics/{Calculus,Worlds,Safety,Footprints,Exits,Facts,Framing,Reach}/) Calculus.lean, Worlds.lean, Heaps.lean, Safety.lean, CallEffects.lean
Types & recursive equations (Types/) Types.lean, PositiveNormalization.lean, PositiveGraphs.lean, PositiveRules.lean
Control-flow machine & single pass (Programs/) ControlFlow.lean, ProgramTyping.lean, SinglePass.lean, TolerantFramesSinglePassSound.lean
Source boundary, lowering, claims & CLI (Source/{Lowering,Equations,Claims}/) Fragment.lean, Synthesis.lean, Lowering.lean, Equations/Lowering.lean, FragmentFront.lean, PassUnitRun.lean, RequestCli.lean
Front end, runner & tests tools/, pipeline/, dev/, tests/README.md

lean/lakefile.toml defines the Verification library and verifier executable; tools/package.json and its lockfile pin Node dependencies (TypeScript compiler API and KaTeX).