A3 from the 2026-05-16 BDD/Gherkin/XP loop audit. GOALS.md Directive 12
declared scripts/check-loop-shape.sh but the script did not exist, so
non-trivial beads could claim the operating loop with no mechanical
warning when Gherkin or slice candidates were missing (declared gates: 0
of 1 implemented -> 1 of 1).
check-loop-shape.sh inspects bd JSON (open + in_progress beads, or a
--json fixture) and warns when a bead labeled non-trivial lacks a
Gherkin block (Given/When/Then) or a slice candidate. Warn-only posture:
exits 0 always; --strict (or AGENTOPS_LOOP_SHAPE_STRICT=1) exits 1 on
offenders, reserved for the flip to blocking. Built-in --self-test
covers four fixture beads (good / no-gherkin / no-slice / trivial).
Mirrors the check-corpus-freshness.sh shape: jq-based, skips cleanly on
missing tools, wired into pre-push-gate.sh as an always-run warn block
next to the corpus-freshness gate. GOALS.md Directive 12 updated to
drop "to be added" and document the live posture.
Closes soc-z3qo.3