- The cloned Foundry pf2e repository ships its own TypeScript source files which
reference modules our project does not have ('@common/...', 'svelte', 'vite', 'peggy').
- That clone lives at server/prisma/data/foundry-pf2e/ (gitignored, dev-time only;
the seed reads the JSON files at runtime, never the TS source).
- Add 'prisma/data/foundry-pf2e' to tsconfig exclude list so 'tsc --noEmit' on our
codebase is unaffected by third-party content.
- Iterate over D16_CLASS_NAMES; read Foundry pf2e class JSONs; merge with hand-curated overlays
- Generic pipeline (Plan 03b appends data to overlay modules; no script changes needed)
- Idempotent findUnique → update OR create per row using compound unique keys
- Loud failure with SEED-README pointer when Foundry clone is missing
- Use Prisma.JsonNull for nullable Json fields per Prisma 7 typed-input contract
- No 'any' types; type-clean against tsconfig.json
- Define ClassFeatureOptionEntry interface as the contract Plan 03b appends to
- Include School of Battle Magic as the worked Wizard School entry (optionsRef: 'wizard-school')
- Add anchor comments naming all remaining class optionsRef strings so Plan 03b knows where to append
- No 'any' types; type-clean against tsconfig.json
- Define SpellTradition type and SpellSlotOverlayEntry interface as the contract Plan 03b appends to
- Wizard fully populated L1..L19 with ARCANE slot progression and L1 cantrip count (5)
- Stub keys for the other 15 D-16 classes set to empty arrays for Plan 03b to populate
- No 'any' types; type-clean against tsconfig.json
- applyAttributeBoost: PF2e boost-cap-at-18 rule (Pitfall #8 mitigation)
- Returns score + 2 when current < 18
- Returns score + 1 when current >= 18
- isValidBoostSet: validates exactly 4 distinct abilities for boost levels
- Pure-function module (no NestJS, no Prisma, no I/O imports)
- TypeScript strict, named exports only
- 9/9 tests pass — proves Jest infrastructure works on src/modules/**/*.spec.ts
- 5 cases for applyAttributeBoost (boost-cap-at-18 rule, Pitfall #8)
- 4 cases for isValidBoostSet (PF2e: 4 distinct abilities required)
- Test fails (RED gate) because module is not yet implemented
- Generate migration 20260427122603_add_level_up_sessions_and_class_progression
- Auto-creates LevelUpSession, LevelUpHistory, ClassProgression, ClassFeatureOption tables
- Adds Character.freeArchetype and Character.prereqViolations columns
- Hand-append partial unique index 'LevelUpSession_characterId_open_unique'
with WHERE "committedAt" IS NULL clause (Prisma 7 cannot emit partial indexes)
- Migration applied to dev database via prisma migrate dev
- Prisma Client regenerated and exposes new models + Character columns
- Add LevelUpSession model (DRAFT state, soft-archive on commit via committedAt)
- Add LevelUpHistory model (append-only audit log of committed level-ups)
- Add ClassProgression model (per-class, per-level grants and prof changes)
- Add ClassFeatureOption model (sub-choices like doctrines/schools/instincts)
- Extend Character with freeArchetype Boolean (D-08) and prereqViolations Json (D-06)
- Add reverse relations levelUpSessions and levelUpHistories on Character
- Schema formatted via prisma format and validated via prisma validate
Rule 1 deviation: TS strict mode (noImplicitAny + strict) couldn't narrow
the EvalResult union via 'r.ok' direct access because the {unknown:true,raw}
variant has no 'ok' property. Added explicit type-guard helpers (isUnknown,
isOk, isFail) for both production and spec narrowing. Runtime behavior
unchanged; tsc --noEmit now exits clean for the leveling lib.
Files:
- prereq-evaluator.ts: 3 type-guard functions, used in OR/AND walkers
- prereq-evaluator.spec.ts: isFail() in lieu of result.ok=== checks
The plan's expected list for computeApplicableSteps(5, 'Fighter', ...) was
PF2e-incorrect. Per CRB, class feats and skill feats are slotted at EVEN
levels only (2, 4, 6, ..., 20). L5 is odd → no class/skill feat.
Plan said: [class-features, boost, skill-increase, feat-class, feat-skill, feat-ancestry, review]
PF2e-correct: [class-features, boost, skill-increase, feat-ancestry, review]
The plan's other tests are internally consistent (L4 has feat-class, L3
does NOT have feat-class) — only the L5 case was misstated. Project's
'regelkonform' goal (CLAUDE.md, PROJECT.md) requires PF2e correctness
above plan literalism.
Task 2 RED phase: 9 failing tests covering PF2e skill-increase cap rule
(VALIDATION.md rows 1-W1-06 to 1-W1-11). Implementation follows in next
commit (GREEN). Verified failure: module './skill-increase-cap' not found.
Rule 3 deviation: Plan 01-01 (wave 0) work not yet merged into this
worktree base (096edbf). Plan 01-02 imports applyAttributeBoost and
AbilityAbbreviation from this module — required for types.ts and
recompute-derived-stats.ts to compile. Content matches 01-01 plan exactly,
so orchestrator merge will be clean.
- export type AbilityScore = number
- export type AbilityAbbreviation = 'STR'|'DEX'|'CON'|'INT'|'WIS'|'CHA'
- export function applyAttributeBoost(score) — PF2e boost-cap-at-18 (Pitfall #8)
- export function isValidBoostSet(targets) — exactly 4 distinct
- Add battle module with sessions, maps, tokens, and combatants
- Implement WebSocket gateway for real-time battle updates
- Add map upload with configurable grid system
- Create battle canvas with token rendering and drag support
- Support PC tokens from characters and NPC tokens from templates
- Add initiative tracking and round management
- GM-only controls for token manipulation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add Dying condition when HP drops to 0 (value = 1 + Wounded)
- Recovery check modal with manual outcome selection (Crit Success/Success/Failure/Crit Failure)
- Dying indicator replaces HP display when character is dying
- Death overlay with revive button when Dying reaches threshold (4 - Doomed)
- Revive removes Dying/Wounded/Doomed and sets HP to 1
- Real-time sync via WebSocket for all dying state changes
- Automatic Wounded condition when recovering from dying
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix isEquipped -> equipped property name in export-character-html.ts
- Remove unused imports in character-sheet-page.tsx
- Remove unused variable in alchemy-tab.tsx
- Add on-demand German translation for feats in feats.service.ts
- Make class actions clickable in actions-tab with FeatDetailModal
- Add (Englisch) hint for untranslated feat descriptions
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Alchemy System:
- Versatile Vials tracking with refill functionality
- Research Field display (Bomber, Chirurgeon, Mutagenist, Toxicologist)
- Formula Book with search and level filtering
- Advanced Alchemy (daily preparation) for infused items
- Quick Alchemy using versatile vials
- Normal Alchemy for permanent crafted items
- Auto-upgrade system for formula variants (Lesser → Greater)
- Effect parsing with damage badges (damage type colors, splash, healing, bonus)
- German translations for all UI elements and item effects
- WebSocket sync for all alchemy state changes
Rest System:
- HP healing based on CON modifier × Level
- Condition management (Fatigued removed, Doomed/Drained reduced)
- Resource reset (spell slots, focus points, daily abilities)
- Alchemy reset (infused items expire, vials refilled)
- Rest modal with preview of changes
Database:
- CharacterAlchemyState model for vials and batch tracking
- CharacterFormula model for formula book
- CharacterPreparedItem model with isInfused flag
- Equipment effect field for variant-specific effects
- Translation germanEffect field for effect translations
- Scraped effect data from Archives of Nethys (205 items)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Character System:
- Inventory system with 5,482 equipment items
- Feats tab with categories and details
- Actions tab with 99 PF2e actions
- Item detail modal with equipment info
- Feat detail modal with descriptions
- Edit character modal with image cropping
Auth & UI:
- Animated login screen with splash → form transition
- Letter-by-letter "DIMENSION 47" animation
- Starfield background with floating orbs
- Logo tap glow effect
- "Remember me" functionality (localStorage/sessionStorage)
Real-time Sync:
- WebSocket gateway for character updates
- Live sync for HP, conditions, inventory, equipment status, money, level
Database:
- Added credits field to characters
- Added custom fields for items
- Added feat fields and relations
- Included full database backup
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Features:
- HP Control component with damage/heal/direct modes (mobile-optimized)
- Conditions system with PF2e condition database
- Equipment database with 5,482 items from PF2e (weapons, armor, equipment)
- AddItemModal with search, category filters, and pagination
- Bulk tracking with encumbered/overburdened status display
- Item management (add, remove, toggle equipped)
Backend:
- Equipment module with search/filter endpoints
- Prisma migration for equipment detail fields
- Equipment seed script importing from JSON data files
- Extended Equipment model (damage, hands, AC, etc.)
Frontend:
- New components: HpControl, AddConditionModal, AddItemModal
- Improved character sheet with tabbed interface
- API methods for equipment search and item management
Documentation:
- CLAUDE.md with project philosophy and architecture decisions
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Backend:
- Characters-Modul (CRUD, HP-Tracking, Conditions)
- Pathbuilder 2e JSON Import Service
- Claude API Integration für automatische Übersetzungen
- Translations-Modul mit Datenbank-Caching
- Prisma Schema erweitert (Character, Abilities, Skills, Feats, Items, Resources)
Frontend:
- Kampagnen-Detailseite mit Mitglieder- und Charakterverwaltung
- Charakter erstellen Modal
- Pathbuilder Import Modal (Datei-Upload + JSON-Paste)
- Logo-Integration (Dimension 47 + Zeasy)
- Cinzel Font für Branding
Weitere Änderungen:
- Auth 401 Redirect Fix für Login-Seite
- PROGRESS.md mit Projektfortschritt
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- NestJS backend with JWT auth, Prisma ORM, Swagger docs
- Vite + React 19 frontend with TypeScript
- Tailwind CSS v4 with custom dark theme design system
- Auth module: Login, Register, Protected routes
- Campaigns module: CRUD, Member management
- Full Prisma schema for PF2e campaign management
- Docker Compose for PostgreSQL
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>