Part V: DNA (Autonomous & Governed Applications)
Part V covers DNA (vendor/dna and hale dna), Hale’s framework and runtime for building self-governing, auditable software systems where human operators and AI agents collaborate under compiler-enforced rules.
Infrastructure Architecture Behind the Metaphor
Section titled “Infrastructure Architecture Behind the Metaphor”DNA uses anatomical names for its components. Each component maps directly to a concrete piece of systems infrastructure:
| DNA Term | Concrete Software Component | Role |
|---|---|---|
Genome (dna/org/) |
Git repository + .hl source code |
Declares the application, workflow steps, roles, models, and constitutional laws. |
| Memory & Record | PostgreSQL (dna_<id> schema) + Git refs (refs/dna/*) |
Append-only event ledger, operational state projections, and Ed25519-signed evidence receipts. |
| Nerves | NATS JetStream (DNA_<ID> stream) |
Durable pub/sub event bus connecting the coordinator, application, workers, and health monitors. |
| Spine | Workflow engine (dna/org under hale dna run / dev) |
Evaluates task state machines, enforces LLM/compute budgets, and manages task leases. |
| Heart & Body | Supervised application (heart) + host supervisor (body) |
Runs the target application, streams app events over NATS, and deploys verified code changes. |
| Senses & Reflexes | Prometheus (senses) + recovery daemon (dna/reflexes) |
Scrapes metrics, triggers automatic instance.down restarts, and runs scheduled upstream watches. |
| Skin | Vault / ~/.cache/hale/vault + OIDC + violation handler |
Confines secrets in @sealed loci, authenticates operators, and records runtime closure violations. |
| Legs, Hands & Voice | Worker processes (hale dna work), sandboxed tools, LLM router |
Executes tasks in isolated Git worktrees using scoped tools (GitHand, GhForge, go_test) and LLMs. |
| Head & Face | Edge RPC API (dna/api) + Web UI (:8792) |
Serves the operator CLI/web dashboard, Board decision queue, 3-view code reviews, and GitHub PR sync. |
Chapters in Part V
Section titled “Chapters in Part V”| Section | Chapters |
|---|---|
| Overview & Walkthrough | Architecture of a DNA System · DNA Quickstart · End-to-End Task Lifecycle |
| Core Runtime Subsystems | Record & State Store (PostgreSQL & Git) · Workflow Coordinator (spine) · Event Broker (nerves / NATS JetStream) · Application Supervisor & Deployment (heart & body) · Telemetry, Health Reflexes & Upstream Watches (senses) · Secrets, Vault & Violation Absorption (skin) |
| Workers, UI & Governance | Worker Agents, Sandboxed Tools & LLM Routing (legs) · Recurring Schedules · Edge API, Web UI, Board & Reviews (head & face) · Governance, Positions, Grants & Packs |
| Customization & Reference | The dna::Dna Locus & Custom Topologies · DNA Engineering Standard · DNA Troubleshooting · DNA CLI & Schema Reference |