aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-04-26 19:48:31 -0500
committerCraig Jennings <c@cjennings.net>2026-04-26 19:48:31 -0500
commit5dc03427571d88d407389e67d1c1c1936e8f61ce (patch)
treedf577f6a17fd0d02c5f4d6707e0d37490d1c74b7 /Makefile
parent2eff127c1dbf2bc09175f929d581f1dde12cb2e3 (diff)
downloadrulesets-5dc03427571d88d407389e67d1c1c1936e8f61ce.tar.gz
rulesets-5dc03427571d88d407389e67d1c1c1936e8f61ce.zip
chore(build): wildcard SKILLS, claude-rules bridge symlink, link lint
The refactor scan flagged three install/lint problems. I fixed all three. - The Makefile SKILLS list was hand-maintained and had drifted: `respond-to-cj-comments` exists on disk but wasn't installed by `make install`. I replaced the list with `$(patsubst %/SKILL.md,%,$(wildcard */SKILL.md))` so every directory containing a SKILL.md is picked up automatically. - Cross-references in installed skills point at `../claude-rules/foo.md`. The install layout puts rules at `~/.claude/rules/`, not `~/.claude/skills/claude-rules/`, so those links resolved in the source repo and silently broke at install. I added a bridge symlink to the install target. `~/.claude/skills/claude-rules` now points at the source `claude-rules/` directory, so the same relative path works in both layouts. - I extended `scripts/lint.sh` with a `check_md_links` function that validates `claude-rules/` cross-references in `claude-rules/*.md` and `*/SKILL.md`. Scoped narrowly on purpose: skill bodies cite illustrative file names (ADR templates, arc42 sections) that aren't real source files and would generate noise. Verified locally: `make install` is idempotent, the bridge resolves the previously-broken link, and `bash scripts/lint.sh` is clean.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 19 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index aa1163a..62cb9d8 100644
--- a/Makefile
+++ b/Makefile
@@ -4,11 +4,7 @@ SHELL := /bin/bash
SKILLS_DIR := $(HOME)/.claude/skills
RULES_DIR := $(HOME)/.claude/rules
HOOKS_DIR := $(HOME)/.claude/hooks
-SKILLS := c4-analyze c4-diagram debug add-tests respond-to-review review-code start-work security-check \
- arch-design arch-decide arch-document arch-evaluate \
- brainstorm codify root-cause-trace five-whys prompt-engineering \
- playwright-js playwright-py frontend-design pairwise-tests \
- finish-branch create-v2mom
+SKILLS := $(patsubst %/SKILL.md,%,$(wildcard */SKILL.md))
RULES := $(wildcard claude-rules/*.md)
HOOKS := $(wildcard hooks/*.sh hooks/*.py)
LANGUAGES := $(notdir $(wildcard languages/*))
@@ -125,6 +121,16 @@ install: ## Symlink skills and rules into ~/.claude/
fi \
done
@echo ""
+ @echo "Bridge symlink (lets SKILL.md cross-refs to ../claude-rules/ resolve from the install layout):"
+ @if [ -L "$(SKILLS_DIR)/claude-rules" ]; then \
+ echo " skip claude-rules (already linked)"; \
+ elif [ -e "$(SKILLS_DIR)/claude-rules" ]; then \
+ echo " WARN claude-rules exists and is not a symlink — skipping"; \
+ else \
+ ln -s "$(CURDIR)/claude-rules" "$(SKILLS_DIR)/claude-rules"; \
+ echo " link claude-rules → $(SKILLS_DIR)/claude-rules"; \
+ fi
+ @echo ""
@echo "done"
uninstall: ## Remove global symlinks from ~/.claude/
@@ -149,6 +155,14 @@ uninstall: ## Remove global symlinks from ~/.claude/
fi \
done
@echo ""
+ @echo "Bridge symlink:"
+ @if [ -L "$(SKILLS_DIR)/claude-rules" ]; then \
+ rm "$(SKILLS_DIR)/claude-rules"; \
+ echo " rm claude-rules"; \
+ else \
+ echo " skip claude-rules (not a symlink)"; \
+ fi
+ @echo ""
@echo "done"
list: ## Show global install status