Review: Expand check-note-template.sh for new types (r3)
Verdict: READY
Template Completeness
- [x] Type — Feature
- [x] Lineage — Related to claude-custom #180 (spike)
- [x] Repo — forgejo_admin/claude-custom
- [x] User Story — PM (Betty Sue) wants template enforcement so agents can't create non-compliant notes
- [x] Context — Sufficient: explains audit gap (2 of 17 types), Wave 4 enforcement
- [x] File Targets — Specific: 1 file to modify, 2 files explicitly excluded
- [x] Acceptance Criteria — 8 ACs, all testable create-and-verify patterns
- [x] Test Expectations — Manual hook testing via Claude Code session
- [x] Constraints — Correct: create_note only (verified against settings.json), all 6 templates exist
- [x] Checklist — Present
- [x] Related — Links to project and parent spike
Traceability
- [x] story:pm-scope — present on board item #483
- [x] arch:hooks — present on board item #483
- [x] Forgejo issue — forgejo_admin/claude-custom#183, open
File Targets
- [x] hooks/check-note-template.sh — verified exists at ~/claude-custom/hooks/check-note-template.sh. Currently routes on tags only (project-page, issue). Needs case branches for note_type routing.
- [x] hooks/check-issue-template.sh — correctly listed as NOT to touch, verified exists
- [x] hooks/check-board-item.sh — correctly listed as NOT to touch, verified exists
Repo Placement
Correct. Issue filed on forgejo_admin/claude-custom, file target is in that repo. Single repo scope.
Dependencies
- [x] Board #486 (Create template notes for new types) — done. All 6 templates verified to exist: template-review, template-architecture, template-user-story, template-sop, template-convention, template-validation
- [x] Board #484 (Update note-conventions for 14-type system) — done
- [x] Board #480 (Add 4 new NoteTypes + validation BoardColumn) — done
- [x] Parent spike #478 (issue #180) — in_progress, but this ticket is a child deliverable scoped from it, not blocked by it
Acceptance Criteria
8 ACs, all testable. Each follows the same pattern: create a note of type X with missing headings, verify blocked. Plus 1 negative test (doc type passes through) and 1 regression test (project-page still works). An agent can verify all 8 by invoking create_note with incomplete content and checking for deny responses.
Blast Radius
Low. Single file modification (check-note-template.sh). The hook is fail-open (trap ERR exits 0), so a bug would allow non-compliant notes through rather than block valid ones. No downstream consumers beyond Claude Code sessions. settings.json matcher confirmed: only fires on mcp__pal-e-docs__create_note (not update_note).
Decomposition Assessment
No decomposition needed. 1 file target, 1 repo, 8 ACs but all follow the same pattern (add case branch per type). Estimated agent time: under 5 minutes. The implementation is mechanical: extract note_type, case-match, validate headings against a per-type list.
Recommendation
No action needed. All prior review nits have been addressed:
- Required headings table — present and verified against all 6 templates
- Routing mechanism — specified (note_type field, case-match)
- HTML/markdown dual-format handling — documented with grep pattern
- template-validation — included with correct headings (including Discovered Issues)
- Constraints — correctly states create_note only (verified against settings.json)
Ticket is ready for execution.