feat(project-bootstrap): generic Step 5.6 skill-deps check

Collapse Step 5.6 from a single-skill detector (only the
superpowers@claude-plugins-official plugin) into a generic
`trigger -> fulfiller` table walker that scales to every canonical
CLAUDE.md trigger.

Inline 9-row map in SKILL.md covers: caveman, superpowers (kind: plugin),
using-wiki, using-tasks, using-projects-meta, pulling-before-work,
project-discipline, using-interns, active-platform. The `kind` flag
(skill | plugin) drives which install command is emitted in the chat-only
recommendation block. Detection paths: ~/.claude/skills/<name>/SKILL.md
for skills, plugins.<id> in ~/.claude/plugins/installed_plugins.json
for plugins.

Algorithm: read project's CLAUDE.md -> match each non-comment line vs
map (substring + tolower, mirrors Step 5 idempotent merge) -> for each
canonical match check disk -> print one chat block listing every missing
fulfiller with copy-pasteable install commands, OR a single
"all dependencies satisfied" line. User-custom lines and removed
canonical lines are silently skipped. Hard rule "never auto-install"
preserved verbatim.

version: 1.6.0 -> 1.7.0 (MINOR per project-discipline Rule 3 -- adds
capability, absorbs prior superpowers-only detector cleanly).

Closes [bootstrap-skill-deps-check] (.tasks/STATUS.md done).
Closes [bootstrap-recommend-projects-meta] by absorption -- the deferred
mirror task was the seed of this generalization; the generic walker now
handles using-projects-meta along with everything else, no per-skill
mirror needed.

Design rationale at .wiki/concepts/bootstrap-skill-deps-check.md:
- why generic over per-skill mirrors (5x mirror explosion)
- skill vs plugin kind distinction
- MCP-server-backed skills (only check using-X policy skill;
  setup-X self-fires via Prerequisites pointer)
- source-of-truth invariant: SKILL map + assets/CLAUDE.md.template
  must stay in sync (a future CI lint could enforce)
This commit is contained in:
2026-05-05 21:21:19 +03:00
parent 2f7943f06f
commit 8c547d73af
8 changed files with 206 additions and 47 deletions

View File

@@ -59,10 +59,13 @@ projects bootstrapped at different times debuggable.
4. **Step 5.5.** Write `bootstrap-manifest.md` recording the versions of
`project-bootstrap`, `setup-wiki`, `setup-tasks`, `project-discipline`,
`setup-interns`, and `using-interns` used.
5. **Step 5.6.** Detect the official `superpowers@claude-plugins-official`
plugin via `~/.claude/plugins/installed_plugins.json`. If absent, print
a one-time chat recommendation with the install command and upstream
link. Never auto-installs, never modifies project files.
5. **Step 5.6.** Skill dependencies check. Walk the canonical trigger list
in `CLAUDE.md`, look each up in an embedded `trigger → fulfiller` map,
detect what's missing on this host (`~/.claude/skills/<name>/SKILL.md`
for skills, `~/.claude/plugins/installed_plugins.json` for plugins),
and print one chat-only block listing every missing fulfiller with a
copy-pasteable install command. Prints a single ✅ line when nothing
is missing. Never auto-installs, never modifies project files.
6. **Commit.** `chore: bootstrap project structure` for fresh repos, or
`chore: upgrade project structure` adding only the new files for existing
ones. Pushes only on explicit user request.