Skip to content

synthanai/decision-moment-graph

Repository files navigation

DMG β€” Decision Moment Graph

The Reference Implementation of the Decision Moment Standard (DMS). Store decision moments, not raw chats, objects or data.

License: MIT Conformance Tests


What is DMG?

DMG is the standard graph encoding for the DMS Standard.

It provides the schemas, SDKs, and validators to ensure your decisions are MERIT-compliant:

Principle Verified By Grade
πŸ“ Measured OUTCOME checks vs predictions Platinum
πŸ” Evidenced MEMO options (β‰₯3) & rationale Bronze
πŸ”™ Reversible DOORS owner & rollback plan Gold
πŸ‘οΈ Inspectable MOMENT event hash chain Silver
πŸ”— Traceable TRACE source citations Platinum

"DMS defines the rules. DMG stores the proof."


The DMG Lifecycle

The DMG Lifecycle

DMG implements the 7-Step Heptagon lifecycle defined by DMS:

FRAME β†’ SPAR β†’ GATE β†’ COMMIT β†’ ENACT β†’ YIELD β†’ GAUGE


Quick Start

1. Install

pip install decision-moment-graph
# For embeddings: pip install sentence-transformers

2. Run DMG Lifecycle

python dmg/cli/lifecycle.py "Should we migrate to microservices?" --dry-run

Output:

πŸ“ Phase 1: FRAME, Structure question & options
πŸ“ Phase 2: SPAR, Deliberate & Challenge
πŸ“ Phase 3: GATE, Check Governance & Reversibility
πŸ“ Phase 4: COMMIT, Sign & Hash (The "Capture")
πŸ“ Phase 5: ENACT, Execute instructions
πŸ“ Phase 6: YIELD, Measure results
πŸ“ Cycle Complete: GAUGE, Calibrate confidence & learn

3. Use as Library

from decision_moment_graph import AgenticSPARAdapter
from agentic_kit.dispatchers import LoggingDispatcher

adapter = AgenticSPARAdapter()
dispatcher = LoggingDispatcher()

result = adapter.run_loop(
    spar_output,
    action_executor=dispatcher.execute,
    auto_execute=True
)

The DMG Lifecycle

The decision lifecycle maps directly to DMG kits and objects:

FRAME β†’ SPAR β†’ GATE β†’ COMMIT β†’ ENACT β†’ YIELD β†’ GAUGE

Step Phase Primitive Kit/Module Action
1 FRAME MEMO dmg/frame Define context & options
2 SPAR DISSENT spar-kit Deliberate & Challenge
3 GATE RAMP dmg/gate Check Governance & Reversibility
4 COMMIT MOMENT dmg/core Sign & Hash (The "Capture")
5 ENACT β€” β€” Execute instructions
6 YIELD OUTCOME dmg/yield Measure results
7 GAUGE RETRO dmg/gauge Calibrate confidence & learn

SDK Modules

Module Purpose
agentic_adapter.py Core DMG Lifecycle adapter
spar_adapter.py Converts SPAR to DMG
sparkit_runner.py Embedded SPAR runner
swarm_coordinator.py Parallel agent swarm orchestration
audit_export.py Compliance reports

Note: Core primitives (Memory, Dispatchers, Hub, Reflection) are now imported from agentic-kit.

Repository Structure

decision-moment-graph/
β”œβ”€β”€ dmg/                     # Python Package
β”‚   β”œβ”€β”€ schema/              # JSON Schema definitions
β”‚   β”œβ”€β”€ sdk/                 # Reference implementations
β”‚   └── cli/                 # Validator CLI
β”œβ”€β”€ conformance/             # Test fixtures + runner
└── docs/                    # Implementation Docs

Note: Normative specs have moved to decision-moment-standard/spec.

Agentic Integration (MCP)

DMG provides a Context Engine MCP Server for AI Agents:

  • Tools:
    • validate_moment(path): Run MERIT validation on any file
    • create_moment_scaffold(title): Generate compliant JSON
  • Resources: dmg://graph/active, dmg://moment/{id}
  • Setup: Run pip install mcp and point your client to dmg/mcp/server.py.

New Modules (Jan 2026)

Module Path Purpose
GAUGE Emitter src/gauge-emitter.js Ecosystem event emission at phase completion
Decision Replay src/replay.js Counterfactual analysis and training data
// Decision replay example
const { captureSnapshot, replayDecision, REPLAY_MODES } = require('dmg/src/replay');

const snapshotId = captureSnapshot(decision);
const replay = replayDecision(snapshotId, {
    mode: REPLAY_MODES.COUNTERFACTUAL,
    modifications: { context: { budget: newBudget } }
});

Governance Gates

For consequential decisions (RAMP β‰₯ 3) marked Final/Approved:

βœ… Scheduled outcome check required
βœ… At least 1 dissent captured (or ZK-Dissent ref)
βœ… Rollback owner named
βœ… β‰₯2 reversal signals defined
βœ… At least 1 prediction with confidence


The Open Protocol

DMG is the open standard toolkit. ARANGAM provides premium infrastructure.

What You Get DMG (OSS Kit) ARANGAM Platform
DMG Core Schemas βœ… βœ…
Validator CLI βœ… βœ…
Reference Libraries βœ… βœ…
Hosted MOMENT Ledger ❌ βœ… Hash-chained audit trail
Team Collaboration ❌ βœ… Approvals + workflows
Enterprise Governance ❌ βœ… SSO + retention policies

The kit is free. The infrastructure is premium.

See ATTRIBUTION.md for attribution guidelines.


The SYNTHAI Ecosystem

Component Role
Decision Moment Graph The Standard for reversible, auditable decisions.
VAULT-KIT The Protocol for privacy-first coordination.
agentic-kit The Infrastructure for reliable agent systems.

Built by SYNTHAI, Decision Intelligence for the AI Era.

About

πŸ“‹ DMG: Decision Moment Graph β€” Open standard for decision governance in the AI era. Stop storing chats. Store decision objects.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors