Decisions as Code

A text-based knowledge graph for tracking architecture decisions, incidents, processes, and company knowledge. Lives in your repo, works with your git workflow.

$ dg new adr "Use PostgreSQL for primary database"
Created docs/decisions/ADR-001-use-postgresql-for-primary-database.md

$ dg link ADR-001 implements DEC-005
Linked ADR-001 -> implements -> DEC-005

$ dg serve --open
Server running at http://localhost:3000

Why Decision Graph?

Plain Text & Git-Native

Markdown files with YAML frontmatter. Review decisions in PRs, track history with git blame, merge conflicts are just text.

12 Record Types

ADRs, decisions, strategies, incidents, runbooks, processes, hiring docs, meetings, and more. Each with purpose-built templates.

Linked Knowledge Graph

Connect records with semantic links: supersedes, implements, depends_on, enables, conflicts_with. Trace decisions back to their origins.

Built-in Web UI

dg serve launches a local dashboard. Browse records, view graphs, search content, see team assignments. Hot-reloads on file changes.

LLM-Friendly

Designed for AI assistants. dg context extracts relevant records for LLM context windows. Ships with Claude Code skills.

Users & Teams

Define users, teams, and roles in config. Track who made decisions, assign action items, see team membership history over time.

Live Demos

Explore real decision archives built with Decision Graph

Silicon Valley

Pied Piper

The compression company's strategic decisions, from middle-out algorithm architecture to the PiperNet decentralized internet.

  • 21 decisions
  • 12 team members
  • 8 teams
Historical

Record Types

ADR Architecture Decision Record

Technical decisions with context, alternatives, and consequences

DEC Decision

Business decisions using SPADE framework

STR Strategy

Strategic direction using Six-Pager format

INC Incident

Post-mortems with timeline and action items

RUN Runbook

Step-by-step operational guides

PRC Process

Workflows with DACI assignments

POL Policy

Internal policies and compliance

MTG Meeting

Meeting notes with decisions and actions

HIR Hiring

Role definitions and requirements

CUS Customer

Architecture-impacting customer needs

OPP Opportunity

Product opportunities (OST format)

LEG Legal

Privacy policies, ToS, agreements

Installation

Install via Homebrew (macOS/Linux):

$ brew install decisiongraph/tap/dg

Initialize with Nix flake template:

$ nix flake init -t github:decisiongraph/dg

Or add to existing flake.nix:

inputs.dg.url = "github:decisiongraph/dg";
# Then add dg.packages.${system}.default to your packages

Install via Cargo (requires Rust):

$ cargo install decisiongraph

Build from source:

$ git clone https://github.com/decisiongraph/dg
$ cd dg
$ cargo build --release
$ cp target/release/dg ~/.local/bin/

Quick Start

# Initialize in your project
$ dg init

# Create your first decision
$ dg new adr "Choose database technology"

# Browse locally
$ dg serve --open

# List all records
$ dg list

# Search
$ dg search "database" --content

# Link records
$ dg link ADR-001 implements DEC-002

# Trace why something exists
$ dg why ADR-001

# See impact of changing a record
$ dg impact DEC-001

Start capturing decisions today

Your future self will thank you when you can trace why that architecture decision was made.

View on GitHub Install Now