Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .baseline/product/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,7 @@ and attach it to the Worker (dashboard → Workers & Pages →
`nextra-docs-web-prod` → Settings → Domains & Routes → Add → Custom domain).
Do the same for stage with a subdomain if you want one. Nothing in the build
depends on the origin — every link the site renders is relative — so there
is nothing to redeploy.
is nothing to redeploy. The repository names the domain in one place,
`BASE_DOMAIN` in `intent.yaml` (dev, stage and prod), which the site was born
with as the reserved placeholder `nextra-docs.example.com`. Replace it with
your domain in the same change that records it.
1 change: 0 additions & 1 deletion .github/workflows/baseline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ jobs:
--out "$(mktemp -d)" \
--set reponame=acme-docs \
--set "productname=Acme Docs" \
--set productdomain=acme.dev \
--set githuborg=acme-inc
- name: the leak gate — what a site carries
run: bash testing/leak.test.sh
Expand Down
24 changes: 15 additions & 9 deletions BOOTSTRAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ cd nextra-docs
orun new --blueprint repo-blueprint.yaml \
--out ~/sites/acme-docs --run-hooks --resume \
--set reponame=acme-docs --set productname="Acme Docs" \
--set productdomain=acme.dev --set githuborg=acme-inc \
--set githuborg=acme-inc \
--set orunWorkspace=ws_XXXXXXXX \
--set subdomain=<workers-dev-subdomain>
```
Expand Down Expand Up @@ -89,9 +89,13 @@ orun new --blueprint repo-blueprint.yaml --out ~/sites/acme-docs --run-hooks \

Every later phase reads the identity back from `.rebrand/values.json` in the
placed tree, but the blueprint's **required** inputs — `reponame`,
`productname`, `productdomain`, `githuborg` — are validated before anything
runs, so pass them every time (a `--values` file is easier). The full guide,
one page per phase: [docs/phases/README.md](docs/phases/README.md).
`productname`, `githuborg` — are validated before anything runs, so pass them
every time (a `--values` file is easier). The domain is not one of them: the
site goes live on workers.dev, and `productdomain` defaults to empty, which
brands the reserved placeholder `<reponame>.example.com` into `BASE_DOMAIN`
for an owner to replace when they attach a domain (README, "Custom domain").
Pass `--set productdomain=` only for a site that already has its domain.
The full guide, one page per phase: [docs/phases/README.md](docs/phases/README.md).

| flag | what it does |
|---|---|
Expand Down Expand Up @@ -136,10 +140,12 @@ orun new --blueprint repo-blueprint.yaml \
titled by `apps/web/content/_meta.ts`; the name and the repository the
GitHub and "Edit this page" links point at are `apps/web/app/site.ts`.
Every merge to `main` rebuilds the search index and redeploys.
- **Custom domain**: attach it to the Worker in Cloudflare (the site's
README, "Custom domain"); every link the site renders is relative, so
nothing else changes. There is no domain phase: attaching a domain needs
zone permissions the brokered `workers-deploy` token does not carry.
- **Custom domain**: attach it to the Worker in Cloudflare, and replace the
placeholder `<reponame>.example.com` in `intent.yaml`'s `BASE_DOMAIN` with
it (the site's README, "Custom domain"); every link the site renders is
relative, so nothing else changes. There is no domain phase: attaching a
domain needs zone permissions the brokered `workers-deploy` token does not
carry.
- **Refresh the record**: re-run `--phase 03-docs`; it is idempotent.

## 4. Testing this baseline
Expand Down Expand Up @@ -190,7 +196,7 @@ at the tag and refuses the whole catalogue if it 404s.
| Convergence failed AFTER the PR merged; re-running lands nothing | expected on its own — the files are on main. Re-run the phase (`--phase 01-product`, `--redo 01-product`, or the console's Retry): its `retouch` hook gives the landing a diff and the site redeploys |
| The site's `intent.yaml` says `workspace: ws_SET_ME` | `orunWorkspace` was empty and the build ran outside a workspace; set it and re-run `01-product` |
| A bootstrap stopped before `03-docs`; prod no longer waits on stage | the gate is deferred, not dropped: run `03-docs`, or `node tooling/bootstrap/promotion.mjs --restore --file <site>/intent.yaml` |
| `✕ input "productdomain" is required` | all four required inputs must be set on every invocation, single-phase ones included |
| `✕ input "productname" is required` | all three required inputs (`reponame`, `productname`, `githuborg`) must be set on every invocation, single-phase ones included |
| `unknown flag: --phase` or a parse error in the blueprint | the CLI is below the v2.58.11 floor |
| `01-product` lanes fail in `build-app`: `Symlink apps/web/node_modules/next is invalid, it points out of the filesystem root` | the site's intent pins stack-tectonic ≥ 0.20.0, whose lane-scoped install links each job's node_modules out of its tree, which Next 16's Turbopack refuses. Pin 0.19.0 (this baseline does; `intent.yaml` says why) |
| `01-product`'s convergence reported green, then `verify` got 404 from both URLs | a second workflow ran on the push to main and the watch took its run (a `checks.yml` that also runs on push). This baseline runs `checks.yml` on pull requests only, and its coverage gate holds the rule; read the CI run on main for the real result |
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ as-built status.
git clone --depth 1 --branch <baseline-tag> https://github.com/sourceplane/nextra-docs
cd nextra-docs
orun new --blueprint repo-blueprint.yaml --out ~/sites/acme-docs --run-hooks --resume \
--set reponame=acme-docs --set productname="Acme Docs" --set productdomain=acme.dev \
--set reponame=acme-docs --set productname="Acme Docs" \
--set githuborg=acme-inc --set subdomain=<workers-dev-subdomain>
```

Expand Down
9 changes: 5 additions & 4 deletions ai/context/current.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ what went live (`03-docs`).

| | |
|---|---|
| Latest tag | `baseline-v2` — ND4, one landing ([#5](https://github.com/sourceplane/nextra-docs/pull/5), ND-5; the first tag of that shape), and ND5, the cirrus standard (no kiox, generated component docs, this context pack, and the workers.dev subdomain read from the Cloudflare connection instead of asked) |
| Before it | `baseline-v1` (ND3: three phases, `01-scaffold`, `02-site`, `03-docs`) |
| Proven live | `baseline-v1`: yes — a console bootstrap went live on stage and prod on 2026-10-15 (`nextra-live`, `bst_PW76WBTK`, 8m15s). `baseline-v2`'s one-landing shape: no — proven offline in Baseline CI only (risk ND-I) |
| Latest tag | `baseline-v3` — ND6, the domain is set later ([#8](https://github.com/sourceplane/nextra-docs/pull/8), ND-8: the console asks for no domain, and a site is born with the placeholder `<reponame>.example.com` for an owner to replace) |
| Before it | `baseline-v2` — ND4, one landing ([#5](https://github.com/sourceplane/nextra-docs/pull/5), ND-5; the first tag of that shape), and ND5, the cirrus standard (no kiox, generated component docs, this context pack, and the workers.dev subdomain read from the Cloudflare connection instead of asked) |
| Before them | `baseline-v1` (ND3: three phases, `01-scaffold`, `02-site`, `03-docs`) |
| Proven live | `baseline-v1`: yes — a console bootstrap went live on stage and prod on 2026-10-15 (`nextra-live`, `bst_PW76WBTK`, 8m15s). The one-landing shape (`baseline-v2`, `baseline-v3`): no — proven offline in Baseline CI only (risk ND-I) |

## Where to read

Expand All @@ -34,6 +35,6 @@ what went live (`03-docs`).

## Next

1. Bootstrap one site from `baseline-v2` from the console, and record its
1. Bootstrap one site from `baseline-v3` from the console, and record its
timings against the 6-minute estimate and baseline-v1's 8m15s (closes
ND-I and ND4's last exit criterion).
1 change: 1 addition & 0 deletions ai/context/decisions.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ reads in order.
| 11 | orun is pinned only where it runs (the `orun-action` `version:` in each workflow); no kiox | `kiox.yaml` pinned a version (v2.15.0) nothing ran | IMPLEMENTATION-STATUS (ND5) |
| 12 | Component docs are generated from the manifests and checked in CI | A hand-written copy of the component's facts drifts silently | `tooling/catalog/gen-component-docs.py` |
| 13 | The workers.dev subdomain is read from the Cloudflare connection (`from: connection.cloudflare.workersSubdomain`), not asked; only a hand-run build passes `--set subdomain` | It belongs to the account like its id and has one right answer; a typed one could only be wrong, and wrong showed up after deploy in the build origin and the probes (cirrus-baseline since baseline-v23) | IMPLEMENTATION-STATUS (ND-7) |
| 14 | The console asks for no domain; an empty `productdomain` brands the placeholder `<reponame>.example.com` | The site goes live on workers.dev and nothing in the build needs a domain; attaching one is an owner's step, and the placeholder keeps every place the domain goes in the repository, ready to replace | `repo-blueprint.yaml`, `tooling/rebrand/rebrand.mjs`, IMPLEMENTATION-STATUS (ND-8) |
2 changes: 1 addition & 1 deletion ai/context/operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ orun integrations list --org <ws> --json && orun cloud check --org <ws>
| rename the site, or move its repository | edit `apps/web/app/site.ts` (`SITE_NAME`, `SOURCE_URL`), merge |
| deploy a change | merge to `main`; watch the run; failed lanes → `gh run rerun --failed` |
| redeploy without a change | edit the last line of `apps/web/component.yaml` (`# orun: redeploy <reason> <stamp>`) and merge — it is a deploy trigger, nothing reads it |
| serve a custom domain | attach it to the Worker in Cloudflare (README, "Custom domain"); nothing in the build depends on the origin |
| serve a custom domain | attach it to the Worker in Cloudflare (README, "Custom domain"), then replace the placeholder `nextra-docs.example.com` in `intent.yaml`'s `BASE_DOMAIN` (dev, stage and prod) with it; nothing in the build depends on the origin |
| add a runtime secret | `orun secrets set <KEY> --org <ws> --env <env>` |
| headless credentials | `ORUN_TOKEN` (workspace-scoped) + `GITHUB_TOKEN` |

Expand Down
11 changes: 6 additions & 5 deletions blueprint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ spec:
# already holds says so with `from`. repo-blueprint.yaml declares the same
# names; `repoPrivate`, `orunWorkspace` and `epicSlug` are build inputs with
# defaults (or filled from the build's workspace) and are not asked.
#
# NOR IS THE DOMAIN. The site goes live on workers.dev, and a domain is an
# owner's step after the bootstrap: `productdomain` defaults to empty, the
# rebrand writes the reserved placeholder `<reponame>.example.com` where
# the domain goes, and the site's README ("Custom domain") says how to set
# it. Nothing that needs a domain is removed — it waits for one.
inputs:
- key: reponame
label: Repo name
Expand All @@ -71,11 +77,6 @@ spec:
pattern: "^[A-Za-z0-9][A-Za-z0-9 .,'&-]{1,48}$"
help: The name visitors see — the navbar logo, the page titles and the footer.
example: Acme Docs
- key: productdomain
label: Site domain
pattern: "^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$"
help: The domain the site will answer on. It does not need to exist — the site goes live on workers.dev first.
example: acme.dev
- key: githuborg
label: GitHub organisation
pattern: "^[A-Za-z0-9][A-Za-z0-9-]*$"
Expand Down
12 changes: 9 additions & 3 deletions docs/phases/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,15 @@ the site renders is relative.
`01-product` takes the site's identity once and writes it into the repo
(`.rebrand/values.json`); every later phase reads it back from the placed
tree. But the blueprint's **required** inputs — `reponame`, `productname`,
`productdomain`, `githuborg` — are validated before any phase runs, so they
must be supplied on every invocation, single-phase ones included. A
`--values` file is easier than repeating `--set`.
`githuborg` — are validated before any phase runs, so they must be supplied
on every invocation, single-phase ones included. A `--values` file is easier
than repeating `--set`.

- `productdomain` — NOT ASKED, default empty. The site goes live on
workers.dev; empty brands the reserved placeholder `<reponame>.example.com`
into `BASE_DOMAIN`, for an owner to replace when they attach a domain (the
site's README, "Custom domain"). Pass it only for a site that already has
its domain.

- `subdomain` — the workers.dev subdomain of the Cloudflare account you
deploy into. It is in every URL the phases probe and in the site's
Expand Down
13 changes: 9 additions & 4 deletions repo-blueprint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,16 @@ inputs:
description: The site's display name (e.g. "Acme Docs") — the navbar logo, the page titles, the footer.
productdomain:
type: string
required: true
default: ""
description: >-
The domain the site will answer on (e.g. acme.dev) — BASE_DOMAIN and the
custom-domain guidance. It does not need to exist: the site answers on
workers.dev from its first deploy.
The site's own domain, once it has one (e.g. acme.dev). NOT ASKED: the
site answers on workers.dev from its first deploy, and a domain is an
owner's step after it. Empty, the rebrand writes the reserved
placeholder `<reponame>.example.com` where the domain goes (BASE_DOMAIN
in intent.yaml, for dev, stage and prod), so setting it later is
replacing that one string — the site's README, "Custom domain", says
how. Pass it with --set only to brand a hand-run build with a domain it
already has.
githuborg:
type: string
pattern: "^[A-Za-z0-9][A-Za-z0-9-]*$"
Expand Down
2 changes: 1 addition & 1 deletion specs/epics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ folder is the adoption; the merge creates the epic in the workspace.

| Epic | Cluster | Status | What it is |
|------|---------|--------|------------|
| [`nextra-docs/`](./nextra-docs/) | **ND** | ✅ Shipped (`baseline-v1`, live 2026-10-15); ND4–ND5 tagged `baseline-v2`, the one-landing shape, not yet proven live | Vercel's Nextra Docs Starter Kit, equivalent in content and function, running on Cloudflare Workers + Static Assets via OpenNext — and an Orun baseline that instantiates it (ND3) |
| [`nextra-docs/`](./nextra-docs/) | **ND** | ✅ Shipped (`baseline-v1`, live 2026-10-15); ND4–ND5 tagged `baseline-v2`, ND6 (no domain asked) `baseline-v3`; the one-landing shape not yet proven live | Vercel's Nextra Docs Starter Kit, equivalent in content and function, running on Cloudflare Workers + Static Assets via OpenNext — and an Orun baseline that instantiates it (ND3) |

As-built ≠ intent: what shipped lives in each epic's `IMPLEMENTATION-STATUS.md`.
48 changes: 48 additions & 0 deletions specs/epics/nextra-docs/IMPLEMENTATION-STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ the code departed from `design.md` or from the upstream template.
| ND3 — a baseline | ✅ Shipped | [#4](https://github.com/sourceplane/nextra-docs/pull/4) (ND-4), tagged `baseline-v1`; a console bootstrap of it went live on 2026-10-15 (below) |
| ND4 — one landing | ✅ Shipped | [#5](https://github.com/sourceplane/nextra-docs/pull/5) (ND-5), tagged `baseline-v2` — the first tag of the one-landing shape; not yet proven live (risk ND-I) |
| ND5 — the cirrus standard | ✅ Shipped | [#6](https://github.com/sourceplane/nextra-docs/pull/6) (ND-6), [#7](https://github.com/sourceplane/nextra-docs/pull/7) (ND-7), tagged `baseline-v2` |
| ND6 — the domain is set later | ✅ Shipped | [#8](https://github.com/sourceplane/nextra-docs/pull/8) (ND-8), tagged `baseline-v3` |

## Departures from the upstream template

Expand Down Expand Up @@ -181,6 +182,53 @@ Verified:
placed, both landings, `--resume` changes nothing.
- `orun task check ND-7` complete.

## The domain is set later (ND6, ND-8)

The console asked for the site's domain, with help text that said it did not
need to exist — and nothing in the build needed one: the site answers on
workers.dev from its first deploy, every link it renders is relative (no
canonical URL, sitemap or Open Graph base is built from a domain), and the
one place the repository names the domain is `BASE_DOMAIN` in `intent.yaml`,
for dev, stage and prod. A domain is an owner's step after the bootstrap
(README, "Custom domain"), so the form no longer asks for it.

- `blueprint.yaml` declares no `productdomain` input; the console's Product
step asks for the site's name alone.
- `repo-blueprint.yaml`'s `productdomain` is optional, default empty. A
hand-run build may still pass `--set productdomain=` for a site that
already has its domain. Nothing else in the build reads it: no hook, probe
or `when:` names it, only the `.rebrand/values.json` template, which
writes `""`.
- `rebrand.mjs` no longer requires it. Empty, it brands the reserved
placeholder `<reponame>.example.com` (RFC 2606 — never someone else's
domain) where the domain goes, so setting it later is replacing one
string; the product README and `ai/context/operations.md` say so.
- `testing/fixtures/acme.json` carries no domain, so the leak gate and the
offline bootstrap exercise exactly what a console build supplies;
`testing/rebrand.test.sh` pins the placeholder for an absent and an empty
domain; `baseline.yml`'s blueprint read sets no domain.

Nothing that needs a domain was removed — it waits for one.

Verified:

- `testing/{manifest,phases,coverage,rebrand,retouch,bootstrap-defer}.test.sh`
green (`rebrand.test.sh`: 29 checks, two of them new — and those two fail
against the old `rebrand.mjs`); `gen-component-docs.py --check` green (2
components).
- `orun new --status` (v2.58.11) with no `productdomain`: `01-product`
pending (61 files). `testing/leak.test.sh` (v2.58.11): 61 files derived;
ai/context still exactly the two declared pages.
- `testing/placement.test.sh` (v2.58.11, as Baseline CI runs it): 61 files
placed, both landings, branded, the site's own `orun plan` green,
`--resume` changes nothing.
- The offline bootstrap's site, kept and read: `.rebrand/values.json` has
`"productdomain": ""`; `intent.yaml`'s `BASE_DOMAIN` is
`acme-docs.example.com` in all three environments, and the README and
`ai/context/operations.md` name that same string (5 lines, 3 files);
`rebrand --verify` finds no leftover.
- `orun task check ND-8` complete.

## Verified (ND5)

- `testing/{manifest,phases,coverage,rebrand,retouch,bootstrap-defer}.test.sh`
Expand Down
Loading
Loading