Template
Apply answers to questions-v1.md (Q1–Q5):
- Q4: Remove crush.json and hooks/ entirely. All enforcement is now portable
via git hooks (pre-commit/pre-push) + check-rules.sh + AGENTS.md prose.
Works under Crush, OpenWebUI, Hermes, or any agent framework.
- Q5: Remove docs/JOURNAL.md. Redmine is the system of record for work;
Discourse for docs. JOURNAL.md was a stopgap.
- Q3: Add mandatory Discourse pointer-header check to check-rules.sh. Any
non-exempt tracked .md without a Discourse URL FAILs. All projects, no
exceptions.
- Q2: Reference real CLI container invocation paths
(KNEL-AIMiddleware/{redmine,discourse}-cli/) in AGENTS.md instead of the
missing bin/ shortcuts.
- Q1: Note tea + docker login are preconfigured on TSYS workstations.
Also: make test default is now no-op pass so the template self-validates;
make validate now passes clean on the repo itself (17 PASS / 0 FAIL).
💘 Generated with Crush
Assisted-by: Crush via Crush <crush@charm.land>
60 lines
2.5 KiB
Makefile
60 lines
2.5 KiB
Makefile
# Makefile — the single standard task-entry surface for this project.
|
|
#
|
|
# Every project using the template exposes the SAME targets, so CI, hooks,
|
|
# and humans all know one set of verbs regardless of the underlying stack.
|
|
# Each target delegates to scripts/ so the logic is shellcheck-able and
|
|
# runnable anywhere (the Makefile is pure dispatch).
|
|
#
|
|
# Targets:
|
|
# make setup install git hooks (idempotent)
|
|
# make validate run the full rule audit
|
|
# make fast run the fast rule audit (pre-commit equivalent)
|
|
# make lint lint (shellcheck via docker)
|
|
# make test run the test suite <-- override for your stack
|
|
# make garden doc-sprawl / Discourse-migration report
|
|
# make up bring up the docker-compose stack
|
|
# make down bring it down
|
|
# make status show repo status snapshot
|
|
# make clean remove build/test artifacts <-- override for your stack
|
|
#
|
|
# Override `test` and `clean` per project; the rest are stable.
|
|
|
|
.PHONY: setup validate fast lint test garden up down status clean help
|
|
|
|
help: ## Show available targets
|
|
@grep -E '^[a-zA-Z_-]+:.*?## ' $(MAKEFILE_LIST) | awk 'BEGIN{FS=":.*?## "}{printf " \033[36m%-12s\033[0m %s\n", $$1, $$2}'
|
|
|
|
setup: ## Install git hooks
|
|
@bash scripts/setup-hooks.sh
|
|
|
|
validate: ## Full rule audit (includes tests)
|
|
@bash scripts/check-rules.sh
|
|
|
|
fast: ## Fast rule audit (pre-commit equivalent)
|
|
@bash scripts/check-rules.sh --fast
|
|
|
|
lint: ## Lint shell scripts (shellcheck via docker)
|
|
@docker run --rm -v "$$(pwd):/mnt" koalaman/shellcheck:stable \
|
|
$$(find . -path ./.git -prune -o -path ./.tmp -prune -o -path ./vendor -prune -o -path ./node_modules -prune -o \( -name '*.sh' -o -name '*.bash' \) -print | sed 's|^\./|/mnt/|') || true
|
|
|
|
test: ## Run the test suite (override per project; default no-op pass)
|
|
@echo "make test: no test target defined — override this in your project's Makefile."
|
|
|
|
garden: ## Doc-sprawl / Discourse-migration report
|
|
@bash scripts/garden.sh
|
|
|
|
up: ## Bring up the docker-compose stack
|
|
@bash scripts/up.sh
|
|
|
|
down: ## Bring down the docker-compose stack
|
|
@bash scripts/down.sh
|
|
|
|
status: ## Show a repo status snapshot
|
|
@echo "== branch =="; git branch --show-current 2>/dev/null || echo "(no branch)"
|
|
@echo "== last commit =="; git log --oneline -1 2>/dev/null || true
|
|
@echo "== working tree =="; git status --short 2>/dev/null || echo "(not a git repo)"
|
|
@echo "== STATUS.md head =="; sed -n '1,12p' STATUS.md 2>/dev/null || echo "(no STATUS.md)"
|
|
|
|
clean: ## Remove build/test artifacts (override per project)
|
|
@echo "make clean: nothing to clean — override this in your project's Makefile."
|