edawise

deccy CLI Last updated

deccy

deccy maintains a decision graph as plain, diffable files in .deccy/. It tracks architectural and implementation decisions, the rationale behind them, the files each decision owns (claims), and the checks or dependencies that wire decisions together (connectors).

deccy never writes to your version control system—no commits, branches, staging, or working-copy snapshots. When jj or git is present, deccy reads it strictly as a read-only oracle to answer what plain files alone cannot: the current revision, the last change that touched a claimed file, and whether a merge silently discarded or dropped a decision. Without a VCS, the entire graph still works.


Documentation

GuideWhat you will learn
ConceptsMental model: decisions, connectors, claims, rationales, IDs, digests, and status vs. validate.
Workflows & TutorialsStep-by-step recipes for daily usage, updating claims, re-pinning connectors, removing nodes, and checking merges.
CLI ReferenceComplete guide to all 13 verbs, aliases, short flags, human output lines, and JSON facts.
JSON & Agent AutomationScripting deccy: --json envelopes, exit codes, deterministic IDs (DECCY_ID_SEED), and non-interactive patterns.
Troubleshooting & RefusalsHow to read refusals, resolve status work items (stale, drift), and fix validate problems (collision, cycle, discards).
Storage, Hashing & VCS OracleOn-disk .deccy/ layout, JSON record schema, BLAKE3 domain prefixes, and read-only jj/git queries.

Installation

Build and install the deccy binary with Cargo:

cargo build --release
# Binary is placed at target/release/deccy

Or install it into your Cargo bin directory:

cargo install --path .

5-Minute Quickstart

Run the following walkthrough in an empty directory to create a store, record two decisions, link them with a connector, inspect drift when a claimed file changes, and validate the graph.

1. Initialize the store

$ deccy init
vcs none

init creates .deccy/, .deccy/nodes/, .deccy/rationale/, and .deccy/format, then reports the VCS visible at the store root (jj, git, or none).

2. Record decisions and claim files

Create a file first (or pass --create / -C to let deccy new create an empty file), then record a decision that claims it:

$ mkdir -p src
$ printf 'pub struct Store;\n' > src/store.rs

$ deccy new -d -t text -T "Keep the store in plain files" -p src/store.rs
ktvsvszpzoxlzrsoqpvsuztsstmyvqvp

Record a second decision with prose piped into --rationale -:

$ printf 'Prose lives in its own file so records stay small and diffable.\n' | \
    deccy new -d -t text -T "Keep rationale outside the record" -r -
pouvsykppxynykyovrslllkzyvvkzqmp

Tip: Every node ID is a 32-character reverse-hex string (k..z). Any unique prefix of 8 or more characters (such as ktvsvszp) works wherever deccy expects an ID.

3. Connect decisions

Create a connector that links the first decision (--tail) to the second (--head):

$ deccy new -c -t review-criteria -T "Store layout follows record separation" \
    --tail ktvsvszp --head pouvsykp
qonutznvlyssluxyzysswxltlztxlwro

Each pin records the target node’s content digest at the moment it was linked.

4. Inspect the graph

List all nodes with deccy list (or deccy ls):

$ deccy ls
ktvsvszpzoxlzrsoqpvsuztsstmyvqvp  decision  text  04ef2ce7  Keep the store in plain files
pouvsykppxynykyovrslllkzyvvkzqmp  decision  text  b0b033b7  Keep rationale outside the record
qonutznvlyssluxyzysswxltlztxlwro  connector  review-criteria  fb618936  Store layout follows record separation

Find which node owns a file with deccy explain (or deccy owner):

$ deccy explain src/store.rs
path src/store.rs
node ktvsvszpzoxlzrsoqpvsuztsstmyvqvp

5. Edit a claimed file and refresh drift

When src/store.rs changes on disk, deccy status reports drift while deccy validate continues to pass (because editing code is normal work, not a broken graph):

$ printf 'pub struct Store { root: std::path::PathBuf }\n' > src/store.rs

$ deccy status
nodes 3
decisions 2
connectors 1
stale 0
drift 1
collisions 0
orphans 0
no-rationale 2
missing-claims 0
missing-rationales 0
unpinned 0
dangling 0
cycles 0
broken 0
drift src/store.rs expected 81d40299 has 5bc578e2
no-rationale ktvsvszpzoxlzrsoqpvsuztsstmyvqvp
no-rationale qonutznvlyssluxyzysswxltlztxlwro
vcs none

$ deccy validate
valid 0 problems

Refresh the decision’s claim snapshot once the code change is settled:

$ deccy claim ktvsvszp --refresh
id ktvsvszpzoxlzrsoqpvsuztsstmyvqvp
claim src/store.rs 5bc578e2...

6. Re-pin stale connectors

Refreshing ktvsvszp updated its claim hash, which changed its node digest. Connectors pointing to ktvsvszp now show up as stale in deccy status:

$ deccy status
...
stale 1
...
connector qonutznvlyssluxyzysswxltlztxlwro
  tail ktvsvszpzoxlzrsoqpvsuztsstmyvqvp expects 04ef2ce7 has 9c1f2a40
...

After reviewing the connected nodes, re-pin the connector to their current digests:

$ deccy link qonutznv --repin
id qonutznvlyssluxyzysswxltlztxlwro

Command Summary

Every command supports --help (-h) and --json (-j, either before or after the verb).

VerbAliasesSummary
init [path]iCreate the .deccy store and report the VCS in view (jj, git, or none).
new ...nGenerate a node ID, snapshot claims, resolve pins, and write its record.
show <id>—Print a node’s record exactly as on disk, or its rationale (--rationale / -r).
listlsList id kind type digest8 title for every readable node.
describe <id>desc, dRewrite a node’s one-line --title (-T) or --type (-t).
rationale <id>prose, rWrite a node’s rationale from --file (-f), stdin (-), or $EDITOR, or re-point --path (-p).
claim <id>cSnapshot new claims, --refresh (-f) existing claims, or --release (-r) ownership.
link <id>—Replace --tail (-T) or --head (-H), empty an end with --clear, or --repin (-r).
remove <id>rmDelete a node’s record, rationale, and claimed files (refusing if still referenced).
statusstReport counts, stale pins, claim drift, orphans, missing rationales, and VCS diff (always exits 0).
validatecheck, vReport every structural problem (and --merge / --since history checks); exits 1 if problems > 0.
explain <path>owner, eFind the single node that claims <path> and the last VCS change that touched it.
hash [<path>...]—Compute the deccy-blob BLAKE3 digest of files or stdin without needing a store.

Written by Edawise