Synthetic Philosophy and Deductive Engineering
This document describes how to maintain glossary links in the SPaDE documentation.
The SPaDE project maintains a glossary of important terms in docs/tlad001.md. To improve documentation navigability, occurrences of these terms throughout the documentation should link to their glossary definitions.
The amcd001.py script in this directory automates the process of adding glossary links to the documentation.
To preview what changes would be made (dry run):
cd /path/to/SPaDE
python3 docs/admin/add_glossary_links.py --dry-run
To apply the changes:
cd /path/to/SPaDE
python3 docs/admin/add_glossary_links.py
The script:
reviews/ and retro/ directories)docs/tlad001.mdThe script currently links the following 20 terms and their variations:
File List Entries: The script may create nested links in file list entries (e.g., in README.md files where filenames are listed with descriptions). These should be manually reviewed and fixed to restrict the outer link to just the filename portion.
Review Changes: Always review the changes made by the script before committing them, especially:
The script should be run:
docs/tlad001.mdWhen new terms are added to the glossary:
docs/admin/add_glossary_links.pyTERMS list with the new term and its anchor--dry-run before applying changesFull automation is not recommended because:
A recommended workflow:
--dry-run to see what would changegit diff to review all changesFor future consideration, the script could be integrated into CI/CD to:
However, automatic link addition in CI/CD is not recommended without human review.
Suppose you add a new term “Metatheory” to the glossary with anchor #metatheory.
Edit docs/admin/add_glossary_links.py:
TERMS = [
# ... existing terms ...
("Metatheory", "#metatheory"),
# ... more terms ...
]
Run a dry-run:
python3 docs/admin/add_glossary_links.py --dry-run
Review the output to see where “Metatheory” would be linked
Apply the changes:
python3 docs/admin/add_glossary_links.py
Review the changes:
git diff
Fix any nested links or formatting issues manually
Commit:
git add .
git commit -m "Add glossary links for new term 'Metatheory'"
If the script creates nested links (links within link text), these need to be fixed manually. Common locations:
Fix by restricting the outer link to just the filename/essential part, removing the glossary link from the description.
The script calculates relative paths automatically. If you see incorrect paths:
GLOSSARY_PATH = "docs/tlad001.md" is correctPossible causes:
TERMS list in the script