3.4 KiB
3.4 KiB
@atlilith — Agent Rules
This is the V3 platform workspace. See DESIGN.md for architecture, INFRA.md for hosts/DBs.
Hard rules
- DO NOT touch
~/Code/@projects/@lilith/lilith-platform.live/— it's still serving production. All V3 work happens here. .archive/holds frozen tarballs (platform.{0,1,2}.tar.zst), tracked via Git LFS. Never expand them into the working tree. To mine code:./scripts/extract-archive.sh platform.1→ extracts to/tmp/atlilith-archive/platform.1/. Read there, re-implement in@platform/, thenrm -rf /tmp/atlilith-archive/platform.1.- DO NOT add
mail-sync/,mac-sync/,@agents/,@ml/,@messenger/directories inside@atlilith/— these are peer services that live at~/Code/@projects/@lilith/mail-sync/and~/Code/@applications/@*/. Consumed over HTTP/MCP, never vendored. - Provider-generic naming. No
quinn-*package names in new code. Quinn's deployedquinn.*domains remain (that's Quinn's instance), but the code that backs them isprovider-portal,ai-assistant,messenger, etc. - Person-first tenancy. Every new table that owns user data must support both
user_id(Person) and optionalorg_id(Org). SeeDESIGN.md §5. - No commits from agents. This project follows the apricot ACS (auto-commit-service) workflow. Write code; ACS handles commits.
When unsure
- Architectural questions → re-read
DESIGN.md. If still unclear, ask. - Where does X live? → check
INFRA.md §4(service distribution by host). - Does V1/V0 have prior art for X? → grep
.archive/platform.{0,1,2}/andARCHIVED.mdfor the mining map. - Naming a new package → see
DESIGN.md §7. Generic > person-specific.
What's where
| Concern | Location |
|---|---|
| New user-facing apps | @platform/codebase/@apps/ |
| Cross-cutting features (api, sso, analytics, etc.) | @platform/codebase/@features/ |
| Shared libs | @platform/codebase/@packages/ |
| Per-domain deploy configs | @platform/deployments/@domains/ |
| Docker / DB / Caddy / port registry | @platform/infrastructure/ |
| Long-form docs | @platform/docs/ (project-level) or DESIGN.md / INFRA.md (root) |
| Run / build / deploy scripts | @platform/scripts/ |
Conventions inherited from .live
- Bun as runtime (not Node)
- pnpm + Bun workspaces (
bunfig.toml,package.jsonworkspaces) - TypeScript strict, no
any infrastructure/ports.yamlis the port registry; never hardcode portsinfrastructure/.env.portsis the canonical env file for ports- Caddy for TLS / dev domains (
*.apricot.lan) - Postgres for relational, TimescaleDB for analytics, Redis for queue/cache, MinIO for objects
Sibling projects (read-only peers)
These are consumed by the platform but live outside this directory tree:
~/Code/@projects/@lilith/mail-sync/— Proton Bridge wrapper (plum-resident)~/Code/@applications/@mac-sync/— iMessage bidirectional sync (plum)~/Code/@applications/@messenger/— separate messenger codebase (overlaps with@features/messages— reconcile before reuse)~/Code/@applications/@agents/— Claude SDK agents (assistant, companion, prospector, etc.)~/Code/@applications/@ml/— knowledge-platform (Crystal's successor), classifiers, ML pipelines~/Code/@applications/@quinn-ios/— Swift iOS app
Treat them as services with HTTP/MCP contracts. Do not vendor.