feat: remove plan/phase hooks from enforcement layer #172
No reviewers
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!172
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "168-remove-plan-phase-hooks"
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?
Summary
Removes all plan/phase enforcement from the hook system to align with
convention-kanban-over-plans. Plans are deprecated -- the enforcement pyramid (conventions -> SOPs -> hooks) must be consistent, so hooks must stop enforcing plan patterns.Changes
hooks/check-phase-template.sh-- deleted. Entire hook was orphaned (validatednote_type="phase"structure).hooks/check-note-template.sh-- removedplantag routing totemplate-plan(lines 53-55). Project-page and issue routing preserved.hooks/check-board-item.sh-- removedphasecase fromitem_typevalidation (lines 60-63). Issue validation preserved.hooks/remind-update-docs.sh-- updated post-merge reminder to reference "project pages and board items" instead of "plan notes, phase status."hooks/stop-doc-checkin.sh-- updated session-end reminder to reference "board items" instead of "plans advanced" and "plan notes."hooks/inject-subagent-context.sh-- updated comment from "plan/SOP context" to "SOP context."settings.json-- removedcheck-phase-template.shregistration frommcp__pal-e-docs__create_notePreToolUse hooks.hooks/session-start-context.sh-- removed ~200 lines: plan-fetching logic (notes?tags=plan,active), plan TOC injection, phase-based semantic search, dynamic briefing section, and plan-related output blocks. Board state queries and project page queries remain unchanged.Test Plan
settings.jsonis valid JSON (confirmed viapython3 -m json.tool)bash -nsyntax check (confirmed)planorphasereferences in any modified file (confirmed via grep)note_type=phase-- no hook firesitem_type=issue-- still validatesforgejo_issue_urlReview Checklist
check-phase-template.shremovednote_type="phase"no longer triggers validationplanno longer routes to template-plan validationitem_type="issue"still validated (forgejo_issue_url required)session-start-context.shno longer queries plan/phase notesstop-doc-checkin.shno longer references plans/phasesRelated
convention-kanban-over-plansproject-pal-e-agencystory:pm-scopearch:enforcementCloses #168
Self-Review
All 8 acceptance criteria from issue #168 (including refinement comments) verified:
check-phase-template.shdeleted (file no longer exists)note_type="phase"no longer triggers any validation (hook removed from settings.json)plantag no longer routes totemplate-plan(case removed from check-note-template.sh)item_type="issue"still validatesforgejo_issue_url(case preserved in check-board-item.sh)Validation
settings.jsonpassespython3 -m json.toolbash -nsyntax checkgrepconfirms zeroplanorphasereferences in any modified filecheck-agent-spawn.sh,label-on-*.sh,board-item-on-merge.sh) are unchangedNet change
8 files changed, 17 insertions, 397 deletions. The session-start-context.sh went from 577 lines to 306 lines.
PR #172 Review
DOMAIN REVIEW
Tech stack: Bash shell hooks + JSON configuration (Claude Code hook system). Domain expertise: shell scripting correctness, fail-open patterns, JSON structural validity, hook registration integrity.
Files changed (8):
hooks/check-phase-template.shhooks/check-note-template.shplantag routing (-4 lines)project-pageandissuerouting preserved intact.elifchain restructured cleanly.hooks/check-board-item.shphase)case (-5 lines)issue)case preserved. Comment header updated.hooks/session-start-context.shhooks/remind-update-docs.shhooks/stop-doc-checkin.shhooks/inject-subagent-context.shsettings.jsoncheck-phase-template.shregistrationsession-start-context.sh deep review:
The largest change (265 lines removed). I verified the following post-PR state:
boards-config.sh sourcing: The old code had a conditional guard (
if [[ ${#BOARDS[@]} -eq 0 ]]) becauseboards-config.shwas sourced earlier in the now-removed plan-fetching block. With that block gone, the guard is removed and replaced with an unconditional source. This is correct -- there is no longer a first source point to guard against double-sourcing.Core SOPs replacement: The
read_before_blockvariable (which contained plan TOCs + core SOP references) is replaced bycore_sops(core SOP references only). The axiom text correctly changes from "no plan, no agent" to "no issue, no agent" -- aligning withconvention-kanban-over-plans.Heredoc output structure: The
plans_table,read_before_block, anddynamic_briefingexpansions are removed from thecat <<CONTEXTheredoc. Thecore_sopsandtracking_lineexpansions are retained and properly ordered.Template line update: "plan, PR, and project templates" becomes "PR and project page templates". Accurate.
No orphaned variables: All variables removed from the heredoc (
plans_table,plans_read_lines,read_before_block,dynamic_briefing,phase_titles, etc.) are also removed at their declaration sites. No orphaned assignments remain in the function.BLOCKERS
None.
NITS
Dead variable in
check-board-item.sh(line 28): After removing thephase)case, theNOTE_SLUGvariable extraction (NOTE_SLUG=$(echo "$INPUT" | jq -r '.tool_input.note_slug // empty')) is never referenced. It should be removed. Pre-existing dead code:POINTSon line 25 is also unused (intentionally -- per the lean kanban comment on lines 33-34). Worth cleaning both in a nit-bundle.Remaining plan/phase references outside hook scope: Multiple files in
commands/,skills/, andagents/still contain plan/phase references (e.g.,commands/update-docs.mdSteps 3-4 are entirely about phase/plan note updates;skills/review-ticket/SKILL.mdreferencesphaseitems;skills/create-issue/SKILL.mdis titled "Create Issue from Plan Phase";skills/implement-phase/SKILL.mdis entirely plan-phase focused;agents/betty-sue.mdreferences plan enforcement). These are correctly out of scope for this PR (issue #168 scopes to hooks; issue #169 covers SOPs/conventions). Flagging for traceability -- those files will need a similar cleanup pass.schemas/agent-spawn-requirements.jsonline 17: Contains "reference context (plan, project, board) in prompt." Minor, but part of the enforcement layer adjacent to hooks.SOP COMPLIANCE
168-remove-plan-phase-hooksmatches issue #168project-pal-e-agencyreferenced, along with convention, story, and arch labelsbash -nsyntax checks, grep verification, manual test cases describedPROCESS OBSERVATIONS
session-start-context.shchange is the highest-risk file (most lines changed), but the remaining board-state and project-page logic is untouched.VERDICT: APPROVED