|
| 1 | +# AGENTS.md |
| 2 | + |
| 3 | +Guide for coding agents working on `opencode-mission-control` in ULW mode. |
| 4 | + |
| 5 | +## Mission |
| 6 | + |
| 7 | +- Keep changes small, safe, and shippable. |
| 8 | +- Match existing repository patterns (TypeScript + Bun + one-tool-per-file design). |
| 9 | +- Prefer deterministic behavior over clever behavior. |
| 10 | + |
| 11 | +## Fast Project Map |
| 12 | + |
| 13 | +- `src/index.ts` - plugin entry point, registers tools/hooks/commands. |
| 14 | +- `src/tools/` - one file per MCP tool (`launch`, `merge`, `plan`, etc.). |
| 15 | +- `src/lib/` - shared core logic (worktrees, tmux, monitor, orchestrator, merge train). |
| 16 | +- `src/hooks/` - OpenCode lifecycle hooks. |
| 17 | +- `tests/` - Bun test suite. |
| 18 | + |
| 19 | +## ULW Working Rules |
| 20 | + |
| 21 | +1. Implement exactly what was requested; do not add extra features. |
| 22 | +2. For bug fixes: make minimal edits, avoid broad refactors. |
| 23 | +3. Never use `as any`, `@ts-ignore`, or silent catch blocks. |
| 24 | +4. Keep file ownership boundaries intact (tool logic in `src/tools`, shared logic in `src/lib`). |
| 25 | +5. Do not commit unless explicitly asked. |
| 26 | + |
| 27 | +## Build and Verify |
| 28 | + |
| 29 | +Run these before marking work complete: |
| 30 | + |
| 31 | +```bash |
| 32 | +bun run build |
| 33 | +bun test |
| 34 | +``` |
| 35 | + |
| 36 | +If tests fail, identify whether failures are pre-existing vs introduced by your change. |
| 37 | + |
| 38 | +## Manual Test Plan |
| 39 | + |
| 40 | +- The operational manual E2E flow is in `MANUAL_TEST_PLAN.md`. |
| 41 | +- For fast validation after changes, run the **Quick Smoke Test** section first. |
| 42 | +- Use the **Nuclear Cleanup** sequence before and after manual testing to avoid leftover tmux sessions, worktrees, branches, and state files. |
| 43 | +- Follow plan safety rules exactly: `tmc-` test naming, no remote push flows during testing (`mc_pr` is structural only), and explicit SHA-based resets. |
| 44 | + |
| 45 | +## Release Notes for Agents |
| 46 | + |
| 47 | +- npm package output is `dist/` only (`package.json -> files`). |
| 48 | +- Automated release path is semantic-release via `.github/workflows/publish.yml` on `main`. |
| 49 | +- Required secret for release workflow: `NPM_TOKEN`. |
| 50 | +- Use Conventional Commits (`feat:`, `fix:`, `perf:`, `chore:`) so semantic versioning can compute releases. |
| 51 | + |
| 52 | +## Collaboration Norms |
| 53 | + |
| 54 | +- Explain what changed and where with exact file paths. |
| 55 | +- Call out risks or assumptions explicitly. |
| 56 | +- Keep docs updated when behavior or workflows change. |
| 57 | + |
| 58 | +If in doubt: choose the simplest implementation that preserves existing behavior. |
0 commit comments