How To: Update Arc42 Documentation
Last Updated: May 31, 2026 Difficulty: Beginner Estimated Time: 10–15 minutes
Overview
Section titled “Overview”This guide explains how to update or add arc42 architecture documentation and publish it to the CTN Documentation Portal.
The most important thing to understand first: there are two repositories.
| Repository | Where | What it is |
|---|---|---|
| CNCL-BDI (source) | GitHub: Basic-Data-Infrastructure/CNCL-BDI | The single source of truth for all arc42 docs. You edit content here. |
| CTN-Documentation (publishing site) | Azure DevOps: DeNoronhaConsulting/CTN Documentation | The Astro + Starlight website that publishes the docs. It does not author content. |
⚠️ Do not edit
docs/arc42/inside the CTN-Documentation repo. That folder is generated by the sync step and will be wiped and overwritten the next time anyone runsnpm run sync-arc42. Any edit you make there directly will be lost. Edit the docs in CNCL-BDI instead.
How content reaches the live site:
graph LR
A[Edit docs in CNCL-BDI/docs/arc42] --> B[Push to GitHub]
B --> C[npm run sync-arc42 in CTN-Documentation]
C --> D[npm run build -> dist/]
D --> E[Commit docs/arc42 + push to Azure DevOps]
E --> F[Azure Pipeline builds & deploys]
F --> G[Live site]
Note: This how-to guide itself (and everything under
docs/how-to/) is authored directly in the CTN-Documentation repo — onlydocs/arc42/is synced from CNCL-BDI.
Prerequisites
Section titled “Prerequisites”- ✅ Git access to both repos: CNCL-BDI (GitHub) and CTN-Documentation (Azure DevOps)
- ✅ The two repos checked out as siblings in the same parent folder:
(The sync script looks for<parent>/├── CNCL-BDI/ # source content└── CTN-Documentation/ # publishing site
../CNCL-BDI/docs/arc42by default; override with theARC42_SOURCEenv var.) - ✅ Node.js ≥ 22.12.0 — required by Astro 6. Node 20 will fail with “not supported by Astro!”. Use
nvm use 22or a Node ≥ 22 install. - ✅ A text/markdown editor (VS Code, etc.)
Document Status Workflow
Section titled “Document Status Workflow”All arc42 documents use status metadata in frontmatter to track their lifecycle:
| Status | Description | When to use |
|---|---|---|
| Draft | Initial work | Being written, not ready for review |
| Review | Ready for feedback | Complete enough for team review |
| Approved | Finalized | Reviewed and approved |
| Published | Active version | Live and in use |
| Archived | Old version | Superseded or no longer relevant |
---status: PublishedlastUpdate: 2026-05-31---Quick Reference
Section titled “Quick Reference”TL;DR — edit in the source repo, sync, build, publish:
# 1. Edit content in the SOURCE repo (CNCL-BDI)cd ../CNCL-BDIcode docs/arc42/05-building-blocks/ctn-connector.mdgit add docs/arc42 && git commit -m "docs: update connector" && git push # to GitHub
# 2. Sync + build + publish from the PUBLISHING repo (CTN-Documentation)cd ../CTN-Documentationnvm use 22 # ensure Node >= 22.12.0npm run sync-arc42 # copy CNCL-BDI/docs/arc42 -> docs/arc42 (wipe + replace)npm run build # prepare-content + astro build -> dist/ (also validates links)git add docs/arc42 && git commit -m "docs: sync arc42 from CNCL-BDI" && git push # to Azure DevOps
# 3. Done — the Azure pipeline builds and deploys automaticallyStep-by-Step Process
Section titled “Step-by-Step Process”Step 1: Edit the content in CNCL-BDI (source of truth)
Section titled “Step 1: Edit the content in CNCL-BDI (source of truth)”All arc42 documents live in the CNCL-BDI repo under docs/arc42/:
CNCL-BDI/docs/arc42/├── ctn-arc42-index.md├── 00-guidelines/ctn-documentation-guidelines.md├── 01-introduction/│ ├── ctn-initiative-overview.md│ ├── bdi-framework-principles.md│ └── ctn-terminology-clarification.md├── 02-constraints/02-constraints.md├── 03-context/ctn-context.md├── 04-solution-strategy/ctn-solution-strategy.md├── 05-building-blocks/│ ├── ctn-building-blocks.md│ ├── ctn-connector.md│ ├── ctn-association-register.md│ └── ...├── 06-runtime/ ... 07-deployment/ ... 08-crosscutting/ ...├── 09-decisions/ # ADRs (00001-…), ADR-TEMPLATE.md, README.md├── 10-quality/ ... 11-risks/ ... 12-glossary/ ... 13-roadmap/File naming: descriptive-title.md, lowercase-with-hyphens, no date prefixes. Place each file in the correct numbered chapter directory — the website sidebar is autogenerated from these directories.
Editing an existing document:
- Open the file in CNCL-BDI, e.g.
docs/arc42/05-building-blocks/ctn-connector.md. - Make your changes in Markdown.
- Update the frontmatter
statusandlastUpdateas appropriate. - Save.
Creating a new document:
---status: DraftlastUpdate: 2026-05-31---
# New Component Architecture
## Overview
Your content here...Drop it in the relevant chapter directory — it appears in the sidebar automatically after the next build.
Step 2: Commit & push the source repo (GitHub)
Section titled “Step 2: Commit & push the source repo (GitHub)”cd ../CNCL-BDIgit add docs/arc42git commit -m "docs: add connector retry semantics"git push # pushes to GitHub (Basic-Data-Infrastructure/CNCL-BDI)This makes your edit the canonical version. (It is also what feeds GitHub Discussions–based comments on the site, via giscus.)
Step 3: Sync into the publishing repo
Section titled “Step 3: Sync into the publishing repo”From the CTN-Documentation repo, copy the latest arc42 content in:
cd ../CTN-Documentationnvm use 22 # Astro requires Node >= 22.12.0npm install # first time only / after dependency changesnpm run sync-arc42sync-arc42 runs scripts/sync-arc42.cjs, which:
- copies
../CNCL-BDI/docs/arc42→docs/arc42, wiping the destination first so deleted/renamed upstream files don’t leave stale copies; - can be pointed elsewhere via the
ARC42_SOURCEenv var; - auto-skips when the source isn’t present (e.g. in CI) and uses the already-committed
docs/arc42.
You should see ✅ Synced N markdown file(s) into docs/arc42.
Step 4: Build and preview locally
Section titled “Step 4: Build and preview locally”# One-off production build (also validates all internal links)npm run build
# …or run a live dev server with hot reloadnpm run dev # then open the printed http://localhost:4321 URL
# …or preview the built outputnpm run previewnpm run build runs prepare-content (stages docs/arc42 + docs/how-to into src/content/docs/, builds the splash homepage and “recently updated” cards) and then astro build, producing static HTML in dist/. A healthy build ends with something like:
[build] N page(s) built in …· All internal links are valid. ·[build] Complete!If the link validator reports broken links, fix them in CNCL-BDI, then re-run sync-arc42 and build.
Step 5: Commit the synced docs & push (publish)
Section titled “Step 5: Commit the synced docs & push (publish)”The Azure pipeline only checks out the CTN-Documentation repo, so the synced docs/arc42 content must be committed here for the live site to update.
git add docs/arc42git commit -m "docs: sync arc42 from CNCL-BDI"git push # pushes to Azure DevOps (DeNoronhaConsulting/CTN Documentation)Step 6: Automatic deployment
Section titled “Step 6: Automatic deployment”After the push to main, the Azure DevOps pipeline (azure-pipelines.yml) automatically:
- ✅ Installs Node
22.xand dependencies - ✅ Runs
npm run build(in CI the sync is skipped — it builds from the committeddocs/arc42) - ✅ Copies
staticwebapp.config.jsonintodist/ - ✅ Deploys
dist/to the Azure Static Web App
Verify deployment (~4–5 minutes):
- Check the build at the pipeline (link below).
- Visit the portal: https://docs.preview.inlandbase.com
- Confirm your page appears in the sidebar and at its URL. Starlight URLs are lowercase, directory-style, with no
.html, e.g.https://docs.preview.inlandbase.com/arc42/05-building-blocks/ctn-connector/
Markdown Best Practices
Section titled “Markdown Best Practices”Headings
Section titled “Headings”# H1 — Page title (use once per document)## H2 — Major section### H3 — SubsectionPrefer relative links between docs; the build validates internal links.
[Link text](https://example.com)[Another arc42 page](../05-building-blocks/ctn-connector.md)Code blocks
Section titled “Code blocks”```typescriptinterface User { id: string; name: string; }```Tables
Section titled “Tables”| Feature | Status | Priority ||---------|--------|----------|| Auth | ✅ Done | High |Mermaid diagrams
Section titled “Mermaid diagrams”Mermaid is rendered at build time via the astro-mermaid integration — just use a fenced mermaid block:
```mermaidgraph LR A[Client] --> B[API Gateway] --> C[Service] --> D[Database]```Troubleshooting
Section titled “Troubleshooting”Build fails with “Node.js … is not supported by Astro!”
Section titled “Build fails with “Node.js … is not supported by Astro!””Astro 6 requires Node ≥ 22.12.0. Run node --version; if it’s older, nvm use 22 (or install Node 22+).
sync-arc42 reports “arc42 source not found”
Section titled “sync-arc42 reports “arc42 source not found””The CNCL-BDI repo isn’t a sibling of CTN-Documentation, or is checked out elsewhere. Either place it at ../CNCL-BDI, or set the source explicitly:
ARC42_SOURCE=/absolute/path/to/CNCL-BDI/docs/arc42 npm run sync-arc42My edit to docs/arc42 in CTN-Documentation disappeared
Section titled “My edit to docs/arc42 in CTN-Documentation disappeared”Expected — that folder is overwritten by sync-arc42. Make the edit in CNCL-BDI and re-sync.
Document doesn’t appear in the sidebar
Section titled “Document doesn’t appear in the sidebar”- Confirm the file is in the correct numbered chapter directory under CNCL-BDI’s
docs/arc42/(the sidebar autogenerates per directory). - Confirm you ran
npm run sync-arc42and thennpm run build. - Check the build output for errors.
Build reports broken internal links
Section titled “Build reports broken internal links”The starlight-links-validator plugin fails the build on broken internal links. Fix the link in CNCL-BDI, re-sync, rebuild.
Build fails in Azure DevOps
Section titled “Build fails in Azure DevOps”- Check the pipeline logs (link below).
- Reproduce locally with
npm run build. - Look for Markdown/link errors or missing dependencies.
Quick Tips
Section titled “Quick Tips”- Edit arc42 content in CNCL-BDI, never in CTN-Documentation’s
docs/arc42 - Keep the two repos as siblings
- Use Node ≥ 22.12.0
- Run
sync-arc42→buildand check links before committing - Use
lowercase-with-hyphens.mdfilenames in the right chapter directory - Keep
statusandlastUpdatefrontmatter current
DON’T ❌
Section titled “DON’T ❌”- Don’t edit the synced
docs/arc42in the publishing repo - Don’t use date prefixes in filenames
- Don’t push to Azure DevOps without first syncing the latest source
- Don’t expect content changes to publish from a CNCL-BDI push alone — you must sync + commit + push in CTN-Documentation
Related Documentation
Section titled “Related Documentation”- arc42 Template — the architecture documentation standard
- Markdown Guide — Markdown syntax reference
- Mermaid Documentation — diagram syntax
- Starlight — the docs framework this site is built on
- Azure DevOps build pipeline — https://dev.azure.com/DeNoronhaConsulting/CTN%20Documentation/_build
Summary
Section titled “Summary”- ✏️ Edit arc42 docs in CNCL-BDI (
docs/arc42/) and push to GitHub - 🔄 Sync into CTN-Documentation:
npm run sync-arc42 - 🧪 Build & preview:
npm run build(ornpm run dev) — fix any broken links - 💾 Commit & push the synced
docs/arc42to Azure DevOps - ⏱️ Wait ~4–5 min for the pipeline to build and deploy
- ✅ Verify on https://docs.preview.inlandbase.com
In samenwerking met




