Prompt: Retroactive Site-Wide Template Transform (2026m04d20_11h39)#
Draft prompt for transforming all existing balospe.com documents to conform to the
three-template system defined in AHA/document-beginnings.md. This is a
high-blast-radius operation. Do NOT execute without LLoL’s explicit approval
of the full plan below.
1. Scope#
The current balospe.com repo contains approximately [to be counted] RST and
MD files across source/ and AHA/. Each must be classified into one
of three templates and brought into conformance.
Three-template targets:
Template A (Front pages): [AHA/page-template.md] + [page-template-to-instantiate-copy.rst]
Template B (Study pages): [AHA/page-template_b_study-pages.md] — arxiv-ready.
Template C (Raw pages): [AHA/page-template_c_raw-pages.md] — internal production files.
Not in scope: Files in build/ (generated), locale/ (translation
.po), .claude/ (Claude settings), node_modules/ (if any),
.git/, archived / obsolete content.
2. Safety and Datageddon Avoidance#
2.1 Work in a branch#
All work on a dedicated branch (suggested: retro-template-transform).
Main branch stays clean. No pushes to main until LLoL approves the branch.
2.2 Pilot before batch#
Before any batch execution:
Pick 2 files — one Study-page candidate (e.g., b11 paper), one Raw-page candidate (e.g., one 2026m04d07 llog).
Apply the transform to those two files only.
LLoL reviews the result.
If LLoL approves, proceed to batch. If not, adjust the spec or the transform script, re-pilot.
2.3 Batch by type, not alphabetically#
Do NOT transform “all files in source/” as one atomic operation.
Batch by type:
Matheo papers (b11–b18 main papers) → Template B. (~10–15 files.)
LLogs (
hell/ll/**/*llog*.rst) → Template C. (~50–100 files.)Prompt files (
hell/ll/**/*prompt*.rst) → Template C. (~20–30 files.)Growth Garden / Design Doc / KB / review files → Template C. (~10–30 files.)
Indexes (
aaa.rst,b18-overview.rst, etc.) → Template C.Matheo sub-papers (intro, theophil, socpsy, etc.) → Template B.
Front-facing content pages (index, intro, faq, action) → Template A. (These already use
AHA/page-template.md; verify conformance rather than transform.)
Each batch is a separate commit on the branch. Rollback granularity = one batch.
2.4 Checkpoint after each batch#
After each batch:
Run
make clean && make dev. Verify zero NEW Sphinx warnings. (Existing warnings are OK; new warnings introduced by the transform must be fixed before proceeding.)Verify cross-references still resolve (
sphinx-build -b linkcheckif feasible; or grep for broken:doc:references).LLoL reviews a sample of transformed files.
Commit the batch with a descriptive message. Tag the commit for easy rollback.
2.5 Rollback plan#
Any single batch can be reverted via
git revert <commit-hash>.If the whole transform needs to be abandoned, the branch can be deleted without affecting main.
Keep tags at the start of each batch for checkpoint-level rollback.
3. Per-File Transform (What Changes)#
3.1 Template A (Front pages) — verify-only transform#
For files already using AHA/page-template.md:
Verify
.. meta::block is present with:description:,:keywords:,:author:.Verify first paragraph is SEO-usable.
Verify footer form (open-std or shut-std) is present and uses current
MailForm=OOv2r0p0syntax.VVN: if present in page-status annotation, update to the current format. If absent, leave absent (Front pages don’t require a prominent VVN; the page-status annotation is enough).
Do NOT restructure. Do NOT move metadata to end (this is what makes A different from B and C).
3.2 Template B (Study pages) — restructure#
For Matheo series papers and academic sub-papers:
Title: Remove any timestamp from the title string. Keep the filename’s timestamp.
Top metadata block:
If the current file has a large
.. note::block with draft status, VVN, etc., REPLACE with a small Supplementary (brief).. note::block containing only:VVN (Hu):(blank if not assigned),VVN (Ma):(corrected format),Draft:date, and any short details LLoL had on the original.
Abstract / Broader Significance:
If these sections exist as RST headings, convert them to
**Abstract**/**Broader Significance**bold text (NOT headings).If Broader Significance does not yet exist, add a
[TODO: write Broader Significance]marker for LLoL to fill in later.
Local TOC:
Insert
.. contents:: Contentswith:depth: 2and:local:directly AFTER Broader Significance and BEFORE the first numbered section.
Body: Leave numbered sections (1. Introduction, 2. …) as-is.
Acknowledgements: Leave as RST heading where it exists. If absent, add a
[TODO: write Acknowledgements]marker.Supplementary (long):
Add a new
SupplementaryRST heading after Acknowledgements and before References.Populate with the 7 sub-items (S.1 Code/Data, S.2 Prompts, S.3 LLogs, S.4 Reviews, S.5 AI Model Disclosure, S.6 Correction Log, S.7 License).
Fill in what can be inferred from existing material; mark rest as
[TODO: LLoL to fill].
References: Leave as-is.
End dropdowns:
Add Companion papers dropdown (
:open:) listing cross-references to sibling Matheo papers (extracted from existing:doc:references in the paper).Add HELL dropdown (
:closed:) with the standard warning text, listing links to the paper’s llogs, prompts, and reviews.
VVN format: Update any inline VVN strings to
[content-prefix]-[dv/iv]_[Assessor]_[StabilityCodeVRP]_[timestamp]perAHA/vvn-composition.md. Bumppcounter to mark the retro-transform patch.
3.3 Template C (Raw pages) — restructure#
For llogs, prompts, GG, DD, reviews, KBs, indexes:
Title: Remove any timestamp from the title string. Keep filename as-is.
Context paragraph: If the file has a large
.. note::block at the top, replace with a 1–2 line context paragraph (extracted or written) under the title.Local TOC: Insert
.. contents::directly after the context paragraph.Body: Leave numbered sections / verbatim prompts as-is.
End Notes block:
Add
NotesRST heading at the end.Populate with
VVN (Hu):,VVN (Ma):,POST code:,Mode:,Effort:,Trigger prompt:,Companion documents:,Output files:.Extract values from existing header block.
End dropdowns:
Companion papers/llogs dropdown (
:open:).HELL dropdown (
:closed:) with standard warning.
POST code:
For files currently in the POST system (AA, AAA, etc.), preserve their classification.
For files without an explicit POST code, infer from filename / directory and add as
[POST code: <inferred> --- LLoL to confirm].
VVN format: Same as Template B rules.
3.4 LLogs specifically — append, don’t edit#
LLogs are append-only audit trails. For existing llogs:
The transform MAY update structural elements (title, TOC, end Notes block) because these are metadata, not content.
The transform MUST NOT edit the historical content — verbatim prompts, responses, analyses stay as written.
The historical VVN at the top of each llog (even if malformed by the current convention) STAYS. Add a NEW correction note at the end of the Notes block: “Original VVN: [old string]. Corrected per
AHA/vvn-composition.md: [new string].”
This preserves the audit trail while updating the display format.
4. Execution Order (Recommended)#
Session 1 (pilot):
Create branch.
Transform 2 files (1 Study pilot, 1 Raw pilot).
LLoL reviews.
Adjust transform rules if needed.
Session 2 (llogs batch):
Transform all llogs (~50–100 files).
Run
make dev. Verify zero new warnings.LLoL reviews sample.
Commit.
Session 3 (prompts batch):
Same pattern for prompt files.
Session 4 (GG/DD/KB/review batch):
Same.
Session 5 (indexes batch):
aaa.rst,b18-overview.rst, and similar.
Session 6 (Matheo papers batch):
b11 through b18 papers and academic sub-papers.
Session 7 (Front-pages verify-only):
Spot check. Front pages should already conform.
Session 8 (merge):
LLoL reviews full branch diff.
Merge to main.
Deploy.
Estimated total: 7–10 working sessions. Adjust based on pilot findings.
5. Risks and Mitigations#
Risk |
Likelihood |
Mitigation |
|---|---|---|
Broken cross-references ( |
High (any restructure risks this) |
Run |
Lost historical VVN strings in llogs |
Medium (transform could overwrite) |
§3.4: append correction note, preserve historical string. |
Transform applied to wrong template class |
Medium (classification errors) |
Pilot first; batch by file-type pattern; LLoL reviews. |
Build breakage (Sphinx errors) |
Low-medium |
|
Site rendering looks worse after transform |
Low |
Pilot review catches this; adjust spec. |
LLoL preferences evolve mid-transform |
High (this is a long project) |
Each session commits; changes apply to subsequent files only. |
Lost rejected-draft variants in |
Low (those are already archived) |
Explicit rule: do not touch |
6. Open Questions (Before Execution)#
POST code registry: Template C’s POST field needs the authoritative list from LLoL. Partial list in
AHA/POST.md; full list in LLoL’s head.Which files get ``VVN (Hu)`` during the transform vs. left blank for later? Blanket rule: leave
VVN (Hu):blank during the transform. LLoL assigns it when reviewing.Figures twice retroactive: For existing Matheo papers with inline figures, do we add the Figures-at-Full-Size appendix retroactively, or only for new papers?
SGIR paper specifically: Already very close to Template B. Does it serve as the “pilot” for Session 1, or is a smaller / simpler paper preferred for the pilot?
Hardcoded VVN references in other files (e.g., aaa.rst): if a VVN is cited in aaa.rst and the source file’s VVN updates, do we update the citation too? (Yes, recommend; but this doubles the transform scope.)
7. What the Transform Produces (Success Criteria)#
After transform complete:
Every file in
source/andAHA/classified as A, B, or C.Every Study-page file conforms to [AHA/page-template_b_study-pages.md].
Every Raw-page file conforms to [AHA/page-template_c_raw-pages.md].
Every Front-page file conforms to [AHA/page-template.md] (verified).
Every file has a correctly-formatted VVN (Ma) per [AHA/vvn-composition.md].
Every llog has preserved its historical VVN alongside the corrected one.
make clean && make devproduces zero new Sphinx warnings.All
:doc:and:ref:cross-references resolve.LLoL can find the same content in its new location / structure.
Audit trail is intact (git log of each batch is legible).
Notes#
retro-template-transform-dv_ClaOp47Max_MMv1r0p0_2026m04d20_11h39AHA/document-beginnings.md;
AHA/page-template_b_study-pages.md;
AHA/page-template_c_raw-pages.md;
AHA/vvn-composition.md.source/ and AHA/
will be touched (read and possibly modified).Companion files
LLog: Templates B (Study) and C (Raw) Refinement + Retro Transform Prompt (2026m04d20_11h39) — session that produced this prompt
AHA/document-beginnings.md— three-template overviewAHA/page-template_b_study-pages.md— Template B full specAHA/page-template_c_raw-pages.md— Template C full specAHA/vvn-composition.md— VVN formatAHA/page-template.md— Template A spec (preserved for Front pages)
End of prompt.