Phase 6c-1: Enforce Closes #N in PR descriptions + strengthen post-merge reminder
Goal: Eliminate stale open issues by enforcing
Closes #N in PR descriptions and strengthening the post-merge documentation reminder.Owner: Dev agent
Repo:
forgejo_admin/claude-customDepends on: None (independent fix, discovered during Phase 6c)
Problem
19 stale issues accumulated across pal-e-docs (10) and claude-custom (9) because Dev agents never included
Closes #N in PR descriptions. Forgejo supports auto-closing issues on PR merge via keywords (closes, fixes, resolves) — this is enabled by default — but we never used it. The existing remind-update-docs.sh hook fires a text reminder after merge, but it's easy to ignore.Verified experimentally (2026-03-09): Created test issue #133, PR #134 with
Closes #133 in body, merged — issue auto-closed. Feature works out of the box on Forgejo 14.0.2.Fix
- Update
check-pr-template.shhook — PreToolUse onmcp__forgejo__submit_pr. Validate that PR body containsCloses #N,Fixes #N, orResolves #Npattern. Block submission (exit 2) if missing. - Update
remind-update-docs.shhook — Change from passive text reminder to a stronger enforcement. Options: (a) inject aSTOP-level reminder that Betty Sue cannot proceed without running/update-docs, or (b) block subsequent tool calls until/update-docsis invoked. Minimum: make the reminder impossible to miss. - Update Dev agent SOP (
agent-dev) — Document that PR body MUST includeCloses #Nreferencing the Forgejo issue. - Update
template-issue— Add a note in the Checklist section:- [ ] PR description includes Closes #N
Acceptance Criteria
- PR submission without
Closes #Nin body is blocked by hook - Post-merge reminder is impossible to ignore (not just advisory text)
- Dev agent SOP documents the requirement
- End-to-end verified: Dev PR → merge → issue auto-closed by Forgejo
Related
phase-postgres-6-vector-search— parent phase (discovered during 6c work)plan-2026-03-03-sprint-workflow-automation— PR lifecycle established herepr-lifecycle— the SOP this enforcesskill-update-docs— the skill that should run post-merge (Step 2 already says "close the issue")