2.0 KiB
2.0 KiB
MPI Project Conventions
Skills
Skills in skills/. Loaded via ~/.hermes/config.yaml:
skills:
external_dirs:
- /home/user/documents/mpi/skills
{% hermes config set stringifies list values — edit config.yaml directly. %}
Available: terms-search, dharma-translation, translation-review, chinese-text-normalize, pptx-translate, pdf-to-docx-conversion.
Terms Database
- DB:
terms-search/termlib.duckdb - CLI:
terms-search/search.py <query> [limit](preferred over HTTP) - Module:
from search import search; search("空性", limit=5, loc="...", src="...")→ list of{zh, en, loc, source}dicts - Priority: DoT定稿 > 内部特色词 > 佛教术语 > 经论名
Directory Structure
translate-files/<topic>/<article>/
source.dj — Chinese original
target.dj — English translation (match source line count)
bilingual.dj — interleaved (source line, blank, target line, blank)
.docx output → /tmp/. Don't commit binaries.
Translation Workflow
- Load
dharma-translationandterms-searchskills - Search terms DB with
search.pyfor key terms before translating - Translate directly — agent IS the model, no external APIs
- Write
target.dj, match source line count exactly - TOC: bullet list, no link targets. No page numbers.
- Create
bilingual.dj(interleave source/target lines)
Djot
- Comments:
{% ... %} - Dashes:
---em,--en. Pandoc converts in docx output. - Preserve source formatting — don't add/remove emphasis
Scripts
Utility scripts in scripts/ (fish for CLI wrappers, Python for data processing).
Agents should write repetitive logic here and run via terminal rather than
regenerating the same Python in execute_code each turn.
scripts/dj2docx.fish <target.dj>— pandoc to/tmp/scripts/proofread-pdf.py <docx> <pdf>— word-level diff between manuscript and typeset PDFscripts/gen-bilingual.fish <dir>— producebilingual.djfromsource.dj+target.dj