Skip to content

Commit 5b14273

Browse files
authored
Merge pull request #27 from link-foundation/issue-26-a712189d2710
Plan and audit full concepts/features development (issue #26)
2 parents 485a21c + 138c97b commit 5b14273

15 files changed

Lines changed: 3647 additions & 31 deletions

File tree

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# Case Study: Issue #26 — Plan Full Concepts and Features Set Development
2+
3+
**Issue:** [#26 — Plan full concepts and features set development](https://github.com/link-foundation/relative-meta-logic/issues/26)
4+
5+
**Source comparisons used as input:**
6+
7+
- [Core Concept Comparison](../../CONCEPTS-COMPARISON.md)
8+
- [Product Feature Comparison](../../FEATURE-COMPARISON.md)
9+
10+
The original issue linked the historical misspelled paths
11+
`CONCEPTS-COMPARISION.md` and `FEATURE-COMPARISION.md`; those files now exist
12+
only as compatibility stubs that point to the corrected `*-COMPARISON.md`
13+
documents above.
14+
15+
**Companion artifacts in this folder:**
16+
17+
- [`requirements.md`](./requirements.md) — Atomic requirement list extracted from the issue.
18+
- [`gap-matrix.md`](./gap-matrix.md) — Per-row distillation of each gap from the comparison docs into a planned issue.
19+
- [`issue-plan.md`](./issue-plan.md) — The full proposed GitHub issue plan with phases, labels, dependencies, and templates.
20+
- [`research.md`](./research.md) — Notes on related libraries, prior art, and references that inform implementation.
21+
- [`completion-audit.md`](./completion-audit.md) — Post-merge audit showing that the filed plan issues are closed and covered by the repository test gates.
22+
23+
## Executive Summary
24+
25+
Issue #26 asks for a complete development plan that turns Relative Meta-Logic (RML) into a **universal formal-system constructor** — feature-parity with traditional proof assistants on the standard checklist (kernel, types, tactics, libraries, tooling), while surpassing them on **configurability**: the user, not the implementer, picks the truth range, valence, operators, semantics, and even the meta-theory.
26+
27+
The plan must:
28+
29+
1. Use the existing [concept](../../CONCEPTS-COMPARISON.md) and [feature](../../FEATURE-COMPARISON.md) comparison tables as the source of truth for *every* gap.
30+
2. Produce one GitHub issue per gap, each with concrete acceptance criteria.
31+
3. Wire up issue dependencies (`blocks` / `blocked by`) so the dependency graph is traversable in GitHub.
32+
4. Apply consistent labels (existing repo labels: `bug`, `documentation`, `enhancement`, `good first issue`, `help wanted`, `question`; plus a small set of new labels proposed in [`issue-plan.md`](./issue-plan.md)) and group issues into **phases** so the order of work is obvious.
33+
5. End with a **capstone issue**: re-implementing RML in itself, demonstrating that RML really is a meta-logic capable of describing and reasoning about itself.
34+
6. Express every encoded construct in **links notation with English-like words and templates**, so a beginner can read each link as a sentence (e.g. `(zero is a Natural)` rather than `Nat.zero : Nat`).
35+
36+
This case study captures the analysis **and the filed plan**. As of the latest update of PR #27, every planned issue (A1–J7 plus the J-EPIC tracking issue) has been filed on GitHub with full body, labels, and `Depends on` / `Blocks` cross-references — see the [filed-issue index in `issue-plan.md`](./issue-plan.md#filed-issue-index) and tracking epic [#95](https://github.com/link-foundation/relative-meta-logic/issues/95).
37+
38+
After merging the current default branch into PR #27, all 66 planned feature
39+
issues and the J-EPIC tracking issue are closed. The completion state is
40+
recorded in [`completion-audit.md`](./completion-audit.md) and the dedicated
41+
[#95 case study](../issue-95/README.md).
42+
43+
## Scope of the Plan
44+
45+
The plan covers everything visible in [CONCEPTS-COMPARISON.md](../../CONCEPTS-COMPARISON.md) and [FEATURE-COMPARISON.md](../../FEATURE-COMPARISON.md) where RML is currently `Part`, `No`, or weaker than at least one peer system. That includes:
46+
47+
| Area | Source columns | What's missing |
48+
|------|----------------|----------------|
49+
| Foundations and representation | Concepts §"Foundations and Representation" | First-class proof terms, full definitional equality, structural-equality decision procedure for binders. |
50+
| Type theory and binding | Concepts §"Type Theory and Binding" | Full normalization, binding-aware substitution, freshness, inductive families, coinductive types, type-class-like overloading. |
51+
| Logic and semantics | Concepts §"Logic and Semantics" | Standard libraries for FOL/HOL/modal/provability/interpretability/set theory, automata-theoretic decision procedures. |
52+
| Metatheory and proof objects | Concepts §"Metatheory and Proof Objects" | Trusted kernel, proof-replay, totality/termination/coverage, mode and world checking, metatheorem checker. |
53+
| Authoring and checking workflow | Features §"Authoring and Checking Workflow" | Interactive REPL, LSP, structured diagnostics, module/import system, namespaces, package distribution polish, literate proof docs, online playground. |
54+
| Proof engineering and automation | Features §"Proof Engineering and Automation" | Tactic language, simplifier, rewriting automation, proof search, ATP/SMT bridges, counterexample finder, reflection/metaprogramming, custom syntax/macros, replayable derivation traces. |
55+
| Library and domain coverage | Features §"Library and Domain Coverage" | Standard libraries: math, logic, modal/provability, set theory, arithmetic; programming-language metatheory; automata. |
56+
| Distribution and integration | Features §"Distribution, Maintenance, and Integration" | Docker images, generated API/reference docs, tutorials/walkthroughs, backward-compatibility policy. |
57+
| Self-reimplementation (issue #26 capstone) | None directly; derived from issue body | Bootstrap: encode the RML evaluator, type layer, and operator system in `.lino` and check that the encoded RML evaluates the same `.lino` programs as the host RML. |
58+
59+
## Method
60+
61+
The plan was built by walking each row of the two comparison tables and asking, for every cell where RML is not `Yes`:
62+
63+
1. **What does the cell mean concretely** in RML's link substrate? (E.g. "totality checking" maps to: a checker that, given a relation defined as a family of links, decides whether the relation covers every input on its declared mode.)
64+
2. **What is the smallest issue that closes the gap** while staying compatible with RML's runtime configurability? Each issue is sized to be reviewable in a single PR (rough budget: 200–800 LOC, plus tests and docs).
65+
3. **Which existing libraries or papers can be reused** so RML does not reinvent solved problems? See [`research.md`](./research.md).
66+
4. **What does it depend on?** Every issue lists prerequisite issues so GitHub's `blocks` / `blocked by` relationships form an explicit DAG.
67+
5. **What labels apply?** Existing repo labels are reused; new labels are proposed only where the existing set is insufficient.
68+
69+
This method is fractal: phase A (foundations) unlocks phase B (typed kernel), which unlocks phase C (proof artifacts), and so on, ending in phase J (self-bootstrap).
70+
71+
## Phase Map
72+
73+
The full plan splits into ten phases. Each phase has a single guiding deliverable, written below as a one-line "definition of done". Detail per issue lives in [`issue-plan.md`](./issue-plan.md).
74+
75+
| Phase | Theme | Definition of done |
76+
|-------|-------|--------------------|
77+
| A | Diagnostics and developer experience | Every parse/eval failure produces a structured, source-located diagnostic; opt-in trace mode logs every step. |
78+
| B | Module system and namespaces | `.lino` files can `import` other files by relative path; cycles are detected; symbol scoping is explicit. |
79+
| C | Proof artifacts | Every query optionally returns a derivation tree that an independent checker can replay. |
80+
| D | Typed kernel maturation | Inductive/coinductive families, normalization, binding-aware substitution, freshness, totality/termination/coverage. |
81+
| E | Tactic and automation language | Named proof steps (tactics) over the existing evaluator; small simplifier; rewriting automation; bounded proof search. |
82+
| F | Bridges to mature provers and ATP/SMT | Optional export of RML fragments to Lean/Rocq/Isabelle and import of SMT-LIB problems via a configurable backend. |
83+
| G | Standard libraries | Reusable libraries in `lib/` for classical, intuitionistic, fuzzy, probabilistic, modal, provability, interpretability, set theory, arithmetic, programming-language metatheory, and automata. |
84+
| H | Tooling and ecosystem | Language server, VS Code extension, Docker image, online playground, generated API docs, tutorials. |
85+
| I | Multi-implementation parity | JS and Rust expose the same API for every new feature; CI proves equivalence on a shared test corpus. |
86+
| J | Self-reimplementation (capstone) | The RML evaluator, type layer, operator system, and metatheorem checker are themselves encoded as `.lino`, and the encoded RML reproduces the host RML's behaviour on the example corpus. |
87+
88+
Phases run in parallel where dependencies allow. The dependency graph in [`issue-plan.md`](./issue-plan.md) shows which phase B issues unlock which phase C issues, etc.
89+
90+
## How the Plan Honours the Issue's Requirements
91+
92+
The issue body raises eight distinct requirements. They are tracked atomically in [`requirements.md`](./requirements.md) and addressed as follows:
93+
94+
| # | Requirement | How the plan addresses it |
95+
|---|-------------|---------------------------|
96+
| 1 | Use both comparison docs as input | Every gap row in either doc maps to at least one issue in [`issue-plan.md`](./issue-plan.md). The mapping is visible in [`gap-matrix.md`](./gap-matrix.md). |
97+
| 2 | Plan as GitHub issues, not just prose | [`issue-plan.md`](./issue-plan.md) gives each issue a title, body template, labels, and links — ready to paste into `gh issue create`. |
98+
| 3 | Use issue relationships (blocks/blocked by) to full potential | Every issue lists prerequisite issues and post-conditions; the DAG section of [`issue-plan.md`](./issue-plan.md) renders the graph. |
99+
| 4 | Use labels to full potential | Existing labels are reused; new labels (`area:kernel`, `area:tooling`, `area:libraries`, `phase:A``phase:J`, `capstone`) are proposed and justified. |
100+
| 5 | Each issue must have maximum specific implementation detail | Each plan entry has acceptance criteria, suggested API surface, suggested LiNo syntax, and references to existing libraries/papers. |
101+
| 6 | End goal: universal formal-system constructor surpassing competitors in configurability | Phases A–H bring RML to feature parity; phase I keeps the dual implementation honest; phase J proves universality by self-reimplementation. |
102+
| 7 | Final step: full reimplementation of RML in itself | Phase J is the capstone; its issue cluster is described in detail in [`issue-plan.md`](./issue-plan.md#phase-j-self-reimplementation-capstone). |
103+
| 8 | Style: links notation, references and templates, close to English | Every encoded construct uses words like `is`, `of`, `has`, `from`, `to`, `Pi`, `lambda` so a link reads as a sentence. The conventions are listed in [`issue-plan.md`](./issue-plan.md#naming-and-template-conventions). |
104+
105+
## Risks and Open Questions
106+
107+
| Risk / question | Mitigation |
108+
|-----------------|------------|
109+
| Filing the whole plan at once will spam watchers and obscure priorities. | All 66 planned feature issues and the tracking epic are filed in topological order so each `Depends on #N` reference resolves immediately. The tracking epic [#95](https://github.com/link-foundation/relative-meta-logic/issues/95) consolidates them so watchers can subscribe once. |
110+
| Some "gaps" in the comparison docs reflect design choices, not omissions (e.g. RML accepts self-reference where Lean rejects it). | Each issue marks whether it is a *parity* goal or a *deliberate divergence* goal. Some Lean/Rocq features will not be ported because they conflict with RML's paradox-tolerant semantics. |
111+
| Self-reimplementation may run into RML's current evaluator limits (no full normalization, prototype types). | Phase J explicitly depends on phases B, C, D, and E. If phase D cannot deliver full normalization for all link forms, phase J ships an *interpretive* (small-step) self-evaluator instead of a *compiled* one and documents the limitation. |
112+
| Bridges to mature provers (Lean/Rocq/Isabelle) require domain expertise the project may not have in-house. | Phase F issues are explicitly marked `help wanted` and start with an export pilot to a single target (Lean) before generalizing. |
113+
| Multi-implementation parity may slow down feature delivery. | Phase I provides a shared test corpus and a parity CI job; new feature issues require both implementations or a documented "JS-first / Rust-follow-up" split. |
114+
115+
## Acceptance Checklist
116+
117+
| Requirement | Status |
118+
|-------------|--------|
119+
| Folder `docs/case-studies/issue-26/` exists with case study contents | Done |
120+
| Atomic requirement list extracted from the issue | Done — see [`requirements.md`](./requirements.md) |
121+
| Each comparison-doc gap maps to a concrete issue | Done — see [`gap-matrix.md`](./gap-matrix.md) |
122+
| Each issue has detailed body, dependencies, labels, and acceptance criteria | Done — see [`issue-plan.md`](./issue-plan.md) |
123+
| Plan ends with self-reimplementation capstone | Done — see [`issue-plan.md`](./issue-plan.md#phase-j-self-reimplementation-capstone) |
124+
| LiNo style guidance for English-readable links | Done — see [`issue-plan.md`](./issue-plan.md#naming-and-template-conventions) |
125+
| External research and prior-art references collected | Done — see [`research.md`](./research.md) |
126+
| Issues actually filed on GitHub with proper labels and dependencies | Done — see [filed-issue index](./issue-plan.md#filed-issue-index) and tracking epic [#95](https://github.com/link-foundation/relative-meta-logic/issues/95) |
127+
| Filed plan fulfilled on the current default branch | Done — see [`completion-audit.md`](./completion-audit.md) |
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Completion Audit
2+
3+
This audit records the state after merging the current default branch into PR
4+
[#27](https://github.com/link-foundation/relative-meta-logic/pull/27) on
5+
2026-05-15.
6+
7+
## Filed Plan Status
8+
9+
The issue-26 filing state contains 67 GitHub issues:
10+
11+
- 66 planned feature issues: A1-A5, B1-B2, C1-C3, C5, D1-D16, E1-E5, F1-F7,
12+
G1-G10, H1-H8, I1-I2, and J1-J7.
13+
- 1 tracking epic: J-EPIC, filed as
14+
[#95](https://github.com/link-foundation/relative-meta-logic/issues/95).
15+
16+
All 67 filed issues are closed on GitHub. The detailed closing audit lives in
17+
[`../issue-95/README.md`](../issue-95/README.md), which verifies that every
18+
phase issue is closed, every gap-matrix row is resolved or explicitly marked
19+
as a deliberate divergence/deferred item, the bootstrap gate exists, and the
20+
self-bootstrap tutorial is published.
21+
22+
The generated filing state is committed in
23+
[`../../../experiments/issue-26-filing/state.json`](../../../experiments/issue-26-filing/state.json),
24+
and the plan-ID to GitHub-number mapping is mirrored in
25+
[`issue-plan.md#filed-issue-index`](./issue-plan.md#filed-issue-index).
26+
27+
## Verification Coverage
28+
29+
The current repository has explicit test gates for the implementation work
30+
that fulfilled the plan:
31+
32+
| Coverage level | Local command | What it checks |
33+
|----------------|---------------|----------------|
34+
| Unit/regression | `cd js && npm test` | JS evaluator, checker, LSP, exporters, docs tests, playground tests, corpus tooling tests, and issue-26 plan metadata tests. |
35+
| Unit/regression | `cd rust && cargo test --all-targets` | Rust evaluator, checker, exporters, libraries, shared corpus, and parity-oriented regression tests. |
36+
| Integration | `node scripts/check-corpus-parity.mjs` | Runs the shared `test-corpus/*.lino` files through both JS and Rust and fails on status, stdout, or stderr divergence. |
37+
| E2E/bootstrap | `cd js && npm run test:bootstrap` | Replays the shared corpus through the encoded RML self-evaluator and compares it with the host evaluator. |
38+
| E2E/browser asset | `cd js && npm run test:playground` | Evaluates the embedded playground examples using the browser runtime bundle. |
39+
| Readability/docs | `cd js && npm run lint:english` | Enforces English-readable LiNo naming on `examples/` and `lib/`. |
40+
41+
The GitHub Actions equivalents are `.github/workflows/tests.yml`,
42+
`.github/workflows/parity.yml`, `.github/workflows/bootstrap.yml`,
43+
`.github/workflows/lint-english.yml`, `.github/workflows/api-docs.yml`, and
44+
`.github/workflows/docker.yml`.
45+
46+
## Current Scope
47+
48+
PR #27 now contributes the planning and provenance layer for issue #26:
49+
50+
- requirement extraction,
51+
- gap-to-issue mapping,
52+
- filed issue plan,
53+
- prior-art research,
54+
- filing tooling and state,
55+
- this completion audit.
56+
57+
The feature implementation itself is already present on the current default
58+
branch and was merged into this PR before the final verification pass.

0 commit comments

Comments
 (0)