@@ -87,26 +87,32 @@ initial_prompt: |
8787 It exposes a gRPC API (HTTP/2 over TCP) and uses TCP for inter-node Raft consensus.
8888
8989 ## Core Terminology
90- - **Namespace**: Storage unit per organization, containing entities and vaults. Isolated with separate Raft consensus per shard.
91- - **Vault**: Relationship store within a namespace. Each vault maintains its own cryptographic chain (state_root, previous_hash, block height).
92- - **Entity**: Key-value data stored in a namespace (users, teams, clients, sessions). Supports TTL, versioning, conditional writes.
93- - **Relationship**: Authorization tuple in a vault: (resource, relation, subject). Used by Engine for permission checks.
94- - **_system namespace**: Global data (user accounts, namespace routing), replicated to all nodes.
95- - **Shard**: Multiple namespaces share a Raft group for efficiency. Vaults within a shard have independent cryptographic chains.
90+ - **Organization**: Top-level tenant isolation boundary. Sequential `OrganizationId(i64)` for storage, Snowflake `OrganizationSlug(u64)` for external APIs.
91+ - **Vault**: Relationship store within an organization. Each vault maintains its own cryptographic chain (state_root, previous_hash, block height).
92+ - **Entity**: Key-value data stored in an organization. Supports TTL, versioning, conditional writes.
93+ - **Relationship**: Authorization tuple in a vault: (resource, relation, subject).
94+ - **User**: Identity with email, role, status, and token version. Stored in `_system` organization.
95+ - **App**: Organization-scoped client application with vault connections.
96+ - **SigningKey**: Ed25519 JWT signing key with scope (Global/Organization) and lifecycle (Active/Rotated/Revoked).
97+ - **RefreshToken**: Session token family with rotate-on-use and poison detection.
98+ - **Team**: Organization-scoped user group.
99+ - **Shard**: Multiple organizations sharing a Raft group. Vaults within a shard have independent cryptographic chains.
96100
97101 ## Architecture Highlights
98102 - Hybrid storage: State commitment (merkleized) is separate from state storage (fast K/V) to avoid write amplification.
99103 - Bucket-based state roots: 256 buckets with incremental hashing, O(k) complexity where k = dirty keys.
100104 - Per-vault failure isolation: Divergence in one vault doesn't cascade to other vaults in the same shard.
101- - Leader-assigned sequential IDs: Deterministic for Raft replay (NamespaceId, VaultId, UserId are all int64).
105+ - Dual-ID architecture: Internal sequential IDs (`i64`) for storage, Snowflake slugs (`u64`) for APIs. `SlugResolver` translates at gRPC boundaries.
106+ - JWT token infrastructure: Ed25519 signing with envelope encryption (AES-256-GCM + AES-KWP), ArcSwap lock-free key cache.
102107
103108 ## Key Design Decisions
104109 - All operations are idempotent, resolved by Raft total ordering.
105110 - SHA-256 for all cryptographic commitments; seahash for bucket assignment.
106111 - Embedded storage backend (single-file, ACID, COW B-trees).
107112 - Pagination tokens are opaque, HMAC-signed, and include height for consistent reads.
113+ - Server crates use snafu for error handling; SDK uses thiserror.
108114
109- See DESIGN.md for full specifications.
115+ See DESIGN.md for full specifications. See AGENTS.md for development conventions.
110116# the name by which the project can be referenced within Serena
111117project_name : " InferaDB Ledger"
112118
@@ -146,3 +152,8 @@ language_backend:
146152# list of regex patterns which, when matched, mark a memory entry as read‑only.
147153# Extends the list from the global configuration, merging the two lists.
148154read_only_memory_patterns : []
155+
156+ # line ending convention to use when writing source files.
157+ # Possible values: unset (use global setting), "lf", "crlf", or "native" (platform default)
158+ # This does not affect Serena's own files (e.g. memories and configuration files), which always use native line endings.
159+ line_ending :
0 commit comments