Feature: Upgrade story: label to hard-block in check-board-item.sh #167

Closed
opened 2026-03-26 17:23:23 +00:00 by forgejo_admin · 4 comments
Contributor

Type

Feature

Lineage

standalone — discovered during kanban dogfooding session 2026-03-26

Repo

forgejo_admin/claude-custom

User Story

As Betty Sue (PM),
I want board item creation to be denied when missing a story: label,
So that every ticket is provably traceable to a user need and orphan work is impossible.

Context

Currently check-board-item.sh enforces type: (hard block) and arch: (hard block) but only warns on missing story:. This means tickets can enter the kanban without connecting to a user story. During alert triage on 2026-03-26, all 4 tickets had story labels but only because Betty Sue remembered — not because the system enforced it. The traceability triangle requires all three legs.

The template-ticket says "Not every ticket needs every label... foundational work might not have a story." But the counter-argument: if you can't name which user story the work serves, either the story doesn't exist yet (create it) or the work doesn't serve a user need (why are we doing it?).

File Targets

  • hooks/check-board-item.sh lines 48-51 — change from warning to deny
    • Current: WARNINGS="${WARNINGS:+${WARNINGS} }Consider adding a 'story:' label..."
    • New: ERRORS="${ERRORS:+${ERRORS} }Labels must include a 'story:' label..."
    • Add explanation in deny message: "Every ticket must trace to a user story on the project page. If no story exists, create one first. See template-ticket."

Files NOT to touch:

  • Other hooks (label-on-*, check-issue-template.sh, etc.)
  • template-ticket note (the convention already supports this — the hook was just too lenient)

Acceptance Criteria

  • create_board_item without story: label is DENIED (not just warned)
  • Deny message includes explanation of why and pointer to template-ticket
  • create_board_item WITH story: label still succeeds
  • Existing board items unaffected (hook only fires on creation)

Test Expectations

  • Manual test: attempt create_board_item without story: → denied
  • Manual test: attempt create_board_item with story: → allowed
  • Verify deny message is clear and actionable

Constraints

  • Fail-open pattern preserved (trap 'exit 0' ERR)
  • Don't change type: or arch: enforcement logic

Checklist

  • PR opened
  • Tests pass
  • No unrelated changes
  • project-pal-e-agency — project
  • story:pm-scope — user story
  • arch:enforcement — architecture component
  • template-ticket — the convention this enforces
  • convention-architecture-ids — arch label convention
### Type Feature ### Lineage standalone — discovered during kanban dogfooding session 2026-03-26 ### Repo `forgejo_admin/claude-custom` ### User Story As Betty Sue (PM), I want board item creation to be denied when missing a `story:` label, So that every ticket is provably traceable to a user need and orphan work is impossible. ### Context Currently `check-board-item.sh` enforces `type:` (hard block) and `arch:` (hard block) but only warns on missing `story:`. This means tickets can enter the kanban without connecting to a user story. During alert triage on 2026-03-26, all 4 tickets had story labels but only because Betty Sue remembered — not because the system enforced it. The traceability triangle requires all three legs. The template-ticket says "Not every ticket needs every label... foundational work might not have a story." But the counter-argument: if you can't name which user story the work serves, either the story doesn't exist yet (create it) or the work doesn't serve a user need (why are we doing it?). ### File Targets - `hooks/check-board-item.sh` lines 48-51 — change from warning to deny - Current: `WARNINGS="${WARNINGS:+${WARNINGS} }Consider adding a 'story:' label..."` - New: `ERRORS="${ERRORS:+${ERRORS} }Labels must include a 'story:' label..."` - Add explanation in deny message: "Every ticket must trace to a user story on the project page. If no story exists, create one first. See template-ticket." Files NOT to touch: - Other hooks (label-on-*, check-issue-template.sh, etc.) - template-ticket note (the convention already supports this — the hook was just too lenient) ### Acceptance Criteria - [ ] `create_board_item` without `story:` label is DENIED (not just warned) - [ ] Deny message includes explanation of why and pointer to template-ticket - [ ] `create_board_item` WITH `story:` label still succeeds - [ ] Existing board items unaffected (hook only fires on creation) ### Test Expectations - Manual test: attempt `create_board_item` without story: → denied - Manual test: attempt `create_board_item` with story: → allowed - Verify deny message is clear and actionable ### Constraints - Fail-open pattern preserved (trap 'exit 0' ERR) - Don't change type: or arch: enforcement logic ### Checklist - [ ] PR opened - [ ] Tests pass - [ ] No unrelated changes ### Related - `project-pal-e-agency` — project - `story:pm-scope` — user story - `arch:enforcement` — architecture component - `template-ticket` — the convention this enforces - `convention-architecture-ids` — arch label convention
Author
Contributor

Scope Addition: Task type routing in check-issue-template.sh

Discovered during dogfooding: check-issue-template.sh line 33-38 case statement doesn't recognize Task type. Falls through to Feature default, blocking Task-type issues.

Additional File Target

  • hooks/check-issue-template.sh line 33-38 — add Task|task) case routing to template-issue-task

Updated Acceptance Criteria (appended)

  • check-issue-template.sh recognizes ### Type: Task and validates against template-issue-task
  • Task-type issues only require: ### Type, ### Scope, ### Acceptance Criteria, ### Related
  • Feature/Bug/Spike validation unchanged

This unblocks creation of Task-type issues for non-code work (Tickets C and D).

## Scope Addition: Task type routing in check-issue-template.sh Discovered during dogfooding: `check-issue-template.sh` line 33-38 case statement doesn't recognize `Task` type. Falls through to Feature default, blocking Task-type issues. ### Additional File Target - `hooks/check-issue-template.sh` line 33-38 — add `Task|task)` case routing to `template-issue-task` ### Updated Acceptance Criteria (appended) - [ ] `check-issue-template.sh` recognizes `### Type: Task` and validates against `template-issue-task` - [ ] Task-type issues only require: `### Type`, `### Scope`, `### Acceptance Criteria`, `### Related` - [ ] Feature/Bug/Spike validation unchanged This unblocks creation of Task-type issues for non-code work (Tickets C and D).
Author
Contributor

Scope Review: NEEDS_REFINEMENT

Review note: review-395-2026-03-26
Ticket is well-scoped with all template sections present and all file targets verified against the codebase. Two refinements needed:

  • Line 8 comment header in check-board-item.sh says "recommended — warn, don't block" but will be stale after the change. Add to File Targets so the implementing agent updates it.
  • Discovered scope: session-start-context.sh lines 558-561 list Bug/Feature/Spike types but not Task. Agents won't know Task type exists after the hook ships. Track separately.
## Scope Review: NEEDS_REFINEMENT Review note: `review-395-2026-03-26` Ticket is well-scoped with all template sections present and all file targets verified against the codebase. Two refinements needed: - **Line 8 comment header** in `check-board-item.sh` says "recommended — warn, don't block" but will be stale after the change. Add to File Targets so the implementing agent updates it. - **Discovered scope:** `session-start-context.sh` lines 558-561 list Bug/Feature/Spike types but not Task. Agents won't know Task type exists after the hook ships. Track separately.
Author
Contributor

Refinement: line 8 comment header

Per review review-395-2026-03-26:

Additional File Target

  • hooks/check-board-item.sh line 8 — update comment from "labels includes a story: label (recommended — warn, don't block)" to "labels includes a story: label (required)"

Discovered Scope (separate issue, not a blocker)

  • session-start-context.sh lines 558-561 list Bug, Feature, Spike types but not Task. After this hook ships, agents still won't know Task type exists. Track separately.
## Refinement: line 8 comment header Per review `review-395-2026-03-26`: ### Additional File Target - `hooks/check-board-item.sh` line 8 — update comment from "labels includes a story: label (recommended — warn, don't block)" to "labels includes a story: label (required)" ### Discovered Scope (separate issue, not a blocker) - `session-start-context.sh` lines 558-561 list Bug, Feature, Spike types but not Task. After this hook ships, agents still won't know Task type exists. Track separately.
Author
Contributor

Scope Re-Review: READY

Review note: review-395-2026-03-26-v2

Previous NEEDS_REFINEMENT items resolved: line 8 comment header added as explicit file target (Comment 3), session-start-context.sh Task gap acknowledged as separate discovered scope.

All 4 file targets verified against codebase. All 7 acceptance criteria are agent-verifiable. template-issue-task dependency confirmed to exist. No blocking dependencies on the board.

Two nits for the implementing agent (not blockers):

  • Dead WARNINGS infrastructure (lines 31, 67-76) after story: moves to ERRORS — clean up or preserve with comment
  • Line 48 inline comment says "recommend" — update to "require" alongside line 8 header
## Scope Re-Review: READY Review note: `review-395-2026-03-26-v2` Previous NEEDS_REFINEMENT items resolved: line 8 comment header added as explicit file target (Comment 3), session-start-context.sh Task gap acknowledged as separate discovered scope. All 4 file targets verified against codebase. All 7 acceptance criteria are agent-verifiable. `template-issue-task` dependency confirmed to exist. No blocking dependencies on the board. Two nits for the implementing agent (not blockers): - Dead WARNINGS infrastructure (lines 31, 67-76) after story: moves to ERRORS — clean up or preserve with comment - Line 48 inline comment says "recommend" — update to "require" alongside line 8 header
forgejo_admin 2026-03-26 22:27:12 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ldraney/claude-custom#167
No description provided.