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:
@@ -13,12 +13,12 @@ enforce the mechanical rules below; this document states the policy and intent.
|
||||
|
||||
**You are an AI agent working on this project. Your first actions, in order:**
|
||||
|
||||
1. **Set up the environment:** `make setup` (installs git hooks — idempotent).
|
||||
1. **Set up the environment:** `bash scripts/setup-hooks.sh` (installs git hooks — idempotent).
|
||||
2. **Read [STATUS.md](STATUS.md)** — current state, inbox, blockers, tactical notes.
|
||||
3. **Read [`.crush/memory/operational.md`](.crush/memory/operational.md)** — access details, key IDs, gotchas.
|
||||
4. **Read [questions-v1.md](questions-v1.md)** — open questions awaiting human input.
|
||||
5. **Check Redmine** — `redmine list --assigned-to-me -p <project-id>` for active work.
|
||||
6. **Check current state:** `git log --oneline -10` and `make status`.
|
||||
6. **Check current state:** `git log --oneline -10`.
|
||||
|
||||
## Project Overview
|
||||
|
||||
@@ -45,11 +45,11 @@ Replace this bracketed text.>
|
||||
│ ├── pre-commit ← fast rule audit (hot-path bypass for status/working)
|
||||
│ ├── pre-push ← full audit + clean-tree gate
|
||||
│ ├── check-rules.sh ← the rule audit engine (pass/warn/fail accumulator)
|
||||
│ ├── test.sh ← project test runner (override per project)
|
||||
│ ├── 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 ← standard targets: setup/validate/fast/lint/test/garden/up/down/status
|
||||
├── docker-compose.yml.example ← lifecycle template (copy to docker-compose.yml)
|
||||
├── .env.example ← copy to .env, fill in secrets
|
||||
└── .crush/memory/ ← operational memory read each session (if using Crush)
|
||||
@@ -128,7 +128,7 @@ docker run --rm --env-file ~/projects/KNEL-AIMiddleware/discourse-cli/.env \
|
||||
## CI/CD
|
||||
|
||||
- The **local workstation must be able to run the same CI/CD** the hosted infrastructure runs. Maintain them in lockstep.
|
||||
- **Shift left:** catch issues at `make fast` (pre-commit) before push, before PR, before merge.
|
||||
- **Shift left:** catch issues at `bash scripts/check-rules.sh --fast` (pre-commit) before push, before PR, before merge.
|
||||
|
||||
## Conventions
|
||||
|
||||
@@ -146,22 +146,20 @@ docker run --rm --env-file ~/projects/KNEL-AIMiddleware/discourse-cli/.env \
|
||||
## Key Commands
|
||||
|
||||
```bash
|
||||
make setup # install git hooks (run once after clone)
|
||||
make fast # fast rule audit (pre-commit equivalent)
|
||||
make validate # full audit (includes the test suite)
|
||||
make lint # shellcheck via docker
|
||||
make test # run the test suite (define per project)
|
||||
make garden # doc-sprawl / Discourse-migration report
|
||||
make up # bring up the docker-compose stack
|
||||
make down # bring it down
|
||||
make status # repo status snapshot
|
||||
bash scripts/setup-hooks.sh # install git hooks (run once after clone)
|
||||
bash scripts/check-rules.sh --fast # fast rule audit (pre-commit equivalent)
|
||||
bash scripts/check-rules.sh # full audit (includes test suite)
|
||||
bash scripts/test.sh # run the test suite (override per project)
|
||||
bash scripts/garden.sh # doc-sprawl / Discourse-migration report
|
||||
bash scripts/up.sh # bring up the docker-compose stack
|
||||
bash scripts/down.sh # bring it down
|
||||
```
|
||||
|
||||
## Enforcement Model (belt and suspenders)
|
||||
|
||||
Policy is enforced by **git hooks** (portable, harness-agnostic): `scripts/pre-commit`
|
||||
runs a fast rule audit; `scripts/pre-push` runs the full audit + clean-tree gate.
|
||||
Install with `make setup`. The checks are in `scripts/check-rules.sh` and cover:
|
||||
Install with `bash scripts/setup-hooks.sh`. The checks are in `scripts/check-rules.sh` and cover:
|
||||
shellcheck, image pinning, container naming, required files, doc freshness,
|
||||
Discourse pointer-headers, WORKING.md completion, CNW markers, hygiene, and the test suite.
|
||||
|
||||
@@ -177,7 +175,7 @@ Bypass with `--no-verify` in genuine emergencies only.
|
||||
- Read STATUS.md, questions file, operational memory, and Redmine BEFORE starting work.
|
||||
- Write a failing test first (TDD).
|
||||
- Read files before editing. Use exact text matching.
|
||||
- Run `make validate` before committing.
|
||||
- Run `bash scripts/check-rules.sh` before committing.
|
||||
- Use sub-agents to parallelize scoped work.
|
||||
- Log interruptions to the STATUS.md Inbox.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user