Changelog

How Lion got here

Every release since Apr 6, 2026, with each change it shipped and each decision it made, in the words of the commits and notes that say so. Lion writes this page itself from a model of its own development kept beside its code: 5166 claims, each a source's words and what they say, in history/notes. Which release shipped what is worked out from git, not written down.

Releases
30
Changes
2190
Decisions
257
Claims
5166

  1. Nextunreleased

    Unreleased

    On main, waiting for the next release.

    • 2 Added
    • 1 Documentation
    • 2 Decided
    5 changes

    Added 2

    Documentation 1

    Decided 2

  2. @lionlang/core 0.25.0 @lionlang/cli 0.24.0 @lionlang/ui 0.2.0

    Ships @lionlang/core 0.25.0, @lionlang/cli 0.24.0, and @lionlang/ui 0.2.0: adds universally quantified forall E-matching (forall-inst certificates) to proof/smt, CTI-guided PDR-lite invariant strengthening (strengthen: true) to proof/invariant, and kernel-verified linear & mixed-integer symbolic optimization (proof/optimize) with __bound__ Farkas/Chvátal-Gomory/split tamper-binding verified by proof/valid?; lowers @lionlang/core complexity ceiling from 17 to 14 (182 stdlib functions, 0 unread message rules); expands @lionlang/ui to 36 pure JSON primitives with non-overlapping dynamic ui/graph layout, editorial instrument design system (Obsidian Dark & Editorial Paper), standalone single-file public HTML export (buildPublicArtifactHtml, mountLionArtifact, and lion artifact), and an upgraded ui/proof inspector rendering live SMT counterexample models, optimization witnesses, liveness lassos, and expandable DPLL(T)/PDR theory lemma cards; and publishes 14 live interactive public HTML artifacts (including 6 flagship Lion-only business-value proof apps) plus the gallery-first Studio on lionlang.dev.

    • 2 Changed
    • 1 Fixed
    • 4 Documentation
    • 1 Decided
    8 changes

    Changed 2

    • Added kernel-verified linear and mixed-integer symbolic optimization (proof/optimize) to @lionlang/core with Farkas, Chvatal-Gomory, and Omega split bound binding (__bound__) so proof/valid? rejects any tampered optimal, direction, or inclusive field and verifies bound claims.
      Changed proof-optimize is duality-certified-symbolic-and-milp-optimization-with-tamper-bound-verification logicproof-optimize-ui-proof-inspector-and-flagship-apps.json
    • Upgraded ui/proof in @lionlang/ui to display live SMT/SAT counterexample models, proof/optimize optimal values and witness strips, proof/liveness and proof/refines state counts and lasso counterexamples, and collapsible DPLL(T)/PDR theory lemma cards (forall-inst, array-axiom, congruence, linear, rup, sos).
      Changed ui-proof-inspector is live-models-optima-witnesses-lassos-and-expandable-dpll-t-lemmas packagesproof-optimize-ui-proof-inspector-and-flagship-apps.json

    Fixed 1

    • Fixed ui/graph SVG layout to dynamically size node bounding boxes and viewBox dimensions, clip arrows to node perimeters with tone-colored arrowheads, draw pill-backed edge labels, and arch skip-layer/counterfactual edges cleanly above intermediate layers — backed by a property test proving zero node overlap for arbitrary layered and radial graphs.
      Fixed ui-graph-non-overlapping-layout is never-overlaps-nodes-or-clips-arrows siteui-graph-non-overlapping-layout.json

    Documentation 4

    • Expanded the public Lion UI showcase to all 8 Omnigraph/Graph-as-Code blueprints (adding Company Brain, Engineering Dev Graph, Hardware Program, Research Evidence Graph, and Beads-style Agent Work Queue alongside Agent Knowledge Graph, Verified Escrow, and Governed Ontology), added ui/section visual chapters, ego-network highlighting in ui/graph, clickable linked rows in ui/table, metric captions, progress bar styling, and a gallery-first Playground Studio with a collapsible Lion JSON code drawer.
      Documentation public-lion-ui-artifact-gallery is eight-linked-blueprints-with-visual-hierarchy siteeight-omnigraph-artifacts-and-visual-hierarchy.json
    • Redesigned @lionlang/ui, all 8 standalone public HTML artifacts, and the Artifact Gallery Studio with editorial Instrument Serif + Inter + JetBrains Mono typography, obsidian-dark and warm editorial-paper themes, open-air heroes, hairline-accented sculptural metrics, dot-grid SVG drafting canvases with status dots and animated warning arcs, pill-segmented tabs, and glassmorphic Lion [ ] Studio chrome.
      Documentation editorial-craft-ui-design-system is distinctive-editorial-obsidian-and-paper-themes siteeditorial-craft-ui-design-system.json
    • Added 4 flagship Lion-only business-value proof applications to packages/examples/, docs/artifacts/, and the top of docs/playground.html: Autonomous Promo & Margin Guardrail Prover (unbounded SMT over stackable pricing rules), Zero-Trust IAM & Single-Point-of-Failure Auditor (graph/dominators + transitive IAM why() + CDCL SAT RUP seal), Treasury & Double-Entry Conservation Verifier (exact rationals, unbounded proof/invariant, QF_AUFLIA array frame isolation, and live proof/bmc fault injection), and Multi-Jurisdiction Compliance & Policy Deadlock Prover (GDPR/HIPAA/AI Act Datalog + SAT Catch-22 deadlock prover).
      Documentation lion-only-business-value-proof-apps is four-flagship-formal-proof-and-datalog-artifacts sitelion-only-business-value-proof-apps.json
    • Added Consensus Liveness & WAL Refinement Verifier (proof/liveness + proof/refines), SLA-Verified Cloud Cost Optimizer (proof/optimize MILP), wired live proof/optimize optimal discount cap into Promo & Margin Guardrail, and showcased all 6 flagship Lion-only proof apps and the Studio on docs/index.html.
      Documentation six-flagship-lion-only-proof-apps-and-homepage-studio is six-interactive-formal-proof-apps-wired-into-index-and-playground siteproof-optimize-ui-proof-inspector-and-flagship-apps.json

    Decided 1

    • Implemented five coordinated upgrades: (1) added trigger-guided forall E-matching with kernel-verified forall-inst certificates in packages/core/src/logic/smt.ts and proof.ts, plus CTI-guided PDR-lite automatic invariant strengthening (strengthen: true) in packages/core/src/logic/bmc.ts; (2) refactored all 31 functions over complexity 14 across @lionlang/core and tightened complexity_ceiling in policy/repo-invariants.json from 17 to 14; (3) expanded @lionlang/ui from 25 to 35 elements (adding accordion, checkbox, graph, hero, kv, link, list, split, tabs, textarea) with record-row table unpacking and XSS-safe rendering, plus pure buildPublicArtifactHtml (@lionlang/ui/artifact) and mountLionArtifact (@lionlang/ui/browser-runtime); (4) added the lion artifact CLI subcommand to package any Lion JSON program into an offline single-file public HTML artifact; and (5) shipped three flagship Omnigraph/Graph-as-Code examples in packages/examples/, pre-built public artifacts in docs/artifacts/*.html, an interactive Lion Playground & Artifact Studio in docs/playground.html, and updated runnable docs guides.
      Decided smt-forall-pdr-complexity-14-and-public-ui-artifacts: forall-ematching-pdr-strengthening-ceiling-14-and-standalone-lion-ui-artifacts over separate-ui-dsl-and-manual-invariant-strengthening, because unified JSON-Lisp Graph-as-Code artifacts, kernel-checked quantified SMT and PDR strengthening, and a stricter core complexity ceiling of 14 keep Lion simpler, stronger, and directly shareable on the web logicRecord SMT forall E-matching, CTI-guided PDR-lite invariant strengthening, complexity ceiling 14, and standalone public Lion UI artifactssmt-forall-pdr-complexity-14-and-public-ui-artifacts.json
  3. @lionlang/core 0.24.0 @lionlang/cli 0.23.0

    Lion reaches 79/79 passing capability tasks across six suites (public 61/61, openrulebench 4/4, sv-comp 3/3, tla-plus 4/4, new smt-comp 4/4, and new ontology 3/3), 181 standard library functions, 390/390 message-rule coverage (0 unread, 0 to unify), hardest function complexity 17 (statically enforced by Lion repo policy), and 0 strict tsc --noEmit errors across @lionlang/core 0.24.0 and @lionlang/cli 0.23.0. Core ships native lazy DPLL(T) SMT (proof/smt, @lionlang/core/logic/smt) combining 1-UIP CDCL SAT, exact LIA/LRA, multivariate polynomial cancellation and sum-of-squares (sos), EUF congruence closure with bidirectional Nelson-Oppen equality sharing, and McCarthy's Theory of Arrays & Records (select/store, object/get/object/set) with kernel-checked array-axiom certificates; automated k-induction in proof/invariant with kernel-checked k-induction certificates; unified declarative Lion Datalog join-fanout lint with zero false positives on exists-quantified calls and quoted terms; and canonical exported FORM_OPTION_NAMES in @lionlang/core/logic/query-options. @lionlang/cli 0.23.0 and the monorepo add the interactive Proof & SMT Inspector in @lionlang/repl (rendering dpll-t learned lemmas, proof/valid? kernel badges, and step-by-step proof/bmc counterexample traces), persistent on-disk LsmSpine reach-map queries (out/reach/spine/, hydratedSpines === 0), live workspace MCP brain (bun run mcp:repo + .mcp.json), and strict pre-commit/commit-msg/CI enforcement of typecheck, declarative Lion repo policy (policy/repo-invariants.json including core-complexity-ceiling <= 17 and unread-message-rule), dynamic CLI/MCP/HTTP route coverage, per-release runnable website examples, and feat: runnable-example gates.

    • 3 Decided
    3 changes

    Decided 3

    • Implemented all six dogfooding tracks in sequence: (1) added declarative repository policy invariants in policy/repo-invariants.json evaluated via bun run policy (and wired into CI) with kernel-checked why proofs and assuming counterfactual diffs; (2) annotated message-rules.json, research/steps/00-core.json, and history/research/steps/01-frame.src.json with governed ontology metadata and built bun run mcp:repo with a session completion invariant and Apache Ossie YAML export; (3) added executable Lion proofs of Quorum WAL Election Safety, WF election liveness, buffered log refinement, OCC commitWithRetry monotonicity and stale-write BMC detection, LsmSpine Z-set weight conservation, and Z-set rewrite/3-node quorum RUP SAT in packages/core/src/logic/tests/protocol-verification.test.ts; (4) replaced the imperative TypeScript join-fanout detector in packages/core/src/analysis/lint.ts with declarative Lion Datalog rules inside LINT_RULES; (5) built out-of-core LsmSpine reach-map pushdown (hydratedSpines === 0) and declarative Lion loop diff in packages/metrics; and (6) upgraded packages/agent with JournaledDatabase memory, assuming counterfactual preview, and static lion check with RFC 6902 auto-fix.
      Decided lion-dogfooding-policy-mcp-protocols-lint-spine-agent: declarative-lion-rules-for-policy-lint-protocols-mcp-and-agent-memory over imperative-typescript-policy-and-join-fanout-scripts, because dogfooding Lion across its own architecture gates, lints, protocol proofs, workspace MCP brain, out-of-core spines, and agent runtime reduces core complexity while giving verifiable provenance everywhere processRecord Dogfooding Lion across repo policy, workspace MCP brain, core protocol proofs, declarative join-fanout lint, LsmSpine reach-map, and agent memorylion-dogfooding-policy-mcp-protocols-lint-spine-agent.json
    • Fixed all four in sequence: (1) added @lionlang/core workspace dependency to @lionlang/metrics, migrated metrics imports and scaling.ts to pass 14/14 turbo typecheck tasks, and added bun run typecheck, bun run policy, and bun run --cwd packages/site-runtime docs --check to .husky/pre-commit and CI; (2) authored runnable website guides (verify-protocols.html, govern-ontologies.html, releases.html), documented missing CLI commands and MCP tools (diff, schema, ossie, lion_schema, lion_search, lion_answerable) in cli.html, and statically enforced special forms, stdlib functions, relation options, CLI subcommands, MCP tools, and every shipped release version in both build-docs.ts and policy/repo-invariants.json; (3) persisted the LsmSpine reach index to out/reach/spine/ via FsObjectStore + saveSpineToObjectStore/loadSpineFromObjectStore (cold-loading with hydratedSpines === 0) and added .mcp.json pointing to bun run mcp:repo; and (4) implemented packages/core/src/logic/smt.ts (proof/smt) combining 1-UIP CDCL SAT, exact LIA/LRA arithmetic, multivariate polynomial cancellation and sum-of-squares (sos) certificates, and EUF congruence closure with Nelson-Oppen equality sharing, wired dpll-t and sos into proof/valid?, and connected DPLL(T) fallback into proof/invariant and proof/bmc.
      Decided dpllt-smt-strict-typecheck-docs-gates-disk-spine: native-dpllt-smt-precommit-typecheck-and-static-docs-coverage-gates over ci-only-typecheck-and-unverified-docs-coverage, because native DPLL(T) with kernel-verified certificates closes the theory-combination and nonlinear invariant frontier while pre-commit typecheck, policy, and runnable docs gates make broken types or undocumented features impossible to commit logicRecord Native DPLL(T) SMT solver, nonlinear inductive invariants, pre-commit typecheck/docs gates, and persistent on-disk LsmSpine reach mapdpllt-smt-strict-typecheck-docs-gates-disk-spine.json
    • Implemented all five cleanly and cut @lionlang/core@0.24.0 and @lionlang/cli@0.23.0: (1) unified quoted_term and exists-binder rules in packages/core/src/analysis/lint.ts, eliminating false positives across all 1,182 repo programs; (2) added McCarthy Read-over-Write array/record axioms with kernel-checked array-axiom certificates, distinct literal collision refutation, and bidirectional Nelson-Oppen (LIA <-> EUF) in packages/core/src/logic/smt.ts, plus incremental k-induction with kernel-checked k-induction certificates in packages/core/src/logic/bmc.ts and proof.ts; (3) added packages/metrics/suites/smt-comp (4 tasks) and packages/metrics/suites/ontology (3 tasks), bringing capability corpus coverage to 79/79; (4) built the interactive Proof & SMT Inspector (packages/repl/src/editor/proof-inspector.tsx) with independent verifyProof badges, DPLL(T) lemma cards, step-by-step counterexample trace navigation, and one-click proof presets; and (5) added core-complexity-ceiling (<= 17) and unread-message-rule invariants to policy/repo-invariants.json and packages/metrics/src/policy.ts.
      Decided smt-arrays-kinduction-proof-inspector-policy-ceiling: kernel-checked-arrays-kinduction-proof-inspector-and-complexity-policy-gate over manual-array-encoding-and-unverified-complexity-drift, because native array/record axioms, k-induction, visual proof inspection, and declarative complexity/message-rule gates make formal verification practical end-to-end while keeping Lion's kernel small and self-enforcing logicRecord Theory of Arrays & Records in DPLL(T), automated k-induction, SMT-COMP/ontology suites, REPL Proof Inspector, and complexity/message-rule policy gatessmt-arrays-kinduction-proof-inspector-policy-ceiling.json
  4. @lionlang/core 0.23.0 @lionlang/cli 0.22.0

    Lion expands to 72/72 passing capability tasks, 180 standard library functions, 389/389 message-rule coverage (0 unread, 0 to unify), and 0 strict tsc --noEmit errors across @lionlang/core 0.23.0 and @lionlang/cli 0.22.0. Core ships major verification, storage, and semantic-ontology milestones: Lean 4-style EUF congruence closure (@lionlang/core/logic/euf), proof/prove { using } lemma chaining, and strong remainder + 2-arg lexicographic induction; TLA+-style temporal liveness (proof/liveness under WF/SF), stuttering-invariant refinement (proof/refines), and symmetry reduction; TLAPS-style symbolic inductive invariant verification (proof/invariant), Apalache-style symbolic bounded model checking (proof/bmc), directed term rewriting (proof/simp), and 1-UIP CDCL SAT solving with kernel-checked RUP UNSAT certificates (proof/sat); crash-durable Quorum WAL persistence + Prolly-backed InstallSnapshot; out-of-core RelationSpine iterative semi-join pushdown (@lionlang/core/logic/spine-pushdown); deterministic aggregate join-fanout lint (findJoinFanouts); and governed relation ontology metadata (description, synonyms, certified, references) with zero-I/O FK discovery, join-path BFS, semantic search, answerability grading, and empty-result filter probing (@lionlang/core/logic/ontology). @lionlang/cli 0.22.0 exposes live join-fanout lints in lion check/lion_check, automatic empty-result diagnostics in lion_eval/POST /v1/eval, MCP tools lion_search and lion_answerable, HTTP /v1/ontology/* and /v1/quorum/{snapshot,compact}, Apache Ossie 3-file YAML bundle export/import (lion ossie export|import), typed LionClient ontology & Ossie SDK methods, and the interactive Ontology & Guardrails tab in the bundled @lionlang/repl Fold Map graph editor.

    • 6 Decided
    6 changes

    Decided 6

    • Added a proof-producing E-graph and trusted kernel checker (@lionlang/core/logic/euf — EGraph, CongruenceCertificate, checkCongruenceCertificate) and integrated uninterpreted function variables (?f in call-head position inside closed solver steps) via Nelson-Oppen Ackermann congruence closure across query, proof/prove, why, invariant, and assuming.
      Decided euf-congruence-closure-and-lemma-chaining: ackermann-nelson-oppen-plus-weakmap-lemma-chaining over separate-euf-solver, unverified-json-lemma-trust, because combining Ackermann congruence with the existing linear solver achieves complete QF_EUF+LIA+LRA with zero new Sym kinds, and WeakMap-backed verified lemma chaining prevents forged premises in proof/prove logicRecord EUF congruence closure, compositional lemma chaining, and strong remainder inductionlean4-euf-lemmas-strong-induction.json
    • Liveness reuses Lion's iterative Tarjan SCC (stronglyConnected in strata.ts) with Emerson-Lei fair-cycle elimination under TLA+ stuttering semantics (⟨A⟩_vars requires a state change), emitting either a kernel-verifiable liveness certificate (re-checked independently by proof/valid?) or an exact lasso counterexample (prefix, cycle).
      Decided tla-liveness-fairness-and-refinement: emerson-lei-scc-fair-cycles-with-kernel-certificates over bounded-k-step-liveness-unrolling, unchecked-liveness-booleans, because reusing iterative Tarjan SCC with Emerson-Lei WF/SF elimination is exact for infinite-trace liveness under stuttering and produces self-contained certificates re-verified by proof/valid? logicRecord TLA+ temporal liveness under weak/strong fairness, stuttering-invariant refinement, and symmetry reductiontla-liveness-fairness-refinement.json
    • Added a zero-I/O QuorumStateStore interface (MemoryQuorumStateStore and ObjectStoreQuorumStateStore backed by ObjectStore) and QuorumNode.open() to persist and recover Raft term, votedFor, log entries, commitIndex, and Prolly snapshot pointers on every consensus state transition (including durable handleRequestVoteDurable).
      Decided quorum-durability-and-prolly-install-snapshot: object-store-quorum-state-and-prolly-install-snapshot over ephemeral-in-memory-quorum-metadata, custom-snapshot-wire-format, because persisting term, votedFor, log, and Prolly snapshot pointers through ObjectStore keeps @lionlang/core zero-I/O while guaranteeing Raft election safety across restarts and unified Prolly InstallSnapshot catch-up logicRecord Crash-durable Quorum WAL persistence and Prolly InstallSnapshot catch-upquorum-durability-and-prolly-snapshot.json
    • The hardest function complexity across the entire @lionlang/core codebase dropped from 23 to 17, nesting-weighted decisions dropped by 13, core messages dropped by 5 with 100% message-rule coverage (0 unread, 0 to unify), and all 1,654 research model claims verify with verbatim quotes against the updated Lean 4 and TLA+ probe runs.
      Decided hotspot-simplification-and-message-rule-coverage: simplify-top-hotspots-and-zero-unread-messages over deferring-message-rules-and-complexity-cleanup, because keeping the hardest function at or below 17 and unread/ununified message rules at 0 keeps core maintainable and every error message tied to a single documented rule logicRecord Core hotspot simplification, 100% message-rule coverage, and Lean 4 / TLA+ research probe refreshcore-simplification-messages-and-probes.json
    • Implemented all four tracks across @lionlang/core and @lionlang/cli: (A) deterministic aggregate join-fanout lint (findJoinFanouts) in @lionlang/core/analysis/lint combining declared keys and live database uniqueness profiling, wired into lion check and lion_check; (B) automatic empty-result single-filter probing (probeEmptyQuery) in @lionlang/core/logic/ontology surfacing case mismatches, type mismatches, numeric bounds, sample values, and conjunction-only emptiness, wired into lion_eval / POST /v1/eval; (C) governed relation ontology metadata (description, synonyms, certified, references) persisted losslessly across snapshots and Prolly trees, plus zero-I/O profileRelationUniqueness, discoverForeignKeys (with dense 0..16 domain guard), findJoinPath, searchOntology, and checkAnswerable, exposed via MCP tools lion_search and lion_answerable and HTTP /v1/ontology/*; (D) zero-dependency Apache Ossie 3-file YAML bundle export/import (packages/cli/src/ossie.ts) wired into lion ossie export|import and /v1/ontology/ossie*.
      Decided auto-ontology-guardrails-and-semantic-layer: first-class-relation-ontology-guardrails-and-ossie-interchange over external-sidecar-catalog-only, because attaching optional metadata directly to relation declarations keeps snapshots, Prolly trees, static fanout lint, empty-result probing, FK discovery, and Ossie YAML export unified in one language model logicRecord Auto-Ontology guardrails, semantic ontology layer, empty-result probing, and Apache Ossie interchangeauto-ontology-guardrails-and-semantic-layer.json
    • Implemented all four tracks in sequence: (1) added typed searchOntology, checkAnswerable, discoverForeignKeys, findJoinPath, exportOssie, importOssie, quorumCompact, and eval diagnostics to LionClient and fixed all tsc --noEmit errors across core, cli, and repl; (2) built the Ontology & Guardrails tab (packages/repl/src/editor/ontology-tab.tsx) and inline empty-result/fanout diagnostic cards in LiveServerPanel; (3) added proof/invariant and proof/bmc (packages/core/src/logic/bmc.ts), proof/simp (packages/core/src/logic/simp.ts), and proof/sat with 1-UIP CDCL and RUP certificates (packages/core/src/logic/sat.ts), all independently verified by proof/valid?; and (4) replaced single-atom ground lookup in database.ts with full iterative semi-join pushdown (packages/core/src/logic/spine-pushdown.ts) over LsmSpine.
      Decided symbolic-verification-frontiers-and-spine-pushdown: native-kernel-certified-invariant-bmc-simp-sat-and-spine-semijoin-pushdown over external-smt-binaries-and-full-spine-hydration, because native kernel-checked certificates for symbolic invariants, BMC, rewriting, and RUP SAT plus iterative semi-join pushdown preserve Lion's zero-I/O in-memory contract while closing the remaining research frontiers logicRecord LionClient ontology SDK, REPL Ontology & Guardrails UI, symbolic BMC/invariant/simp/SAT provers, and RelationSpine semi-join pushdownsdk-repl-ontology-symbolic-bmc-simp-sat-spine-pushdown.json
  5. @lionlang/core 0.22.0 @lionlang/cli 0.21.0

    Lion expands to 71/71 passing capability tasks (61/61 public, 4/4 OpenRuleBench, 3/3 SV-COMP, and a new 3/3 TLA+ suite) across @lionlang/core 0.22.0 and @lionlang/cli 0.21.0. Core ships four language and engine milestones plus consensus and constrained decoding: lambda return contracts with symmetric caller/callee blame, solver-certified user-defined ACI merge lambdas unlocking CALM confluence and monotone recursion for custom CRDTs, TLA+-style two-state action invariants via ["was", goal] in invariant and assuming, Worst-Case Optimal Generic Join intersection (2.78x on 100k sparse-closing bow-tie joins), Draft 2020-12 constrained-decoding Lion program JSON Schemas (lionProgramJsonSchema), and in-memory Raft-style Quorum WAL consensus (@lionlang/core/logic/quorum). @lionlang/cli 0.21.0 exposes lion schema, GET /v1/schema, and the lion_schema MCP tool, adds HTTP Quorum WAL RPCs (/v1/quorum/*, --quorum-node, --quorum-peer) and read-only O(diff) Prolly Merkle diff (POST /v1/prolly/diff) to lion serve and LionClient, and ships the interactive Sync & Diff tab and Draft 2020-12 JSON Schema inspector in the bundled @lionlang/repl Fold Map graph editor.

    • 6 Decided
    6 changes

    Decided 6

  6. @lionlang/core 0.21.0 @lionlang/cli 0.20.0

    Lion reaches 57/57 (100%) on the public capability corpus (plus 4/4 OpenRuleBench and 3/3 SV-COMP) across @lionlang/core 0.21.0 and @lionlang/cli 0.20.0. Core adds three-valued Well-Founded Semantics (Van Gelder's alternating fixpoint) for pure recursive not in plain Datalog strata—integrating cleanly with downstream rules, find, why undecided explanations, incremental maintain/assuming, and CALM analysis—and extends structural induction over unbounded schema/arrayOf lists with list-returning helpers, two-lookahead list constructors, snoc-fold induction for array/reduce (proving insertion sort sorted for every length), and bounded list counterexample search, alongside a core hotspot complexity reduction pass and bun run scaling benchmarks. @lionlang/cli 0.20.0 adds CORS and unauthenticated OPTIONS preflight support to lion serve, fixes browser window.fetch binding in @lionlang/cli/client (LionClient), fixes post-commit revision reporting in SSE /v1/watch delta frames, and ships the Live Lion Server drawer in the bundled Fold Map Graph Editor (@lionlang/repl) with live commits, reactive SSE watches, copy-on-write branching, CALM/Prolly Merkle inspection, and server-aware static scope.

    • 4 Changed
    • 1 Fixed
    • 2 Decided
    • 2 Rules
    9 changes

    Changed 4

    Fixed 1

    • SSE watch delta frames from lion serve now report the post-commit revision (target.revision + 1 on writers), the Fold Map Graph Editor injects connected server relations and schemas into its static analyzer so incremental commits show zero false unbound-name warnings, and @lionlang/cli typechecks cleanly under Effect v4 with zero errors.
      Fixed live-server-scope-and-sse-revision is fixed editorcli-repl-polish.json

    Decided 2

    • Pure negative goals (["not", goal] whose recursive mentions appear strictly positively) are allowed through recursion in plain Datalog strata and evaluate under three-valued Well-Founded Semantics (Van Gelder, Ross, and Schlipf's alternating fixpoint)
      Decided negation-through-recursion: well-founded-semantics over stratified-only, unrestricted-questions, because pure recursive negation has a unique three-valued well-founded model via alternating fixpoint while keeping other questions stratified logicRecord Pure recursive negation uses well-founded semantics, and list folds induct by snocwell-founded-and-fold-induction.json
    • Add permissive CORS headers and unauthenticated OPTIONS 204 preflight handling to packages/cli/src/server.ts across JSON, SSE, and MCP routes, fix LionClient to wrap globalThis.fetch and invoke fetchFn unbound so browser window.fetch works natively, and add a collapsible Live Lion Server drawer (useLiveServer + LiveServerPanel) to the Fold Map Graph Editor header and command palette
      Decided repl-live-server-transport: cors-direct-client over nitro-proxy, cli-workspace-dep, because CORS headers on lion serve plus reusing LionClient source directly connect browser tools with zero proxy glue and no circular workspace dependency editorRecord Fold Map Graph Editor connects to live lion serve over CORS-enabled HTTP and SSErepl-live-server.json

    Rules 2

  7. @lionlang/core 0.20.0 @lionlang/cli 0.19.0

    Lion ships the complete distributed scaling architecture across @lionlang/core 0.20.0 and @lionlang/cli 0.19.0. Core adds history-independent SHA-256 Prolly trees (@lionlang/core/logic/prolly) with localized prefix reuse, bounded LRU CachedBlockStore, O(log N + K) scanProllyRange, crash-atomic O(diff) syncProllyTrees, and incremental Prolly checkpoints (snapshotDatabaseToProlly / loadDatabaseFromProlly); a SlateDB-inspired ObjectStoreJournalStore (@lionlang/core/logic/object-store) with numbered CAS manifests, writerEpoch zombie-writer fencing, snapshot pinning, global mark-and-sweep GC (sweepUnreferencedBlocks), zero-copy prefix cloning, ObjectStoreBlockStore, and DurableObjectObjectStore; batched WAL group commit (commitBatch), 21.6x faster multi-form begin commits, 13.5x faster CoW fork(), and SWMR ReadReplica; static CALM monotonicity analysis and coordination-free lattice delta sync (@lionlang/core/logic/calm); and out-of-core paged LSM Z-set relation spines (@lionlang/core/logic/spine) integrated transparently into Datalog (spillRelation, persistent manifests, direct indexed query/find lookups without full hydration). @lionlang/cli adds zero-dependency FsObjectStore, S3ObjectStore (Web Crypto SigV4 + If-None-Match CAS), and SqliteObjectStore (bun:sqlite / node:sqlite), durable --store / --replica / --multi-tenant actor hibernation (TenantHost), WAL group commit (--group-commit-ms), auto-compaction (--compact-every), --spill-threshold, background Prolly anti-entropy gossip (--peer), bearer-token auth (--auth-token), and the typed HTTP+SSE @lionlang/cli/client SDK (LionClient).

    • 16 Added
    16 changes

    Added 16

    • Adds static CALM monotonicity analysis (analyzeCalm) and coordination-free lattice delta synchronization (extractMonotonicDelta, mergeMonotonicDelta) in @lionlang/core/logic/calm, partitioning relations into confluent monotonic/lattice strata vs. non-monotonic points of order (not, unmerged keyed upserts, non-lattice aggregates, assuming, opaque host calls, and invariants).
      Added calm-monotonicity-analysis-and-lattice-sync capabilityscaling-foundation.json
    • Eliminates upfront full-snapshot serialization on multi-form begin commits and JournaledDatabase.fork() by rolling back from the journal only on partial-mutation failure and using copy-on-write ForkedJournalStore overlays with direct in-memory cloning (~36x faster multi-form begin commits and ~9.5x faster fork() at 20,000 facts).
      Added fast-journal-rollback-and-cow-fork capabilityscaling-foundation.json
    • Adds SlateDB-inspired object-store journaling (@lionlang/core/logic/object-store) with a pluggable ObjectStore/MemoryObjectStore contract, numbered CAS manifests, writerEpoch zombie-writer fencing, reader snapshot pinning (pinSnapshot/unpinSnapshot) with safe garbage collection (gc), and zero-copy prefix clones (cloneToPrefix), alongside single-writer multi-reader ReadReplica (openReadReplica in @lionlang/core/logic/journal) with incremental WAL tailing.
      Added object-store-journal-fencing-and-swmr-replicas capabilityscaling-foundation.json
    • Adds content-addressed Probabilistic B-Trees (@lionlang/core/logic/prolly) with history-independent key-defined chunking, pluggable BlockStore/MemoryBlockStore, incremental copy-on-write mutations (applyProllyMutations), O(diff) Merkle subtree-skipping diffs (diffProllyTrees), and order-independent database Merkle snapshots (snapshotDatabaseToProlly) integrable with createProofEnvelope({ modelHash }).
      Added prolly-tree-snapshots-and-merkle-diffs capabilityscaling-foundation.json
    • Wires durable --store, SWMR read-only --replica (with optional --sync-ms background WAL tailing), CALM inspection (GET /v1/calm, lion_calm), peer-to-peer monotonic delta sync (GET/POST /v1/delta, lion_sync), Prolly Merkle root inspection (GET /v1/merkle), compaction & GC (POST /v1/compact, lion_compact), and zero-copy prefix cloning (POST /v1/clone) into lion serve and lion mcp.
      Added durable-store-swmr-replica-and-calm-sync-server capabilitystorage-adapters-and-replica-server.json
    • Adds concrete zero-dependency ObjectStore adapters in @lionlang/cli: FsObjectStore (local directory with atomic temp-rename puts and POSIX wx create-exclusive CAS) and S3ObjectStore (Web Crypto AWS SigV4 + If-None-Match: * CAS for S3, R2, MinIO, Tigris, and GCS), plus openStoreFromSpec for file://, local paths, and s3://bucket/prefix.
      Added fs-and-s3-object-store-adapters capabilitystorage-adapters-and-replica-server.json
    • Upgrades applyProllyMutations in @lionlang/core/logic/prolly with localized untouched-prefix leaf pointer reuse (preserving bit-for-bit history independence) and caches merkleRoot() per database revision on JournaledDatabase and ReadReplica for O(1) repeated ProofEnvelope hashing.
      Added incremental-prolly-splice-and-cached-merkle-root capabilitystorage-adapters-and-replica-server.json
    • Adds an out-of-core paged LSM Z-set relation spine (LsmSpine, spillDatabaseRelation, hydrateRelationSlice) in @lionlang/core/logic/spine backed by immutable Prolly SST runs, a bounded LRU block cache, lazy paged secondary column indexes, and tiered weight compaction.
      Added out-of-core-paged-lsm-relation-spine capabilityprolly-sync-multitenant-and-lsm-spine.json
    • Adds O(diff) Prolly Merkle range-sync (syncProllyTrees, extractProllyDeltaFacts, scanProllyRange, and bounded LRU CachedBlockStore) to @lionlang/core/logic/prolly, plus ObjectStoreBlockStore and DurableObjectObjectStore in @lionlang/core/logic/object-store.
      Added prolly-merkle-range-sync-and-durable-object-store capabilityprolly-sync-multitenant-and-lsm-spine.json
    • Adds zero-dependency SqlObjectStore / SqliteObjectStore (sqlite:// via bun:sqlite or node:sqlite), multi-tenant actor hibernation (TenantHost, lion serve --multi-tenant, /v1/tenants/:id/...), and HTTP/MCP Prolly range-sync (POST /v1/prolly/blocks, POST /v1/sync/prolly, lion_sync action='prolly') to @lionlang/cli.
      Added sqlite-store-multitenant-hibernation-and-prolly-sync-server capabilityprolly-sync-multitenant-and-lsm-spine.json
    • Adds incremental content-addressed Prolly checkpoints (loadDatabaseFromProlly, ObjectStoreJournalStore.blockStore) and batched WAL group commit (commitBatch, appendBatch, --group-commit-ms, --compact-every) so compaction uploads only changed Prolly blocks and concurrent commits coalesce into a single object-store PUT.
      Added incremental-prolly-checkpoints-and-wal-group-commit capabilityprolly-checkpoints-group-commit-spines-gossip.json
    • Adds bearer-token authentication (--auth-token / LION_AUTH_TOKEN), background Prolly anti-entropy gossip (--peer, --peer-sync-ms), updated CLI and TypeScript API docs (docs/docs.html, README.md), and a runnable Cloudflare Workers Durable Object example host (packages/examples/cloudflare-do.ts).
      Added peer-gossip-auth-docs-and-cloudflare-do-example capabilityprolly-checkpoints-group-commit-spines-gossip.json
    • Integrates LsmSpine transparently into LogicDatabase (spillRelation, evictSpilledRelations, ensureSpinesHydrated): direct indexed queries read O(log N + K) spine blocks without full hydration, rules and queries hydrate on demand, mutations mirror into attached spines after invariants pass, and Prolly snapshots match in-memory databases.
      Added transparent-paged-relations-in-datalog capabilityprolly-checkpoints-group-commit-spines-gossip.json
    • Adds crash-atomic bottom-up internal block commits in syncProllyTrees, persistent LsmSpine manifests (saveManifest, loadManifest, saveSpineToObjectStore, loadSpineFromObjectStore), multi-atom and find demand-slice queries without full hydration, and --spill-threshold auto-spilling in lion serve.
      Added persistent-spines-and-crash-atomic-prolly-sync capabilityprolly-gc-persistent-spines-client-chaos.json
    • Adds reachability mark-and-sweep GC for obsolete checkpoints and unreachable content-addressed Prolly blocks/ (collectProllyBlockHashes, sweepUnreferencedBlocks, ObjectStoreJournalStore.gc()) respecting pinned snapshots, zero-copy clones, and persisted spines.
      Added prolly-block-mark-and-sweep-gc capabilityprolly-gc-persistent-spines-client-chaos.json
    • Exports a zero-dependency typed HTTP + SSE client SDK (@lionlang/cli/client, LionClient) with lossless wire encoding, automatic commitWithRetry OCC retries, .tenant(id) scoping, streaming SSE watch(), and fault-injection chaos property tests covering split-brain races, mid-commit crashes, and 3-node partition-heal convergence.
      Added typed-lion-client-sdk-and-chaos-tests capabilityprolly-gc-persistent-spines-client-chaos.json
  8. @lionlang/core 0.19.0 @lionlang/cli 0.18.0 @lionlang/ui 0.1.0

    Lion ships the production agent-platform runtime across @lionlang/core 0.19.0, @lionlang/cli 0.18.0, and the inaugural @lionlang/ui 0.1.0 release. Core adds sandboxed execution (safeStdlib, ExecutionMeter, ExecutionLimits, DatabasePermissions, runWithMetrics, uncatchable ResourceLimitError/PermissionError), lossless rational wire encoding (encodeWire/decodeWire), a WAL-backed JournaledDatabase with compaction, point-in-time checkout(), optimistic concurrency (ConflictError), and fork()/merge(), Draft 2020-12 JSON Schema export (schemaToJsonSchema), RFC 6902 lint autofixes (autofixChecks, applyJsonPatch), cryptographic Ed25519 + SHA-256 ProofEnvelope signing and trusted-kernel verification (createProofEnvelope/verifyProofEnvelope), query planner/profiler helpers (explainPlan, profileRun), and pure synchronous string/sha256, string/base64-encode, and string/base64-decode. @lionlang/cli adds native lion mcp (JSON-RPC 2.0 MCP server) and lion serve (HTTP+SSE server with reactive /v1/watch). @lionlang/ui ships declarative JSON UI bindings (ui/card, ui/slider, ui/why, ui/proof, plus deliverable primitives ui/chart, ui/timeline, ui/diff, and ui/source), stateful/streaming createUiSession(), and a zero-dependency DOM renderer.

    • 10 Added
    10 changes

    Added 10

    • Redesigns lionlang.dev into a calm, agent-friendly landing page with a one-click agent prompt bar and a unified gallery of four live interactive and streaming @lionlang/ui examples (streaming agent/research feed, dynamic form & pricing, verifiable auth & formal proofs, and live knowledge-graph topology), each leading with rendered UI and a View / edit Lion JSON toggle.
      Added agent-friendly-ui-landing-page capabilityui-package-and-agent-landing.json
    • Adds the @lionlang/ui package with pure JSON-serializable UI bindings (ui/stack, ui/row, ui/grid, ui/card, ui/metric, ui/alert, ui/table, ui/progress, ui/slider, ui/input, ui/select, ui/toggle, ui/button, ui/why, ui/proof, and ui/node?), stateful and streaming createUiSession() backed by one LogicDatabase, and a zero-dependency XSS-safe DOM patcher (@lionlang/ui/dom).
      Added lionlang-ui-package capabilityui-package-and-agent-landing.json
    • @lionlang/site-runtime generates and checks docs/llms.txt and docs/llms-full.txt alongside docs/docs.html from the same Diátaxis documents and live-evaluated examples, giving coding agents a verified machine-readable reference at https://lionlang.dev/llms.txt.
      Added site-llms-txt capabilityui-package-and-agent-landing.json
    • @lionlang/ui adds a themeable default stylesheet (@lionlang/ui/styles.css) driven by --lion-ui-* CSS variables with a built-in light preset, per-slot classes / unstyled and per-node className overrides in renderUi(), and replaces native <select> with a custom accessible dropdown menu.
      Added lionlang-ui-customizable-css capabilityui-theming-and-output-framing.json
    • Separates landing-page copy from live @lionlang/ui output on lionlang.dev by moving example intros onto the page background and framing evaluated output inside a labeled dot-grid Lion output viewport.
      Added site-framed-lion-output capabilityui-theming-and-output-framing.json
    • Adds incremental WAL journaling (@lionlang/core/logic/journal) with JournalStore/MemoryJournalStore, JournaledDatabase whole-transaction atomicity, checkpoint compaction (compact), historical time-travel (checkout), optimistic concurrency control (expectedRevision with ConflictError), and persistent copy-on-write branching (fork and merge).
      Added incremental-journal-branching-occ capabilityplatform-foundation.json
    • Adds LLM authoring and agent transport primitives: Draft 2020-12 JSON Schema export (@lionlang/core/logic/json-schema), machine-applicable RFC 6902 JSON Patch quick-fixes (@lionlang/core/analysis/autofix), first-class MCP JSON-RPC 2.0 and HTTP+SSE servers (lion mcp and lion serve in @lionlang/cli with real-time /v1/watch delta streams), and a zero-dependency Python client SDK (clients/python/) with exact Fraction wire support.
      Added json-schema-autofix-mcp-http-python capabilityplatform-foundation.json
    • Adds sandboxed evaluation in @lionlang/core: capability-scoped safeStdlib omitting host JS reflection and console I/O, cooperative execution limits (maxSteps, maxDurationMs, maxFacts) and runWithMetrics/onMetrics metering, fine-grained DatabasePermissions (readOnly, per-mutation flags, and writableRelations while still allowing assuming), and lossless JSON wire encoding (encodeWire/decodeWire/stringifyWire/parseWire) for exact rationals and large integers.
      Added sandbox-limits-permissions-wire capabilityplatform-foundation.json
    • Adds portable signed proof and audit envelopes (@lionlang/core/logic/envelope) using Web Crypto SHA-256 + Ed25519 alongside Lion's trusted verifyProof kernel, plus database dependency plan inspection and execution profiling (@lionlang/core/evaluation/profile).
      Added signed-proof-envelopes-and-profiler capabilityplatform-foundation.json
    • Adds pure synchronous string/sha256, string/base64-encode, and string/base64-decode to the standard library, and extends @lionlang/ui with XSS-safe deliverable components ui/chart, ui/timeline, ui/diff, and inline quote-highlighting ui/source.
      Added string-sha256-base64-and-ui-deliverables capabilityplatform-foundation.json
  9. @lionlang/core 0.18.0 @lionlang/cli 0.17.0

    Lion adds first-class formal proof-building and research-KB primitives across the logic layer and symbolic solver. proof/prove proves universal (["not", ["exists", ...]]) or empirical database goals in one call, returning kernel-verifiable certificates, induction proofs, grounded why provenance (facts and assumptions), or concrete counterexample witnesses. proof/bounds computes exact tight [min, max] intervals with endpoint witnesses and kernel-checkable certificates across continuous linear (Fourier-Motzkin), integer and mixed-integer linear (Omega + branch-and-bound), linear-fractional ratios num / den (continuous Charnes-Cooper and integer Dinkelbach iteration), univariate quadratic and coupled bilinear x * y objectives (2D polygon projection, interior edge stationary points, and integer slicing), symbolic time/ (time/add, time/diff, time/fromParts), and relational database constraints. proof/valid? rejects forged {check: true} objects, verifies proof/bounds results directly, tightens why derivation checks, and adds 2-argument claim-bound verification (atLeast, above, atMost, below, min, max, unsat, relation names, and ground atoms). proof/rules handles research-grade frames with single-column schema invariants, nested pattern destructuring, in/schema/fits? filters, sound aggregate output domains, and anonymous column pruning. The logic layer also adds pattern- and goal-driven atomic retraction (retract ... {"where": goal} at top level and inside assuming), graph/influence for exact cumulative weighted multi-hop path propagation, proof/sensitivity for all-derivations epistemic fragility and minimal cut sets, model-persisted top-level helper definitions (define ... {"persist": true} saved across snapshots, --database runs, and lion check --database), and expanded Lion-in-Lion lints in lion check.

    • 10 Added
    • 10 Changed
    20 changes

    Added 10

    • Standard library adds proof/bounds to compute exact tight [min, max] intervals with endpoint witnesses and kernel-checkable minProof / maxProof certificates across continuous linear, integer, Charnes-Cooper linear-fractional ratio, and relational database constraints.
      Added proof-bounds-exact-intervals capabilityproof-building-research.json
    • Standard library adds proof/prove to prove universal (["not", ["exists", ...]]) or empirical database goals in one call, returning kernel-verifiable certificates, induction proofs, why provenance trees with facts and assumptions, or concrete counterexample witnesses when a universal claim fails.
      Added proof-prove-and-counterexample-synthesis capabilityproof-building-research.json
    • proof/rules handles research-grade frames: single-column schema invariants, nested pattern destructuring in atom columns, in and schema/fits? rule filters, sound abstract output domains for count/countUnique/sum/mean/median/unique/collect/argMin/argMax, and pruning of unused anonymous schema columns.
      Added proof-rules-research-frames capabilityproof-building-research.json
    • The symbolic solver supports exact linear-fractional ratios (num / den with symbolic linear denominators, splitting positive and negative denominator signs and optimizing ratios via Charnes-Cooper transformation).
      Added symbolic-linear-fractional-ratios capabilityproof-building-research.json
    • The symbolic solver interprets time/add, time/diff, and time/fromParts (with concrete calendar dates and symbolic clock/offset parts) as exact linear expressions over UTC milliseconds.
      Added symbolic-time-reasoning capabilityproof-building-research.json
    • retract (at top level and inside assuming) accepts an optional trailing {"where": goal} record to atomically retract every row matching one or more patterns whose variables satisfy goal, while preserving plain ground-only retract.
      Added conditional-retract-where capabilityproof-building-v2.json
    • Standard library adds graph/influence for exact cumulative weighted path propagation across arbitrary depth (topological DP on DAGs, cycle-avoiding simple-path enumeration on cyclic graphs) and proof/sensitivity for all-derivations epistemic fragility (holds, critical, redundant, resilient, minCutSize, minimalCuts).
      Added graph-influence-and-proof-sensitivity capabilityproof-building-v2.json
    • Top-level define accepts an optional {"persist": true} fourth argument to save snapshot-writable helper bindings in the logic database across --database runs and snapshots, and lion check adds Lion-in-Lion lints for multi-goal find/query calls and bare logic variables in top-level fact forms.
      Added persisted-define-and-expanded-lints capabilityproof-building-v2.json
    • proof/bounds extends exact interval optimization to mixed-integer linear programs (branch-and-bound), integer and mixed-integer linear-fractional ratios (Dinkelbach iteration), and univariate quadratic and coupled bilinear (x * y) objectives (2D Fourier-Motzkin polygon projection, interior edge stationary points, and integer slicing).
      Added proof-bounds-milp-dinkelbach-bilinear capabilityproof-building-v2.json
    • proof/valid? rejects forged {check: true} objects, verifies proof/bounds results directly, tightens why derivation checks, and accepts an optional second claim argument ({"atLeast": ...}, {"above": ...}, {"atMost": ...}, {"below": ...}, {"min": ...}, {"max": ...}, {"unsat": true}, relation name, or ground atom) for claim-bound verification.
      Added sound-claim-bound-proof-valid capabilityproof-building-v2.json

    Changed 10

    • proof/bounds computes exact tight [min, max] intervals, endpoint witnesses, and proof/valid? certificates across continuous linear, integer, linear-fractional ratio, and database constraints.
      Changed proof-bounds-exact-intervals is works logicproof-building-research.json Lion today
    • proof/prove returns kernel-verifiable certificates for valid universal claims, concrete counterexample witnesses for failing universal claims, and grounded why provenance (facts and assumptions) for empirical database goals.
      Changed proof-prove-and-counterexample-synthesis is works logicproof-building-research.json Lion today
    • proof/rules proves schema preservation over relations with single-column schema invariants, nested record patterns, in/schema/fits? filters, and aggregate heads.
      Changed proof-rules-research-frames is works logicproof-building-research.json Lion today
    • Symbolic division by a linear expression handles both positive and negative denominators with exact sign flips and proves or refutes coupled ratio inequalities.
      Changed symbolic-linear-fractional-ratios is works logicproof-building-research.json Lion today
    • proof/prove and proof/bounds reason symbolically over time/add, time/diff, and time/fromParts for exact UTC interval proofs and SLA checks.
      Changed symbolic-time-reasoning is works logicproof-building-research.json Lion today
    • retract with {"where": goal} atomically retracts all matching rows at top level and inside assuming without affecting plain retract.
      Changed conditional-retract-where is works logicproof-building-v2.json Lion today
    • graph/influence computes exact cumulative weighted path propagation over multi-hop graphs and proof/sensitivity computes exact single-point-of-failure facts and minimal cut sets across all derivations.
      Changed graph-influence-and-proof-sensitivity is works logicproof-building-v2.json Lion today
    • define with {"persist": true} persists helper definitions across snapshots and database runs while leaving plain 3-argument define ephemeral.
      Changed persisted-define-and-expanded-lints is works logicproof-building-v2.json Lion today
    • proof/bounds computes exact tight [min, max] bounds and endpoint witnesses for integer linear-fractional ratios (via Dinkelbach) and coupled bilinear products (including interior edge stationary points).
      Changed proof-bounds-milp-dinkelbach-bilinear is works logicproof-building-v2.json Lion today
    • proof/valid? rejects forged {check: true} objects, validates proof/bounds records directly, and checks optional 2-argument claim bindings.
      Changed sound-claim-bound-proof-valid is works logicproof-building-v2.json Lion today
  10. @lionlang/core 0.17.0 @lionlang/cli 0.16.0

    Lion proves universal properties by structural, numeric, and rule induction (proof/rules) with a zero-solver proof kernel (proof/valid?), decides schema/includes? across every value kind and recursive named schemas, and extends the symbolic solver to exact multivariate polynomials, univariate quadratics, division/rounding/remainder, bounded recursive lambdas, and idiomatic object, array, boolean, aggregate, and quantity operations. why is now a first-class composable question across query, find, rule, cond, invariant, and assuming, paired with proof/facts and proof/assumptions for ground provenance extraction. The standard library adds the deterministic UTC time module (time/parse, time/fromParts, time/format, time/parts, time/diff, time/add), Unicode regex and quote normalization (string/matches?, string/match, string/matchAll, string/normalize), string/value ordering and structural array/includes?, everyday array/string/object helpers (array/filter, array/reverse, array/sort, array/at, array/indexOf, array/find, string/chars, string/trim, string/toLowerCase, string/toUpperCase, string/replaceAll, object/json-parse, object/entries, object/fromEntries, object/merge), aggregate/median, aggregate/argMin/argMax, and six ontology and knowledge-graph algorithms (graph/cycles, graph/transitiveReduction, graph/betweenness, graph/lca, graph/simplePaths, graph/dominators). Recursive and mutually recursive lambdas close and snapshot cleanly in rules, and static analysis catches wrong-arity calls and unsafe declarations with runtime messages. @lionlang/cli adds --eval, stdin -, --bind/--bind-file, multi-file atomic runs, --read-only, lion check --database, lion inspect [--derived], and lion diff [--derived] with read-only --apply counterfactual preview.

    • 26 Added
    • 18 Changed
    • 2 Fixed
    • 1 Decided
    47 changes

    Added 26

    • array/filter keeps items of a list for which a boolean predicate gives true, in plain code, waiting rules, and the symbolic solver: ["array/filter", ["array/make", 1, 5, 2], ["lambda", ["x"], ["number/greaterThan", "x", 2]]] gives [5].
      Added array/filter functionstring-chars-and-array-helpers.json Lion today
    • array/reverse reverses a list in plain code, waiting rules, and the symbolic solver: ["array/reverse", ["array/make", 1, 2, 3]] gives [3, 2, 1].
      Added array/reverse functionstring-chars-and-array-helpers.json Lion today
    • array/sort sorts a list in ascending canonical order or stably by an optional two-argument boolean comparator, in plain code, waiting rules, and the symbolic solver: ["array/sort", ["array/make", 3, 1, 2]] gives [1, 2, 3].
      Added array/sort functionstring-chars-and-array-helpers.json Lion today
    • The lion and lion check commands accept --eval (-e) for inline JSON programs and - (or piped stdin) for standard input, and lion check --database <file> loads a saved database read-only so its relations and schemas are in scope without modifying the file.
      Added cli-eval-stdin-check-database capabilitystatic-arity-and-cli-workflows.json
    • schema/includes? decides inclusion across all value kinds (value/number?, value/integer?, value/string?, value/array?, value/object?, value/function?, value/symbol?, value/promise?, value/unknown?, value/undefined?, value/any?), open records and lists (schema/open without rest), and unbounded collections (schema/arrayOf without most, schema/recordOf), e.g. ["schema/includes?", "value/number?", "value/integer?"] gives false and ["schema/includes?", "value/string?", "value/number?"] gives false.
      Added schema-inclusion-across-kinds capabilityschema-inclusion-across-kinds.json
    • The symbolic solver runs full Lion expressions inside lambdas (=, and, or, not, in, begin with local define, match, schema/fits?, [], array/slice, array/zip), suspended closures referencing logic variables, and recursive functions over bounded inputs with dead-branch pruning and Shannon-decomposed negation, proving recursive sorts such as insertion sort and merge sort over ["schema/arrayOf", "value/integer?", 4].
      Added solver-full-forms-and-recursion capabilitysolver-full-forms-and-recursion.json
    • The symbolic solver decides number/floor, number/ceiling, number/round (with optional constant places), number/remainder by any known non-zero divisor, and value/integer? on arbitrary real expressions via exact Skolem integer variables, e.g. ["query", ["not", ["exists", ["?n"], ["and", ["schema/fits?", "?n", "value/integer?"], ["=", ["number/remainder", "?n", 2], 0], ["not", ["value/integer?", ["number/divide", "?n", 2]]]]]]] proves every even integer halves to an integer ([{}]).
      Added solver-rounding-and-remainder capabilitysolver-rounding-and-remainder.json
    • Static analysis (analyze, lion check, and the graph editor) reports wrong-arity calls to standard library functions, declared relations, declared schemas, immediate lambdas, and unmutated single-site defined lambdas with the exact runtime arity message.
      Added static-arity-diagnostics capabilitystatic-arity-and-cli-workflows.json
    • string/chars splits a string into its Unicode characters in order, keeping astral characters whole: ["string/chars", "a𝄞b"] gives ["a", "𝄞", "b"].
      Added string/chars functionstring-chars-and-array-helpers.json Lion today
    • Added CIC-inspired recursive schema inclusion (schema/includes? over recursive and mutually recursive named schemas, uninhabited recursive schemas, and least-fixed-point loops), structural and numeric induction with CIC purity and termination guard verification plus exact polynomial cancellation, rule induction over rule-defined relations (proof/rules), Omega integer split certificates (kind: "split"), and a zero-solver trusted proof kernel (proof/valid?).
      Added cic-induction-and-proofs capabilitycic-induction-and-proofs.json
    • The lion and lion check commands accept repeatable --bind (-b) name=<json> and --bind-file name=<path> flags that inject top-level JSON bindings while preserving exact numbers.
      Added cli-bind-and-bind-file capabilitystatic-checks-and-cli-bind.json
    • Standard library adds object/json-parse (with exact numbers), object/entries, object/fromEntries, object/merge, string/trim, string/toLowerCase, string/toUpperCase, string/replaceAll, array/at (with negative indices and optional fallback), array/indexOf (structural equality), and array/find (with optional fallback), integrated across plain code, logic waiting, and the interop grid.
      Added everyday-stdlib-helpers capabilityeveryday-stdlib-helpers.json
    • Self-recursive and mutually recursive lambdas are closed into self-contained blocks when a rule is written, so redefining a name later does not change the rule, and a snapshot writes a rule holding a recursive or mutually recursive lambda as a self-contained block that reloads, deduplicates, and retracts cleanly.
    • The symbolic solver reasons over idiomatic Lion expressions: object/set, object/remove, object/merge, object/keys, object/values, object/entries, object/fromEntries, object/get-path, boolean/xor, boolean/nand, boolean/nor, boolean/equals?, all value/* predicates plus value/identity, concrete and symbolic func/partial, guarded schema/assert and contracted lambdas, array/at (including symbolic indices), array/indexOf, array/find, array/range, aggregate/*, and quantity/*.
      Added solver-idiomatic-lion capabilitysolver-idiomatic-lion.json
    • The symbolic solver represents exact multivariate polynomials (including number/power with non-negative integer literal exponents) to cancel higher-degree terms automatically and decides univariate quadratic equations and inequalities over reals and integers via exact rational discriminant roots and BigInt integer root bracketing, closing corpus gap induction-sum-of-odd-numbers.
      Added solver-polynomials-and-quadratics capabilitysolver-polynomials-and-quadratics.json
    • Static analysis (analyze, lion check, and the graph editor) shares runtime validation helpers to flag invalid relation, query, and invariant declarations and options, anonymous or unsafe rule heads, unsafe top-level find templates, and logic variables in ground facts with exact runtime error messages, and warns on duplicate lambda parameters, unreachable cond branches after unshadowed else, and near-miss unbound bare call heads.
      Added static-declaration-and-safety-checks capabilitystatic-checks-and-cli-bind.json
    • Aggregate module adds aggregate/median (exact rational middle or midpoint, preserving match multiplicity in rules) and aggregate/argMin / aggregate/argMax (value of the [key, value] pair with least or greatest numeric or string key, breaking ties deterministically by smaller value), integrated across plain code, rules, incremental maintenance, and the symbolic solver.
      Added aggregate-median-and-arg-extrema capabilityagent-knowledge-base-improvements.json
    • The lion CLI adds lion inspect [--derived] to summarize a saved database's ontology (relations, columns, keys, merges, schemas, invariants, and counts) as JSON, accepts multiple program files executed atomically in one invocation, skips rewriting an existing --database when no committed changes occurred, and adds --read-only (-r) to run exploratory programs without touching disk.
      Added cli-inspect-multifile-readonly capabilityagent-knowledge-base-improvements.json
    • why is a first-class question obeying Lion's asking and waiting rules: inside a query, find, rule, cond, invariant, or assuming, ["why", fact] waits for its variables to be bound and explains the row against the current (or assumed) database, snapshots cleanly, and re-derives when underlying facts change.
      Added composable-why capabilityagent-knowledge-base-improvements.json
    • Graph module adds graph/cycles (non-throwing canonical shortest directed cycle per cyclic strongly connected component, including self-loops), graph/transitiveReduction (unique minimal Hasse DAG edges), and graph/betweenness (Brandes's directed betweenness centrality, supporting optional non-negative edge weights).
      Added graph-ontology-algorithms capabilityagent-knowledge-base-improvements.json
    • Standard library adds string/lessThan, string/greaterThan, string/lessThanOrEqualTo, string/greaterThanOrEqualTo (code-unit order matching query "order" and array/sort), value/equals?, and value/compare (-1, 0, 1 total order, with symbolic solver support), and unifies array/includes? on Lion's structural sameValue equality (matching array/indexOf, =, and in).
      Added string-order-value-compare-and-structural-includes capabilityagent-knowledge-base-improvements.json
    • The lion CLI adds lion diff to compute deterministic semantic diffs between two saved databases or preview the in-memory impact of --apply / --eval steps without touching disk, including derived conclusion deltas with --derived; @lionlang/metrics adds bun run efficacy [--against <ref>] to benchmark Lion's efficacy for AI agents building deep research knowledge bases, ontologies, and graphs.
      Added cli-semantic-diff-and-kb-efficacy-benchmark capabilityagent-research-kb-improvements.json
    • Graph module adds graph/lca (lowest common ancestors and shortest hop distances in any DAG), graph/simplePaths (all cycle-free directed paths up to maxHops with optional weights), and graph/dominators (immediate dominator tree rooted at start).
      Added graph-lca-simplepaths-dominators capabilityagent-research-kb-improvements.json
    • Proof module adds proof/facts and proof/assumptions to extract deduplicated, canonically sorted ground (given: true) facts and leaf closed-world absences from any why explanation tree.
      Added proof-provenance-extractors capabilityagent-research-kb-improvements.json
    • String module adds Unicode regular expression matching and extraction (string/matches?, string/match, string/matchAll with stateless flags from i, m, s and pure JSON match records) and canonical quote/entity normalization (string/normalize).
      Added string-regex-and-normalize capabilityagent-research-kb-improvements.json
    • Standard library adds the deterministic proleptic Gregorian UTC time module (time/parse, time/fromParts, time/format, time/parts, time/diff, time/add) operating on exact integer UTC epoch milliseconds with zero host-timezone dependency.
      Added utc-time-module capabilityagent-research-kb-improvements.json

    Changed 18

    • schema/includes? gives false for value/number? in value/integer?, value/string? in value/number?, and open records in exact records, and true when an unbounded schema/arrayOf is covered by a schema/anyOf of empty and open lists.
      Changed schema-includes-across-kinds is decided schemasschema-inclusion-across-kinds.json Lion today
    • The symbolic solver evaluates begin with local define, match, =, and, or, not, in, schema/fits?, and recursive functions over bounded lists.
      Changed solver-recursive-lambda-bounded-lists is decided logicsolver-full-forms-and-recursion.json Lion today
    • The symbolic solver decides number/remainder by a known non-zero divisor, number/floor, number/ceiling, number/round, and value/integer? on arbitrary numbers.
      Changed solver-remainder-known-divisor is decided logicsolver-rounding-and-remainder.json Lion today
    • proof/valid? verifies linear refutation certificates, Omega integer split trees, case splits, induction proofs, lemma compositions, and why derivation trees using plain arithmetic without invoking the solver, and rejects forged or empty proofs.
      Changed proof-kernel-valid-and-splits is valid-and-rejects-forged logiccic-induction-and-proofs.json Lion today
    • proof/rules proves universally over all databases whose base relations fit their declared schemas that every row derived by a relation or mutually recursive relations (including element-preserving aggregate/min and aggregate/max rules) fits a target schema, returning a kernel-checkable induction proof.
      Changed proof-rules-induction is proved-and-valid logiccic-induction-and-proofs.json Lion today
    • schema/includes? decides inclusion between recursive and mutually recursive named schemas by strong structural induction, treats structurally uninhabited recursive schemas as empty, and interprets unguarded loops by least fixed point.
      Changed recursive-schema-inclusion is decided schemascic-induction-and-proofs.json Lion today
    • The symbolic solver proves universal claims (["not", ["exists", ...]]) over recursive named schemas, unbounded schema/arrayOf, and lower-bounded integers by structural and numeric induction when the recursive functions pass purity and termination guard checks, with exact polynomial cancellation for nonlinear terms.
      Changed solver-structural-and-numeric-induction is decided logiccic-induction-and-proofs.json Lion today
    • The 11 everyday standard library helpers (object/json-parse, object/entries, object/fromEntries, object/merge, string/trim, string/toLowerCase, string/toUpperCase, string/replaceAll, array/at, array/indexOf, array/find) work in plain code and logic rules with exact JSON numbers and structural equality.
      Changed everyday-stdlib-helpers is works libraryeveryday-stdlib-helpers.json Lion today
    • The symbolic solver decides proofs using object/set, func/partial, guarded contracted lambdas and schema/assert, array/at/indexOf/find/range, aggregate/*, and quantity/*.
      Changed solver-idiomatic-operations is decided logicsolver-idiomatic-lion.json Lion today
    • The symbolic solver cancels higher-degree polynomial terms and decides univariate quadratic equations and inequalities over integers and reals.
      Changed solver-univariate-quadratic is decided logicsolver-polynomials-and-quadratics.json Lion today
    • aggregate/median, aggregate/argMin, and aggregate/argMax agree across plain lists, rule heads, and the symbolic solver.
      Changed aggregate-median-and-arg-extrema is works logicagent-knowledge-base-improvements.json Lion today
    • why inside query, find, rule, and assuming explains rows against the current or assumed database, matching top-level why.
      Changed composable-why is works logicagent-knowledge-base-improvements.json Lion today
    • graph/cycles, graph/transitiveReduction, and graph/betweenness run deterministically over base and derived edge relations.
      Changed graph-ontology-algorithms is works logicagent-knowledge-base-improvements.json Lion today
    • string/lessThan..greaterThanOrEqualTo, value/equals?, value/compare, and structural array/includes? agree with =, in, array/indexOf, and array/sort.
      Changed string-order-value-compare-and-structural-includes is works libraryagent-knowledge-base-improvements.json Lion today
    • graph/lca, graph/simplePaths, and graph/dominators run deterministically over base and derived edge relations.
      Changed graph-lca-simplepaths-dominators is works logicagent-research-kb-improvements.json Lion today
    • proof/facts and proof/assumptions compose with why across rules, queries, find, and assuming to derive ground evidence lineage and negative dependencies.
      Changed proof-provenance-extractors is works logicagent-research-kb-improvements.json Lion today
    • string/matches?, string/match, string/matchAll, and string/normalize extract structured matches and canonicalize typographic quotes, dashes, ellipses, and whitespace inside plain code and Datalog rules.
      Changed string-regex-and-normalize is works libraryagent-research-kb-improvements.json Lion today
    • time/parse, time/fromParts, time/format, time/parts, time/diff, and time/add normalize timezones, reject impossible dates, round-trip ISO-8601 UTC strings, and compute exact durations.
      Changed utc-time-module is works libraryagent-research-kb-improvements.json Lion today

    Fixed 2

    Decided 1

    • Detect strongly connected cycles of lambdas (including cycles passing through func/partial, arrays, records, or aliases) when closing values for rules, invariants, and snapshots, and rewrite each cycle into a lexically hygienic self-contained block [[lambda, outerNames, [begin, [define, ...], ..., root]], ...outerValues].
      Decided recursive-lambda-closing: scoped-scc-block over unclosed-dynamic-lookup, top-level-defines, because a recursive lambda in a rule or snapshot should behave like any other lambda without leaking bindings logicRecord Close recursive and mutually recursive lambdas into self-contained blocks for rules and snapshotsrecursive-lambda-snapshots.json
  11. @lionlang/core 0.16.0 @lionlang/cli 0.15.0

    Every number is exact, as Scheme's exact numbers are: a number a program writes is the value its digits write, arithmetic, sums, and means are exact, ["number/add", 0.1, 0.2] is 0.3, no sum or product overflows past 2^53, and ["number/divide", 1, 3] is the fraction 1/3, which number/toString writes as 1/3; so what the solver proves about numbers holds of what plain code computes. array/zip pairs up lists, number/round takes decimal places, func/apply spreads its last list as Scheme's apply does, a lambda written with one name in place of its parameters takes any number of arguments, and and and or of no goals and number/add and number/multiply of no arguments give Scheme's results. lion check also runs lints written in Lion, the first of which warns of a list written as a bare array in a rule, a find, or a query. Each rule a message states is told in one wording wherever it is broken, a relation goal finds its rows through the later goal with fewer rows when that is cheaper, and a message shows a value a host function gives that JSON cannot hold as its kind, such as <Map> or <bigint>, where a bigint made the message fail before. Breaking: integers past 2^53 - 1 and decimals compute exactly instead of failing or rounding, a fraction no decimal writes has no JSON text, and array/head and array/tail fail on an empty list.

    • 11 Breaking
    • 42 Added
    • 83 Changed
    • 15 Fixed
    • 1 Documentation
    • 35 Decided
    • 12 Rules
    • 18 Figures
    217 changes

    Breaking 11

    Added 42

    • The research model weighs how Lion should make its numbers exact, so that what its solver proves holds of what its code computes, and how provers such as Lean prove arithmetic no procedure decides. Its page, research/runs/exact-numbers/, ranks first of everything left to build making every number exact: integers of any size and fractions, each number read as the value its digits write, which a model of exact numbers estimates would make Lion's adding of decimals take 1.7 times as long. Its probes found that the solver proves that no number between 0 and 1 changes when 0.2 is added and taken away, and that no integer from 2^53 up is unchanged by adding 1, while Lion's own code breaks both, and that Lion rounds 2^53 + 1 without a word. After exact numbers it orders polynomial identities, nonlinear facts from products of hypotheses, and proofs as values a small checker accepts; induction over recursive functions can start now.
      Added research-exact-numbers fileresearch-exact-numbers.json Lion today
    • bun run history check counts the rules in force that no probe of Lion checks, beside what the model holds, and ["untested", "?rule"] lists them
      Added untested-rules capabilityconstraints-checked-by-probes.json
    • bun run affected says which test files, checks, and mutations the changes since a commit can reach, picked by Lion rules from a map of what each test file reached when it last ran, and --run runs them
      Added affected-command commandchecks-a-change-reaches.json Lion today
    • bun run affected --replay 30 says what picking would have run for each of the last 30 commits, beside everything
      Added affected-replay optionchecks-a-change-reaches.json
    • bun run mutate --affected checks only the mutations the changes since HEAD can reach: those in a changed file, and those whose tests a changed file reaches
      Added mutate-affected optionchecks-a-change-reaches.json
    • bun run affected --map runs every package's tests once with a setup file that records the source files whose functions each test file ran, the files it read, and whether it ran git
      Added reach-map toolchecks-a-change-reaches.json
    • bun run capability grades the corpus and prints how many of each pillar's tasks are passed, and --solutions grades a folder of programs in place of the reference programs
      Added capability commandcapability-corpus.json
    • packages/metrics/corpus/ holds Lion's public capability corpus: tasks of general computation, logic programming, and formal proofs, each a JSON record {id, pillar, statement, inputs, check, tags, origin} whose check is a Lion lambda that judges what a program gives, with a reference program for each task Lion can do
    • LION_HELD_OUT names a folder outside the repository with the corpus's layout, whose tasks are graded beside the public ones; a folder inside the repository is refused
      Added held-out-corpus optioncapability-corpus.json
    • Each number has one form: the JavaScript number whose shortest digits write it, when one does, and otherwise an exact rational kept once for each value, in packages/core/src/numbers/exact.ts, so equality is identity and hosts mostly see plain numbers.
    • The research model records Lion with exact numbers built, in step research/steps/51-en-built.json: the run's programs run again, and the time to add decimals measured beside main. The solver's two proofs now hold of plain code, every number idea the run weighed is one Lion does already, adding a hundred thousand decimals takes 1.9 times as long against the model's estimate of 1.7, and the proof ideas no longer wait for exact numbers, with induction over recursive functions ranked first of them.
      Added research-exact-numbers-built-step fileresearch-exact-numbers-built.json Lion today
    • array/zip pairs up the items of one or more lists: a list of the first items, then of the second, up to the end of the shortest list.
    • Experiments on Lion are recorded in improvement/
    • bun run loop observe runs every measuring tool through the skill's see.mjs and records each line the scoreboard prints, word for word
    • The scoreboard runs its tools cheapest first, and with --fail-fast stops at the first requirement that is not met
    • give the skill words/first, the first item of a list or null, written in plain Lion so that it works on every published CLI
    • what caused the tries that failed, by the rules in agent-errors.json
      Added agent-error-causes fileagents-work-the-corpus.json
    • bun run capability --agents has a headless claude -p session work each task of the corpus in a folder of its own outside the repository, with the task's statement, Lion's documentation, ./lion, and ./try, and grades what the agents wrote as a suite of its own
      Added capability-agents optionagents-work-the-corpus.json
    • ./try runs solution.json the way the grader does, with the inputs bound, and prints its value, or why it failed
      Added corpus-try toolagents-work-the-corpus.json
    • bun run pairs runs the interop grid over pairs of its rows: each kind of expression written where another has its variable, in each place the grid has, held to the grid's rule that it gives what plain code gives
      Added grid-pairs commandpairs-of-grid-rows.json
    • --agents also have agents write a program for each corpus
      Added loop-agents optionagents-work-the-corpus.json
    • surprising pairs, grid
      Added loop-pairs capabilitypairs-of-grid-rows.json
    • bun run loop status builds the record's model again from its steps before it asks
    • bun run capability --graded <run folder>: an agents' run that finished, graded again at no cost
      Added capability-graded optionagents-regrade-and-rate.json
    • How often did the loop's predictions come true, for scores, for requirements, and for other questions?
      Added loop-calibration capabilityagents-regrade-and-rate.json
    • What is the loop's rate: capability tasks gained, per hour of checks and per dollar agents spent?
      Added loop-rate capabilityagents-regrade-and-rate.json
    • When the map holds the named functions each test ran, a script whose changed lines are all in named functions, or in imports, types, comments, and constants of its own, picks only the tests that ran one of those functions.
      Added affected-by-function capabilityreach-by-function.json
    • The commit hook's bun run affected --run logs each check it runs to out/telemetry.jsonl: the check, the git tree of the staged files, its seconds, and whether it passed.
      Added check-telemetry capabilitychecks-telemetry.json
    • Run self-improvement (2026-11-21), steps 52-si-frame, 53-si-lion, and 54-si-precedents, at commit 7d623a7 (core 0.15.0). It weighs the nine mechanisms of plan.md §5 as ideas in the shared research model
      Added research-run-self-improvement fileself-improvement-research.json
    • --tasks a,b works only those, as a suite of its own
      Added loop-agents-tasks optionloop-agent-subsets.json
    • bun run measure --messages groups the messages bun run measure counts by the rule each states, with a Lion program, packages/metrics/src/message-rules.json, that reads each message as a rule and is given the source's messages as facts: it lists the rules stated in several wordings, the ones kept so on purpose and why, each topic's rules and messages, and the messages no reading covers yet.
      Added measure-messages-by-rule optionmessages-by-rule.json
    • bun run scale times a second join, the triangles among n edges with each node linked to and from two hubs
    • solver disagreements, oracle
      Added loop-oracle capabilitysolver-oracle.json
    • bun run oracle checks the solver against plain code: goals on one number, bounded and typed by a schema, that the solver decides, run again by plain code at sample points inside the bounds
      Added solver-oracle commandsolver-oracle.json
    • It also runs lints written in Lion: rules over the program read as data, one fact for each term with its JSON pointer.
      Added lion-check-lints capabilitylints-in-lion.json
    • Asks the lints lion check runs, Lion rules over a program read as data in [packages/core/src/analysis/lint.ts](../core/src/analysis/lint.ts), of every Lion program the repository holds
      Added variants commandlints-in-lion.json
    • bun run affected also names the rules of the project record a change puts at risk, before it is committed.
      Added affected-at-risk capabilityrules-at-risk.json
    • bun run stale replays the model and lists the evidence a later change to Lion made stale
      Added research-stale commandstale-evidence.json
    • which of its present answers rest on them, by the rule stale_answer of step 58-si-stale
      Added research-stale-answer capabilitystale-evidence.json
    • Each folder of [../suites/](../suites/) holds a suite with this layout, its tasks drawn from a benchmark of another field, so that Lion is measured by what others measure their tools with and not only by tasks written for it.
    • openrulebench | transitive closure with no argument bound and with the first bound, Join1, and DBLP
      Added suite-openrulebench fileoutside-suites.json
    • sv-comp | loop-acceleration/simple_1, diamond_1, and count_by_1
      Added suite-sv-comp fileoutside-suites.json

    Changed 83

    Fixed 15

    • bun run loop scores reads the capability as the JSON object bun run capability --json printed, whatever bun prints around it, so the first observation after merging the corpus no longer stops at the capability
      Fixed loop-capability-with-bun-lines is read metricsloop-reads-capability-json.json
    • no proof recording is in the repository
      Fixed completion-proof-location is outside-git processbroken-rules-settled.json
    • packages/core/src/modules/tests/index.test.ts checks with @effect/vitest properties that namespaceEntries names each entry of any record by its namespace, in order, and keeps its value, and that the stdlib is every function of every module named by its module
      Fixed core-test-framework is effect-vitest processbroken-rules-settled.json Lion today
    • The two committed screen recordings, .artifacts/proof/repl-server-output-dock.webm and packages/repl/artifacts/thicker-black-background-dots.webm, are removed from git
      Fixed proof-recordings-in-git is none processbroken-rules-settled.json Lion today
    • The five tests that sat beside their code, packages/typesafe-ai/src/index.test.ts and the editor's document, fixtures, parse, and worker-protocol tests, are in tests folders
      Fixed test-file-location is tests-folders processbroken-rules-settled.json Lion today
    • The named functions that ran as the imports loaded, such as those that build the library's functions. A function they built runs in the tests with no name of its own, so a change inside it reaches the tests through the function that built it.
      Fixed affected-builder-at-load is reached metricsreach-by-function.json
    • A name as V8 reports it, read as the parse names the function: without the suffix a bundler adds to keep names apart, the word an accessor or a bound function starts with, or the object a property is written in, as module.add is the property add.
      Fixed affected-v8-property-name is last-part metricsreach-by-function.json
    • No map was written: make the tests pass, with nothing else running, and map again.
      Fixed reach-map-after-failed-tests is refused metricsreach-by-function.json
    • The list is what array/make gives with the arguments: a goal among them is asked, so [["lambda", "args", "args"], ["small", 1]] gives [true] when small holds 1
      Fixed rest-parameter-goal-argument is asked evaluationrest-parameter-asks-goals.json
    • With exact numbers merged, the corpus task sicp-1.2.1-factorial-exact is no gap: its reference program gives 25! as 15511210043330985984000000, and the public corpus passes 49 of 55 tasks
      Fixed corpus-factorial-exact is passed metricsmerge-exact-numbers.json
    • An exact fraction no decimal writes, as 4/3, is a value JSON cannot hold, and its JSON fails.
      Fixed grid-pairs-fraction is no-data metricsmerge-exact-numbers.json
    • A program of strings and integers; -0 is 0, as JSON writes it.
      Fixed variants-property-negative-zero is normalized metricsrules-at-risk.json
    • A test that runs git in a folder of its own, and the lion-reasoning skill's scripts, clear the variables a git hook sets to name its repository, so a test the commit hook runs no longer writes core.bare, a test identity, or commits to the repository being committed
      Fixed git-in-a-hook-for-another-folder is own-folder, was hook-repository testsgit-for-its-own-folder.json
    • A message shows such a value as its kind in angle brackets, as it shows a function as <function>: <Map>, <Date>, <bigint>, <undefined>, <NaN>.
      Fixed host-value-in-message is kind-in-angle-brackets, was json-text-or-crash errorsRecord A host function may give any value, and plain code carries it as it is; the database and a question's answers hold datahost-values-at-runtime.json Lion today
    • A test that runs git in a folder of its own, and the lion-reasoning skill's scripts, clear the variables a git hook sets to name its repository
      Fixed reasoning-skill-git-in-a-hook is own-folder, was hook-repository skillsgit-for-its-own-folder.json

    Documentation 1

    • The experiment function-reach-3 stopped after its tests when the docs example "Unknowns are data" took 435 ms, over the browser's limit, under the machine's load
      Documentation site-runtime-example-time-under-load is flaky sitetests-run-again.json

    Decided 35

    Rules 12

    Figures 18

  12. @lionlang/core 0.15.0 @lionlang/cli 0.14.0

    A string is read by scope: it is a name where a scope declares it and data otherwise, the first element of an array always names what the array does, define binds in the body it stands in, and set! changes the nearest binding. A variable a schema types stands for every value the schema allows, and Lion's own solver, with exact rationals, decides the goals over it; why shows a certificate for each case it split a rule into and the goals that contradict each other, and ["schema/includes?", a, b] says whether every value a allows fits b. From Clef and Racket: contracts on parameters, ["n", "value/number?"]; delay and value/force; func/catch and func/raise; delimited continuations with func/reset and func/shift; a quantity module for numbers with units; watch for host code that follows a query's answers; and warnings from lion check and the graph editor for a match case that can never be reached or a value a contracted match leaves out. Breaking: a cond condition must be true or false; a lambda takes exactly as many arguments as it has parameters; object/get fails on a missing key unless given a value; integers up to 2^53 - 1 do exact arithmetic or fail, and program text may not write one that would read as another; a match with no fallback fails on a value no case fits; in a rule, query, or find, set! refuses a binding made outside it, and a begin waits as a whole for an earlier expression that waits, so every expression runs for each answer.

    • 7 Breaking
    • 43 Added
    • 4 Removed
    • 71 Changed
    • 16 Fixed
    • 38 Decided
    • 8 Rules
    • 19 Figures
    206 changes

    Breaking 7

    Added 43

    Removed 4

    Changed 71

    Fixed 16

    • An array that names a form but does not have the form's shape fails with MalformedFormError, which says what the form takes, with an example.
    • A body that defines the name of a form it uses fails, as R7RS Scheme makes such a definition an error: ["define", "define", 1] calls the name it defines, which the body declares from its start and which has no value yet. It fails with UndefinedYetError, whose message says that the body defines the form's name, so an array that starts with it calls that definition instead of being the form, and that the definition needs another name.
      Fixed body-defines-define is says-why, was read-before-defined formsRecord A body cannot define the name of a form it usesform-name-definition.json Lion today
    • The parts of a logic form are read by the scope the form is written in, as plain code is: a find, a rule, a fact, a query, an assuming, and every other form that reads or changes the database compiles its parts there, so a string means in them what it means in plain code beside them. A scope keeps the names it declared when code was compiled in it: a name that code eval runs binds later is not among them, also when compiled code asks its scope while it runs, as a form that waits does when it keeps the values of the names it reads. Code that eval runs is a program: it declares the names it defines, in the body eval stands in, and the relations and schemas it declares, from its start. The first element of an array names what the array does, so a string there is a name and never data: one that no scope declares is looked up where the call runs, among the bindings the run has by then. A relation or function that code eval ran has bound is called, in plain code and in a rule, query, or find alike: after ["eval", ["quote", ["relation", "visited", ["city"]]]], ["find", "?c", ["visited", "?c"]] asks the relation, while the string "visited" anywhere else is data.
      Fixed eval-code-own-definitions is declared, was error evaluation Fixed string-in-find-bound-after-compile is data, was name logicRecord Logic forms, forms that wait, and code that eval runs read strings by the scopes they are written inlogic-forms-read-by-scope.json Lion today
    • A fact or why form that holds a rule or invariant form among its relation calls fails before it evaluates any of them, so it adds no rule: ["fact", ["n", 1], ["rule", ["m", "?x"], ["n", "?x"]]] fails and the database holds no new rule or fact. retract and assuming check a rule or invariant form they hold as the form checks itself, in the same order and words.
      Fixed fact-holding-rule-form is changes-nothing, was adds-the-rule logicassuming-exists-and-held-forms.json Lion today
    • build-explorer.mjs asks the lion command the replay runs for it and puts it in the page, so the page, the model, and page-check.json run one Lion.
      Fixed research-page-engine is lion-worker, was bundled skillsRecord A research page runs the Lion of the lion command that checks itresearch-page-runs-checking-lion.json Lion today
    • A form that waits reads a logic variable's value once the variable is bound, also where it runs into a form that waits again: in ["rule", ["out", "?x", ["cond", [["number/equals?", "?x", 0], "?x"], ["else", ["find", ["number/add", "?k", ["cond", [["even", "?x"], "?x"], ["else", "?x"]]], ["link", "?x", "?k"]]]]], ["n", "?x"]], the cond that asks ["even", "?x"] inside the find's template asks it of the value ?x has, and the rule gives what plain code gives with ?x bound. It failed with Expected number, because that cond took ?x for a new variable.
    • The property that the head of a call is a name, never data, draws only names that are neither a library function nor a special form. It drew or now and then, and ["or", 0] is the or form, not a call, so the analysis rightly read it as the form and the property failed: in 207 of 1,000 seeded runs of 300 cases, and in none now.
      Fixed call-head-property-special-form-name is left-out, was drawn testsanalysis-written-parts-property.json
    • The properties of the engine's rows, levels, and weights compare a database that followed changes with one that holds the rules and then every fact in one fact form, which is checked once, against the whole program, and forgets what following that form derived, so every group is derived from nothing. They compared with one that held the facts and then added the rules one at a time, each a change checked on its own. With a rule that tells two mothers of one child apart, and two equality rules that make twins' mothers one, one a level sooner than the other, that database refused the rule that tells them apart, since the sooner equality rule was not there yet, though the program as a whole holds. So "keep after any changes the rows, levels, and weights that deriving from nothing gives" failed once in 1,000 to 3,000 runs with expected true to be false; the engine gave the right answer.
      Fixed test-weights-database-from-nothing is rules-then-one-fact-form, was facts-then-each-rule testsweights-property-checks-the-whole-program.json
    • The property that a rule or invariant form is refused in retract and assuming as the form itself is refused now leaves out an invariant that is well formed but does not hold, such as ["invariant", ["quote", true], {"assert": "none"}]: adding it is refused when it is checked, not as a form, and retracting it removes nothing, which the property now checks. It failed within about 1,000 runs in each of three passes of 5,000, about one test run in five at its 200 runs, and holds in three passes of 5,000 now.
      Fixed retract-property-false-invariant is retract-removes-nothing, was expected-refused testsretract-property-false-invariant.json
    • The property that why explains a rule no values meet with certificates that whole-number arithmetic checks no longer asks for a certificate when why leaves the rule out: a filter that is false whatever the values, such as ["number/lessThan", ["cond", [["number/lessThan", 0, 0], "?x"], ["else", 0]], 0], mentions ?x but is false without it, and why gives no reason for such a rule, on main too. It failed about once in 200 runs.
      Fixed certificate-property-constant-filter is left-out, was required testscertificate-property-constant-filter.json
    • Two rows with one key that a key cannot make one are told the same whatever order the rules and facts came in: the error names, of the clashes there are, the one whose rows sort first; of its two rows, the one a rule gave as derived, or the one that sorts later when rules gave both; and of the rules that gave it, the one whose written form sorts first. With twins a and b whose invented mothers facts hold, "mother" is keyed by ["child"], but ["rule",["mother","?a","?m"],["twin","?a","?b"],["mother","?b","?m"]] derived ["mother","a",["some","?m",["mother","b","?m"]]] while ["mother","a",["some","?m",["mother","a","?m"]]] holds. comes with the facts in any order and the rules in any order; before, which row was derived and which rule derived it followed the order they were found in.
      Fixed key-clash-message-order is independent-of-order, was order-of-discovery logickey-clash-told-the-same.json
    • A database whose facts hold only beside every rule, such as two registered mothers of twins that an equality rule makes one, loads as it was saved, and saving the loaded database gives the same program; before, loading it failed with 'Adding this rule breaks an invariant'.
    • A begin in a rule body, a query, or a find runs every expression before its last, also one that waits for a logic variable: with pair checking its argument with schema/assert first, ["find", ["pair", "?item"], ["in", "?item", ["array/make", 3, "three"]]] fails with "three" does not fit "value/number?"., as ["pair", "three"] does. It gave [[3,3],["three","three"]].
    • A question before a begin's last expression in a rule, a query, or a find is not asked, but what it holds runs, as in plain code: ["begin", ["even", ["number/divide", 1, "?x"]], 3] fails for 0, where it gave 3.
      Fixed begin-question-before-last-holding-a-call is error, was dropped evaluationWhy A begin waits as a whole for an expression before its lastbegin-runs-what-waits.json Lion today
    • The graph editor shows a delay form as a promise that runs when forced, with an hourglass, where it showed a node with no description, and the editor type-checks again.
      Fixed editor-delay-node is promise, was undescribed editoreditor-delay-node.json

    Decided 38

    Rules 8

    Figures 19

  13. @lionlang/core 0.14.1 @lionlang/cli 0.13.1

    No invariant refuses a change that assuming only assumes: an invariant keeps the database, and an assumed change does not change it. In 0.14.0 an invariant whose filter asked with assuming could hold of different facts depending on whether it was declared before them or after, and one whose assuming added a new fact for each answer never finished. Now it holds of the same facts in any order and never asks itself again.

    • 3 Changed
    • 1 Decided
    4 changes

    Changed 3

    Decided 1

    • assuming makes its changes with keys and merges, and no invariant refuses them: an invariant keeps the database, and a change that is only assumed does not change the database.
      Decided assuming-and-invariants: invariants-keep-the-database over checked-like-fact, skipped-inside-invariants, because an assumed world that checked the invariants made an invariant that asks with assuming depend on the order of its facts and ask itself without end, and an invariant keeps the database, which an assumption does not change logicRecord An invariant does not refuse a change that assuming only assumesassuming-and-invariants.json
  14. @lionlang/core 0.14.0 @lionlang/cli 0.13.0

    Plain code is compiled to JavaScript functions and runs 9 to 25 times faster, and a call in tail position keeps nothing of the call it is in, so a loop runs in constant memory. ["assuming", change, ..., expression] asks what would hold after a change and leaves the database as it is. schema/open names the rest of a record or list, and a keyed relation can declare "merge", a lattice aggregate that joins the values its key gets. When a key or an equality rule makes values one, the value kept is their least, so answers no longer depend on the order of rules or facts; this is a breaking change, as is host code that read a scope's bindings through a Ref. A group whose rules invent unknowns follows a change to facts one component of values at a time, and a schema whose lambda asks about itself no longer runs Lion out of memory. Research runs share one Lion model in research/.

    • 2 Breaking
    • 15 Added
    • 2 Removed
    • 20 Changed
    • 4 Fixed
    • 14 Decided
    • 12 Rules
    • 17 Figures
    86 changes

    Breaking 2

    Added 15

    Removed 2

    Changed 20

    Fixed 4

    • The test helper attempt reports a function in a program's value as Lion writes it, wherever it stands: "even" for the relation even, ["lambda", ["n"], "n"] for a lambda. A program that ended in a declaration, such as ["begin", ["relation", "even", ["n"]]], made it throw "undefined" is not valid JSON, which failed the why property about rules that ask no question once in about 300 runs, and a function inside a list or a record was reported as null or left out. A property checks that two programs are reported the same only when their values are the same.
      Fixed test-report-function-value is written-as-lion, was error teststests-report-every-value.json
    • Two rows of a keyed aggregated relation that differ in a column that does not merge are now an error, as two rows rules give one key always were.
    • Each agent works in a folder of its own outside the repository, inside a folder that cannot be listed, and its prompts and transcripts are written straight to out/skill-eval/<run>/, which it never sees.
      Fixed skill-eval-agent-folder is outside-repository, was inside-repository skillsRecord A skill eval's agent works outside the repository, and never sees a transcriptskill-eval-outside-repository.json Lion today
    • The REPL's program graph shows an assuming form as a logic node that asks as if the database had changed, with the number of its changes. Without it the REPL did not type-check once assuming was a special form.
      Fixed repl-graph-assuming is logic-node, was type-error editorassuming-compiled.json

    Decided 14

    Rules 12

    Figures 17

  15. @lionlang/core 0.13.0 @lionlang/cli 0.12.0

    why explains a fact that does not hold as well as one that does: each rule that could have given it, the goals of its body that held, and what stopped it. It returned null before, so this is a breaking change. It marks with "assumed": true what could change once an unknown is known, and it shows the same derivation whatever order the facts arrived in. The lion-reasoning skill records what each experiment was expected to fix, and what is carried to a new score.

    • 7 Added
    • 20 Changed
    • 5 Decided
    • 7 Rules
    39 changes

    Added 7

    Changed 20

    Decided 5

    Rules 7

  16. @lionlang/core 0.12.0 @lionlang/cli 0.11.0

    The logic layer grows with its facts. What rules derive is kept and follows every change to the facts and the rules, in a full database and in a goal-directed query, instead of being derived again from nothing. A join runs in batches and keeps far less in memory, and a load under invariants or schemas no longer reads every row again for each form.

    • 6 Added
    • 9 Changed
    • 11 Decided
    • 7 Rules
    • 8 Figures
    41 changes

    Added 6

    • bun run scale times workloads at growing sizes, 1,000 to 100,000 facts and more, on the working tree or beside a commit with --against main, and says how each time grows: n^1.0 grows as the facts do, and n^2.0 as their square. It covers loading facts one form at a time and many, with invariants, schemas, and keys; asking every row and one; rules that join, aggregate, negate, and recurse; and changing a fact and asking again. Each run is a process of its own, and reports the memory it added at its peak and what the database keeps.
      Added bun-run-scale commandlogic-scaling.json
    • bun run mutate --in logic/model.ts,logic/database.ts runs only the mutations in files whose paths hold one of the words, so a change can run the mutations of the files it touched instead of the whole list.
      Added mutate-in-option optionlogic-scaling.json
    • bun run mutate breaks copies of the working tree under out/metrics/, as it stood when the run began, four at a time, so the code can be edited while it runs. --jobs says how many run at once.
    • bun run compare main --docs runs every program the docs show, the fenced json blocks of the README files, AGENTS.md, the guidelines in guidelines/, and each skill's SKILL.md and references/, on a commit and on the working tree, and lists the ones that give something else: the documented results a change made untrue.
      Added compare-docs-option optiondocumentation-procedure.json
    • Each guideline is a source of the project record, so the 85 claims that quoted AGENTS.md quote the file their sentence is in now
    • its opening and the sections that describe the language, from Basic Usage to Host Interop, word for word

    Changed 9

    Decided 11

    Rules 7

    Figures 8

  17. @lionlang/core 0.11.0 @lionlang/cli 0.10.0

    Rules that say something exists without saying what it is. A rule can give every person a mother nobody has named, and the value it invents is ordinary Lion data that a program can write, store, compare, and look up. Keys and equality rules make two such values one, and a goal-directed query shares what full evaluation has derived.

    • 2 Breaking
    • 57 Added
    • 3 Removed
    • 227 Changed
    • 10 Fixed
    • 25 Documentation
    • 26 Decided
    • 27 Rules
    • 67 Figures
    444 changes

    Breaking 2

    Added 57

    • exists in a rule head says the head holds for values nobody has given, and the rule invents them: ["rule", ["exists", ["?m"], ["mother", "?c", "?m"]], ["person", "?c"]] gives every person a mother. A rule invents only for an answer whose head does not hold already, so with ["mother", "ada", "eve"] it invents nothing for ada. Rules that invent wait until every rule that invents nothing has finished; then every rule that invents, and whose head does not hold, invents, all at once; the other rules run on what was invented; and so on until nothing more is invented. So the result does not depend on the order rules or facts were added in. A rule that invents cannot aggregate: ... both aggregates and lists variables in "exists". A rule that invents values cannot aggregate.
      Added existential-rules capability Added exists special-form786fdc0 existential-rules.json README.md
    • A rule head can be an and of relation calls, which adds a row to each: ["rule", ["and", ["p", "?x"], ["q", "?x"]], ["r", "?x"]]. Under exists, one unknown is in every row: ["exists", ["?m"], ["and", ["mother", "?c", "?m"], ["female", "?m"]]].
      Added rule-head-and capability786fdc0 existential-rules.json README.md
    • An invented value is an unknown, written ["some", "?m", ["mother", "ben", "?m"]]: the value ?m stands for in a row ["mother", "ben", ?m]. The form is ordinary Lion, and evaluating it gives the same unknown, so a program can write one, put it in a fact (["fact", ["tall", ["some", "?m", ["mother", "ben", "?m"]]]]), compare it, or look it up. Inside a rule, query, or find, some waits for the variables the rule binds, and every other variable of its goal is its own. With several variables in exists, each gets its own unknown, and its some mentions the others.
    • ["value/unknown?", x] is true for an unknown, so ["not", ["value/unknown?", "?m"]] keeps only known answers. value/object? is false for one.
      Added value/unknown? function786fdc0 existential-rules.json
    • why explains a row by an answer that gives it as it is, when one does, so after a key makes unknowns equal every row still rests only on rows explained before it. A row that a rule which invents gives only because a key or an equality rule made its unknown equal to another value ends with a new kind of premise, {"same": [unknown, value]}.
      Added why-same-premise capability786fdc0 existential-rules.json
    • Equality rules: a rule's head can be ["=", a, b], which says the two are one value whenever the body holds. While Lion derives the relations its body reads, an unknown a rule invented there takes the value on the other side, by the rule keys follow, so ["rule", ["=", "?m1", "?m2"], ["twin", "?a", "?b"], ["mother", "?a", "?m1"], ["mother", "?b", "?m2"]] gives twins one mother. The rule holds as the invariant ["and", goal, ..., ["not", ["=", a, b]]] too, so a rule that does not hold is not added and a change that leaves two different known values under it is refused, in an invariant's words. Lion follows each invented value through the columns of the rules, and the relations of a rule that invents an unknown an equality rule can meet are derived together with every relation the equality rule reads, so the unknown can pass through any number of derived relations first: with ["rule", ["listed", "?c", "?m"], ["mother", "?c", "?m"]], the rule ["rule", ["=", "?m", "?n"], ["listed", "?c", "?m"], ["birth", "?c", "?n"]] makes ben's unknown mother the one his birth record names. A question about those relations, such as a goal under not, would go through recursion, and is refused when the rule is added, whatever the facts, with the message any such question gets: Rule [...] asks about "private", which depends on "listed". A question, such as a goal under "not", cannot go through recursion. A question about columns no invented value reaches is allowed. A head can join relation calls and = with and.
      Added equality-rules capability Added invented-value-flow-tracking capabilityb030d8a existential-rules.json 1d5800a README.md
    • ["string/slice", text, start, end] and ["array/slice", list, start, end] cut a part out of text or a list, as JavaScript's slice does: a negative position counts from the end, a position past either end stops there, and without end the part runs to the end. ["string/slice", "lionlang", 0, 4] is "lion", and the two parts of a cut at any position join back into the whole. Like every library function, each waits for a logic variable and refuses a call with another number of arguments.
    • bun run history check fails on a finding of the model that is not listed in history/research/known.json or accepted with a reason; the record's tests run it, so CI does. bun run history ask asks the model anything, such as ["query", ["reversed", "?topic", "?before", "?after"]] for the decisions the project made one way and later another. A decision in history/decisions/ can carry "claims" quoted from its own words, so the model checks what it settles against every rule and behavior.
    • The project record. history/ keeps Lion's changes, releases, and design decisions as a Lion model of the git history. Entries are plain JSON files; every commit, parent, and tag, and the commit that added each file, are facts; and rules derive the rest, such as the release that shipped each change, which is the oldest release whose commit reaches every commit that made it. CHANGELOG.md and the new DECISIONS.md are written from the record by Lion expressions, with bun run history write. bun run history check fails on a feat or fix commit that no entry records, a quote that is not in the commit message it cites, a breaking change that follows from no decision, a version that does not rise, a tag on the wrong commit, or a page that is not what the record writes, and the tests and CI run it. bun run history ask asks the record anything.
      Added bun-run-history-check command Added project-record toolWhy Keep the changelog and the decisions as a Lion model of the git historyproject-record.json
    • a change is recorded in history/changes/, and bun run history write writes the page
    • A decision can say in the research's terms what it settles, with "claims" quoted from its own words, so it is checked against every rule and behavior as soon as it is written.
    • Rules in history/core.json derive the rest
    • CHANGELOG.md and DECISIONS.md are computed by the Lion expressions in history/outputs.json, and the record's tests fail when either file is not what the record writes
    • makeTypeSafeBindings accepts the TypeSafe SDK client configuration and an optional namespace.
      Added makeTypeSafeBindings functionREADME.md
    • A lookup on a research page can lead with an answer in words: "answer" is a lambda like its query, the page shows the sentence it gives for what the reader chose, and folds the rows under "Show the evidence". A lookup with more than twelve options is a box that finds them as the reader types, not a long list. page-check.json asks the answer with the example.
      Added research-lookup-answer optionresearch-model.json
    • bun run history research builds the model and the page docs/research.html, and fails on a finding in neither list and on a listed finding the model no longer finds
    • probes that run a program on Lion at HEAD are sources too
    • researches-recent-outage researches a live event on the web.
      Added researches-recent-outage toolREADME.md
    • The lion-reasoning skill keeps the record of an experiment loop, in the manner of autoresearch. Notes declare scores, numbers to make better, such as {"question": {"comparisons": "bench.mjs"}, "better": "lower"}, and directions, the ideas to try; an observation that tries a direction is an experiment of it. What a version is sure to give is its worst run: the best is the best of those, and a version has improved a score when its worst run beats the best that any earlier version was sure to give, so improved, best, score_in, and regressed follow the evidence and not one lucky run; runs of a score that differ are its spread rather than a dispute. A direction pays off when its experiment improves a score, and is set aside after as many misses in a row as its patience, 3 unless it says. The standing question "Where should the next experiment go?" lists the live directions, those that paid off most first.
      Added reasoning-best capability Added reasoning-improved capability Added reasoning-notes-directions capability Added reasoning-notes-scores capability Added reasoning-observation-tries capability Added reasoning-regressed capability Added reasoning-score-in capabilityWhy A direction or a lead is set aside after as many misses in a row as its patience, counted since its last payoff A version improves a score when its worst run beats the best that any earlier version was sure to giveskill-autoresearch.json
    • A lion-reasoning score can list what it requires, such as {"question": {"failing tests": "test.mjs"}, "value": 0}: a version where that is unanswered or answered otherwise has no score, and unmet lists it, so a change that breaks the tests never becomes the best. A direction can list what it needs; it waits while that is unanswered or not yet decided by whoever ask names, and is ruled_out once it is answered otherwise, so the user's answer prunes the directions.
      Added reasoning-direction-needs capability Added reasoning-ruled-out capability Added reasoning-score-requires capability Added reasoning-unmet capabilityRecord A version's runs of a score count only where what the score requires holdsWhy A version's runs of a score count only where what the score requires holdsskill-autoresearch.json score-requirements.json
    • Both skills use the one rule and the same names: paid_off, miss, exhausted, live, progress
      Added reasoning-exhausted capability Added reasoning-live capability Added reasoning-miss capability Added reasoning-paid-off capability Added reasoning-progress capability Added research-exhausted capability Added research-live capability Added research-miss capability Added research-paid-off capability Added research-progress capabilityRecord A direction or a lead is set aside after as many misses in a row as its patience, counted since its last payoffpatience-since-last-payoff.json
    • The reasoning skill now keeps the record of an experiment loop
    • The lion-research skill records leads, the lines of inquiry a research run follows: "leads": [{"id": "outside-warehouses", "statement": "…", "pursues": [{"warehouses": "tarnwell"}], "patience": 2}], and "for": ["outside-warehouses"] on each source read to follow one. A source pays off for a lead when it says something first-hand the lead covers; a lead is done when every question it pursues has an answer two publishers give first-hand, waits while the reader has not chosen a sense of one, and is set aside after as many sources in a row as its patience gave it nothing. The standing questions ask where the next search should go and how each lead ended, and the page's "How solid is it" shows the reader "What was looked for".
    • A probe can answer for a feature as well as a behavior: {"feature": "math/+", "kind": "function", "program": ["value/function?", "math/+"]} gives false, so the record that says math/+ is gone holds. ["lion/special-form?", name] tells a probe whether Lion has a special form of that name. bun run history check reports a feature's probe that gives neither true nor false, and a question two probes answer.
      Added feature-probes capability Added lion-special-form-question functionWhy A probe can read the repository, run a declared command, and answer for a featurerepository-probes.json
    • Every change and decision is recorded as claims in history/notes/, each a source's words and what they say, and history/changes/ and history/decisions/ are gone. bun run history write builds the model of Lion's development and writes every page from it, bun run history check fails on what the record's checks and the research find and on a page that is out of date, and bun run history ask asks the model.
    • A command that needs more than a line is a script in packages/history/commands/ that the line runs
    • A probe in history/research/probes.json can now say what the repository holds, not only what Lion does: ["repo/files", path] lists the files under a folder, ["repo/read", path] gives a file's text, ["repo/json", path] gives a JSON file as a value, and ["repo/run", name] runs a command declared in history/research/commands.json and gives {"exit", "output"}. So a decision record can assert how the project is set up and be checked: ["cond", [["string/includes", ["repo/read", ".husky/pre-commit"], "bun run test"], ["quote", "runs-tests"]], ["else", ["quote", "other"]]] gives "runs-tests", which is what the record of the quality gates asserts of the pre-commit hook.
      Added probe-commands-file file Added repo-files function Added repo-json function Added repo-read function Added repo-run functionWhy A probe can read the repository, run a declared command, and answer for a featurerepository-probes.json

    Removed 3

    Changed 227

    • A relation that rules invent rows of is derived in full, as an aggregated relation is, and so is a relation derived together with one because an equality rule reads it. A goal-directed query gives the same answers.
      Changed equality-group-relation-derivation is in-full logic Changed goal-directed-equality-group-relation is same-as-full logic Changed goal-directed-invented-relation is same-as-full logic Changed invented-relation-derivation is in-full logicexistential-rules.json 1d5800a 786fdc0
    • exists in a rule head says the head holds for values nobody has given, and the rule invents them: ["rule", ["exists", ["?m"], ["mother", "?c", "?m"]], ["person", "?c"]] gives every person a mother. A rule invents only for an answer whose head does not hold already, so with ["mother", "ada", "eve"] it invents nothing for ada. Rules that invent wait until every rule that invents nothing has finished; then every rule that invents, and whose head does not hold, invents, all at once; the other rules run on what was invented; and so on until nothing more is invented. So the result does not depend on the order rules or facts were added in. A rule that invents cannot aggregate: ... both aggregates and lists variables in "exists". A rule that invents values cannot aggregate.
      Changed existential-rule-aggregate is error logic Changed existential-rule-head-already-holds is invents-nothing logic786fdc0 existential-rules.json README.md
    • A rule head can be an and of relation calls, which adds a row to each: ["rule", ["and", ["p", "?x"], ["q", "?x"]], ["r", "?x"]]. Under exists, one unknown is in every row: ["exists", ["?m"], ["and", ["mother", "?c", "?m"], ["female", "?m"]]].
      Changed exists-and-head-unknown is one-unknown-in-every-row logic Changed rule-head-and-rows is row-in-each-relation logicexistential-rules.json
    • ["exists", ["?m", ...], goal] is also a goal: it holds when the goal holds for some value of each listed variable. The listed variables are its own wherever it stands, as a question's own variables are, and never appear in an answer. It is a question, so in plain code ["exists", ["?y"], ["=", "?y", 1]] is true, and it works in a query, a rule body, under not, in find, as a value, and in an invariant.
      Changed exists-goal is holds-for-some-value logic Changed exists-goal-in-find is allowed logic Changed exists-goal-in-invariant is allowed logic Changed exists-goal-in-query is allowed logic Changed exists-goal-in-rule-body is allowed logic Changed exists-goal-plain-code is true logic Changed exists-goal-under-not is allowed logic Changed exists-listed-variables is own-variables logic Changed exists-variables-in-answer is never logicexistential-rules.json 786fdc0 README.md
    • The README says what Lion does where the research model found it said otherwise. A cond condition counts as false when it is false, null, 0, or "", as the reference's truthiness rule already said, where the README said every string counts as true. A question in plain code is asked as soon as something needs its value, and a program or begin whose value is a goal gives the goal as written, so ["exists", ["?y"], ["=", "?y", 1]] is true as a value, as in ["value/identity", …], and not as a program; the reference says the same. The empty array [] evaluates to itself. The editor section no longer describes the outline, inspector, and source views it lost, its command is turbo dev --filter=@lionlang/repl, and the link to the agent's program no longer points into a local folder. AGENTS.md says bun run test, and packages/examples/CLAUDE.md says the tests use Vitest, as AGENTS.md does.
      Changed exists-goal-as-value is true logic Changed begin-result-goal is goal-as-written forms Changed cond-empty-string-condition is false forms Changed cond-null-condition is false forms Changed cond-zero-condition is false forms Changed program-result-goal is goal-as-written evaluationexistential-rules.json research-model.json README.md Lion today
    • An invented value is an unknown, written ["some", "?m", ["mother", "ben", "?m"]]: the value ?m stands for in a row ["mother", "ben", ?m]. The form is ordinary Lion, and evaluating it gives the same unknown, so a program can write one, put it in a fact (["fact", ["tall", ["some", "?m", ["mother", "ben", "?m"]]]]), compare it, or look it up. Inside a rule, query, or find, some waits for the variables the rule binds, and every other variable of its goal is its own. With several variables in exists, each gets its own unknown, and its some mentions the others.
      Changed exists-several-variables is unknown-per-variable logic Changed fact-with-some is adds-row-with-unknown logic Changed some-form-evaluation is same-unknown logic Changed some-form-several-variables is mentions-other-unknowns logic Changed some-goal-other-variables is own-variable logic Changed some-in-rule-bound-variable is waits logicexistential-rules.json
    • Facts may only contain JSON data, but ... is now Facts may only contain data, but ..., since a fact can hold an unknown. The rest of the message is unchanged. The other messages about a value that cannot be a row or an answer, such as The query produced an answer that is not data, say "data" too.
      Changed fact-not-data-message is says-data, was says-json-data errors Changed row-or-answer-not-data-messages is say-data errors786fdc0 existential-rules.json
    • A fact or retract can hold exists: ["fact", ["exists", ["?m"], ["mother", "ben", "?m"]]] adds the row with ben's unknown mother in it, the very row the rule above would invent. why takes one too.
      Changed fact-with-exists is adds-row-with-unknown logic Changed fact-with-exists-vs-invented-row is same-row logic Changed retract-with-exists is allowed logic Changed why-with-exists is allowed logic786fdc0 existential-rules.json README.md
    • A fact states rows, so it adds the row whether or not the head holds already.
      Changed fact-with-exists-head-already-holds is adds-row logic786fdc0 README.md
    • and an aggregate of a list in the head of a rule that invents, since a rule that invents cannot aggregate.
      Changed grid-aggregate-list-in-existential-head is refused metrics786fdc0
    • A key makes unknowns equal. When two rows of a keyed relation have the same key and differ only where one holds an unknown that a rule of the keyed relation, or of a relation in a recursive cycle with it, invented, the unknown takes the other row's value: a given value, or, when both are such unknowns, the one that sorts first. With {"key": "child"} on mother, "everyone has a mother" and "twins share a mother" give twins ben and cy the one unknown mother ["some", "?m", ["mother", "ben", "?m"]]. Two different given values are still an error, with the key's message, and an unknown that a fact holds is given, so a key never changes it. An unknown never takes a value that describes it, so of two invented unknowns where one describes the other, the one that describes takes the other.
      Changed keyed-rows-invented-unknown-vs-given is given-value logic Changed keyed-rows-two-given-values is error logic Changed keyed-rows-two-invented-unknowns is first-sorted logic Changed keyed-rows-unknown-describes-other is describing-one-takes-other logic Changed keyed-rows-unknown-held-by-fact is unchanged logic786fdc0 existential-rules.json README.md
    • An unknown is data, as a string is: rows, facts, answers, finds, and aggregates hold it. It equals itself and nothing else, and two unknowns are the same when they are written the same way. It sorts after every record, and unknowns sort by how they are written. A function that needs a number or a string fails on one, as it does on any value of the wrong kind. Lion stays closed-world: ["not", ["=", "?m", "eve"]] holds for ben's unknown mother.
      Changed not-equal-unknown-given-value is holds logic Changed number-function-on-unknown is error library Changed unknown-equals-itself is true logic Changed unknown-equals-other-value is false logic Changed unknown-held-as-data is in-rows-facts-answers-finds-aggregates logic Changed unknown-sort-among-unknowns is by-written-form logic Changed unknown-sort-position is after-records logic Changed unknowns-written-the-same is equal logic786fdc0 existential-rules.json README.md
    • The research and reasoning skills quote the new fact message, and the research skill's engine is rebuilt with this core.
      Changed reasoning-skill-fact-message-quote is says-data skills Changed research-engine-core is rebuilt skills Changed research-skill-fact-message-quote is says-data skillsexistential-rules.json
    • The check that evaluation finishes is weak acyclicity, one rule for computed and invented values. Values flow from the columns a rule's body reads to the columns of its head, and a rule may make a new value for a column, by computing it or inventing it, as long as that value never flows back, through the rules, into making another. ["rule", ["b", "?x", ["number/add", "?x", 10]], ["a", "?x"]] with ["rule", ["a", "?x"], ["b", "?x", "?y"]] used to be refused, since any computed value in a recursive rule's head was, and is now accepted. Every program accepted before is still accepted. A computed value that flows back is refused with the same message as before. An invented one is refused with Rule [...] invents a value for "?m" in its head while recursing, which may never finish. Invent the value in a rule that does not recurse.
      Changed recursive-rule-computed-value-flowing-back is error logic Changed recursive-rule-computed-value-not-flowing-back is accepted, was error logic Changed recursive-rule-head-variable-source is facts-or-new-values-that-never-flow-back, was facts logic Changed recursive-rule-invented-value-flowing-back is error logic786fdc0 existential-rules.json README.md Lion today
    • Snapshots write rules with exists heads as written, and unknowns in facts as their some forms, so the CLI's --database file keeps them.
      Changed snapshot-existential-rule is kept logic Changed snapshot-fact-with-unknown is kept logic Changed snapshot-unknown-form is some-form logic786fdc0 existential-rules.json README.md
    • a recursion bug the new properties found while writing (an unknown made equal to one describing it never finished)
      Changed unknown-merged-with-describing-unknown is finishes, was never-finished logic786fdc0
    • Unsafe rule head [...]: ?m never appears in a relation in the body. goes on to say To say the head holds for some value nobody has given, list it in "exists": ["exists", ["?m"], head].
      Changed unsafe-rule-head-message is suggests-exists errors786fdc0 existential-rules.json
    • ["value/unknown?", x] is true for an unknown, so ["not", ["value/unknown?", "?m"]] keeps only known answers. value/object? is false for one.
      Changed value-object-unknown is false library Changed value-unknown-on-unknown is true library786fdc0 existential-rules.json README.md
    • why explains a row by an answer that gives it as it is, when one does, so after a key makes unknowns equal every row still rests only on rows explained before it. A row that a rule which invents gives only because a key or an equality rule made its unknown equal to another value ends with a new kind of premise, {"same": [unknown, value]}.
      Changed why-after-key-merge is well-founded logic Changed why-key-merged-row is same-premise logic Changed why-equality-merged-row is same-premise logic Changed why-explanation-answer-choice is gives-row-as-is logic786fdc0 existential-rules.json b030d8a README.md
    • Its body cannot ask a question, such as a goal under not, about the group it runs with.
      Changed equality-rule-body-question-about-its-group is error logicb030d8a README.md
    • Equality rules: a rule's head can be ["=", a, b], which says the two are one value whenever the body holds. While Lion derives the relations its body reads, an unknown a rule invented there takes the value on the other side, by the rule keys follow, so ["rule", ["=", "?m1", "?m2"], ["twin", "?a", "?b"], ["mother", "?a", "?m1"], ["mother", "?b", "?m2"]] gives twins one mother. The rule holds as the invariant ["and", goal, ..., ["not", ["=", a, b]]] too, so a rule that does not hold is not added and a change that leaves two different known values under it is refused, in an invariant's words. Lion follows each invented value through the columns of the rules, and the relations of a rule that invents an unknown an equality rule can meet are derived together with every relation the equality rule reads, so the unknown can pass through any number of derived relations first: with ["rule", ["listed", "?c", "?m"], ["mother", "?c", "?m"]], the rule ["rule", ["=", "?m", "?n"], ["listed", "?c", "?m"], ["birth", "?c", "?n"]] makes ben's unknown mother the one his birth record names. A question about those relations, such as a goal under not, would go through recursion, and is refused when the rule is added, whatever the facts, with the message any such question gets: Rule [...] asks about "private", which depends on "listed". A question, such as a goal under "not", cannot go through recursion. A question about columns no invented value reaches is allowed. A head can join relation calls and = with and.
      Changed equality-rule-change-leaving-two-known-values is refused logic Changed equality-rule-not-holding-when-added is not-added logic Changed equality-rule-question-columns-unreached is allowed logic Changed equality-rule-question-on-invented-path is refused logic Changed equality-rule-unknown-from-lower-group is merged, was reported-by-invariant logic Changed equality-rule-unknown-through-derived-copy is merged, was refused logic Changed rule-head-and-with-equals is allowed logicb030d8a existential-rules.json 1d5800a README.md
    • An unknown invented for a relation below that one cannot change any more, and the invariant reports it.
      Changed equality-rule-unknown-from-lower-group is reported-by-invariant logicb030d8a
    • exists goes over relation calls only.
      Changed exists-over-equals is error logicb030d8a README.md
    • a new column, "equality rule", agrees with plain code in every cell; 3 exceptions, all documented, as before.
      Changed grid-equality-rule-column is same-as-plain-code metricsb030d8a
    • An equality rule that no invented value can reach, such as one whose body reads only facts, has nothing to make one, and the invariant keeps it
      Changed equality-rule-reached-by-no-invented-value is invariant-only logic1d5800a README.md
    • A query may now derive a whole relation where it used to derive a copy of it, when it knows nothing about it
      Changed goal-directed-goal-without-known-argument is reads-full-relation, was copy logicRecord Goal-directed queries share what is derived in full, and a relation is derived when a goal first reads itgoal-directed-shares-full-relations.json Lion today
    • Goal-directed queries are no longer hundreds of times slower than full evaluation on a large model asked many questions. A goal that knows none of its arguments now reads the relation itself, which the database derives once and keeps for every later query, instead of each query deriving a copy that holds every row anyway; a query that knows an argument of a relation the database already holds in full looks its rows up there; and a rule whose known argument sits inside a record pattern or a schema, such as ["claim", "?c", ["schema/open", {"topic": "?t"}]], runs as written and keeps the rows asked about, instead of scanning claim once for each value asked about. On the research model of Lion's own development, the 37 questions of its page took 36.6 seconds goal-directed and 0.12 seconds in full; they now take 0.11 seconds goal-directed. A host no longer needs new LogicDatabase({ goalDirected: false }) for such a model.
    • A relation is derived the first time a goal reads it with an answer to extend, in goal-directed and full evaluation alike, so a query never fails on a relation that no answer reaches. With ["rule", ["report", "?t"], ["audit", "?t"], ["broken", "?t"]] and no audit rows, ["query", ["report", "?t"]] gives [] even when deriving broken would fail; it used to derive broken before running the rule, and fail.
      Changed goal-directed-vs-full-failure-on-underived-row is same logic Changed query-failing-relation-no-answer-reaches is empty-list, was error logic Changed relation-derivation-time is first-read-with-answer, was before-rule-runs logicWhy Goal-directed queries share what is derived in full, and a relation is derived when a goal first reads itgoal-directed-shares-full-relations-changes.json
    • Neither strategy fails on a relation that no answer reaches
    • Every value, sorted, duplicates kept
      Changed aggregate-collect-order is sorted libraryREADME.md
    • Called on anything else, it waits for the list its argument turns out to be; a find is the list of what it found.
      Changed aggregate-on-non-list is waits libraryREADME.md
    • ["string/slice", text, start, end] and ["array/slice", list, start, end] cut a part out of text or a list, as JavaScript's slice does: a negative position counts from the end, a position past either end stops there, and without end the part runs to the end. ["string/slice", "lionlang", 0, 4] is "lion", and the two parts of a cut at any position join back into the whole. Like every library function, each waits for a logic variable and refuses a call with another number of arguments.
      Changed array-slice-negative-position is from-end library Changed slice-logic-variable-argument is waits logic Changed slice-position-past-end is stops-at-end library Changed slice-without-end is runs-to-end library Changed slice-wrong-arity is error library Changed string-slice-cut-then-join is same-text library Changed string-slice-end is exclusive library Changed string-slice-negative-position is from-end libraryWhy Text built on Lion is computed by Lion expressions, not filled into a template, and a helper any program would want goes into the standard libraryproject-record.json README.md
    • The record was backfilled from git. Every entry of the hand-written changelog is tied to the commits that made it, and lands, by ancestry alone, in the release it was written under. The releases of @lionlang/core 0.1.0 and 0.1.1, which had no changelog, have sections now, and 0.2.0 lists the @lionlang/cli package it introduced. The decisions behind Lion's design, from the first commit on, each quote the commit messages they rest on, and every feat and fix commit since the first is recorded.
      Changed backfilled-changelog-entry-release is release-written-under record Changed changelog-core-0-1-0-section is present, was absent record Changed changelog-core-0-1-1-section is present, was absent record Changed changelog-core-0-2-0-cli-package is listed record Changed decisions-cite-commit-messages is quoted record Changed feat-and-fix-commits-recorded is all record Changed project-record-backfilled is from-git recordWhy Keep the changelog and the decisions as a Lion model of the git historyproject-record.json
    • The project record. history/ keeps Lion's changes, releases, and design decisions as a Lion model of the git history. Entries are plain JSON files; every commit, parent, and tag, and the commit that added each file, are facts; and rules derive the rest, such as the release that shipped each change, which is the oldest release whose commit reaches every commit that made it. CHANGELOG.md and the new DECISIONS.md are written from the record by Lion expressions, with bun run history write. bun run history check fails on a feat or fix commit that no entry records, a quote that is not in the commit message it cites, a breaking change that follows from no decision, a version that does not rise, a tag on the wrong commit, or a page that is not what the record writes, and the tests and CI run it. bun run history ask asks the record anything.
      Changed change-shipped-in-release is oldest-release-reaching-every-commit record Changed changelog-md-written-by is lion-expressions record Changed decisions-md-written-by is lion-expressions record Changed history-check-breaking-change-without-decision is fails record Changed history-check-in-tests-and-ci is runs record Changed history-check-page-out-of-date is fails record Changed history-check-quote-not-in-cited-commit is fails record Changed history-check-tag-on-wrong-commit is fails record Changed history-check-unrecorded-feat-or-fix-commit is fails record Changed history-check-version-not-rising is fails record Changed project-record-entries is plain-json-files record Changed project-record-git-facts is commits-parents-tags-added-files recordWhy Keep the changelog and the decisions as a Lion model of the git historyproject-record.json
    • CHANGELOG.md and DECISIONS.md are computed by the Lion expressions in history/outputs.json, and the record's tests fail when either file is not what the record writes
      Changed changelog-not-what-record-writes is tests-fail recordRecord Keep the changelog and the decisions as a Lion model of the git historyproject-record-in-lion.json Lion today
    • A commit that adds a feature or a fix without an entry fails the check from the next commit on, and in CI, which now fetches the whole history
      Changed ci-git-history-depth is full build Changed feat-commit-without-entry is check-fails recordRecord Keep the changelog and the decisions as a Lion model of the git historyproject-record-in-lion.json Lion today
    • bun run history check fails on a finding of the model that is not listed in history/research/known.json or accepted with a reason; the record's tests run it, so CI does. bun run history ask asks the model anything, such as ["query", ["reversed", "?topic", "?before", "?after"]] for the decisions the project made one way and later another. A decision in history/decisions/ can carry "claims" quoted from its own words, so the model checks what it settles against every rule and behavior.
      Changed decision-claims-checked-by-research-model is against-every-rule-and-behavior record Changed history-check-in-ci is runs-in-record-tests process Changed history-check-unlisted-finding is fails recordWhy Keep a research model of Lion's development that checks the project against itselfresearch-model.json
    • A database keeps what it derived when facts change and follows the change through it, so a change costs what it reaches: a row that an answer using a changed row gave is taken out and derived again, through relation goals, goals under not, aggregates, and recursion. With one million facts, adding a fact and asking every group's total again takes 23 milliseconds, where it took 1.6 seconds, and a rule with not takes 8 milliseconds, where it took 1.1 seconds. Answers are the same as before; the order they are found in can differ with the changes a database has seen, so use "order" when it matters.
    • an unknown that the rules of the group it runs with invented takes the other value, a given one, or of two such unknowns the one that nests fewer unknowns, and of those the one that sorts first.
      Changed equality-rule-invented-unknown-vs-given is given-value logicREADME.md
    • So the result does not depend on the order rules or facts were added in.
      Changed existential-result-rule-order is independent logicREADME.md
    • So does a program, or a begin, whose value is a goal: it gives the goal as written.
      Changed goal-as-program-result is as-written logicREADME.md
    • Relations that are aggregated, computed by an algorithm, or asked about, under not, in a find, or as a value, are derived in full, along with everything they depend on.
      Changed goal-directed-asked-relation is computed-in-full logicREADME.md
    • A relation that rules invent rows of is derived in full, as an aggregated relation is.
      Changed goal-directed-invented-relation-derivation is computed-in-full logicREADME.md
    • Which invariants are asked never changes whether a change is kept.
      Changed invariant-incremental-vs-full is same-result logicREADME.md
    • Invariants take only the "assert" option, read as written.
      Changed invariant-options-evaluated is not-evaluated logicREADME.md
    • Nor does a key change an unknown invented for a relation that the keyed relation only reads.
      Changed keyed-rows-unknown-invented-for-read-relation is unchanged logicREADME.md
    • A record or list with a logic variable in it.
      Changed logic-variable-nested-in-array is waits logicREADME.md
    • and so does a misspelled name inside a predicate, where any other failure means the value does not fit.
      Changed misspelled-name-inside-predicate is error schemasREADME.md
    • It reads what JSON writes, and also zeros before the digits and "−" as the minus sign.
      Changed number-fromString-leading-zeros is read library Changed number-fromString-unicode-minus is read libraryREADME.md
    • A lookup on a research page can lead with an answer in words: "answer" is a lambda like its query, the page shows the sentence it gives for what the reader chose, and folds the rows under "Show the evidence". A lookup with more than twelve options is a box that finds them as the reader types, not a long list. page-check.json asks the answer with the example.
      Changed page-check-lookup-answer is asked-with-example skills Changed research-lookup-answer-kind is lion-function skills Changed research-lookup-evidence-rows is folded skills Changed research-lookup-many-options is search-box skillsresearch-model.json
    • A goal that binds through a pattern gives what the same goal gives when another goal has bound its variables first.
      Changed pattern-goal-before-binding-goal is same-answers schemasREADME.md
    • A checked model of Lion's development, in history/research/. Every statement each commit made, quoted from its message and diff, what the README, AGENTS.md, and CLAUDE.md say now, the claims of each recorded decision, and what Lion at HEAD does in each probed case are one Lion model, built with the lion-research skill, and the record is part of it. Rules over it find where the project disagrees with itself: rules in force that predict different behavior for one case, behavior that breaks a rule in force, removals and breaking changes in commits that record no decision, figures that do not chain, and docs that do not say what Lion does.
      Changed project-record-in-research-model is included record Changed research-model-built-with is lion-research-skill record Changed research-model-finding-behavior-breaks-rule is reported record Changed research-model-finding-breaking-change-without-decision is reported record Changed research-model-finding-docs-disagree-with-lion is reported record Changed research-model-finding-figures-not-chaining is reported record Changed research-model-finding-removal-without-decision is reported record Changed research-model-finding-rules-predict-differently is reported record Changed research-model-sources is commits-docs-decisions-probes recordWhy Keep a research model of Lion's development that checks the project against itselfresearch-model.json
    • Options are read as written, like a relation's column list.
      Changed query-options-evaluated is not-evaluated logicREADME.md
    • Relations, goals, and logic variables are ordinary values, so rules and queries use the same JSON syntax as the rest of the language and query results are plain Lion data.
      Changed query-result-type is plain-data logicREADME.md
    • Checks list every feat or fix commit that no entry records, every quote that is not in the commit message it cites, every breaking change that follows from no decision, and every release whose versions do not rise or whose tag points elsewhere
      Changed record-breaking-change-without-decision is listed record Changed record-quote-not-in-commit-message is listed record Changed record-release-versions-not-rising is listed recordRecord Keep the changelog and the decisions as a Lion model of the git historyproject-record-in-lion.json Lion today
    • The record runs on the workspace's own @lionlang/core, so a change to Lion that breaks the record's rules fails the tests
    • A file renamed with nothing else changed keeps the commit that added it
      Changed record-file-renamed-unchanged is keeps-adding-commit recordRecord Keep the changelog and the decisions as a Lion model of the git historyproject-record-in-lion.json Lion today
    • git's renames by likeness are not followed
      Changed record-rename-by-likeness is not-followed recordRecord Keep the changelog and the decisions as a Lion model of the git historyproject-record-in-lion.json Lion today
    • and on a listed finding the model no longer finds
      Changed research-listed-finding-no-longer-found is fails-check recordRecord Keep a research model of Lion's development that checks the project against itselfresearch-model-of-development.json Lion today
    • a new one fails the record's tests until someone decides about it
    • The research skill's page shows how far it has got. While Lion opens the model, a line under the title says so, then "Working out the answers: 3 of 15" with a bar, and every view shows its questions at once, each with "Working this out from the model…" until it is worked out, the view the reader has open first. It used to stay empty until every view was done.
      Changed research-page-open-view is worked-out-first skills Changed research-page-progress is shown, was empty-until-every-view-done skills Changed research-page-questions-before-answers is shown-at-once skillsresearch-model.json
    • On a research page, "Query the model" is a link at the end of the last view instead of a tab, so the tabs hold only what the reader came for.
      Changed research-page-query-the-model is link-after-last-view, was tab skillsresearch-model.json
    • A commit nobody has read yet is listed but does not fail the check.
      Changed research-unread-commit is listed-without-failing recordRecord Keep a research model of Lion's development that checks the project against itselfresearch-model-of-development.json Lion today
    • In the research model, what a rule predicts for a case is what its latest statement naming that case predicts, so a rule reworded to allow a case, as the editor's connector rule was, stops predicting the old behavior.
    • schema/allOf reports the problems of every schema the value does not fit.
      Changed schema-allOf-problems is every-failed-schema schemasREADME.md
    • schema/anyOf reports one problem, at the value that fits none of its schemas.
      Changed schema-anyOf-problems is one-problem schemasREADME.md
    • ["schema/assert", "?doc", "Order"] as a value in a rule fails the query that runs the rule when a value does not fit.
      Changed schema-assert-in-rule-misfit is error schemasREADME.md
    • A predicate that fails, or returns anything but true, does not fit.
      Changed schema-predicate-error is no-fit schemas Changed schema-predicate-returns-non-true is no-fit schemasREADME.md
    • A record fits a record with the same keys, with values that fit.
      Changed schema-record-same-keys is fit schemasREADME.md Lion today
    • A shape cannot ask the database while it is declared, since a snapshot writes the shape and it has to mean the same when it is loaded.
      Changed schema-shape-asking-database is refused schemasREADME.md
    • A shape can name the schemas of its form, but cannot call them: ["Expr", 1] inside the form fails, since Expr has no shape yet.
      Changed schema-shape-calling-own-form-schema is error schemasREADME.md
    • Evaluating the program into an empty database gives the same answers, so a snapshot is a save file that is also ordinary Lion you can read, edit, diff, and run.
      Changed snapshot-reload-answers is same logicREADME.md Lion today
    • Nothing may compute with one of its own variables; that is an error.
      Changed some-computing-with-own-variable is error logicREADME.md
    • They compare values, so a function in the record is a value there, and not a predicate.
      Changed unify-record-pattern-function is compared-as-value schemasREADME.md
    • why explains facts with every relation computed in full.
      Changed why-relation-derivation is computed-in-full logicREADME.md
    • A payoff starts the count again, as patience does in early stopping
    • it stays in the model with why
    • The research page check's last entry says how to fix what it lists: Questions the plan names that a choice set aside, or that have readings nobody chose between. This must be empty: reach each through meant, or ask the reader which sense they mean. build-explorer.mjs reminds the agent to run it whenever the plan names questions as records, and the skill says the check must give [].
      Changed page-check-last-entry is says-how-to-fix skills Changed research-build-explorer-page-check-reminder is when-plan-names-questions skillsskill-autoresearch.json
    • a change is not kept until both have run on it
      Changed reasoning-change-before-requirement-run is not-kept skillsRecord A version's runs of a score count only where what the score requires holdsscore-requirements.json Lion today
    • The skill tells the agent to fix or drop such a change and never to relax the requirement to let a score count.
      Changed reasoning-change-failing-requirement is fixed-or-dropped skillsRecord A version's runs of a score count only where what the score requires holdsscore-requirements.json Lion today
    • The files as they are now have regressed when every run on them is worse than the best.
      Changed reasoning-current-runs-all-worse-than-best is regressed skillsRecord A version improves a score when its worst run beats the best that any earlier version was sure to givescore-improves-past-noise.json Lion today
    • an answer otherwise rules a direction out
    • A lion-reasoning score can list what it requires, such as {"question": {"failing tests": "test.mjs"}, "value": 0}: a version where that is unanswered or answered otherwise has no score, and unmet lists it, so a change that breaks the tests never becomes the best. A direction can list what it needs; it waits while that is unanswered or not yet decided by whoever ask names, and is ruled_out once it is answered otherwise, so the user's answer prunes the directions.
      Changed reasoning-direction-need-answered-otherwise is ruled-out skills Changed reasoning-direction-need-unanswered is waits skills Changed reasoning-version-failing-requirement is no-score skillsWhy A version's runs of a score count only where what the score requires holdsskill-autoresearch.json
    • A direction or lead can also wait: on a question it needs that only the user may answer (reasoning), or on the reader's choice of a sense of a question it pursues (research)
      Changed reasoning-direction-needing-user-answer is waits skills Changed research-lead-ambiguous-question is waits skillsRecord A direction or a lead is set aside after as many misses in a row as its patience, counted since its last payoffpatience-since-last-payoff.json Lion today
    • The lion-reasoning skill keeps the record of an experiment loop, in the manner of autoresearch. Notes declare scores, numbers to make better, such as {"question": {"comparisons": "bench.mjs"}, "better": "lower"}, and directions, the ideas to try; an observation that tries a direction is an experiment of it. What a version is sure to give is its worst run: the best is the best of those, and a version has improved a score when its worst run beats the best that any earlier version was sure to give, so improved, best, score_in, and regressed follow the evidence and not one lucky run; runs of a score that differ are its spread rather than a dispute. A direction pays off when its experiment improves a score, and is set aside after as many misses in a row as its patience, 3 unless it says. The standing question "Where should the next experiment go?" lists the live directions, those that paid off most first.
      Changed reasoning-direction-payoff is experiment-improves-score skills Changed reasoning-next-experiment-question is live-directions-most-paid-off-first skills Changed reasoning-observation-trying-direction is experiment skills Changed reasoning-score-differing-runs is spread skills Changed reasoning-version-sure-to-give is worst-run skillsWhy A direction or a lead is set aside after as many misses in a row as its patience, counted since its last payoff A version improves a score when its worst run beats the best that any earlier version was sure to giveskill-autoresearch.json
    • On an earlier version, it can only keep an improvement or make it larger
    • The list of where to try next puts the live directions that paid off most first, then those tried least
    • The skill asks for the same number of runs on each version
    • The best a score has been is the best of those across versions.
      Changed reasoning-score-best is best-sure-to-give-across-versions skillsRecord A version improves a score when its worst run beats the best that any earlier version was sure to givescore-improves-past-noise.json Lion today
    • With one run each this is beating the best so far.
    • Where one is unanswered, or answered otherwise in any run, the version has no score: no range, no best, no improvement.
      Changed reasoning-score-requirement-unmet is no-score skillsRecord A version's runs of a score count only where what the score requires holdsscore-requirements.json Lion today
    • Runs of a score that differ are its spread, so disputed leaves scores out.
    • what the version is sure to give is its worst run
    • why on an improvement ends in the runs it compared and a check such as ["number/lessThan", 62, 117]
    • The lion-research skill saves its written answer as report.md in the research folder on every run, not only when the user asks for a file, and gives the user the same words. In the skill's eval, one of two runs before the change wrote no report and failed the five checks that read it; both runs after it wrote one.
      Changed research-answer-and-report is same-words skills Changed research-report-md is every-run, was only-when-asked skillsskill-autoresearch.json
    • Disputes do not hold a lead open
    • a record covers every answered question that has its keys and values
      Changed research-lead-pattern-coverage is matching-keys-and-values skillsRecord A research lead is done when every question it pursues has an answer two publishers give first-handlead-done-when-confirmed.json Lion today
    • The lion-research skill records leads, the lines of inquiry a research run follows: "leads": [{"id": "outside-warehouses", "statement": "…", "pursues": [{"warehouses": "tarnwell"}], "patience": 2}], and "for": ["outside-warehouses"] on each source read to follow one. A source pays off for a lead when it says something first-hand the lead covers; a lead is done when every question it pursues has an answer two publishers give first-hand, waits while the reader has not chosen a sense of one, and is set aside after as many sources in a row as its patience gave it nothing. The standing questions ask where the next search should go and how each lead ended, and the page's "How solid is it" shows the reader "What was looked for".
      Changed research-lead-sense-not-chosen is waits skills Changed research-page-what-was-looked-for is shown skills Changed research-source-lead-payoff is first-hand-covered-statement skills Changed research-standing-questions-leads is next-search-and-lead-outcomes skillsWhy A research lead is done when every question it pursues has an answer two publishers give first-hand A direction or a lead is set aside after as many misses in a row as its patience, counted since its last payoffskill-autoresearch.json
    • Senses the reader set aside are not covered
    • A question only one publisher can answer never finishes its lead
      Changed research-lead-single-publisher-question is never-done skillsRecord A research lead is done when every question it pursues has an answer two publishers give first-handlead-done-when-confirmed.json Lion today
    • The research recorder numbers the sources read for leads in the order their notes are recorded
    • A goal-directed query that knows an argument a rule's head computes by asking a question of its own, such as ["query", ["meant", {"revenue": "t"}, "?q"]] over ["rule", ["base", "?q", ["array/reduce", ["find", "?key", ["reading", "?key"]], "?q", ["lambda", ["rest", "key"], ["object/remove", "rest", "key"]]]], ["answer", "?q", "?_"]] and ["rule", ["meant", "?base", "?q"], ["base", "?q", "?base"]], gives the answers of full evaluation again, instead of failing with an internal error, undefined is not an object (evaluating 'literal.parts'). The rewrite took the find's own ?key for a variable the rule had to bind first. This is the meant relation of the lion-research skill. The rewrite now follows the asking rule wherever it asks what a value needs: a query whose argument is computed by a question with variables of its own, such as ["path", ["array/reduce", ["find", "?a", ["start", "?a"]], 0, ["lambda", ["sum", "a"], ["number/add", "sum", "a"]]], "?to"], now derives only what it reaches, as one that writes the value does.
    • A commit counts as read when a claim was made by it, so a commit that records its change in history/notes/ is not listed among the commits the model has nothing from.
    • deciding a question again differently is a reversal the model derives
    • DECISIONS.md lists every decided question, oldest first, with each answer it was given and the records that explain it, and for each thing a record asserts, whether it holds when Lion is run, is broken, is only stated, or was replaced by a later word.
    • A probe can answer for a feature as well as a behavior: {"feature": "math/+", "kind": "function", "program": ["value/function?", "math/+"]} gives false, so the record that says math/+ is gone holds. ["lion/special-form?", name] tells a probe whether Lion has a special form of that name. bun run history check reports a feature's probe that gives neither true nor false, and a question two probes answer.
    • ["lion/special-form?", name] says whether Lion has a special form of that name
    • repo/files gives no paths for a path that names nothing
    • ["repo/files", path] gives the paths of the files under a folder of the repository
    • A path that leads out of the repository, a path that names no file, and a command the file does not declare each fail
      Changed probe-path-outside-repository is error record Changed probe-runs-undeclared-command is error recordRecord A probe can read the repository, run a declared command, and answer for a featureprobes-observe-the-repository.json Lion today
    • ["repo/json", path] gives a JSON file as a value
    • ["repo/read", path] gives the text of a file of the repository
    • runs a command that history/research/commands.json declares and gives its exit code and what it wrote
      Changed probe-runs-declared-command is exit-and-output recordRecord A probe can read the repository, run a declared command, and answer for a featureprobes-observe-the-repository.json Lion today

    Fixed 10

    • Goal-directed queries are no longer hundreds of times slower than full evaluation on a large model asked many questions. A goal that knows none of its arguments now reads the relation itself, which the database derives once and keeps for every later query, instead of each query deriving a copy that holds every row anyway; a query that knows an argument of a relation the database already holds in full looks its rows up there; and a rule whose known argument sits inside a record pattern or a schema, such as ["claim", "?c", ["schema/open", {"topic": "?t"}]], runs as written and keeps the rows asked about, instead of scanning claim once for each value asked about. On the research model of Lion's own development, the 37 questions of its page took 36.6 seconds goal-directed and 0.12 seconds in full; they now take 0.11 seconds goal-directed. A host no longer needs new LogicDatabase({ goalDirected: false }) for such a model.
      Fixed goal-directed-goal-knowing-no-arguments is reads-shared-relation, was derives-full-copy logic Fixed goal-directed-known-argument-in-pattern is runs-as-written, was scans-per-value logic Fixed goal-directed-known-argument-relation-held-in-full is looked-up-in-held-rows logic Fixed goal-directed-large-model-many-questions-speed is like-full-evaluation, was hundreds-of-times-slower logicWhy Goal-directed queries share what is derived in full, and a relation is derived when a goal first reads itgoal-directed-shares-full-relations-changes.json
    • A research page sends Lion one question at a time, so a question's time limit counts its own run and not its wait behind the others: on Lion's own research model two of the page's questions used to stop at the limit. build-explorer.mjs indexes each source's text once, not once per quote: building that page took 73 seconds and takes one.
      Fixed research-build-explorer-source-index is once-per-source, was once-per-quote skills Fixed research-page-question-time-limit is own-run, was includes-wait skills Fixed research-page-questions-sent is one-at-a-time skillsresearch-model.json
    • The research skill's page reads a published date written to the minute or second, such as 20261114144313, as its day, and its SKILL.md says to give the time when one publisher speaks several times a day, so its latest word is the one it said last.
      Fixed research-page-published-to-minute-or-second is read-as-day skillsresearch-model.json
    • A goal-directed query that knows an argument a rule's head computes by asking a question of its own, such as ["query", ["meant", {"revenue": "t"}, "?q"]] over ["rule", ["base", "?q", ["array/reduce", ["find", "?key", ["reading", "?key"]], "?q", ["lambda", ["rest", "key"], ["object/remove", "rest", "key"]]]], ["answer", "?q", "?_"]] and ["rule", ["meant", "?base", "?q"], ["base", "?q", "?base"]], gives the answers of full evaluation again, instead of failing with an internal error, undefined is not an object (evaluating 'literal.parts'). The rewrite took the find's own ?key for a variable the rule had to bind first. This is the meant relation of the lion-research skill. The rewrite now follows the asking rule wherever it asks what a value needs: a query whose argument is computed by a question with variables of its own, such as ["path", ["array/reduce", ["find", "?a", ["start", "?a"]], 0, ["lambda", ["sum", "a"], ["number/add", "sum", "a"]]], "?to"], now derives only what it reaches, as one that writes the value does.
    • A probe that sees a feature gone is no longer taken for the commit that removed it. Once the note that records a removal had a commit of its own, bun run history check reported the probe's observation, such as run-feature-decision-supersedes-field, as a removal that records no decision. A removal with no decision is now found only among what the repository's own sources say.
      Fixed removal-finding-source is repository-sources-only, was any-source recordWhy A probe can read the repository, run a declared command, and answer for a featureremoval-found-in-repository-sources.json

    Documentation 25

    • A how-to guide, "Say that something exists", and reference entries for exists, some, and value/unknown? on lionlang.dev. The guarantees state the new check that evaluation finishes, and "How Lion answers logic questions" explains how rules that invent fit Datalog.
      Documentation docs-existential-rules-in-datalog-explanation is explained docs Documentation docs-guarantees-termination-check is weak-acyclicity docs Documentation docs-reference-exists is documented docs Documentation docs-reference-some is documented docs Documentation docs-reference-value-unknown is documented docs Documentation docs-guide-say-that-something-exists pageexistential-rules.json
    • lionlang.dev/changelog.html shows the changelog as a timeline: every release on a line through time, newest first, with a pause of a month or more drawn as one, what each release shipped by kind, and the decisions it put into effect, each opening to its context, alternatives, and commits. Every change links to the decisions it follows and the commits that made it. A reader can filter by kind and search changes and decisions, and without JavaScript the page shows everything. The project record writes the page with Lion, as it writes CHANGELOG.md and DECISIONS.md, turning the record's Markdown into HTML itself, and the site's navigation links to it.
      Documentation changelog-change-links is decisions-and-commits site Documentation changelog-filter-by-kind is available site Documentation changelog-page-markdown-to-html is in-lion site Documentation changelog-page-written-by is lion-project-record site Documentation changelog-pause-of-a-month is drawn site Documentation changelog-release-changes is by-kind site Documentation changelog-release-decisions is open-to-context-alternatives-and-commits site Documentation changelog-release-order is newest-first site Documentation changelog-search is changes-and-decisions site Documentation changelog-without-javascript is everything-shown site Documentation site-navigation-changelog-link is present site Documentation changelog-timeline pageWhy Text built on Lion is computed by Lion expressions, not filled into a template, and a helper any program would want goes into the standard library Keep the changelog and the decisions as a Lion model of the git historychangelog-timeline.json
    • The README says what Lion does where the research model found it said otherwise. A cond condition counts as false when it is false, null, 0, or "", as the reference's truthiness rule already said, where the README said every string counts as true. A question in plain code is asked as soon as something needs its value, and a program or begin whose value is a goal gives the goal as written, so ["exists", ["?y"], ["=", "?y", 1]] is true as a value, as in ["value/identity", …], and not as a program; the reference says the same. The empty array [] evaluates to itself. The editor section no longer describes the outline, inspector, and source views it lost, its command is turbo dev --filter=@lionlang/repl, and the link to the agent's program no longer points into a local folder. AGENTS.md says bun run test, and packages/examples/CLAUDE.md says the tests use Vitest, as AGENTS.md does.
      Documentation readme-agent-program-link is in-repository, was local-folder docs Documentation readme-editor-command is turbo-dev-filter-lionlang-repl docs Documentation readme-statements-research-model-found-untrue is corrected docsresearch-model.json
    • The project record. history/ keeps Lion's changes, releases, and design decisions as a Lion model of the git history. Entries are plain JSON files; every commit, parent, and tag, and the commit that added each file, are facts; and rules derive the rest, such as the release that shipped each change, which is the oldest release whose commit reaches every commit that made it. CHANGELOG.md and the new DECISIONS.md are written from the record by Lion expressions, with bun run history write. bun run history check fails on a feat or fix commit that no entry records, a quote that is not in the commit message it cites, a breaking change that follows from no decision, a version that does not rise, a tag on the wrong commit, or a page that is not what the record writes, and the tests and CI run it. bun run history ask asks the record anything.
    • bun run history research builds the model and the page docs/research.html
    • The changelog at lionlang.dev/changelog.html lists each change and decision once, under the release that first shipped it, in the latest words said about it, with every commit and note that says it as a source. Its sections are Breaking, Added, Removed, Changed, Fixed, Documentation, Decided, Rules, and Figures, a filter shows one or more of them, and the findings that wait for a decision are listed above the timeline.
    • The research page and the commands bun run history research, query, sources, and probe are gone: the changelog shows what the page showed, and write, check, and ask do what the commands did.

    Decided 26

    • exists in a rule head says the head holds for values nobody has given, and the rule invents them: ["rule", ["exists", ["?m"], ["mother", "?c", "?m"]], ["person", "?c"]] gives every person a mother. A rule invents only for an answer whose head does not hold already, so with ["mother", "ada", "eve"] it invents nothing for ada. Rules that invent wait until every rule that invents nothing has finished; then every rule that invents, and whose head does not hold, invents, all at once; the other rules run on what was invented; and so on until nothing more is invented. So the result does not depend on the order rules or facts were added in. A rule that invents cannot aggregate: ... both aggregates and lists variables in "exists". A rule that invents values cannot aggregate.
      Decided chase-strategy: restricted-datalog-first-parallel, because the result does not depend on the order of rules or facts logic786fdc0 existential-rules.json
    • The check that evaluation finishes is weak acyclicity, one rule for computed and invented values. Values flow from the columns a rule's body reads to the columns of its head, and a rule may make a new value for a column, by computing it or inventing it, as long as that value never flows back, through the rules, into making another. ["rule", ["b", "?x", ["number/add", "?x", 10]], ["a", "?x"]] with ["rule", ["a", "?x"], ["b", "?x", "?y"]] used to be refused, since any computed value in a recursive rule's head was, and is now accepted. Every program accepted before is still accepted. A computed value that flows back is refused with the same message as before. An invented one is refused with Rule [...] invents a value for "?m" in its head while recursing, which may never finish. Invent the value in a rule that does not recurse.
      Decided termination-check: weak-acyclicity over no-computed-values-in-recursion, because one rule for computed and invented values, which accepts every program the old check did, and more, was no-computed-values-in-recursion logic786fdc0 existential-rules.json
    • the check now follows only rules that recurse, and isForm no longer allocates a list per call, which brought it back to main's time.
      Decided termination-check-scope: recursive-rules-only over every-rule, because a first version of the termination check made the research skill's model 15% slower logic786fdc0
    • A first version recomputed the dependency graph for every rule form, which made "300 rules added one form at a time" 0.86x; it now does so only when the program has an equality rule, and is at 1.01x.
      Decided dependency-graph-recompute: only-with-equality-rule over every-rule-form, because recomputing for every rule form made 300 rules added one form at a time 0.86x logicb030d8a
    • Keys were the only equality Lion had; this gives the general form, built from what Lion already has rather than beside it:
      Decided equality-generating-dependencies: equality-rule-head over keys-only, because it gives the general form, built from what Lion already has rather than beside it logicb030d8a
    • It runs with a relation its body reads that rules derive, one no other of them depends on, preferring one whose rules invent, so everything else it reads is complete first; its body cannot ask a question about that group.
      Decided equality-rule-placement: prefer-inventing-group, because so everything else it reads is complete first logic Reversed later: group-that-invents-what-it-meetsb030d8a
    • equalityHome loses its "prefer a group that invents" rule: an equality rule runs with the group that invents what it can meet, and with none it only holds as its invariant.
      Decided equality-rule-placement: group-that-invents-what-it-meets over prefer-inventing-group, because an equality rule could not make one an unknown invented in a group below it, was prefer-inventing-group logic1d5800a
    • any other goal reads the relation itself, which the database derives once and keeps for every later query
      Decided goal-directed-sharing: share-full-relations over full-evaluation-workaround, growing-model, copy-for-lookup-arguments-only, because a page that asks a model many different questions derived the same relations once per question logicRecord Goal-directed queries share what is derived in full, and a relation is derived when a goal first reads itgoal-directed-shares-full-relations.json
    • A copy's guard leads only when a relation goal of the rule can look rows up by what it binds
      Decided magic-guard-placement: lead-when-lookup over always-lead, because so a copy never does more than the rule logicRecord Goal-directed queries share what is derived in full, and a relation is derived when a goal first reads itgoal-directed-shares-full-relations.json
    • so nobody writes down which release a change is in
      Decided change-release-placement: ancestry over written-release recordRecord Keep the changelog and the decisions as a Lion model of the git historyproject-record-in-lion.json
    • history/research/ holds a model of Lion's development built with the lion-research skill.
      Decided development-model: separate-research-model over review-by-hand, because nobody can hold every rule and every behavior in mind, and the inconsistencies the model found had gone unnoticed by every commit that made them record Reversed later: one-record-of-claimsRecord Keep a research model of Lion's development that checks the project against itselfresearch-model-of-development.json
    • The project record. history/ keeps Lion's changes, releases, and design decisions as a Lion model of the git history. Entries are plain JSON files; every commit, parent, and tag, and the commit that added each file, are facts; and rules derive the rest, such as the release that shipped each change, which is the oldest release whose commit reaches every commit that made it. CHANGELOG.md and the new DECISIONS.md are written from the record by Lion expressions, with bun run history write. bun run history check fails on a feat or fix commit that no entry records, a quote that is not in the commit message it cites, a breaking change that follows from no decision, a version that does not rise, a tag on the wrong commit, or a page that is not what the record writes, and the tests and CI run it. bun run history ask asks the record anything.
      Decided project-record-form: lion-model-of-git-history recordWhy Keep the changelog and the decisions as a Lion model of the git historyproject-record.json
    • Keep the changelog and the decisions as a Lion model of the git history
      Decided project-record-format: lion-model-of-git over markdown-records, changesets, saved-database, because nothing else checks the entries against git or against each other recordRecord Keep the changelog and the decisions as a Lion model of the git historyproject-record-in-lion.json
    • The model is rebuilt from git, the notes, the decisions, and Lion itself, so only the notes, the probes, the lists of findings, and the page are kept in git.
      Decided research-model-storage: rebuilt-from-sources over model-in-git, because the model changes with every commit and would always be out of date in the commit that writes it recordRecord Keep a research model of Lion's development that checks the project against itselfresearch-model-of-development.json
    • A list of known findings, like the interop grid's, keeps them visible while it waits for a decision, and fails only on what is new.
      Decided research-open-findings: known-findings-list over fail-on-every-finding, because the history cannot be changed, so a finding in an old commit would fail every build until someone accepted it without deciding anything recordRecord Keep a research model of Lion's development that checks the project against itselfresearch-model-of-development.json
    • A direction or a lead is set aside after as many misses in a row as its patience, counted since its last payoff
      Decided direction-stopping: patience-since-last-payoff over every-miss, fixed-budget, because the most productive direction also misses most often in absolute terms skillsRecord A direction or a lead is set aside after as many misses in a row as its patience, counted since its last payoffpatience-since-last-payoff.json
    • it is advice, and the agent says why when it goes against it
      Decided next-experiment-choice: agent-decides over model-chooses, because which idea to try next weighs things the model does not hold, such as cost skillsRecord A direction or a lead is set aside after as many misses in a row as its patience, counted since its last payoffpatience-since-last-payoff.json
    • A research lead is done when every question it pursues has an answer two publishers give first-hand
      Decided research-lead-done: corroborated over undisputed, any-answer, because the core already says what confirmation is: an answer two publishers give first-hand skillsRecord A research lead is done when every question it pursues has an answer two publishers give first-handlead-done-when-confirmed.json
    • one rule each for lower and higher, where negating lower-is-better scores would have saved three rules and shown -62 > -117
      Decided score-direction: rule-per-direction over negate-lower-is-better, because the rules compare the values as recorded, so why shows the values as they were measured skillsRecord A version improves a score when its worst run beats the best that any earlier version was sure to givescore-improves-past-noise.json
    • A version improves a score when its worst run beats the best that the versions which appeared before it were sure to give
      Decided score-improvement: worst-run-beats-best-sure over every-run-beats-every-run, mean-of-runs, declared-margin, one-run-against-one-run, because best, improvement, and regression rest on what a version is sure to give, so a lucky run counts on neither side skillsRecord A version improves a score when its worst run beats the best that any earlier version was sure to givescore-improves-past-noise.json
    • A score can list requires: questions and the answers a version must have, such as no failing tests.
      Decided score-requirements: requires-list over requirement-as-belief, agent-discards-broken-versions, because a belief contradicted in one version stays contradicted, and an unwritten check is the one that gets skipped skillsRecord A version's runs of a score count only where what the score requires holdsscore-requirements.json
    • Every record of Lion's development is a claim, in history/notes/
      Decided development-model: one-record-of-claims over separate-research-model, because one history kept twice and decisions nothing checks, was separate-research-model recordRecord Lion's development is one record of claims, and what a decision asserts is checked against Lionone-record-of-claims.json
    • The website's changelog timeline is the one page that shows all of it
    • A feature's probe that gives neither has answered nothing, and the build reports it
      Decided failed-feature-probe: reported over answers-false, because a probe with a mistake in it would say the feature is gone, and a record that asserts it is gone would hold for the wrong reason recordRecord A probe can read the repository, run a declared command, and answer for a featureprobes-observe-the-repository.json
    • a feature's probe gives true when the feature is there and false when it is not
      Decided probe-questions: behaviors-and-features over behaviors-only, because most of what was only stated was that a named thing is there or gone recordRecord A probe can read the repository, run a declared command, and answer for a featureprobes-observe-the-repository.json
    • The host that runs the probes gives each probe's program functions beside the standard library
      Decided probe-reach: lion-and-repository over lion-only, any-shell-command, library-functions, because most of what the project decides is not about evaluation, so those assertions could never hold or be broken recordRecord A probe can read the repository, run a declared command, and answer for a featureprobes-observe-the-repository.json

    Rules 27

    • An unknown is data, as a string is: rows, facts, answers, finds, and aggregates hold it. It equals itself and nothing else, and two unknowns are the same when they are written the same way. It sorts after every record, and unknowns sort by how they are written. A function that needs a number or a string fails on one, as it does on any value of the wrong kind. Lion stays closed-world: ["not", ["=", "?m", "eve"]] holds for ben's unknown mother.
      Rules closed-world Lion stays closed-world: not holds for anything that is not known, unknowns included logic Rules unknowns-are-data An unknown is data, equal only to itself, and sorts after records; two unknowns are the same when written the same way logic786fdc0 existential-rules.json README.md
    • exists in a rule head says the head holds for values nobody has given, and the rule invents them: ["rule", ["exists", ["?m"], ["mother", "?c", "?m"]], ["person", "?c"]] gives every person a mother. A rule invents only for an answer whose head does not hold already, so with ["mother", "ada", "eve"] it invents nothing for ada. Rules that invent wait until every rule that invents nothing has finished; then every rule that invents, and whose head does not hold, invents, all at once; the other rules run on what was invented; and so on until nothing more is invented. So the result does not depend on the order rules or facts were added in. A rule that invents cannot aggregate: ... both aggregates and lists variables in "exists". A rule that invents values cannot aggregate.
      Rules datalog-first-parallel-chase Rules that invent wait until the others are done, then every one whose head does not hold invents at once, so the result does not depend on the order of rules or facts logic Rules restricted-chase A rule invents only for an answer whose head does not hold already logic786fdc0 existential-rules.json README.md
    • A key makes unknowns equal. When two rows of a keyed relation have the same key and differ only where one holds an unknown that a rule of the keyed relation, or of a relation in a recursive cycle with it, invented, the unknown takes the other row's value: a given value, or, when both are such unknowns, the one that sorts first. With {"key": "child"} on mother, "everyone has a mother" and "twins share a mother" give twins ben and cy the one unknown mother ["some", "?m", ["mother", "ben", "?m"]]. Two different given values are still an error, with the key's message, and an unknown that a fact holds is given, so a key never changes it. An unknown never takes a value that describes it, so of two invented unknowns where one describes the other, the one that describes takes the other.
      Rules keys-make-unknowns-equal Two rows of a keyed relation that differ only in unknowns the group invented are made one: the given value or the unknown that sorts first stays, an unknown never takes a value that describes it, and two given values are still an error logic786fdc0 existential-rules.json README.md
    • Negative constraints are invariants, as before.
      Rules negative-constraints-are-invariants Datalog± negative constraints are Lion's invariants logic786fdc0
    • The check that evaluation finishes is weak acyclicity, one rule for computed and invented values. Values flow from the columns a rule's body reads to the columns of its head, and a rule may make a new value for a column, by computing it or inventing it, as long as that value never flows back, through the rules, into making another. ["rule", ["b", "?x", ["number/add", "?x", 10]], ["a", "?x"]] with ["rule", ["a", "?x"], ["b", "?x", "?y"]] used to be refused, since any computed value in a recursive rule's head was, and is now accepted. Every program accepted before is still accepted. A computed value that flows back is refused with the same message as before. An invented one is refused with Rule [...] invents a value for "?m" in its head while recursing, which may never finish. Invent the value in a rule that does not recurse.
      Rules recursion-cannot-compute-values A recursive rule cannot compute new values for its head columns, in the head itself or through = or in, so evaluation always finishes logic Rules weak-acyclicity A rule may make a new value for a column, by computing or inventing it, as long as that value never flows back through the rules into making another logic786fdc0 existential-rules.json 1d5800a README.md
    • Equality rules: a rule's head can be ["=", a, b], which says the two are one value whenever the body holds. While Lion derives the relations its body reads, an unknown a rule invented there takes the value on the other side, by the rule keys follow, so ["rule", ["=", "?m1", "?m2"], ["twin", "?a", "?b"], ["mother", "?a", "?m1"], ["mother", "?b", "?m2"]] gives twins one mother. The rule holds as the invariant ["and", goal, ..., ["not", ["=", a, b]]] too, so a rule that does not hold is not added and a change that leaves two different known values under it is refused, in an invariant's words. Lion follows each invented value through the columns of the rules, and the relations of a rule that invents an unknown an equality rule can meet are derived together with every relation the equality rule reads, so the unknown can pass through any number of derived relations first: with ["rule", ["listed", "?c", "?m"], ["mother", "?c", "?m"]], the rule ["rule", ["=", "?m", "?n"], ["listed", "?c", "?m"], ["birth", "?c", "?n"]] makes ben's unknown mother the one his birth record names. A question about those relations, such as a goal under not, would go through recursion, and is refused when the rule is added, whatever the facts, with the message any such question gets: Rule [...] asks about "private", which depends on "listed". A question, such as a goal under "not", cannot go through recursion. A question about columns no invented value reaches is allowed. A head can join relation calls and = with and.
      Rules equality-merges-like-keys An equality rule makes an unknown the rules invented take the value on the other side, by the same rule keys follow logic Rules equality-rule-is-invariant An equality rule holds as the invariant it stands for, as a relation's schema holds as its invariant: a rule that does not hold is not added, and a change that leaves two different known values under it is refused logicb030d8a existential-rules.json README.md
    • Goal-directed queries are no longer hundreds of times slower than full evaluation on a large model asked many questions. A goal that knows none of its arguments now reads the relation itself, which the database derives once and keeps for every later query, instead of each query deriving a copy that holds every row anyway; a query that knows an argument of a relation the database already holds in full looks its rows up there; and a rule whose known argument sits inside a record pattern or a schema, such as ["claim", "?c", ["schema/open", {"topic": "?t"}]], runs as written and keeps the rows asked about, instead of scanning claim once for each value asked about. On the research model of Lion's own development, the 37 questions of its page took 36.6 seconds goal-directed and 0.12 seconds in full; they now take 0.11 seconds goal-directed. A host no longer needs new LogicDatabase({ goalDirected: false }) for such a model.
    • A relation is derived the first time a goal reads it with an answer to extend, in goal-directed and full evaluation alike, so a query never fails on a relation that no answer reaches. With ["rule", ["report", "?t"], ["audit", "?t"], ["broken", "?t"]] and no audit rows, ["query", ["report", "?t"]] gives [] even when deriving broken would fail; it used to derive broken before running the rule, and fail.
    • CHANGELOG.md is no longer edited by hand
      Rules changelog-written-by-record CHANGELOG.md and DECISIONS.md are written from the project record and never edited by hand recordRecord Keep the changelog and the decisions as a Lion model of the git historyproject-record-in-lion.json
    • it shipped in the first release whose commit has all of those commits behind it
      Rules changes-ship-by-ancestry A change shipped in the first release whose commit has every commit that made it behind it recordRecord Keep the changelog and the decisions as a Lion model of the git historyproject-record-in-lion.json
    • The README says what Lion does where the research model found it said otherwise. A cond condition counts as false when it is false, null, 0, or "", as the reference's truthiness rule already said, where the README said every string counts as true. A question in plain code is asked as soon as something needs its value, and a program or begin whose value is a goal gives the goal as written, so ["exists", ["?y"], ["=", "?y", 1]] is true as a value, as in ["value/identity", …], and not as a program; the reference says the same. The empty array [] evaluates to itself. The editor section no longer describes the outline, inspector, and source views it lost, its command is turbo dev --filter=@lionlang/repl, and the link to the agent's program no longer points into a local folder. AGENTS.md says bun run test, and packages/examples/CLAUDE.md says the tests use Vitest, as AGENTS.md does.
      Rules cond-truthiness A cond condition counts as false when it is false, null, 0, or the empty string formsresearch-model.json
    • every finding is either listed in known.json, waiting for a decision, or accepted with a reason in accepted.json
      Rules findings-wait-for-decision Every inconsistency the research model finds is listed as known until a decision settles it, or accepted with a reason processRecord Keep a research model of Lion's development that checks the project against itselfWhy Keep a research model of Lion's development that checks the project against itselfresearch-model.json research-model-of-development.json
    • **Go on working while bun run mutate runs.**
      Rules no-edits-during-mutate Do not edit code, or write any file, while bun run mutate runs. testsmeasuring.md
    • The research skill's page reads a published date written to the minute or second, such as 20261114144313, as its day, and its SKILL.md says to give the time when one publisher speaks several times a day, so its latest word is the one it said last.
      Rules research-published-time-when-several-a-day When one publisher speaks several times a day, give the time it published, so its latest word is the one it said last skillsresearch-model.json
    • In the research model, what a rule predicts for a case is what its latest statement naming that case predicts, so a rule reworded to allow a case, as the editor's connector rule was, stops predicting the old behavior.
      Rules rule-predicts-by-latest-statement What a rule predicts for a case is what its latest statement naming that case predicts recordWhy Keep a research model of Lion's development that checks the project against itselfresearch-model.json
    • The lion-research skill records leads, the lines of inquiry a research run follows: "leads": [{"id": "outside-warehouses", "statement": "…", "pursues": [{"warehouses": "tarnwell"}], "patience": 2}], and "for": ["outside-warehouses"] on each source read to follow one. A source pays off for a lead when it says something first-hand the lead covers; a lead is done when every question it pursues has an answer two publishers give first-hand, waits while the reader has not chosen a sense of one, and is set aside after as many sources in a row as its patience gave it nothing. The standing questions ask where the next search should go and how each lead ended, and the page's "How solid is it" shows the reader "What was looked for".
    • The research page check's last entry says how to fix what it lists: Questions the plan names that a choice set aside, or that have readings nobody chose between. This must be empty: reach each through meant, or ask the reader which sense they mean. build-explorer.mjs reminds the agent to run it whenever the plan names questions as records, and the skill says the check must give [].
      Rules research-page-check-empty The research page check must give [] skillsskill-autoresearch.json
    • The lion-reasoning skill keeps the record of an experiment loop, in the manner of autoresearch. Notes declare scores, numbers to make better, such as {"question": {"comparisons": "bench.mjs"}, "better": "lower"}, and directions, the ideas to try; an observation that tries a direction is an experiment of it. What a version is sure to give is its worst run: the best is the best of those, and a version has improved a score when its worst run beats the best that any earlier version was sure to give, so improved, best, score_in, and regressed follow the evidence and not one lucky run; runs of a score that differ are its spread rather than a dispute. A direction pays off when its experiment improves a score, and is set aside after as many misses in a row as its patience, 3 unless it says. The standing question "Where should the next experiment go?" lists the live directions, those that paid off most first.
    • A lion-reasoning score can list what it requires, such as {"question": {"failing tests": "test.mjs"}, "value": 0}: a version where that is unanswered or answered otherwise has no score, and unmet lists it, so a change that breaks the tests never becomes the best. A direction can list what it needs; it waits while that is unanswered or not yet decided by whoever ask names, and is ruled_out once it is answered otherwise, so the user's answer prunes the directions.
    • What a decision record asserts is checked against Lion at HEAD where a probe runs the case, and otherwise against what the repository says now
      Rules decision-assertions-checked What a decision record asserts is checked against Lion at HEAD where a probe runs the case, and otherwise against what the repository says now recordRecord Lion's development is one record of claims, and what a decision asserts is checked against Lionone-record-of-claims.json
    • a question with an answer, shown once, under the release that first shipped a claim giving it, in the latest claim's words, with every claim that gives it as a source
      Rules items-shown-once Each answer to a question is shown once, under the release that first shipped a claim giving it, in the latest claim's words, with every claim that gives it as a source recordRecord Lion's development is one record of claims, and what a decision asserts is checked against Lionone-record-of-claims.json
    • A decision about how the project is set up is checked the way a decision about Lion's behavior is
      Rules probes-observe-repository A probe can read the repository's files and run a declared command, so a decision about how the project is set up is checked the way a decision about Lion's behavior is recordRecord A probe can read the repository, run a declared command, and answer for a featureprobes-observe-the-repository.json

    Figures 67

    • 2,500 twin pairs a key merges 198-208 ms.
      Figures bench-2500-twin-pairs-key-merge-ms-high 208 metrics786fdc0
    • 91-97 ms (main 82-99 ms)
      Figures bench-300-rules-one-form-at-a-time-ms-high 99 → 97 metrics Figures bench-300-rules-one-form-at-a-time-ms-low 82 → 91 metrics786fdc0
    • 5,000 inventions 64-66 ms
      Figures bench-5000-inventions-ms-high 66 metrics786fdc0
    • lines 7,956 -> 9,296 (+16.8%), functions 952 -> 1,094 (+14.9%),
      Figures core-code-lines 7956 → 9296 metrics Figures core-functions 952 → 1094 metrics786fdc0
    • kind tests 92 -> 120.
      Figures core-kind-tests 92 → 120 metrics786fdc0
    • paths 2,066 -> 2,412 (+16.7%), nesting-weighted decisions 1,383 -> 1,648
      Figures core-nesting-decisions 1383 → 1648 metrics Figures core-paths 2066 → 2412 metrics786fdc0
    • 102 -> 103 (value/unknown?), messages 123 -> 136, kinds of error 7 -> 7.
      Figures error-kinds 7 → 7 metrics Figures library-functions 102 → 103 metrics Figures messages 123 → 136 metrics786fdc0
    • 3 exceptions, all documented: main's 2,
      Figures grid-exceptions 2 → 3 metrics786fdc0
    • bun run mutate catches every mutation; 11 are new.
      Figures mutations-added 11 metrics786fdc0
    • Tests: 20 new properties, checked against a TypeScript semi-oblivious
      Figures properties-added 20 tests786fdc0
    • took 4.5 s of vitest's 5 s default even on main, get a 60 s timeout like the grid's
      Figures skill-properties-run-seconds-on-main 4.5 tests Figures skill-properties-timeout-seconds 5 → 60 tests786fdc0
    • A first version of the termination check made the research skill's model 15% slower
      Figures slowdown-research-model-first-termination-check-percent 15 metrics786fdc0
    • special forms 22 -> 24 (exists, some), library functions
      Figures special-forms 22 → 24 metrics786fdc0
    • code lines 9,296 -> 9,484 (+188, +2.0%),
      Figures core-code-lines 9296 → 9484 metricsb030d8a
    • Against main: code lines 7,956 -> 9,484 (+19.2%), special forms 22 -> 24,
      Figures core-code-lines-vs-main 9484 metrics Figures special-forms-vs-main 24 metricsb030d8a
    • functions 1,094 -> 1,118, paths 2,412 -> 2,469, nesting-weighted decisions
      Figures core-functions 1094 → 1118 metrics Figures core-paths 2412 → 2469 metricsb030d8a
    • 1,648 -> 1,692.
      Figures core-nesting-decisions 1648 → 1692 metricsb030d8a
    • a new column, "equality rule", agrees with plain code in every cell; 3 exceptions, all documented, as before.
      Figures grid-exceptions 3 → 3 metricsb030d8a
    • library functions 102 -> 103, messages 123 -> 136.
      Figures library-functions-vs-main 103 metrics Figures messages-vs-main 136 metricsb030d8a
    • A first version recomputed the dependency graph for every rule form, which made "300 rules added one form at a time" 0.86x; it now does so only when the program has an equality rule, and is at 1.01x.
      Figures speed-300-rules-one-form-at-a-time 0.86 → 1.01 metricsb030d8a
    • code lines 9,489 -> 9,500 (+11), functions 1,120 -> 1,117 (-3), paths
      Figures core-code-lines 9489 → 9500 metrics Figures core-functions 1120 → 1117 metrics1d5800a
    • Against main: code lines 7,956 -> 9,500 (+19.4%), messages 123 -> 136,
      Figures core-code-lines-vs-main 9500 metrics Figures messages-vs-main 136 metrics1d5800a
    • tests of a value's kind 122 -> 121 (-1)
      Figures core-kind-tests 122 → 121 metrics1d5800a
    • 2,474 -> 2,472 (-2), nesting-weighted decisions 1,695 -> 1,703 (+8),
      Figures core-nesting-decisions 1695 → 1703 metrics Figures core-paths 2474 → 2472 metrics1d5800a
    • grid unchanged at 3 documented exceptions
      Figures grid-exceptions 3 → 3 metrics1d5800a
    • grid exceptions 194 -> 3.
      Figures grid-exceptions-on-main-with-current-grid 194 metrics Figures grid-exceptions-vs-main 3 metrics1d5800a
    • special forms, library functions, messages unchanged (24, 103, 136);
      Figures library-functions 103 → 103 metrics Figures messages 136 → 136 metrics Figures special-forms 24 → 24 metrics1d5800a
    • mutations: 199 of 199 caught (3 new, 1 stale one replaced)
      Figures mutations-added 3 metrics Figures mutations-caught 199 metrics Figures mutations-listed 199 metrics1d5800a
    • Both fail on the previous commit. Checked at 2,000 runs.
      Figures property-runs-checked 2000 tests1d5800a
    • "goal-directed path on a 3,000 chain" read 0.85x/0.87x in both full runs, 0.97x-1.09x run alone four times
      Figures speed-goal-directed-path-3000-chain-full-run-low 0.85 metrics1d5800a
    • The page's 37 questions took 36.6 seconds goal-directed and 0.12 seconds in full
      Figures research-page-full-evaluation-seconds 0.12 metrics Figures research-page-goal-directed-seconds-before-fix 36.6 metricsRecord Goal-directed queries share what is derived in full, and a relation is derived when a goal first reads itgoal-directed-shares-full-relations.json
    • Goal-directed queries are no longer hundreds of times slower than full evaluation on a large model asked many questions. A goal that knows none of its arguments now reads the relation itself, which the database derives once and keeps for every later query, instead of each query deriving a copy that holds every row anyway; a query that knows an argument of a relation the database already holds in full looks its rows up there; and a rule whose known argument sits inside a record pattern or a schema, such as ["claim", "?c", ["schema/open", {"topic": "?t"}]], runs as written and keeps the rows asked about, instead of scanning claim once for each value asked about. On the research model of Lion's own development, the 37 questions of its page took 36.6 seconds goal-directed and 0.12 seconds in full; they now take 0.11 seconds goal-directed. A host no longer needs new LogicDatabase({ goalDirected: false }) for such a model.
      Figures research-page-full-seconds 0.12 metrics Figures research-page-goal-directed-seconds 36.6 → 0.11 metrics Figures research-page-questions 37 metricsWhy Goal-directed queries share what is derived in full, and a relation is derived when a goal first reads itgoal-directed-shares-full-relations-changes.json
    • the research page's questions take 0.11 seconds, as full evaluation takes
    • Computing path in full would derive about 4.5 million rows.
      Figures chain-3000-full-evaluation-paths-millions 4.5 logicREADME.md
    • If values are still improving after 10,000 rounds, as with a negative-weight cycle under aggregate/min, the query fails with an error instead of running forever.
      Figures lattice-max-rounds 10000 logicREADME.md
    • The editor listens on 127.0.0.1:3000 by default.
      Figures lion-repl-default-port 3000 cliREADME.md
    • the first check found four tags that were never made, for three releases
    • PageRank with damping 0.85, rounded to 6 decimal places.
      Figures pagerank-damping 0.85 library Figures pagerank-decimal-places 6 libraryREADME.md
    • The runner checks it against many generated inputs (100 by default), and shrinks any failing input to a small counterexample.
      Figures property-default-runs 100 teststesting.md
    • A research page sends Lion one question at a time, so a question's time limit counts its own run and not its wait behind the others: on Lion's own research model two of the page's questions used to stop at the limit. build-explorer.mjs indexes each source's text once, not once per quote: building that page took 73 seconds and takes one.
      Figures research-build-explorer-seconds 73 → 1 skills Figures research-page-questions-stopped-at-limit 2 → 0 skillsresearch-model.json
    • A lookup on a research page can lead with an answer in words: "answer" is a lambda like its query, the page shows the sentence it gives for what the reader chose, and folds the rows under "Show the evidence". A lookup with more than twelve options is a box that finds them as the reader types, not a long list. page-check.json asks the answer with the example.
      Figures research-lookup-options-before-search-box 12 skillsresearch-model.json
    • Each direction and lead has a patience, 3 unless it says
    • The lion-reasoning skill keeps the record of an experiment loop, in the manner of autoresearch. Notes declare scores, numbers to make better, such as {"question": {"comparisons": "bench.mjs"}, "better": "lower"}, and directions, the ideas to try; an observation that tries a direction is an experiment of it. What a version is sure to give is its worst run: the best is the best of those, and a version has improved a score when its worst run beats the best that any earlier version was sure to give, so improved, best, score_in, and regressed follow the evidence and not one lucky run; runs of a score that differ are its spread rather than a dispute. A direction pays off when its experiment improves a score, and is set aside after as many misses in a row as its patience, 3 unless it says. The standing question "Where should the next experiment go?" lists the live directions, those that paid off most first.
    • The lion-research skill saves its written answer as report.md in the research folder on every run, not only when the user asks for a file, and gives the user the same words. In the skill's eval, one of two runs before the change wrote no report and failed the five checks that read it; both runs after it wrote one.
      Figures research-eval-checks-reading-report 5 skills Figures research-eval-runs-without-report 1 → 0 skillsskill-autoresearch.json
  18. @lionlang/core 0.10.0 @lionlang/cli 0.9.0

    Figures that can be checked: numbers read from the text they came from, records changed by making new ones, and explanations that show their arithmetic. The research skill builds on them to check every figure against its source, so it needs this release.

    • 20 Added
    • 53 Changed
    • 1 Fixed
    • 5 Documentation
    • 5 Decided
    • 8 Rules
    • 20 Figures
    112 changes

    Added 20

    Changed 53

    Fixed 1

    Documentation 5

    Decided 5

    Rules 8

    Figures 20

    • a pass by hand gave each of their features a live example, 26 new ones
    • code lines 7,893 to 7,956, functions 939 to 952, paths
      Figures core-code-lines 7893 → 7956 metrics Figures core-functions 939 → 952 metrics41477b1
    • kind unchanged at 92
      Figures core-kind-tests 92 → 92 metrics41477b1
    • 2,047 to 2,066, nesting-weighted decisions 1,380 to 1,383, tests of a value's
      Figures core-nesting-decisions 1380 → 1383 metrics Figures core-paths 2047 → 2066 metrics41477b1
    • grid cells like plain code 531 to 564,
      Figures grid-cells-like-plain-code 531 → 564 metrics41477b1
    • exceptions still 2.
      Figures grid-exceptions 2 → 2 metrics41477b1
    • library functions 98 to 102
      Figures library-functions 98 → 102 metrics41477b1
    • Mutations: 165 of 165 caught, 31 of them new.
      Figures mutations-added 31 metrics Figures mutations-caught 165 metrics Figures mutations-listed 165 metrics41477b1
    • The changed properties also pass at 2,000 runs each.
      Figures property-runs-checked 2000 tests41477b1
    • aggregates sum and count (0.99x, 0.93x)
      Figures speed-aggregates-sum-count-worst 0.93 metrics41477b1
    • negation (0.97x, 0.99x)
      Figures speed-negation-worst 0.97 metrics41477b1
    • every benchmark within 0.90x to 1.16x of main
      Figures speed-ratio-range-high 1.16 metrics Figures speed-ratio-range-low 0.9 metrics41477b1
    • waiting filter (0.98x, 0.99x)
      Figures speed-waiting-filter-worst 0.98 metrics41477b1
    • Three new mutations; 183 of 183 caught.
      Figures mutations-caught 183 metrics Figures mutations-listed 183 metrics52600b2
  19. lion-reasoning skill

    No package changed. skills/lion-reasoning is a new agent skill that uses Lion as the working memory of an agent's reasoning while it works, and the README has a section on it.

    • 18 Added
    • 25 Changed
    • 1 Decided
    • 7 Rules
    • 19 Figures
    70 changes

    Added 18

    Changed 25

    Decided 1

    Rules 7

    Figures 19

    • @lionlang/core unchanged (code lines 7,893, functions 939, paths 2,047, grid exceptions 2, all 0 change)
      Figures core-code-lines 7893 → 7893 metrics Figures core-functions 939 → 939 metrics Figures core-paths 2047 → 2047 metrics Figures grid-exceptions 2 → 2 metrics4c8df1b
    • 15 new mutations, 15 caught.
      Figures mutations-added 15 metrics Figures mutations-added-caught 15 metrics4c8df1b
    • Properties in packages/metrics check the core program against a plain model of versions, evidence, and beliefs, rival explanations against the law that an answer keeps exactly those that predicted it, the recorder, the versions against the files they were taken from, and the chain from changing files to the present answer. Fifteen mutations break those behaviors, and mutation.ts takes a package so a mutation can run the tests of metrics.
      Figures mutations-added 15 metrics2026-11-13-lion-reasoning-skill.json
    • 12 new properties, also passing at 3,000 runs.
      Figures properties-added 12 tests Figures property-runs-checked 3000 tests4c8df1b
    • Both found the same cause and the same 11 of 49 modules
      Figures reasoning-trial-core-modules 49 skills Figures reasoning-trial-modules-failing-loaded-first-before-fix 11 skills4c8df1b
    • The skill's agent put 30 to 35% of its effort into the model.
      Figures reasoning-trial-effort-on-model-percent-high 35 skills4c8df1b
    • at equal cost (238,607 vs 235,018 tokens, 17.5 vs 18.3 min)
      Figures reasoning-trial-minutes-with-skill 17.5 skills Figures reasoning-trial-minutes-without-skill 18.3 skills Figures reasoning-trial-tokens-with-skill 238607 skills Figures reasoning-trial-tokens-without-skill 235018 skills4c8df1b
    • both agents fixed it (0 of 49 modules fail loaded first, tests and typecheck pass, each new test fails on the old code)
      Figures reasoning-trial-modules-failing-loaded-first-after-fix 0 skills4c8df1b
    • 238,607 tokens, 81 tool calls, and 17.5 minutes with the skill; 235,018 tokens, 88 tool calls, and 18.3 minutes without.
      Figures reasoning-trial-tool-calls-with-skill 81 skills Figures reasoning-trial-tool-calls-without-skill 88 skills4c8df1b

    Changed during the first trial

    Two agents fixed one real bug in history-free copies of Lion from before commit 28ae742: loading special-forms/lambda first crashed with "Cannot access 'evaluateLambda' before initialization". One used the skill and one did not. Both found the same cause and the same 11 of 49 modules, and both fixes were verified independently: no module fails when loaded first, the core tests and typecheck pass, and each new test fails on the old code. The cost was the same within noise: 238,607 tokens, 81 tool calls, and 17.5 minutes with the skill; 235,018 tokens, 88 tool calls, and 18.3 minutes without. The skill's agent put 30 to 35% of its effort into the model. The model caught one thing that changed what it did: its "fails on the old code" evidence was stale after a later edit to the test, so it ran the check again. It reported five problems with the skill, each fixed above:

  20. @lionlang/core 0.9.0 @lionlang/cli 0.8.0

    Text from lists and numbers, and a record that keeps its empty key. The research skill writes its page's words with the new functions, so it needs this release.

    • 5 Added
    • 1 Removed
    • 19 Changed
    • 7 Fixed
    • 1 Documentation
    • 4 Decided
    • 3 Rules
    • 18 Figures
    58 changes

    Added 5

    Removed 1

    Changed 19

    Fixed 7

    • A record keeps the key "", as JSON does. {"": 1, "a": 2} used to evaluate to {"a": 2}, and so did the same record inside quote, in a fact, in a pattern, and in a snapshot; ["object/keys", ["quote", {"": 1}]] was []. Every record now keeps every key JSON allows except __proto__, so a pattern such as {"": "?v"} takes the value apart, and a snapshot writes it back. The graph editor's dialog still asks for a property name, and now says so instead of saying keys must be non-empty.
      Fixed editor-empty-property-name-message is asks-for-name, was keys-must-be-non-empty editor Fixed fact-record-empty-key is kept, was dropped logic Fixed object-keys-empty-key is includes-empty-key, was empty-list library Fixed pattern-record-empty-key is binds, was unbound schemas Fixed quoted-record-empty-key is kept, was dropped evaluation Fixed record-empty-key is kept, was dropped evaluation Fixed snapshot-fact-empty-key is kept, was dropped logic2026-11-13-core-0.9.0.json a923daf 1ee0c87 README.md Lion today

    Documentation 1

    • The parts of <code>text</code> between each <code>separator</code>; joining them with the same separator gives <code>text</code> back
      Documentation site-library-reference-text-functions is documented site1ee0c87

    Decided 4

    Rules 3

    Figures 18

    • Code: 7,858 -> 7,857 lines; functions, paths, decisions unchanged.
      Figures core-code-lines 7858 → 7857 metricsa923daf
    • grid exceptions stay at the 2 documented ones.
      Figures grid-exceptions 2 → 2 metricsa923daf
    • Mutation "a record drops the empty key": 128 of 128 caught.
      Figures mutations-caught 128 metrics Figures mutations-listed 128 metricsa923daf
    • "graph: components of 3,000 roads" ran 0.86-0.89x in three full runs
      Figures speed-graph-components-3000-roads-high 0.89 metrics Figures speed-graph-components-3000-roads-low 0.86 metricsa923daf
    • code lines 7,857 to 7,893, functions 929 to 939,
      Figures core-code-lines 7857 → 7893 metrics Figures core-functions 929 → 939 metrics841b511
    • paths 2,036 to 2,047, nesting-weighted decisions 1,379 to 1,380, library
      Figures core-nesting-decisions 1379 → 1380 metrics Figures core-paths 2036 → 2047 metrics841b511
    • grid cells like plain code 520 to 531, exceptions still 2.
      Figures grid-cells-like-plain-code 520 → 531 metrics Figures grid-exceptions 2 → 2 metrics841b511
    • functions 94 to 98
      Figures library-functions 94 → 98 metrics841b511
    • Core gained four library functions, from 94 to 98
    • Mutations: 134 of 134 caught.
      Figures mutations-caught 134 metrics Figures mutations-listed 134 metrics841b511
    • every benchmark within 0.88x to 1.12x of main, none slower in both.
      Figures speed-ratio-range-high 1.12 metrics Figures speed-ratio-range-low 0.88 metrics841b511
  21. lion-research skill

    No package changed. skills/lion-research is a new agent skill that uses Lion as the working memory of a deep research run, and the README has a section on it.

    • 18 Added
    • 39 Changed
    • 2 Decided
    • 5 Rules
    • 14 Figures
    78 changes

    Added 18

    Changed 39

    Decided 2

    Rules 5

    Figures 14

    Changed during the first trial

    A trial run researched the Microsoft 365 outage of 12 November 2026 with the first version of the skill: 19 sources and 175 claims. That version's core followed each claim to the source it was credited to and counted distinct sources. On the trial's model it called 15 answers corroborated. Eight of them were not: two channels of one company counted as two origins in three, two articles from one newspaper in one, and in four an origin was a source that was only credited, either unread or saying something else. The core above replaced it. On the same evidence it calls 7 answers corroborated, the 7 the trial's agent reached with stricter rules of its own, and it reports 4 misquotes and 26 answers known only second-hand.

  22. @lionlang/core 0.8.0 @lionlang/cli 0.7.0

    Three surprises found while writing Lion programs for a research skill, each removed by one rule. A call gives a function as many arguments as it takes. A number has text. A fact that holds a name says which name, and how to write the string.

    • 3 Breaking
    • 6 Added
    • 1 Removed
    • 24 Changed
    • 1 Fixed
    • 2 Documentation
    • 2 Decided
    • 2 Rules
    • 14 Figures
    55 changes

    Breaking 3

    Added 6

    Removed 1

    • A fact that holds something other than JSON data says which column it is for, what it is, and, for a string that is a name, how to write the string. ["fact", ["note", "source"]], where source is a relation, used to fail with Facts may only contain JSON data: ["note","source"]., which shows nothing wrong. It now fails with Facts may only contain JSON data, but the "text" of ["note","source"] is the relation "source". To mean the string itself, write ["quote", "source"]. The same message covers the name of a schema or a function, and a logic variable such as "?why", which used to have a message of its own, Facts cannot contain logic variables. fact, retract, and why share it.
      Removed facts-cannot-contain-logic-variables-message message replaced by facts-may-only-contain-data-message2026-11-13-core-0.8.0.json 356e74a

    Changed 24

    Fixed 1

    • A fact that holds a lambda fails with ... which is not JSON data. It used to fail with Facts cannot contain logic variables, though it holds none.
      Fixed fact-holding-lambda-message is not-json-data, was logic-variables-message errors2026-11-13-core-0.8.0.json 356e74a

    Documentation 2

    • docs/ and packages/site-runtime are untouched, so the website's library reference and its worker bundle do not have number/toString yet.
      Documentation site-library-reference-number-toString is missing site356e74a
    • The website's library reference documents the rule and the new function, and its worker bundle is rebuilt.
      Documentation site-library-reference-number-toString is documented, was missing site37f1451

    Decided 2

    Rules 2

    Figures 14

    • code lines 7,796 -> 7,858 (+62)
      Figures core-code-lines 7796 → 7858 metrics356e74a
    • The code grew by 62 lines
    • functions 928 -> 929 (+1)
      Figures core-functions 928 → 929 metrics356e74a
    • tests of a value's kind 91 -> 92 (+1)
      Figures core-kind-tests 91 → 92 metrics356e74a
    • nesting-weighted decisions 1,372 -> 1,379 (+7)
      Figures core-nesting-decisions 1372 → 1379 metrics356e74a
    • paths through functions 2,032 -> 2,036 (+4)
      Figures core-paths 2032 → 2036 metrics356e74a
    • kinds of error 7 -> 7
      Figures error-kinds 7 → 7 metrics356e74a
    • grid: cells like plain code 498 -> 509 (+11, two new rows)
      Figures grid-cells-like-plain-code 498 → 509 metrics356e74a
    • grid: exceptions 2 -> 2
      Figures grid-exceptions 2 → 2 metrics356e74a
    • library functions 93 -> 94 (+1)
      Figures library-functions 93 → 94 metrics356e74a
    • messages 123 -> 123
      Figures messages 123 → 123 metrics356e74a
    • 10 of them new.
      Figures mutations-added 10 metrics356e74a
    • All fail on main. 127 of 127 mutations are caught,
      Figures mutations-caught 127 metrics Figures mutations-listed 127 metrics356e74a
  23. lionlang.dev

    No package changed. These are fixes to the documentation page.

    • 2 Added
    • 4 Fixed
    • 1 Documentation
    • 1 Decided
    • 13 Figures
    21 changes

    Added 2

    Fixed 4

    • "On this page" marks the section a link was followed to. For every one of the page's 273 section links it used to mark the section before, or none for a document's first section: a link puts a heading 168 pixels below the top of the window, the page's scroll padding and the heading's scroll margin together, and a heading counted as reached only above 140. A section now counts as reached where a link puts its heading, read from the stylesheet. At the end of a page the last section is the one being read, where its heading could never get high enough to be marked, as in 29 of the 39 documents in a window 800 pixels tall. A section a link was followed to stays marked for as long as the page stays where the link left it, also when the page is too short to bring its heading up.
      Fixed docs-toc-end-of-page is last-section site Fixed docs-toc-followed-link is marks-linked-section, was marks-previous-section site Fixed docs-toc-followed-link-until-scrolled is stays-marked site2026-11-13-lionlang-dev.json faed4c4
    • An example shows how long its program ran whenever the program ran. A run that a coarse clock measured as 0 ms showed no time, beside others that showed <1 ms. A program that did not run, such as text that is not JSON, still shows none.
      Fixed example-run-measured-zero-ms is shows-time, was no-time site2026-11-13-lionlang-dev.json faed4c4

    Documentation 1

    • An example shows how long its program ran whenever the program ran. A run that a coarse clock measured as 0 ms showed no time, beside others that showed <1 ms. A program that did not run, such as text that is not JSON, still shows none.
      Documentation example-program-not-run is no-time site2026-11-13-lionlang-dev.json faed4c4

    Decided 1

    • "On this page" marks the section a link was followed to. For every one of the page's 273 section links it used to mark the section before, or none for a document's first section: a link puts a heading 168 pixels below the top of the window, the page's scroll padding and the heading's scroll margin together, and a heading counted as reached only above 140. A section now counts as reached where a link puts its heading, read from the stylesheet. At the end of a page the last section is the one being read, where its heading could never get high enough to be marked, as in 29 of the 39 documents in a window 800 pixels tall. A section a link was followed to stays marked for as long as the page stays where the link left it, also when the page is too short to bring its heading up.
      Decided toc-section-reached: where-link-puts-heading over fixed-140-px, because a link puts a heading 168 px below the top of the window, and a heading counted as reached only above a fixed 140 px site2026-11-13-lionlang-dev.json faed4c4

    Figures 13

    • as in 29 of the 39 documents in a window 800 pixels tall
      Figures docs-documents 39 site Figures docs-documents-last-heading-unreachable-800px 29 sitefaed4c4
    • "On this page" marks the section a link was followed to. For every one of the page's 273 section links it used to mark the section before, or none for a document's first section: a link puts a heading 168 pixels below the top of the window, the page's scroll padding and the heading's scroll margin together, and a heading counted as reached only above 140. A section now counts as reached where a link puts its heading, read from the stylesheet. At the end of a page the last section is the one being read, where its heading could never get high enough to be marked, as in 29 of the 39 documents in a window 800 pixels tall. A section a link was followed to stays marked for as long as the page stays where the link left it, also when the page is too short to bring its heading up.
      Figures docs-documents 39 site Figures docs-documents-last-heading-unreachable-800px 29 site Figures docs-link-heading-offset-px 168 site Figures docs-section-links 273 site Figures docs-section-links-marking-own-section 0 → 273 site Figures docs-toc-old-threshold-px 140 site2026-11-13-lionlang-dev.json
    • A link puts a heading 168 px below the top of the window
      Figures docs-link-heading-offset-px 168 sitefaed4c4
    • section links that mark their own section went from 0 of 273 to 273 of 273
      Figures docs-section-links 273 site Figures docs-section-links-marking-own-section 0 → 273 sitefaed4c4
    • a heading counted as reached only above a fixed 140 px.
      Figures docs-toc-old-threshold-px 140 sitefaed4c4
    • all 17 deliberate breaks of the new ones are caught.
      Figures site-mutations-caught 17 sitefaed4c4
  24. @lionlang/core 0.7.0 @lionlang/cli 0.6.0

    Schemas say what a value must be, and one rule says what fits: whatever checks a value against a schema asks whether the value fits it. A logic variable in a schema is the value it meets, so a schema is also a pattern that takes data apart.

    • 6 Breaking
    • 31 Added
    • 87 Changed
    • 5 Fixed
    • 5 Documentation
    • 9 Decided
    • 27 Rules
    • 60 Figures
    230 changes

    Breaking 6

    Added 31

    Changed 87

    Fixed 5

    • A function made by func/partial from a logic variable waits for the variable when a rule or query holds it, as a lambda that mentions the variable does. Handed to array/map in a query, it used to fail with has no value yet.
      Fixed func-partial-from-logic-variable-in-query is waits, was error logic2026-11-12-core-0.7.0.json fbc25a1
    • A goal-directed query that hands a rule-derived relation a function, for example through a variable, is answered as in full evaluation. It used to fail with Rule undefined produced a value that is not JSON data.
      Fixed goal-directed-derived-relation-function-argument is same-as-full, was internal-error logic2026-11-12-core-0.7.0.json fbc25a1
    • A graph algorithm's input that a variable binds to something that is not data fails with the message an input written in place gets.
      Fixed graph-input-variable-not-data is same-error-as-literal logic2026-11-12-core-0.7.0.json fbc25a1
    • Any module of @lionlang/core can be the first one loaded. Importing the module of a special form before the evaluator failed with Cannot access 'evaluateLambda' before initialization, and whether the built package loaded at all depended on the order the bundler happened to choose.
      Fixed built-core-package-load is works, was bundler-order-dependent build Fixed core-module-loaded-first is works, was error build2026-11-12-core-0.7.0.json 28ae742

    Documentation 5

    Decided 9

    Rules 27

    Figures 60

    • code lines 6,071 6,035 −36 (−0.6%)
      Figures core-code-lines 6071 → 6035 metrics500bac2
    • schemas took the code from 6,035 to 7,798 lines
    • functions 716 737 +21 (+2.9%)
      Figures core-functions 716 → 737 metrics500bac2
    • tests of a value's kind 97 70 −27 (−27.8%)
      Figures core-kind-tests 97 → 70 metrics500bac2
    • nesting-weighted decisions 1,013 997 −16 (−1.6%)
      Figures core-nesting-decisions 1013 → 997 metrics500bac2
    • paths through functions 1,528 1,542 +14 (+0.9%)
      Figures core-paths 1528 → 1542 metrics500bac2
    • kinds of error 4 6 +2 (+50.0%)
      Figures error-kinds 4 → 6 metrics500bac2
    • grid: cells like plain code 73 324 +251 (+343.8%)
      Figures grid-cells-like-plain-code 73 → 324 metrics500bac2
    • 0.5.0 has 209 exceptions and 0.6.0 has 2,
      Figures grid-exceptions 209 → 2 metrics500bac2
    • The grid counted 209 exceptions for 0.5.0 and 2 for 0.6.0
    • The interop grid runs 28 kinds of expression in 13 places, such as a
      Figures grid-expressions 28 metrics Figures grid-places 13 metrics500bac2
    • library functions 74 82 +8 (+10.8%)
      Figures library-functions 74 → 82 metrics500bac2
    • messages 86 95 +9 (+10.5%)
      Figures messages 86 → 95 metrics500bac2
    • 14 property tests cover the tools
      Figures metrics-tests 14 metrics500bac2
    • All 20 are caught.
      Figures mutations-caught 20 metrics500bac2
    • bun run mutate: breaks the code in each of 20 listed places and checks
      Figures mutations-listed 20 metrics500bac2
    • special forms n/a 21
      Figures special-forms 21 metrics500bac2
    • speed: 13 of 16 benchmarks within run-to-run noise of main
      Figures benchmarks 16 metrics Figures benchmarks-within-noise 13 metricsfbc25a1
    • code lines 6,035 -> 7,798 (+29.2%), functions 737 -> 906, paths
      Figures core-code-lines 6035 → 7798 metrics Figures core-functions 737 → 906 metricsfbc25a1
    • code lines went from 6,035 to 7,798
    • 997 -> 1,372 (+37.6%), tests of a value's kind 70 -> 91
      Figures core-kind-tests 70 → 91 metrics Figures core-nesting-decisions 997 → 1372 metricsfbc25a1
    • through functions 1,542 -> 2,010 (+30.4%), nesting-weighted decisions
      Figures core-paths 1542 → 2010 metricsfbc25a1
    • 338 core tests pass, and the tests catch all 106 listed mutations
      Figures core-tests 338 tests Figures mutations-caught 106 metrics Figures mutations-listed 106 metricsfbc25a1
    • 6 -> 7, messages 95 -> 123
      Figures error-kinds 6 → 7 metrics Figures messages 95 → 123 metricsfbc25a1
    • interop grid: 487 cells like plain code (was 336), 2 exceptions
      Figures grid-cells-like-plain-code 336 → 487 metricsfbc25a1
    • the grid's cells like plain code went from 336 to 487
    • 2 exceptions (was 3)
      Figures grid-exceptions 3 → 2 metricsfbc25a1
    • special forms 21 -> 22, library functions 82 -> 93, kinds of error
      Figures library-functions 82 → 93 metrics Figures special-forms 21 → 22 metricsfbc25a1
    • messages from 95 to 123
    • a goal as a value about 6%
      Figures slowdown-goal-as-value-percent 6 metricsfbc25a1
    • the 2 ms goal-directed chain query 9% to 26%
      Figures slowdown-goal-directed-chain-query-percent-high 26 metrics Figures slowdown-goal-directed-chain-query-percent-low 9 metricsfbc25a1
    • a relation as a predicate about 4%
      Figures slowdown-relation-as-predicate-percent 4 metricsfbc25a1
    • Complexity is unchanged (bun run measure: 7,798 code lines, 2,010 paths,
      Figures core-code-lines 7798 → 7798 metrics Figures core-paths 2010 → 2010 metricsca92729
    • Core tests: 338 -> 349.
      Figures core-tests 338 → 349 testsca92729
    • 123 messages, the same as before)
      Figures messages 123 → 123 metricsca92729
    • The mutation list grows from 106 to 118 entries.
      Figures mutations-listed 106 → 118 metricsca92729
    • 179 examples in all, 26 of them new.
      Figures docs-examples 179 docs Figures docs-examples-added 26 docs230ba1c
    • the tests catch all 118 listed mutations.
      Figures mutations-caught 118 metrics Figures mutations-listed 118 metrics58dc7fa
    • each of the 49 source modules and each of the 50 built entries was loaded first in a process of its own: all work, where 7 of 47 source modules failed on main.
      Figures core-built-entries 50 metrics Figures core-source-modules 47 → 49 metrics Figures source-modules-failing-when-loaded-first-on-main 7 metrics28ae742
    • code lines 7,798 -> 7,796; functions 906 -> 928 and paths through
      Figures core-code-lines 7798 → 7796 metrics Figures core-functions 906 → 928 metrics28ae742
    • functions 2,010 -> 2,032, which are the 22 one-line entries
      Figures core-paths 2010 → 2032 metrics28ae742
    • core tests: 349 -> 350
      Figures core-tests 349 → 350 tests28ae742
    • fib(17) 0.98x on both runs.
      Figures speed-fib-17 0.98 metrics28ae742
    • Building the table lazily behind a module-level variable was tried first and was slower, 0.92x to 0.94x on fib(17), so it was not kept.
      Figures speed-fib-17-lazy-table-high 0.94 metrics Figures speed-fib-17-lazy-table-low 0.92 metrics28ae742
  25. @lionlang/core 0.6.0 @lionlang/cli 0.5.0

    Two rules now cover how plain code and the logic layer meet: whatever needs the value of a logic variable waits for it, and whatever needs the value of a goal asks it.

    • 12 Breaking
    • 18 Added
    • 19 Removed
    • 73 Changed
    • 9 Fixed
    • 6 Documentation
    • 12 Decided
    • 9 Rules
    • 26 Figures
    184 changes

    Breaking 12

    Added 18

    Removed 19

    • For hosts, @lionlang/core/logic/terms changed. markPure and isPureFunction are removed, since every function waits. The Negation, Conjunction, Disjunction, Unification, and Membership classes are one LogicForm class, tested with isForm. The Aggregate class is removed: an aggregate is a waiting call. relationInfo is now relationOf, and RelationValue, isRelationValue, and isLogicTerm are removed.
      Removed Aggregate capability Removed Conjunction capability replaced by LogicForm Removed Disjunction capability replaced by LogicForm Removed Membership capability replaced by LogicForm Removed Negation capability replaced by LogicForm Removed RelationValue capability Removed Unification capability replaced by LogicForm Removed isLogicTerm function Removed isPureFunction function Removed isRelationValue function Removed markPure function Removed relationInfo function replaced by relationOfRecord Whatever needs a logic variable's value waits until the variable is boundWhy Whatever needs the value of a goal asks it Whatever needs a logic variable's value waits until the variable is bound2026-11-12-core-0.6.0.json 1b2d50b c380ce7 aef67af waiting-rule.json Lion today
    • For hosts, in other modules: keyColumns and MAX_LATTICE_ROUNDS moved from logic/database to logic/model. SpecialFormName and isSpecialFormName moved from analysis/analyze to schemas/evaluation. literalGoal and the schemas for the cases of cond, the patterns of match, and the snapshot form are no longer exported.
      Removed CondCaseSchema capability Removed MatchPatternSchema capability Removed SnapshotFormSchema capability Removed literalGoal function2026-11-12-core-0.6.0.json c380ce7
    • isSymbolic, literalGoal, matchesAtom, queryOutputs, CondCaseSchema, MatchPatternSchema, and SnapshotFormSchema are removed.
      Removed isSymbolic function Removed matchesAtom function Removed queryOutputs functionc380ce7

    Changed 73

    Fixed 9

    Documentation 6

    Decided 12

    Rules 9

    Figures 26

  26. @lionlang/core 0.5.0 @lionlang/cli 0.4.0

    • 2 Breaking
    • 4 Added
    • 34 Changed
    • 8 Fixed
    • 9 Documentation
    • 7 Decided
    • 20 Rules
    • 9 Figures
    93 changes

    Breaking 2

    Added 4

    Changed 34

    Fixed 8

    Documentation 9

    Decided 7

    Rules 20

    Figures 9

  27. @lionlang/core 0.4.0 @lionlang/cli 0.3.0

    • 37 Added
    • 89 Changed
    • 5 Fixed
    • 4 Documentation
    • 9 Decided
    • 11 Rules
    • 19 Figures
    174 changes

    Added 37

    Changed 89

    Fixed 5

    Documentation 4

    Decided 9

    Rules 11

    Figures 19

    • a cycle still improving after 10,000 rounds (such as a negative-weight cycle under min) fails with an error instead of running forever
      Figures lattice-max-rounds 10000 logic000fa16
    • Recursion through lattice aggregates. aggregate/min, aggregate/max, and the new aggregate/shortest and aggregate/union only move one way, so a recursive rule can aggregate with them and compute the aggregated value, which makes minimum distances and shortest paths expressible. Each group keeps its best value until none improves, every relation in such a cycle must aggregate, and a cycle still improving after 10,000 rounds (such as a negative-weight cycle) fails with an error. lionlang.dev has a live Shortest distances card.
    • A cycle that would improve forever, such as a negative-weight cycle under min, fails with an error after 10,000 rounds instead of running forever
    • at most 1000000 numbers
      Figures array-range-max-numbers 1000000 libraryaf7f8fd
    • PageRank with damping 0.85, rounded to 6 decimal places. The ranks add up to 1.
      Figures pagerank-damping 0.85 library Figures pagerank-decimal-places 6 library0781dfb
    • A query along a 3,000-node chain that would otherwise derive about 4.5 million paths returns in milliseconds.
      Figures chain-3000-full-evaluation-paths-millions 4.5 logicf4c7c4c
    • Goal-directed queries. A query that gives a rule-defined relation a known argument, such as ["path", "a", "?to"], now runs a magic-sets rewrite of the rules, so evaluation derives only the facts the query can reach instead of every fact the program implies. A query along a 3,000-node chain that would otherwise derive about 4.5 million paths returns in milliseconds. Aggregated, computed, and negated relations are still computed in full, answers match full evaluation, and new LogicDatabase({ goalDirected: false }) turns the rewrite off. lionlang.dev has a live Goal-directed queries card.
    • a 3,000-step chain: about 9 s to about 100 ms
      Figures chain-3000-query-ms 100 logicf4c7c4c
    • Recursive rules run faster: each semi-naive round starts its join from the tuples that are new, relation indexes are kept up to date instead of rebuilt after every new tuple, and in tests membership with a lookup. A 3,000-step chain query went from about 9 seconds to about 100 ms. why explanations keep their premises in rule order.
    • found by comparing goal-directed and full evaluation on 2,000 generated programs; the corpus test covers the case
      Figures generated-programs-compared 2000 tests76d833f
    • A goal-directed query whose argument was not JSON data, such as a relation name that evaluates to the relation itself, failed with "not JSON data" instead of finding no answers. Found by comparing goal-directed and full evaluation on 2,000 generated programs.
    • with recursion on the left the rewrite asks only about the start, so every start answers within about 200 ms in the browser
      Figures goal-directed-example-browser-ms 200 sitef617c07
    • Effect yields to the scheduler every 2,048 steps, and in a browser each yield waits on a clamped setTimeout, so long logic queries spent most of their time idle
      Figures effect-scheduler-yield-steps 2048 site59f142e
    • the worker now sets Scheduler.PreventSchedulerYield, since the page already terminates runaway programs; the same query takes about 150 ms
      Figures site-3000-answer-query-ms 150 site59f142e
    • The live examples on lionlang.dev spent most of a long evaluation idle: the evaluator yielded to the browser scheduler every few thousand steps, and each yield waited on a clamped setTimeout. The site worker no longer yields, since the page already stops runaway programs, so a 3,000-answer logic query in the browser went from about 1.8 s (past the 1.5 s limit) to about 150 ms.
      Figures site-3000-answer-query-ms 150 site Figures site-3000-answer-query-seconds-before-fix 1.8 site Figures site-example-time-limit-seconds 1.5 site2026-11-10-core-0.4.0.json
    • a 3,000-answer query took about 1.8 s in Chromium and hit the 1.5 s limit
      Figures site-3000-answer-query-seconds-before-fix 1.8 site59f142e
  28. @lionlang/core 0.3.0 @lionlang/cli 0.2.0

    • 14 Added
    • 1 Removed
    • 28 Changed
    • 2 Fixed
    • 14 Documentation
    • 5 Decided
    • 8 Rules
    • 5 Figures
    77 changes

    Added 14

    Removed 1

    • remove the magnetic button effect so buttons stay put under the cursor
      Removed site-magnetic-buttons capabilityab082c3

    Changed 28

    Fixed 2

    • A fix to how the repository typechecks and builds; no package changed.
      Fixed typecheck-depends-on-build is true, was false build Fixed typecheck-includes-dist-output is false, was true build2026-11-10-core-0.3.0.json 32e81b0

    Documentation 14

    Decided 5

    Rules 8

    Figures 5

  29. @lionlang/core 0.2.0 @lionlang/cli 0.1.0 @lionlang/typesafe-ai 0.1.0

    • 49 Added
    • 15 Removed
    • 107 Changed
    • 2 Fixed
    • 11 Documentation
    • 29 Decided
    • 23 Rules
    • 24 Figures
    260 changes

    Added 49

    Removed 15

    Changed 107

    Fixed 2

    • Changes to the first lionlang.dev page: its documentation updated to match the README, and fixes for phones. The site deploys from main, and the redesign in 0.3.0 replaced that page.
      Fixed site-documentation is matches-readme site Fixed site-layout-narrow is responsive site2026-11-03-core-0.2.0.json 294925c b0161c8

    Documentation 11

    Decided 29

    • Every commit runs the tests and the formatter, and CI checks every pull request and push to main
      Decided quality-gates: pre-commit-hook-and-ci over unchecked, because nothing ran the tests or a formatter before a commit or after a push buildRecord Every commit runs the tests and the formatter, and CI checks every pull request and push to mainquality-gates.json
    • The README says what Lion does where the research model found it said otherwise. A cond condition counts as false when it is false, null, 0, or "", as the reference's truthiness rule already said, where the README said every string counts as true. A question in plain code is asked as soon as something needs its value, and a program or begin whose value is a goal gives the goal as written, so ["exists", ["?y"], ["=", "?y", 1]] is true as a value, as in ["value/identity", …], and not as a program; the reference says the same. The empty array [] evaluates to itself. The editor section no longer describes the outline, inspector, and source views it lost, its command is turbo dev --filter=@lionlang/repl, and the link to the agent's program no longer points into a local folder. AGENTS.md says bun run test, and packages/examples/CLAUDE.md says the tests use Vitest, as AGENTS.md does.
    • Remove lambda example, add list operations
      Decided site-examples: list-operations over lambda-example, because docs: update website to match README changes site26bc1dc
    • Drop empty barrel (src/index.ts); consumers import from subpath exports.
      Decided core-entry-point: subpath-exports over barrel, because The barrel was empty; consumers import from subpath exports. packagese16eb12
    • Bindings paths are flat (/eth-price), so they never shift
      Decided ui-stream-documents: source-and-bindings over single-source, because Bindings paths are flat, so they never shift, while source paths can shift on insert. editor Reversed later: single-sourcee16eb12
    • Streaming uses RFC 6902 JSON Patch against two documents: the source tree and a separate bindings document. No custom stream protocol.
      Decided ui-stream-transport: json-patch over ui-stream-message-protocol editore16eb12
    • feat(repl): source-as-state UI streaming with direct React component env
      Decided ui-streaming-architecture: source-as-state over ui-tagged-records editore16eb12 9a1522e
    • No language-level changes to Lion (no ref, no call, no change to string-lookup semantics).
      Decided unbound-string-semantics: keep-string-fallback over ref-form, call-form, because Revisit only if the silent string fallback causes real bugs, with a dev-mode warning first and a language change last. names Reversed later: settled-by-scopee16eb12
    • refactor(repl): collapse source+bindings into a single source document
      Decided ui-stream-documents: single-source over source-and-bindings, was source-and-bindings editor425c226 ef979f3
    • linker = "hoisted"
      Decided bun-install-linker: hoisted buildb60f4a1
    • Two days later the CodeMirror source view was removed too, so a program is edited through the graph, its nodes, and the inspector
    • // Generated by TanStack Router and shadcn; validated by their upstream tooling.
      Decided lint-generated-files: excluded over linted, because Generated by TanStack Router and shadcn; validated by their upstream tooling. buildb60f4a1
    • The graph editor, Lion Fold Map, replaced the REPL at / on September 17, 2026.
      Decided repl-surface: graph-editor over stream-prototype, because no documented product surface used the stream prototype, and the release ticket called for one coherent product, was web-app editorRecord The REPL is a semantic graph editor over the program's JSON, and the source view and the /stream prototype are goneWhy The REPL is a semantic graph editor over the program's JSON, and the source view and the /stream prototype are gonebdc6d89 2026-11-03-core-0.2.0.json graph-editor-is-the-repl.json
    • the CLI moved from effect/unstable/cli to effect/cli
      Decided cli-effect-cli-module: stable-effect-cli over unstable-effect-cli cliRecord Lion moves from Effect 3 to Effect 4Why Lion moves from Effect 3 to Effect 41b380d9 2026-11-03-core-0.2.0.json effect-v4.json
    • Lion moves from Effect 3 to Effect 4
    • **Graph:** React Flow for interaction and bounded rendering, with ELK layered layout in a module worker.
      Decided editor-graph-library: react-flow-elk editorbdc6d89
    • jsonc-parser configured for strict JSON
      Decided editor-json-parser: jsonc-parser-strict editorbdc6d89
    • The deliberate limitation is strict JSON: comments and trailing commas are diagnostics, not silently normalized.
      Decided editor-json-strictness: strict-json over normalize editorbdc6d89
    • **Editor:** CodeMirror 6 with the JSON language package.
      Decided editor-text-component: codemirror-6 editorbdc6d89
    • Jev programs are always explicit-run to prevent accidental network requests.
      Decided jev-evaluation-trigger: explicit-run over live, because Explicit runs prevent accidental network requests. aiaf779dc
    • fix(repl): lay out graph flow left to right
      Decided graph-value-flow-direction: left-to-right over right-to-left editor18e3ae1 c2360e9
    • The semantic graph owns the full remaining width: there is no persistent inspector, outline, or result sidebar.
      Decided editor-workspace-layout: full-width-graph over graph-and-inspector-panes editora564abc
    • Semantic branches remain expanded.
      Decided graph-branch-folding: always-expanded over collapsible-branches editor3567d25
    • The dock remains open and updates in place for subsequent runs.
      Decided output-dock-collapsing: always-open over collapsible editor Reversed later: collapsible3567d25
    • Do not commit proof into git.
      Decided completion-proof-storage: outside-git over committed processa7c2a88
    • Value-to-consumer sumi edges carry role labels and arrowheads so the graph shows evaluation flow
      Decided graph-edge-direction: value-to-consumer over parent-to-child, because Value-to-consumer edges show evaluation flow. editor907cfd5
    • Its build bundles @lionlang/core into the command and copies the editor's build output into the package, so an installed CLI needs neither the monorepo nor a separate editor.
      Decided cli-packaging: bundled-core-and-editor, because an installed CLI needs neither the monorepo nor a separate editor cliRecord @lionlang/cli carries its own copy of @lionlang/core and the built graph editor, so it is released with every core releasecli-bundles-editor.json
    • Install @lionlang/cli in a project or globally:
      Decided cli-install-scope: project-or-global over global-only cli2ca94fd
    • fix(repl): make output drawer collapsible
      Decided output-dock-collapsing: collapsible over always-open, was always-open editorcfd42a9

    Rules 23

    Figures 24

    • Core: $ui tagged record schemas (15 component types) and pure constructors
      Figures ui-component-types 15 library9605505
    • Tests: 7 tests for ui module output shapes
      Figures ui-module-tests 7 tests9605505
    • Core reports 98 passing tests; REPL reports 13 passing tests.
      Figures core-tests 98 tests Figures repl-tests 13 testsbdc6d89
    • | Open, parse, and analyze 1,000 nodes | 500 ms |
      Figures editor-budget-open-1000-nodes-ms 500 editorbdc6d89
    • | Open folded 5,000-node program | 2,000 ms |
      Figures editor-budget-open-folded-5000-nodes-ms 2000 editorbdc6d89
    • local files are capped at 10 MiB
      Figures editor-file-size-cap-mib 10 editorbdc6d89
    • The actual development app imported the 5,003-node browser fixture and reached 300 mounted in 914.93 ms
      Figures editor-import-5000-to-mounted-dev-ms 914.93 editorbdc6d89
    • The production build repeated that import-to-mounted path in 543.23 ms with exactly 300 React Flow nodes.
      Figures editor-import-5000-to-mounted-ms 543.23 editorbdc6d89
    • at most 300 graph nodes are mounted at once
      Figures editor-mounted-graph-nodes-max 300 editorbdc6d89
    • Warm worker-equivalent parse/analyze medians: wide 1,000 = 10.67 ms; deep 1,000 = 11.68 ms; wide 5,000 = 119.10 ms; deep 5,000 = 57.04 ms.
      Figures editor-parse-analyze-deep-1000-ms 11.68 editor Figures editor-parse-analyze-deep-5000-ms 57.04 editor Figures editor-parse-analyze-wide-1000-ms 10.67 editor Figures editor-parse-analyze-wide-5000-ms 119.1 editorbdc6d89
    • All 25 implementation tickets are complete.
      Figures graph-editor-tickets-complete 25 processbdc6d89
    • passes all 12 desktop and narrow Chromium workflows
      Figures repl-e2e-workflows 12 testsbdc6d89
    • At desktop widths the graph receives 62% of the horizontal workbench and the source/inspector column receives 38%
      Figures editor-graph-pane-percent 62 editore013ec1
    • The graph uses a 32px point rhythm over the continuous warm paper field.
      Figures graph-point-rhythm-px 32 editore013ec1
    • At desktop widths the graph receives 68% of the horizontal workbench and a tabbed inspector, outline, or result pane receives 32%.
      Figures editor-graph-pane-percent 68 editorf27e671
    • lion repl serves the production graph editor on 127.0.0.1:3000
    • The editor listens on 127.0.0.1:3000 by default.
      Figures lion-repl-default-port 3000 cli2ca94fd
    • <Background color="#000" gap={32} size={2} />
      Figures graph-background-dot-size 2 editor3cf2d0b
    • <Background color="#000" gap={32} size={1.5} />
      Figures graph-background-dot-size 1.5 editordb1f0f7
    • --xy-edge-stroke-width: 2;
      Figures graph-edge-stroke-px 2 editorbb86fe2
  30. @lionlang/core 0.1.1

    The same code as 0.1.0, published minutes later with the package's README and homepage, so that npm shows them.

    • 2 Documentation
    • 1 Decided
    3 changes

    Documentation 2

    • The package's README, which documents the expression model, every special form and module, and host interop, and its homepage, lionlang.dev.
      Documentation core-npm-readme-coverage is expression-model-special-forms-modules-host-interop docs Documentation core-npm-readme page2026-04-06-core-0.1.1.json ca42dc0

    Decided 1

    • The package's README, which documents the expression model, every special form and module, and host interop, and its homepage, lionlang.dev.
      Decided core-homepage: lionlang-dev packages2026-04-06-core-0.1.1.json ca42dc0
  31. @lionlang/core 0.1.0

    The first release of @lionlang/core on npm. There was no changelog yet: this section was written from the git history when the project record began.

    • 5 Breaking
    • 195 Added
    • 33 Removed
    • 180 Changed
    • 1 Documentation
    • 45 Decided
    • 43 Rules
    • 2 Figures
    504 changes

    Breaking 5

    Added 195

    Removed 33

    Changed 180

    Documentation 1

    Decided 45

    Rules 43

    Figures 2

    • <span class="stat-value">0</span>
      Figures custom-parsers-needed 0 siteb44276c
    • <span class="stat-value">100%</span>
      Figures json-compatible-percent 100 siteb44276c