AGENTS.md · diff
git:20260916.636bf9f to git:20260920.0309516
17 added, 8 removed. Audit A to A.
# AGENTS.md — zlog contributor workflow
## Commit & merge workflow
1. Verify before every commit (see below).
2. Agent merges to `main` itself once verification passes — no review wait, no PR gate.
3. After merge, report back to the user with what changed and the verification evidence.
## Verification before every commit
- - `bash -n` on all bash snippets extracted from `SKILL.md` and `README.md`.
- - `bash -n install.sh` to verify installer syntax.
+ - `bash -n scripts/zlog.sh`, `bash -n install.sh`, `bash -n tests/test-posix.sh`.
+ - PowerShell parse check on `scripts/zlog.ps1` and `tests/test-powershell.ps1`
+ (must report 0 errors, including on stock PS 5.1 syntax rules).
- Frontmatter check: `SKILL.md` must start with `---` and contain
`name`, `description`, `license`, `compatibility`, `allowed-tools`.
- - Functional repro of the changed `find` logic in `/tmp` (pruned dirs must
- never leak into the compression list).
+ - Behavioral tests (not just syntax): `bash tests/test-posix.sh` and
+ `tests/test-powershell.ps1` must pass — they cover prune, symlink
+ escape, purge age/lock, stale artifacts, size guard, locks, restore.
+ - Any `find` predicate change must keep the symlink-escape fixture green.
- ## Sync rule
+ ## Sync rule (v2 architecture)
- `SKILL.md` is the source of truth. Every snippet change must be mirrored
- in `README.md` (POSIX standard + PowerShell sections) in the same commit.
- The Dry-Run preview snippet lives only in `SKILL.md` and is exempt.
+ - `scripts/` is the source of truth for implementation. `SKILL.md` is the
+ decision brain (no shell implementation inside it). `references/` holds
+ path/safety/format knowledge. `tests/` proves destructive behavior.
+ - `README.md` shows script *usage* only — never paste implementation
+ snippets into it.
+ - `install.sh` must install the full skill set (`SKILL.md`, `scripts/`,
+ `references/`) listed in its `SKILL_FILES`.
+ - `references/agent-paths.md` verification dates must be touched whenever
+ a root path changes.