MindAttic.Docs/architecture
Appearance
Architecture
How the hub is put together: two scripts, one workflow, and the wiki that reads the result.
The pieces
| Piece | Where | Job |
|---|---|---|
tools/docs-signatures.ps1
|
this repo | One GitHub GraphQL query (one request per 50 repos) that returns every wip-tagged repo's name, visibility and signature: <README.md blob id>:<docs tree id>. It is the roster and the change detector in one.
|
tools/build-hub.ps1
|
this repo | Stages every public wip repo into a folder of this repo, writes the homepage, the top nav and docfx.json.
|
build-docs-site.ps1
|
MindAttic.Agency shared/docs-site/
|
The one staging engine every repo's docs site uses. The hub calls it as a library per repo, so link rewriting, image copying and per-repo toc.yml are defined once.
|
tools/hub-template/public/hub.css
|
this repo | The hub's own styles (hero, stat strip, card grid), appended to Agency's shared main.css on every build.
|
tools/sources.json
|
this repo, generated | The signature each repo was last staged from. |
tools/PORTFOLIO.snapshot.md
|
this repo, generated | A copy of the private workspace's docs/PORTFOLIO.md; its category tables group the homepage cards and the nav.
|
.github/workflows/docs.yml
|
this repo | Runs build-hub.ps1 in GitHub Actions, commits the result, then builds the DocFX site through Agency's shared docs-pages.yml.
|
engine/sync-docs-wiki.ps1, engine/md2wiki.py
|
MindAttic.Docs.Wiki | Turns this repo's main into wiki pages at https://mindattic.com/wiki/docs/.
|
One build, step by step
- Roster.
docs-signatures.ps1lists everywiprepo. Private repos are counted and named as excluded; nothing of theirs is read. - What to restage. A full build restages every repo. An incremental build restages only repos whose signature differs from
tools/sources.json, or whose folder is missing; the rest keep their committed folders. - Source. Each repo is read from a sibling checkout in the workspace when one exists, else from a shallow, sparse clone of its
README.mdanddocs/. A source repo is only read, never changed. The hub itself is a section too, read from its own checkout. - Front page. A repo whose
README.mdis the standard pointer (<!-- mindattic:readme-pointer) gets itsdocs/overview.mdas its front page; any other README is the front page. The hub always uses its owndocs/overview.md, because its README is generated. - Staging.
build-docs-site.ps1stages the repo into a scratch folder; the hub copies the result into<repo>/, and every.md/.ymlfile passes the secret scan on the way in. - Secret scan. Provider-shaped tokens, private key blocks, credential assignments and connection-string passwords are replaced with a visible
<REDACTED...>marker. Placeholders (<your key>,example) are left alone. Every finding is printed. - Stale sections. A folder that is no longer a published repo is removed.
.git,.github,tools,docs,.agent,.mindattic-toolkitand_siteare reserved and never touched. - Homepage, nav, README.
index.md(hero, stat strip, one card per repo in its portfolio group),toc.ymlandREADME.mdare written from the roster and the portfolio snapshot. - Site config.
docfx.json, the logo and favicon, and the mergedmain.cssare written for the DocFX build.
The wiki
The wiki is the published product. MindAttic.Docs.Wiki's sync job reads this repo's origin/main every few minutes: every top-level folder with an index.md is one repo; <repo>/index.md becomes the page <repo>, and <repo>/docs/<path>.md becomes <repo>/<path>. The hub's index.md becomes the wiki's Main Page. The finished wikitext is secret-scanned a second time before it is pushed.
Boundaries
- The hub never writes into another repo, and never holds hand-written content for one (
SPEC.md2.2). - A private repo is never staged, and the build never needs a credential to read one.
- The DocFX site and the wiki are two renderings of the same committed tree.
Part of MindAttic.Docs.
From MindAttic.Docs/docs/architecture.md via MindAttic.Docs; synced automatically, so edit the repo, not this page.