feat(docs): add LLM-driven narrative doc sync pipeline#20
Open
dylandepass wants to merge 2 commits into
Open
Conversation
When a source repo (e.g. helix-commerce-api) merges to main, the new llm-doc-sync workflow computes diffs since each doc's lastReviewedCommit, sends them to GPT-5.6 Terra along with the current doc and style guide, and opens a PR with the drafted updates. Includes the sync script, GitHub Actions workflow (repository_dispatch + workflow_dispatch), and README documentation.
Replaces the SOURCE_REPOS_TOKEN PAT with a short-lived token minted from the Helix Commerce Review Bot GitHub App via create-github-app-token.
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.
When a source repo (e.g. helix-commerce-api) merges to main, the new
llm-doc-syncworkflow computes diffs since each doc'slastReviewedCommit, sends them to GPT-5.6 Terra along with the current doc and style guide, and opens a PR with the drafted updates.What's included
scripts/docs/llm-sync.mjs— Core sync script: scansdocs/*.mdfrontmatter, computes filtered diffs (excludes tests, CI, lock files), calls the OpenAI API, writes updated docs.github/workflows/llm-doc-sync.yaml— GitHub Actions workflow triggered byrepository_dispatch(from source repos) orworkflow_dispatch(manual). Checks out both repos, runs the sync, opens a PR labeledai-authoredscripts/docs/README.md— Updated with LLM doc sync documentation, local run instructions, and env var referenceHow it works
repository_dispatchevent on merge to mainsourcesfrontmatter mappinggit diff lastReviewedCommit..HEAD(filtered to non-test code)Still needed (separate PRs)
SOURCE_REPOS_TOKENandOPENAI_API_KEYsecrets on this repo