Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

97 rindas
6.0KB

  1. # AGENTS.md - implementation instructions for {{PROJECT_NAME}}
  2. You are the implementation agent for **{{PROJECT_NAME}}**, a {{PROJECT_KIND}} for {{TARGET_LIST}}.
  3. This repository is self-contained: everything you need is in this folder. Do not look for
  4. the tool that generated it or the conversation that produced the spec.
  5. ## 1. Read first, in this order
  6. 1. `docs/spec.md` - approved requirements, scope boundaries, targets, assumptions, acceptance criteria.
  7. 2. `docs/toolchain.md` - language decision, tools and versions, exact commands, verification status.
  8. 3. `docs/milestones.md` - ordered tasks; each links to requirements and has a completion check.
  9. 4. `docs/manual-tests.md` - what the user does by hand to confirm each milestone, per target.
  10. 5. `docs/verification-status.md` - what has been checked so far, and what is still pending.
  11. 6. `project.json` - the approved brief in structured form, plus the `resolved` build configuration that `tools/*.ps1` read.
  12. The spec is the contract. If the code and the spec disagree, stop and ask the user; do not
  13. quietly change either one.
  14. ## 2. Project constraints
  15. - Language and toolchain: {{LANGUAGE_TITLE}} via {{RECIPE_TITLE}}. Do not switch languages or tools without the user's approval (see section 6).
  16. - Build location: {{BUILD_LOCATION}}.
  17. - Targets: {{TARGET_LIST}}. Every target listed in `docs/spec.md` must keep building and passing its checks after each task.
  18. - Tools: {{TOOL_LIST}}. Scripts find them via environment variables (`CC65_HOME`, `VICE_HOME`), `PATH`, or the usual install folders. Never hard-code a machine-specific path into source or scripts.
  19. - Paths may contain spaces (including this repository's own path). Quote paths in every command you write or document.
  20. - Keep the smoke hooks working: `tools/smoke.ps1` depends on them (see `docs/toolchain.md`). If you change the first screen, update `starter.smokeChecks` in `project.json` and the matching `resolved.targets[].smoke.checks` so the automated check still describes what the screen really shows.
  21. - Generated outputs go in `build/` (ignored by Git). Never commit build outputs, disk images or screenshots unless the spec asks for a fixture.
  22. - Fixtures in `fixtures/` are stored byte-for-byte. Do not let an editor change their line endings or encoding.
  23. {{ON_COMMODORE_AGENTS}}
  24. ## 3. Start: build and verify the starter (milestone M0)
  25. Before writing any feature code:
  26. ```powershell
  27. pwsh -File tools/check-prereqs.ps1
  28. pwsh -File tools/build.ps1
  29. pwsh -File tools/smoke.ps1
  30. ```
  31. - `check-prereqs.ps1` exits 2 if a tool is missing and prints the exact tool, the first command to run, and what stays unverified. Report that to the user and stop. Don't work around a missing tool.
  32. - `smoke.ps1` exits 0 when every automated check passes. Results: `build/smoke/results.json`; screenshots: `build/smoke/<target>/`.
  33. - Then ask the user to perform M0 in `docs/manual-tests.md` and mark M0 manual verification **pending** in `docs/verification-status.md` until they confirm.
  34. ## 4. Milestone workflow
  35. Work through `docs/milestones.md` in order, **one reviewable task at a time**:
  36. 1. Pick the next task. Re-read its requirements and acceptance criteria in `docs/spec.md`.
  37. 2. Make the smallest change that delivers the task's buildable outcome.
  38. 3. Run the checks: `pwsh -File tools/build.ps1` and `pwsh -File tools/smoke.ps1` at minimum, plus any check the task names. Fix failures before you report.
  39. 4. Update `docs/verification-status.md`: automated result for the task, manual verification **pending**.
  40. 5. Report to the user using the template below, then stop and wait if the next task depends on their manual verification.
  41. ### Report template (after every task)
  42. ```
  43. Task: <id> <title> (requirements: <R ids>)
  44. What changed: <files and behavior, in a few lines>
  45. Checks run: <command> -> <result> (one line each, with exit codes)
  46. Please verify manually:
  47. 1. <exact command to start, e.g. pwsh -File tools/run.ps1 -Target <id>>
  48. 2. <exact keys to press / actions>
  49. Expected: <exactly what should appear or happen>
  50. Manual verification: PENDING until you confirm.
  51. Next: <next task id>, or "waiting for your verification" if the next task depends on it.
  52. ```
  53. ### Pausing rules
  54. - When a milestone ends, stop until the user confirms that milestone's manual tests.
  55. - Stop sooner if the next task builds on behavior that only the user can confirm (feel, timing, visuals, sound, real hardware).
  56. - When the user confirms, change the item from pending to `confirmed by user (<date>)` in `docs/verification-status.md`. If they report a problem, record it there, fix it as the next task, and re-request verification.
  57. - Never mark manual verification as confirmed yourself.
  58. ## 5. Verification rules
  59. - Never claim a check passed unless you ran it in this session and saw it pass. Quote the command and the result.
  60. - If a check cannot run (missing tool, no hardware), say so, and record it as `not run - <reason>`.
  61. - Real-hardware results are only recorded when the user reports them.
  62. - Keep `docs/manual-tests.md` accurate. When behavior changes, update the steps and expected observations in the same task.
  63. - Acceptance criteria are verified against the target(s) they name. Native 40-column and 80-column C128 behavior are separate targets and need separate checks.
  64. ## 6. Changes to requirements
  65. If the user asks for a change, or you find that a requirement cannot be met as written:
  66. 1. Describe the change and its impact: which requirements, milestones, tests and targets it touches.
  67. 2. Wait for approval.
  68. 3. In one task, update `docs/spec.md`, `docs/milestones.md`, `docs/manual-tests.md`, `docs/verification-status.md` and `project.json` together, and then the code. Requirements, implementation and verification must stay in sync.
  69. 4. A change of language or toolchain also updates `docs/toolchain.md` and the `resolved` section of `project.json`, and must be re-verified from M0.
  70. ## 7. Git
  71. - Work on `main` unless the user asks otherwise. Commit after each verified task with a message naming the task id, e.g. `M1.2: draw signal heads`.
  72. - Don't add remotes or push unless the user asks.

Powered by TurnKey Linux.