How czxieddan/rhoiscribe works
RHoiScribe is a local MCP server and bundled Skill for HOI4 modding agents. The main workflow is an MCP client discovering prompts, reference resources, and tools, then using project/environment inspection, CWT language support, and file-oriented generation, validation, and repair to produce mod-ready changes. Separate capabilities include preferences and RNMDB-backed state, audit logs, and Rchadow-assisted debug launch preparation. Relationships among unsampled tool implementations are limited to documented capabilities and the tool catalog’s indexed module references.
Main entry points: mod.rs Tool catalog · server.rs MCP server · skill.rs Bundled Skill · project_validation.rs Validation and repair
Components 25
Agent interfaces
- MCP server
src/server.rs - Tool catalog
src/tools/mod.rs - Bundled Skill
src/skill.rs
HOI4 guidance
- Prompt catalog
src/prompts/mod.rs - Knowledge resources
src/resources/mod.rs - HOI4 knowledge
src/resources/knowledge.rs - CWT resources
src/resources/cwt.rs
CWT language
- HOI4 CWT config
src/cwt/hoi4_config.rs - CWT rules
src/cwt/rules.rs - Workspace service
src/cwt/service.rs - Language workspace
src/cwt/workspace.rs - CWT tools
src/tools
Project tools
- Environment discovery
src/tools/environment.rs - Project file access
src/tools/project_files.rs - Effective file view
src/tools/project_effective_files.rs - Project indexing
src/tools/project_index.rs - Validation and repair
src/tools/project_validation.rs - Identifier scan
src/tools/unique_scan.rs - Paradox lexer
src/tools/paradox_lexer.rs
State and integrations
- Scoped preferences
src/tools/preferences.rs - RNMDB state store
src/state/store/sql.rs - Tool audit logs
src/tools/tool_logs.rs - Debug launch prep
src/tools/rchadow_debug.rs
Other components
- MCP client
- Rchadow library
Connections 33
- MCP client → MCP server: uses stdio
- MCP server → Tool catalog: dispatches tools
src/server.rs - MCP server → Prompt catalog: serves prompts
src/server.rs - MCP server → Knowledge resources: serves resources
src/server.rs - MCP client → Bundled Skill: uses Skill
- Bundled Skill → Prompt catalog: uses catalog
src/skill.rs - Bundled Skill → Knowledge resources: uses catalog
src/skill.rs - Bundled Skill → Tool catalog: uses catalog
src/skill.rs - Knowledge resources → HOI4 knowledge: serves topics
src/resources/mod.rs - Knowledge resources → CWT resources: serves CWT
src/resources/mod.rs - Workspace service → Language workspace: manages workspaces
src/cwt/service.rs - Language workspace → CWT rules: loads rules
src/cwt/workspace.rs - Language workspace → HOI4 CWT config: uses config
src/cwt/workspace.rs - Tool catalog → CWT tools: dispatches CWT
src/tools/mod.rs - Tool catalog → Environment discovery: dispatches discovery
src/tools/mod.rs - Tool catalog → Project indexing: dispatches indexing
src/tools/mod.rs - Tool catalog → Validation and repair: dispatches checks
src/tools/mod.rs - Tool catalog → Identifier scan: dispatches scans
src/tools/mod.rs - Project indexing → Project file access: collects files
src/tools/project_index.rs - Project indexing → Effective file view: resolves effective files
src/tools/project_index.rs - Effective file view → Project file access: uses collected files
src/tools/project_effective_files.rs - Validation and repair → Project file access: reads project files
src/tools/project_validation.rs - Validation and repair → Paradox lexer: tokenizes scripts
src/tools/project_validation.rs - Validation and repair → Project indexing: uses project index
src/tools/project_validation.rs - Identifier scan → Project file access: collects files
src/tools/unique_scan.rs - Identifier scan → Effective file view: filters effective files
src/tools/unique_scan.rs - Identifier scan → Paradox lexer: parses scripts
src/tools/unique_scan.rs - Tool catalog → Scoped preferences: dispatches preferences
src/tools/mod.rs - Scoped preferences → RNMDB state store: persists state
- Tool audit logs → RNMDB state store: stores log records
- Tool catalog → Tool audit logs: dispatches log tools
src/tools/mod.rs - Tool catalog → Debug launch prep: dispatches debug prep
src/tools/mod.rs - Debug launch prep → Rchadow library: prepares launch