Updated: 2026-03-31
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).
- 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
nix develop # Enter reproducible environment (REQUIRED)
bun install # Install dependenciesKey Documentation:
- 📋 Main README - Complete project overview & setup guide
- 🔧 Development Environment - Development patterns & commands
# Development
bun run start # Start 2-agent development network with UIs
AGENTS=3 bun run network # Custom agent network
# Testing
bun run tests # Full test suite
bun run test:foundation # Basic connectivity tests
bun run test:integration # Multi-agent interaction tests
bun run test:scenarios # Complete workflow simulations
bun run test:person # Person management test suite
bun run test:debug # Verbose test output for debugging
# Build
bun run build:zomes # Compile Rust zomes to WASM
bun run build:happ # Package DNA into .happ bundle
bun run package # Create final .webhapp distributionnondominium 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: Svelte 5.0 + TypeScript + Vite 6.2.5
- Testing: Vitest 3.1.3 + @holochain/tryorama 0.18.2
- Client: @holochain/client 0.19.0
- Package Management: Bun for dependency management and build orchestration
| 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 |
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
- 🔐 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)
| Document | Description | Status |
|---|---|---|
| Requirements | Complete PRD with modular governance architecture | ✅ Complete |
| UI Architecture | Frontend design patterns & component structure | ✅ Complete |
| UI Design | User interface design specifications | ✅ Complete |
| PPR Security Implementation | Security model for reputation system | ✅ Complete |
| ValueFlows Action Usage | ValueFlows implementation with governance examples | ✅ Complete |
| Lobby DNA Requirements | Multi-network federation: Lobby DNA, Group DNA, NDO extensions (REQ-LOBBY-, REQ-GROUP-, REQ-NDO-EXT-*) | 🔄 Post-MVP |
| 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 | Full design: Lobby + Group DNAs, NDO extensions, entry types, coordinator APIs, pipelines, UI, Moss contract, 7 ADRs | 🔄 Post-MVP |
| 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 |
| Document | Description | Status |
|---|---|---|
| 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 |
| Implementation Plan | Development roadmap & phase breakdown | ✅ Complete |
| Implementation Status | Current development progress & completion status | ✅ Complete |
| Document | Description | Status |
|---|---|---|
| Testing Infrastructure | Complete testing strategy & framework details | ✅ Complete |
| Test Commands | Test execution commands & development tips | ✅ Complete |
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 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_economic_resource_state()- Update resource state (requires governance approval)get_my_resources()- Discover resources where calling agent is custodianget_resources_by_specification()- Find resources conforming to specificationget_resources_by_state()- Query resources by current state
Cross-Zome State Transitions
request_resource_transition()- Request state change through governance evaluationbatch_state_transitions()- Process multiple state transitions efficiently
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
- Foundation Tests - Basic zome function calls and connectivity
- Integration Tests - Cross-zome interactions and multi-agent scenarios
- Scenario Tests - Complete user journeys and workflows
- Performance Tests - Load and stress testing (planned)
# Run specific test categories
bun run test:foundation # Basic connectivity tests
bun run test:integration # Multi-agent interaction tests
bun run test:scenarios # Complete workflow simulations
# Development testing
bun run test:person # Person management test suite
bun run test:debug # Verbose test output for debugging- Use
.only()ondescribeoritblocks for focused development - Use
warn!macro in Rust for debugging visibility in test output - Test timeout: 4 minutes for complex multi-agent scenarios
- 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
- Test Infrastructure: Comprehensive testing framework with Tryorama
- Capability-Based Sharing: Complete request/grant workflows with time-limited grants (30-day cap; see person zome docs)
- 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
- Enhanced Security: Field-level private data control with Economic Process integration
- Complete PPR System: 16-category reputation tracking with cryptographic validation
- Full Frontend Implementation: Svelte 5 with comprehensive UI components
- Advanced Governance: Multi-party validation and dispute resolution
- Performance Optimization: Load testing and efficient DHT operations
- Comprehensive Testing: 4-layer testing strategy with 95%+ coverage
- Production Deployment: Complete packaging and distribution 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
| 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 |
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
- Holochain - Distributed application framework
- ValueFlows - Economic coordination ontology
- NPM Workspaces - Monorepo management
- @holochain/tryorama - Testing framework
- Holochain Playground - Development tools
- hc CLI - Holochain development tool
- @holochain/client - UI client library
- Svelte - Frontend framework
- Vite - Build tool and development server
- 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
- Multi-Agent: All tests support 2+ distributed agents
- Timeout Management: 4-minute timeout for complex scenarios
- Debug Support: Verbose logging with
warn!macro for Rust debugging - Isolation: Test isolation with proper cleanup between scenarios
- 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
Last Updated: 2025-12-17 Next Review: 2026-01-17 Maintainers: Development Team
- Code changes → Update relevant API documentation
- Feature completion → Update implementation status
- Architecture changes → Update architecture overview
- Test additions → Update testing documentation
- ✅ All documentation reviewed and approved
- ✅ Cross-references validated and functional
- ✅ API documentation matches implementation
- ✅ Status tracking reflects actual development progress