Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Claude Code

Claude Code is the default assistant integration. Running deciduous init with no flags sets up everything Claude Code needs to track decisions automatically.

Setup

Terminal
$ deciduous init
Initializing Deciduous for Claude Code... Directory: /Users/you/my-project

Creating .deciduous/config.toml Creating .deciduous/.version (0.15.0) Creating .deciduous/deciduous.db Creating .claude/commands/decision.md Creating .claude/commands/recover.md Creating .claude/commands/work.md Creating .claude/commands/document.md Creating .claude/commands/build-test.md Creating .claude/commands/serve-ui.md Creating .claude/commands/sync-graph.md Creating .claude/commands/decision-graph.md Creating .claude/commands/sync.md Creating .claude/agents.toml Creating .claude/hooks/require-action-node.sh (executable) Creating .claude/hooks/post-commit-reminder.sh (executable) Creating .claude/hooks/version-check.sh (executable) Creating .claude/settings.json Creating .claude/skills/pulse.md Creating .claude/skills/narratives.md Creating .claude/skills/archaeology.md Creating CLAUDE.md Creating docs/index.html Creating docs/graph-data.json

Deciduous initialized for Claude Code!

What Gets Created

Slash Commands

These appear in Claude Code as /command-name and are stored in .claude/commands/:

CommandPurpose
/decisionManage decision graph – add nodes, link edges, sync
/recoverRecover context from decision graph on session start
/workStart a work transaction – creates goal node before implementation
/documentGenerate comprehensive documentation for a file or directory
/build-testBuild the project and run the test suite
/serve-uiStart the decision graph web viewer
/sync-graphExport decision graph to GitHub Pages
/decision-graphBuild a decision graph from commit history
/syncMulti-user sync – pull events, rebuild, push

Skills

Skills are higher-level workflows stored in .claude/skills/:

SkillPurpose
/pulseMap current design as decisions (Now mode)
/narrativesUnderstand how the system evolved (History mode)
/archaeologyTransform narratives into queryable graph

Hooks

Enforcement hooks in .claude/hooks/ run automatically to keep the decision graph consistent:

  • require-action-node.sh – Blocks file edits unless an action node exists in the graph. Prevents coding without logging what you are about to do.
  • post-commit-reminder.sh – After every git commit, reminds Claude to link the commit to the decision graph with --commit HEAD.
  • version-check.sh – Checks whether integration files are out of date and suggests running deciduous update.

Hook configuration lives in .claude/settings.json.

Other Files

  • .claude/agents.toml – Subagent configurations for scoping work to specific parts of the codebase (rust-core, web, tooling, docs, ci).
  • CLAUDE.md – A “Decision Graph Workflow” section is appended to your project’s CLAUDE.md (or created if it does not exist). This section teaches Claude the node flow rule, behavioral triggers, and connection patterns. Your existing CLAUDE.md content is preserved.

MCP Server

The MCP server gives Claude direct tool access to the decision graph instead of shelling out to the CLI. Add the following to .claude/settings.local.json:

{
  "mcpServers": {
    "deciduous": {
      "command": "deciduous",
      "args": ["mcp"]
    }
  }
}

This exposes 31 tools organized into five groups:

GroupToolsPurpose
Graphadd_node, add_edge, update_status, …Core graph operations
Querylist_nodes, list_edges, show_node, search_nodes, …Read and search the graph
Documentsattach_document, list_documents, …File attachments on nodes
Sessionsstart_session, end_session, resume_session, …Per-conversation decision trees
Exportexport_dot, generate_writeupDOT visualization and PR writeups

Keeping Integration Files Current

When you upgrade deciduous, run deciduous update to refresh all integration files to the latest version. It overwrites slash commands, hooks, skills, and the CLAUDE.md section while preserving your custom content.

Terminal
$ deciduous update
Updating Deciduous tooling for Claude Code... Directory: /Users/you/my-project

Updated .claude/commands/decision.md Updated .claude/commands/recover.md Updated .claude/commands/work.md Updated .claude/commands/document.md Updated .claude/commands/build-test.md Updated .claude/commands/serve-ui.md Updated .claude/commands/sync-graph.md Updated .claude/commands/decision-graph.md Updated .claude/commands/sync.md Updated .claude/hooks/require-action-node.sh (executable) Updated .claude/hooks/post-commit-reminder.sh (executable) Updated .claude/hooks/version-check.sh (executable) Updated .claude/agents.toml Updated .claude/skills/pulse.md Updated .claude/skills/narratives.md Updated .claude/skills/archaeology.md Updated CLAUDE.md (section replaced) Updated .deciduous/.version (0.15.0)

Tooling updated for Claude Code!

To check whether an update is needed without applying it:

deciduous check-update

The version-check.sh hook runs this automatically at the start of each Claude Code session (checked every 24 hours). If your integration files are out of date, Claude will suggest running deciduous update.

Using Slash Commands

Once initialized, start a Claude Code session and use slash commands directly:

Claude Code -- using slash commands
You
/recover
Claude
$ deciduous nodes
ID Type Title Status Confidence 1 goal Add JWT auth with refresh tokens active 90% 2 option jsonwebtoken crate + custom logic active 80% 3 option axum-jwt-auth with built-in rotation active 75% 4 decision Use jsonwebtoken for full control active 85% 5 action Implement JWT middleware active 85% 6 outcome JWT auth working -- 14 tests passing active 95%
$ deciduous edges
From To Reason 1 2 possible approach 1 3 possible approach 2 4 chosen 4 5 implementing chosen approach 5 6 implementation result
Context recovered. We have JWT auth implemented with jsonwebtoken. 14 tests passing. Ready to continue.