unit(C6): growth goals + shadow pairing validation

Adds the growth_goals table (ARCHITECTURE §4.3, §5.8.6) with its migration and a
pure nextGoalStatus() state machine (requested -> mentor_assigned -> in_progress
-> achieved, with pause/resume and decline). Adds validateShadowPairing()
(src/domain/shadows.ts): a shadow/trainee slot requires a paired mentor in the
same instance who is mentor-ready for that exact skill (C5) — rejects a shadow
with no paired mentor, enforced by the pure rule and the chk_shadow_paired CHECK
constraint on slots. Verified the migration applies and the CHECK rejects a
trainee slot without a paired mentor. 22 tests named after each rule.
This commit is contained in:
Tiel Coder
2026-11-18 04:43:07 +00:00
parent 371524b33e
commit 676751c489
8 changed files with 2696 additions and 1 deletions
File diff suppressed because it is too large Load Diff