Repository Guidelines
Project Structure & Module Organization
modules/holds the teaching modules (e.g.,modules/01-foundation/01-normalization/withteaching.md,code_guide.md,quiz.md, andexperiments/).docs/,index.md, anden/contain VitePress content; site config lives in.vitepress/.learning_materials/stores runnable example scripts;docs/and top-levellearning_log.md/knowledge_base.mdstore notes.model/,trainer/, anddataset/mirror the MiniMind code, training scripts, and datasets used by experiments.public/andimages/host static assets used by the docs site.
Build, Test, and Development Commands
- Use
pnpmfor package management in this repo. pnpm installinstalls VitePress dependencies.pnpm run docs:devstarts the local VitePress dev server.pnpm run docs:buildbuilds the static site to.vitepress/dist.pnpm run docs:previewserves the built site for verification.python modules/01-foundation/01-normalization/experiments/exp1_gradient_vanishing.pyruns a sample experiment.pip install -r requirements.txtinstalls Python dependencies for experiments and training scripts.
Coding Style & Naming Conventions
- Python follows PEP 8;
blackis acceptable for formatting when needed. - Experiments should be self-contained, use fixed seeds, and include clear (often Chinese) comments.
- Experiment filenames use
exp{N}_{description}.pyand store expected outputs inresults/. - Module folders use
NN-topic-namenumbering for ordering (e.g.,01-normalization). - Markdown should use clear headings and short, instructional paragraphs.
Testing Guidelines
- There is no formal test runner; validate changes by building docs and running relevant experiments.
- Keep experiment outputs reproducible and commit expected results under the module
results/folder.
Commit & Pull Request Guidelines
- Use Conventional Commit-style messages:
feat:,fix:,docs:,refactor:,perf:,style:,test:,chore:,experiment:with optional scopes (e.g.,fix(build): ...). - Keep PRs small and focused on a single feature or fix.
- Use
.github/PULL_REQUEST_TEMPLATE.mdand link related issues (e.g.,Closes #123). - Update relevant docs when behavior or experiments change, and ensure new experiments run independently.
Automation Notes
- AI/agent guidance is in
CLAUDE.md; note update expectations live inNOTE_UPDATE_GUIDE.md.