Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
VITE_INSFORGE_URL=https://your-project.region.insforge.app
VITE_INSFORGE_ANON_KEY=your-anon-key

# Server-only. Put the real value in .dev.vars locally and use
# `npx wrangler secret put NVIDIA_API_KEY` for a deployed Worker.
NVIDIA_API_KEY=nvapi-replace-with-your-key

# Server-only Codex lesson generation. Put the real value in .dev.vars locally
# and use `npx wrangler secret put OPENAI_API_KEY` for a deployed Worker.
OPENAI_API_KEY=sk-replace-with-your-key
OPENAI_LESSON_MODEL=gpt-5.6-sol
14 changes: 12 additions & 2 deletions DEMO_SCRIPT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

The video must be public on YouTube, under three minutes, and include spoken coverage of how GPT‑5.6 and Codex were used.

## Before recording — fast AI smoke path

1. Keep the Codex desktop app open and signed in, then run `npm run dev` and open the printed local URL.
2. Sign in to Perception Learning.
3. Generate a lesson with topic **Why gas pressure rises when volume decreases** and goal **Explain the pressure change using evidence from a controlled simulation**.
4. Open the generated ideal-gas simulation and change volume to show that only a reviewed deterministic runtime executes.
5. In the lesson notes, type **Why does pressure increase when volume decreases?**, choose **Generate AI answer**, and show the answer appended on a new line. Generate study or multiple-choice questions from the same lesson as a second quick proof.

Use the deployed URL for the normal hosted demo. Use `npm run dev` when you specifically want to demonstrate lesson/simulation generation through the signed-in Codex GPT‑5.6 bridge. NVIDIA question and note-answer generation works in both environments.

## 0:00–0:20 — The problem

**Show:** Library hero and OpenStax shelf.
Expand All @@ -24,7 +34,7 @@ The video must be public on YouTube, under three minutes, and include spoken cov

**Show:** Class → Start assignment → commit a Mechanical Energy forecast → run the lab → change release height → explain the conserved quantity.

**Say:** “The model is interactive, repeatable, keyboard- and touch-friendly. AI can propose a model, but only validated deterministic code produces the evidence. The learner’s forecast, confidence, parameter changes, and explanation form the proof trail.”
**Say:** “The model is interactive, repeatable, keyboard- and touch-friendly. AI can select and frame a reviewed runtime, but only allow-listed deterministic code produces the evidence—no generated JavaScript reaches the browser. The learner’s forecast, confidence, parameter changes, and explanation form the proof record.”

## 1:48–2:20 — The feedback loop that did not exist before

Expand All @@ -42,6 +52,6 @@ The video must be public on YouTube, under three minutes, and include spoken cov

**Show:** README architecture, test output, and Cloudflare dashboard or deployment URL.

**Say:** “GPT‑5.6 and Codex helped design the product, map multiple OpenStax sections into simulations, implement the Cloudflare Worker and D1 schema, write the scientific and end-to-end tests, perform a harsh product audit, and iterate the responsive interface. The deployed runtime remains Cloudflare Workers, Workers AI, D1, and static assets.”
**Say:** “GPT‑5.6 through Codex generates structured lessons and chooses only from nine reviewed simulation runtimes; NVIDIA generates bounded study questions and note answers. Cloudflare Workers and D1 keep every key and learner record server-side, and deterministic TypeScript—not generated JavaScript—produces the scientific evidence.”

End on the product name and one sentence: **“Perception Learning makes reasoning visible while it can still change.”**
9 changes: 6 additions & 3 deletions DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

- Primary direction: Living field guide — an editorial library with paper, ink, subject-colored book cloth, margin notes, and laboratory instruments.
- Secondary influences: modern children’s science museums, beautifully indexed reference books, and restrained game HUDs.
- One memorable visual moment: a textbook section opens into a split-page “proof desk,” while the account page reads like a dark field-guide cover opening onto a precise paper sign-in form.
- Explicitly avoid: dark AI dashboards, purple gradients, generic card grids, excessive pills, fake chat interfaces, reward confetti, and decorative gamification without learning value.
- One memorable visual moment: a textbook section opens into a split-page “proof desk,” while Moss, the hand-painted seed-and-leaf guide shared with Environments, listens and speaks from the page margin.
- Explicitly avoid: dark AI dashboards, purple gradients, generic card grids, excessive pills, full-page generic chat interfaces, reward confetti, and decorative gamification without learning value.

## Layout System

Expand Down Expand Up @@ -70,18 +70,20 @@
- Buttons: rectangular, decisive labels, visible icon only when meaningful.
- Inputs: paper-white, strong labels, 44px minimum touch targets.
- Book cards: physical spine/cover composition with subject color and progress bookmark.
- Navigation: library, lab, notes, trail, and a dedicated account page; mobile bottom bar keeps learning destinations separate from account controls.
- Navigation: library, lab, notes, lesson creation, and a dedicated account page; mobile bottom bar keeps learning destinations separate from account controls.
- Account page: editorial “learning passport” composition, with a dark field-guide story panel and a quiet paper form; never use a floating auth modal.
- Empty states: suggest one concrete next action and one curriculum example.
- Errors: plain-language recovery beside the failed tool.
- Loading: model-building status with progress checkpoints, never a fake AI chat stream.
- Learning companion: Moss is a persistent guide, not a separate destination. Its translucent conversation panel uses flat assistant turns, quiet learner bubbles, a compact voice-aware composer, and page-reading controls while remaining subordinate to the lesson.

## Accessibility Rules

- Minimum body size: 16px; teacher metadata may be 12–14px.
- Contrast: WCAG AA minimum.
- Focus style: 3px translucent ultramarine outline with 3px offset.
- Keyboard navigation: every book, reader section, note action, account control, and lab challenge is reachable.
- Companion: launcher, quick prompts, narration transport, voice selection, and composer are keyboard reachable; responses use a polite live region.
- 3D lab: equivalent text state through `render_game_to_text`; no visual-only success condition.

## Implementation Notes
Expand All @@ -92,3 +94,4 @@
- Persistence: InsForge owns authentication; the authenticated user UUID scopes Cloudflare D1 notes, experiments, assessments, lesson guides, and progress so learning restores with the account.
- Curriculum content: link and attribute OpenStax. Do not ingest entire books into Workers AI; use teacher-reviewed briefs and authored summaries.
- Targets: current evergreen browsers, iPad/tablet landscape, 390px mobile minimum.
- Narration: rank installed premium, enhanced, neural, and natural voices before generic defaults; preserve text as the fallback when speech synthesis is unavailable.
Loading