/compile-matheology — Compilation Skill Definition#
Note
This is a specification document, not executable code. It defines
what the /compile-matheology skill should do so that a future
Claude Code session can implement it as an actual skill. The
authoritative source for field definitions, depth codes, and label
grammar is
Links for Matheology BEST Names Design.
Created: Phase 2I-3 (2026-03-25).
Prerequisite knowledge: AHA design doc Sections 7, 9, 10, 12.
1. Purpose#
The /compile-matheology skill reads PoR (Point of Research) source
files and generates audience-specific downstream pages using the
Extraction Matrix defined in Section 3 below. Each generated page
contains only the fields appropriate for its target audience (D4 depth),
extracted and transformed according to the matrix keywords.
2. Invocation#
/compile-matheology [mode] [options]
Modes: replace, append, archive, migrate
Options:
--output <folder> Default: matheology/axioms/
--models <list> Default: all
--depths <list> Default: all
--views <list> Default: all
--states <list> Default: all
--stubs yes|no Default: no
--version-increment <v|r|p> Required for archive mode
--archive-folder <path> Default: vv/{version}/
--vvn <string> Required for archive mode
--stayc <code> Required for archive mode
--freeze-por yes|no Default: no
3. Extraction Matrix#
The Extraction Matrix controls which PoR fields appear at each D4
audience depth and how they are transformed. Each cell contains one of
the extraction keywords defined below. drop means the field is
silently omitted at that depth.
3.1 Keyword Vocabulary#
Keyword |
Meaning |
|---|---|
|
Include in full (field copied verbatim from PoR) |
|
First sentence only (truncate to opening statement) |
|
Top 3 entries (for lists, pick highest-impact items) |
|
Single best entry (e.g., 1 strongest tradition quote) |
|
Omit entirely (field does not appear at this depth) |
|
Heading only, marked |
|
Cross-reference link only (point to PoR for full content) |
|
Include, rewritten for audience (rephrase for accessibility or formality) |
3.2 Identity & Display (fields 1–6)#
# |
Brief |
Field |
Expert |
Producer |
Easy |
Math |
Machine |
|---|---|---|---|---|---|---|---|
1 |
|
BriefName |
full |
full |
full |
full |
full |
2 |
|
Title |
full |
full |
rewrite |
ref |
full |
3 |
|
ExplicitName |
full |
drop |
drop |
full |
full |
4 |
|
SummarizingName |
full |
full |
rewrite |
brief |
full |
5 |
|
ExplanationIntroOverview |
full |
rewrite |
rewrite |
drop |
drop |
6 |
|
FormalMathLatex |
full |
brief |
drop |
full |
full |
3.3 Technical, Structural, and Analytical (fields 7–11, 19, 30–45)#
Fields marked stub at expert depth are >50% stub across all 32 elements per the Phase 2I-2 field testing report.
# |
Brief |
Field |
Expert |
Producer |
Easy |
Math |
Machine |
|---|---|---|---|---|---|---|---|
7 |
|
TechExplanationContext |
full |
brief |
drop |
full |
drop |
8 |
|
TechExplanationContentAll |
full |
drop |
drop |
full |
drop |
9 |
|
LogicsUsed |
full |
drop |
drop |
full |
full |
10 |
|
TechReasoningAll |
full |
drop |
drop |
full |
drop |
11 |
|
TechInformal |
full |
full |
rewrite |
drop |
drop |
19 |
|
Limit |
full |
brief |
drop |
full |
ref |
30 |
|
NeedsFeed |
full |
drop |
drop |
full |
full |
31 |
|
FeedsNeed |
full |
drop |
drop |
full |
full |
32 |
|
StabilityCode |
full |
ref |
drop |
ref |
full |
33 |
|
MentorOrganizing |
stub |
drop |
drop |
drop |
drop |
34 |
|
VersioningHistory |
stub |
drop |
drop |
drop |
drop |
36 |
|
ConsRef |
full |
ref |
drop |
ref |
ref |
37 |
|
ProsRef |
full |
ref |
drop |
ref |
ref |
39 |
|
VersionedVariantCurrent |
full |
ref |
drop |
ref |
full |
40 |
|
ModelUsedIn |
full |
full |
full |
full |
full |
41 |
|
Convergence |
full |
brief |
rewrite |
drop |
drop |
42 |
|
Bibliography |
full |
top3 |
drop |
ref |
ref |
43 |
|
Policy |
stub |
drop |
drop |
drop |
drop |
44 |
|
History |
stub |
drop |
drop |
drop |
drop |
45 |
|
DOI |
stub |
drop |
drop |
drop |
drop |
3.4 POST Operational (fields 20–29, 35, 38)#
# |
Brief |
Field |
Expert |
Producer |
Easy |
Math |
Machine |
|---|---|---|---|---|---|---|---|
20 |
|
JammedJob |
stub |
drop |
drop |
drop |
drop |
21 |
|
AnyAim |
stub |
drop |
drop |
drop |
drop |
22 |
|
KnownKiller |
full |
brief |
drop |
ref |
drop |
23 |
|
FeedbackFlow |
stub |
drop |
drop |
drop |
drop |
24 |
|
CollectedContent |
full |
brief |
drop |
ref |
drop |
25 |
|
DesignDoc |
stub |
drop |
drop |
drop |
drop |
26 |
|
GrowthGarden |
stub |
drop |
drop |
drop |
drop |
27 |
|
HistoryHeap |
stub |
drop |
drop |
drop |
drop |
28 |
|
WorkingWheel |
stub |
drop |
drop |
ref |
drop |
29 |
|
YesYet |
stub |
drop |
drop |
drop |
drop |
35 |
|
LabLog |
full |
drop |
drop |
drop |
drop |
38 |
|
VersionedVariant |
full |
drop |
drop |
drop |
full |
3.5 Independent Support — D5 Core (fields 12–18)#
# |
Brief |
Field |
Expert |
Producer |
Easy |
Math |
Machine |
|---|---|---|---|---|---|---|---|
12 |
|
SupportTorah |
full |
top3 |
top1 |
drop |
drop |
13 |
|
SupportHebrewBible |
full |
top3 |
top1 |
drop |
drop |
14 |
|
SupportGospels |
full |
top3 |
top1 |
drop |
drop |
15 |
|
SupportApostolic |
full |
top3 |
top1 |
drop |
drop |
16 |
|
SupportQuran |
full |
top3 |
top1 |
drop |
drop |
17 |
|
SupportSanskrit |
full |
top3 |
top1 |
drop |
drop |
18 |
|
ViewSecular |
full |
top3 |
top1 |
drop |
drop |
3.6 Independent Support — D5 Extended (fields 46–54)#
Worldview fields follow the same extraction pattern as the core source fields (12–18). Language-specific cultural fields appear only at expert depth because they carry insights that resist translation.
# |
Brief |
Field |
Expert |
Producer |
Easy |
Math |
Machine |
|---|---|---|---|---|---|---|---|
46 |
|
ViewJudaism |
full |
top3 |
top1 |
drop |
drop |
47 |
|
ViewChristianity |
full |
top3 |
top1 |
drop |
drop |
48 |
|
ViewIslam |
full |
top3 |
top1 |
drop |
drop |
49 |
|
ViewHinduism |
full |
top3 |
top1 |
drop |
drop |
50 |
|
ViewBuddhism |
full |
top3 |
top1 |
drop |
drop |
51 |
|
CulturalGerman |
full |
drop |
drop |
drop |
drop |
52 |
|
CulturalArabic |
full |
drop |
drop |
drop |
drop |
53 |
|
CulturalHebrew |
full |
drop |
drop |
drop |
drop |
54 |
|
CulturalChinese |
full |
drop |
drop |
drop |
drop |
3.7 Summary Statistics#
Field counts per depth (45 core fields; D5 extensions 46–54 add to each row):
Depth |
full |
brief |
top3 |
top1 |
rewrite |
ref |
stub |
drop |
|---|---|---|---|---|---|---|---|---|
Expert |
32 |
0 |
0 |
0 |
0 |
0 |
13 |
0 |
Producer |
5 |
6 |
9 |
0 |
2 |
3 |
0 |
20 |
Easy |
2 |
0 |
0 |
7 |
4 |
0 |
0 |
32 |
Math |
11 |
1 |
0 |
0 |
0 |
7 |
0 |
26 |
Machine |
14 |
0 |
0 |
0 |
0 |
3 |
0 |
28 |
4. Modes#
4.1 REPLACE Mode#
Regenerate ALL downstream pages from current PoR sources.
When to use: PoR content has changed substantially.
Execution sequence:
Read all PoR source files:
source/matheology/pet/axioms.rstsource/matheology/jub/axioms.rstsource/matheology/jub/theorems.rstsource/matheology/jub/quest.rst
Parse each element (axiom, theorem, quest entry) into its PoR fields. Each element is identified by its
.. _label:directive.For each element x depth x view combination:
Look up the element’s fields in the Extraction Matrix.
For each field, apply the extraction keyword:
full: copy field content verbatimbrief: extract first sentence (up to first.or\n\n)top3: for list fields, take the first 3 itemstop1: for list fields, take the first itemdrop: skip entirelystub: emit heading with[stub --- content pending]ref: emit:ref:`{label}`cross-reference linkrewrite: transform prose for target audience (see Section 6)
Generate an RST page using the output template (Section 5).
Write to the output folder using the BEST Names label as filename.
Rebuild
toctreedirectives in all affectedindex.rstfiles.Run
make htmlto check for warnings or broken references.
4.2 APPEND Mode#
Add new elements without regenerating existing entries.
When to use: New model or new elements added (e.g., 4Be model).
Execution sequence:
Read all PoR source files.
Diff against existing output folder to identify NEW elements (elements with no corresponding output page).
Generate pages for new elements only (same extraction logic as REPLACE).
Add new entries to existing
toctreedirectives.Run
make htmlto check.
4.3 ARCHIVE Mode#
Freeze current state to a versioned archive.
When to use: Major milestone (e.g., OOv2 freeze).
Execution sequence:
Run REPLACE first (ensure all downstream pages are current).
Copy entire output folder to
vv/compiled/{version}/.Tag all labels with version suffix (e.g.,
pet-ax5-oov2r0).Update version registry in the AHA design document.
If
--freeze-por yes: copy PoR source files to per-model VV archives.Run
make htmlto check.
4.4 MIGRATE Mode#
Transform existing files to a new naming or structural convention.
When to use: Structure change (e.g., ax1 to pet-ax1).
Execution sequence:
Read old-format files.
Build a migration table mapping old labels to new labels.
Transform all files:
Rename label directives (
.. _{old}:to.. _{new}:)Update all
:ref:`old`cross-references to:ref:`new`Update all
:doc:paths if file locations changed
Run
make htmlto check for any remaining broken references.
5. Output Template#
Each generated page follows this structure:
.. _{label}:
{title}
{title_underline}
.. This page was generated by /compile-matheology on {date}.
.. Source: {source_file}
.. Depth: {depth_code}
.. Do not edit manually. Re-run the skill to regenerate.
{extracted fields per extraction matrix}
Label construction follows the BEST Names grammar from the AHA design document:
Expert (default):
{model}-{typeID}(e.g.,pet-ax5)Producer:
{model}-{typeID}-prod(e.g.,pet-ax5-prod)Easy:
{model}-{typeID}-easy(e.g.,pet-ax5-easy)Math:
{model}-{typeID}-math(e.g.,pet-ax5-math)Machine:
{model}-{typeID}-ma(e.g.,pet-ax5-ma)
Title construction:
Expert: use
titlefield verbatimProducer/Easy: use
titlefield, may be rewritten for audienceMath: prefix with “Formal: “ (e.g., “Formal: ax5_A5 — Human Exceeding”)
Machine: prefix with “Data: “ (e.g., “Data: pet-ax5”)
6. Rewrite Rules#
When the extraction keyword is rewrite, the skill transforms the
field content for the target audience. The following rules apply:
Producer (PoT) rewrites:
Remove technical jargon; prefer plain language
Keep theological precision intact
Restructure for teaching flow (context before claim)
Preserve all scripture citations but simplify notation
Easy (PoU) rewrites:
Use short sentences (target: 15 words average)
Replace formal notation with natural-language equivalents
Lead with “In plain English:” style framing
Use analogies from everyday experience
Omit citation locators; keep only the quoted text
Rewrite is never automatic. When the skill encounters a rewrite
cell, it should flag the field for human review after generation. The
generated version is a draft; the human decides whether to accept,
edit, or reject it.
7. Stub Policy#
When ``–stubs no`` (default):
If an individual field would be
stubat a given depth, the heading is included with the[stub --- content pending]marker.If an ENTIRE PAGE would contain only
stubanddropfields (i.e., nofull,brief,top3,top1,rewrite, orrefcontent), the page is NOT generated and notoctreeentry is created. This prevents empty pages.
When ``–stubs yes``:
All pages are generated regardless of content level.
Stub-only pages use the depth-appropriate stub template from
source/_templates/stubs/matheology-{depth}.rst.Stub pages are marked with a visible banner:
.. warning:: This page is a stub. Content pending.
8. User Decisions Reference#
The 13 user decisions from AHA Section 12.2, mapped to CLI options:
# |
Decision |
CLI option |
Default |
Notes |
|---|---|---|---|---|
1 |
Mode |
|
(required) |
replace, append, archive, migrate |
2 |
Output folder |
|
|
Override for non-standard locations |
3 |
Models to include |
|
all |
Comma-separated: |
4 |
Audience-depths |
|
all |
Comma-separated: |
5 |
Worldviews |
|
all |
Which v-codes and s-codes to generate |
6 |
D2 chain types |
|
all |
Which D2 type IDs to generate pages for |
7 |
Stub folder |
(hardcoded) |
|
Pre-defined stub templates for depths |
8 |
Generate stubs? |
|
no |
If no, omit pages that would be entirely stubs |
9 |
Version increment |
|
(required for archive) |
|
10 |
Archive folder |
|
|
Override for non-standard location |
11 |
VVN |
|
(required for archive) |
e.g., |
12 |
StayVS maturity |
|
(required for archive) |
StayC code for the compilation |
13 |
Freeze PoR? |
|
no |
Copy PoR sources to per-model VV archives |
9. Implementation Notes#
9.1 PoR Field Parsing#
The current PoR format (as seen in pet/axioms.rst and
jub/axioms.rst) uses a semi-structured RST format:
Each element starts with
.. _{label}:Title is the next heading (underlined with
^^^or===)sumis the first italic line after the titleintrofollows “In plain English:”latexis inside.. math::blockstctxfollows “Explanation:”Source fields follow “Scriptural and philosophical support:” as a bullet list, keyed by tradition name in bold
The parser must extract these fields by pattern matching against the current RST structure. If the structure changes, the parser must be updated.
9.2 Cross-Reference Integrity#
After any compilation run, all :ref: links in generated pages must
resolve. The skill should:
Collect all labels defined in generated pages
Collect all
:ref:targets used in generated pagesCheck that every target either exists in generated pages or in the source PoR files
Report any orphaned references as warnings
9.3 Toctree Management#
Generated pages must be added to toctree directives in the
appropriate index.rst files. The skill should:
Read the existing
index.rstAdd new entries in alphabetical order within the appropriate section
Never remove existing manually-created entries
Mark auto-generated toctree sections with a comment:
.. Auto-generated by /compile-matheology. Do not edit below.
TELES migration report (2026m04d04)
Mechanical identifier migration applied to this file. All axiom/theorem text references were migrated from short form (e.g., A15) to compound form (e.g., ax15_A15) as part of the matheology compound naming operation. Both forms refer to the same formal object. The old form survives as the suffix to ensure consistency with the oldest records; the new form adds a temporary-status prefix. Forward-facing pages use brief form (ax15) only. See TELES Axiom/Theorem Compound Naming — Execution Prompt for the complete mapping table and DD b12 — Legacy Naming for PET/JUB Axioms and Theorems for the permanent reference.