Skip to main content

SPEC 005: Agreements

Status: DRAFT Priority: P0 Created: 2026-02-21 Approved: pending Repo(s): equa-web, equa-server

1. Feature Purpose

The Agreements module manages an organization’s governing documents — primarily operating agreements and board authorizations. An operating agreement represents a point-in-time snapshot of the organization’s equity structure, capturing shareholdings, security types, plans, and transactions as immutable, content-addressed records. Authorizations track board-level approvals attached to specific documents. Together, these provide a legally auditable chain of the company’s equity history.

2. Current State (Verified)

Frontend module:
Backend modules: Agreement entities span the organization and captable server modules. Operating agreements reference cap-table entities (shareholdings, securities, plans, transactions) via content-addressed hashes. Authorizations are managed alongside organization-level data.

3. Data Model

Entities

Key Fields — OperatingAgreements

Key Fields — OperatingAgreementsShareholdings

Key Fields — OperatingAgreementsTransactions

This is a ViewEntity backed by a recursive CTE that joins operating_agreements with hash_lists to materialize the full transaction chain for a given agreement.

Key Fields — Authorizations

Relationships

Content-Addressed Hashing

All Hash-typed fields are content-addressed identifiers. This guarantees:
  • Immutability: once an agreement snapshot is created, its referenced data cannot be altered without producing a different hash.
  • Auditability: the previous chain forms a tamper-evident linked list of every equity-structure change.
  • Deduplication: identical data produces identical hashes, preventing redundant storage.

4. API Endpoints

5. Frontend Components

Routes

State Management

Agreements state is managed within the agreements module store. The operating-agreement chain is loaded lazily — the latest agreement is fetched first, with prior snapshots loaded on demand for diff views.

6. Business Rules and Validation

7. Acceptance Criteria

  • AC-1: Admin can create a new operating agreement that snapshots current shareholdings, plans, securities, and transactions
  • AC-2: New agreement automatically links to the previous agreement via previous hash
  • AC-3: Agreement detail view displays all captured shareholdings and transactions
  • AC-4: User can compare two agreement snapshots to see equity structure changes
  • AC-5: Admin can create a board authorization with date, document, and notes
  • AC-6: Soft-deleting an authorization hides it from active views but preserves audit trail
  • AC-7: Recursive CTE correctly materializes the full transaction list for OperatingAgreementsTransactions
  • AC-8: Content-addressed hashes are correctly computed and verified on read
  • AC-9: Agreement chain is displayed chronologically with linked-list navigation

8. Risks and Edge Cases

9. Dependencies