Add 4 new NoteTypes + validation BoardColumn #223

Closed
opened 2026-03-28 01:54:38 +00:00 by forgejo_admin · 0 comments

Type

Feature

Lineage

Related to forgejo_admin/claude-custom #180 (spike: note type system audit).
Part of Wave 1: foundation enum changes.

Repo

forgejo_admin/pal-e-api

User Story

As a PM (Betty Sue)
I want review, architecture, validation, and user-story as first-class note types
So that each type can have its own template, SOP, and enforcement hook

Context

The note type audit (claude-custom #180) identified that 70% of doc notes are actually reviews, architectures, or validations with consistent structure. Promoting them to types enables the enforcement chain: type → template → SOP → hook.

Also adds validation to the BoardColumn enum to match the kanban SOP which documents it but the code doesn't have it.

File Targets

Files to modify:

  • src/pal_e_docs/schemas.py -- add review, architecture, validation, user-story to NoteType Literal; add validation to BoardColumnType Literal
  • src/pal_e_docs/models.py -- add validation to BoardColumn enum
  • src/pal_e_docs/routes/notes.py -- add VALID_STATUSES entries for new types
  • alembic/versions/r8m9n0o1p2q3_add_validation_board_column.py -- Alembic migration for BoardColumn enum expansion

Files NOT to touch:

  • Existing alembic migrations -- historical, do not modify

Acceptance Criteria

  • create_note(note_type="review") succeeds
  • create_note(note_type="architecture") succeeds
  • create_note(note_type="validation") succeeds
  • create_note(note_type="user-story") succeeds
  • update_board_item(column="validation") succeeds
  • Existing note creation for all current types still works
  • All tests pass

Test Expectations

  • Unit test: create note with each new type, verify accepted
  • Unit test: create note with invalid type, verify rejected
  • Unit test: move board item to validation column, verify accepted
  • Run command: pytest tests/ -v

Constraints

  • NoteType is a Pydantic Literal, not a DB enum. No Alembic migration needed for note_type changes.
  • BoardColumn IS a Python enum mapped to DB. Alembic migration IS needed for adding validation value.
  • VALID_STATUSES for new types: review (active, archived), architecture (active, archived, draft), validation (active, archived), user-story (active, archived, draft)

Checklist

  • PR opened (#226)
  • Tests pass (659 passed)
  • No unrelated changes
  • QA approved
  • project-pal-e-agency
  • forgejo_admin/claude-custom #180 -- parent spike

Review History

  • review-223-2026-03-27: NEEDS_REFINEMENT — File Targets contradiction (alembic in NOT-touch list while stating migration needed). Fixed in this update.
### Type Feature ### Lineage Related to `forgejo_admin/claude-custom #180` (spike: note type system audit). Part of Wave 1: foundation enum changes. ### Repo `forgejo_admin/pal-e-api` ### User Story As a PM (Betty Sue) I want review, architecture, validation, and user-story as first-class note types So that each type can have its own template, SOP, and enforcement hook ### Context The note type audit (claude-custom #180) identified that 70% of doc notes are actually reviews, architectures, or validations with consistent structure. Promoting them to types enables the enforcement chain: type → template → SOP → hook. Also adds `validation` to the BoardColumn enum to match the kanban SOP which documents it but the code doesn't have it. ### File Targets Files to modify: - `src/pal_e_docs/schemas.py` -- add `review`, `architecture`, `validation`, `user-story` to NoteType Literal; add `validation` to BoardColumnType Literal - `src/pal_e_docs/models.py` -- add `validation` to BoardColumn enum - `src/pal_e_docs/routes/notes.py` -- add VALID_STATUSES entries for new types - `alembic/versions/r8m9n0o1p2q3_add_validation_board_column.py` -- Alembic migration for BoardColumn enum expansion Files NOT to touch: - Existing alembic migrations -- historical, do not modify ### Acceptance Criteria - [ ] `create_note(note_type="review")` succeeds - [ ] `create_note(note_type="architecture")` succeeds - [ ] `create_note(note_type="validation")` succeeds - [ ] `create_note(note_type="user-story")` succeeds - [ ] `update_board_item(column="validation")` succeeds - [ ] Existing note creation for all current types still works - [ ] All tests pass ### Test Expectations - [ ] Unit test: create note with each new type, verify accepted - [ ] Unit test: create note with invalid type, verify rejected - [ ] Unit test: move board item to validation column, verify accepted - Run command: `pytest tests/ -v` ### Constraints - NoteType is a Pydantic Literal, not a DB enum. No Alembic migration needed for note_type changes. - BoardColumn IS a Python enum mapped to DB. Alembic migration IS needed for adding `validation` value. - VALID_STATUSES for new types: review (active, archived), architecture (active, archived, draft), validation (active, archived), user-story (active, archived, draft) ### Checklist - [x] PR opened (#226) - [x] Tests pass (659 passed) - [x] No unrelated changes - [x] QA approved ### Related - `project-pal-e-agency` - `forgejo_admin/claude-custom #180` -- parent spike ### Review History - review-223-2026-03-27: NEEDS_REFINEMENT — File Targets contradiction (alembic in NOT-touch list while stating migration needed). Fixed in this update.
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
forgejo_admin/pal-e-api#223
No description provided.