carlos / platform Public

docs site: design for the CARLOS Platform documentation site

Two separate doc sets (platform vs Carloku), an IA modelled on
go.tito.io/docs, How it works with static and step-through diagrams,
nine launch tutorials, CLI reference split per command group, API
reference reserved for the public v1 API project, and drift gates.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev d97d9699e467d2955a7e06f84977305b88a38baf parent 3ce8532
1 file changed, +313 −0
  • docs/superpowers/specs/2026-11-06-docs-site-design.md +313 −0

CI cancelled — superseded by a newer push — run details

Intent

Human

<task-notification> <task-id>buwdd5bob</task-id> <tool-use-id>toolu_01UP64SUgEPvut2VLVcKvyFa</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/cf552f82-7877-4301-92f3-ad46609695c9/tasks/buwdd5bob.output</output-file> <status>failed</status> <summary>Background command "Run builder check on Astra outside sandbox" failed with exit code 1</summary> </task-notification>

Human

Should we give them the option before proceeding with the tutorial?

Attributed to this commit: 33.3 g CO₂e (4,066,559 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/specs/2026-11-06-docs-site-design.md b/docs/superpowers/specs/2026-11-06-docs-site-design.md
new file mode 100644
index 000000000..4e88f9f8e
--- /dev/null
+++ b/docs/superpowers/specs/2026-11-06-docs-site-design.md
@@ -0,0 +1,313 @@
+# CARLOS Platform docs site: design
+
+Status: draft for Paul's approval, 2026-11-06.
+Origin: a question from a team member about running rake tasks on rootfs apps
+showed that the Rails guide was out of date and that most of the platform
+cannot be found from the docs. Paul asked for an end-to-end rethink.
+
+## 1. Intent
+
+A best-in-class documentation site for the CARLOS Platform. It covers the
+full breadth of the platform and shows people how to use it, with tutorials
+and working examples, a CLI reference and, later, an API reference. The bar
+Paul set is the breadth and polish of go.tito.io/docs.
+
+**The reader** is someone on a tech team somewhere who is evaluating CARLOS,
+installing it, or getting apps running on it (Paul). They arrive knowing
+nothing about CARLOS.
+
+**What the evaluator needs, in Paul's words:** how easy and lightweight it
+is, how it works (with diagrams), what it is doing, how secure it is and why,
+and then the breadth of features that will make their lives easier.
+
+## 2. Decisions (Paul's, 2026-11-06)
+
+- D1. **Two separate doc sets.** The CARLOS Platform docs describe the
+ platform itself, never a particular deployment of it. carloku.com's docs
+ are about running apps on Carloku and stay completely separate. Carloku is
+ one deployment of the platform, like any other.
+- D2. **"How it works" is the part to make excellent at launch** (Paul took
+ the recommendation). "Lightweight" and "secure, and why" are both shown
+ through the architecture, so they are built on it.
+- D3. **Diagrams are a mix of static and step-through.**
+- D4. **JavaScript rule, changed:** use JavaScript when it meaningfully
+ improves the experience, and only as progressive enhancement on a page
+ that already works and loads without it. This replaces the website's
+ binding "no JavaScript" rule (website `PRODUCT.md` line 64, `DESIGN.md`
+ "The Zero Fetch Rule" and its Don'ts). The no-fetched-fonts and
+ no-analytics parts of that rule are not changed by this decision.
+- D5. **A public, versioned API is the goal**, but it is its own project
+ with its own design. This site reserves the API reference section and its
+ page shape (section 7); it does not design the API.
+- D6. **The CLI reference is one page per command group**, not one long page.
+- D7. **The launch tutorials** are the nine in section 6.
+- D9. **The quickstart starts with a choice.** T1 opens with "Before you
+ start": you need a CARLOS deployment you can sign in to. Either install
+ your own (T7, which ends by sending the reader back to T1) or use one
+ already running: your team's, or a hosted deployment such as carloku.com.
+ After that choice the tutorial is the same for everyone and uses only
+ `carlos` commands that work on any deployment. (Paul agreed to offering
+ the choice; the wording of the two routes is my draft.)
+- D8. **Copy review split:** "How it works" and "Security" go to Paul in full
+ copy review. All other pages get a Luna pass against the house rules, and
+ Paul sees only what Luna flags.
+
+## 3. Goals, non-goals, anti-goals
+
+Goals:
+
+- An evaluator can decide whether CARLOS suits them from the site alone,
+ without installing anything.
+- A developer gets a first app running from a tutorial without needing
+ anything outside the site.
+- An operator can install, grow, upgrade and recover a deployment from the
+ site.
+- Every feature a customer can use is findable from the nav or search, and
+ has at least a guide or a reference entry.
+- The docs cannot quietly drift from the code: CI fails when they do
+ (section 9).
+
+Non-goals:
+
+- Carloku's own docs (sign-up, Carloku plans and prices, Carloku-specific
+ domains). They live on carloku.com.
+- Designing the public API (D5).
+- Translations.
+- Rewriting the website's look. The docs use the site's existing design
+ system (website `DESIGN.md`).
+
+Anti-goals (would be a failure even if it technically works):
+
+- Marketing in the clothes of documentation. Claims about lightness or
+ security without the diagram, mechanism or number behind them.
+- Naming any tenant or customer anywhere. Examples are neutral (`shop`,
+ `example.com`).
+- Docs that describe Carloku's settings as if they were the platform's.
+- A page that needs JavaScript to be read.
+- Duplicated explanations that drift: one fact lives on one page and other
+ pages link to it.
+
+## 4. Where it lives and how it is built
+
+As today:
+
+- Source: `docs/site/` in the platform repo. A page changes in the same pull
+ request as the code it describes, and the platform's Go tests gate it
+ (`internal/docsite`).
+- Rendered by carlosframework.com (repo `carlos/website`, Eleventy 3 with
+ markdown-it and markdown-it-anchor) under `/docs`. The website vendors
+ the corpus with `hack/sync-docs.mjs`.
+
+Found during design: the website's vendored copy holds 4 pages (cli, plans,
+rate-limits, scan-callbacks), while `docs/site` has 10. The Rails, Laravel
+and Django, Rootfs, PDFs and domains pages are not on the live site. The sync
+must run as part of shipping a platform release from now on; how (CI job,
+release step) is the builder's call.
+
+**Which version the docs describe (my call):** the published site describes
+the latest stable platform release. A docs change still lands in the same
+pull request as its code, on `main`, and goes live when that code is
+released: the sync runs at release, from the release tag. Behaviour that is
+merged but not released, or released but off behind a switch, is not
+documented as available. One version at a time; no per-version docs yet.
+
+The website also has hand-written platform pages outside `/docs`:
+`src/platform/index.html`, `src/platform/self-host/index.html` (an AWS trial
+install with OpenTofu) and `src/start/index.html` (getting started). They
+are folded into the new structure: the self-host page becomes the basis of
+T7, the start page is reconciled with T1, and the old URLs redirect.
+
+Diagrams are inline SVG in the website's hairline style, authored as source
+files under `docs/site/` so they are versioned and reviewed with the pages.
+The exact authoring format (hand-drawn SVG, or a text source compiled to
+SVG at build time) is the builder's call, provided the output is static SVG
+that renders with no JavaScript.
+
+## 5. Information architecture
+
+Top-level nav, in order. Names are working names; final labels go through
+copy review.
+
+1. **Start here** (evaluators)
+ - **Why CARLOS**: easy and lightweight, shown with the parts list, the
+ costs and the time from nothing to a running app.
+ - **How it works** (the deepest section at launch, D2). Static diagrams:
+ the system map (console, boxes, edge, instances, storage, regions,
+ fleets) and what each part holds. Step-throughs (D3), at least: a ship
+ and deploy with no downtime; a request arriving at a sleeping instance
+ and waking it; a box failing and its instances recovering; a
+ one-off command (`carlos run`).
+ - **Security, and why**: written for someone doing a security review.
+ How instances are isolated, what a box holds and never holds, how
+ secrets are sealed and to whom, who can do what (roles, service
+ credentials), what is audited, and what the operator of a deployment
+ can and cannot see. Built on the How it works diagrams; it reuses them
+ rather than redrawing.
+ - **What it does for you**: the feature tour. Each feature is one short
+ entry tied to the chore it removes, linking to its guide.
+2. **Tutorials** (section 6).
+3. **Guides**, grouped by feature area. Task pages ("Run a one-off command",
+ "Add a domain", "Read a database at a point in time"), much of it moved
+ out of today's `cli.md`. The starting inventory is in section 8.
+4. **Operating a deployment**: install, configure, grow (boxes, fleets,
+ regions), observe (alerts, logs), upgrade and roll back, recover.
+5. **CLI reference** (D6, section 7).
+6. **API reference**: reserved (D5, section 7).
+7. **Changelog**: already rendered from `docs/site/changelog.json` at
+ `/platform/changelog/`; linked from the docs nav.
+
+Every existing page in `docs/site` is mapped to a place in this structure.
+Part of that mapping is deciding for each page, and each section of
+`cli.md`, whether it is platform material or belongs to Carloku (D1).
+
+Search: a good first use of D4. A build-time index plus a small script that
+filters it, on top of a nav that works without it. My call; the builder may
+choose the tool.
+
+## 6. Tutorials (D7)
+
+Each tutorial is a real app under `examples/`, and its page quotes from it
+under a drift test like `internal/docsite/rails_sample_test.go`. A tutorial
+states what it shows and roughly how long it takes.
+
+| # | Tutorial | Shows | Status |
+|---|---|---|---|
+| T1 | Quickstart: a small Go app with SQLite that sleeps and wakes | ship, open, sleep, wake; the native binary shape | new |
+| T2 | A per-customer SaaS app | one instance and database per customer, custom domains and certificates, seeded instances | new |
+| T3 | Rails with a worker on your own fleet | rootfs apps, release process, workers, store, `carlos run` and `carlos console` | exists (`examples/rails-shop`, `rails.md`), revise |
+| T3b | Laravel and Django | what changes from T3 | exists (`laravel-and-django.md`), keep as notes: no example apps of their own at launch (my call), so the quote rule does not apply to it |
+| T4 | A static site | custom headers, preview sites, the asset cache | new |
+| T5 | A one-off site for one audience | a temporary static site with a demo or presentation for one prospect, shared as a link, expiring by itself | new |
+| T6 | A dashboard for a project manager | a small internal app for one person: pulls status from a few tools' APIs on a schedule, behind sign-in, secrets for the API keys, sleeps between visits | new |
+| T7 | Install a deployment | console, first fleet, first box | new |
+| T8 | When things go wrong | restore from backup, point-in-time read, upgrade and roll back | new |
+
+**Box failure and recovery (my call):** the How it works step-through and T8
+show the behaviour of the stable release as a deployment gets it by
+default. Where recovery is operator-led, they show the operator's steps.
+Automatic failover in HA regions is shown only once it is released and on
+for new deployments; until then it gets a short "in HA regions" note at
+most.
+
+**Install environments (my call):** T7 covers the install path that exists
+today, AWS with the OpenTofu modules, and says so. Other providers are
+documented when their adapters ship; the architecture pages stay
+provider-neutral.
+
+Later (not launch): an invoicing app (email, PDFs, schedules, store), a Node
+app as a rootfs image (JIT rules), growing a deployment (boxes, regions,
+alerts).
+
+T6's data sources stay generic (any HTTP API with a token), so the example
+does not depend on a vendor. T5 depends on temporary static sites, which are
+live today.
+
+## 7. References
+
+**CLI reference (D6).** One page per command group with an index page. Each
+command's usage line and flag table are generated from the CLI itself, so
+they cannot drift; hand-written prose explains the command and links to the
+guides for how-tos. CI checks flags, not only top-level command names (today
+`internal/docsite/cliscan.go` deliberately skips flags; that changes once
+the flags come from generation rather than hand-written prose). Today's
+`cli.md` is 3,286 lines with 76 command sections; its anchors are linked from
+the changelog (`internal/changelog`), so the split keeps working links, by
+redirects or an anchor map, for every heading the changelog has linked.
+
+**API reference (reserved, D5).** At launch the section exists, says the
+public API is being designed, and points to the CLI. The page shape, taken
+from go.tito.io/docs/api and recorded here as requirements for the API
+project:
+
+- Getting started (auth, errors, pagination, conventions), then resources by
+ area, then object schemas.
+- Per endpoint: method and path, one-line summary, the permission it needs,
+ parameters, responses by status, copyable examples, and a response
+ example.
+- Example tabs: `curl`, JavaScript, and the equivalent `carlos` command.
+- Examples captured from the API's own tests; an OpenAPI document checked
+ against the real routes in CI.
+- A try-it panel that takes the reader's key, as progressive enhancement.
+- The generic reference on this site, and a copy served by each
+ deployment's console with that deployment's base URL and the reader's own
+ apps in the examples.
+- Webhooks and events next to the endpoints that cause them, with signature
+ checks shown in more than one language.
+
+## 8. Feature areas (starting inventory)
+
+To be verified against the code and the changelog by the builder; the
+builder adds any area missing here. Each area gets at least one guide page
+or reference entry.
+
+Apps and releases (ship, promote, versions, zero-downtime deploys, swap
+hold); instances (create, sleep and wake, always-on, seeded instances,
+moves between regions); rootfs apps (the image contract, processes,
+workers, release); one-off commands and terminal sessions (`carlos run`,
+`carlos console`); databases (replication, backups, `carlos db query` and
+`pull`, point-in-time reads); store (buckets, uploads); config and secrets
+(sealed config, fleet secrets keys); domains (custom domains, certificates,
+buying domains, regional domains); the edge (routing, request protection,
+rate limits, asset cache, static headers, streams and WebSockets); static and
+temporary sites; email (sending, tenant senders); PDFs; scan callbacks;
+schedules; logs, activity and audit; analytics; alerts and fleet traffic;
+members, roles, invites, sign-in options, service credentials and run
+credentials; plans and caps (for a deployment that sells plans); fleets and
+boxes (own boxes, managed fleets, regions, HA pools); operating a deployment
+(install, host.env, upgrades and rollback, the release channels).
+
+## 9. Drift gates
+
+What CI checks, building on `internal/docsite`:
+
+- Every top-level CLI command and every flag is in the CLI reference
+ (generated pages).
+- Every tutorial page quotes its example app accurately (drift tests per
+ example, like the Rails one).
+- Every internal link and anchor resolves, including links from the
+ changelog.
+- The copy gates the repo already uses for approved copy apply to docs
+ pages written through copy decks.
+- The website's vendored copy matches a known platform sha (the sync
+ script's `--check` mode).
+
+## 10. Voice and copy
+
+- Paul's house voice: plain, short sentences, no em dashes (full stop and a
+ new sentence), neutral examples, no tenant names.
+- Copy review as in D8. Each page's prose is drafted, then reviewed before
+ it is written into `docs/site`; code blocks and command output are not
+ copy.
+- The writing-pipeline and humane-docs guidance applies to every page.
+
+## 11. Order of work
+
+My call, for Paul to check:
+
+1. Already under way, separate from this design: the Rails guide fix (the
+ stale "carlos run does not reach rootfs instances yet" line) and a
+ "Commands and consoles" section on the Rootfs page, on branch
+ `rails-guide-run-console`.
+2. Sync the website so all of today's pages are live, and make the sync part
+ of shipping docs.
+3. New IA and nav, with today's pages moved into it and `cli.md` split into
+ command-group pages with generated usage and flags.
+4. Start here: How it works (with diagrams), Security, Why CARLOS, the
+ feature tour.
+5. Tutorials T1, T7, T8, then T2, T4, T5, T6, and revise T3.
+6. Guides for every area in section 8 not yet covered.
+7. The search enhancement, and the website rule change of D4 (website
+ `PRODUCT.md`, `DESIGN.md`), landed before the first page that uses
+ JavaScript.
+
+The API reference fills in when the public API project lands.
+
+## 12. Left to the builder
+
+- Diagram authoring format, within the constraints in section 4.
+- The search tool.
+- How the sync runs.
+- Page-level structure inside a guide or reference page, following the
+ patterns already set by `rails.md` and `rootfs.md`.
+- How the command-group pages are generated, as long as usage and flags come
+ from the CLI's own definitions.