docs(agents): add commit hygiene section mirroring serverAppConfigs

Imports the Git Workflow / Testing law from dank/serverAppConfigs: pull+clean tree, atomic early commits, bats+secret gate as commit precondition, push on green, imperative messages with Refs #N.
This commit is contained in:
Frank
2026-10-09 16:36:32 -07:00
parent 9255a8b865
commit 0ccdd46a97
+20
View File
@@ -36,6 +36,26 @@ with YAML frontmatter, spec at `omp-docs/references/okf-spec.md`).
- Trash convention: never `rm` anything user-authored — move it to `.AGENTTRASH/`
(gitignored). Deletion is a pruning session with Frank present.
### Commit hygiene (mirrors dank/serverAppConfigs)
The law is imported from the serverAppConfigs repo — checkout on the dev box at
`~/Projects/serverAppConfig`, see its `AGENTS.md` § *Git Workflow* and
§ *Testing* ("All edits flow through git", "tests are mandatory before
commit"). Applied here:
- `git pull` before starting new work; start from a clean tree. The checkout
IS the deployment here — a dirty tracked file is a half-deployed config
serving the live agent.
- Commit atomically and early: one commit = one complete functional unit,
never a pile of half-edited files; docs land in the same commit as the
change they document.
- `bats tests/` green + the pre-commit secret gate = the commit precondition;
the full suite runs at pre-push.
- Push to the local Gitea as soon as a unit is green — every other
workstation pulls from there. `git * --no-verify` is forbidden (the secret
gate is the point of the hook).
- Messages: imperative mood, what + why, `Refs #N` when a Gitea issue exists.
## Secret gate (HARD rule)
The pre-commit hook (`.githooks/pre-commit`, enabled via