From 7408995fb34b8552f5fe0ed503252195010f0670 Mon Sep 17 00:00:00 2001 From: Ralf Anton Beier Date: Fri, 7 Aug 2026 07:17:20 +0200 Subject: [PATCH] fix(repo-hygiene): quiesce check must match the command name, not the path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Step 0's `ps aux | grep -E 'cargo|rustc|bazel'` matches any binary installed under ~/.cargo/bin, plus anything whose arguments mention such a path. On a normal developer machine it is near-permanently non-empty, so the sweep would abort every time — the skill's first gate made the skill unusable. Reproduced independently on an idle machine: the old check returns 5 matches, `pgrep -x 'cargo|rustc|bazel'` returns 0. Switches to pgrep -x, notes the portable `ps -eo comm=` equivalent, and warns that the same name-vs-path care applies anywhere the skill greps ps. Also adds the anti-pattern the reporter named: a precondition that cries wolf gets routed around by habit, and is then ignored the once it fires for real — the human-factors twin of the vacuous gate. A guard that misfires is a bug in the guard, not something to learn to skip. repo-hygiene 0.1.0 -> 0.1.1; plugin 0.16.1 -> 0.16.2. Closes #149 Co-Authored-By: Claude Opus 4.8 (1M context) --- .../.claude-plugin/plugin.json | 2 +- .../skills/repo-hygiene/SKILL.md | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/claude-tooling/plugins/pulseengine-claude/.claude-plugin/plugin.json b/claude-tooling/plugins/pulseengine-claude/.claude-plugin/plugin.json index 2f1b5e2..382028d 100644 --- a/claude-tooling/plugins/pulseengine-claude/.claude-plugin/plugin.json +++ b/claude-tooling/plugins/pulseengine-claude/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "pulseengine-claude", - "version": "0.16.1", + "version": "0.16.2", "description": "PulseEngine methodology as installable Claude Code tooling \u2014 philosophy + toolchain + repo-taxonomy + model-operating-contract memory, memory-persistence hooks (situational awareness at session start, working-context checkpoints across sessions/compaction), plus sixteen procedural skills (clean-room verification, release execution with a V-model traceability gate, oracle-gating, the full feature loop, the standardized release-artifact pipeline, tool-friction reporting, session-learning capture, STPA/STPA-Sec hazard-analysis audit, backend-agnostic proof synthesis, full bidirectional traceability audit across the V, greenfield verification bootstrap, release planning with an issue-driven delivery loop, an incremental issue-hunt loop, a quiesce-gated post-release repo-hygiene sweep, and a gate-potency audit that proves standing CI checks can still fail).", "author": { "name": "PulseEngine", diff --git a/claude-tooling/plugins/pulseengine-claude/skills/repo-hygiene/SKILL.md b/claude-tooling/plugins/pulseengine-claude/skills/repo-hygiene/SKILL.md index 333214b..589e752 100644 --- a/claude-tooling/plugins/pulseengine-claude/skills/repo-hygiene/SKILL.md +++ b/claude-tooling/plugins/pulseengine-claude/skills/repo-hygiene/SKILL.md @@ -27,9 +27,14 @@ The sweep is written for multi-agent campaigns, and in one a background lane may own the working tree, a worktree, or a cache *right now*. Assert idle first, or the sweep races live work and corrupts it: -- **No compiler running.** `ps aux | grep -E 'cargo|rustc|bazel'` is empty. A - step-6 `rm -rf` on a `target/` an active build is writing is corruption, not - reclaim. +- **No compiler running.** `pgrep -x 'cargo|rustc|bazel'` is empty. A step-6 + `rm -rf` on a `target/` an active build is writing is corruption, not reclaim. + **Match the command *name*, not the command line:** `ps aux | grep cargo` also + matches every tool installed under `~/.cargo/bin`, so on a normal developer + machine it is near-permanently non-empty and would abort every valid sweep. + (`ps -eo comm= | awk -F/ '{print $NF}' | grep -cxE 'cargo|rustc|bazel'` is the + portable equivalent.) The same name-vs-path care applies anywhere this skill + greps `ps`. - **No agent owns the tree.** No agent lock held (e.g. `.claude/scheduled_tasks.lock`), no background implementer mid-edit — `git status` in the root *and* every worktree shows only what you expect. @@ -192,6 +197,11 @@ issue-hunt watermarks: hygiene closes what shipped; issue-hunt triages what's ne - **Sweeping under live work** — every step mutates; a running build or a mid-edit agent turns the sweep into corruption. Quiesce (step 0) first. +- **A precondition that cries wolf** — a check that reports "busy" on a machine + that is idle gets routed around by habit, and then the once it fires for real + it is ignored. This is the human-factors twin of the vacuous gate: one check + can never fail, the other always "fails", and neither carries information. + A guard that misfires is a bug in the guard — fix it, don't learn to skip it. - **`git branch --merged` (or `git cherry`) as squash-merge detectors** — both miss squashes (verified); `--merged` sees the tip as unmerged and `git cherry` flags it `+` on a patch-id mismatch. Verify content shipped by merged PR, a