/skdd:update — Update deployed SkDD assets
You are updating the SkDD assets that /skdd:setup previously deployed into
the project in the current working directory. Per-project state is preserved;
only managed artifacts are rewritten.
Plugin file references below use ${CLAUDE_PLUGIN_ROOT} — resolve it to the
skdd plugin's installation directory.
Hard prohibitions (read first)
NEVER, under any circumstances:
- touch
.claude/skills/skdd-harvest/backlog.md - touch any skill directory other than
.claude/skills/skdd-harvest/(in particular, never touch harvested<prefix>*skills or their harvest.md) - write outside the
<!-- skdd:begin -->/<!-- skdd:end -->markers in AGENTS.md - delete user files
- modify
.claude/settings.jsonbeyond appending/repairing the single skdd Stop hook entry
Step 1 — Locate deployed state
- Read
AGENTS.md. If it does not exist or contains no<!-- skdd:begin -->line, SkDD is not set up here — tell the user to run/skdd:setupand STOP. - Parse the config line (first line inside the markers):
<!-- skdd:config prefix=<prefix> hooks=<true|false> threshold=<level> version=<semver> -->— space-separatedkey=valuepairs, keys:prefix,hooks,threshold,version. - If
threshold=is absent (a project set up before the key existed), treat it asmediumand write it into the config line during the Step 5 re-render.mediumreproduces the pre-threshold behaviour exactly, so an existing project's harvesting does not change under it. - If the config line is missing or unparseable, ask the user for the prefix, whether the hook is installed, and the threshold level, then continue (self-healing re-render).
Step 2 — Version gate
Read version from ${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json.
If it equals the deployed version from Step 1, report "already at v<X.Y.Z>"
and STOP — unless the user explicitly asked to force a re-render.
Step 3 — Re-deploy the engine skill
First derive the threshold values, exactly as setup Step 3 does: read the
## Harvest Threshold section of
${CLAUDE_PLUGIN_ROOT}/templates/skdd-harvest/SKILL.md — the single source of
truth for the level → values mapping — and from the block matching the Step 1
threshold level take SKDD_SCORE_MIN (bare integer), SKDD_PROTO_BAND
(exactly as written, ASCII hyphen included, e.g. 2-3), and
SKDD_PROMOTE_SESSIONS (bare integer).
Then, same procedure as setup Step 4: copy SKILL.md (substituting
{{SKDD_PREFIX}}, {{SKDD_HOOKS}}, {{SKDD_THRESHOLD}}, {{SKDD_SCORE_MIN}},
{{SKDD_PROTO_BAND}}, {{SKDD_PROMOTE_SESSIONS}} with the Step 1 parameters,
and {{SKDD_VERSION}} with the NEW plugin version) plus
references/harvest-protocol.md, references/adr-entry-schema.md and
.gitignore (all verbatim) from
${CLAUDE_PLUGIN_ROOT}/templates/skdd-harvest/ into
.claude/skills/skdd-harvest/, overwriting the existing files.
Verification (mandatory): grep the written files for {{SKDD_ — any hit is
an error.
Note: local edits to the deployed engine files are overwritten by design; engine improvements belong in the plugin repository.
Step 4 — Stop hook
- If
hooks=true: re-copy${CLAUDE_PLUGIN_ROOT}/templates/skdd-stop.shto.claude/hooks/skdd-stop.sh(overwrite), applying the same token substitution as Step 3 — the script is a template, not a verbatim copy, and it must be included in the{{SKDD_grep verification. Then verify.claude/settings.jsonstill contains a Stop entry whose command referencesskdd-stop.sh; if it is missing, re-add it using the same merge procedure as setup Step 6 (parse first; stop on unparseable JSON; append only). - If
hooks=false: do nothing. Never install a hook that was not requested, and never uninstall one.
Step 5 — Re-render the AGENTS.md managed section
- Render
${CLAUDE_PLUGIN_ROOT}/templates/agents-section.mdwith the Step 1prefix,hooksandthresholdvalues, the Step 3 derived threshold numbers, and the NEW plugin version. - Replace the region of
AGENTS.mdfrom the<!-- skdd:begin -->line through the<!-- skdd:end -->line, inclusive, with the rendered block. - Every byte outside the markers must remain untouched.
Step 6 — CLAUDE.md import
Verify CLAUDE.md contains a line that, trimmed, equals @AGENTS.md or
@./AGENTS.md. If the file or line is missing, repair it as in setup Step 8.
Step 7 — Report
Tell the user:
- "Updated v → v" (from Step 1 / Step 2 values)
- The list of files rewritten
- If
threshold=had been absent and was defaulted tomedium: say so, and mention that/skdd:configchanges it - Explicit confirmation that
backlog.mdand harvested<prefix>*skills were not touched