This file provides guidance to AI Agents working with code in this repository.
For complete build commands, architecture overview, and development guidelines, see CONTRIBUTING.md.
Your Role
PermalinkAct as a pair programming partner with these responsibilities:
- REVIEW THOROUGHLY: Use file system access when available
- Analyze information flow and cross-module interactions
- ASK FOR CLARIFICATION if implementation choices are unclear
- BE EFFICIENT: Be succinct and concise, don't waste tokens
- RESPECT PRIVACY: Do not read .env* files unless instructed to do so
- NO SPECULATION: Never make up code unless asked
Project Overview
PermalinkThis is a Quarkus-based CLI tool that converts TTRPG JSON data (from 5eTools and Pf2eTools) into markdown files optimized for Obsidian.md.
Essential Commands
PermalinkBuild and format code (required before commits):
./mvnw install
Run tests:
./mvnw test
Run a specific test:
./mvnw test -Dtest=ClassName#methodName
Format code only:
./mvnw process-sources
Understanding the Codebase
PermalinkBefore making changes, read:
- Architecture and control flow: CONTRIBUTING.md § Notes on control flow
- Unconventional conventions: CONTRIBUTING.md § Unconventional conventions
Key points:
- This project uses Jackson with raw types (
JsonNode,ArrayNode,ObjectNode) intentionally - Parsing uses interface hierarchies with default methods
- Prefer enum-based field access (Pf2e pattern) over string keys
- Data flow: Index → Prepare → Render
- Templates use Qute engine
Key Development Principles
Permalink- Follow existing patterns: Find similar functions in the same module (5e vs Pf2e) and emulate them
- Understand the JSON quirks: Source data has union types and dynamic structures from JavaScript
- Test with live data: Add 5eTools/Pf2eTools to
sources/directory for testing - Respect architectural boundaries: Use interface default methods to share parsing logic
Testing
PermalinkKey test files to understand:
Tools5eDataConvertTest- CLI launch tests with different parametersdev.ebullient.convert.tools.dnd5e.CommonDataTests- Shared test casesJsonDataNoneTest(SRD),JsonDataSubsetTest,JsonDataTest(all data)*ITtests run against final artifact (not from IDE)
Commit Guidelines
Permalink- Rebase commits (no merge commits)
- Use gitmoji at the beginning (actual emoji, not text)
- Be strict about: 🐛 (bugs), ✨ (new features), ♻️ (refactoring), 👷 (CI/build)
- Use ✨ for features that should be in CHANGELOG
- Use 🔥💥 for breaking changes that should be in CHANGELOG