source: Klonkt/AGENTS.md@ a505f31

main
Last change on this file since a505f31 was 87696ce, checked in by Bart <bart@…>, 3 weeks ago

De mod/-modules krijgen een cache-buster: MOD_V

/assets staat buiten development op max-age=1y, en de dynamische import van
assets/js/mod/*.js had als enige geen ?v= -- style.css, audio.css en
audio-player.js hebben er al jaren een. Gevolg: wie de pagina eerder bezocht,
draaide een jaar lang de oude module. Een reparatie bereikt dan precies de
bezoekers die de fout al hebben.

Gemerkt bij read.js: de gerepareerde module stond goed op de server (curl
bevestigde het) maar de browser bleef de oude draaien, ook na herladen en na het
wissen van de service-worker-caches. En de hernoemde klasse maakte het zichtbaar:
oude JS zet read-chrome-weg, nieuwe CSS luistert naar read-chrome-hidden, dus de
balken schoven bij die bezoekers helemaal niet meer weg.

Eén nummer voor de hele map, met de hand te bumpen; de regel staat nu ook in
CLAUDE.md en AGENTS.md, want een discipline die nergens staat is er geen.

Co-Authored-By: Claude Opus 5 <claude@…>

  • Property mode set to 100644
File size: 4.2 KB
Line 
1# Agent Instructions
2
3This project uses **bd** (beads) for issue tracking. Run `bd prime` for full workflow context.
4
5## Quick Reference
6
7```bash
8bd ready # Find available work
9bd show <id> # View issue details
10bd update <id> --claim # Claim work atomically
11bd close <id> # Complete work
12bd 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
19Shell 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
24cp -f source dest # NOT: cp source dest
25mv -f source dest # NOT: mv source dest
26rm -f file # NOT: rm file
27
28# For recursive operations
29rm -rf directory # NOT: rm -r directory
30cp -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
60This project uses **bd (beads)** for issue tracking. Run `bd prime` to see full workflow context and commands.
61
62### Quick Reference
63
64```bash
65bd ready # Find available work
66bd show <id> # View issue details
67bd update <id> --claim # Claim work
68bd 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
851. **File issues for remaining work** - Create issues for anything that needs follow-up
862. **Run quality gates** (if code changed) - Tests, linters, builds
873. **Update issue status** - Close finished work, update in-progress items
884. **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 ```
945. **Clean up** - Clear stashes, prune remote branches
956. **Verify** - All changes committed AND pushed
967. **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
Note: See TracBrowser for help on using the repository browser.