Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e4b567f
docs: reorganize documentation with Sigil format for LLM agents
claude Jan 20, 2026
1dc0fa7
fix(security): implement cryptographic API key hashing and signature …
claude Jan 20, 2026
9c436b5
build: update Arcanum dependencies to crates.io v0.1
claude Jan 26, 2026
55ac18e
fix(ci): update dependencies and fix clippy/fmt issues
claude Jan 26, 2026
7764c8b
fix: update to Arcanum 0.1.2 and fix BlockHash.as_bytes() call
claude Jan 26, 2026
72b530f
fix: update API usage in tests and examples for Arcanum 0.1.2
claude Jan 26, 2026
6ec1109
fix: resolve all compiler warnings for clean build
claude Jan 26, 2026
b3d6b26
fix: resolve clippy warnings and formatting issues for CI
paraphilic-ecchymosis Jan 26, 2026
bdd4cef
fix: resolve all clippy warnings for CI with -D warnings
claude Jan 27, 2026
21f85c4
docs: add spec gap analysis for dead_code audit
claude Jan 28, 2026
d0f07b4
docs: add comprehensive master specification document
claude Jan 28, 2026
e722078
docs: add comprehensive supporting documentation
claude Jan 28, 2026
34bc97f
spec: add comprehensive agent accountability specification
claude Jan 28, 2026
cd2358a
spec: add TDD roadmap for agent accountability implementation
claude Jan 28, 2026
21fcaf4
feat(agent): implement Phase 1 causality chain types
claude Jan 28, 2026
234c062
feat(agent): implement Phase 2 agent identity attestation
claude Jan 28, 2026
324970f
feat(agent): implement Phase 3 capability model
claude Jan 28, 2026
02072ce
fix(agent): address code review issues
claude Jan 28, 2026
b81a06b
feat(agent): implement Phase 4 Human-in-the-Loop protocol
claude Jan 28, 2026
f98260c
feat(agent): implement Phase 5 Reasoning Traces
claude Jan 28, 2026
df90978
feat(agent): implement Phase 6 outcome verification
claude Jan 28, 2026
b3a214d
feat(agent): implement Phase 7 emergency controls
claude Jan 28, 2026
b44d535
feat(agent): implement Phase 8 multi-agent coordination
claude Jan 28, 2026
15ac462
feat(agent): add Phase 9 integration tests
claude Jan 28, 2026
fad960a
docs: add agent accountability remediation roadmap
claude Jan 29, 2026
9d06334
docs: update README with agent accountability and current metrics
claude Feb 2, 2026
0843413
fix(ci): resolve all pipeline failures
claude Feb 3, 2026
1a79462
fix(ci): use is_empty() instead of len() == 0 in concurrent mempool test
claude Feb 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7,043 changes: 7,043 additions & 0 deletions Cargo.lock

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,17 @@ members = [
"moloch-anchor-bitcoin",
"moloch-anchor-ethereum",
"moloch-bench",
"examples",
]

[workspace.package]
version = "0.1.0"
edition = "2021"
authors = ["Daemoniorum LLC"]
license = "MIT"
repository = "https://github.com/Daemoniorum-LLC/workspace"
repository = "https://github.com/Daemoniorum-LLC/moloch"
keywords = ["audit", "blockchain", "cryptography", "merkle", "zk-proofs"]
categories = ["cryptography", "data-structures"]

[workspace.dependencies]
# Core
Expand All @@ -39,8 +42,8 @@ bincode = "1.3"
rkyv = { version = "0.8" }

# Crypto - using Arcanum primitives with SIMD-accelerated native backend
arcanum-hash = { path = "../arcanum/crates/arcanum-hash", default-features = false, features = ["std", "backend-native", "blake3"] }
arcanum-signatures = { path = "../arcanum/crates/arcanum-signatures", default-features = false, features = ["ed25519", "batch"] }
arcanum-hash = { version = "0.1", default-features = false, features = ["std", "backend-native", "blake3"] }
arcanum-signatures = { version = "0.1", default-features = false, features = ["ed25519", "batch"] }
rayon = "1.10"
rand = "0.8"
hex = "0.4"
Expand All @@ -61,6 +64,7 @@ memmap2 = "0.9"

# Time
chrono = { version = "0.4", features = ["serde"] }
chrono-tz = "0.10"

# Logging
tracing = "0.1"
Expand Down
64 changes: 61 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Moloch

Cryptographic audit chain with post-quantum encryption, zero-knowledge proofs, and cross-chain anchoring.
Cryptographic audit chain with post-quantum encryption, zero-knowledge proofs, cross-chain anchoring, and autonomous agent accountability.

**~48,700 lines of Rust** across 16 crates and 113 source files. **361 tests** (348 unit + 13 integration).

See [BENCHMARK_REPORT.md](BENCHMARK_REPORT.md) for performance data.

Expand All @@ -12,12 +14,35 @@ See [BENCHMARK_REPORT.md](BENCHMARK_REPORT.md) for performance data.
- **Selective Field Encryption** - HoloCrypt encrypts sensitive fields while keeping structure visible
- **Threshold Encryption** - k-of-n decryption schemes
- **Cross-Chain Anchoring** - Anchor roots to Bitcoin (OP_RETURN) and Ethereum (calldata)
- **Agent Accountability** - Cryptographically-enforced autonomous agent governance (see below)

## Agent Accountability

Moloch includes a comprehensive agent accountability framework for governing autonomous AI agent actions through cryptographic guarantees rather than trust assumptions.

**12 modules, ~10,750 lines, 242 tests (229 unit + 13 integration)**

| Module | Purpose |
|--------|---------|
| **Causality** | Lamport clocks and causal context chains linking every agent action to its cause |
| **Principal** | Cryptographic agent identity bound to Ed25519 key pairs |
| **Attestation** | Signed, timestamped claims with expiry and revocation support |
| **Capability** | Scoped, delegatable, time-bounded permission tokens signed by grantors |
| **Human-in-the-Loop** | Structured approval workflows with configurable policies (unanimous, threshold, any) |
| **Reasoning** | Immutable reasoning traces capturing agent decision-making with constraint references |
| **Outcome** | Post-execution outcome recording with severity-tiered evidence requirements |
| **Emergency** | Circuit breaker and kill switch controls for immediate agent shutdown |
| **Coordination** | Multi-agent commit protocols with Byzantine fault detection |

Each module enforces its invariants cryptographically: capabilities are signed tokens that expire, attestations carry verifiable signatures, and outcomes require evidence proportional to impact severity.

The implementation follows the [Agent Accountability Specification](docs/specs/AGENT_ACCOUNTABILITY.md) and was built under a strict [TDD roadmap](docs/specs/AGENT_ACCOUNTABILITY_TDD.md). A [remediation roadmap](docs/developer/AGENT_ACCOUNTABILITY_REMEDIATION.md) documents known gaps and planned hardening work.

## Architecture

```
moloch/
├── moloch-core # Core types: Event, Block, signatures
├── moloch-core # Core types: Event, Block, signatures, agent accountability
├── moloch-mmr # Merkle Mountain Range accumulator
├── moloch-chain # Block chain management
├── moloch-storage # RocksDB + mmap storage layer
Expand Down Expand Up @@ -192,6 +217,39 @@ The `moloch-api` crate provides:
- JWT and API key authentication
- Rate limiting and audit logging

## Documentation

```
docs/
├── MASTER_SPECIFICATION.md # Full system specification
├── INDEX.md # Documentation index
├── specs/ # Formal specifications
│ ├── AGENT_ACCOUNTABILITY.md # Agent accountability spec
│ └── AGENT_ACCOUNTABILITY_TDD.md # TDD implementation roadmap
├── developer/ # Developer documentation
│ ├── quickstart.md # Getting started guide
│ ├── architecture.md # System design
│ ├── api.md # REST/WebSocket API reference
│ ├── security.md # Security considerations
│ ├── configuration.md # Configuration reference
│ ├── deployment.md # Deployment guide
│ ├── operations.md # Operations guide
│ ├── OSS_RELEASE_ROADMAP.md # Release roadmap
│ ├── SPEC_GAPS.md # Specification gap analysis
│ └── AGENT_ACCOUNTABILITY_REMEDIATION.md # Remediation roadmap
├── diagrams/ # Architecture diagrams
│ ├── anchoring-sequence.md
│ ├── consensus-sequence.md
│ ├── data-flow.md
│ └── sync-sequence.md
├── llm/ # Agent-optimized docs (Sigil format)
│ ├── quickstart.sigil
│ ├── architecture.sigil
│ ├── api.sigil
│ └── security.sigil
└── archive/ # Historical documents
```

## License

MIT License - see [LICENSE](LICENSE)
Expand All @@ -202,7 +260,7 @@ See [SECURITY.md](SECURITY.md) for vulnerability reporting.

## Contributing

See contributing guidelines before submitting PRs.
See [CONTRIBUTING.md](CONTRIBUTING.md) before submitting PRs.

## Related Projects

Expand Down
127 changes: 127 additions & 0 deletions docs/INDEX.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# Moloch Documentation Index

Complete index of all documentation for the Moloch cryptographic audit chain.

## Documentation Map

```
moloch/
├── README.md # Project overview
├── CONTRIBUTING.md # Contribution guidelines
├── SECURITY.md # Security policy & vulnerability reporting
├── CHANGELOG.md # Version history
├── BENCHMARK_REPORT.md # Performance benchmarks
└── docs/
├── INDEX.md # This file
├── MASTER_SPECIFICATION.md # Complete system specification
├── developer/ # Developer documentation
│ ├── quickstart.md # Getting started guide
│ ├── architecture.md # System architecture & diagrams
│ ├── api.md # REST/WebSocket API reference
│ ├── security.md # Security model & threat analysis
│ ├── SPEC_GAPS.md # Specification gap analysis
│ ├── OSS_RELEASE_ROADMAP.md # Release planning
│ ├── deployment.md # Deployment guide
│ ├── operations.md # Operations & monitoring
│ └── configuration.md # Configuration reference
├── diagrams/ # Architecture diagrams
│ ├── data-flow.md # Data flow diagrams
│ ├── consensus-sequence.md # Consensus protocol sequence
│ ├── sync-sequence.md # Sync protocol sequence
│ └── anchoring-sequence.md # Anchoring protocol sequence
├── llm/ # Agent-optimized documentation
│ ├── quickstart.sigil
│ ├── architecture.sigil
│ ├── api.sigil
│ └── security.sigil
└── archive/ # Historical documents
├── ROADMAP.md
└── AGENT_QUICKSTART_v1.md
```

## Document Categories

### Core Documentation

| Document | Path | Description | Status |
|----------|------|-------------|--------|
| Master Specification | `docs/MASTER_SPECIFICATION.md` | Complete system specification | Complete |
| README | `README.md` | Project overview and quick start | Complete |
| Architecture | `docs/developer/architecture.md` | System design with diagrams | Complete |
| API Reference | `docs/developer/api.md` | REST/WebSocket API | Complete |
| Security | `docs/developer/security.md` | Security model | Complete |
| Quickstart | `docs/developer/quickstart.md` | Getting started guide | Complete |

### Operational Documentation

| Document | Path | Description | Status |
|----------|------|-------------|--------|
| Deployment Guide | `docs/developer/deployment.md` | Production deployment | New |
| Operations Guide | `docs/developer/operations.md` | Running and monitoring | New |
| Configuration Reference | `docs/developer/configuration.md` | All config options | New |

### Architecture Diagrams

| Document | Path | Description | Status |
|----------|------|-------------|--------|
| Data Flow | `docs/diagrams/data-flow.md` | Event lifecycle diagrams | New |
| Consensus Sequence | `docs/diagrams/consensus-sequence.md` | Block production protocol | New |
| Sync Sequence | `docs/diagrams/sync-sequence.md` | Node synchronization | New |
| Anchoring Sequence | `docs/diagrams/anchoring-sequence.md` | External anchoring flow | New |

### Planning & Process

| Document | Path | Description | Status |
|----------|------|-------------|--------|
| Spec Gaps | `docs/developer/SPEC_GAPS.md` | Dead code gap analysis | Complete |
| Release Roadmap | `docs/developer/OSS_RELEASE_ROADMAP.md` | OSS release planning | Complete |
| Benchmarks | `BENCHMARK_REPORT.md` | Performance data | Complete |

## Quick Links by Role

### For New Developers
1. [README](../README.md) - Project overview
2. [Quickstart](developer/quickstart.md) - Build and run
3. [Architecture](developer/architecture.md) - System design

### For API Consumers
1. [API Reference](developer/api.md) - REST/WebSocket endpoints
2. [Quickstart](developer/quickstart.md) - SDK examples

### For Operators
1. [Deployment Guide](developer/deployment.md) - Production setup
2. [Operations Guide](developer/operations.md) - Monitoring & maintenance
3. [Configuration Reference](developer/configuration.md) - Config options

### For Contributors
1. [CONTRIBUTING](../CONTRIBUTING.md) - Contribution guidelines
2. [Master Specification](MASTER_SPECIFICATION.md) - Complete spec
3. [Spec Gaps](developer/SPEC_GAPS.md) - Areas needing work

### For Security Auditors
1. [Security](developer/security.md) - Threat model
2. [SECURITY](../SECURITY.md) - Vulnerability reporting
3. [Master Specification](MASTER_SPECIFICATION.md) - Cryptographic specs

## Document Standards

### Markdown Conventions
- GitHub-flavored Markdown
- ASCII diagrams for inline visualization
- Code blocks with language annotations
- Tables for structured data

### Diagram Standards
- Mermaid syntax for sequence diagrams (when GitHub renders)
- ASCII art for maximum compatibility
- Include text descriptions for accessibility

### Update Policy
- Specs updated before implementation (SDD methodology)
- Tests written after spec approval (Agent-TDD)
- Diagrams updated with architecture changes
Loading