Real-World Workflows
This is where deciduous gets interesting. Let's see how it works with AI assistants in practice.
The Core Insight
Manually running deciduous add commands is tedious. The real power of deciduous comes when your AI assistant does the logging automatically as part of its normal workflow.
Supported AI Assistants
Deciduous integrates with multiple AI coding assistants:
| Assistant | Init Flag | Integration Files |
|---|---|---|
| Claude Code | --claude (default) |
.claude/, CLAUDE.md |
| OpenCode | --opencode |
.opencode/, AGENTS.md |
| Windsurf | --windsurf |
.windsurf/hooks/, .windsurf/rules/ |
# Initialize with your preferred assistant(s) $ deciduous init # Claude Code (default) $ deciduous init --opencode # OpenCode $ deciduous init --windsurf # Windsurf $ deciduous init --both --windsurf # All three
Each integration includes:
- Instructions — Teaching the AI about the decision graph workflow
- Slash commands —
/recover,/decision,/work - Enforcement hooks — Blocks edits without logged decisions, reminds to link commits
This means your AI assistant knows about deciduous and will use it automatically.
Four Key Workflows
This chapter covers the main workflows:
- The AI Assistant Workflow — Your AI logging decisions in real-time as it works (example uses Claude Code, but applies to all assistants)
- Project Archaeology — Building a decision graph retroactively from git history, issues, and PRs
- Session Recovery — Using
/recoverto recover state after compaction or new sessions - PR Documentation — Generating visualizations and writeups from the graph
The Key Rule
Log BEFORE you code, not after.
The decision graph captures what you're about to do and why, not what you did. This keeps the record accurate and captures the reasoning that would otherwise be lost.
This is the fundamental pattern:
# About to implement something $ deciduous add action "Implementing rate limiter" -c 85 # ... do the implementation ... # Record the outcome $ deciduous add outcome "Rate limiter working" -c 95 --commit HEAD
Let's see this in practice.