Repository navigation
Generate the Tao Te Ching from the translation, and keep it current - #16
Merged
Merged
Conversation
Replaces the stopgap with the document opencosmos ADR 0020 §7 describes, written by scripts/knowledge/generate-tao-te-ching.ts from taoteching's data/atlas-export.json: one '## Chapter N' per chapter with the English and the Chinese, the translator's notes under '### Notes on chapter N', no pinyin. The output depends on the export alone, so an unchanged translation regenerates byte-identical. .github/workflows/tao-te-ching.yml regenerates it on taoteching's text-updated signal and daily, commits it to main (Shalom's call), and runs Knowledge Sync itself, because a push made with GITHUB_TOKEN triggers no other workflow. groom.py no longer knows this file: its processor wrote Feng and English's credit into it. Must merge only after opencosmos#222 is deployed: the new headings change every chunk id, and the old #twelve citations resolve only through its corpus-href mapping. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/knowledge/generate-tao-te-ching.tsfrom taoteching'sdata/atlas-export.json. It reads a sibling checkout first, and GitHub otherwise.## Chapter N: Heshang Gong's title, the English, then the Chinese.### Notes on chapter N, in the 65 chapters that have them. No pinyin.non-actiontag is dropped (the lock is non-doing), and so isupdated_at, so the output depends on the export alone.### Noteswould collide 81 times into hashed ids that no citation maps back. Headings inside the notes become bold lines.*End of chapter N.*. The embedder opens each chunk with the previous section's last paragraph, so without the marker, chapter 12's chunk would open with a paragraph of chapter 11's notes..github/workflows/tao-te-ching.ymlkeeps it current, with no hand step.text-updateddispatch, a daily run as the fallback, andworkflow_dispatch(withrefanddry_run).main, never the signal's sha, so a late signal can't roll the text back. It stops quietly if nothing changed, and otherwise commits straight tomain(your call).GITHUB_TOKENtriggers no other workflow, so without this step the corpus would never re-embed.workflow_dispatchis the one trigger that token may fire.groom.pyno longer knows this file. Its processor wrote "Translated by Gia-Fu Feng and Jane English" into it, sogroom --forcewould have put that credit back.Counts (verified by count, not exit status)
main(stopgap)embed:dryids)chapter-N+ 65notes-on-chapter-N+intro+curator-s-note#one…#eighty-one)npm run healthmainTest plan
npm run ttc:generatewrites the file.--checkthen reports it current, so the generator is deterministic.--ref export/reader-fields, fetched from GitHub, is byte-identical to the local sibling's output.main, the generator refuses taoteching's export, because #30 hasn't merged (no "verse"). That's intended.npm run health, the same asmain. It caught three relative links in the notes, which led to a fix in taoteching#30's export.npm run quotes:lintis OK.workflow_dispatchwithref=mainshould end in "already current".ref=<a taoteching test branch>withdry_run=trueshows the regenerated diff.What's needed from Shalom
KNOWLEDGE_DISPATCH_TOKENin taoteching. It's a fine-grained token: resource owneropencosmos-ai, onlyopencosmos-ai/knowledge, Contents read and write. Until it exists, the daily run catches changes within a day.🤓 + 🤖 Created by Shalom with the assistance of Claude Code