AGENTS.md42 lines · main
1# CLAUDE.md — Briven (project root)
2
3Agent instructions for this repo. **Hard rules never break.**
4
5---
6
7## HARD RULE — Auth work: open SuperTokens knowledge base first (never break)
8
9**Owner intent (flndrn, 2026-07-26):** Agents were guessing Auth instead of using the SuperTokens library. That ends here.
10
11### Before **any** Auth change
12
13This includes: magic link, OTP, SMS, OAuth / social / Konnos, sessions, MFA, passkeys, FDI proxy, IdP/OIDC, SSO, multitenancy, branding, providers UI, secrets, allowed domains, disable/enable Auth, or anything under `apps/api/src/**/auth*`, `apps/api/src/services/auth-core/**`, `packages/auth/**`, Auth dashboard routes, or Auth docs.
14
15You **must**:
16
171. **Open and read** [`docs/knowledge-base.md`](docs/knowledge-base.md) (the SuperTokens + Doltgres library cabinet for this project).
182. Open the **matching SuperTokens section/URL** for the feature (passwordless, thirdparty, sessions, FDI, multitenancy, etc.).
193. If the work touches the database or SQL: also open the **Doltgres** section of that file (and `AI_DOCS/dolt-reference/` when present).
204. **State in one plain sentence** what SuperTokens (or the KB) says the correct behavior is — then implement Briven-branded on Doltgres.
215. **Do not invent** login shapes, magic-link hosts, OAuth flows, or cookie rules from memory alone.
22
23### Forbidden
24
25- Shipping Auth changes without reading `docs/knowledge-base.md` first.
26- “Looks reasonable” / assume / guess when SuperTokens already documents the flow.
27- Abandoning briven-engine / architecture after one SQL error without Doltgres docs + notifying flndrn.
28
29### After Auth changes
30
31- Prefer prove on a real project path (e.g. mavi pay / ISY) with evidence — not “code looks fine.”
32
33**Library path:** `docs/knowledge-base.md`
34**Purpose:** SuperTokens as product/architecture map; Briven stays Briven-branded on Doltgres.
35
36---
37
38## Other standing notes
39
40- Product walls, multi-tenant isolation, `pk_briven_auth_` public keys, no inventing Clerk/Firebase as the platform engine.
41- Infra compose logging caps and Docker rules: see `infra/CLAUDE.md` and `docs/DOCKER.md` when editing `infra/`.
42- Deploy: France Briven compose + `scripts/safe-redeploy-service.sh`; batch deploys when possible.
Preview

CLAUDE.md — Briven (project root)

Agent instructions for this repo. Hard rules never break.


HARD RULE — Auth work: open SuperTokens knowledge base first (never break)

Owner intent (flndrn, 2026-07-26): Agents were guessing Auth instead of using the SuperTokens library. That ends here.

Before any Auth change

This includes: magic link, OTP, SMS, OAuth / social / Konnos, sessions, MFA, passkeys, FDI proxy, IdP/OIDC, SSO, multitenancy, branding, providers UI, secrets, allowed domains, disable/enable Auth, or anything under apps/api/src/**/auth*, apps/api/src/services/auth-core/**, packages/auth/**, Auth dashboard routes, or Auth docs.

You must:

  1. Open and read docs/knowledge-base.md (the SuperTokens + Doltgres library cabinet for this project).
  2. Open the matching SuperTokens section/URL for the feature (passwordless, thirdparty, sessions, FDI, multitenancy, etc.).
  3. If the work touches the database or SQL: also open the Doltgres section of that file (and AI_DOCS/dolt-reference/ when present).
  4. State in one plain sentence what SuperTokens (or the KB) says the correct behavior is — then implement Briven-branded on Doltgres.
  5. Do not invent login shapes, magic-link hosts, OAuth flows, or cookie rules from memory alone.

Forbidden

  • Shipping Auth changes without reading docs/knowledge-base.md first.
  • “Looks reasonable” / assume / guess when SuperTokens already documents the flow.
  • Abandoning briven-engine / architecture after one SQL error without Doltgres docs + notifying flndrn.

After Auth changes

  • Prefer prove on a real project path (e.g. mavi pay / ISY) with evidence — not “code looks fine.”

Library path: docs/knowledge-base.md
Purpose: SuperTokens as product/architecture map; Briven stays Briven-branded on Doltgres.


Other standing notes

  • Product walls, multi-tenant isolation, pk_briven_auth_ public keys, no inventing Clerk/Firebase as the platform engine.
  • Infra compose logging caps and Docker rules: see infra/CLAUDE.md and docs/DOCKER.md when editing infra/.
  • Deploy: France Briven compose + scripts/safe-redeploy-service.sh; batch deploys when possible.