blob: db45eeea0f514d716c197a5e122187f3b8a69377 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# Project instructions
## Purpose and scope
Build an educational electrophysics application with interactive 3D graphics.
Treat `PLAN.md` as the source of truth for subject scope. A subject line
starting with `#` is excluded from implementation; the document's title and
introductory heading are not subjects.
The only currently enabled subject is **Electric flux and charge**. Do not
implement other listed subjects unless the plan or the user enables them.
Use `docs/theory/` as subject references. Exercises and answers in `docs/`
provide context but do not expand the enabled scope.
## Languages
- The languages supported should be English and Danish
## Repository and tooling
- `src/`: application source, physics models, and 3D rendering.
- `tests/`: browser tests.
- `docs/`: educational references and exercises.
- `PLAN.md`: enabled and excluded subjects.
- The existing package manifest uses TypeScript, Vite, Three.js, and KaTeX,
with Vitest and Playwright for testing.
- `.nvmrc` specifies Node 22; `package.json` requires Node >=22.12.0.
Available package scripts:
| Command | Purpose |
| --- | --- |
| `npm run dev` | Start Vite on 127.0.0.1 |
| `npm run build` | Type-check and build for production |
| `npm run typecheck` | Run TypeScript checks |
| `npm test` | Run Vitest |
| `npm run test:e2e` | Run Playwright |
| `npm run preview` | Preview the production build |
The manifest defines these commands, but source and configuration files may
still need to be created before they can run. Inspect the current working tree
and preserve existing user edits and deletions; do not restore deleted files
without a task requiring it.
## Implementation guidance
- Keep physics calculations separate from presentation and test meaningful
physical invariants, units, and limiting cases when implementing models.
- Keep explanations, equations, units, and visualizations consistent with the
educational references and state any simplifying assumptions.
- Provide accessible labels and keyboard-operable controls for interactions.
- Run checks appropriate to the changes. Report checks that could not run and
their actual blockers; do not claim unexecuted checks passed.
|