Nondominium Project Documentation Index
Updated: 2026-08-13
Annotated guide to the documentation set. For the topic-grouped hub see README.md; for a flat table of contents see SUMMARY.md.
π― Project Overview
Nondominium is a ValueFlows-compliant Holochain application implementing distributed, agent-centric resource management with embedded governance, capability-based security, and cryptographically-secured reputation tracking through Private Participation Receipts (PPRs).
Quick Navigation
- Getting Started - Development setup & quick start
- Architecture - System design & zome interactions
- API Documentation - Complete function reference
- Testing - Test strategy & execution
- Implementation Status - Current development progress
π Getting Started
Prerequisites & Setup
git submodule update --init --recursive # Initialize the hREA submodule (REQUIRED)
nix develop # Enter reproducible environment (REQUIRED)
bun install # Install dependencies
Key Documentation:
- π― TELOS - Project vision, mission, philosophy, and AI operating principles
- π Main README - Complete project overview & setup guide
- π§ Development Environment - Development patterns & commands
Essential Commands
# Development
bun run start # Start 2-agent development network with UIs
AGENTS=3 bun run network # Custom agent network
# Testing β Sweettest (Rust, primary)
bun run sweettest # build:happ + all nondominium Sweettest tests
bun run sweettest:only # skip the build step
# Testing β E2E (Playwright + real conductors)
bun run e2e
bun run e2e:ui
# Build
bun run build:zomes # Compile Rust zomes to WASM
bun run build:happ # Build zomes + hREA, pack all DNAs into the .happ bundle
bun run package # Create final .webhapp distribution
Canonical command reference for every suite: TEST_COMMANDS.md.
Note: Tryorama (TypeScript) tests in
tests/are deprecated. All new tests use Sweettest (Rust). Seetests/DEPRECATED.md.
ποΈ Architecture Overview
System Architecture
nondominium implements a Governance-as-Operator architecture that separates data management from business logic enforcement:
- Framework: Holochain HDK ^0.6.0 / HDI ^0.7.0 (Rust + WASM)
- Frontend: SvelteKit 2 + Svelte 5 + TypeScript + Vite 7
- Testing: Sweettest (Rust, primary) β Tryorama (TypeScript) deprecated
- Client: @holochain/client ^0.20.0
- Package Management: Bun for dependency management and build orchestration
Zome Structure
| Zome | Purpose | Key Features |
|---|---|---|
zome_person | Agent identity & access control | Agent profiles & roles, capability-based security, private data sharing workflows, PPR integration & reputation tracking |
zome_resource | Pure data model | EconomicResource & EconomicEvent data structures, resource state management only, cross-zome interface for governance requests, no business logic |
zome_gouvernance | State transition operator | Governance rule evaluation, state transition validation, economic event generation, PPR issuance (16 categories), agent promotion & capability progression |
zome_group | Per-group coordination (cloned cell) | Group profiles, membership, work logs, soft links; one cloned cell per group; all_groups anchor; 13 #[hdk_extern] functions |
zome_lobby | Global group registry (provisioned Lobby DHT) | LobbyAgentProfile presence, GroupAnnouncement group registry; NDO announcements were removed in PR #107 (NDOs are group-scoped) |
Governance-as-Operator Architecture
Key Design Principles:
- Modular Design: Resource zome manages data, governance zome enforces rules
- Swappable Governance: Different governance schemes can be applied to same resources
- Pure Function Governance: Stateless evaluation with deterministic outputs
- Event-Driven State Changes: All transitions generate audit events
- Cross-Zome Interface: Well-defined communication protocol
Documentation:
- Governance Operator Architecture - Technical architecture and design patterns
- Governance Implementation Guide - Detailed implementation with code examples
- Cross-Zome API - Complete API specifications
Key Concepts
- π Capability-Based Security: Progressive trust model (Simple β Accountable β Primary Accountable Agent)
- π Private Participation Receipts (PPRs): Cryptographic reputation tracking across 16 categories
- π Economic Processes: Structured workflows (Use, Transport, Storage, Repair) with role-based access
- π‘οΈ Private Data Sharing: Request/grant workflows with field-level control and time-limited grants (30-day maximum per
PrivateDataCapabilityMetadata; shorter defaults may apply in UI flows β see person_zome.md)
π Core Documentation
Project Requirements
| Document | Description | Status |
|---|---|---|
| Requirements | Complete PRD with modular governance architecture | β Complete |
| NDO Prima Materia | NDO v1.0 normative requirements (REQ-NDO-*, capability slots, Unyt/Flowsta integration, three-layer model) | β Active |
| Agent Ontology | Agent types, affiliation spectrum, identity model, OVN forward map | β Active |
| Resources Ontology | Resource types, property regimes, governance model, OVN forward map | β Active |
| Governance Ontology | Governance architecture, OVN patterns, governance equation, forward map | β Active |
| UI Design | User interface design specifications (source of truth for UI conflicts) | β Complete |
Architecture & Roadmap
| Document | Description | Status |
|---|---|---|
| NDO v1.0 Architecture Design | Dual-DNA architecture, VF 1.0 class mapping, entry type specs, ADRs, migration notes | β Active |
| Lobby DNA Architecture | Original design: Lobby + Group DNAs, NDO extensions, entry types, coordinator APIs, Moss contract, 7 ADRs | β οΈ Superseded in part β Lobby (#103) and Group (#107) DNAs shipped with the registry model inverted (Lobby registers groups, not NDOs); zomes/lobby_zome.md and zomes/group_zome.md are authoritative |
| hREA Integration Strategy | Cross-DNA call architecture, zome-level integration pattern, migration plan | β Active |
| hREA VF 1.0 Compliance Analysis | Field-by-field audit of hREA main-0.6 against VF 1.0 ontology (~65% compliance) | β Active |
| hREA Strategic Roadmap | Phase 1+2 maintainership proposal: VF 1.0 gap closure and JSON-LD API | β Active |
Technical Specifications
| Document | Description | Status |
|---|---|---|
| Technical Specifications | Detailed data structures, zome functions, cross-zome interfaces | β Complete |
| ADR-010β¦013 β Per-NDO cells | One cloned cell per NDO, group NdoAnchor discovery, DnaHash bound to Layer 0 via DNA properties | β Active |
| Architecture Overview | Comprehensive system architecture & cross-zome integration | β Complete |
| Governance Operator Architecture | Technical architecture for modular governance design | β Complete |
| Governance Implementation Guide | Detailed implementation guide with code examples | β Complete |
| Cross-Zome API | Complete API specifications for zome communication | β Complete |
| PPR Security Implementation | Security model for reputation system | β Complete |
| Private Participation Receipts | PPR system full specification | β Complete |
| Governance Model (Legacy) | Legacy governance model and decision-making processes | π¦ Reference |
| UI Architecture | Frontend design patterns & component structure | β Complete |
| ValueFlows Action Usage | ValueFlows implementation with governance examples | β Complete |
| Protocol Bridge Specifications | Bun Protocol Bridge architecture for platform integration (Tiki, Odoo) | β Complete |
| API Reference | Complete function reference across all zomes | β Complete |
| Implementation Plan | Development roadmap & phase breakdown | β Complete |
| Implementation Status | Current development progress & completion status | β Current |
Post-MVP Requirements
| Document | Description | Status |
|---|---|---|
| Lobby DNA Requirements | Multi-network federation: Lobby DNA, Group DNA, NDO extensions (REQ-LOBBY-, REQ-GROUP-, REQ-NDO-EXT-*) | β Lobby + Group DNAs shipped (#103, #107); NDO-level extensions in progress (#112) |
| Unyt Integration | Economic settlement, Smart Agreements, RAVE proofs, PPRβRAVE provenance | π Post-MVP |
| Flowsta Integration | Cross-app identity (IsSamePersonEntry, FlowstaIdentity, DID, key recovery) | π Post-MVP |
| NDO Versioning | DAG-based version graph, fork/merge/repair relations, contribution propagation | π Post-MVP |
| Digital Resource Integrity | Cryptographic integrity verification, Merkle tree, composable architecture | π Post-MVP |
| Many-to-Many Flows | Multi-custodian custody, shared ownership, resource pools | π Post-MVP |
| Resource Transport Flow Protocol | Resource transport specifications | π Post-MVP |
| ValueFlows DSL | Domain-specific language for governance rule authoring | π Post-MVP |
| Complete Resource Specification | Extended resource specification with full property model | π Post-MVP |
Testing & Infrastructure
| Document | Description | Status |
|---|---|---|
| Testing Infrastructure | Complete testing strategy & framework details | β Complete |
| Test Commands | Test execution commands & development tips | β Complete |
Applications & Use Cases
| Document | Description |
|---|---|
| Artcoin Integration | Artcoin mapped onto the NDO model (property regimes, roles, custody, PPRs) + implementation status |
| User Story β Artcoin | Art circulation & discovery via venues and individual art lovers |
| User Story β Art Distribution | Multi-venue exhibition tour: custody chain, transport & storage |
| User Story β Art Production | Collaborative art production with shared studio resources (REA edge) |
| User Story β ERP Bridge | ERP bridge integration scenario |
| User Story β Food Basket | Food basket sharing scenario |
| User Story β Material Peer Production | Material peer production scenario |
| User Story β Open Science | Open science commons scenario |
π§ API Documentation
Full reference: API Reference
Person Zome API
Core Identity & Access Management
create_person()- Create agent profile with discovery anchorsget_person()- Retrieve profile by hashget_all_persons()- Discover all agents via anchor traversalupdate_person()- Update profile with validationdelete_person()- Soft deletion with cleanup
Capability & Security
create_capability_token()- Issue capability tokens with role restrictionsget_agent_capability_level()- Query current trust levelpromote_agent_capability()- Advance trust based on PPR milestones
Private Data Sharing
request_private_data_access()- Request access to specific fieldsgrant_private_data_access()- Grant time-limited access (subject to 30-day maximum enforced in capability metadata)get_private_data()- Retrieve authorized private datarevoke_private_data_access()- Revoke granted permissions
Role Management
assign_role()- Assign roles with validation metadataget_agent_roles()- Query current role assignmentsvalidate_role_requirements()- Check role qualification status
Resource Zome API (Data Model Only)
Resource Specification Management
create_resource_specification()- Define resource types and propertiesget_resource_specification()- Retrieve specification detailsget_all_resource_specifications()- Discover all specificationsupdate_resource_specification()- Modify specifications with validation
Economic Resource Management
create_economic_resource()- Create resource instances with initial stateget_economic_resource()- Retrieve resource current state and historyget_economic_resource_with_state()- Retrieve resource with full state transitionsupdate_operational_state()- UpdateEconomicResource.operational_stateget_my_resources()- Discover resources where calling agent is custodianget_resources_by_specification()- Find resources conforming to specificationget_resources_by_operational_state()- Query resources by operational state
Cross-Zome State Transitions
request_resource_transition()- Request state change through governance evaluationbatch_state_transitions()- Process multiple state transitions efficiently
Governance Zome API (State Transition Operator)
State Transition Evaluation
evaluate_state_transition()- Evaluate governance rules for state changesget_applicable_rules()- Retrieve governance rules for resource/actionevaluate_rule()- Evaluate individual governance rulecheck_agent_permissions()- Verify agent has required permissionsget_agent_roles()- Retrieve agent's current role assignments
Economic Event Generation
generate_economic_event()- Create audit events for state transitionsvalidate_transition_chain()- Validate sequence of state changesget_transition_history()- Retrieve complete audit trail
Governance Rule Management
create_governance_rule()- Create new governance rulesupdate_governance_rule()- Modify existing rulesget_governance_rules()- Retrieve applicable rules
Legacy Commitment Management (PPR System)
create_commitment()- Create commitments with validation rulesget_commitment()- Retrieve commitment detailsfulfill_commitment()- Mark commitments as fulfilled
PPR System
issue_ppr()- Issue Private Participation Receipt (16 categories)get_ppr_summary()- Retrieve reputation summary across categoriesvalidate_ppr_eligibility()- Check qualification requirementsderive_reputation_score()- Calculate cryptographic reputation metrics
Multi-Reviewer Validation
create_validation_workflow()- Set up validation (2-of-3, N-of-M, simple_majority)submit_validation_review()- Submit validation assessmentscheck_validation_consensus()- Determine validation outcomes
Agent Promotion
evaluate_agent_promotion()- Assess readiness for capability advancementpromote_to_accountable_agent()- Promote based on transaction validationpromote_to_primary_accountable_agent()- Promote based on PPR milestones
π§ͺ Testing Infrastructure
Test Architecture
All new tests use Sweettest (Rust) in dnas/nondominium/tests/src/. Tryorama (TypeScript) tests in tests/ are deprecated.
# Prerequisites
bun run build:happ
# Run all tests
CARGO_TARGET_DIR=target/native-tests cargo test --package nondominium_sweettest
# Run a specific module
CARGO_TARGET_DIR=target/native-tests cargo test --package nondominium_sweettest --test person
# Verbose output
CARGO_TARGET_DIR=target/native-tests cargo test --package nondominium_sweettest -- --nocapture
Shared Setup Utilities
setup_two_agents()β two conductors with nondominium DNAsetup_three_agents()β three conductors with nondominium DNAsetup_dual_dna_two_agents()β two conductors with nondominium + hREA DNAs
Development Tips
- Use
warn!macro in Rust zome functions to log debugging information visible in test output - Use
#[ignore]on tests not yet ready for execution - DHT sync between agents:
await_consistency_20_s([&cell_a, &cell_b]).await.unwrap()(pass the array by value, not&[...])
π Implementation Status
β Phase 1 Complete: Foundation System
- Person Management: Agent profiles, roles, and basic capability tokens
- Identity System: Pseudonymous identity with public/private separation
- Basic Access Control: Role-based access with validation metadata
- hREA Bridge: Person/ReaAgent bridge for ValueFlows compliance
β MVP Complete: Advanced Governance & UI
- Capability-Based Sharing: Complete request/grant workflows with time-limited grants (30-day cap)
- PPR System: 16-category reputation tracking with cryptographic signatures
- Economic Processes: Four structured processes (Use, Transport, Storage, Repair)
- Multi-Reviewer Validation: 2-of-3, N-of-M, and simple majority validation
- Agent Promotion: Progressive trust model with automatic advancement
- NDO Layer 0:
NondominiumIdentitypermanent identity anchor with lifecycle transitions - MVP UI: Lobby β Group β NDO three-level hierarchy, NDO creation, lifecycle browser, fork friction modal
π Phase 2 (In Progress): Economic Processes & PPR Generation
- Economic processes (Use/Transport/Storage/Repair) backend
- PPR receipt generation from Commitment/Claim/Event cycles
- Governance-as-operator full implementation
- Agent promotion workflows
π Post-MVP
- Group DNA backend, NDO cell cloning
- PPR reputation UI
- Unyt/Flowsta integrations
- Collective agent types, affiliation spectrum
π Advanced Features
Private Participation Receipt (PPR) System
16 PPR Categories:
Genesis Roles (Network Entry):
- ResourceCreation - Recognition for successful resource contributions
- ResourceValidation - Credit for network validation activities
Core Usage Roles (Custodianship): 3. CustodyTransfer - Outgoing custodian recognition 4. CustodyAcceptance - Incoming custodian validation
Intermediate Roles (Specialized Services): 5. MaintenanceCommitmentAccepted - Maintenance agreement recognition 6. MaintenanceFulfillmentCompleted - Maintenance service completion 7. StorageCommitmentAccepted - Storage service agreement 8. StorageFulfillmentCompleted - Storage service completion 9. TransportCommitmentAccepted - Transport service agreement 10. TransportFulfillmentCompleted - Transport service completion 11. GoodFaithTransfer - Trust-based transfer recognition
Network Governance: 12. DisputeResolutionParticipation - Constructive conflict resolution 13. ValidationActivity - Ongoing validation duties 14. RuleCompliance - Consistent governance adherence
Resource End-of-Life: 15. EndOfLifeDeclaration - Responsible lifecycle management 16. EndOfLifeValidation - Expert validation services
Economic Processes with Role-Based Access
| Process | Description | Required Role | Key Features |
|---|---|---|---|
| Use | Resource utilization without ownership transfer | Accountable Agent | Time-limited access, usage tracking |
| Transport | Resource movement between locations | Primary Accountable Agent | Custody transfer, location tracking |
| Storage | Resource preservation and maintenance | Primary Accountable Agent | Location tracking, condition monitoring |
| Repair | Resource restoration and improvement | Primary Accountable Agent | Quality validation, cost tracking |
Progressive Trust Model
Simple Agent (member)
βββ General capability token
βββ Can create resources & make first transaction
βββ PPR eligibility: ResourceContribution upon validation
βββ Promotion: First validated transaction β Accountable Agent
Accountable Agent (stewardship)
βββ Restricted capability token
βββ Can access resources & validate others
βββ PPR eligibility: Service processes & validation
βββ Promotion: PPR milestones + role validation β Primary Agent
Primary Accountable Agent (coordination/governance)
βββ Full capability token
βββ Can hold custody & validate specialized roles
βββ PPR eligibility: All 16 categories
βββ Advanced: Dispute resolution & end-of-life validation
π External References
Technology Stack
- Holochain - Distributed application framework
- ValueFlows - Economic coordination ontology
- hREA - Holochain implementation of ValueFlows
- @holochain/client - UI client library
- Holochain Playground - Development tools
Development Tools
- hc CLI - Holochain development tool
- Svelte - Frontend framework
- Vite - Build tool and development server
π Development Notes
Code Patterns
- Entry Creation: All zomes follow consistent create/get/update/delete patterns
- Anchor Links: Discovery anchors for all major entry types
- Validation: Comprehensive validation with role-based access control
- Privacy: Public/private data separation with capability-based access
Testing Patterns
- Multi-Agent: All tests support 2+ distributed agents
- DHT Sync: Use
await_consistency_20_swith the timeout wrapper - Debug Support: Verbose logging with
warn!macro for Rust debugging - Isolation: Test isolation with proper cleanup between scenarios
Performance Considerations
- WASM Compilation: Rust zomes compiled to WASM for efficiency
- DHT Optimization: Efficient link traversal for discovery operations
- Validation Caching: Role and capability validation caching
- PPR System: Optimized reputation calculation with cryptographic proofs
π Document Maintenance
Last Updated: 2026-05-04 Maintainers: Development Team
Update Process
- Code changes β Update relevant API documentation
- Feature completion β Update implementation status
- Architecture changes β Update architecture overview
- Test additions β Update testing documentation