|
| 1 | +# Read This Project with an Agent |
| 2 | + |
| 3 | +You do not need to read every source file before asking useful questions. Tell the |
| 4 | +agent what you want to understand or change, then require it to read `AGENTS.md` and |
| 5 | +this guide first. The agent should stay read-only unless you ask it to modify files. |
| 6 | + |
| 7 | +## Start with one prompt |
| 8 | + |
| 9 | +Chinese: |
| 10 | + |
| 11 | +```text |
| 12 | +先阅读 AGENTS.md 和 docs/agent-reading-guide.md。只做分析,不修改文件。解释这个项目如何使用 |
| 13 | +HyperFrames、绝对帧状态、DOM 到 Three.js 的交接和程序化音效。每个结论都标出对应的文件和符号, |
| 14 | +最后告诉我下一步最值得阅读的源码。不要总结与问题无关的文件。 |
| 15 | +``` |
| 16 | + |
| 17 | +English: |
| 18 | + |
| 19 | +```text |
| 20 | +Read AGENTS.md and docs/agent-reading-guide.md first. Stay read-only. Explain how this |
| 21 | +composition uses HyperFrames, absolute-frame state, DOM-to-Three.js handoff, and procedural |
| 22 | +sound. Cite the exact files and symbols I should study next. Do not summarize files that are |
| 23 | +unrelated to my question. |
| 24 | +``` |
| 25 | + |
| 26 | +## Route by intent |
| 27 | + |
| 28 | +| Goal | Read first | Inspect only when needed | |
| 29 | +| --- | --- | --- | |
| 30 | +| Understand HyperFrames structure | `README.md`, `DESIGN.md`, `docs/hyperframes-patterns.md` | The root contract in `index.html`, timeline registration in `src/timeline.js` | |
| 31 | +| Study animation and camera motion | `docs/animation-breakdown.md` | Named timing constants and `derive*State()` functions in `src/icon-data.js`, then their consumers in `src/timeline.js` or `src/orbit-scene.js` | |
| 32 | +| Study sound design | `docs/sound-design.md`, `assets/audio/sfx/cues.json` | `scripts/audio/generate-sfx.mjs`, then `scripts/audio/ginkgo-assembly.mjs` | |
| 33 | +| Customize a scene or sound | `docs/customization.md`, `assets/ATTRIBUTION.md` | Only the requested source module, its tests, and the matching cue or texture data | |
| 34 | +| Verify a release | `RELEASE_CHECKLIST.md`, `package.json` | `.github/workflows/check.yml`, relevant tests, current Git status, generated assets | |
| 35 | + |
| 36 | +## Reading contract for agents |
| 37 | + |
| 38 | +1. Classify the request before opening large source files. |
| 39 | +2. Use `rg` to map exported constants, functions, and call sites. Do not read |
| 40 | + `src/icon-data.js` or `src/orbit-scene.js` from top to bottom by default. |
| 41 | +3. Trace one event through data, derived state, renderer, test, and sound cue. For |
| 42 | + example, frame 380 moves through `deriveCodexComposerState()`, the DOM renderer, |
| 43 | + `createOrbitScene()`, runtime fixtures, and the SFX cue sheet. |
| 44 | +4. Cite exact files and symbols. State whether each conclusion comes from source, |
| 45 | + tests, documentation, or a command run in the current session. |
| 46 | +5. Keep explanation separate from modification. Do not edit, render, publish, or |
| 47 | + regenerate assets unless the user asks. |
| 48 | +6. If a change is requested, read `docs/customization.md`, follow the HyperFrames skill |
| 49 | + routing in `AGENTS.md`, make the smallest relevant change, and run `npm run check`. |
| 50 | + |
| 51 | +## Focused prompts |
| 52 | + |
| 53 | +Animation: |
| 54 | + |
| 55 | +```text |
| 56 | +Read AGENTS.md and docs/agent-reading-guide.md. Explain the motion chain from typing through |
| 57 | +the frame-380 DOM-to-Three.js handoff. Cite the state derivation, renderer, and tests for each |
| 58 | +boundary. Stay read-only. |
| 59 | +``` |
| 60 | + |
| 61 | +Sound: |
| 62 | + |
| 63 | +```text |
| 64 | +Read AGENTS.md and docs/agent-reading-guide.md. Explain how the isolated SFX and 30-second |
| 65 | +timeline are synthesized, seeded, aligned to picture, rebuilt, and verified. Cite the cue data |
| 66 | +and generator functions. Stay read-only. |
| 67 | +``` |
| 68 | + |
| 69 | +Modification: |
| 70 | + |
| 71 | +```text |
| 72 | +Read AGENTS.md, docs/agent-reading-guide.md, and docs/customization.md. Before editing, tell me |
| 73 | +which timing constant, derived-state function, renderer, tests, and sound cue the requested |
| 74 | +change touches. Preserve the 30-second, 1920x1080, 30fps contract unless I explicitly change it. |
| 75 | +``` |
| 76 | + |
| 77 | +## Expected answer shape |
| 78 | + |
| 79 | +A useful answer should give you the event chain, exact source symbols, the tests that |
| 80 | +protect it, and the shortest next reading path. It should not dump every constant, retell |
| 81 | +the README, or claim that a command passed without running it. |
0 commit comments