Repository navigation
feat: turn the repo into the Knowledge Base user guide with agentic docs sync - #8
Merged
Merged
Conversation
Runs on a kb-release repository_dispatch from AbsaOSS/knowledge-base or manually via workflow_dispatch with a tag input. A Copilot agent diffs the upstream contract and actions against the previous release and opens a draft PR with matching docs and manifest changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Read the release tag from the upstream checkout instead of the dispatch payload (not an allowed prompt expression), bill inference to the COPILOT_GITHUB_TOKEN owner, give each dispatch its own concurrency slot and stop the agent from executing knowledge-base code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
The workflow instructions leave generated PRs without an explicit contract-check gate and block builder compatibility updates needed for contract-major version bumps.
2 open issues
What changed in this PR
Adds a Copilot-powered workflow to keep this MkDocs documentation template aligned with knowledge-base releases by proposing updates in a draft PR.
Changes:
- Supports release notifications and manual runs against a supplied upstream tag.
- Defines upstream comparison, scoped updates, headless build verification, and draft PR creation.
- Adds the compiled workflow and action pin metadata, while ignoring the upstream checkout and marking generated workflow files.
| File | Description |
|---|---|
.gitignore |
Ignores the workflow’s .kb-upstream/ checkout. |
.github/workflows/sync-kb-docs.md |
Defines triggers, agent permissions, synchronization instructions, and PR output. |
.github/workflows/sync-kb-docs.lock.yml |
Provides the compiled workflow for execution in GitHub Actions. |
.github/aw/actions-lock.json |
Records the pinned agentic-workflow setup action. |
.gitattributes |
Marks compiled workflow files as generated. |
Review effort: Balanced
Comment on lines
+87
to
+88
| - `theme/main.html` and `scripts/pack.py`: only if a headless rule changed | ||
| (for example a required attribute or a forbidden element) |
|
|
||
| Run `python scripts/pack.py --headless` and make sure it succeeds. Treat | ||
| `./.kb-upstream` as read-only reference material: never execute code from it. | ||
| The contract checker runs on the pull request through `check-docs.yml`. |
The docs template now doubles as the Knowledge Base user guide. Template pages move into a "Docs Template" section and docs/index.md becomes the product overview. The sync-kb-docs workflow maps knowledge-base features at a release via the .kb-sync/features.yml feature map and opens one draft PR updating the guide and landing page. Modes: incremental (since last synced release), full (re-map everything) and audit (report drift as an issue). Only released vX.Y.Z tags are documented. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… ci/sync-docs-on-kb-release
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.

Turns this repository into the Knowledge Base user guide while keeping it the docs template other teams copy. The guide itself is the working example of the template. A GitHub Agentic Workflow (gh-aw, Copilot engine) maps the features of a knowledge-base release and opens one draft PR that brings the guide up to date.
Docs structure
docs/index.mdis now the Knowledge Base overview.template.md, previouslyindex.md;customising.md,adding-pages.md,publishing.md) move into a Docs Template section (order 100+).docs/kb/under the sections Knowledge Base, Publish Your Docs, Run a Knowledge Base, Embed in a Host App and Reference. The firstfullrun creates them.mkdocs.ymlsite_nameis now "Knowledge Base User Guide".Feature map:
.kb-sync/features.ymlignorelist for upstream paths that are not user-facing.synced.tag/synced.sha. It is empty now, so the first run is a full one.Workflow:
.github/workflows/sync-kb-docs.mdTriggers
workflow_dispatchwith an optionaltag(empty means the latest release) and amode.repository_dispatchkb-release, which knowledge-base can send after a release.Modes
incrementaldiffssynced.sha..target, maps the changed paths to features and documents any unmapped user-facing path as a new feature.fullre-maps everything.auditchanges no files and opens one issue listing the drift.What the agent does
vX.Y.Ztags. It ignores floatingv1and unreleased commits.action.yml/ workflow inputs, then code, then prose. Every key, input, env var, route and rule ID it writes has to exist at the target tag.data/showcase.ymlso the Knowledge Base is the product and the Docs Template is one of its features. This happens in full mode, or in incremental mode when a headline feature changes.docs/kb/changelog.mdand the feature map up to date.Safeguards
.github/,theme/orscripts/.[kb-docs]prefix), or one issue in audit mode.python scripts/pack.py --headless.sync-kb-docs.lock.ymlis generated bygh aw compile; edit the.mdand recompile. The compiler still shows one warning,privileged-checkout, which is accepted: only users with write access can trigger the workflow, and upstream code is never executed.Setup required
COPILOT_GITHUB_TOKEN: a fine-grained PAT with Copilot Requests: Read. Inference is billed to the PAT owner's Copilot plan.kb-releasewithclient_payload.tagafter each release.check-docs.yml; close and reopen them to run the check.Release Notes
sync-kb-docsagentic workflow, which documents each knowledge-base release (incremental, full or audit mode) through a draft PR..kb-sync/features.yml, which maps knowledge-base features to guide pages and records the last documented release.🤖 Generated with Claude Code