Template
refactor: remove Makefile, restructure as knowledge-first framework
The primary value is the knowledge layer (markdown files that any agent reads — Crush, OpenWebUI, Hermes, Conduit on iPhone). CLI tooling (scripts, git hooks) is optional, for projects that use git/docker. Changes: - Remove Makefile entirely. All commands are now direct script invocations (bash scripts/check-rules.sh, bash scripts/setup-hooks.sh, etc.) - Add scripts/test.sh stub (replaces make test) - check-rules.sh: test-suite check now calls scripts/test.sh, not make test - Rewrite README as three-layer architecture: knowledge → git hooks → docker - Update all docs (AGENTS.md, BASELINE-PROMPT.md, ADOPTING.md, PATTERNS.md, STATUS.md) to remove every make reference The framework now works for: - CLI/harness users (git hooks + scripts + AGENTS.md) - Non-CLI users (BASELINE-PROMPT.md loaded into any agent's system prompt) 💘 Generated with Crush Assisted-by: Crush via Crush <crush@charm.land>
This commit is contained in:
@@ -107,7 +107,7 @@ fi
|
||||
# 3. Required-files manifest — the files every project using this template owns.
|
||||
# ----------------------------------------------------------------------------
|
||||
$RULE_VERBOSE && log_step "Required files"
|
||||
REQUIRED_FILES="AGENTS.md STATUS.md questions-v1.md .env.example Makefile scripts/check-rules.sh scripts/setup-hooks.sh"
|
||||
REQUIRED_FILES="AGENTS.md STATUS.md questions-v1.md .env.example scripts/check-rules.sh scripts/setup-hooks.sh"
|
||||
REQUIRED_FILES="$REQUIRED_FILES ${PROJECT_REQUIRED_FILES:-}"
|
||||
for f in $REQUIRED_FILES; do
|
||||
if [ -f "$f" ]; then check "$f exists" "pass"; else check "$f MISSING" "fail"; fi
|
||||
@@ -231,14 +231,14 @@ if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
||||
fi
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# 10. (slow, skipped in --fast) Project test suite via `make test` if present.
|
||||
# 10. (slow, skipped in --fast) Project test suite via scripts/test.sh.
|
||||
# ----------------------------------------------------------------------------
|
||||
if [ "$RULE_FAST" = false ] && [ -f Makefile ] && grep -qE '^test:' Makefile; then
|
||||
$RULE_VERBOSE && log_step "Test suite (make test)"
|
||||
if make test >/dev/null 2>&1; then
|
||||
check "make test passes" "pass"
|
||||
if [ "$RULE_FAST" = false ] && [ -x scripts/test.sh ]; then
|
||||
$RULE_VERBOSE && log_step "Test suite (scripts/test.sh)"
|
||||
if bash scripts/test.sh >/dev/null 2>&1; then
|
||||
check "scripts/test.sh passes" "pass"
|
||||
else
|
||||
check "make test FAILS" "fail"
|
||||
check "scripts/test.sh FAILS" "fail"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# Reports doc sprawl and files that violate the "Discourse is the system of
|
||||
# record for documentation; gitea .md files are stubs" policy. Run via
|
||||
# `make garden`. Findings are WARNINGS (advisory); fix them at a natural break.
|
||||
# `bash scripts/garden.sh`. Findings are WARNINGS (advisory); fix them at a natural break.
|
||||
#
|
||||
# What it checks:
|
||||
# 1. Markdown sprawl: count of .md files per directory (top-10 by count).
|
||||
|
||||
@@ -37,7 +37,7 @@ Git hooks installed. The following now run automatically:
|
||||
required files, doc freshness, Discourse pointers, WORKING.md
|
||||
completion, hygiene).
|
||||
Hot-path bypass for STATUS.md / WORKING.md.
|
||||
pre-push full rule audit (includes make test) + clean-working-tree gate.
|
||||
pre-push full rule audit (includes scripts/test.sh) + clean-working-tree gate.
|
||||
|
||||
Bypass either with \`git commit --no-verify\` / \`git push --no-verify\`
|
||||
(emergencies only).
|
||||
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
# test.sh — project test runner.
|
||||
# Override this per project. Default: no-op pass.
|
||||
# Invoked by check-rules.sh (full audit) and pre-push.
|
||||
set -euo pipefail
|
||||
echo "test.sh: no tests defined — override this in your project."
|
||||
Reference in New Issue
Block a user