Attaching Documents to Nodes

Issues, screenshots, specs, diagrams—attach them directly to the nodes they belong to.

A decision graph node says what was decided and why. But sometimes the full context lives in an external document: a GitHub issue body, an architecture diagram, a screenshot of a failing test. Document attachments let you bind those artifacts directly to graph nodes so they travel with the decision.

Attaching the Issue

Before starting implementation on issue #93, Claude saves the issue body to a file and attaches it to the goal node. This way, anyone recovering context later can read the original issue without leaving the decision graph.

Claude Code — Attaching issue #93
❚❚
Animation paused
Claude
Let me save the issue body and attach it to the goal node for future reference.
Claude
gh issue view 93 --json body -q .body > issue-93.md
Claude
deciduous doc attach 57 issue-93.md -d "GitHub issue #93: Add CI pipelines"
Attached document 1 to node 57 (issue-93.md)
Description: GitHub issue #93: Add CI pipelines
Claude
The issue is now attached to goal #57. Anyone who recovers this context later will be able to read the original issue directly from the graph.

The file is copied into .deciduous/documents/ with a content-hash filename. The original file can be deleted—deciduous keeps its own copy. If you attach the same file twice, it deduplicates automatically.

Browsing Attached Documents

List all documents in the graph, or filter to a specific node:

deciduous doc list
deciduous doc list ID NODE FILENAME TYPE SIZE DESCRIPTION 1 57 issue-93.md text/m... 210B GitHub issue #93: Add CI pi... # Filter to a single node deciduous doc list 57 ID NODE FILENAME TYPE SIZE DESCRIPTION 1 57 issue-93.md text/m... 210B GitHub issue #93: Add CI pi...

Get full details on any document:

deciduous doc show
deciduous doc show 1 Document #1 ──────────────────────────────────────────────────────────── Filename: issue-93.md Node: #57 (goal: Add CI pipelines for snowflex) Type: text/markdown Size: 210 bytes Description: GitHub issue #93: Add CI pipelines Stored at: .deciduous/documents/a3f8c2e1.md Attached: 2025-01-15T14:30:00

AI-Generated Descriptions

For images, PDFs, or documents where a manual description would be tedious, use --ai-describe at attach time or --ai to describe after the fact:

AI descriptions
# AI-describe at attach time deciduous doc attach 57 ci-diagram.png --ai-describe Attached document 2 to node 57 (ci-diagram.png) Description: Flowchart showing GitHub Actions CI pipeline with separate unit test and integration test workflows triggered on PR events # Update description on an existing document deciduous doc describe 1 --ai Updated description for document 1: GitHub issue requesting CI/CD pipeline support with separate workflows for unit and integration tests in snowflex

Managing Documents

The full document management toolkit:

Command What It Does
doc attach <node> <file> Attach a file to a node (copies to .deciduous/documents/)
doc list [node] List all documents, optionally filtered to one node
doc show <id> Full details on a document
doc describe <id> "text" Set or update the description manually
doc describe <id> --ai Generate a description using AI
doc open <id> Open the document in your default application
doc detach <id> Soft-delete the attachment (recoverable)
doc gc Garbage collect orphaned files from disk

The doc detach command is a soft delete—it removes the association between the document and the node, but the file stays on disk until you run doc gc. This gives you a safety net if you detach something by mistake.

What to Attach

Documents work with any file type: markdown, images, PDFs, text files, spreadsheets. Attach whatever provides context that the node title and edges cannot capture on their own.

Attach the source of truth, not a copy

The best time to attach a document is at the start of a work session, before it might change. For GitHub issues, save the body to a file and attach it—the issue might get edited later, but the attached copy preserves the version that drove the original decision. For screenshots of failing tests, architecture diagrams, or spec documents, the same principle applies: capture the state that informed the decision.

In the next section, we'll continue the issue #93 session and watch Claude implement the CI workflow, logging actions and outcomes as it goes.