How darknorthaco/ddframework works
DDFramework is a transport-agnostic engine for governed rituals, append-only records, read-only advisory analysis, and simulation. The principal workflow is operator invocation of a ritual or audit: the executor checks and records ledger state; GHOST reads validated state, evaluates rules, and writes a separate advisory stream. The Constitutional Agent Shell is a documented application layer that consumes the kernel. Simulation provides read-only what-if analyses. Edges reflect excerpts, SOURCE INDEX references, or README statements; some executor and application links remain unverified because their call sites were not shown.
Main entry points: _sim_cli.py Simulation CLI · advisor.py Advisor orchestration · __init__.py Advisor rules · rituals.rs Shell rituals
Components 25
Ritual execution
- ddf-exec CLI
ddf-exec-core/src/main.rs
Ledger integrity
- Ledger engine
ddf-exec-core/src/ledger.rs - Canonical JSON
ddf-exec-core/src/canonical.rs - SHA-256
ddf-exec-core/src/sha256.rs - Timestamps
ddf-exec-core/src/timestamp.rs - Ledger reader
ghost-observer/ghost/reader.py
GHOST advising
- Advisor orchestration
ghost-observer/ghost/advisor.py - Advisor data model
ghost-observer/ghost/model.py - Advisor rules
ghost-observer/ghost/rules/__init__.py - Binary staleness
ghost-observer/ghost/rules/r003_binary_stale.py - Waiver expiry
ghost-observer/ghost/rules/r004_waiver_expiring.py - Ledger staleness
ghost-observer/ghost/rules/r007_ledger_staleness.py - Advisory writer
ghost-observer/ghost/advisory_writer.py
Simulation
- Simulation CLI
ddf-core/ddf_py/ddf/_sim_cli.py - Doctrine diff
ddf-core/simulation/doctrine_diff.py - Ritual dry run
ddf-core/simulation/ritual_dryrun.py - Ledger replay
ddf-core/simulation/ledger_replay.py - Advisory replay
ddf-core/simulation/advisory_replay.py - Drift simulation
ddf-core/simulation/drift_simulation.py
Agent shell
- Shell CLI
AO/crates/ca-shell/src/main.rs - Shell rituals
AO/crates/ca-shell/src/rituals.rs - Shell configuration
AO/crates/ca-shell/src/config.rs - Kernel adapter
AO/crates/ca-shell/src/kernel.rs - Shell ledger records
AO/crates/ca-shell/src/ledger_record.rs
Other components
- Operator
Connections 26
- Operator → ddf-exec CLI: invokes rituals
README.md - ddf-exec CLI → Ledger engine: uses ledger
- Ledger engine → Canonical JSON: canonicalizes entries
ddf-exec-core/src/ledger.rs - Ledger engine → SHA-256: hashes entries
ddf-exec-core/src/ledger.rs - Canonical JSON → SHA-256: computes hashes
ddf-exec-core/src/canonical.rs - ddf-exec CLI → Timestamps: uses timestamps
- Operator → Ledger reader: requests verification
README.md - Advisor orchestration → Ledger reader: reads validated ledger
ghost-observer/ghost/advisor.py - Advisor orchestration → Advisor data model: builds context
ghost-observer/ghost/advisor.py - Advisor orchestration → Advisor rules: runs checks
ghost-observer/ghost/advisor.py - Advisor rules → Binary staleness: registers rule
ghost-observer/ghost/rules/__init__.py - Advisor rules → Waiver expiry: registers rule
ghost-observer/ghost/rules/__init__.py - Advisor rules → Ledger staleness: registers rule
ghost-observer/ghost/rules/__init__.py - Waiver expiry → Advisor data model: reads context
ghost-observer/ghost/rules/r004_waiver_expiring.py - Advisor orchestration → Advisory writer: appends advisories
ghost-observer/ghost/advisor.py - Operator → Simulation CLI: requests simulation
README.md - Simulation CLI → Doctrine diff: dispatches
ddf-core/ddf_py/ddf/_sim_cli.py - Simulation CLI → Ritual dry run: dispatches
ddf-core/ddf_py/ddf/_sim_cli.py - Simulation CLI → Ledger replay: dispatches
ddf-core/ddf_py/ddf/_sim_cli.py - Simulation CLI → Advisory replay: dispatches
ddf-core/ddf_py/ddf/_sim_cli.py - Simulation CLI → Drift simulation: dispatches
ddf-core/ddf_py/ddf/_sim_cli.py - Operator → Shell CLI: uses shell
README.md - Shell CLI → Shell rituals: dispatches rituals
- Shell rituals → Kernel adapter: verifies engine
AO/crates/ca-shell/src/rituals.rs - Shell rituals → Shell ledger records: appends events
AO/crates/ca-shell/src/rituals.rs - Shell rituals → Shell configuration: reads configuration
AO/crates/ca-shell/src/rituals.rs