---
mode: CREATE
adr_id: ADR-0.0.70
branch: main
timestamp: "2026-06-12T10:42:01Z"
agent: claude-code-8f8d8e8d
obpi_id: OBPI-0.0.70-01-stop-hook-turn-end-feedback
session_id: 8f8d8e8d-3e8a-45f2-b65f-0a71d10edfbc
continues_from: .gzkit/handoffs/20260612T094433Z-OBPI-0.0.70-01-reaped.md
last_lock_event_timestamp: "2026-06-12T10:06:49.488881+00:00"
last_commit_sha: 5f476d706a643a58decb674177b68d62adc177f2
---

<!-- Register entry coupling lock release for OBPI-0.0.70-01 (token-block § Sub-Invariant 5) -->

## ⚠️ This handoff ADVISES next moves — it is NOT authorization to execute them

On resume, present advised next steps to the operator and obtain explicit
authorization before executing any of them. You advise; the operator rules.

## Current State Summary

**OBPI-0.0.70-01-stop-hook-turn-end-feedback is COMPLETE and ATTESTED** (Gate 5
operator-verbatim "attest completed", attestor Jeffry Babb, 2026-06-12). The
gz-obpi-pipeline ran the full ceremony: plan-audit (retrospective PASS receipt
for implementation landed in commit `863250d6`), brief reconcile (clean), Stage 3
verification (6075 tests green, lint/typecheck clean, 11/11 OBPI-scoped tests),
Stage 4 evidence ceremony, and Stage 5 atomic completion via `gz obpi complete`.
Completion receipt emitted; brief status → Completed. This handoff is the
register entry coupling the lock release.

**Branch state:** `main`, 1 commit ahead of `origin/main` (the covers.py
direct-fix commit `5f476d70`); the OBPI governance edits and git-sync are the
next pipeline steps.

## Important Context

- `.claude/hooks/` and `.claude/settings.json` are GENERATED surfaces owned by
  `setup_claude_hooks`; the Stop hook's canonical template lives in
  `src/gzkit/hooks/scripts/quality.py` and the `Stop` phase is gzkit-owned in
  `generate_claude_settings` / `merge_settings` / `detect_claude_settings_drift`.
  Never hand-edit the generated `.claude/hooks/stop-turn-feedback.py` directly.
- The Stop hook is now ACTIVE in this repo — it runs `ruff check` over git-dirty
  Python at every turn end and blocks on findings (fail-open; `GZ_STOP_FEEDBACK=off`
  disables it).
- `src/gzkit/hooks/scripts/quality.py` is a registered `subprocess_user_input`
  security surface; completion used `--accept-security-floor` (GHI #462) because
  the subprocess surface is structurally defensive (list-form argv, git-derived
  paths, no shell, fail-open) and the security-scan canonical slot is unfilled
  pending pool.agentic-security-review.

## Decisions Made

- **Decision:** Routed the `gz covers` project_root omission as a standalone
  direct-fix commit (`5f476d70`), not bundled into the OBPI ceremony.
  **Rationale:** Defect-fix routing thresholds met (1 line, 1 file, in-flight
  trigger, 361 recent `fix(` precedents, regression test added); the covers bug
  is cross-cutting (affects all STRUCTURAL-FENCE REQs), not OBPI-scoped.
  **Alternatives rejected:** Bundling into the OBPI commit (obscures the
  cross-cutting nature); deferring via GHI (the fix was needed to resolve
  REQ-0.0.70-01-07's fence proof and was minimal + verified).
- **Decision:** Declared `req_atomic` for all 9 REQs (GHI #590).
  **Rationale:** The Stop hook is one cohesive deliverable; each REQ maps 1:1 to
  one test class with no separable labor below it.
  **Alternatives rejected:** seq>01 subdivision (no genuine multi-step labor
  existed per REQ).
- **Decision:** Applied `--accept-security-floor` override.
  **Rationale:** Subprocess surface is structurally defensive and the
  security-scan infrastructure slot is unfilled; the override is the intended
  path (GHI #462).

## Immediate Next Steps

1. Continue gz-obpi-pipeline Stage 5: git-sync #1 (`uv run gz git-sync --apply`)
   to commit OBPI governance edits, then `gz obpi reconcile`, then git-sync #2.
2. Consider the next ADR-0.0.70 increment: OBPI-0.0.70-02 (session-correction-
   mining chore), OBPI-0.0.70-03 (guardrail-feedback-prose rule — note its rule
   file already exists at `.claude/rules/guardrail-feedback-prose.md`), and
   OBPI-0.0.70-04 (fourth-source doctrine triangulation + campaign B.0 cross-link).
3. Campaign item B.0 (ADR-0.0.70 Buetow adoption) advances toward closeout once
   all four OBPIs land.

## Pending Work / Open Loops

- OBPI-0.0.70-02, -03, -04 remain (ADR-0.0.70 is 1/4 OBPIs complete).
- Parent ADR-0.0.70 closeout pending all four OBPIs + ADR-level Gate 5.
- The 4 pre-existing `ty: ignore` advisory warnings in
  `src/gzkit/complexity/advisor/timeout.py` are unrelated to this OBPI (noted,
  not in scope).

## Verification Checklist

- [ ] `uv run -m unittest -q` passes (was 6075 green this session)
- [ ] Branch matches: `git branch --show-current` → `main`
- [ ] `uv run gz obpi reconcile OBPI-0.0.70-01-stop-hook-turn-end-feedback` agrees
- [ ] `uv run gz covers OBPI-0.0.70-01-stop-hook-turn-end-feedback` → behavior_uncovered_reqs=0

## Evidence / Artifacts

- `.claude/hooks/stop-turn-feedback.py` — generated Stop hook (delivered)
- `tests/hooks/test_stop_turn_feedback.py` — 11 unit tests
- `src/gzkit/commands/covers.py` — project_root forwarding fix
- `tests/test_req_kind_fence_channel.py` — covers_cmd regression test
- `docs/design/adr/foundation/ADR-0.0.70-turn-end-feedback-and-correction-mining/obpis/OBPI-0.0.70-01-stop-hook-turn-end-feedback.md` — completed brief
- `.claude/plans/OBPI-0.0.70-01-stop-hook-turn-end-feedback.md` — retrospective plan

## Environment State

Python 3.13; macOS (darwin). Stop hook active in repo (`GZ_STOP_FEEDBACK=off` to disable).
