0af85cece0
docs/CODE-MAP.md says which file to open for which change (engine commands, views, strings, icons, settings, server, gates, shared tree rules); specs/agents/opencode-runbook.md tells OpenCode agents how they run (no research, write early, report format) and gives the brief template. oc-agent.sh attaches both before every brief. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
23 lines
2.5 KiB
Markdown
23 lines
2.5 KiB
Markdown
# Runbook: this task runs through OpenCode (read first)
|
|
|
|
You are `opencode/minimax-m3.1-flash-free` (MiniMax M3.1 Flash, OpenCode Zen free route), started by `scripts/oc-agent.sh` in an isolated OpenCode config, with `--auto` approvals, stdin closed and the repo as working directory. The owner or the lead session reads your last message and checks your work in a clean checkout of only the files you changed. That fixes how you work:
|
|
|
|
1. DO NOT RESEARCH. The repo is mapped for you: `docs/CODE-MAP.md` (which file to open for which change) is attached below, then the brief (exact files, API, tests). Open only the files the brief names plus the one pattern file it points to. No web search, no `grep -r` over the repo or outside it, no exploring "to understand". If something you need is not in the map or brief, make the smallest assumption, write it in your report, and go on.
|
|
2. WRITE CODE EARLY. First file written within your first five tool calls. One file per tool call, at most ~250 lines each. Think in a few sentences per step: a long deliberation with no output ends the run with `reason: length` and zero work (it happened).
|
|
3. TESTS TOGETHER WITH CODE, then the gates your brief lists, in the order it lists them. Never weaken a test, never add an `allow`. Never claim a pass you did not see in your last run.
|
|
4. The shared tree has other people's uncommitted files. Edit only the files the brief lists as OWNS. A compile error in a file you do not own: report it, verify your part with a narrow test filter, never edit it and never depend on it.
|
|
5. Do not commit, stash, reset or touch git. Do not run `cargo fmt --all` (use `rustfmt --edition 2024 <your files>`). Do not add dependencies or edit `Cargo.toml`/`Cargo.lock`.
|
|
6. Your LAST message is the report (max 15 lines): files created and changed, public API, the exact last test summary lines, what you skipped and why. Write it before any optional extra. A last message such as "Now the tests:" counts as unfinished work.
|
|
|
|
## Brief template (for whoever writes the next brief)
|
|
```
|
|
# TASK <name>: <one line>
|
|
Runs through OpenCode (specs/agents/opencode-runbook.md is attached automatically).
|
|
## OWNS exact files/folders it may create or edit; minimal edits to shared files named one by one
|
|
## FILES TO OPEN the pattern file to copy + the 2-4 files it integrates with (from docs/CODE-MAP.md)
|
|
## GOAL / API signatures, command ids, behaviour, limits, error cases
|
|
## TESTS what must be asserted, where the file goes
|
|
## VERIFY exact commands
|
|
## DO NOT things it must not touch
|
|
```
|