| 1 | # Agent Instructions
|
|---|
| 2 |
|
|---|
| 3 | This project uses **bd** (beads) for issue tracking. Run `bd prime` for full workflow context.
|
|---|
| 4 |
|
|---|
| 5 | ## Quick Reference
|
|---|
| 6 |
|
|---|
| 7 | ```bash
|
|---|
| 8 | bd ready # Find available work
|
|---|
| 9 | bd show <id> # View issue details
|
|---|
| 10 | bd update <id> --claim # Claim work atomically
|
|---|
| 11 | bd close <id> # Complete work
|
|---|
| 12 | bd dolt push # Push beads data to remote
|
|---|
| 13 | ```
|
|---|
| 14 |
|
|---|
| 15 | ## Non-Interactive Shell Commands
|
|---|
| 16 |
|
|---|
| 17 | **ALWAYS use non-interactive flags** with file operations to avoid hanging on confirmation prompts.
|
|---|
| 18 |
|
|---|
| 19 | Shell commands like `cp`, `mv`, and `rm` may be aliased to include `-i` (interactive) mode on some systems, causing the agent to hang indefinitely waiting for y/n input.
|
|---|
| 20 |
|
|---|
| 21 | **Use these forms instead:**
|
|---|
| 22 | ```bash
|
|---|
| 23 | # Force overwrite without prompting
|
|---|
| 24 | cp -f source dest # NOT: cp source dest
|
|---|
| 25 | mv -f source dest # NOT: mv source dest
|
|---|
| 26 | rm -f file # NOT: rm file
|
|---|
| 27 |
|
|---|
| 28 | # For recursive operations
|
|---|
| 29 | rm -rf directory # NOT: rm -r directory
|
|---|
| 30 | cp -rf source dest # NOT: cp -r source dest
|
|---|
| 31 | ```
|
|---|
| 32 |
|
|---|
| 33 | **Other commands that may prompt:**
|
|---|
| 34 | - `scp` - use `-o BatchMode=yes` for non-interactive
|
|---|
| 35 | - `ssh` - use `-o BatchMode=yes` to fail instead of prompting
|
|---|
| 36 | - `apt-get` - use `-y` flag
|
|---|
| 37 | - `brew` - use `HOMEBREW_NO_AUTO_UPDATE=1` env var
|
|---|
| 38 |
|
|---|
| 39 | ## Conventions & Patterns
|
|---|
| 40 |
|
|---|
| 41 | - **Bump `MOD_V` whenever you change anything in `src/assets/js/mod/`.** It sits
|
|---|
| 42 | at the top of the module loader in `src/views/shell.ejs` and is the
|
|---|
| 43 | cache-buster for every page module. `/assets` is served `max-age=1y` outside
|
|---|
| 44 | development, so without a bump a browser that visited before keeps running the
|
|---|
| 45 | old module for a year — meaning a fix reaches everyone *except* the people who
|
|---|
| 46 | already have the bug. Same discipline as `audio-player.js?v=N` a few hundred
|
|---|
| 47 | lines up. One number for the whole directory: bumping too often costs one
|
|---|
| 48 | download, bumping too rarely costs a bugfix that never arrives.
|
|---|
| 49 |
|
|---|
| 50 | - **Comments and commit messages in Dutch, identifiers in English.** The modules
|
|---|
| 51 | in `assets/js/mod` read `setIcon`, `uploadOne`, `applyAccent`; the comments
|
|---|
| 52 | around them are Dutch prose. Both halves matter — a Dutch identifier in an
|
|---|
| 53 | English file is the same wrong note as an English comment in a Dutch one. This
|
|---|
| 54 | extends to anything long-lived and outward-facing: URL paths and CSS class
|
|---|
| 55 | names are English (`/read`, `.read-end`), never a Dutch verb form.
|
|---|
| 56 |
|
|---|
| 57 | <!-- BEGIN BEADS INTEGRATION v:1 profile:minimal hash:7510c1e2 -->
|
|---|
| 58 | ## Beads Issue Tracker
|
|---|
| 59 |
|
|---|
| 60 | This project uses **bd (beads)** for issue tracking. Run `bd prime` to see full workflow context and commands.
|
|---|
| 61 |
|
|---|
| 62 | ### Quick Reference
|
|---|
| 63 |
|
|---|
| 64 | ```bash
|
|---|
| 65 | bd ready # Find available work
|
|---|
| 66 | bd show <id> # View issue details
|
|---|
| 67 | bd update <id> --claim # Claim work
|
|---|
| 68 | bd close <id> # Complete work
|
|---|
| 69 | ```
|
|---|
| 70 |
|
|---|
| 71 | ### Rules
|
|---|
| 72 |
|
|---|
| 73 | - Use `bd` for ALL task tracking — do NOT use TodoWrite, TaskCreate, or markdown TODO lists
|
|---|
| 74 | - Run `bd prime` for detailed command reference and session close protocol
|
|---|
| 75 | - Use `bd remember` for persistent knowledge — do NOT use MEMORY.md files
|
|---|
| 76 |
|
|---|
| 77 | **Architecture in one line:** issues live in a local Dolt DB; sync uses `refs/dolt/data` on your git remote; `.beads/issues.jsonl` is a passive export. See https://github.com/gastownhall/beads/blob/main/docs/SYNC_CONCEPTS.md for details and anti-patterns.
|
|---|
| 78 |
|
|---|
| 79 | ## Session Completion
|
|---|
| 80 |
|
|---|
| 81 | **When ending a work session**, you MUST complete ALL steps below. Work is NOT complete until `git push` succeeds.
|
|---|
| 82 |
|
|---|
| 83 | **MANDATORY WORKFLOW:**
|
|---|
| 84 |
|
|---|
| 85 | 1. **File issues for remaining work** - Create issues for anything that needs follow-up
|
|---|
| 86 | 2. **Run quality gates** (if code changed) - Tests, linters, builds
|
|---|
| 87 | 3. **Update issue status** - Close finished work, update in-progress items
|
|---|
| 88 | 4. **PUSH TO REMOTE** - This is MANDATORY:
|
|---|
| 89 | ```bash
|
|---|
| 90 | git pull --rebase
|
|---|
| 91 | git push
|
|---|
| 92 | git status # MUST show "up to date with origin"
|
|---|
| 93 | ```
|
|---|
| 94 | 5. **Clean up** - Clear stashes, prune remote branches
|
|---|
| 95 | 6. **Verify** - All changes committed AND pushed
|
|---|
| 96 | 7. **Hand off** - Provide context for next session
|
|---|
| 97 |
|
|---|
| 98 | **CRITICAL RULES:**
|
|---|
| 99 | - Work is NOT complete until `git push` succeeds
|
|---|
| 100 | - NEVER stop before pushing - that leaves work stranded locally
|
|---|
| 101 | - NEVER say "ready to push when you are" - YOU must push
|
|---|
| 102 | - If push fails, resolve and retry until it succeeds
|
|---|
| 103 | <!-- END BEADS INTEGRATION -->
|
|---|
| 104 |
|
|---|