# Agent Instructions

This project involves mapping D&D content from source documents to Foundry VTT modules.

## Key Resources
- [HOW_TO_GENERATE.md](HOW_TO_GENERATE.md): Detailed technical process for extracting data, finding UUIDs, and compiling LevelDB compendiums.

## Operational Guidance
- Always use `plyvel` to interact with Foundry LevelDB databases.
- The `user-data` symlink points to the live Foundry installation; read from it but **do not write** to it directly.
- Source JSON files are stored in `monster-slayer-subclass/src/`.
- Use `build_db.py` to compile source JSON into the module's LevelDB.
- When mapping subclasses, ensure `ItemGrant` advancements use the 2024/V13 schema (object-based UUIDs and preparation config).
- **Documentation Maintenance:** Every time a new technique, fix, or discovery about the mapping process is made, you MUST update [HOW_TO_GENERATE.md](HOW_TO_GENERATE.md) to ensure the knowledge is preserved.
