docs(rules): mandate Unix utilities for editing, codify host hygiene

Add three policy updates to AGENTS.md and BASELINE-PROMPT.md:

1. Prefer awk/sed/grep/cut/tr for file editing over built-in harness
   edit tools, which can be unreliable with whitespace and indentation.
2. Host hygiene is inviolable: only git, docker, and Unix utilities on
   the host. One-off tools get docker-pulled; broadly useful tools get
   a Redmine ticket for the human to install via package manager.
3. Never install language runtimes or non-base tools on the host.

💘 Generated with Crush

Assisted-by: Crush
This commit is contained in:
2026-08-10 09:23:41 -05:00
parent 5aa6368ed4
commit 9836e94e48
2 changed files with 8 additions and 0 deletions
+4
View File
@@ -131,6 +131,7 @@ docker run --rm --env-file ~/projects/KNEL-AIMiddleware/discourse-cli/.env \
- **Stop over-thinking.** Get to code and output faster. Explore with code; gather ground truth. Do not burn tokens reasoning about things a quick command answers.
- **Ask questions early** via `questions-v(N).md`. Don't ruminate or self-debate at length.
- **Prefer Unix utilities (awk, sed, grep, cut, tr, etc.) for file editing and text processing** over built-in edit tools when feasible. Harness edit tools can be unreliable with whitespace/indentation; Unix tools are deterministic and exact. Use them for surgical edits, bulk substitutions, and structured text extraction.
- **Farm work out to deterministic tooling:** linters, LSPs, formatters, test runners. If an LSP is wired up, use it; otherwise pull a Docker image and lint inside it. Do not parse huge code blocks in context.
- **Use sub-agents as subcontractors** (see BASELINE-PROMPT.md §12): scoped spec in, distilled deliverable out. Never read 10+ files sequentially; batch into 2-3 agent calls. Read the 3-4 files you'll edit yourself; delegate the rest.
@@ -141,6 +142,9 @@ docker run --rm --env-file ~/projects/KNEL-AIMiddleware/discourse-cli/.env \
## Conventions
- **Host hygiene is inviolable.** The host runs only: `git`, `docker`, and standard Unix utilities (`awk`, `sed`, `grep`, `cut`, `tr`, `jq`, `find`, `xargs`, etc.). No language runtimes, no package-managed tools beyond the base OS.
- **If a one-off utility would help on the host,** `docker pull` a pinned image and run it ephemerally. Do not install it on the host.
- **If a tool would be broadly useful across projects,** create a Redmine ticket requesting the human add it via the system package manager. Do not install it yourself.
- **Docker/Kubernetes for everything** — cluster of 1 or 100 is the same. Don't presume scale.
- **All development work happens in containers** — custom, off-the-shelf, or a mix. `docker pull` freely without asking. Use `scripts/docker-run.sh <pinned-image>` for one-offs.
- **Container naming: never use Docker's default.** Always name with a project prefix (e.g. `<project>-<service>`). Enforced by `check-rules.sh`.