GrokMath is a long-term project to build best-in-class learning materials from elementary mathematics through foundational university mathematics.
This repository is designed for a daily collaboration loop:
- Grok drafts instructions for Codex.
- The user pastes those instructions into Codex.
- Codex updates this repository (content, structure, roadmap, and handoff notes).
- Repeat daily to continuously improve quality.
Create a world-class, continuously improving math curriculum that:
- starts from elementary arithmetic,
- progresses through middle and high school mathematics,
- reaches foundational university-level topics,
- balances intuition, rigor, exercises, and assessment,
- and is production-ready for web delivery.
At the end of every session, Codex must update HANDOFF.md with:
- what changed,
- what was decided,
- what is next,
- blockers/risks,
- and concrete instructions for the next session.
This is mandatory for continuity.
At the start of every session, read both files and align changes with the latest plan.
All application code and all code comments must be in English for consistency and maintainability.
- Primary delivery target: Vercel deployment.
- Content quality bar: pedagogically excellent, structured, and progressively rigorous.
- Approach: explore broadly (including research/search-driven ideas), test alternatives, and keep the best solutions.
Use this loop every day:
- Grok analyzes current repo state and learning goals.
- Grok writes a precise instruction set for Codex.
- User pastes the instruction set to Codex.
- Codex implements updates and validates changes.
- Codex updates
HANDOFF.mdfor the next session.
Ask Grok to include:
- session objective,
- prioritized task list,
- explicit deliverables,
- quality checks/tests,
- acceptance criteria,
- handoff requirements.
- Arithmetic and number sense
- Pre-algebra and algebra foundations
- Geometry and measurement
- Functions and graph literacy
- Trigonometry
- Calculus foundations
- Linear algebra foundations
- Introductory probability/statistics
- Introductory discrete mathematics
- Proof basics and mathematical writing
Each unit should eventually include:
- concept map,
- explanation layers (intuitive -> formal),
- worked examples,
- graded exercises,
- common mistakes,
- quick checks and summary.
A minimal Next.js App Router scaffold is included so the repository can be deployed directly on Vercel.
- Install dependencies:
npm install
- Run the development server:
npm run dev
- Open
http://localhost:3000.
npm run build
npm run start- Import this repository in Vercel.
- Framework preset: Next.js (auto-detected).
- Build command:
npm run build. - Output setting: default Next.js output.
Current web output now includes a basic unit navigation flow and server-side markdown rendering for Unit 1 via App Router routes.
/— homepage with links to unit navigation/units— unit index (auto-generated fromcontent/units/)/units/unit-1-whole-numbers-and-place-value— rendered lesson page fromcontent/units/unit-1-whole-numbers-and-place-value.md/units/unit-2-operations-with-whole-numbers— rendered lesson page fromcontent/units/unit-2-operations-with-whole-numbers.md
content/index.md— starter curriculum index and unit-level placeholders.content/lesson-template.md— canonical markdown template for all lessons.content/units/— destination folder for per-unit lesson files.
- Keep structure and naming consistent.
- Prefer clear, maintainable, modular content and code.
- Record major decisions in
HANDOFF.md. - Keep
README.mdaligned with current project direction.
Build a reliable daily production loop where each session improves both:
- the learning product itself, and
- the quality of the process (planning, verification, handoff).
- Lesson rendering now routes through a dedicated
lib/markdown.tspipeline with frontmatter extraction and optionalremark/gray-matter/KaTeX runtime support; dependency installation constraints currently force fallback behavior in this environment. - KaTeX stylesheet is wired globally, and math rendering is enabled when the
katexruntime dependency is available. - Keep
/unitsauto-generation aligned with filename/frontmatter conventions as new lessons are added. - Expand beyond Units 1–2 while maintaining the same pedagogical quality bar and markdown structure consistency.
- Next.js now uses a patched
^15.2.5range inpackage.jsonto stay above the CVE-2025-66478 blocked release while allowing security patch uptake. - Dependency-install reliability remains a risk factor when introducing parser/rendering upgrades.