Expand check-note-template.sh to enforce new type templates #183
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/claude-custom#183
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Related to
forgejo_admin/claude-custom #180(spike: note type system audit).Part of Wave 4: enforcement hooks.
Repo
forgejo_admin/claude-customUser Story
As a PM (Betty Sue)
I want every note type to have template enforcement via hooks
So that agents can't create non-compliant notes
Context
The audit found that
check-note-template.shonly validates 2 of 17 types (project-page and issue). After the type system refactor, we need enforcement for 6 additional types. All 5 new template notes now exist in pal-e-docs.File Targets
Files to modify:
hooks/check-note-template.sh-- add case branches routing on.tool_input.note_typefield (not just tags)Files NOT to touch:
hooks/check-issue-template.sh-- validates Forgejo issues, not noteshooks/check-board-item.sh-- board items are separateRequired Headings Per Type
The hook must enforce these required h3 headings (extracted from template notes):
reviewarchitectureuser-storysopconventionvalidationRouting Mechanism
Current hook routes on
tags(grep for tag name). New types must route on thenote_typefield from.tool_input.note_type. Implementation should:note_typefrom tool input JSONdoctype: pass through (intentionally unguarded)Heading Format
Templates use HTML
<h3>tags in their code blocks. The hook must grep for<h3>patterns OR markdown###patterns (some notes use HTML, some use markdown). Recommend: check for both formats withgrep -iE '(<h3[^>]*>|^### )'.Acceptance Criteria
reviewnote without required headings is blockedarchitecturenote without required headings is blockeduser-storynote without required headings is blockedsopnote without required headings is blockedconventionnote without required headings is blockedvalidationnote without required headings is blockeddocnote is NOT blocked (intentionally unguarded)Test Expectations
Constraints
mcp__pal-e-docs__create_note)Checklist
Related
project-pal-e-agencyforgejo_admin/claude-custom #180-- parent spikeReview History
Scope Review: NEEDS_REFINEMENT
Review note:
review-483-2026-03-27-r2Issue is well-structured after R1 refinements. Two remaining gaps found:
### Required Headings Per Typetable lists 4 headings forvalidation(Ticket, Environment, Checks, Verdict) but the actualtemplate-validationcode block has a 5th required heading: "Discovered Issues". Add it to the table.settings.jsononly wiresmcp__pal-e-docs__create_note. Either clarify that wiringupdate_noteis out of scope, or expand scope to include it (adding a 9th AC).Scope Review: READY
Review note:
review-483-2026-03-27-r3All prior refinement nits resolved. Heading tables verified against all 6 template notes. Constraints correctly state create_note only (confirmed in settings.json). Validation type includes "Discovered Issues." Dependencies satisfied (all 6 templates exist, NoteType enum updated). Single file, single repo, <5 min agent scope. Ready for execution.