Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
2.2 KiB
2.2 KiB
Rules for agents (Paperclip, Claude Code, Cursor)
Read docs/ARCHITECTURE.md before any task. One task id per branch/PR (task/BIT-<id>-short-slug).
Non-negotiables
- LightCraft is consumed, never forked. Only
engine/coreimportslightcraft-*crates. Pin byrevin the rootCargo.toml. A bump is its own PR and must pass the reference-image tests. Missing engine features go upstream as PRs to storytold/lightcraft. - Edits are commands, not pixels. Every edit is an
EditCommand(packages/contracts, mirrored inengine/core). The server assigns a per-photoseq; clients replay from aseq. - Files and edits travel separately. Uploads go through the queue (tus / SFTPGo); edits through Socket.io.
- Organizations from day one. Every row that belongs to someone carries
organization_id. Agency mode and independent-photographer mode are an organization setting, not separate code paths. - No Adobe assets or names in the UI. Same workflow as Lightroom, original icons, labels and presets.
- Biometrics are opt-in per organization and the legal basis is stored with the setting.
- No third-party AI by default. Faces and OCR run locally; external fallbacks are opt-in per organization.
- Language: code, comments, identifiers and commit messages in English. User-facing copy via i18n (pt-PT first).
- Never commit secrets,
.env, generated status/summary markdown files, or build output. Deploys never overwrite a server.env(norm BIT-25005,docs/DEPLOY.md). - Tests touch real infrastructure safely: API tests run against PostgreSQL and only on a database whose name
ends in
_test. Never runprisma migrate resetor other destructive commands against shared databases. - Green CI before merge:
pnpm -r build && pnpm -r typecheck && pnpm -r testandcargo fmt --check,cargo clippy -D warnings,cargo test.
Porting from the old projects
Port logic and tests, not UI. Sources: BitReport.pt/app.photoreport.pt, BitReport.pt/events.photoreport.pt,
BitReport.pt/PhotoReport_Studio. Keep behaviour identical unless the task says otherwise, and note the
original file in the PR description.