Org architecture
A TRUST in aeqi is a graph of slots and edges, not a table of titles. This page explains how the pieces fit: TRUSTs, Roles, ownership tokens, and governance.
TRUSTs are entities
A TRUST is the programmable company in aeqi: a workspace with a fresh UUID, a SQLite database, runtime state, and optional protocol state. The same model can cover a one-person personal account and a 50-person operating company; the difference is how the entity is rendered.
| URL | Shape |
|---|---|
/trust/<address>/* |
Every entity — your personal entity or a joint TRUST — lives here once it's registered on chain. Rail: Overview · Roles · Ownership · Treasury · Governance. Single-occupant entities collapse Roles/Ownership/Governance gracefully. |
/c/<entity_id>/* |
Transient fallback for entities pre-registration. 308 redirects to /trust/<address>/* once the on-chain registration completes. |
/account |
User-scoped settings only (auth, billing, signers). Not an entity surface — your own entity is at /trust/<your-address>/*. |
Same underlying contract. One canonical URL shape; everything is an entity.
Roles are the org chart
Every participant occupies one or more Roles. A Role is a slot in the company's role DAG; an agent or human occupies it.
Director (Founder)
|
+-- CEO
|
+-- COO --> Sales Lead --> Sales Rep
+-- CTO --> Eng Lead --> Engineer
+-- CFO
Authority: Role X controls Role Y iff there's a directed path from X to Y in role_edges, scoped to the same entity_id. Recursive CTE, no ACL table.
See Roles for the full primitive.
Board vs org chart
Two distinct layers, kept orthogonal.
| Layer | role_type |
Who | Where it lives | Power |
|---|---|---|---|---|
| Board | director |
Founders typically | On-chain TRUST contract + runtime mirror | Governance: signs the smart account, votes proposals. |
| Org chart | operational |
CEO + C-suite + reports + agents | Runtime only | Operational: spawn agents, configure tools, route work. |
C-suite operational titles are NOT directors. CFO, CMO, CLO, CISO are role_type='operational'. They report to CEO via role_edges, not via signing authority. They get on-chain bindings only if and when the founder explicitly elects them to the board (rare; usually only founders are board).
A founder typically holds both — one Director seat plus a CEO seat. Two rows for the same human.
The bug pattern to watch (2026-05-06): creating CFO/CMO/CLO/CISO as role_type='director' made the on-chain board count jump from 1 to 5. Don't ship director-typed roles for non-board seats.
Ownership tokens — the cap table
For Venture-template TRUSTs, ownership can become protocol state. The TRUST tracks ownership issuance, transfer restrictions, and cap-table state when enabled.
| Mechanism | Purpose |
|---|---|
| Mint | Issue equity to a holder. Recorded on-chain. |
| Vesting schedule | Linear with cliff. Time-based + market-cap-gated for FDV milestones. |
| Transfer restrictions | Lock-up windows, KYC allowlist (when incorporated entity is attached). |
| Soulbound (non-transferable) | For founders, for compliance reasons, or for advisor allocations. |
Ownership tokens are independent from governance tokens. A Director-tier role doesn't automatically hold equity; equity holders don't automatically have a board seat. Two distinct authorities.
For Foundation-template TRUSTs, no ownership token is minted. Mission-locked, governance-only.
Governance — proposals and votes
Governance is on-chain when enabled. The flow:
draft proposal → table → quorum → timelock → execute
| Stage | Who acts |
|---|---|
| Draft | Anyone with proposal rights (typically Director or Executive). |
| Table | Move from draft to active. Votable from this point. |
| Vote | Any voter casts for/against/abstain. Vote weight per role bit and/or token balance. |
| Quorum | Minimum participation required. Per-template default. |
| Timelock | Configurable delay between pass and execute (typically 24-72h). |
| Execute | Anyone can execute a passed proposal after timelock. |
Vote weight is configured per template:
| Template | Voting basis |
|---|---|
| Entity | None or Director-tier 1-of-N, depending on the TRUST's configured roles. |
| Venture | Token-weighted + Director veto. |
| Foundation | Director-tier multi-sig + Protector role veto. |
| Fund | LP/GP weighted. |
The Treasury tab and Governance tab read directly from the on-chain indexer. Proposals, votes, and execution status all live on-chain.
Treasury — the financial picture
Treasury is the canonical financial surface. It folds three lenses:
| Lens | Content |
|---|---|
| Balance state | Current treasury balances and protocol assets. |
| Budgets | Allocated spend per role / per agent / per project. |
| Transactions | Inbound and outbound history. |
A Treasury row is the same primitive at every entity scope — a joint TRUST's /trust/<address>/treasury and your personal entity's /trust/<your-address>/treasury render through the same code path and the same UI.
There's no separate "Portfolio" page. Treasury is the portfolio.
Three money flows (kept distinct)
| Flow | Source | Destination | Settled |
|---|---|---|---|
| Subscription | Personal card | aeqi platform | Per month |
| Inference top-up | Plan change, top-up, or provider key | Inference provider via aeqi | Per usage policy |
| Treasury | Customers, investors, internal | Treasury balance | Protocol or off-chain settlement |
Subscription does NOT debit treasury — failure modes diverge. A TRUST with no treasury but an active product still needs to keep running. Treasury is the TRUST's own money.
Three money flows stay distinct: subscription, inference capacity, and treasury.
Templates — the locked-in shapes
Four canonical TRUST templates ship today:
- Entity — flexible shell. No enforced state machine. Custom org structures.
- Venture — growth engine. Cap table, vesting, governance, fundraising rounds.
- Foundation — steward. Mission-locked, no fundraising, governance + budget.
- Fund — capital allocator. LP/GP roles, NAV tracking.
See Canonical templates for the contract-level configuration.
Stack blueprints — multi-TRUST graphs
A stack blueprint is a graph of (single-blueprint, name) tuples + cross-TRUST edges. Use it to ship a multi-TRUST structure as a unit:
- Founder + spinout — personal entity holds 30% + Founder role in a venture spinout.
- VC fund + 3 portfolio companies — fund holds 20% + Director role in each.
The wizard provisions all entities in topo-sorted order. On-chain edges (TokenOwnership transfers, RoleAssignment writes, scheduled treasury flows) are stubbed in v1; W33B worktree implements them. See Stack blueprints.
Summary
- A TRUST is the programmable company. It has an ID and optional protocol address.
- Roles are the org-chart slots; agents and humans occupy them.
- Authority is the transitive closure over
role_edges. - Board (
director) is on-chain governance; org chart (operational) is runtime only. - Treasury folds balance + budgets + transactions.
- Templates are locked-in TRUST configurations; pick at creation.
- Stacks are multi-TRUST graphs.