diff --git a/AGENTS.md b/AGENTS.md index 7f0d014b..615e4ebd 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,5 +1,188 @@ -# Agent Configuration +# Agent Configuration — Canton dApp Booster -This project's agent configuration lives in [`CLAUDE.md`](./CLAUDE.md). +This file is the canonical monorepo-wide agent configuration. `CLAUDE.md` +files are compatibility shims that point here or to a sibling `AGENTS.md`. +Each subproject can layer its own `AGENTS.md` for stack-specific deltas: -Claude Code reads `CLAUDE.md` natively. If your agent reads `AGENTS.md` (Cursor, Windsurf, etc.), load rules from `CLAUDE.md` -- it is the single source of truth for this project's conventions, stack, and working rules. +- [`carpincho-wallet/AGENTS.md`](carpincho-wallet/AGENTS.md) — CIP-0103 wallet (Vite + React + Biome) +- [`canton-connect-kit/AGENTS.md`](canton-connect-kit/AGENTS.md) — wagmi-style React hooks for Canton dApps +- [`canton-barebones/wallet-service/AGENTS.md`](canton-barebones/wallet-service/AGENTS.md) — wallet-service bridge rules +- [`dapp/e2e/AGENTS.md`](dapp/e2e/AGENTS.md) — Playwright black-box integration test rules +- `canton-barebones/`, `dapp/daml/`, `dapp/frontend/` — see each subproject's `README.md` + +For the system shape (data flow, components, ports), see [`architecture.md`](architecture.md). + +--- + +## Documentation Distribution + +Use one reader per doc type, layered by scope: + +| File | Reader / question | Distribution rule | +|------|-------------------|-------------------| +| `README.md` | Human: what is this and how do I run it? | Every independently buildable, runnable, publishable, or testable unit gets one. Subproject READMEs cover only that unit and link to the root README for shared setup. | +| `AGENTS.md` | Agent: what local rules change how I edit here? | Root always. Subproject only when local conventions differ from root enough that an agent editing only that directory would get it wrong. Deltas only; link upward for repo-wide rules. | +| `CLAUDE.md` | Claude compatibility loader | Three-line shim beside every `AGENTS.md`, pointing to the sibling `AGENTS.md`. It is never canonical. | +| `architecture.md` | Human or agent: what are the structural seams and internal subsystems? | Root always for cross-component seams. Subproject only when internals outgrow the README: three or more interacting subsystems, non-trivial control flow, or named abstractions. | + +Current distribution: + +| Scope | README | AGENTS | CLAUDE | architecture | Decision | +|-------|--------|--------|--------|--------------|----------| +| root | yes | yes | shim | yes | Canonical repo rules and cross-component seams. | +| `carpincho-wallet/` | yes | yes | shim | yes | Complex wallet internals: vault, provider, extension, WalletConnect, theme, session. | +| `canton-connect-kit/` | yes | yes | shim | yes | Public hook API, connector abstractions, provider event wiring. | +| `canton-barebones/wallet-service/` | yes | yes | shim | no | Local bridge rules are useful; README API boundary is enough architecture for now. | +| `dapp/e2e/` | yes | yes | shim | no | Independent Playwright package with strict black-box testing conventions. | +| `dapp/frontend/` | yes | no | no | no | Small dApp UI; root rules and README are enough. | +| `dapp/daml/` | yes | no | no | no | Single DAML package. | +| `canton-barebones/` | yes | no | no | no | Docker/Bash local participant wrapper. | + +Subproject docs must not restate root rules. They should describe only their local delta and link upward. + +## Stack & Conventions (monorepo) + +| Category | Technology | Notes | +|----------|-----------|-------| +| Languages | TypeScript, DAML, Bash | TypeScript across the JS subprojects; DAML in `dapp/daml/`; Bash for canton-barebones scripts | +| Package manager | npm | One `package-lock.json` per Node subproject; root `package.json` orchestrates via `npm --prefix