De to maskinelle sjekkene paa at planrevisjonen holder laa i en scratchpad og var i ferd med aa bli borte (samme naeromkomst som oekt 2s script). Flyttet inn i repoet, gjort sted-uavhengige (repo-roten resolveres fra $0) og med en guard naar plan.md/brief.md mangler -- de er local-only paa denne offentlige remoten, og «fant ingenting» skal ikke lese som «alt groent» (exit 2, ikke 0). Kjoert fra tests/plan-gates/ etter flyttingen: brief_criteria.sh PASS=33 FAIL=0 stale_text.sh PASS=12 FAIL=0 Negativkontroll: mot en tom plan gir brief_criteria.sh PASS=6 FAIL=27 og exit 1, og manglende fil gir SKIP + exit 2. Gaten kan altsaa feile. PM-autorisert forsteg (amendment til ordre 20260904T150903Z), utenfor planens sesjon-1-gjerde. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
57 lines
3.6 KiB
Bash
Executable file
57 lines
3.6 KiB
Bash
Executable file
#!/bin/bash
|
|
# The twelve greps behind the "Foreldet tekst" table in
|
|
# docs/2026-09-04-kvalitetsrevisjon-planlegging.md. Moved into the repo
|
|
# 2026-09-04 (PM amendment) so the revision has a machine check that survives
|
|
# the scratchpad. Runnable from anywhere: the repo root is resolved from this
|
|
# script's own location.
|
|
#
|
|
# Scope: LIVE instruction text only. The `## Revisions` log and passages that
|
|
# quote the brief's wording in order to disclaim it are the record of the fix,
|
|
# not the defect; greps 1-4 exclude them by construction.
|
|
#
|
|
# plan.md and brief.md live under .claude/projects/, gitignored on this public
|
|
# remote (.gitignore:19). A fresh clone has nothing to gate -- that is a missing
|
|
# measurement, not a pass, and exits 2.
|
|
SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
|
|
ROOT=$(cd "$SCRIPT_DIR/../.." && pwd)
|
|
D="$ROOT/.claude/projects/2026-09-03-jobbsok-plugin-build"
|
|
P="$D/plan.md"
|
|
B="$D/brief.md"
|
|
for f in "$P" "$B"; do
|
|
if [ ! -f "$f" ]; then
|
|
echo "SKIP not found: $f"
|
|
echo " (local-only artefact; nothing was measured -- this is not a pass)"
|
|
exit 2
|
|
fi
|
|
done
|
|
LIVE=$(mktemp -t jobbsok-plan-live) || exit 2
|
|
trap 'rm -f "$LIVE"' EXIT
|
|
sed -n '1,/^## Revisions/p' "$P" | sed '$d' > "$LIVE"
|
|
pass=0; fail=0
|
|
chk() { if [ "$2" = "$3" ]; then echo "PASS $1 ($2)"; pass=$((pass+1));
|
|
else echo "FAIL $1 (got '$2', want '$3')"; fail=$((fail+1)); fi; }
|
|
|
|
# 1-2 blocker 9: no zip -r survives as an instruction in either file
|
|
chk "1 plan zip -r as instruction" "$(grep -n 'zip -r' "$LIVE" | grep -viE '\*\*not\*\*|is not |never|instead' | wc -l | tr -d ' ')" "0"
|
|
chk "2 brief zip -r as instruction" "$(grep -n 'zip -r' "$B" | grep -viE '\*\*not\*\*|is not |Not `zip|never|instead' | wc -l | tr -d ' ')" "0"
|
|
# 3-4 finding 2: "the version-echo skill" survives only as a quoted deviation
|
|
chk "3 brief version-echo skill" "$(grep -ci 'the version-echo skill' "$B" | tr -d ' ')" "0"
|
|
chk "4 plan version-echo unquoted" "$(grep -n 'the version-echo skill' "$LIVE" | grep -vc 'phrase "the version-echo skill"' | tr -d ' ')" "0"
|
|
# 5 blocker 15: step 20's unqualified reader claim is gone
|
|
chk "5 writes nothing: reader" "$(grep -c 'The script writes nothing: it is a reader' "$P" | tr -d ' ')" "0"
|
|
# 6 finding 2: step 23 carries the dagens version echo
|
|
chk "6 step23 BUILD_STAMP" "$(sed -n '/^### Step 23:/,/^### Step 24:/p' "$P" | grep -c 'BUILD_STAMP' | tr -d ' ')" "3"
|
|
# 7 blocker 8/9: session 4 fence carries step 13's three files
|
|
chk "7 session4 fence" "$(sed -n '/^### Session 4:/,/^### Session 5:/p' "$P" | grep -o 'package_plugin.sh\|test_plugin_manifest.py\|`.gitignore`' | sort -u | wc -l | tr -d ' ')" "3"
|
|
# 8 blocker 16: session 8 fence carries the probe record
|
|
chk "8 session8 fence probe" "$(sed -n '/^### Session 8:/,/^### Session 9:/p' "$P" | grep -c 'docs/cowork-probe.md' | tr -d ' ')" "1"
|
|
# 9 blocker 8: .gitignore is a manifest deliverable of step 13
|
|
chk "9 step13 gitignore manifest" "$(sed -n '/^### Step 13:/,/^### Step 14:/p' "$P" | grep -c '\- \.gitignore\|path: \.gitignore' | tr -d ' ')" "2"
|
|
# 10 blocker 16: step 31's probe is recorded and gated
|
|
chk "10 step31 connector-hook" "$(sed -n '/^### Step 31:/,/^### Step 32:/p' "$P" | grep -c 'Connector-hook' | tr -d ' ')" "3"
|
|
# 11 blocker 15: --check named in every Cowork step that can run it (M2-M6)
|
|
chk "11 cowork --check" "$(grep -c 'sak_status.py --workspace "\$WS" --check' "$P" | tr -d ' ')" "9"
|
|
# 12 trekplan high-effort: the Pass 2 marker exists as a heading
|
|
chk "12 Pass 2 heading" "$(grep -c '^## Adversarial Pass 2' "$P" | tr -d ' ')" "1"
|
|
echo "----"; echo "PASS=$pass FAIL=$fail"
|
|
[ "$fail" -eq 0 ]
|