AI Integration Files
When you run deciduous init, it generates files that teach Claude Code how to use the decision graph. These files are the secret sauce that makes the workflow loop automatic.
The Problem They Solve
AI assistants don't have persistent memory across sessions. When a session ends or context compacts, Claude forgets:
- What decisions were made and why
- What options were considered but rejected
- The reasoning behind architectural choices
- What was tried before and failed
The generated files solve this by:
- Teaching Claude about deciduous commands
- Enforcing real-time logging as work happens
- Enabling context recovery at session start
What Gets Created
Run deciduous init to generate:
| File | Purpose |
|---|---|
.claude/commands/decision.md |
Slash command for managing the graph |
.claude/commands/recover.md |
Slash command for context recovery |
CLAUDE.md |
Project instructions with workflow rules |
CLAUDE.md — The Behavioral Contract
CLAUDE.md is read by Claude Code at session start. It contains the Decision Graph Workflow section that defines when and how to log:
## Decision Graph Workflow **THIS IS MANDATORY. Log decisions IN REAL-TIME, not retroactively.** ### The Core Rule ``` BEFORE you do something -> Log what you're ABOUT to do AFTER it succeeds/fails -> Log the outcome CONNECT immediately -> Link every node to its parent AUDIT regularly -> Check for missing connections ```
This section also includes:
- Behavioral triggers — when to log goals, decisions, actions, outcomes
- Connection rules — what must link to what
- Session start checklist — what to do at the beginning of each session
- Audit checklist — how to verify graph integrity
You can edit CLAUDE.md to add project-specific rules. The Decision Graph Workflow section will be preserved when you run deciduous update.
/decision — The Graph Manager
The /decision slash command provides a quick interface for graph operations:
The command maps to deciduous CLI operations:
| Slash Command | Runs |
|---|---|
/decision nodes |
deciduous nodes |
/decision add goal "X" |
deciduous add goal "X" -c 90 |
/decision link 1 2 "reason" |
deciduous link 1 2 -r "reason" |
/decision sync |
deciduous sync |
/decision show 42 |
deciduous show 42 |
/recover — The Memory Restorer
The /recover slash command recovers context at session start:
The Workflow Loop
These files enforce a continuous loop:
SESSION START
│
▼
Run /recover → See past decisions
│
▼
AUDIT → Fix any orphan nodes first!
│
▼
DO WORK → Log BEFORE each action
│
▼
CONNECT → Link new nodes immediately
│
▼
AFTER CHANGES → Log outcomes, observations
│
▼
AUDIT AGAIN → Any new orphans?
│
▼
BEFORE PUSH → deciduous sync
│
▼
PUSH → Live graph updates
│
▼
SESSION END → Final audit
│
▼
(repeat)
Git History Integration
The Timeline and DAG views can show git commits alongside decision nodes. This creates traceability between decisions and code.
Linking Commits to Nodes
After every git commit, link it to the decision graph:
The --commit HEAD flag automatically captures the current commit hash and links it to the node.
Viewing Node Details
Use the show command to see full details for any node:
Deploying to GitHub Pages
The docs/ directory is ready for GitHub Pages:
- Run
deciduous syncto export graph and git history - Push to GitHub
- Go to Settings > Pages
- Set source to Deploy from branch
- Select your branch and
/docsfolder
Your graph will be live at https://<username>.github.io/<repo>/
deciduous init also creates .github/workflows/deploy-pages.yml which automatically deploys to GitHub Pages when you push to main.
Keeping Files Updated
As deciduous evolves, the generated files may get new features. Update them with:
$ deciduous update
This updates slash commands, skills, hooks, and the web viewer to the latest versions while preserving your custom additions to CLAUDE.md.
Run deciduous update after upgrading deciduous (cargo install deciduous) or when release notes mention new skills or commands.
What Makes This Work
Claude Code is excellent at following explicit instructions. By embedding the decision logging workflow directly into the files it reads at session start, we make the workflow automatic.
You don't have to remember to log decisions—Claude does it for you.
The combination of:
- CLAUDE.md — behavioral rules
- Slash commands — quick access to operations
- /recover — memory restoration at session start
Creates a system where decisions are logged in real-time, survive context loss, and are automatically recovered in new sessions.