| 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 | <!-- BEGIN BEADS INTEGRATION v:1 profile:minimal hash:7510c1e2 -->
|
|---|
| 40 | ## Beads Issue Tracker
|
|---|
| 41 |
|
|---|
| 42 | This project uses **bd (beads)** for issue tracking. Run `bd prime` to see full workflow context and commands.
|
|---|
| 43 |
|
|---|
| 44 | ### Quick Reference
|
|---|
| 45 |
|
|---|
| 46 | ```bash
|
|---|
| 47 | bd ready # Find available work
|
|---|
| 48 | bd show <id> # View issue details
|
|---|
| 49 | bd update <id> --claim # Claim work
|
|---|
| 50 | bd close <id> # Complete work
|
|---|
| 51 | ```
|
|---|
| 52 |
|
|---|
| 53 | ### Rules
|
|---|
| 54 |
|
|---|
| 55 | - Use `bd` for ALL task tracking — do NOT use TodoWrite, TaskCreate, or markdown TODO lists
|
|---|
| 56 | - Run `bd prime` for detailed command reference and session close protocol
|
|---|
| 57 | - Use `bd remember` for persistent knowledge — do NOT use MEMORY.md files
|
|---|
| 58 |
|
|---|
| 59 | **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.
|
|---|
| 60 |
|
|---|
| 61 | ## Session Completion
|
|---|
| 62 |
|
|---|
| 63 | **When ending a work session**, you MUST complete ALL steps below. Work is NOT complete until `git push` succeeds.
|
|---|
| 64 |
|
|---|
| 65 | **MANDATORY WORKFLOW:**
|
|---|
| 66 |
|
|---|
| 67 | 1. **File issues for remaining work** - Create issues for anything that needs follow-up
|
|---|
| 68 | 2. **Run quality gates** (if code changed) - Tests, linters, builds
|
|---|
| 69 | 3. **Update issue status** - Close finished work, update in-progress items
|
|---|
| 70 | 4. **PUSH TO REMOTE** - This is MANDATORY:
|
|---|
| 71 | ```bash
|
|---|
| 72 | git pull --rebase
|
|---|
| 73 | git push
|
|---|
| 74 | git status # MUST show "up to date with origin"
|
|---|
| 75 | ```
|
|---|
| 76 | 5. **Clean up** - Clear stashes, prune remote branches
|
|---|
| 77 | 6. **Verify** - All changes committed AND pushed
|
|---|
| 78 | 7. **Hand off** - Provide context for next session
|
|---|
| 79 |
|
|---|
| 80 | **CRITICAL RULES:**
|
|---|
| 81 | - Work is NOT complete until `git push` succeeds
|
|---|
| 82 | - NEVER stop before pushing - that leaves work stranded locally
|
|---|
| 83 | - NEVER say "ready to push when you are" - YOU must push
|
|---|
| 84 | - If push fails, resolve and retry until it succeeds
|
|---|
| 85 | <!-- END BEADS INTEGRATION -->
|
|---|
| 86 |
|
|---|