Template
9dc85ba41e0037d182a5f518514f9807e78c402b
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>
meta — cross-project best-practices template
This repo serves two purposes at once:
- It is a Gitea template repository. Create new projects from it to inherit the full best-practices stack from the start (AGENTS.md, git hooks, Crush hooks, rules engine, Makefile, lifecycle scripts, gardening).
- It is the design source that maintains the global baseline prompt and the
cross-project pattern extraction. New projects can delete
BASELINE-PROMPT.mdandPATTERNS.mdif they don't want the authoring context — or keep them as reference.
What you get when you create a project from this template
<new-project>/
├── AGENTS.md ← fill in the bracketed fields, delete the rest
├── crush.json ← 5 Crush PreToolUse hooks (behavioral guardrails)
├── hooks/ ← block-todos, enforce-bash, enforce-rules, audit-before-git, exit-protocol
├── scripts/
│ ├── setup-hooks.sh ← install git hooks (run once: make setup)
│ ├── pre-commit / pre-push ← fast audit / full audit + clean-tree gate
│ ├── check-rules.sh ← rule audit engine (shellcheck, image pin, container naming, required files, freshness, hygiene, tests)
│ ├── docker-run.sh ← canonical ephemeral-container wrapper
│ ├── up.sh / down.sh ← docker-compose lifecycle wrappers
│ ├── garden.sh ← doc-sprawl / Discourse-migration report
│ └── lib/common.sh ← shared bash library (colors, log_*, docker_run, check)
├── Makefile ← setup/validate/fast/lint/garden/up/down/status/clean
├── STATUS.md ← agent scratchpad (token-efficiency; has Inbox)
├── WORKING.md ← the only task tracker (todos tool banned)
├── questions-v1.md ← git-tracked question log for the human
├── docs/JOURNAL.md ← append-only decision & pattern log
├── docker-compose.yml.example ← lifecycle template (copy to docker-compose.yml)
├── .env.example ← secrets/config template
├── .gitignore
├── .crush/memory/operational.md ← per-session operational memory skeleton
├── BASELINE-PROMPT.md ← the global working principles (delete if unwanted)
└── PATTERNS.md ← the pattern extraction analysis (delete if unwanted)
Quick start (for a new project)
# Create from this Gitea template, then:
cd my-new-project
git init # if not already
make setup # install git hooks
make fast # confirm baseline passes
# Fill in bracketed fields in AGENTS.md (project name, overview, model, etc.)
# Define `make test` for your stack
# Delete BASELINE-PROMPT.md and PATTERNS.md if you don't want them
What it enforces
| Layer | What | How |
|---|---|---|
| Git hooks | mechanical checks at commit/push | scripts/pre-commit (fast audit + hot-path bypass), scripts/pre-push (full audit + clean-tree gate) |
| Crush hooks | behavioral guardrails at tool-call time | hooks/ wired in crush.json: ban todos, block banned commands + host language tools, block banned file types, audit before git ops, exit protocol |
| Rules engine | shellcheck, image pinning, container naming, required files, doc freshness, WORKING.md completion, CNW markers, hygiene, test suite | scripts/check-rules.sh (--fast for pre-commit, --quiet for pre-push) |
| Makefile | standard verbs everywhere | make setup/fast/validate/lint/test/garden/up/down/status/clean |
Configurable via env without editing hooks: PROJECT_BANNED_COMMANDS,
PROJECT_BANNED_SUFFIXES, PROJECT_BANNED_ALLOW, PROJECT_SOURCE_SUFFIXES,
PROJECT_REQUIRED_FILES.
The two extra docs (meta-authoring, optional)
- BASELINE-PROMPT.md — the canonical global working principles (13 sections), distilled from operating notes. Projects inherit it; they don't need to ship it.
- PATTERNS.md — the cross-project pattern extraction from 18 projects across two machines, with a standardization scorecard. Documents why every template decision was made.
Languages
Shell
93.1%
Makefile
6.9%