Skip to content

feat: every build line reads true, and a product ships its own README and AGENTS.md - #33

Merged
ruehowl merged 2 commits into
mainfrom
claude/funny-cerf-9totyb
Oct 23, 2026
Merged

ruehowl merged 2 commits into
mainfrom
claude/funny-cerf-9totyb

Conversation

@ruehowl

@ruehowl ruehowl commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

This is cirrus's part of BV4 in orun-cloud's specs/epics/saas-build-panel (see implementation-plan.md, section BV4).

Why

The console's redesigned build panel (BV1) prints each hook's narrate: line word for word as progress, and a phase's waiting line as what the build is waiting on. When the build finishes, it gives the operator an agent prompt that ends "…clone <repo> and start building on it." So every line has to be true at the moment it shows. The product also has to be something an agent can start working in. The engine change it relies on, BV3 (sourceplane/orun#787), is not released yet. The new hook keys are ignored by older orun.

What changed

Lines (repo-blueprint.yaml)

  • repo: the line is built from the action's outputs, so it is true whether the repository was found or created: acme-inc/acme-cloud is ready — created for this build.
  • land (both phases): the line names the PR (PR #7 is merged into main.), or says Nothing new to land; … on a re-run. Also adds label: Product / label: Docs.
  • link, the three secret-* reconcile hooks and 08-docs' render now each have a line. The secret lines are fixed text, because a hook id containing - can't be referenced in a template. The preInstantiate epic hook says Epic <key> is open.
  • Neither phase authors a narrate.await line any more. A waiting event is also what the build shows while requires.probe waits for a provider connection, so the old fixed sentence ("…Nothing is stuck.") was false half the time. With no line authored, orun writes <title>: <reason> from its own reason. A Waiting on {{ .meta.waitingOn }}. template would have read "Waiting on waiting for github, cloudflare to be connected…", because the engine's reasons are whole clauses. testing/phases.test.sh now treats await as optional, and still checks an authored one.
  • Each start line is one clause; done, failed and the await-hook lines are shorter and stay true. 08-docs gets a description, and its re-probe gets quiet: true.

Budget: 01-product 13 + 08-docs 2 = 15, which is now the card's bootstrap.expectedMinutes and "about fifteen minutes" in the card's description. The old figures were 9 + 1 in the phases, 12 on the card and "~25-30" in the description. testing/manifest.test.sh now fails if the card and the phases disagree. Fixed two stale card comments: a citation to TIMINGS.md, which has no v21 figure, and "during phase 02".

What a product carries

  • No more .vscode/tasks.json. It is this repository's own agent loop: it runs agents with --yolo / --dangerously-bypass-approvals-and-sandbox against agents/orchestrator.md and ai/state.json, and no product has either file. The baseline keeps its copy; testing/leak.test.sh fails if it ships again.
  • The product's own README.md and AGENTS.md, filled in with the product's name and repo from .baseline/product/ (template modules with bind:). The README has a "What is here" table, links Orun to github.com/sourceplane/orun, and keeps the 08-docs markers. AGENTS.md covers what the product is, what to read first (operations → deployment → intent.yaml → api-edge overview → console → contracts), how a change lands, which files not to edit by hand, and secrets.
  • ai/context/deployment.md starts as a "Not rendered yet" placeholder. Products used to get the baseline's own record (ws_KWQ45Z6M, "LIVE (200)"). 08-docs' render still overwrites it; I ran it against a placed product to check.
  • No more OPSFLOWS in the shipped operations.md. It now tells the reader to fetch the phase with orun baseline new <baseline> … --values <checkout>/.rebrand/values.json; I checked that values.json parses as --values on v2.58.11 and main. In hooks/render-deployment-docs.sh, the heal path no longer does the substitution, which also removes its retired sourceplane/cirrus default. It now stages the copied file first: rebrand.mjs only rewrites files listed by git ls-files, so the healed copy had kept 5 "cirrus-baseline" names.
  • ignore gains the starters' patterns: **/.env, **/.env.local, **/.env.*.local, **/.dev.vars, **/.dev.vars.*, .terraform, **/*.tfstate, **/*.tfstate.backup. .terraform is matched as a path segment, so the committed .terraform.lock.hcl files still ship.

Tests

  • leak.test.sh:
    • fails if .vscode/tasks.json or .baseline/ would ship;
    • requires README.md and AGENTS.md to ship;
    • reads each product doc from its real module source;
    • fails on a placeholder nothing fills, or on a link to a file the product doesn't carry.
  • placement.test.sh:
    • the placed docs must be rendered, name the product, and claim no deployment yet;
    • the repo-gate check accepts the summary line printed by orun releases after v2.58.11 (✓ Verified intent valid · …), which is printed only when the same gate passes. Without that, the test failed on current orun even on unmodified main.
  • phases.test.sh records vscode as removed and root-agents as added.

Also: in the baseline's own README, fixed the phase count ("nine") and the Orun link. Corrected the false comment "Hook argv is not templated".

How I verified

I ran every testing/*.test.sh that baseline.yml runs, plus the blueprint-parses command (orun new --blueprint repo-blueprint.yaml --status --out "$(mktemp -d)" --set reponame=acme-cloud --set "productname=Acme Cloud" --set githuborg=acme-inc), with each of three orun binaries first on PATH:

  • v2.58.11, the CI pin, downloaded from the release and checksum-verified: all pass.
  • orun main: all pass.
  • orun BV3 (#787): all pass.

Checks run: manifest, phases, coverage, rebrand, retouch, console-artifact, bootstrap-defer, fleet-stubs, blueprint-parses, leak, placement. None needed network.

Other checks:

  • Negative cases, run in a scratch copy. Each new gate fails as intended when:
    • the vscode module is put back;
    • the baseline README is put back (links to BOOTSTRAP.md and docs/phases);
    • the baseline's deployment.md is put back;
    • the card says 12 minutes;
    • OPSFLOWS is put back;
    • the AGENTS.md module is dropped;
    • a line references .meta.waitingOn.
  • Narration: rendered every authored line with Go text/template and missingkey=error (what orun's Render uses), against the outputs of a fresh build and of a re-run. The output is as intended.

Deliberately out of scope

  • The shared epicSlug default (the platform will stamp one per product).
  • The figures in orun-cloud's infra/baselines-registry/baselines.yaml.
  • Cutting a baseline tag.
  • http/probe targets; the verify probe's with.urls are unchanged.
  • No pin: key is used.

Generated by Claude Code

… and AGENTS.md

orun-cloud saas-build-panel BV4, for cirrus. The console's build panel now
prints each hook's `narrate:` verbatim as progress and a phase's waiting line
as what the build is waiting on, and ends by handing the operator an agent
prompt that says "clone <repo> and start building on it". So every line has to
be true whenever it is shown, and the product has to be ready for an agent.

Lines (repo-blueprint.yaml)
- repo: from the action's outputs, true for a found or a created repository.
- land (both phases): names the PR, or says there was nothing new to land;
  `label: Product` / `label: Docs` for BV3.
- link, the three secret reconciles and 08-docs' render get a line; the
  preInstantiate epic hook says which epic is open.
- no phase authors an `await` line any more. A waiting event is also what the
  build says while `requires.probe` waits for a provider connection, where
  "one convergence is deploying… nothing is stuck" was false; unauthored,
  orun writes "<title>: <reason>" from its own reason. phases.test.sh makes
  `await` optional (an authored one is still checked).
- start lines are one clause; done/failed/converge lines shortened and kept
  true; 08-docs gets a description, and its re-probe is `quiet: true`.

Budget: 01-product 13 + 08-docs 2 = the card's 15 (was 9 + 1 against 12 and
"~25-30 minutes"); manifest.test.sh now holds the card equal to the phases.

What a product carries
- no `.vscode/tasks.json`: it is this repository's agent loop, running agents
  with sandbox bypass against files no product has. leak.test.sh refuses it.
- README.md and AGENTS.md rendered from .baseline/product/ with the product's
  name, instead of the baseline's README (nine phases, "This product is live",
  links to BOOTSTRAP.md and docs/phases/, Orun linked to opencode.ai).
- ai/context/deployment.md starts as a "Not rendered yet" placeholder instead
  of the baseline's own live record; 08-docs overwrites it as before.
- operations.md no longer ships the unfilled `OPSFLOWS` clone URL: it says to
  fetch the phase with `orun baseline new` and pass `.rebrand/values.json`.
  The render hook's heal path drops the substitution (and its retired
  sourceplane/cirrus default), and now stages the copy so rebrand brands it.
- ignore: an operator's .env/.dev.vars files, .terraform caches and tfstate.

Tests: leak.test.sh requires README.md/AGENTS.md, reads provenance from each
doc's real module source, and fails on an unfilled placeholder or a link to a
file the product does not carry; placement.test.sh checks the placed docs are
rendered, name the product and claim no deployment yet, and accepts the
repo-gate line of orun releases after v2.58.11; phases.test.sh records
`vscode` out and `root-agents` in.

Also: the baseline README's phase count and Orun link; the "hook argv is not
templated" comment, which was false.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CJuLwDKfEaQGAEuBpJvN5Q
`ignore` had the starters' `.env`, `.env.local` and `.env.*.local`, which let
`.env.production`, `.env.stage` and the like through: a `--local` build from a
checkout that has one would copy it into the product. It is `**/.env*` now —
this repository tracks no `.env*` file, so nothing a product needs is dropped.
`.dev.vars.*` already covered the dev.vars side.

testing/leak.test.sh gains the rule that proves it: a derived product path
whose basename is `.env*`, `.dev.vars`, `.dev.vars.*`, `*.tfstate` or
`*.tfstate.backup`, or that sits under a `.terraform` segment, fails the gate.
Canaries planted in a copy of the tree (`.env.production`, `.env.stage`,
`.env`, `.dev.vars.prod`, a `.terraform/` file and a `terraform.tfstate`):
none ships with this list; with the previous patterns the gate names
`.env.production` and `.env.stage`; with no local ignores, all six. The
committed `.terraform.lock.hcl` files still ship.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CJuLwDKfEaQGAEuBpJvN5Q
@ruehowl
ruehowl marked this pull request as ready for review October 23, 2026 08:38
@ruehowl
ruehowl merged commit 71723c9 into main Oct 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants