| [5b22ea9] | 1 | # Agent Instructions
|
|---|
| 2 |
|
|---|
| [4cc4bcf] | 3 | > **The beads database in this repository is retired. Do not write to it.**
|
|---|
| 4 | >
|
|---|
| 5 | > Klonkt's issues live in `~/Sources/shaer-frontend/.beads` (Dolt database
|
|---|
| 6 | > `shaer`). All 32 of them were migrated there on 2026-08-23 keeping their
|
|---|
| 7 | > original `prutfolio-src-*` ids, so `bd show prutfolio-src-7cz` works from that
|
|---|
| 8 | > repository and means the same issue it always did.
|
|---|
| 9 | >
|
|---|
| 10 | > Create, update and close Klonkt issues from `~/Sources/shaer-frontend`. The
|
|---|
| 11 | > `bd` commands below apply there, not here.
|
|---|
| 12 | >
|
|---|
| 13 | > Why: this repository has no `core.hooksPath`, so the beads hooks in
|
|---|
| 14 | > `.beads/hooks/` never ran. The Dolt database is gitignored and the one tracked
|
|---|
| 15 | > artefact, `.beads/issues.jsonl`, is only refreshed by those hooks — it had
|
|---|
| 16 | > drifted four days and two issues behind before anyone noticed. shaer-frontend
|
|---|
| 17 | > has the hooks wired, so its export stays current.
|
|---|
| 18 | >
|
|---|
| 19 | > The local database is left in place and still readable for history. Nothing
|
|---|
| 20 | > enforces this: it is a convention, and a `bd create` run here will succeed and
|
|---|
| 21 | > be lost.
|
|---|
| 22 |
|
|---|
| 23 | This project uses **bd** (beads) for issue tracking, from the shaer-frontend
|
|---|
| 24 | repository. Run `bd prime` there for full workflow context.
|
|---|
| [5b22ea9] | 25 |
|
|---|
| 26 | ## Quick Reference
|
|---|
| 27 |
|
|---|
| 28 | ```bash
|
|---|
| 29 | bd ready # Find available work
|
|---|
| 30 | bd show <id> # View issue details
|
|---|
| 31 | bd update <id> --claim # Claim work atomically
|
|---|
| 32 | bd close <id> # Complete work
|
|---|
| 33 | bd dolt push # Push beads data to remote
|
|---|
| 34 | ```
|
|---|
| 35 |
|
|---|
| 36 | ## Non-Interactive Shell Commands
|
|---|
| 37 |
|
|---|
| 38 | **ALWAYS use non-interactive flags** with file operations to avoid hanging on confirmation prompts.
|
|---|
| 39 |
|
|---|
| 40 | 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.
|
|---|
| 41 |
|
|---|
| 42 | **Use these forms instead:**
|
|---|
| 43 | ```bash
|
|---|
| 44 | # Force overwrite without prompting
|
|---|
| 45 | cp -f source dest # NOT: cp source dest
|
|---|
| 46 | mv -f source dest # NOT: mv source dest
|
|---|
| 47 | rm -f file # NOT: rm file
|
|---|
| 48 |
|
|---|
| 49 | # For recursive operations
|
|---|
| 50 | rm -rf directory # NOT: rm -r directory
|
|---|
| 51 | cp -rf source dest # NOT: cp -r source dest
|
|---|
| 52 | ```
|
|---|
| 53 |
|
|---|
| 54 | **Other commands that may prompt:**
|
|---|
| 55 | - `scp` - use `-o BatchMode=yes` for non-interactive
|
|---|
| 56 | - `ssh` - use `-o BatchMode=yes` to fail instead of prompting
|
|---|
| 57 | - `apt-get` - use `-y` flag
|
|---|
| 58 | - `brew` - use `HOMEBREW_NO_AUTO_UPDATE=1` env var
|
|---|
| 59 |
|
|---|
| [87696ce] | 60 | ## Conventions & Patterns
|
|---|
| 61 |
|
|---|
| 62 | - **Bump `MOD_V` whenever you change anything in `src/assets/js/mod/`.** It sits
|
|---|
| 63 | at the top of the module loader in `src/views/shell.ejs` and is the
|
|---|
| 64 | cache-buster for every page module. `/assets` is served `max-age=1y` outside
|
|---|
| 65 | development, so without a bump a browser that visited before keeps running the
|
|---|
| 66 | old module for a year — meaning a fix reaches everyone *except* the people who
|
|---|
| 67 | already have the bug. Same discipline as `audio-player.js?v=N` a few hundred
|
|---|
| 68 | lines up. One number for the whole directory: bumping too often costs one
|
|---|
| 69 | download, bumping too rarely costs a bugfix that never arrives.
|
|---|
| 70 |
|
|---|
| 71 | - **Comments and commit messages in Dutch, identifiers in English.** The modules
|
|---|
| 72 | in `assets/js/mod` read `setIcon`, `uploadOne`, `applyAccent`; the comments
|
|---|
| 73 | around them are Dutch prose. Both halves matter — a Dutch identifier in an
|
|---|
| 74 | English file is the same wrong note as an English comment in a Dutch one. This
|
|---|
| 75 | extends to anything long-lived and outward-facing: URL paths and CSS class
|
|---|
| 76 | names are English (`/read`, `.read-end`), never a Dutch verb form.
|
|---|
| 77 |
|
|---|
| [76e9cfd] | 78 | <!-- BEGIN BEADS INTEGRATION v:1 profile:minimal hash:7510c1e2 -->
|
|---|
| [5b22ea9] | 79 | ## Beads Issue Tracker
|
|---|
| 80 |
|
|---|
| 81 | This project uses **bd (beads)** for issue tracking. Run `bd prime` to see full workflow context and commands.
|
|---|
| 82 |
|
|---|
| 83 | ### Quick Reference
|
|---|
| 84 |
|
|---|
| 85 | ```bash
|
|---|
| 86 | bd ready # Find available work
|
|---|
| 87 | bd show <id> # View issue details
|
|---|
| 88 | bd update <id> --claim # Claim work
|
|---|
| 89 | bd close <id> # Complete work
|
|---|
| 90 | ```
|
|---|
| 91 |
|
|---|
| 92 | ### Rules
|
|---|
| 93 |
|
|---|
| 94 | - Use `bd` for ALL task tracking — do NOT use TodoWrite, TaskCreate, or markdown TODO lists
|
|---|
| 95 | - Run `bd prime` for detailed command reference and session close protocol
|
|---|
| 96 | - Use `bd remember` for persistent knowledge — do NOT use MEMORY.md files
|
|---|
| 97 |
|
|---|
| [76e9cfd] | 98 | **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.
|
|---|
| 99 |
|
|---|
| [5b22ea9] | 100 | ## Session Completion
|
|---|
| 101 |
|
|---|
| 102 | **When ending a work session**, you MUST complete ALL steps below. Work is NOT complete until `git push` succeeds.
|
|---|
| 103 |
|
|---|
| 104 | **MANDATORY WORKFLOW:**
|
|---|
| 105 |
|
|---|
| 106 | 1. **File issues for remaining work** - Create issues for anything that needs follow-up
|
|---|
| 107 | 2. **Run quality gates** (if code changed) - Tests, linters, builds
|
|---|
| 108 | 3. **Update issue status** - Close finished work, update in-progress items
|
|---|
| 109 | 4. **PUSH TO REMOTE** - This is MANDATORY:
|
|---|
| 110 | ```bash
|
|---|
| 111 | git pull --rebase
|
|---|
| 112 | git push
|
|---|
| 113 | git status # MUST show "up to date with origin"
|
|---|
| 114 | ```
|
|---|
| 115 | 5. **Clean up** - Clear stashes, prune remote branches
|
|---|
| 116 | 6. **Verify** - All changes committed AND pushed
|
|---|
| 117 | 7. **Hand off** - Provide context for next session
|
|---|
| 118 |
|
|---|
| 119 | **CRITICAL RULES:**
|
|---|
| 120 | - Work is NOT complete until `git push` succeeds
|
|---|
| 121 | - NEVER stop before pushing - that leaves work stranded locally
|
|---|
| 122 | - NEVER say "ready to push when you are" - YOU must push
|
|---|
| 123 | - If push fails, resolve and retry until it succeeds
|
|---|
| 124 | <!-- END BEADS INTEGRATION -->
|
|---|
| [76e9cfd] | 125 |
|
|---|