source: Klonkt/CLAUDE.md@ 9622f20

main
Last change on this file since 9622f20 was 7e9d0ea, checked in by Robin <roboburr@…>, 4 weeks ago

De laatste tenancy-resten, en een testbestand dat alleen zijn naam kwijt was (shaer-x7c0)

Het meeste van de bead was al gedaan door 72ec6a4 (Hub-modus en guardian-lite
eruit), dezelfde dag nog. Wat er lag:

  • database.js beschreef nog een tenancy-modus met hub, en zette bij elke boot een app_settings-rij 'tenancy' die niemand meer leest. Beide weg. Bestaande rijen blijven staan; die opruimen is een aparte beslissing.
  • ensurePrimarySite.js noemde solo/hub/circle op twee plekken.

En het belangrijkste, precies wat de bead verkeerd had: hub-permissions.test.js
test GEEN verwijderde modus. Het dekt canAdminSite (inclusief de site_members-tak
die ooit stil kapot was), canEditPost en getPrimarySite -- allemaal springlevend,
en CLAUDE.md wijst dit bestand aan als de vangrail daarvoor. Weggooien had die
dekking gesloopt. Alleen de naam verwees nog naar de hub, dus die is aangepast,
met een kop die uitlegt waarom het bestand blijft.

  • Property mode set to 100644
File size: 2.6 KB
Line 
1# Project Instructions for AI Agents
2
3This file provides instructions and context for AI coding agents working on this project.
4
5<!-- BEGIN BEADS INTEGRATION v:1 profile:minimal hash:7510c1e2 -->
6## Beads Issue Tracker
7
8This project uses **bd (beads)** for issue tracking. Run `bd prime` to see full workflow context and commands.
9
10### Quick Reference
11
12```bash
13bd ready # Find available work
14bd show <id> # View issue details
15bd update <id> --claim # Claim work
16bd close <id> # Complete work
17```
18
19### Rules
20
21- Use `bd` for ALL task tracking — do NOT use TodoWrite, TaskCreate, or markdown TODO lists
22- Run `bd prime` for detailed command reference and session close protocol
23- Use `bd remember` for persistent knowledge — do NOT use MEMORY.md files
24
25**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.
26
27## Session Completion
28
29**When ending a work session**, you MUST complete ALL steps below. Work is NOT complete until `git push` succeeds.
30
31**MANDATORY WORKFLOW:**
32
331. **File issues for remaining work** - Create issues for anything that needs follow-up
342. **Run quality gates** (if code changed) - Tests, linters, builds
353. **Update issue status** - Close finished work, update in-progress items
364. **PUSH TO REMOTE** - This is MANDATORY:
37 ```bash
38 git pull --rebase
39 git push
40 git status # MUST show "up to date with origin"
41 ```
425. **Clean up** - Clear stashes, prune remote branches
436. **Verify** - All changes committed AND pushed
447. **Hand off** - Provide context for next session
45
46**CRITICAL RULES:**
47- Work is NOT complete until `git push` succeeds
48- NEVER stop before pushing - that leaves work stranded locally
49- NEVER say "ready to push when you are" - YOU must push
50- If push fails, resolve and retry until it succeeds
51<!-- END BEADS INTEGRATION -->
52
53
54
55## Build & Test
56
57```bash
58npm start # production: node src/server.js
59npm run dev # watch mode
60npm test # unit tests (built-in node:test runner, no extra deps)
61```
62
63Tests live in `test/*.test.js` and run against an in-memory SQLite
64(`DATABASE_PATH=':memory:'`), so they never touch real data. Cover new
65permission logic with tests — `PermissionsService.canAdminSite` was once
66silently broken; see `test/site-permissions.test.js`.
67
68## Architecture Overview
69
70_Add a brief overview of your project architecture_
71
72## Conventions & Patterns
73
74_Add your project-specific conventions here_
Note: See TracBrowser for help on using the repository browser.