Generator Architecture
The generator started as one pragmatic bootstrap script. The current architecture contract defines responsibility boundaries so future refactors can split modules without changing IDs, seals, URLs, or generated assets accidentally.
Components
| sources |
source_extracts; source lineage |
grimoire_build.sources; scripts/bootstrap_project.py orchestrates |
grimoire_build.sources |
| lexicon |
houses; major canon; pocket canon; master lexicon; canon quality |
grimoire_build.lexicon; scripts/bootstrap_project.py builds records |
grimoire_build.lexicon |
| spells |
spell records; spell pages; warded spell fields |
grimoire_build.spells; scripts/bootstrap_project.py builds records and pages |
grimoire_build.spells |
| stacks |
stack records; stack pages; stack diagrams |
grimoire_build.stacks; scripts/bootstrap_project.py builds records and pages |
grimoire_build.stacks |
| bench |
evaluation pages; bench contracts; adversarial harness pages |
grimoire_build.bench; scripts/bootstrap_project.py writes pages |
grimoire_build.bench |
| exports |
prompt assets; tool exports; library bundles; checksums |
grimoire_build.exports; scripts/bootstrap_project.py writes assets |
grimoire_build.exports |
| site |
Quarto config; reference pages; navigation |
grimoire_build.site; scripts/bootstrap_project.py writes pages |
grimoire_build.site |
| seals |
canonical streams; working seals; seal stability |
grimoire_build.seals; scripts/bootstrap_project.py computes streams |
grimoire_build.seals |
Source-of-Truth Rules
| source manuscripts |
source_docs/; source_extracts/ |
Preserve as lineage; regenerate extracts from source documents when needed. |
| canonical data |
data/*.json |
Generated by bootstrap unless a future module explicitly owns the source record. |
| generated pages |
chapters/; reference/; spells/; stacks/; examples//.qmd |
Edit generator or source data, then regenerate. |
| bench evidence |
examples/evaluations/runs/; examples/jailbreak-resilience/runs/ |
Preserve prompts, transcripts, surface labels, fixture paths, timestamps, scores, and notes. |
| release artifacts |
prompts/; exports/ |
Generated from canonical spell/stack data; verify with manifest checksums. |
Determinism Policy
- Bootstrap generation must be deterministic for committed generated artifacts.
- Working seals change only when canonical streams change.
- Release bundles use fixed archive metadata and manifest checksums.