From 6b2b71b20dcec1cada79a7999c77862d9245032e Mon Sep 17 00:00:00 2001 From: Chris Henesy Date: Mon, 12 Oct 2026 13:57:29 -0400 Subject: [PATCH 1/7] test(failing): reviewer-contracts eval for TDD 0075 obs 1-4b Text checks (by necessity) for the design-reviewer and build-reviewer contracts, FR-110 non-findings across reviewers with a readable-first negated category-dismissal grep, /build-tdds steps 6/9/10, and the /tdd-author design-PR body. Red against current code. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01NpGG21Y2VGGhTQaFr4oshB --- tests/reviewer-contracts.test.sh | 199 +++++++++++++++++++++++++++++++ 1 file changed, 199 insertions(+) create mode 100755 tests/reviewer-contracts.test.sh diff --git a/tests/reviewer-contracts.test.sh b/tests/reviewer-contracts.test.sh new file mode 100755 index 0000000..c44c964 --- /dev/null +++ b/tests/reviewer-contracts.test.sh @@ -0,0 +1,199 @@ +#!/usr/bin/env bash +# reviewer-contracts.test.sh — eval for TDD 0075 / FR-108, FR-109, FR-110, +# FR-15(d), FR-10, FR-87: the shared reviewer contract. +# +# Observations 1–4b are text checks by necessity: a reviewer is model prose, +# so its contract is the prompt / skill text. Its behaviour is observed by +# parent-dispatched fixture runs (obs 6–8), never here. +# 1 design-reviewer: trace, [unverified], alternatives table, findings line, +# terminology/duplication passes, Non-findings, METRICS, verdict. +# 2 build-reviewer: frontmatter, inputs, ten rule headings, pre-existing +# rule (caller/callee clause), FAIL iff rule, REVIEW_RESULT line. +# 3 FR-110 across reviewers + a readable-first negated grep over every +# prompt file for category-dismissal phrases. +# 4 /build-tdds step 6 records base-sha; step 9 carries the +# parent-dispatched fixture protocol; step 10 dispatches by +# agents/build-reviewer.md with no checklist of its own. +# 4b /tdd-author 7b/9 carry trace, tables, METRICS, Non-findings into the +# design-PR body, holding the report text in-session, never in the draft. +# Every file is asserted readable first, and a missing file is a FAIL (L-001); +# every negated grep first asserts its input is readable (L-011). +# +# Written red-first. Run: bash tests/reviewer-contracts.test.sh +set -uo pipefail +REPO="$(cd "$(dirname "$0")/.." && pwd)" +DR="$REPO/agents/design-reviewer.md" +BR="$REPO/agents/build-reviewer.md" +UX="$REPO/agents/ux-reviewer.md" +SR="$REPO/agents/security-reviewer.md" +RR="$REPO/agents/requirements-reviewer.md" +IMPL="$REPO/skills/implement/SKILL.md" +TA="$REPO/skills/tdd-author/SKILL.md" +RESULTS="" +cleanup() { [ -n "$RESULTS" ] && rm -f "$RESULTS"; } +trap cleanup EXIT +RESULTS="$(mktemp)" +ok() { printf 'ok\n' >>"$RESULTS"; printf ' ok — %s\n' "$1"; } +bad() { printf 'fail\n' >>"$RESULTS"; printf ' FAIL — %s\n' "$1"; } +readable() { [ -r "$1" ] && [ -s "$1" ]; } +# norm — the file line-joined with runs of whitespace squeezed, so a +# phrase wrapped across lines still matches. +norm() { tr '\n' ' ' <"$1" | tr -s ' \t' ' '; } +# has