# Project export: NOETHER — The Curiosity Engine

This document was generated by HackStack to give an AI agent context about a hackathon project. Sections are labeled with their provenance; content marked as truncated was cut to keep this document small.

## Project metadata

- Hackathon: OpenAI Build Week
- Tagline: Learn why AI hallucinates and how measurement catches it. Playable physics with computed black holes, a real broken benchmark, and GPT-5.6 as the map-maker, never the referee.
- Devpost: https://devpost.com/software/noether-73vuo2
- GitHub: https://github.com/dlowzzxx/NOETHER
- Demo: http://noether-intuition-lab.aanisakrasniqi.chatgpt.site/
- Video: https://www.youtube.com/embed/znlXog0yAFY?enablejsapi=1&hl=en_US&rel=0&start=&version=3&wmode=transparent
- Team: 2 GitHub contributor(s) — dlowzzxx (126 commits), Claude Fable 5 (24 commits)

## Devpost submission (written by the team)

### Inspiration

AI can answer a student before the student has had time to form a model of their own. That speed is useful, but it can collapse several possible meanings into one polished response and make fluency feel like evidence. The project began with exactly that failure. I asked an AI whether string theory, geometry, and neural-network hallucination might connect. It replied that transformers calculate geodesics through the curvature of human thought: a beautiful explanation that collapsed supported facts, bounded mathematics, metaphor, and an unsupported mechanism into one sentence. The question was valuable. The answer had erased the labels needed to evaluate it. The problem became personal during an audit of an earlier orbital PINN project. A result that looked like a dramatic model failure turned out to be a worse failure in the answer sheet: the legacy reference path went about 3,197 km inside Earth and missed the analytic trajectory by about 1,463.75 km, while the exported hybrid was about 1.02 km away. The model was limited, but the benchmark behind the headline was broken. That experience became NOETHER's method: preserve the question, predict before reveal, measure with independent machinery, and inspect the difference.

### What it does

NOETHER is an interactive AI-literacy course and scientific playground. It teaches one reusable reflex: Before accepting a confident answer, ask what was compressed, make a prediction, run a test, and label what the result cannot establish. The public course moves through four connected acts: The Keyhole makes serialization visible. A cinematic thought graph is forced into a one-dimensional token stream; relationships are lost, merged, or reconstructed. THE BOUNDARY then contrasts lossy encoding with the structured boundary descriptions studied in black-hole thermodynamics and holography. A prepared case, THE BEAUTIFUL WRONG ANSWER, audits the hypothesis that inspired NOETHER: high-dimensional representation geometry survives; ReLU piecewise-linear regions survive only as a bounded statement; a “geodesic through human thought” remains analogy; and physics-forced hallucination is not established. The learner then runs a counterexample showing that fewer dimensions need not lose information when capacity and a shared codebook make exact reconstruction possible. The Detector turns intuition into play. Learners predict before changing a sealed bottle, firing Newton's cannonball, steering an Artemis-inspired mission, or bending light around a Schwarzschild black hole. Every success forks into VARY IT / CARRY IT / FREE PLAY instead of becoming a dead end. The Case tells the real June benchmark story before opening the Orbit Law Duel. A sealed, preregistered synthetic experiment then compares a structure-preserving Hamiltonian learner with a same-data unstructured baseline without choosing the winner in advance. The Question Lab lives in ChatGPT through the official Apps SDK and MCP. GPT-5.6 maps a learner's exact question into materially different meanings. The learner chooses. Five typed, read-only tools must then end with either a compatible playable world or a bounded Learning Probe specifying what to change, hold fixed, measure, predict, and reflect on. “Unsupported” is never the final activity, and an unrelated Orbit experiment is never substituted. Our deliberately narrow novelty is the complete chain: keyhole compression → an audit separating analogy from mechanism → prediction in a physics world → a named, audited real benchmark lie → live host-model tools under a constitution. NOETHER does not decide that an idea is true, grade a learner's intelligence, or treat GPT prose as numerical evidence. The learner owns the question and prediction; GPT owns interpretations and probe proposals; deterministic code owns calculations; named evidence owns only a scoped comparison.

### How we built it

Codex was the primary implementation environment. The long-running CORE-CODEX-01 task contains the majority of the core build: product architecture, interactions, typed state machines, MCP server, Apps SDK widget, deterministic engines, numerical cross-checks, responsive visual systems, release tooling, and tests. The OWNER supplied the learning problem, scientific intuitions, prior projects, evidence boundaries, product verdicts, and repeated unbriefed first-touch feedback; Codex turned those judgments into executable acceptance criteria and working software. The standalone product uses TypeScript, React, Vinext, Cloudflare Workers/Sites, Canvas 2D, SVG, and self-hosted fonts. The ChatGPT companion uses the official OpenAI Apps SDK and Model Context Protocol. map_question returns interactive branch cards when the host supports widgets and a complete numbered transcript when it does not. The other tools validate concept bridges, supported world configurations, evidence challenges, and bounded Learning Probes. The server accepts no OpenAI API key, ChatGPT cookie, or account credential; ChatGPT hosts the model. Numerical authority stays outside the language model. The project includes Velocity Verlet and RK4 cross-checks, analytic Kepler references, domain gates, a deterministic Schwarzschild light-ray instrument, and a sealed CPU-float64 PINN/Hamiltonian comparison. The black-hole lesson now opens inside a live GPU-computed Schwarzschild ray field; the exact capture-edge experiment remains a separate measurement instrument with its own limits. Fable and Grok contributed adversarial planning and review. During an explicit, owner-authorized late polish window, Fable also implemented a bounded visual/copy pass for Hawking motion, Alcubierre flow, and the black-hole shader. CORE-CODEX-01 reviewed and integrated that work, added the final Boundary claim audit, and owns the validated release. Codex with GPT-5.6 remains the primary implementation task and model for the majority of the core functionality.

### Challenges we ran into

The hardest challenge was not adding features; it was making every feature teach. Early builds were technically dense, visually impressive in places, and confusing to their own maker. Tiny controls, too many verbs, hidden stories, and dead-end question branches turned an Education entry into a filing cabinet. We rebuilt the product around one action at a time, worked examples before blank states, prediction-before-reveal gates, earned receipts, and an always-visible Free Play exit. We also had to keep spectacular visuals honest. The holography lesson cannot claim that string theory explains transformers. A pair-particle cartoon is not a derivation of Hawking radiation. A Schwarzschild disk is not a Kerr simulation. Those limits became visible labels rather than footnotes. Finally, browser animation uncovered a subtle production failure: requestAnimationFrame could freeze important scenes in background-tab conditions. We replaced timing assumptions with a visibility-safe wall-clock loop, added opt-in pixel-difference probes, and tested the actual public deployment instead of trusting local screenshots.

### Accomplishments we're proud of

A working any-question loop that reaches a playable world or a designed Learning Probe instead of ending at “unsupported.” An Apps SDK branch-card widget with one-tap learner choice and a complete text fallback. A prediction-before-reveal architecture enforced by code, not motivational copy. A prepared claim audit that attacks the project's own founding hypothesis and preserves a useful intuition without promoting its false mechanism. A real audited benchmark failure presented as Case File No. 1, with the exciting but unsupported legacy headline quarantined. A preregistered six-run neural dynamics comparison whose frozen classifier returned STRUCTURED_ADVANTAGE, including all baseline escapes rather than dropping failed rollouts. An eight-chapter Black-Hole Flight spanning a live lensed universe and volumetric disk, pre-horizon decision, causal diagram, explicit Alcubierre counterfactual, animated Hawking future, Page-curve/island experiment, ER=EPR/no-signalling lesson, and deterministic Schwarzschild capture-edge instrument. 209/209 application tests and 15/15 MCP tests, plus clean typechecks, lint, production build, public motion probes, legibility checks, and a ten-question zero-dead-end matrix on the W5 release.

### What we learned

Prediction-before-reveal is not a slogan; it has to be a state transition. A useful analogy is not a mechanism, and a lower-dimensional representation is not automatically lossy. The danger is under-specified compression followed by confident reconstruction without a check. A model can conserve energy and still learn the wrong thing. A low numerical error can hide a bad domain. A benchmark can be the weakest part of an evaluation. Fewer dimensions do not automatically imply loss: exact recovery can exist when enough capacity and a shared code are present. Without such a guarantee, the honest response is not panic or blind trust—it is to predict, measure, and inspect the diff. We also learned something about human–AI collaboration from building NOETHER itself. Tests could prove that a feature worked, but only a person using it without a script could reveal that it had no purpose. The product improved when human confusion became release-blocking evidence rather than feedback to explain away.

### What's next

for NOETHER After Build Week, we want to test the course with students and teachers, study whether its receipts transfer to unfamiliar AI answers, and publish new Question Lab adapters only when they have honest measurement contracts. We also want to extend the scientific worlds carefully: Kerr rotation, stronger Hamiltonian baselines, richer mission dynamics, and educator-authored Learning Probe templates. A quote-backed Thought Atlas would preserve the source questions as a branching graph of derivations, analogies, conflicts, and open experiments instead of collapsing months of thought into one canonical summary. These are directions, not claims about the current release.

## README (from the GitHub repository)

# NOETHER — When compression breaks information, measurement catches the break.

NOETHER is an Education project for a specific AI-era problem: a confident answer can arrive before
a learner has formed a prediction, compared meanings, or asked what evidence would separate them.
It turns that missing thinking step into a playable method.
It also features black holes, penrose diagrams, ER=EPR conjecture, alcubierre warp drives, M-theory, holography, string theory.

**Public product:** <https://noether-intuition-lab.aanisakrasniqi.chatgpt.site>

**ChatGPT Apps SDK/MCP endpoint:**
<https://noether-intuition-lab.aanisakrasniqi.chatgpt.site/api/noether>

**Release:** Sites version 35 · runtime commit `a0f0e17`

**Judges:** start with the concise [final release index and 60-second testing path](JUDGES.md).

> **Course promise:** See what a linear answer can lose, learn how measurement catches the break,
> investigate a real broken answer sheet, then apply the detector to any question in ChatGPT.

## The learning loop

1. **The Keyhole** — watch a structured thought become a one-dimensional stream. THE BOUNDARY then
   contrasts lossy encoding with physics cases where exact recovery depends on enough capacity and a
   shared structure. Its prepared **Beautiful Wrong Answer** case audits the project's own origin
   hypothesis—representation geometry survives, ReLU folds stay bounded, “thought geodesics” remain
   analogy, and physics-forced hallucination is not established.
2. **The Detector** — predict before changing a sealed bottle, firing Newton's cannonball, steering
   an Artemis-inspired mission, or bending light around a Schwarzschild black hole.
3. **The Case** — investigate a real June audit in which the “correct answer” was the broken part,
   then race a structure-preserving learner against a same-data baseline under a sealed protocol.
4. **The Question Lab** — use GPT-5.6 Sol inside ChatGPT to map an exact question into materially
   different meanings. The learner chooses; NOETHER must end at a compatible world or a bounded
   Learning Probe, never a silent Orbit substitute or terminal “unsupported.”

Every completed activity offers **VARY IT / CARRY IT / FREE PLAY**. Every teaching claim ends with a
receipt stating what the learner can now inspect and what the activity cannot establish.

## Why the AI is load-bearing—but not authoritative

The standalone course is account-free and deterministic. The ChatGPT face applies the method to an
unrehearsed question through six typed, read-only tools:

```text
map_question
  → learner chooses a branch
  → configure_world → PLAY THIS → run_world → measured outcome
  OR design_learning_probe

optional depth: bridge_concepts · challenge_claim
```

`configure_world` only validates a bounded setup; `run_world` is the deliberately separate action
that executes the checked-in deterministic model after the learner accepts. It returns measurements,
scope limits, and a link to the closest hands-on public world. “PLAY THIS” is therefore an action,
not a decorative label or a promise that ChatGPT cannot fulfill.

`map_question` attaches an Apps SDK branch-card widget with a complete text fallback. GPT proposes
meanings, bridges, and probe structure. It cannot choose the learner's prediction, set numerical
tolerances, invent a reference, run generated code, or issue a truth verdict. NOETHER accepts no
OpenAI API key, ChatGPT cookie, or account credential; ChatGPT hosts the model.

## The evidence spine

The project's narrow novelty is the complete chain, not any one visual: **keyhole compression → a
claim audit that separates analogy from mechanism → prediction in a physics world → a named,
audited real benchmark lie → live host-model tools under a constitution.**

- **June Case File:** a legacy orbital scenario placed periapsis about 3,197 km inside Earth. At one
  nominal orbit the exported hybrid was about 1.02 km from analytic Kepler, while the coarse legacy
  reference was about 1,463.75 km away. The dramatic model-failure headline is quarantined.
- **Sealed PINN-H-3 run:** a preregistered synthetic altered-central-force comparison ran structured
  and baseline lanes at seeds 17/29/43. The frozen classifier returned `STRUCTURED_ADVANTAGE`; no
  escaped baseline rollout was dropped. It is not a general HNN victory or a new law of gravity.
- **Release gates:** 209/209 application tests, 18/18 MCP tests, both typechecks, lint, production
  build, a ten-question zero-dead-end matrix, public motion probes, and public legibility checks.

The exact claim limits, hashes, and two still-open OWNER records are in
[`EVIDENCE.md`](EVIDENCE.md).

## Spectacle with labels

- **Black-Hole Flight** opens inside one live GPU-computed Schwarzschild ray field. Lensed stars,
  moving disk filaments, the capture silhouette, optional coordinate overlay, and bloom share the
  same bounded geodesic surface; adaptive quality keeps it moving. It is not DNGR, Kerr, GRMHD, or
  full radiative transfer, and the exact Light Bender remains the numerical capture-edge authority.
- **The One-Way Sky** restores the animated Hawking temperature/power/lifetime lesson, the bounded
  pair-particle heuristic, and the unknown-endpoint label.
- **The Paradox** lets the learner compare thermal-only output with a unitary Page-curve target and
  change entropy bookkeeping with an island. It teaches the live question; it does not solve it.
- **The Bridge** follows those correlations into ER=EPR. The learner discovers that entanglement is
  neither an outside telescope nor a remote black-hole detonator, then opens a traversable window
  only inside a specially coupled two-sided AdS teaching model.
- **The Light Bender** is the exact deterministic instrument: it integrates bounded Schwarzschild
  null-geodesic path shapes and lets the learner bracket the analytic capture edge.
- **The Alcubierre counterfactual** visualizes metric surgery, negative-energy requirements, and
  the distinction between changing geometry and escaping an already-defined global event horizon.
- **THE BOUNDARY** first attacks the project's own geometry/hallucination hypothesis, then lets the
  learner become the encoder and measure what five bare labels lose before adding the shared
  codebook that makes exact reconstruction possible.

## Routes

| Route | Purpose |
|---|---|
| `/` | Keyhole opening and deterministic course/world launcher; Mirror is an advanced surface |
| `/gravity` | Bottle pressure world and Newton's Cannonball |
| `/gravity/light` | The One-Way Sky, Light Bender, and the real Schwarzschild lens |
| `/orbit` | June Case File and neural Orbit Law Duel |
| `/mission` | Guided and free-play Artemis-inspired mission world |
| `/cosmos` | THE BOUNDARY interactive lesson |
| `/museum`, `/lab`, `/conservation` | Preserved advanced/historical surfaces |
| `/api/noether` | Official Apps SDK/MCP companion |

## How Codex was used

`CORE-CODEX-01` is the primary implementation task and contains the majority of the core build;
the task ran GPT-5.6 as its implementing model, and GPT-5.6 also powers the in-product Question
Lab through the Apps SDK. Codex converted the OWNER's learning problem, scientific intuition,
prior experiments, evidence
boundaries, and repeated unbriefed product verdicts into:

- typed learner state machines and prediction-before-reveal gates;
- deterministic physics engines and independent numerical cross-checks;
- the Apps SDK/MCP server, strict validators, widget, and complete fallback;
- responsive Canvas/SVG learning worlds and visibility-safe animation runtime;
- the sealed neural-dynamics pipeline, provenance manifests, and evidence quarantine;
- public Sites releases, regression suites, release gates, and this claim registry.

Fable and Grok contributed adversarial planning and review. Under an explicit late owner grant,
Fable also implemented a bounded final visual/copy pass covering Hawking motion, Alcubierre flow,
and the black-hole shader tra

[README truncated for size]

## Detected evidence (automated analysis)

Indexed codebase: 267 recognized source files, 3083 KB.
- CSS (language) — detected in the code
- HTML (language) — detected in the code
- JavaScript (language) — detected in the code
- Next.js (technology) — detected in the code
- Python (language) — detected in the code
- React (technology) — detected in the code
- Tailwind CSS (technology) — detected in the code
- TypeScript (language) — detected in the code
- Node.js (technology) — claimed on Devpost, not found in the code
- PyTorch (technology) — claimed on Devpost, not found in the code
- AI coding agent: Claude Code — evidence: commit authorship or trailers
- AI coding agent: Codex — evidence: config files committed to the repository

## Codebase structure (from repository index)

### Files (120 of 431)

```
.gitattributes
AGENTS.md
app/.env.example
app/.gitignore
app/.openai/hosting.json
app/app/api/noether/route.ts
app/app/conservation/conservation-figure.tsx
app/app/conservation/conservation-lab.tsx
app/app/conservation/conservation.module.css
app/app/conservation/page.tsx
app/app/cosmos/boundary-lab.tsx
app/app/cosmos/boundary.module.css
app/app/cosmos/cosmos-lab.tsx
app/app/cosmos/cosmos.module.css
app/app/cosmos/page.tsx
app/app/globals.css
app/app/gravity/cannonball-canvas.tsx
app/app/gravity/cannonball-lab.tsx
app/app/gravity/gravity.module.css
app/app/gravity/light/alcubierre-counterfactual.tsx
app/app/gravity/light/black-hole-canvas.tsx
app/app/gravity/light/black-hole-lab.tsx
app/app/gravity/light/black-hole.module.css
app/app/gravity/light/er-epr-bridge.tsx
app/app/gravity/light/geodesic-shaders.ts
app/app/gravity/light/hawking-future.tsx
app/app/gravity/light/information-paradox.tsx
app/app/gravity/light/page.tsx
app/app/gravity/light/penrose-descent.tsx
app/app/gravity/light/real-lens-canvas.tsx
app/app/gravity/light/relativistic-renderer.tsx
app/app/gravity/page.tsx
app/app/lab/page.tsx
app/app/layout.tsx
app/app/mcp/route.ts
app/app/mission/custom/custom-mission-canvas.tsx
app/app/mission/custom/custom-mission-lab.tsx
app/app/mission/custom/page.tsx
app/app/mission/mission-canvas.tsx
app/app/mission/mission-lab.tsx
app/app/mission/mission-scenarios.ts
app/app/mission/mission.module.css
app/app/mission/page.tsx
app/app/museum/page.tsx
app/app/noether-lab.tsx
app/app/orbit-canvas.tsx
app/app/orbit/law-duel-canvas.tsx
app/app/orbit/law-duel-lab.tsx
app/app/orbit/law-duel.module.css
app/app/orbit/orbit-case-story.module.css
app/app/orbit/orbit-case-story.tsx
app/app/orbit/orbit-lab.tsx
app/app/orbit/orbit-world.tsx
app/app/orbit/orbit.module.css
app/app/orbit/page.tsx
app/app/page.tsx
app/components/course/completion-fork.module.css
app/components/course/completion-fork.tsx
app/components/course/course-rail.module.css
app/components/course/course-rail.tsx
app/components/museum/director.tsx
app/components/museum/museum-shell.tsx
app/components/museum/provenance-drawer.tsx
app/components/museum/room-exit.tsx
app/components/museum/room-threshold.tsx
app/components/museum/tour-receipt.tsx
app/components/workbench/bottleneck-opening.module.css
app/components/workbench/bottleneck-opening.tsx
app/components/workbench/constellation-map.tsx
app/components/workbench/curiosity-workbench.tsx
app/components/workbench/learning-launch.module.css
app/components/workbench/learning-launch.tsx
app/components/workbench/living-orbit.tsx
app/components/workbench/mirror-lab.module.css
app/components/workbench/mirror-lab.tsx
app/components/workbench/pressure-world.tsx
app/components/workbench/workbench.module.css
app/drizzle/meta/_journal.json
app/eslint.config.mjs
app/lib/boundary/claim-audit.ts
app/lib/boundary/encoder.ts
app/lib/conservation/analytic-kepler.ts
app/lib/conservation/contracts.ts
app/lib/conservation/fixed-pinn.ts
app/lib/conservation/generate-evidence.node.ts
app/lib/conservation/index.ts
app/lib/conservation/parametric-pinn.ts
app/lib/conservation/reference-audit.ts
app/lib/curiosity/contracts.ts
app/lib/curiosity/features.ts
app/lib/curiosity/index.ts
app/lib/curiosity/local-world-matcher.ts
app/lib/curiosity/mirror.ts
app/lib/curiosity/run-world.ts
app/lib/curiosity/worlds.ts
app/lib/demo/rehearsal.ts
app/lib/design/canvas-kit.ts
app/lib/design/tokens.ts
app/lib/gravity/black-hole-concepts.ts
app/lib/gravity/cannonball.ts
app/lib/gravity/index.ts
app/lib/gravity/light-bending.ts
app/lib/hamiltonian/index.ts
app/lib/hamiltonian/law-duel.ts
app/lib/mission/build-reference.ts
app/lib/mission/camera-director.ts
app/lib/mission/camera.ts
app/lib/mission/custom-runtime.ts
app/lib/mission/custom-session.ts
app/lib/mission/index.ts
app/lib/mission/live-runtime.ts
app/lib/mission/nasa-reference.ts
app/lib/mission/physics.ts
app/lib/mission/profile.ts
app/lib/mission/telemetry.ts
app/lib/noether/contracts.ts
app/lib/noether/engine.ts
app/lib/noether/fixtures.ts
app/lib/noether/index.ts
app/lib/orbit/contracts.ts
[311 more files omitted for size]
```

### Dependencies

- app/package.json: @cfworker/json-schema@^4.1.1, @cloudflare/vite-plugin@1.45.0, @fontsource-variable/ibm-plex-sans@^5.2.8, @fontsource-variable/newsreader@^5.2.10, @fontsource/ibm-plex-mono@^5.2.7, @modelcontextprotocol/ext-apps@^1.7.4, @modelcontextprotocol/sdk@^1.29.0, @tailwindcss/postcss@4.2.1, @types/node@22.19.19, @types/react@19.2.14, @types/react-dom@19.2.3, @vitejs/plugin-react@6.0.2, @vitejs/plugin-rsc@0.5.26, eslint@9.39.4, eslint-config-next@16.2.6, next@16.2.6, react@19.2.6, react-dom@19.2.6, react-server-dom-webpack@19.2.6, tailwindcss@4.2.1, typescript@5.9.3, vinext@0.0.50, vite@8.1.4, wrangler@4.111.0, zod@^3.25.76
- mcp/package.json: @cfworker/json-schema@^4.1.1, @modelcontextprotocol/ext-apps@^1.7.4, @modelcontextprotocol/sdk@^1.29.0, @types/node@22.19.19, typescript@5.9.3, zod@^3.25.76

### Recent commits (newest first)

- Add final judge release index
- Record public MCP world execution release
- Record packaged Sites release retry
- Make PLAY THIS execute deterministic worlds
- Record NOETHER MCP compatibility release
- Keep cached NOETHER connectors compatible
- Add MIT license
- Fable [100]: final handoff — judge simulation (reviews/054), docs synced to v32, script rulings recorded
- Fable [099]: warp+bounce mandatory sequence, audit box centered, custom mission live builder, 053 = script authority
- Regenerate Devpost gallery for current NOETHER
- Record W11 public release
- Bound ER EPR lesson to tested claims
- Fable [093]: THE BRIDGE (ER=EPR chapter 07) + paradox guidance, audit panel unblock, real FREE PLAY, chapter-hijack fix
- Add Devpost image gallery
- Record W10 public release
- Add Boundary claim audit and final film
- Fable: README names GPT-5.6 in the Codex build credit (Devpost checklist item 5)
- Fable [092]: transplant probe 047 shader wholesale into product renderer (owner order)
- Fable [091]: port 047 look into product shader — beaming restored, filmic tonemap, 15.5M hero framing
- Fable [090]: final film script + full Devpost package (reviews/051); recorder pipeline proven

## Key source files (fetched from GitHub, selected and truncated for size)

### WORKSPACE.md

```markdown
# WORKSPACE.md — file ownership and placement

The NOETHER product repository is:

`C:\dev\BuildWeek\noether`

All plans, decisions, reviews, application/MCP source, tests, manifests, and checked-in evidence
belong inside that directory.

Read-only OWNER reference projects/corpus:

- `C:\dev\BuildWeek\Artemis-Sim`
- `C:\dev\BuildWeek\PINN`
- `C:\dev\BuildWeek\chats`
- `C:\dev\BuildWeek\AI-ORCHESTRATION-PLAYBOOK.md`

These are not subdirectories of the NOETHER repository and are not edited during the revamp.
Selected prior code/data enters only through `PROVENANCE.md`.

External generated evidence may live at:

`C:\dev\BuildWeek\noether-release-evidence`

It must be referenced from checked-in evidence with exact purpose/commit, and never treated as source
or silently included in a deployment.

Historical root scratch such as `.luna-verify-*`, `.verify-noether-*`, archives, logs, and the
empty `C:\dev\BuildWeek\.git` directory are not product inputs. Do not create another repository,
brain, review, or implementation file at the BuildWeek root. Cleanup is OWNER-approved housekeeping;
do not delete historical scratch during product work.

OWNER-owned untracked review files remain untouched unless explicitly authorized for commit. At
Reset-3 planning close these include reviews 021, 034, and 036.

```

### LICENSE.md

```markdown
# MIT License

Copyright (c) 2026 NOETHER contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

## Scope and third-party material

This license applies to NOETHER's original source code, documentation, and
project-authored visual assets unless a file states otherwise.

Third-party packages retain their respective licenses. NASA/JSC data and any
other externally sourced material are not relicensed by this file; their
sources, usage basis, attribution, transformations, and limitations are
documented in [`PROVENANCE.md`](PROVENANCE.md) and the accompanying manifests.


```

### mcp/package.json

```
{
  "name": "noether-chatgpt-companion",
  "version": "0.1.0",
  "private": true,
  "description": "Stateless MCP companion for NOETHER's source-anchored Curiosity Engine.",
  "type": "module",
  "engines": {
    "node": ">=22.13.0"
  },
  "scripts": {
    "start": "node --experimental-strip-types node-server.ts",
    "test": "node --experimental-strip-types --test tests/*.test.ts",
    "typecheck": "tsc -p tsconfig.json"
  },
  "dependencies": {
    "@cfworker/json-schema": "^4.1.1",
    "@modelcontextprotocol/ext-apps": "^1.7.4",
    "@modelcontextprotocol/sdk": "^1.29.0",
    "zod": "^3.25.76"
  },
  "devDependencies": {
    "@types/node": "22.19.19",
    "typescript": "5.9.3"
  }
}

```

### app/package.json

```
{
  "name": "noether-learning-instrument",
  "version": "0.1.0",
  "description": "A learner-first thought-to-experiment compiler for scientific intuition.",
  "private": true,
  "engines": {
    "node": ">=22.13.0"
  },
  "scripts": {
    "bundle:pinn-h3": "node scripts/build-pinn-h3-browser-bundle.mjs",
    "dev": "vinext dev --hostname 127.0.0.1",
    "build": "vinext build",
    "start": "node scripts/start-production-worker.mjs",
    "smoke:dev-host": "node tests/dev-host-smoke.mjs",
    "smoke:worker": "node tests/production-worker-smoke.mjs",
    "test": "npm run build && node --experimental-strip-types --test tests/rendered-html.test.mjs tests/session.test.mjs tests/museum-tour.test.ts tests/noether-contracts.test.ts tests/noether-engine.test.ts tests/cosmos-room.test.ts tests/boundary-room.test.ts tests/mission-engine.test.ts tests/mission-room.test.ts tests/mission-live-runtime.test.ts tests/mission-camera.test.ts tests/mission-camera-director.test.ts tests/mission-custom-runtime.test.ts tests/mission-custom-session.test.ts tests/mission-custom-canvas.test.ts tests/mission-custom-room.test.ts tests/conservation-audit.test.ts tests/conservation-room.test.ts tests/curiosity-contracts.test.ts tests/curiosity-local-world-matcher.test.ts tests/curiosity-mirror.test.ts tests/curiosity-room.test.ts tests/design-tokens.test.ts tests/gravity-cannonball.test.ts tests/gravity-light-bending.test.ts tests/gravity-black-hole-room.test.ts tests/gravity-room.test.ts tests/hamiltonian-law-duel.test.ts tests/hamiltonian-law-duel-room.test.ts tests/orbit-engine.test.ts tests/orbit-hamiltonian-preregistration.test.mjs tests/orbit-room.test.ts tests/release-audit.test.mjs tests/demo-rehearsal.test.ts",
    "lint": "eslint . --ignore-pattern dist --ignore-pattern .next",
    "typecheck": "tsc --noEmit"
  },
  "dependencies": {
    "@cfworker/json-schema": "^4.1.1",
    "@fontsource-variable/ibm-plex-sans": "^5.2.8",
    "@fontsource-variable/newsreader": "^5.2.10",
    "@fontsource/ibm-plex-mono": "^5.2.7",
    "@modelcontextprotocol/ext-apps": "^1.7.4",
    "@modelcontextprotocol/sdk": "^1.29.0",
    "next": "16.2.6",
    "react": "19.2.6",
    "react-dom": "19.2.6",
    "zod": "^3.25.76"
  },
  "devDependencies": {
    "@cloudflare/vite-plugin": "1.45.0",
    "@tailwindcss/postcss": "4.2.1",
    "@types/node": "22.19.19",
    "@types/react": "19.2.14",
    "@types/react-dom": "19.2.3",
    "@vitejs/plugin-react": "6.0.2",
    "@vitejs/plugin-rsc": "0.5.26",
    "eslint": "9.39.4",
    "eslint-config-next": "16.2.6",
    "react-server-dom-webpack": "19.2.6",
    "tailwindcss": "4.2.1",
    "typescript": "5.9.3",
    "vinext": "0.0.50",
    "vite": "8.1.4",
    "wrangler": "4.111.0"
  },
  "overrides": {
    "@babel/core": "^7.29.7",
    "js-yaml": "^4.3.0",
    "postcss": "^8.5.10"
  },
  "type": "module"
}

```

### mcp/server.ts

```typescript
import {
  registerAppResource,
  registerAppTool,
  RESOURCE_MIME_TYPE,
} from "@modelcontextprotocol/ext-apps/server";
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";

import {
  bridgeConcepts,
  challengeClaim,
  configureWorld,
  designLearningProbe,
  mapQuestion,
  runWorld,
  toToolError,
} from "./src/core.ts";
import {
  bridgeConceptsWireInputShape,
  bridgeConceptsWireOutputShape,
  challengeClaimWireInputShape,
  challengeClaimWireOutputShape,
  configureWorldWireInputShape,
  configureWorldWireOutputShape,
  designLearningProbeWireInputShape,
  designLearningProbeWireOutputShape,
  mapQuestionWireInputShape,
  mapQuestionWireOutputShape,
  runWorldWireInputShape,
  runWorldWireOutputShape,
} from "./src/wire-schemas.ts";

const LEGACY_WIDGET_URI = "ui://noether/hypothesis-ledger.html";
const QUESTION_MAP_WIDGET_URI = "ui://noether/question-map-v1.html";
const WIDGET_DOMAIN = "https://noether-intuition-lab.aanisakrasniqi.chatgpt.site";

export interface NoetherWidgetBundle {
  legacyLedgerHtml: string;
  questionMapHtml: string;
}

const commonAnnotations = {
  readOnlyHint: true,
  destructiveHint: false,
  idempotentHint: true,
  openWorldHint: false,
};

function success(result: Record<string, unknown>, message: string) {
  return {
    content: [{ type: "text" as const, text: message }],
    structuredContent: result,
  };
}

function questionMapFallback(result: ReturnType<typeof mapQuestion>): string {
  const branches = result.branches.map((branch, index) => {
    const route = branch.execution.status === "adapter_candidate"
      ? "checked world ready"
      : "bounded Learning Probe next";
    return `${index + 1}. ${branch.label}\n   ${branch.detail}\n   What separates it: ${branch.distinguishingClaim}\n   Next: ${route}.`;
  });
  return [
    "YOUR QUESTION, COMPRESSED INTO DIFFERENT MEANINGS",
    `“${result.source.text}”`,
    "",
    ...branches,
    "",
    "None is the answer and no world has been chosen. Ask the learner which numbered meaning they intended, or whether they want to add their own. Stop before starting an activity.",
  ].join("\n");
}

function usesLegacyQuestionMapContract(args: unknown): boolean {
  if (!args || typeof args !== "object" || !("branches" in args) || !Array.isArray(args.branches)) return false;
  return args.branches.some((branch) => {
    if (!branch || typeof branch !== "object" || !("execution" in branch)) return false;
    const execution = branch.execution;
    return Boolean(
      execution
      && typeof execution === "object"
      && (("status" in execution && execution.status === "unsupported_useful") || "missingExperiment" in execution),
    );
  });
}

function legacyQuestionMapResult(result: ReturnType<typeof mapQuestion>) {
  return {
    ...result,
    branches: result.branches.map((branch) => ({
      ...branch,
      execution: branch.execution.status === "adapter_candidate"
        ? {
          status: "adapter_candidate" as const,
          adapterId: branch.execution.adapterId,
          missingExperiment: null,
        }
        : {
          status: "unsupported_useful" as const,
          adapterId: null,
          missingExperiment: {
            name: branch.execution.probeSeed.activityGoal,
            neededMeasurement: branch.execution.probeSeed.measurementIdea,
          },
        },
    })),
  };
}

export function createNoetherServer(
  widgets: NoetherWidgetBundle,
  options: ConstructorParameters<typeof McpServer>[1] = {},
): McpServer {
  const server = new McpServer(
    { name: "noether-curiosity-companion", version: "0.4.0" },
    {
      ...options,
      instructions:
        "NOETHER has two faces: learn the predict-measure-diff method on the public site, then APPLY IT to any question here in the ChatGPT Question Lab. Follow this state machine. (1) For a new learner question, call map_question only. (2) Present its materially different branches in plain language. (3) STOP and ask which branch the learner means, or whether they want to edit/add one. Never infer that choice and never call another NOETHER tool in the same turn. (4) After an explicit later choice, every branch must reach an activity: call configure_world for a matching checked-in pressure, mission, or orbit world; otherwise call design_learning_probe. Never default to orbit. (5) After configure_world, when the learner says play, run, or otherwise accepts the activity, call run_world with the same known nodes and proposal. Present its outcome, measurements, scope, and interactive link. Never claim the model cannot execute a checked-in world. bridge_concepts runs only when the learner explicitly asks to connect two concepts; challenge_claim runs only for an explicit claim. Copy every source quote exactly with offsets. Never generate an executable law, equation, code, tolerance, evidence result, truth verdict, learner decision, or praise. Deterministic code owns measurements.",
    },
  );

  // Kept for transport compatibility with the currently deployed Worker, but
  // deliberately not attached to any Reset-3 tool. The old ledger is not the
  // Curiosity Engine's UI and therefore must not render for these data tools.
  registerAppResource(
    server,
    "Legacy NOETHER hypothesis ledger (unreferenced)",
    LEGACY_WIDGET_URI,
    {},
    async () => ({
      contents: [
        {
          uri: LEGACY_WIDGET_URI,
          mimeType: RESOURCE_MIME_TYPE,
          text: widgets.legacyLedgerHtml,
          _meta: {
            ui: {
              prefersBorder: false,
              csp: { connectDomains: [], resourceDomains: [] },
            },
          },
        },
      ],
    }),
  );

  registerAppResource(
    server,
    "NOETHER question-map branch cards",
    QUESTION_MAP_WIDGET_URI,
    {},
    async () => ({
      contents: [
        {
          uri: QUESTION_MAP_WIDGET_URI,
          mimeType: RESOURCE_MIME_TYPE,
          text: widgets.questionMapHtml,
          _meta: {
            ui:
[truncated — 9160 more characters]
```

### app/app/page.tsx

```typescript
import type { Metadata } from "next";
import { CuriosityWorkbench } from "@/components/workbench/curiosity-workbench";

export const metadata: Metadata = {
  title: "NOETHER — The Curiosity Engine",
  description: "Turn a question into a map you can think through and a world you can touch.",
};

export default function CuriosityEnginePage() {
  return <CuriosityWorkbench />;
}

```

### app/app/layout.tsx

```typescript
import type { Metadata, Viewport } from "next";
import "@fontsource-variable/newsreader";
import "@fontsource-variable/ibm-plex-sans";
import "@fontsource/ibm-plex-mono/400.css";
import "@fontsource/ibm-plex-mono/500.css";
import "./globals.css";

const SITE_ORIGIN = "https://noether-intuition-lab.aanisakrasniqi.chatgpt.site";

export const metadata: Metadata = {
  metadataBase: new URL(SITE_ORIGIN),
  title: "NOETHER — The Curiosity Engine",
  description: "Turn a question into a map you can think through and a world you can touch.",
  applicationName: "NOETHER",
  openGraph: {
    title: "NOETHER — The Curiosity Engine",
    description: "Turn a question into a map you can think through and a world you can touch.",
    type: "website",
    images: [{
      url: "/og-black-hole-v2.png",
      width: 1672,
      height: 941,
      alt: "NOETHER — a black hole lensing light through an interactive physics course",
    }],
  },
  twitter: {
    card: "summary_large_image",
    title: "NOETHER — The Curiosity Engine",
    description: "Turn a question into a map you can think through and a world you can touch.",
    images: ["/og-black-hole-v2.png"],
  },
};

export const viewport: Viewport = {
  colorScheme: "dark",
  themeColor: "#071014",
  width: "device-width",
  initialScale: 1,
};

export default function RootLayout({ children }: Readonly<{ children: React.ReactNode }>) {
  return <html lang="en"><body>{children}</body></html>;
}

```

### app/worker/index.ts

```typescript
/** Cloudflare Worker entry point for NOETHER. */
import { handleImageOptimization, DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES } from "vinext/server/image-optimization";
import handler from "vinext/server/app-router-entry";
import { handleNoetherMcpRequest } from "../../mcp/worker-handler";
import noetherWidgetHtml from "./noether-widget.html?raw";
import questionMapWidgetHtml from "./question-map-widget.html?raw";

interface AssetFetcher {
  fetch(request: Request): Promise<Response>;
}

interface Env {
  ASSETS: AssetFetcher;
  IMAGES: {
    input(stream: ReadableStream): {
      transform(options: Record<string, unknown>): {
        output(options: { format: string; quality: number }): Promise<{ response(): Response }>;
      };
    };
  };
}

interface ExecutionContext {
  waitUntil(promise: Promise<unknown>): void;
  passThroughOnException(): void;
}

// Image security config. SVG sources with .svg extension auto-skip the
// optimization endpoint on the client side (served directly, no proxy).
// To route SVGs through the optimizer (with security headers), set
// dangerouslyAllowSVG: true in next.config.js and uncomment below:
// const imageConfig: ImageConfig = { dangerouslyAllowSVG: true };

const worker = {
  async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
    const url = new URL(request.url);

    if (
      url.pathname === "/api/noether" ||
      url.pathname.startsWith("/api/noether/") ||
      url.pathname === "/mcp" ||
      url.pathname.startsWith("/mcp/")
    ) {
      return handleNoetherMcpRequest(request, {
        legacyLedgerHtml: noetherWidgetHtml,
        questionMapHtml: questionMapWidgetHtml,
      });
    }

    if (url.pathname === "/_vinext/image") {
      const allowedWidths = [...DEFAULT_DEVICE_SIZES, ...DEFAULT_IMAGE_SIZES];
      return handleImageOptimization(request, {
        fetchAsset: (path) => env.ASSETS.fetch(new Request(new URL(path, request.url))),
        transformImage: async (body, { width, format, quality }) => {
          const result = await env.IMAGES.input(body).transform(width > 0 ? { width } : {}).output({ format, quality });
          return result.response();
        },
      }, allowedWidths);
    }

    return handler.fetch(request, env, ctx);
  },
};

export default worker;

```

### app/lib/hamiltonian/index.ts

```typescript
export * from "./law-duel.ts";

```

### app/lib/noether/index.ts

```typescript
export * from "./contracts.ts";
export * from "./engine.ts";
export * from "./fixtures.ts";

```

[248 more indexed source files omitted to keep this export small. The full file list is in the Codebase structure section above.]