Skip to content

docs(research): formal synthesis paper unifying substrate + e2e framework#52

Merged
CodeWithJuber merged 6 commits into
masterfrom
docs/formal-synthesis-paper
Jul 11, 2026
Merged

docs(research): formal synthesis paper unifying substrate + e2e framework#52
CodeWithJuber merged 6 commits into
masterfrom
docs/formal-synthesis-paper

Conversation

@CodeWithJuber

Copy link
Copy Markdown
Owner

Summary

Adds research/formal-synthesis/ — a formal, mathematical unification of three
independently-developed bodies of work that all describe the same architecture
for making a frozen language model reliable at coding:

  1. The cognitive substrate — five faculties a frozen model lacks + mechanisms M1–M6
  2. The end-to-end reliability framework (FRAMEWORK.md) — F1/F2, Δ*, I1–I4, A1–A7, T1–T6
  3. forgekit / claude-e2e-kit — the deployed implementation

The paper proves these are one object in three vocabularies.

The central result

Reliability = a probabilistic instruction layer × a deterministic interception layer. Neither layer alone suffices. (Theorem D, with proof.)

Instructions raise p < 1 but can never reach 1, so silent misses over n tasks go as 1 − pⁿ → 1; a deterministic layer multiplies that residual down by (1 − cⱼ) per check but cannot catch the semantic class (undecidable). This is the formal content of never trust a probability engine's output; earn trust with an external check.

Three anchor identities (proved, not analogies)

Substrate Framework Relationship
impact-oracle blast-radius change-closure Δ* identical — reverse reachability to fixpoint ⇒ perfect recall
M2 assumption gate amnesia equation argmax P(convention∣training) identical — supply context or halt, never guess
substrate's two layers design law "Π₃ probabilistic, Π₂ deterministic" identical — Theorem D

What's in the PR

  • substrate_synthesis.pdf / .html — the 42-page paper (definitions, Theorem D + proof, the unified A1–A7 TASK loop, invariants I1–I4, theorems T1–T6 with proofs, the 16-row crosswalk, the full 14-mapping Qur'anic epistemology, both prototypes with honest metrics)
  • crosswalk.json / .md — the three-way correspondence, incl. the P1/P2/P3 → Π₁/Π₂/Π₃ notation reconciliation (the paper keeps P1–P3 for model properties, renames the framework primitives Π₁–Π₃)
  • graded_reference_set.json / .md — 15 new sources independently verified: 9 confirmed, 6 traceable, 0 unverifiable. Both future-dated arXiv IDs (2604.26275, 2601.05111) were confirmed to resolve to real preprints by direct fetch; 2601.05111 is disambiguated from the founding Agent-as-a-Judge paper (2410.10934).
  • merged_references.json — full 47-entry bibliography (32 original + 15 new, deduped)
  • figures/ — the two-layer duality and the unified TASK loop schematics

The two runnable prototypes are cross-referenced to the existing research/python-prototypes/impact_oracle/ and router_gate/ trees rather than duplicated.

Honesty commitments (carried from the source work)

  • Prototypes are demonstrations, not benchmarks — perfect accuracy on a tuned 30-task set shows the rubric can separate cases. Cost figures (62.1% saved) are exact arithmetic on real measured tokens from live calls; routed-down outputs were execution-verified.
  • The impact oracle does not win on F1 (0.75 vs grep 0.79) — its property is perfect recall, the safety guarantee for "what will my edit break?".
  • The Qur'anic lens is framing, never technical authority — it names why a safeguard is owed; the engineering stands on its own.

Review notes

  • No source code changed — this is a docs/research addition only.
  • Not for immediate merge; opening for review per repo discipline.

🤖 Drafted with Claude Science.

…ramework

Adds research/formal-synthesis/: a formal, mathematical unification of the
cognitive-substrate theory, the end-to-end reliability framework (F1/F2, Δ*,
I1-I4, A1-A7, T1-T6), and the forgekit implementation.

Central result (Theorem D): reliability = probabilistic instruction layer ×
deterministic interception layer; neither alone suffices. Three anchor
identities proved: impact-oracle blast-radius ≡ change-closure Δ*; assumption
gate ≡ amnesia equation; two layers ≡ the Π3-probabilistic/Π2-deterministic
design law.

Includes: 42-page paper (HTML+PDF), three-way crosswalk (JSON+MD) with the
P1/P2/P3 → Π1/Π2/Π3 notation reconciliation, a graded reference set for 15 new
sources (9 confirmed / 6 traceable / 0 unverifiable, both future-dated arXiv IDs
verified by direct fetch), a merged 47-entry bibliography, and two schematics.
The two runnable prototypes are cross-referenced to the existing
research/python-prototypes/ trees rather than duplicated.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9048a1bd61

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

</div>

<figure>
<img src="{{artifact:art_5f049677-4c3c-40f2-8905-dd01c966e9ae}}" alt="The two-layer duality architecture">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Point figure tags at committed images

When this HTML is opened from the repository, {{artifact:...}} is not a resolvable URL, while the actual PNGs are committed under research/formal-synthesis/figures/. This makes the paper's figures render as broken images despite the README describing the HTML as self-contained; use the committed relative paths or embed the images as data URIs.

Useful? React with 👍 / 👎.

1. **The Cognitive Substrate** — five faculties a frozen model structurally lacks
(memory, learning, imagination, self-correction, impact-awareness) and six
operating mechanisms M1–M6, with two runnable prototypes.
2. **The End-to-End Agent Reliability Framework** (`FRAMEWORK.md`) — failure modes

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add the referenced framework document

This introduces FRAMEWORK.md as one of the three source bodies for the synthesis, but I checked the repository and there is no FRAMEWORK.md or other non-research/formal-synthesis source for the named End-to-End Agent Reliability Framework. Readers cannot verify the crosswalk/theorem claims from the referenced document, so either add the file or replace this with the actual external/internal link.

Useful? React with 👍 / 👎.

Make the Citations track's 14-verified vs the shipped canonical 15 explicit:
the +1 is the founding Agent-as-a-Judge paper (arXiv:2410.10934), added on the
track's own recommendation and graded confirmed. Adds count_provenance to the
graded reference set (JSON + MD). No other content changes.
@CodeWithJuber

Copy link
Copy Markdown
Owner Author

Count reconciliation (14 → 15). The Citations verification track independently verified 14 new sources (8 confirmed / 6 traceable / 0 unverifiable). While disambiguating the 2026 Agent-as-a-Judge survey (2601.05111), the track itself flagged and web-verified the founding Zhuge et al. 2024 paper (arXiv:2410.10934) and recommended citing it — so it was added and graded confirmed, giving the canonical 15 / 9 / 6 / 0 and the 47-entry merged bibliography used throughout this PR. The two figures differ by exactly that one added paper; the latest commit records this explicitly in graded_reference_set.{json,md}.

…ge changelog

latestChanges() matched only the first "## [...]" CHANGELOG section, which
after a release is the empty "## [Unreleased]" heading — leaving the status
page's "Latest changes" list empty and failing test/pages.test.js:43. Now
walks sections in order and uses the first one that actually has bullets.

Also bumps ROADMAP's stale "Now" version marker to v0.12.0.
… gitleaks

gitleaks' generic-api-key rule flags the "key" field in
research/formal-synthesis/{graded_reference_set,merged_references}.json —
BibTeX-style citation keys like "wang2023voyager", not secrets. Add a
path-scoped allowlist for these two files.
master auto-bumped past v0.12.0 before this PR's docs-check ran (pull_request
CI checks out a merge of this branch into master's current tip). Keep the
marker matching master's shipped version.
Resolves the ROADMAP.md "Now" marker conflict in favor of v0.12.1
(master's shipped version after auto-release), consistent with the
earlier roadmap fix on this branch.
@CodeWithJuber CodeWithJuber merged commit f162dc7 into master Jul 11, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant