Optimize CLAUDE.md from 163 to 70 lines

Compress spell casting, resources, and NoteDiscovery sections.
Remove redundant rule question protocol. Keep game rules reference and compendium review process.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Cal Corum 2026-02-14 08:31:12 -06:00
parent 77c9359601
commit 628f3ab76c

169
CLAUDE.md
View File

@ -1,162 +1,75 @@
# Vagabond RPG Foundry VTT System - Development Context
# Vagabond RPG Foundry VTT System
## Project Overview
Foundry VTT v13 system implementation for Vagabond RPG (Pulp Fantasy TTRPG).
This is a complete Foundry VTT v13 system implementation for Vagabond RPG (Pulp Fantasy TTRPG).
## Commands
## Key Architecture Decisions
```bash
docker compose up -d # Start local Foundry
docker compose restart # Restart after code changes
npm run watch # Watch SCSS
docker compose logs -f foundry # View logs
```
## Key Architecture
### Data Models (Foundry v13 style)
- Use TypeDataModel classes in `module/data/` for Actor and Item schemas
- TypeDataModel classes in `module/data/` for Actor and Item schemas
- Character stats: Might, Dexterity, Awareness, Reason, Presence, Luck (range 2-7)
- Derived values calculated in `prepareData()`: HP, Speed, Save difficulties, Skill difficulties
- Derived values in `prepareData()`: HP, Speed, Save difficulties, Skill difficulties
### Roll System
- Base formula: d20 >= (20 - Stat) for untrained, d20 >= (20 - Stat\*2) for trained
- Favor: +d6 bonus die
- Hinder: -d6 penalty die
- Crit: Natural 20 by default, but threshold can be modified per-skill by Active Effects
- Exploding dice: d6! notation for certain abilities
- Base: `d20 >= (20 - Stat)` untrained, `d20 >= (20 - Stat*2)` trained
- Favor: +d6 bonus, Hinder: -d6 penalty, Crit: natural 20 (modifiable per-skill via Active Effects)
- Exploding dice: `d6!` for certain abilities
### Spell Casting
**Casting Decisions:** When casting, determine Damage/Effect, Delivery, and Duration.
**Mana Cost Formula:**
1. **Base cost:**
- Only 1d6 damage OR only effect = 0 Mana
- Both damage AND effect = 1 Mana
2. **+ Extra damage dice:** +1 Mana per d6 beyond the first
3. **+ Delivery cost:** Touch(0), Remote(0), Imbue(0), Cube(1), Aura(2), Cone(2), Glyph(2), Line(2), Sphere(2)
4. **Duration:** Instant/Focus/Continual - no initial cost, but Focus requires 1 Mana/round to maintain on unwilling targets
**Cast Checks:** Only required when targeting an unwilling Being.
**Cast Skills by Class:** Wizard/Magus=Arcana, Druid/Luminary/Witch=Mysticism, Sorcerer=Influence, Revelator=Leadership
- **Mana cost**: Base(0-1) + extra damage dice(+1/d6) + delivery cost(0-2) + duration(focus: 1/round on unwilling)
- **Delivery costs**: Touch/Remote/Imbue(0), Cube(1), Aura/Cone/Glyph/Line/Sphere(2)
- **Cast skills by class**: Wizard/Magus=Arcana, Druid/Luminary/Witch=Mysticism, Sorcerer=Influence, Revelator=Leadership
- Cast checks only required when targeting unwilling beings
### Class System
- Classes are Items with progression tables
- When dragged to character, creates Active Effects for current level
- On level up, update Active Effects to grant new features
- Supports future multiclassing by allowing multiple class items
### Crit Threshold System
- Each skill/action has a `critThreshold` field (default 20)
- Active Effects from classes/perks can modify: `system.skills.melee.critThreshold`
- Fighter's Valor reduces crit by 1/2/3 at levels 1/4/8
- Gunslinger's Deadeye dynamically reduces on consecutive hits
- Classes are Items with progression tables → Active Effects for current level
- Supports multiclassing via multiple class items
### Resources
- HP: max = Might \* Level
- Mana: class-dependent, max from class progression
- Luck: equals Luck stat, refreshes on rest
- Fatigue: 0-5, death at 5, each reduces item slots by 1
- Studied Dice: some classes grant these
- Custom resources can be added dynamically
- HP: Might × Level | Mana: class-dependent | Luck: equals Luck stat
- Fatigue: 0-5 (death at 5, each reduces item slots by 1)
## File Naming Conventions
## File Naming
- Main system entry: `vagabond.mjs`
- Document classes: `VagabondActor.mjs`, `VagabondItem.mjs`
- Sheet classes: `VagabondCharacterSheet.mjs`, `VagabondNPCSheet.mjs`
- Data models: `CharacterData.mjs`, `NPCData.mjs`, `SpellData.mjs`, etc.
- Templates: `character-sheet.hbs`, `npc-sheet.hbs`, `spell-item.hbs`
- Entry: `vagabond.mjs` | Documents: `VagabondActor.mjs` | Sheets: `VagabondCharacterSheet.mjs`
- Data models: `CharacterData.mjs` | Templates: `character-sheet.hbs`
## Testing Commands
## Reference Data
```bash
# Start local Foundry
docker compose up -d
Game rules in NoteDiscovery under `gaming/vagabond-rpg/`: core-mechanics, combat, character-creation, magic-system, spells-full-text, perks-full-list, classes-full-text, bestiary, testing-strategy.
# Watch SCSS
npm run watch
Access: `cd ~/.claude/skills/notediscovery && python client.py search "keyword"`
# View logs
docker compose logs -f foundry
```
Original PDF: `/mnt/NV2/Development/claude-home/gaming/Vagabond_RPG_-_Pulp_Fantasy_Core_Rulebook_Interactive_PDF.pdf`
D&D 5e reference: https://deepwiki.com/foundryvtt/dnd5e/1-dnd5e-system-overview
### Testing Code Revisions
## Style
```bash
# Restart local Foundry container
docker compose restart
```
## Reference Data Location
Game rules and content are documented in NoteDiscovery under `gaming/vagabond-rpg/`:
- `core-mechanics` - Stats, checks, dice, HP
- `combat` - Actions, movement, defending, zones
- `character-creation` - Ancestries, classes, leveling
- `magic-system` - Casting, mana, delivery, duration
- `spells-full-text` - All 55+ spells with full descriptions
- `perks-full-list` - All 90+ perks with prerequisites
- `classes-full-text` - All 18 classes with progression tables
- `bestiary` - Creature categories, TL reference
- `testing-strategy` - Quench testing patterns (unit vs integration, async handling)
**To access NoteDiscovery:**
```bash
# List all notes
cd ~/.claude/skills/notediscovery && python client.py list
# Read a specific note
cd ~/.claude/skills/notediscovery && python client.py read "gaming/vagabond-rpg/magic-system.md"
# Search notes
cd ~/.claude/skills/notediscovery && python client.py search "keyword"
```
Original PDF at: `/mnt/NV2/Development/claude-home/gaming/Vagabond_RPG_-_Pulp_Fantasy_Core_Rulebook_Interactive_PDF.pdf`
Character sheet reference: `/mnt/NV2/Development/claude-home/gaming/Vagabond_-_Hero_Record_Interactive_PDF.pdf`
## Reference Project Documentation
The D&D 5e Foundry system is very well documented here: https://deepwiki.com/foundryvtt/dnd5e/1-dnd5e-system-overview
## Project Roadmap
See `PROJECT_ROADMAP.json` for complete task breakdown with dependencies.
## Style Guidelines
- Parchment color scheme with high contrast (WCAG AA compliant)
- Parchment color scheme, high contrast (WCAG AA), CSS custom properties, SCSS with BEM naming
- Match official Hero Record layout where possible
- Use CSS custom properties for theming
- SCSS with BEM naming convention
## Compendium Data Review (REQUIRED)
**CRITICAL: All compendium data in `packs/_source/` MUST be reviewed by a human before committing.**
**All compendium data in `packs/_source/` MUST be reviewed by a human before committing.**
When creating or modifying compendium JSON files (classes, ancestries, perks, spells, etc.):
1. Always reference source material (NoteDiscovery or PDF) — never invent mechanics or flavor text
2. Show complete JSON content to user before committing
3. Wait for explicit approval before staging compendium files
4. Verify against `packs/_source/REVIEW_CHECKLIST.md`: feature names, progression tables, prerequisites, mechanical effects
1. **ALWAYS** reference the official source material in NoteDiscovery or the PDF
2. **NEVER** invent or "hallucinate" game mechanics, flavor text, or statistics
3. **BEFORE COMMITTING**, present the full JSON content to the user for review
4. **WAIT FOR EXPLICIT APPROVAL** before staging compendium files for commit
## Roadmap
### Review Process
1. Generate/modify the compendium JSON
2. Show the user the complete content (not just a summary)
3. User verifies against source material using `packs/_source/REVIEW_CHECKLIST.md`
4. Only after user says "approved" or similar, proceed with git add/commit
### What to Verify
- Feature names match exactly
- Progression tables match level-by-level
- Prerequisites are accurate
- Descriptions don't contain invented lore
- Mechanical effects (changes[] arrays) are correct
See `packs/_source/REVIEW_CHECKLIST.md` for the complete validation checklist.
See `PROJECT_ROADMAP.json` for complete task breakdown.