MindAttic.Deploy/SPEC
MindAttic.Deploy — Product specification
The complete product, written down before it is built (owner, 2026-11-30, MAT-T360). Every epic, feature and story the finished product will have is listed here, built or not. The ticket tree mirrors this file one to one: every ID below is a ticket. Nothing gets built unless it is here, and anything taken out of here is closed wont-do in the tree.
docs/RELEASE.mdsays which part of this the current milestone delivers.
1. Product definition
In docs/ECOSYSTEM.md MindAttic.Deploy owns the shipping concern for sites and hosted apps (beside each repo's run.ps1, which installs apps to R:).
MindAttic.Deploy is the owner's one deploy tool: a single registry (projects.json) and a single engine (src/deploy.js, with src/linked.js for the linked group) behind two front doors (npm run deploy and the C# MindAttic.Deploy.exe). It FTPS-uploads the MindAttic root sites, releases the MindAttic.Components linked group (pin, tag, push, CDN gate, then FTP), and fires app deploys by pushing a branch to the app's own CI workflow. The finished product deploys every MindAttic site and every hosted app from one command, with credentials from the Vault in both front doors and its engine covered by tests.
2. Scope boundary
2.1 In the product
- The registry:
sites[],apps[],linkedGroups, edited in one file. - Root-site FTPS upload with stamps and preDeploy hooks.
- The linked-group release with its gates.
- App deploys by push-to-CI, with disabled targets that print their note.
- Vault-resolved FTP credentials, the C# CLI and its interactive menu, installed on R: by the run menu.
2.2 Never in the product
- Per-project deploy files (
scripts/cli/,deploy.ps1,deploy.settings.jsonin other repos): one registry only (BIBLE §3). - A project-page or README renderer: each repo's brochure and wiki page are built elsewhere (HOUSE-LAW-14).
- Deleting files on the FTP host: stale remote files are removed by hand.
- Editing component sources inside MindAttic.Components.
- Deploy logic in the C# CLI: it only shells into the engine (M.DPLY-LAW-1).
- C# unit tests for DeployRunner and MainMenuCommand batching (M.DPLY-T4..T6, T31..T34): the CLI is a thin shell; the engine carries the tests.
- Generic cleanup, bughunt and run-the-suite sweeps (M.DPLY-T10, T11, T36).
3. Users and roles
- The owner deploys sites and apps from the CLI or
npm run deploy. - Agents run
/deploy, which routes to this tool for sites and apps. - App repos own their deploy workflow; this tool only pushes the branch that fires it.
4. Requirements
E1. Registry-driven deploy — M.DPLY-T52 — built
F1.1 One registry, two front doors — M.DPLY-T53 — built
- S1.1.1 Registry edits every target — M.DPLY-T54 — built As the owner, I want every deploy target in one file, so that adding or disabling one is a single edit. Acceptance: Given a new site, when it is added to
projects.json, then both front doors list and deploy it. Evidence:projects.json, BIBLE M.DPLY-LAW-2. - S1.1.2 CLI shells into the engine — M.DPLY-T55 — built As the owner, I want
MindAttic.Deploy.exeand its menu to run the same engine as npm, so that both behave the same. Acceptance: Given any CLI command, when it runs, then it shells intonode src/deploy.js. Evidence:MindAttic.Deploy.Cli/Services/DeployRunner.cs. - S1.1.3 Unknown input fails loud — M.DPLY-T56 — built As the owner, I want a mistyped run refused, so that nothing deploys by guesswork. Acceptance: Given no mode flag or an unknown flag, when the engine starts, then it prints usage and exits 2. Evidence:
test/linked.test.jscli tests. - S1.1.4 FTP credentials from the Vault — M.DPLY-T57 — built As the owner, I want the CLI to read the FTP credential from the Vault, so that no secret sits in the repo. Acceptance: Given a Vault FTP entry, when the CLI deploys, then node receives it as
MINDATTIC_FTP_JSON. Evidence:DeployRunner.RunNode, BIBLE M.DPLY-LAW-3. - S1.1.5 Installed on R: — M.DPLY-T39 — built As the owner, I want the CLI on the shared run menu, so that Debug and Release live under
R:\MindAttic\Apps. Evidence: c6da244.
E2. Root sites and linked group — M.DPLY-T58 — built
F2.1 Root site upload — M.DPLY-T59 — built
- S2.1.1 Verbatim site upload — M.DPLY-T60 — built As the owner, I want a site uploaded as it is with its Last Updated stamp, so that what I see locally is what ships. Acceptance: Given
--site <slug>, when it runs, then hooks run, the stamp is written and the files upload over FTPS. Evidence:src/deploy.jsrunSiteMode. - S2.1.2 KnowYourMech site — M.DPLY-T37 — built Evidence: b12d6bf.
F2.2 Linked group release — M.DPLY-T61 — built
- S2.2.1 Pin, tag, verify, then upload — M.DPLY-T62 — built As the owner, I want a linked deploy to publish a whole-number tag and prove it on the CDN before any upload, so that the four sites never load a broken asset. Acceptance: Given any gate fails, when the run reaches it, then it aborts before FTP and restores the tree. Evidence:
src/linked.js; 38 tests intest/linked.test.js. - S2.2.2 Dry run changes nothing — M.DPLY-T63 — built Acceptance: Given
--dry-run, when it runs, then the plan and every would-abort gate print and nothing changes.
E3. App deploys through CI — M.DPLY-T64 — built
F3.1 Push fires the app workflow — M.DPLY-T65 — built
- S3.1.1 Push to deploy an app — M.DPLY-T66 — built As the owner, I want
--app <slug>to commit and push the branch, so that the app's own workflow deploys it. Evidence:src/deploy.jsrunAppMode. - S3.1.2 Disabled apps never half-fire — M.DPLY-T67 — built Acceptance: Given a disabled app, when it is named, then its
disabledNoteprints and the run exits 0.
E4. Every target deploys cleanly — M.DPLY-T42 — MS-48
Every enabled deploy target is real and deploys cleanly: dead targets are off, the sites pipeline is proven, each run is traceable in the family log, and the docs describe the tool as it is.
F4.1 Only live targets enabled — M.DPLY-T43 — MS-48
- Disable the archived Cursory target — M.DPLY-T18 — MS-48
- Fix or disable the PersonaGallery target — M.DPLY-T19 — MS-48
- Disable the Azure app targets — M.DPLY-T48 — MS-48 Acceptance: Given
npm run deploy -- --apps --dry-run, when it runs, then no Azure App Service target is deployable.
F4.2 Sites pipeline proven — M.DPLY-T44 — MS-48
- Clean deploy dry runs — M.DPLY-T49 — MS-48 Acceptance:
--sites --dry-runand--apps --dry-runfinish with noFAILline.
F4.3 Every run traceable — M.DPLY-T46 — MS-48
- Log to MindAttic.Log — M.DPLY-T13 — MS-48 (MindAttic.Log owns logging) Acceptance: Given a CLI run, when it starts, fails or throws, then a row lands in its MindAttic.Log database.
F4.4 Polish and release Deploy 1.0 — M.DPLY-T77 — MS-48
- Post-Azure docs — M.DPLY-T12 — MS-48 (requires M.DPLY-T49, M.DPLY-T13) Acceptance:
docs/overview.mdanddocs/BIBLE.mddescribe the tool as it is after the Azure decommission, and the owner deploys the live sites from it.
The former epic E5 "Logged and documented" (M.DPLY-T45) was a bucket; its logging feature moved into E4 and its docs task into E4's polish-and-release feature (MAT-T462).
E6. Apps deploy to the server — M.DPLY-T68 — MS-162
Apps deploy to the MindAttic server again, from a tool that reads every secret from the Vault and whose engine is proven by tests. Starts after MS-48 closes (M.DPLY-T70 requires M.DPLY-T12) and once the server pipeline exists (MAT-T236 in MindAttic.Agency).
F6.1 Apps deploy to the server — M.DPLY-T69 — MS-162
- S6.1.1 Re-enable server app targets — M.DPLY-T70 — MS-162 As the owner, I want every app that has the server deploy workflow enabled again, so that
--appsdeploys them. Acceptance: Given an app repo with the server workflow (MAT-T236), when--apps --dry-runruns, then it is listed as deployable; apps without it stay disabled with a note.
F6.2 Vault in both front doors — M.DPLY-T71 — MS-162
- S6.2.1 Node reads the Vault — M.DPLY-T72 — MS-162 As the owner, I want
npm run deployto read the FTP credential from the Vault, so thatsecrets/ftp.jsongoes away. Acceptance: Given only the Vault entry, whennpm run deploy -- --site <slug>runs, then it connects.
F6.3 Deploy engine proven — M.DPLY-T73 — MS-162
- S6.3.1 Plain modes tested — M.DPLY-T74 — MS-162 As the owner, I want the plain site and app modes covered by
node:testwith no network (RFC 0001 option 1), so that their stories can be marked proven. Acceptance:npm testcovers file expansion, stamp idempotency, substitution and app staging.
F6.4 Polish and release 2.0 — M.DPLY-T75 — MS-162
- S6.4.1 Release Deploy 2.0 — M.DPLY-T76 — MS-162 Acceptance: docs describe 2.0, and the owner deploys one app and one root site from the CLI.
Added by MAT-T477 (owner stories and cross-repo links)
- S M.DPLY-T78 Ships MediaWiki sites (feature M.DPLY-T44 Sites pipeline proven, MS-48): Prose.Wiki.GLMZ's GW-T26 requires it. Given a MediaWiki site registered in Deploy, when a deploy runs, then skin, settings and extensions upload over FTPS and the site answers with the new version.
5. Non-functional requirements
- Windows dev box, Node 24, .NET 10;
TreatWarningsAsErrors=true. - No credential in source or uploaded output; FTPS only.
- A failed gate never leaves a half-released linked group: abort before FTP, restore the tree.
- Whole-number versions and release tags (
V<n>).
6. Interfaces and dependencies
Platform concerns it uses (docs/ECOSYSTEM.md): credentials — MindAttic.Vault (FTP credential, both front doors in E6); logging — MindAttic.Log (F4.3); UI controls — MindAttic.Components (package source and tag owner of the linked group); public web — the MindAttic.Agency server pipeline MAT-T236 (E6 builds on it).
- MindAttic.Web (the four linked sites) is the main consumer.
- App repos (IdeaCms, Prose, Tutor, ThinkTank, TaxRateCollector, Gadfly, IdiotProof) own their workflows.
7. Release sequence
- MS-48 — Deploy matches the post-Azure world (active,
docs/RELEASE.md): E4, E5. - MS-162 — MindAttic.Deploy 2.0: apps on the server: E6, ending with F6.4 polish and release. The finished product.
8. Change log
| Date | Change to scope | Ticket |
|---|---|---|
| 2026-11-30 | Specification written from BIBLE, RELEASE, RFC 0001, the code and the ticket history; Deploy 2.0 added as the last milestone | MAT-T394 |
| 2026-11-30 | MAT-T462 single-source pass: 6 renamed, 1 bucket epic dissolved (M.DPLY-T45, with M.DPLY-T47), 3 requires added (incl. MS-162 after MS-48), 0 platform re-points | MAT-T465 |
| 2026-11-30 | MAT-T477 owner story for Prose.Wiki.GLMZ | MAT-T477 |