|
| 1 | +--- |
| 2 | +description: Documentation assets are produced by docgen + OpenAI; Cursor never edits them by hand. No hardcoded segment numbers, scene classes, tape names, or fixture paths in `src/docgen/` or non-test docs. |
| 3 | +alwaysApply: true |
| 4 | +--- |
| 5 | + |
| 6 | +# Tool-only asset generation; no hardcoded segment / fixture references |
| 7 | + |
| 8 | +## Three categories |
| 9 | + |
| 10 | +A. **Cursor edits OK** (code, tests, wrappers, rules, top-level docs): |
| 11 | +- `src/docgen/**` |
| 12 | +- `tests/**` |
| 13 | +- `docs/demos/_*.sh` |
| 14 | +- `.cursor/rules/**` |
| 15 | +- `AGENTS.md`, root `README.md`, `docs/demo-function.md`, `docs/yaml-generate.md`, `docs/session-notes*.md` |
| 16 | +- `milestones/**` |
| 17 | + |
| 18 | +B. **Hand-authored INPUTS / fixtures** (Cursor edits OK; **never** deleted by `clean-bundle` / reset; **not** LLM outputs): |
| 19 | +- `docs/demos/terminal/*.tape` — VHS sources |
| 20 | +- `docs/demos/scripts/*.py` — Playwright capture drivers (matched to segments by id-in-filename) |
| 21 | +- `fixtures/**` — Playwright/Vite/etc. test apps; presence and project-type detected generically. The raw `*.spec.{ts,tsx,js,jsx,mjs}` files inside are the **input** to `docgen per-function-generate`. |
| 22 | +- `docs/demos/narration/README.md` |
| 23 | + |
| 24 | +C. **LLM/tool OUTPUTS — Cursor MUST NOT edit; only `docgen` (CLI/library) + OpenAI may produce:** |
| 25 | +- `docs/demos/docgen.yaml` (owner: `docgen yaml-generate`) |
| 26 | +- `docs/demos/narration/*.md` excluding `README.md` (owner: `docgen narration-generate`) |
| 27 | +- `docs/demos/animations/scenes.py`, `docs/demos/animations/timing.json` (owner: `docgen scene-generate`, **`docgen scene-compile`**, **`docgen scene-spec-generate`**, pipeline) |
| 28 | +- `docs/demos/animations/specs/*.scene.yaml` — declarative Manim scene specs (owner: **`docgen scene-spec-generate`** with optional hand curation; compiled into `scenes.py` via **`docgen scene-compile`**) |
| 29 | +- `docs/demos/audio/*.mp3` (owner: `docgen tts`) |
| 30 | +- `docs/demos/per-function/*.docgen.yaml` and sibling `*.html` (owner: `docgen per-function-generate` — generated from raw Playwright specs in `fixtures/**`; wiped + regenerated each reset) |
| 31 | +- `docs/demos/recordings/**` including `recordings/per-function/<slug>/*` and top-level aliases (owner: `docgen generate-all` and `docgen demo-function` driven by `_rebuild-per-function.sh`) |
| 32 | + |
| 33 | +If a generator can't produce shippable output yet, **fix the generator** under `src/docgen/**`. Never paste/edit a category-C file to bridge the gap. |
| 34 | + |
| 35 | +## No hardcoded segments or fixtures |
| 36 | + |
| 37 | +`docgen` itself contains **no** hardcoded segment numbers, scene class names, tape filenames, or fixture paths. Discovery only: |
| 38 | + |
| 39 | +- Segments → from `narration/<NN>-*.md` filenames. |
| 40 | +- VHS → from `terminal/<segment_stem>.tape` presence. |
| 41 | +- Playwright capture → from `scripts/*.py` whose filename contains the segment id. |
| 42 | +- Manim → from `class …Scene` definitions in `animations/scenes.py`, in source order. |
| 43 | +- Playwright projects (for `discover_tests.roots`) → from any directory with `@playwright/test` / `playwright` in `package.json` or a `playwright.config.{js,ts,mjs,cjs}`. |
| 44 | + |
| 45 | +Tests are exempt: concrete ids and class names there are intentional test data. |
0 commit comments