arcadedb / control-plane
CLAUDE.md1 starsChanged 5 months agoApache-2.0View on GitHub
Directory rules for the control plane (registry, router, provisioning, retrieval). Inherits the root CLAUDE.md. CTO package = interface stubs; implementation is Phase 2. - TenantRecord (PK tenant_id) + CellRecord (PK cell_id) in registry/schema.ts. - Regional table only — NEVER a global table (residency, ADR-0007). An EU tenant's records live only in the EU regional table; DR replication is in-geo. - home_geo is immutable after creation. schema_version per DB drives the fan-out migration runner (ADR-0028). - PITR on. KMS-encrypted. Placement queries…
- Installs packages
In this repository20 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- docs/CLAUDE.mdCLAUDE.md
- helm/CLAUDE.mdCLAUDE.md
- terraform/CLAUDE.mdCLAUDE.md
- add-cellSkill
- cell-capacity-reportSkill
- deprovision-tenantSkill
- dr-drillSkill
- incident-triageSkill
- migrate-schemaSkill
- new-adrSkill
- provision-tenantSkill
- restore-tenantSkill
- retire-cellSkill
- review-terraform-planSkill
- rotate-secretsSkill
- security-baseline-checkSkill
- tenant-erasureSkill
- tenant-usage-reportSkill
- upgrade-arcadedbSkill
The file
We split this CLAUDE.md into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
Idempotent + retryable: every task is a no-op if already applied.
- Very specific: line 39
Keep retrieval behind the RetrievalProvider interface so vectors can be externalised (OpenSearch Serverless / Aurora pgvector, in-geo) …
≈ “Common” is an estimate: at least 1 in 5 of the 27,641 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md — control-plane/
Directory rules for the control plane (registry, router, provisioning,
retrieval). Inherits the root CLAUDE.md. CTO package =
interface stubs; implementation is Phase 2.
Registry schema (regional DynamoDB — ADR-0008)
TenantRecord(PKtenant_id) +CellRecord(PKcell_id) inregistry/schema.ts.- Regional table only — NEVER a global table (residency, ADR-0007). An EU tenant's records live only in the EU regional table; DR replication is in-geo.
home_geois immutable after creation.schema_versionper DB drives the fan-out migration runner (ADR-0028).- PITR on. KMS-encrypted. Placement queries via GSIs (
geo#env#tier#status).
Provisioning invariants (Step Functions ASL)
- First step asserts
home_geo== this control plane's geo, elseFailwithResidencyViolation. (Bothstatemachine.asl.jsonanddeprovision.asl.json.) - Idempotent + retryable: every task is a no-op if already applied; the whole flow can be safely re-run (Retry + Catch on each Task).
- Provision order: create DB (3x replicated) → least-priv per-DB user (not root) → HNSW + Lucene indexes → store secret → register backup → registry active + audit event.
- Deprovision/erasure: optional final backup → drop DB (or crypto-shred the per-tenant CMK) → revoke secret → emit deletion evidence (audit + certificate).
Router invariants (read/write split + governance)
- Residency:
assertInGeothrows iftenant.home_geo!= the router's geo. - Writes → Raft leader, reads → replicas (validate leader-forwarding on the
pinned version, A5). Cache
tenant_id → cell + db_name. - Per-tenant governance (ADR-0027): query timeouts, row caps, rate limits,
circuit-breaker, and a kill-switch (used by
incident-triage). The engine has no per-DB quotas (F2) — the proxy is the only enforcement point.
RetrievalProvider (ADR-0024)
Keep retrieval behind the RetrievalProvider interface so vectors can be
externalised (OpenSearch Serverless / Aurora pgvector, in-geo) without an app
rewrite if the Phase-2 native-HNSW benchmark fails (A6). Count vector RAM in the
capacity model.
The restore rule (F5)
The target DB must NOT exist before restore. Any restore tooling must
drop/rename first, then restore the ZIP, then rebuild HNSW/Lucene indexes +
per-DB users (see restore-tenant skill).
Validate
cd control-plane && npm install && npm run typecheck # Phase 2 toolchain
python3 -c "import json; json.load(open('provisioning/statemachine.asl.json'))"Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

