Skip to content

Architecture

The documentation and governance system spans three repositories, each with a distinct responsibility:

RepositoryRole
docs-controlCentral governance hub — repository settings, branch protection config, managed files manifest, reusable CI workflows, Antigravity AI workflows, caller workflow templates, agent skills, and downstream dispatch
docs-builderDocker build image — Astro + Starlight build orchestration, npm dependencies, Puppeteer PDF generation, interactive components
docs-themeAstro Starlight plugin — shared branding, CSS, fonts, logos, layout components, astro.config.mjs, and content.config.ts

Content repositories only need a docs/ directory. The build container and workflow handle everything else.

When a template file or workflow changes in docs-control on main:

  1. The dispatch workflow fires and triggers enforcement in every downstream repository
  2. The enforcement workflow compares desired state against current state and patches any drift
  3. The file sync workflow detects drifted managed files, creates a PR with canonical content, and auto-merges it
  4. Reusable Antigravity AI workflows (antigravity-review.yml and antigravity-translate.yml) execute on pull requests across enrolled repositories

The fleet incorporates Antigravity (agy) AI automation running on GitHub Actions runners:

WorkflowPurposeTrigger & Execution
Antigravity Code Review (antigravity-review.yml)Automated AI pull request code reviewRuns on PR creation or update. Uses Gemini 3.6 Flash (High) to audit diffs for security vulnerabilities, hardcoded secrets, PII leakage, and code quality, posting feedback via PR comments.
Antigravity Language Translation (antigravity-translate.yml)Automated AI documentation translationRuns on PRs modifying docs/en/**/*.md[x]. Executes the .agents/skills/i18n-translate/SKILL.md skill to update 12 target locales (fr, es, de, pt-br, ja, ko, zh-cn, zh-tw, ar, it, hi, th), update i18n.sourceHash, and auto-commit back to the PR branch.

Three sets of credentials provide least-privilege separation:

Token / SecretPermissions / ScopeUsed by
REPO_SETTINGS_TOKENAdministration R/W, Pages R/W, Contents Read, Metadata Readenforce-repo-settings.yml, dispatch-downstream.yml, update-governed-workflow-pins.yml
REPO_SYNC_TOKENContents R/W, Issues R/W, Pull Requests R/W, Metadata Readsync-managed-files.yml
ANTIGRAVITY_TOKEN & GCP_PROJECT_IDAntigravity AI Authentication & GCP Project Accessantigravity-review.yml, antigravity-translate.yml

The enforcement workflow needs admin access to modify branch protection and Pages settings. The sync workflow needs contents and PR access to create branches, commit files, and merge PRs. Antigravity AI workflows use dedicated project credentials to authenticate with Gemini 3.6 Flash.

Docs-control is both the provider and consumer of its own governance config. When enforce-repo-settings.yml runs on docs-control itself (via the push trigger), it detects this by comparing managed_files.source_repo against github.repository. This triggers the self_contexts override in branch protection — docs-control uses workflows directly (for example, Shell Unit Tests), while downstream repositories use caller wrappers (for example, lint / Shell Unit Tests). See the configuration page for details on contexts vs self_contexts.

Directory / FilePurpose
.github/config/repo-settings.jsonCentral config: repository settings, branch protection, Actions permissions, Pages config, and the managed files manifest
.github/config/downstream-repos.jsonRegistry of enrolled downstream repositories
.github/config/docs-sites.jsonMetadata for each downstream docs site (label, URL, description) used by README templating
.github/workflows/Reusable workflows: enforcement, file sync, pages deploy, linked-issue check, dispatch, antigravity review, and antigravity translation
.agents/skills/Agent skills governance: demo-components, i18n-translate
workflows/Caller templates downstream repositories install into .github/workflows/
docs/Documentation source (built and deployed via Astro Starlight)
CONTRIBUTING.mdContributor workflow rules (synced to all downstream repositories)
CLAUDE.mdAI assistant instructions (synced to all downstream repositories)
AGENTS.mdRepository agent instructions and governance policies
README.md.tplTemplate for dynamically generated downstream README files
.pre-commit-config.yamlPre-commit hooks configuration (synced to all downstream repositories)
.markdownlint.jsonMarkdown linter rules
.yamllint.yamlYAML linter rules