Commit Graph

15 Commits

Author SHA1 Message Date
anthonyrawlins
c5b7311a8b docs: Add Phase 3 coordination and infrastructure documentation
Comprehensive documentation for coordination, messaging, discovery, and internal systems.

Core Coordination Packages:
- pkg/election - Democratic leader election (uptime-based, heartbeat mechanism, SLURP integration)
- pkg/coordination - Meta-coordination with dependency detection (4 built-in rules)
- coordinator/ - Task orchestration and assignment (AI-powered scoring)
- discovery/ - mDNS peer discovery (automatic LAN detection)

Messaging & P2P Infrastructure:
- pubsub/ - GossipSub messaging (31 message types, role-based topics, HMMM integration)
- p2p/ - libp2p networking (DHT modes, connection management, security)

Monitoring & Health:
- pkg/metrics - Prometheus metrics (80+ metrics across 12 categories)
- pkg/health - Health monitoring (4 HTTP endpoints, enhanced checks, graceful degradation)

Internal Systems:
- internal/licensing - License validation (KACHING integration, cluster leases, fail-closed)
- internal/hapui - Human Agent Portal UI (9 commands, HMMM wizard, UCXL browser, decision voting)
- internal/backbeat - P2P operation telemetry (6 phases, beat synchronization, health reporting)

Documentation Statistics (Phase 3):
- 10 packages documented (~18,000 lines)
- 31 PubSub message types cataloged
- 80+ Prometheus metrics documented
- Complete API references with examples
- Integration patterns and best practices

Key Features Documented:
- Election: 5 triggers, candidate scoring (5 weighted components), stability windows
- Coordination: AI-powered dependency detection, cross-repo sessions, escalation handling
- PubSub: Topic patterns, message envelopes, SHHH redaction, Hypercore logging
- Metrics: All metric types with labels, Prometheus scrape config, alert rules
- Health: Liveness vs readiness, critical checks, Kubernetes integration
- Licensing: Grace periods, circuit breaker, cluster lease management
- HAP UI: Interactive terminal commands, HMMM composition wizard, web interface (beta)
- BACKBEAT: 6-phase operation tracking, beat budget estimation, drift detection

Implementation Status Marked:
-  Production: Election, metrics, health, licensing, pubsub, p2p, discovery, coordinator
- 🔶 Beta: HAP web interface, BACKBEAT telemetry, advanced coordination
- 🔷 Alpha: SLURP election scoring
- ⚠️ Experimental: Meta-coordination, AI-powered dependency detection

Progress: 22/62 files complete (35%)

Next Phase: AI providers, SLURP system, API layer, reasoning engine

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-30 18:27:39 +10:00
anthonyrawlins
f9c0395e03 docs: Add Phase 2 core package documentation (Execution, Config, Runtime, Security)
Comprehensive documentation for 7 critical packages covering execution engine,
configuration management, runtime infrastructure, and security layers.

Package Documentation Added:
- pkg/execution - Complete task execution engine API (Docker sandboxing, image selection)
- pkg/config - Configuration management (80+ env vars, dynamic assignments, SIGHUP reload)
- internal/runtime - Shared P2P runtime (initialization, lifecycle, agent mode)
- pkg/dht - Distributed hash table (LibP2P DHT, encrypted storage, bootstrap)
- pkg/crypto - Cryptography (age encryption, key derivation, secure random)
- pkg/ucxl - UCXL validation (decision publishing, content addressing, immutable audit)
- pkg/shhh - Secrets management (sentinel, pattern matching, redaction, audit logging)

Documentation Statistics (Phase 2):
- 7 package files created (~12,000 lines total)
- Complete API reference for all exported symbols
- Line-by-line source code analysis
- 30+ usage examples across packages
- Implementation status tracking (Production/Beta/Alpha/TODO)
- Cross-references to 20+ related documents

Key Features Documented:
- Docker Exec API usage (not SSH) for sandboxed execution
- 4-tier language detection priority system
- RuntimeConfig vs static Config with merge semantics
- SIGHUP signal handling for dynamic reconfiguration
- Graceful shutdown with dependency ordering
- Age encryption integration (filippo.io/age)
- DHT cache management and cleanup
- UCXL address format (ucxl://) and decision schema
- SHHH pattern matching and severity levels
- Bootstrap peer priority (assignment > config > env)
- Join stagger for thundering herd prevention

Progress Tracking:
- PROGRESS.md added with detailed completion status
- Phase 1: 5 files complete (Foundation)
- Phase 2: 7 files complete (Core Packages)
- Total: 12 files, ~16,000 lines documented
- Overall: 15% complete (12/62 planned files)

Next Phase: Coordination & AI packages (pkg/slurp, pkg/election, pkg/ai, pkg/providers)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-30 18:08:59 +10:00
anthonyrawlins
bd19709b31 docs: Add comprehensive documentation foundation (Phase 1: Architecture & Commands)
Created complete documentation infrastructure with master index and detailed
command-line tool documentation.

Documentation Structure:
- docs/comprehensive/README.md - Master index with navigation
- docs/comprehensive/architecture/README.md - System architecture overview
- docs/comprehensive/commands/chorus-agent.md - Autonomous agent binary ( Production)
- docs/comprehensive/commands/chorus-hap.md - Human Agent Portal (🔶 Beta)
- docs/comprehensive/commands/chorus.md - Deprecated wrapper (⚠️ Deprecated)

Coverage Statistics:
- 3 command binaries fully documented (3,056 lines, ~14,500 words)
- Complete source code analysis with line numbers
- Configuration reference for all environment variables
- Runtime behavior and execution flows
- P2P networking details
- Health checks and monitoring
- Example deployments (local, Docker, Swarm)
- Troubleshooting guides
- Cross-references between docs

Key Features Documented:
- Container-first architecture
- P2P mesh networking
- Democratic leader election
- Docker sandbox execution
- HMMM collaborative reasoning
- UCXL decision publishing
- DHT encrypted storage
- Multi-layer security
- Human-agent collaboration

Implementation Status Tracking:
-  Production features marked
- 🔶 Beta features identified
-  Stubbed components noted
- ⚠️ Deprecated code flagged

Next Phase: Package documentation (30+ packages in pkg/)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-30 13:49:46 +10:00
anthonyrawlins
e8d95b3655 feat(execution): Add Docker Hub image support and comprehensive documentation
- Updated ImageRegistry to use public Docker Hub (anthonyrawlins namespace)
- Modified image naming: chorus-base, chorus-rust-dev, chorus-go-dev, etc.
- Added Docker Hub URLs and actual image sizes to metadata
- Created comprehensive TaskExecutionEngine.md documentation covering:
  * Complete architecture and implementation details
  * Security isolation layers and threat mitigation
  * Performance characteristics and benchmarks
  * Real-world examples with resource usage metrics
  * Troubleshooting guide and FAQ
  * Comparisons with alternative approaches (SSH, VMs, native)

Images now publicly available at docker.io/anthonyrawlins/chorus-*

🤖 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-30 13:26:31 +10:00
anthonyrawlins
ae021b47b9 feat: wire context store scaffolding and dht test skeleton 2025-09-28 14:21:38 +10:00
anthonyrawlins
b0b1265c08 chore: hook temporal persistence to dht 2025-09-28 13:45:43 +10:00
anthonyrawlins
2ff408729c Fix temporal persistence wiring and restore slurp_full suite 2025-09-28 11:39:03 +10:00
anthonyrawlins
4a77862289 chore: align slurp config and scaffolding 2025-09-27 21:03:12 +10:00
anthonyrawlins
0b670a535d Wire SLURP persistence and add restart coverage 2025-09-27 15:26:25 +10:00
anthonyrawlins
9fc9a2e3a2 docs: Add comprehensive implementation roadmap to task execution engine plan
- Add detailed phase-by-phase implementation strategy
- Define semantic versioning and Git workflow standards
- Specify quality gates and testing requirements
- Include risk mitigation and deployment strategies
- Provide clear deliverables and timelines for each phase
2025-09-25 10:40:30 +10:00
anthonyrawlins
1bb736c09a Harden CHORUS security and messaging stack 2025-09-20 23:21:35 +10:00
966225c3e2 Add CHORUS/WHOOSH roadmap 2025-09-20 03:01:27 +00:00
anthonyrawlins
aea4d45fd8 Implement Phase 2 & 3: Complete HAP Terminal Interface with Patch Management
🎭 Phase 2: HAP Terminal Interface Implementation
 **Core Terminal Interface**: Interactive command-driven HAP terminal with help system
 **HMMM Message Composition System**:
   - New reasoning messages, thread replies, network queries, decision proposals
   - Complete message metadata handling (topics, threads, timestamps)
 **UCXL Context Browsing System**:
   - Address parsing, content retrieval from DHT encrypted storage
   - Search functionality, content creation, history navigation
 **Decision Participation System**:
   - Active decision listing, decision details with voting status
   - Vote casting with reasoning, decision proposals, HMMM integration

🔧 Phase 3: Enhanced Human Workflows
 **Patch Creation and Submission Workflows**:
   - Complete patch lifecycle management (create, review, submit, track)
   - Multiple patch types (context, code, config, docs)
   - UCXL integration with DHT storage, HMMM coordination
 **Time-Travel Diff Support**:
   - Temporal navigation operators (~~<n>, ^^<n>, @<time>)
   - Decision-hop analysis, visual diff display, version comparison

🏗️ **Architecture Highlights**:
- **Multi-binary structure**: Separate chorus-agent and chorus-hap binaries
- **Shared P2P runtime**: Both binaries use identical libp2p, DHT, HMMM, UCXL systems
- **Interactive sub-shells**: Dedicated command environments for HMMM, UCXL, patches, decisions
- **Network integration**: All features connect to distributed P2P agent network
- **Human-agent parity**: Humans participate as first-class network citizens

📦 **New Files**:
- internal/hapui/terminal.go: Complete HAP terminal interface (2400+ lines)
- prompts/human-roles.yaml: Role-based prompt configuration
- docs/decisions/*: HAP conversion decision record

🔗 **Integration Points**:
- HMMM: Collaborative reasoning and patch/decision announcements
- UCXL: Context addressing and version management
- DHT: Distributed storage of patches and content
- Decision System: Formal approval and consensus workflows

The HAP terminal interface now provides comprehensive human portal into the CHORUS
autonomous agent network, enabling collaborative reasoning, context sharing, patch
management, and distributed decision-making between humans and AI agents.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-07 09:38:14 +10:00
anthonyrawlins
a784398a10 docs: DR for prompt sourcing & composition (S + D) with BACKBEAT 2025-09-06 15:44:41 +10:00
anthonyrawlins
f866d11bd7 docs: add DR for CHORUS refactor 2025-09-06 14:49:43 +10:00