feat: custom violation types + AGENTS.md developer guide #45
Reference in New Issue
Block a user
Delete Branch "claude/musing-bell"
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
Custom Violation Types (feat)
Database
violation_typestable auto-migrated on startup (db/database.js)type_keyauto-generated ascustom_<slug>to prevent collisions with hardcoded violation keysaudit()helperAPI —
server.jsGET /api/violation-types— all custom typesPOST /api/violation-types— create; auto-generates uniquetype_keyPUT /api/violation-types/:id— edit name, category, chapter, description, points, fieldsDELETE /api/violation-types/:id— blocked with409if any violations reference the typeViolationTypeModal.jsx(new component)ViolationForm.jsxmergedGroupsmemo (custom types appear in their category group alongside hardcoded types)resolveViolation()checks hardcoded registry first, then custom type map — recidivist escalation, repeat badge, tier warning, and point slider all work identically for custom types+ Add Typebutton above dropdown opens create modalEdit Typebutton appears inline when a custom type is selected✦in dropdown and green Custom badge in context boxAGENTS.md (docs)
Covers: immutable scoring fields, soft-delete contract, audit log rules, tier system canonical source, migration pattern, schema change checklist, coding standards (backend + frontend), PDF generation, deployment notes, and explicit anti-patterns.
Test plan
409error message<optgroup>appears in dropdown🤖 Generated with Claude Code
docs: add AGENTS.md with coding, compliance, and architecture guidanceto feat: custom violation types + AGENTS.md developer guide