Expand description
Project initialization for deciduous
deciduous init creates all the files needed for decision graph tracking
with AI assistant integration (Claude Code and/or OpenCode).
Modules§
- guard
- How
deciduous updatewrites the harness files it owns (commands, skills, hook scripts, agents.toml, OpenCode and Windsurf files) without destroying anything someone else put there. - templates
- Template constants for deciduous init
Constants§
- RETIRED_
HOOK_ SCRIPTS - Hook scripts deciduous installed before 1.0.3 to make agents log, for
Claude Code and Windsurf alike. Logging is encouraged through the
instructions and the tool replies now, not enforced by a hook, so
updateremoves the ones it wrote. - RETIRED_
WORKFLOWS - The GitHub Pages workflow
initwrote before 1.0.5;updateremoves it when deciduous wrote it.
Functions§
- ensure_
board_ hook_ settings - Adds the board-mentions hook to
.claude/settings.jsonfor each event that does not run it yet. Everything already there, the user’s hooks included, is kept in its order; a file that is not valid JSON is reported and left alone, and a missing file is written from the template. - ensure_
gitattributes - Route the graph file through the
deciduousmerge driver and mark it as generated so GitHub folds it in pull request diffs. An older line for the same purpose is upgraded in place. - ensure_
merge_ driver - Register the
deciduousmerge driver in this clone’s git config so two people editing the same record get a field-level merge instead of conflict markers. Git config is per clone, so this runs frominit,update, andsync. ReturnsOk(true)when it (re)wrote the config. Silently does nothing outside a git repository. - init_
project - Initialize a new deciduous project with AI assistant integration
- strip_
retired_ hook_ settings - Takes the retired logging hooks out of
.claude/settings.json: every command that runsdeciduous log-loop, and every command that runs a retired script that is no longer on disk. A retired script the user wrote was kept, so the entry that runs it stays. Entries and events left empty are dropped; everything else, including key order, is kept. A file that is not valid JSON is reported and left alone. - update_
all deciduous update --all <dir>: every deciduous project directly underdir, anddiritself if it is one, updated one after another. A project is a directory with.deciduous/and an assistant integration to update. One project failing does not stop the rest. Returns how many failed.- update_
tooling - Update tooling files to the latest version (overwrites existing) Auto-detects which assistants are installed (.claude/ and/or .opencode/)