carlos / platform Public

docs site: plan index and Plan 1 (mockup and foundations)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 0670feef5d04fe5200c697e49fd4e05fe1a82373 parent 766044c
2 files changed, +344 −0
  • docs/superpowers/plans/2026-11-06-docs-site-1-mockup-and-foundations.md +317 −0
  • docs/superpowers/plans/2026-11-06-docs-site-index.md +27 −0

CI passed — run details

Intent

Attributed to this commit: 28.1 g CO₂e (3,100,472 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on design-docs-site, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.

diff --git a/docs/superpowers/plans/2026-11-06-docs-site-1-mockup-and-foundations.md b/docs/superpowers/plans/2026-11-06-docs-site-1-mockup-and-foundations.md
new file mode 100644
index 000000000..9d5be98fb
--- /dev/null
+++ b/docs/superpowers/plans/2026-11-06-docs-site-1-mockup-and-foundations.md
@@ -0,0 +1,317 @@
+# Docs site Plan 1: mockup and foundations
+
+> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
+
+**Goal:** Give Paul a clickable mockup of the new docs site to react to, and
+land the two foundations nothing else can wait for: the website's new
+JavaScript rule and a release step that keeps the live docs current.
+
+**Architecture:** The mockup is throwaway static HTML in the website repo,
+outside `src/` so Eleventy never ships it, styled with the site's own
+stylesheets. Its step-through works as a plain list of numbered figures and
+is enhanced by one small script. The rule change edits the website's design
+documents. The release step edits the platform README's release recipe.
+
+**Tech Stack:** HTML, CSS and inline SVG; one vanilla JavaScript file, no
+dependencies; Node for the mockup's check script; headless Chrome for
+screenshots.
+
+**Spec:** `docs/superpowers/specs/2026-11-06-docs-site-design.md`. Index:
+`docs/superpowers/plans/2026-11-06-docs-site-index.md`.
+
+## Global Constraints
+
+- JavaScript rule (D4, verbatim intent): use JavaScript when it meaningfully
+ improves the experience, and only as progressive enhancement on a page that
+ already works and loads without it. No fetched fonts, no analytics: those
+ parts of the old rule stand.
+- Neutral examples only: `shop`, `example.com`, `shop.example.com`. Never a
+ tenant or customer name.
+- Voice: plain, short sentences, no em dashes. The mockup's words are drafts
+ for layout and are labelled as drafts on every page; they are not copy and
+ do not ship.
+- Shared machine: bind any server to the Tailscale IP `100.119.180.57`
+ (docs-t1), never `0.0.0.0`. Stop it when Paul's review is recorded. Scratch
+ goes under `$TMPDIR` or `~/.cache`, never `/tmp`.
+- Links handed to Paul are Markdown links with the full URL as text and
+ target.
+- Website repo: `/home/paulca/amadan.net/carlos/website` (GitHub,
+ `carlosframework/website`). Platform repo: this worktree. Commit subjects
+ under 80 characters.
+
+## Review Focus
+
+1. **JavaScript off.** Every step-through frame, caption and nav link is
+ visible and in order with scripting disabled. Pinned in Task 1 Step 4.
+2. **Reduced motion.** With `prefers-reduced-motion: reduce`, the enhanced
+ step-through changes frames with no animation and never auto-plays.
+ Pinned in Task 1 Step 4.
+3. **Keyboard only.** Back and Next are buttons reachable by Tab, Left and
+ Right arrows move between frames when the viewer has focus, and the
+ current frame is announced (`aria-live="polite"` on the caption). Pinned
+ in Task 1 Step 4.
+4. **A phone at 390px.** No horizontal scroll on any mockup page; the nav
+ collapses; code blocks scroll inside themselves. Pinned in Task 1 Step 5.
+5. **Print.** Printing How it works prints every frame with its caption, not
+ only the current one. Pinned in Task 1 Step 4.
+
+---
+
+### Task 1: The clickable mockup
+
+**Files** (website repo, branch `docs-site-mockup`, worktree
+`.claude/worktrees/docs-site-mockup`):
+- Create: `mockups/docs-site/index.html` (the docs home)
+- Create: `mockups/docs-site/how-it-works.html`
+- Create: `mockups/docs-site/quickstart.html` (the T1 tutorial page)
+- Create: `mockups/docs-site/mockup.css` (mockup-only layout on top of the
+ site's stylesheets)
+- Create: `mockups/docs-site/stepper.js` (the progressive enhancement)
+- Create: `mockups/docs-site/check.mjs` (structure checks)
+- Create: `mockups/docs-site/serve.sh` (start and stop the review server)
+- Create (platform repo, this branch):
+ `docs/superpowers/notes/2026-11-06-docs-mockup-review.md`
+
+**Interfaces:**
+- Consumes: the site's `src/site.css`, `src/inner.css`, `src/docs.css`,
+ `src/header.css`, `src/footer.css`, linked by relative path
+ (`../../src/...`), never copied.
+- Produces, for Plan 2 to adopt or reject:
+ - The step-through markup contract:
+ `<section class="stepper" aria-label="...">` holding an `<ol>` of
+ `<li><figure><svg>...</svg><figcaption>...</figcaption></figure></li>`,
+ one per frame. With no script, this is the whole experience.
+ - `stepper.js`, which on `DOMContentLoaded` finds every `.stepper`, adds
+ `class="stepper is-enhanced"`, shows one frame at a time, and inserts
+ Back and Next buttons, a "Step n of N" label and a caption region with
+ `aria-live="polite"`.
+ - The nav shape: the six top-level sections of spec §5 in order (Start
+ here, Tutorials, Guides, Operating a deployment, CLI reference, API
+ reference), plus Changelog.
+
+- [ ] **Step 1: Write `check.mjs` with the structure checks, before the pages**
+
+`node mockups/docs-site/check.mjs` reads the three HTML files and exits
+non-zero naming each failure. It checks:
+ - every page links `../../src/site.css` and `mockup.css`, and has a
+ visible element with `class="draft-banner"` whose text contains
+ `Mockup`;
+ - every page has a nav with exactly these links, in this order: Start here,
+ Tutorials, Guides, Operating a deployment, CLI reference, API reference,
+ Changelog;
+ - `how-it-works.html` has one static `figure#system-map` that is not
+ inside a `.stepper`, and exactly one `.stepper` with exactly 5 `<li>`
+ frames, each holding one `<svg>` and one non-empty `<figcaption>`;
+ - no element in any page's source carries `hidden`, `display:none` or
+ `aria-hidden="true"` on a frame: hiding is only ever done by
+ `stepper.js`;
+ - `quickstart.html` opens with a section `id="before-you-start"` holding
+ two links, one to `#install-your-own` and one to
+ `#use-a-running-deployment` (spec D9), and has at least 4 numbered steps
+ (`<ol class="steps">`), a time estimate (`class="time"`), and at least one
+ `<pre><code>` block;
+ - every hostname on every page (in text, links and code) is
+ `example.com` or ends in `.example.com`, or is one of `carloku.com`,
+ `carlosframework.com`; any other hostname is a failure (it keeps tenant
+ and customer names out).
+
+- [ ] **Step 2: Run it and see it fail**
+
+Run: `node mockups/docs-site/check.mjs`
+Expected: FAIL, naming the three missing pages.
+
+- [ ] **Step 3: Build the three pages, the stylesheet and `stepper.js`**
+
+Content, as drafts:
+ - **Docs home (`index.html`):** a "Start here" path of four cards (Why
+ CARLOS, How it works, Security and why, What it does for you); the nine
+ launch tutorials as cards, each with a one-line outcome and a time
+ estimate (T1 to T8 and T3b, titles from spec §6); feature areas as a
+ compact grid from spec §8 (at least 12 areas); CLI and API reference
+ entries, the API one marked "coming: the public API is being designed".
+ A search box that, without JavaScript, is a link to a plain page index.
+ - **How it works (`how-it-works.html`):** the static system map
+ (`figure#system-map`): console, a fleet of boxes each running the edge
+ and instances, the deployment bucket holding releases and database
+ replicas, a second region greyed in; then the step-through "A request
+ wakes a sleeping instance" in 5 frames: the request reaches a box's
+ edge; the edge finds the instance asleep and holds the request; the box
+ starts the instance; the instance answers its health check; the edge
+ sends the held request on and the response comes back. Each frame is the
+ same SVG layout with the active part highlighted in the site's accent and
+ a one-sentence caption. Below it, the headings the real page will have,
+ with one line each saying what goes there.
+ - **Quickstart (`quickstart.html`):** "Before you start" with the D9
+ choice (install your own, or use a running deployment, such as your
+ team's or a hosted one like carloku.com); then numbered steps with code
+ blocks for a small Go app: install the CLI, sign in, ship, open it, watch
+ it sleep, wake it. A time estimate at the top. A "what you learned" box at
+ the end linking to How it works.
+
+`stepper.js` behaviour: Back is disabled on frame 1 and Next on the last;
+Left and Right arrows work while focus is inside the viewer; the caption
+region is `aria-live="polite"`; under `prefers-reduced-motion: reduce` frame
+changes are instant (no CSS transition) and nothing auto-plays; with motion
+allowed, a frame change cross-fades in at most 200 ms and nothing auto-plays
+either. `mockup.css` carries `@media print` rules that show every frame
+regardless of enhancement.
+
+Draw in the site's existing style (`DESIGN.md`: hairline rules, one accent
+per page, no coloured left borders on cards). Use the site's system font
+stacks only.
+
+- [ ] **Step 4: Check the behaviour in a browser, script on and off**
+
+Run: `node mockups/docs-site/check.mjs`
+Expected: PASS.
+
+Then, with headless Chrome against `file://` paths:
+ - scripting off (`--blink-settings=scriptEnabled=false`): screenshot
+ `how-it-works.html` at 1280 wide, full page; all 5 frames and captions
+ are visible in order.
+ - scripting on: one frame visible, "Step 1 of 5", Back disabled.
+ - scripting on with `--force-prefers-reduced-motion`: same, and the
+ computed `transition-duration` on the frame container is `0s`.
+ - print to PDF (`--print-to-pdf`) with scripting on: the PDF text holds
+ all 5 captions.
+ - keyboard: with a small DevTools-protocol script or by hand in a real
+ browser, Tab reaches Back and Next and the Right arrow advances. Write
+ down which way it was checked.
+
+Keep screenshots under `$TMPDIR/docs-mockup/` and delete them at the end of
+the task.
+
+- [ ] **Step 5: Check a phone width**
+
+Screenshot all three pages at 390 wide, full page, scripting on. Expected:
+no horizontal scrollbar (`document.documentElement.scrollWidth <= 390`),
+the nav collapsed, and code blocks scrolling inside themselves.
+
+- [ ] **Step 6: Commit and push the mockup branch**
+
+```bash
+git add mockups/docs-site
+git commit -m "Docs site mockup: home, How it works, quickstart (not shipped)"
+git push origin docs-site-mockup
+```
+
+No PR: the branch is for review and is deleted after Plan 2 adopts what Paul
+keeps.
+
+- [ ] **Step 7: Serve it for Paul**
+
+`mockups/docs-site/serve.sh start` runs
+`python3 -m http.server <port> --bind 100.119.180.57` from the website
+worktree root (so `../../src/` resolves), on a free port, in the background,
+and writes the PID to `$TMPDIR/docs-mockup/server.pid`; `serve.sh stop`
+kills it and removes the file. Hand Paul
+`http://docs-t1.tail5fd3ba.ts.net:<port>/mockups/docs-site/` as a Markdown
+link, and say the words on it are drafts.
+
+- [ ] **Step 8: Record Paul's review, then stop the server**
+
+Write Paul's reactions, verbatim where he gave words, to
+`docs/superpowers/notes/2026-11-06-docs-mockup-review.md` in the platform
+repo, under three headings: Keep, Change, Drop. Run `serve.sh stop`.
+Commit the note on this branch:
+
+```bash
+git add docs/superpowers/notes/2026-11-06-docs-mockup-review.md
+git commit -m "docs site: record Paul's mockup review"
+```
+
+Plan 2 is written from this note. Do not start Plan 2 before it exists.
+
+---
+
+### Task 2: The website's JavaScript rule
+
+**Files** (website repo, branch `js-progressive-enhancement`):
+- Modify: `PRODUCT.md:63-64` (the "Static pages ... no JavaScript ...
+ Binding." bullet)
+- Modify: `DESIGN.md:143-144` (the "one hand-written stylesheet, no build
+ step, no JavaScript, no fetched fonts" sentence)
+- Modify: `DESIGN.md:277-279` ("The Zero Fetch Rule")
+- Modify: `DESIGN.md:464-465` (the "Don't fetch a font or add JavaScript"
+ bullet)
+- Modify: `README.md:10-15` (the paragraph saying the hand-written pages ship
+ with no JavaScript and `/docs` is the one exception)
+
+**Interfaces:**
+- Produces: the rule every later plan's JavaScript is reviewed against.
+
+- [ ] **Step 1: Find every statement of the old rule**
+
+Run: `grep -rn -iE 'no javascript|add javascript|zero fetch' PRODUCT.md DESIGN.md README.md AGENTS.md`
+Expected: the lines listed above, and any others; every hit is edited in
+Step 2 or noted in the commit body as deliberately kept.
+
+- [ ] **Step 2: Rewrite them to the new rule**
+
+The rule, in these words in `PRODUCT.md` (binding) and `DESIGN.md` (The
+Zero Fetch Rule becomes "The Zero Fetch Rule and progressive enhancement"):
+
+> No fetched fonts and no analytics. JavaScript is allowed when it
+> meaningfully improves the experience, and only as progressive enhancement:
+> every page works, reads and loads without it, and the script only adds to
+> a page that is already complete. Scripts are local files, small, with no
+> dependencies, and never needed to read a page.
+
+The `DESIGN.md` Don't bullet becomes: "**Don't** fetch a font, add analytics,
+or make a page depend on JavaScript to be read." `README.md` says the same in
+one sentence. These are agent-facing design documents, not user-facing copy,
+so they do not go through copy review.
+
+- [ ] **Step 3: Check nothing else still states the old rule**
+
+Run: `grep -rn -iE 'no javascript' PRODUCT.md DESIGN.md README.md AGENTS.md`
+Expected: no hits, or only hits explained in the commit body.
+
+- [ ] **Step 4: Commit, open the PR, merge**
+
+```bash
+git commit -am "Allow JavaScript as progressive enhancement (docs site design D4)"
+git push origin js-progressive-enhancement
+gh pr create --base main --title "Allow JavaScript as progressive enhancement" --body "<summary; cites the platform spec D4>"
+```
+
+Paul approved the rule itself on 2026-11-06 (spec D4); merging the PR with
+`gh pr merge --squash` is within that approval. Nothing ships, so no deploy.
+
+---
+
+### Task 3: The docs sync as its own release step
+
+**Files** (platform repo, this branch):
+- Modify: `README.md:258` (release step 10, Changelog)
+
+**Interfaces:**
+- Consumes: the website's `hack/sync-docs.mjs <checkout>` and its `--check`
+ mode; the deploy recipe in the website's `AGENTS.md` "Deploying" section.
+
+- [ ] **Step 1: Split step 10**
+
+Step 10 today bundles the changelog, the docs sync and the website ship,
+and has been put off release after release, which left the live site with 4
+of 10 pages until 2026-11-06. Rewrite it as two steps:
+ - **10. Docs.** Every release, whatever else is owed: in
+ `carlosframework/website`, run `node hack/sync-docs.mjs <checkout>` with
+ the platform checkout at the release tag, `npm run check`, open and merge
+ the PR, and ship the site as its `AGENTS.md` describes. Check that
+ carlosframework.com/docs/ lists every page in `docs/site/nav.json`.
+ - **10b. Changelog.** The current step 10 text, minus the sync and ship
+ sentences, ending "Ship it with step 10's sync when both are ready."
+Keep the numbering of steps 11 and 12 unchanged so other notes that cite
+them stay right.
+
+- [ ] **Step 2: Check the README still reads in order**
+
+Run: `grep -nE '^(9|10|10b|11|12)\. ' README.md`
+Expected: 9, 10, 10b, 11, 12 in that order, each once.
+
+- [ ] **Step 3: Commit**
+
+```bash
+git add README.md
+git commit -m "release recipe: the docs sync is its own step, every release"
+```
diff --git a/docs/superpowers/plans/2026-11-06-docs-site-index.md b/docs/superpowers/plans/2026-11-06-docs-site-index.md
new file mode 100644
index 000000000..6e36c2bb3
--- /dev/null
+++ b/docs/superpowers/plans/2026-11-06-docs-site-index.md
@@ -0,0 +1,27 @@
+# CARLOS Platform docs site: plan index
+
+**Spec:** `docs/superpowers/specs/2026-11-06-docs-site-design.md` (approved by
+Paul 2026-11-06).
+
+The spec is several projects in one: site foundations, the Start here
+content, the tutorials (each with its own example app), the guides, and the
+CLI reference. Each plan below produces something shippable on its own.
+
+Only Plan 1 is written in full. Paul reviews a clickable mockup at the end of
+its Task 1, and that review decides the layouts the later plans build. Each
+later plan is written when the one before it lands, from the spec plus the
+mockup review notes (`docs/superpowers/notes/2026-11-06-docs-mockup-review.md`,
+written in Plan 1 Task 1).
+
+| Plan | Scope | Spec sections | Depends on |
+|---|---|---|---|
+| 1. Mockup and foundations | the clickable mockup; the website's JavaScript rule (D4); the docs sync as its own release step | §4, D4, §11 steps 2 and 7 (rule) | nothing |
+| 2. Structure and components | the new nav and section structure in `docs/site/nav.json` and the website templates; today's pages moved into it with redirects; the diagram and step-through components; search | §5, §4 (diagrams), §9 (links) | Plan 1 mockup review |
+| 3. CLI reference | one page per command group; usage and flags generated from the CLI's own FlagSets; the flags gate; anchors and redirects for every heading the changelog links | §7 (CLI), §9 | Plan 2 |
+| 4. Start here | Why CARLOS, How it works (system map + four step-throughs), Security and why, the feature tour; full copy review with Paul (D8) | §5.1, D2, D3, D8 | Plan 2 |
+| 5. Launch tutorials, first wave | T1 quickstart (with the D9 fork), T7 install (from the website's self-host page), T8 when things go wrong; their example apps and drift tests | §6 | Plans 2 and 4 |
+| 6. Launch tutorials, second wave | T2 per-customer SaaS, T4 static site, T5 one-off prospect site, T6 project manager dashboard; revise T3 Rails | §6 | Plan 5 |
+| 7. Guides | one guide or reference entry for every feature area in §8 not covered by Plans 3 to 6; the page-to-place audit of §5 closed | §5.3, §8 | Plan 3 |
+
+The API reference fills in from the public v1 API project, which has its own
+design (D5).