aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-15 17:22:28 -0500
committerCraig Jennings <c@cjennings.net>2026-05-15 17:22:28 -0500
commitd364cf2a8520f733d9438fa1e32cb3010c655ee2 (patch)
tree23c0a91ab4f5028d0728be708cf45f1b7da59990 /Makefile
parent94782eea3df22289fb556481f9569a9284c7ac50 (diff)
downloadrulesets-d364cf2a8520f733d9438fa1e32cb3010c655ee2.tar.gz
rulesets-d364cf2a8520f733d9438fa1e32cb3010c655ee2.zip
feat(make): add install-ai target for bootstrapping .ai/ in fresh projects
scripts/install-ai.sh copies canonical .ai/ content from claude-templates/ into a fresh project. Rsyncs protocols.org, workflows/, scripts/, someday-maybe.org as-is; templates notes.org with project-name and date placeholders substituted; creates empty sessions/, references/, retrospectives/ dirs. Two tracking modes: TRACK=1 adds .gitkeep files inside otherwise-empty dirs so they survive in git history; GITIGNORE=1 appends .ai/ to the project's .gitignore so session records stay local. Prompts interactively if neither flag is set. Refuses if PROJECT/.ai/ already exists with a message pointing to `make audit APPLY=1` for sync of existing installs. Without a PROJECT argument, fzf-picks from ~/code/* + ~/projects/* git checkouts that don't already have .ai/.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index f269298..5474c67 100644
--- a/Makefile
+++ b/Makefile
@@ -407,6 +407,12 @@ audit: ## Verify project .ai/ dirs against canonical ([APPLY=1] [FORCE=1] [NO_DO
$(if $(FORCE),--force) \
$(if $(NO_DOCTOR),--no-doctor)
+install-ai: ## Bootstrap .ai/ in a fresh project ([PROJECT=<path>] [TRACK=1 | GITIGNORE=1])
+ @bash scripts/install-ai.sh \
+ $(if $(TRACK),--track) \
+ $(if $(GITIGNORE),--gitignore) \
+ $(PROJECT)
+
test: ## Run the .ai/scripts/ test suites (pytest + ERT)
@cd .ai/scripts/tests && python3 -m pytest
@set -e; for f in .ai/scripts/tests/test-*.el; do \