Sync architecture
The docs portal aggregates workflow documentation using a Git-backed mirror with GitLab multi-project pipeline automation.
Architectural decision: Model A (Git mirrors)
Chosen model: workflow docs are stored in the portal repository under docs-<workflow>/ after each sync.
| Model | Description | Verdict |
|---|---|---|
| A — Git mirrors | Portal repo contains mirrored Markdown; CI updates mirrors deterministically | Default |
| B — Fetch at build | Portal pipeline clones workflow docs only at build time; no mirror in Git | Rejected for this project |
Why Model A
- Reviewability: merge requests show exactly what will be published
- Traceability: Git history records each sync commit with workflow ref context
- Reproducibility: a portal commit SHA fully determines site content
- Local development: developers run the same Python sync locally without CI tokens
- Agent clarity: mirrored paths match Docusaurus content roots explicitly
Tradeoffs of Model B (rejected)
- Smaller portal repo, but MRs do not show imported doc diffs
- Harder offline development and bisect
- Build-only failures surface late without a reviewable mirror commit
Components
┌──────────────────────── workflow repo ────────────────────────┐
│ docs/ authoritative workflow Markdown │
│ docs/workflow-manifest.yaml machine-readable sync contract │
│ docs/portal-integration.md human portal integration guide │
│ docs/navigation-meta.md navigation notes (not synced) │
│ .gitlab-ci.yml validate + trigger docs-portal │
└────────────────────────────┬──────────────────────────────────┘
│ downstream pipeline (strategy: depend)
▼
┌──────────────────────── docs-portal ──────────────────────────────┐
│ workflows/registry.yaml portal registry of known workflows │
│ scripts/sync_workflow.py cross-platform Python sync CLI │
│ docs-<workflow>/ mirrored Markdown (+ portal intro) │