Every contributor, person or agent, reads AGENTS.md in full before any work, and the skill or file its "Where the rest is" names for the work at hand. Starting a project from the template is vibestack/README.md, "Set up a new project". Everything is built on the stack: Node 26, pnpm, VibeLang on Effect for the shell, React for every interface.
| Path | Holds |
|---|---|
apps/ |
deployable applications; apps/app is Alpha's page: Home, the built-in apps and Ask Alpha, over eliza's agent and cloud (pnpm eliza builds the pinned commit once) |
apps/site |
@repo/site: Alpha's public page (spec/site/): build writes the static page its deploy uploads to Cloudflare Pages; operating it is in README.md |
apps/cloud |
@repo/cloud owns the Alpha Cloud profiles, local seed, and elizaCloudRoutes for the phone's ElizaCloud plugin. pnpm cloud checks, renders, provisions, deploys, and smoke-tests the Cloudflare API and App Link Workers from the private secrets file and the operator's completed profile/candidate.example.json. See spec/cloud/, apps/cloud/alpha-cloud.env.example, and .github/workflows/cloud-deploy.yml. |
packages/ |
what applications share: @repo/cli (project CLI levers), @repo/ui (components), @repo/design-system (tokens) |
packages/eliza-harness |
@repo/eliza-harness: the pinned eliza checkout (pnpm eliza, pinnedCheckout()), its cloud and agent started for journeys and pnpm dev, the run's owners, and pnpm no-bun; an app imports it from test/ and its configs, and pinned from src/ |
packages/deployment |
@repo/deployment: deployments.json, the cloud origin, App Link host and profile of each environment (local, staging, production), read by deployment(name) |
packages/launcher-records |
@repo/launcher-records: the Clock and Reminders records exchanged between the launcher and its resident agent |
vibestack/ |
the tools: the spec command, Studio, and what any project uses but does not own (vibestack/testing, vibestack/design, vibestack/stories) |
vibestack/examples/ |
standalone projects, each with its own install; never part of the workspace |
The specs of every package are in the one tree at the root (SPEC.md, "One spec tree"); Architecture maps what is generated from what, which test is for what, and the budgets and CI.
A package exposes its code only through its root barrel ("." in exports), plus explicit non-code static assets such as .css and .json; no code subpaths or wildcards. Import a workspace package by name (or a declared static asset path), never by a code subpath or into its src/. Domain code
does not import React, and a UI package holds no business rules. A shared type lives with the contract that owns it.
| Command | Does |
|---|---|
pnpm dev |
Studio, and every package's dev script beside it |
pnpm quick |
the fast local check: types, tests, ESLint and Stylelint, in every package |
pnpm no-bun |
scans tracked files in the active workspace for Bun usage and works before workspace dependencies are installed |
pnpm verify |
what CI runs: pnpm no-bun, build, types, tests, browser tests, every check, lint, pnpm analyze and pnpm selftest, which also installs and checks each example |
pnpm all <task>… |
one or more kinds of task in every package: pnpm all build typecheck test |
pnpm test:browser |
the browser tests |
pnpm test:models |
every workspace check: the root's, which is its owners' too, and Studio's |
pnpm lint |
ESLint and Stylelint (pnpm lint:js, pnpm lint:css for one) |
pnpm analyze |
Knip (unused files, exports, dependencies), Madge (import cycles) and jscpd (duplicated code) |
pnpm check, pnpm gen, pnpm build, pnpm typecheck, pnpm test |
this package's own, here as in every package: at the root, the root project and the tools |
Turborepo (turbo.json) orders these and skips a task whose inputs it has seen
(Caching), so every command above runs only
what a change reaches. check is never skipped whole: spec keeps its own finer cache in .spec-cache/, and runs the
application again each time.
A package joins by having a script named gen, build, typecheck, test, test:browser or check. Its other
tasks wait for its gen and the root's, and its check for all of them, since check rewrites gen/. A package that
can never own a root spec waits for no root gen, so a spec edit leaves its tasks cached: Studio, which has a spec/
of its own, and @repo/cli, @repo/design-system and @repo/ui, which have no spec/<name>/; @repo/ui's tests still wait for
its stories, whose @model tags read the root's gen/. Studio's tests wait for its page build and are keyed by its
files and the vibestack/fixtures/ they read, besides the tools every task is keyed by. The root's
check rewrites its owners' gen/ too, so it waits for their tasks: name each owner's in //#check of turbo.json,
as @repo/app's are. pnpm lint:js on its own needs what gen and typecheck write (gen/, .vibe/declarations);
pnpm lint runs them first.
pnpm all //#analyze also runs or restores the application and Studio generators,
the UI stories, the design theme and the Eliza harness before analysis reads their outputs.
The app's Knip configuration accounts for the Android Gradle module selected by
apps/app/android/host.json and the OCR package files read by apps/app/scripts/ocr-assets.ts.
The hosted VibeStack app build keys its //#gen dependency on apps/app/gen/.
Its other inputs come from apps/app/ and the declared workspace builds. Add any
new reads outside those inputs to the build profile in .github/workflows/ci.yml.
See CI for the checks each branch runs on pull requests and pushes.
| File | Role |
|---|---|
vibestack/spec.ts, vibestack/pipeline.ts |
the vibestack / spec CLI, and the pipeline it runs |
vibestack/config.ts |
vibestack.json and package.json#vibestack configuration (mode, spec.exclude, spec.owners, cacheDir, stages, signOff) |
vibestack/doctor.ts, vibestack/upgrade.ts |
`vibestack doctor [--install-dafny |
vibestack/worktrees.ts |
vibestack worktrees and vibestack clean: the .worktrees.json registry, each worktree's class, and removal |
vibestack/remote/ |
vibestack remote (vibestack-remote): running a repository's pnpm, npx and pnpx on a remote box |
vibestack/parse.ts, vibestack/review.ts |
literate specs and the review ledger |
vibestack/cache.ts, vibestack/run.ts |
stage caches and bounded tool execution |
vibestack/units.ts, vibestack/simulate.ts |
generation, proof units, simulation and replay |
vibestack/util.ts |
source discovery, package fingerprints and citations |
vibestack/testing/check.ts |
the tests stage and the rules it holds tests to |
vibestack/gen/vibe.ts |
gen/<name>.effect.vibe, read off the generated TypeScript |
vibestack/machine.ts |
gen/_machine.ts, a copy in each package's gen/: what its generated machines share when the program runs, the proof of an accepted event (Accepted, made by prove), receipts (fileReceipt, fileDebt), an instance of a kind with its package's filers (Bound), senders (Sender, made by authenticated), the brand of a secret (Secret, made and read by generated code alone) and that of a checked value (Checked, given by a spec predicate valid…) |
vibestack/gen/react.ts |
gen/<name>.react.ts (useMachine), in a package that depends on React |
vibestack/scan.ts |
how a spec's lines are read; imports nothing, so Studio's page uses it too |
vibestack/studio/ |
Studio, a workspace package with its own spec, checked by pnpm --filter vibestack-studio check: change spec/, then its shell in src/. Under pnpm dev, its dev script waits for what its build does, Studio's gen and the packages it builds on, then rebuilds the page it serves on each save of the page's sources, and builds afresh when the Vite config, vibestack/design or the tokens change: reload the browser, no restart. pnpm build bundles its server (dist/server.mjs) and page (dist/page/), and the packaged command starts it |
vibestack/prove.ts |
proves one unit: checks and splices the proof file, runs LemmaScript and dafny audit, verifies again with every assertion isolated each definition that fails, and alone every postcondition a failing one could hide |
vibestack/proof/lib.dfy |
the library proof files call |
vibestack/std/ |
specs that ship with the tools, which any spec may import, each with its proof file |
vibestack/conform.ts |
the traces stage and spec conformance: drivers, each in a Node of its own, driver: programs and recorded traces; saved counterexamples; the driver stub |
vibestack/explore.ts |
the explore stage and spec explore: serves a package's page with its app script, runs Bombadil on it, and replays and removes a saved run |
vibestack/conformance.ts |
the comparing: journeys, deterministic model-based path planning (planModel), malformed-input probes, walks, receipts against the events the spec accepted (receiptProblem), shrinking and replay; copied into gen/ for a driver's types |
vibestack/testing/ |
what packages import via vibestack/testing*: project() (the Vitest configuration), the property-test generator, effectDriver, planModel, runModel |
vibestack/stories/, vibestack/design/ |
generated stories and their tests; design tokens and their lint rules. The design project module in vibestack/design/project.ts builds or checks several token directories in one process |
vibestack/eslint.ts |
withWorkspaceBarrels and vibestackConfig: ESLint rules enforcing barrel-only workspace exports and imports plus a reusable downstream preset |
vibestack/vite.ts |
vibestack/vite: composable Vite dev plugins (vibestackVite, vibelangHmrGuard, designTokens, mobileHmr) for Fast Refresh, live token CSS HMR, and mobile WebView resilience |
vibestack/alchemy.ts |
vibestack/alchemy: zero-dep Node 26 helpers for Alchemy v2 (resolveStage, assertStageGuard, hashAssetDirectory, verifyDeploymentEndpoints, createR2BucketClient, makeR2BucketObjects) |
vibestack/formal.ts |
vibestack/formal: check, conformance, explore, precomputeSimulations, prepareSimulationReceipts, readSpecs, withFormalCache, show |
vibestack/gen.ts |
the translator: reads what a module imports and defines |
vibestack/gen/types.ts |
everything decided by a type |
vibestack/gen/print.ts |
expressions |
vibestack/gen/classify.ts |
which definition is a transition, a guard or a rule |
vibestack/gen/admits.ts |
who each transition's guard can admit, read off its conditions on the sender; the subsets a predicate on a sum names, and the checks a predicate valid… names |
vibestack/gen/kinds.ts, vibestack/kinds.ts |
kinds and instances: what a kind declares, the Quint that asks its rules of a spec's instances beside reflected, and running it (vibestack/std/machine.md) |
vibestack/gen/secrecy.ts |
where a secret may go, and where gen/<name>.ts, in which a secret is a brand, reveals or conceals one |
vibestack/gen/typescript.ts, vibestack/gen/harness.ts |
gen/<name>.ts, and the Quint module gen/<name>.run.qnt that simulation runs |
vibestack/selftest.ts, vibestack/fixtures/ |
the tool selftest and the specs it uses besides the order example |
vibestack/selftests/ |
the docs and standalone example selftests, and helpers used by the selftests |
Node runs all of it directly; pnpm build compiles it, with Studio's bundled server and page, for the packaged vibestack and spec command.
check(root) returns { ok, results, next, wrote }, and spec check --json prints each result as one line of JSON as
soon as it is reported, then that object as its last line. Each result has ok, stage (a stage, or skipped),
summary, detail and, when it concerns them, where and rules (each rule as { file, key }); next is the line the
command line ends with; wrote holds the files the check wrote itself, a driver it began or a counterexample it saved,
each with its text, by its path from the root in the JSON, so that spec watch takes only a later edit of one for a
change to check again. pnpm selftest builds scratch projects from this project's spec or from vibestack/fixtures/,
breaks one thing at a time and asserts which stage catches each. It runs as cached tasks, each keyed by what its tests
read: selftest:docs the documents against every file they can name, selftest:examples:<name> one standalone example
against its own files and the tools. selftest:tools:a, selftest:tools:b and selftest:tools:c build scratch projects from the order
example and fixtures. selftest:tools:rest also rebuilds the packaged CLI from the workspace, so app manifest changes and changes under
packages/ or spec/ invalidate its isolated CI run. The first three each run one shard of the kinds of mistake, the
describe named in shard a, in shard b or in shard c in vibestack/selftest.ts. The last runs the remaining tool tests there.
Changes to either docs or standalone example test code keep the tool shards cached. Keep the longest tests spread over the four.
Changes to the root README rerun the docs and packaged tool checks.
The two suites of the tools, the command line and each kind of mistake, run side by side under one parent, each at most four tests at a time. The order project the
edits copy and a few long checks of fixtures are shared projects: each starts with the tool runs (action-* entries)
earlier selftests kept in .cache/selftest/.spec-cache and leaves its own there; entries unused for a week are pruned.
A test that observes a tool really running uses a scratch project of its own, which starts empty.
Scratch dependency installs clone package files when the filesystem supports it and copy them otherwise. Both methods leave the shared store's hardlink metadata stable while parallel checks observe an installed verifier.
pnpm selftest runs all five through Turborepo, side by side, as pnpm verify does. Each of the three
selftest:tools processes bounds its own tests and tools to the machine and checks the order project once for itself,
so three at once ask about three times what one does: on a machine too small for that,
pnpm selftest --concurrency=1 runs one shard at a time. What a change to the
tools owes it, and the sync skill, is in AGENTS.md, "Definition of done".
For phase timings, pass --timings to spec check, or subscribe to the Node diagnostics channel vibestack:check:phase before running spec check.
Each message has root, checkStartedAt (Unix milliseconds), phase, event (start or end) and
elapsedMs (milliseconds measured by a monotonic clock since the check acquired its project lock). Phases
can overlap. The simulation end records when the last simulation settled. Its message can arrive later,
once generation has scheduled every simulation. An ordinary exception closes open phases as the check
unwinds. If the process is interrupted, only events already delivered are available. The check's results
and exit code still come from its normal output. Keep subscribers' output outside the project and catch
errors in subscribers, since Node reports a thrown subscriber error as an uncaught exception.
Merge the release source into main. Each push reserves a launcher version
using its run number plus 1000. Successful CI for that push opens
the GitHub draft alpha-v<version> at that exact source commit, with
alpha-release-source.json, and the launcher release workflow
then builds, signs and publishes automatically.
preparebuilds the unsigned APK, stores it privately and writes a signing plan;deliversigns exactly that plan's APK with Alpha's one key in thereleaseenvironment and stores the signed APK privately, create-only.- The same run's
publishjob fetches that exact generation, re-verifies it, uploads it toapp-stable-alphacompute, checks its anonymous download, and only then movesalpha-update-stable.json, which phones install from. It reads the manifest back, checks channel health and records the floor. queue-pixelstarts the Pixel release and waits for it to admit this APK while the launcher channel still names it. The admitted release takes its turn on GCP, signs the Pixel 10a image with that APK inside and then queues the OS publication. It publishes the signed OTA toos-pilotand finalizesalpha-v<version>with the signed APK, fastboot image, AVB public key andalpha-release-bundle.json.
No voice qualification, physical drill or approval holds any step back. What does hold one back is integrity: exact bytes and digests, Alpha's one signer with no key rotation, create-only storage, the anonymous download check before a manifest moves, a version floor that never falls and OS timestamps that never fall. A rerun resumes the same release; a different source or conflicting asset stops it. The Pixel release procedure covers the GCP roles, recovery and verifying the downloads.
A phone on v1174 needs one ordinary Settings update. Open Alpha Settings → General, allow installs from Alpha when Android asks, then choose Install update and confirm Android's Update prompt. For the next, strictly newer release, leave the phone on Wi-Fi and check that Alpha installs it without another confirmation. Record both versions, installer identity, retained HOME, AI mode, saved sharing choices and Keystore access on the physical spare. Handset acceptance and evidence
If the automatic delivery dispatch needs recovery, first check for a
delivery already queued for that plan. To resume a prepared plan with
no delivery run, set CANDIDATE_RUN, CANDIDATE_ATTEMPT, and
PLAN_SHA256 from its prepare run; that run publishes once it delivers.
gh workflow run release.yml --repo AlphaPhone/alpha --ref main -f operation=deliver \
-f candidate="$CANDIDATE_RUN" -f attempt="$CANDIDATE_ATTEMPT" -f plan-sha256="$PLAN_SHA256"If publication failed before the public channel moved, retry within 24 hours
of delivery. Set DELIVERY_RUN to the run ID that signed and stored the
APK. To publish its original delivery receipt using the current workflow on
main, run
gh workflow run release.yml --repo AlphaPhone/alpha --ref main -f operation=publish \
-f delivery-run="$DELIVERY_RUN"If publication moved the channel but its readback failed, keep the failed run ID and attempt. Once the public and stored manifests match the original signed APK, reconcile that exact attempt to record the floor and queue the Pixel release. Recovery receipts
gh workflow run release.yml --repo AlphaPhone/alpha --ref main -f operation=reconcile \
-f publish-run="$FAILED_PUBLISH_RUN" -f attempt="$FAILED_PUBLISH_ATTEMPT"The Pixel production image and OS OTA handoff covers the separate operating-system release.
The spec owns the rules and state; generated code is its runtime contract.
Pure logic Quint cannot express lives in src/**/*.ts with proved //@
contracts. VibeLang owns effects and I/O; React reads the generated Machine
service through hooks. Persisted data enters through decodeState or a
schema, never by trusting stored JSON. Controls follow enabled, and the
shell applies events through Machine or the generated Effect adapter.
Every root spec module is generated into the root's gen/. Modules owned by
apps/<name> or packages/<name>, and the modules they import, are also
written into that owner's gen/; packages import their own generated files.
See SPEC.md, "One spec tree".
| Source | Output | Written by; kept in Git |
|---|---|---|
spec/**/*.md |
TypeScript core, Quint harness and Dafny under gen/ |
spec gen, spec check; no |
| Generated TypeScript | gen/<name>.effect.vibe; gen/<name>.react.ts (useMachine) in a package that depends on React; driver types in gen/<name>.conformance.ts over gen/_conformance.ts; the machine runtime gen/_machine.ts |
spec gen; no |
A shell importing apply, with no driver |
test/drivers/<name>.ts, a stub to fill in |
spec check; yes, once filled in |
src/**/*.schema.{ts,vibe}, src/**/*.contract.{ts,vibe}, the Schemas of each gen/*.effect.vibe of the package's own areas |
.cache/generated/tests/ |
vibestack/testing/generate.ts, before each package test run on project(); no |
Component props and *.meta.tsx |
Stories, catalog and interaction/accessibility tests in generated/stories/ |
vibestack/stories; no |
packages/design-system/tokens.json |
Theme CSS in packages/design-system/generated/ |
vibestack/design; no |
vibestack/ |
Packaged vibestack / spec CLI and typed subpath exports in dist/ |
pnpm build; no, included in the package |
| The review | spec/lock.json |
pnpm accept, with "signOff": true (the root package.json); spec check once every other stage passes in a project without it, such as vibestack/studio; yes |
| A journey or walk that disagrees with the application | test/counterexamples/<name>/ |
traces; yes, replayed before later walks |
| An exploration that broke a property | Bombadil's run of the page in test/__traces__/bombadil/ |
explore (vibestack/explore.ts); no, replayed first and removed once it breaks nothing |
The adapter and driver types read the generated model; traces uses events
found by the simulator; property tests read schemas and contracts. Generated
outputs are never edited by hand. A driver reaches the real application and
imports gen/ only as types, so it does not compare the model with itself.
Core generation produces deterministic code. It, and the story and property-test
generators, write files only when their bytes change and remove outputs whose
sources have gone: a check that changes no spec leaves gen/ and the owners'
gen/ untouched, so nothing that watches them rebuilds. Whole-tree spec gen
keeps the generated files in memory until every model is valid, then updates
changed files. An invalid edit leaves the existing outputs in use. A check loads
each generated module from its own .spec-cache/run-<number>/, removed when it ends. The first check in a new
process uses the same path so Node can reuse compiled modules. .spec-cache/
remembers each run of Quint (which parses and typechecks a harness once for all its simulations, each run by Quint's
evaluator on the result, in workers that load Quint once and take one typecheck, compile or simulation after another:
vibestack/simulator.ts, keyed by the bytes of that script too), and of LemmaScript and Dafny on a proof, under the program as installed, its arguments and
the files it reads, without their prose, comments and layout (vibestack/action.ts),
and each simulation and proof result under a fingerprint of a spec and its
imports, the versions of the programs beneath (Quint and Node for a
simulation; Node, LemmaScript, Dafny and Z3 for a proof, whose key holds the
whole unit) and the code of only the tools that stage runs: simulate.ts,
units.ts and what they import, or prove.ts and what it imports, each read
as its tokens and line breaks, so that rewording a comment in a tool runs
nothing again. A typecheck reads each module the spec imports only as its
signature (signatureOf in vibestack/units.ts): its declarations
without their bodies and the types and effects Quint inferred for them, so it
starts once the typechecks of what it imports end, and a body edit that keeps
the signature typechecks no spec that imports it. What it remembers keeps no
ids and numbers Quint's fresh type variables again, since both count what Quint
read of the bodies imported. A
simulation cites each rule at the line it is on now, so prose that only moves
the rules simulates nothing again. The programs and their versions are read
for each key, so a process that outlives a reinstall, as watch does, runs and
remembers under the programs installed now. Each tool runs in a process group
of its own, and a check that is interrupted, or that exits, ends each group
still running and the group of each process a tool started outside its own, as
a browser is: no verifier, simulation or browser outlives it. A worker of the
simulator also ends when the process that started it is killed, once the job it
is in ends; one that ends in a job leaves that job unremembered and is replaced
for the next. Once the jobs stop coming, as while a check's later stages run,
the two workers used last wait for the next and any other ends after ten
seconds. None outlives the process of its check: watch and Studio run each
round's check in a process of its own, so each round starts its workers again,
at some 0.3 s of CPU each. A tool stopped
for its time or its output is ended the same way. An unreached simulation goal
or an event its guard never allows cancels the queued proofs started alongside
the simulations. On systems with process groups, it also stops their running
tools. The check reports every simulation and waits for the tools to close
before it releases the project lock. A run
of a tool is remembered when it reached its answer, a refusal of its input
included, never when it was stopped, timed out or failed for want of a file or
program: an unchanged unit whose proof failed runs neither again, and an edit
to a proof file only checks and verifies the Dafny it changes. When several proof units import
the same module, the check renders that module once for each name prefix and citation setting they use.
A unit offered
what the units it imports proved is proved once when their results are
remembered, and meanwhile, to be proved again if they fail, only while one of
them is still being proved. The first attempt starts no further checks of failed
assertions once a finished import removes one of its assumptions. A test run
may run any tool, as Studio's do, so it is keyed by all of them, and with a
typecheck, a driver's run and an exploration by VibeLang's version and bytes.
An exploration is keyed by the code that explores and what its page reads
(pageInputs in vibestack/explore.ts), which holds every tool when the
page runs one, as Studio's does.
Vitest stores transformed test modules per package. That package's installed
lockfile controls when its transforms are cleared.
It also remembers a package's passing test run under a hash of what its tests
read; a driver's passing run under the same hash and the events the simulator
found; and a passing typecheck under the package's files without its Markdown,
Quint and Dafny, its tsconfig.json chain and included files, and each file outside
node_modules that the compiler listed as read. watch checks again when any
file of the root or an owner changes, is added or is removed, outside gen/
and the directories no stage reads (node_modules, build output, saved
explorations, hidden directories), since a missed change would leave a stale
pass on screen; it does not check again for a file the last check wrote
itself, such as a driver to fill in or a saved counterexample, while the file
still holds what it wrote. A change is what a scan of the watched files'
stamps finds since the scan before. A file system watcher's report only
brings the next scan forward; a scan also runs a second after the last, or
fifty times its processor time after it when that is longer, so a report a
busy machine drops delays a run and never loses it. spec.ts turns on Node's compile cache before it
loads the pipeline, and hands its directory to every process a check starts,
so each spec process, Studio's checks, Turborepo's tasks and the tests and
drivers they run included, compiles only the code that changed.
An integration checking disposable project directories can import check
and withFormalCache from vibestack/formal. Run
await withFormalCache(cacheDirectory, () => check(projectDirectory))
in the same Node process. Use a persistent cache directory writable only
by trusted runs. It holds
the completed Quint, LemmaScript, and Dafny actions, keyed by the installed
tools and their inputs. The project directory holds its lock, generated files,
and stage results. An acceptance reuses the results a check remembered for the same
inputs; a nightly check always recomputes them.
To precompute normal-profile simulations for a subset of a disposable project,
use precomputeSimulations(projectDirectory, readSpecs(projectDirectory), moduleNames)
from the same entry point inside withFormalCache. It compiles the selected
modules and their transitive imports, runs the selected simulations and replay,
and returns their verdicts in the requested module order. Treat a failed verdict
or rejection as a failed precomputation. Run the full check with the shared
actions to verify the whole project.
For a transfer between trusted runners, call prepareSimulationReceipts with
the same three arguments and an existing private scratch directory as the
fourth. It returns results and, when all requested simulations passed and
their receipts are complete, seedDirectory. Otherwise partialDirectory
can hold the certified model typechecks and simulation results available from
the run, including reproducible failures. Transfer only the files in the
returned directory. Copy them into the receiving project's .spec-cache
before the full normal check and keep them within the same trust boundary as
other spec cache entries. The check computes its own keys and recomputes a
missing or unreadable result.
Turborepo caches gen, build, typecheck, tests, selftest and lint according
to turbo.json. When a legacy generation config excludes proof paths, the
task entry point includes the spec ownership layout and any Markdown under
those proof-named directories in the generation key. Dependent task keys
follow these changes. The task entry point fingerprints Node, VibeLang, Dafny, Z3
and their runtime files before Turbo hashes its inputs. A build can run
without the verifier. Its task key records missing verification tools,
and a proof still requires them. What it reads of an
installed file, and Dafny's version, is remembered across processes in
$XDG_CACHE_HOME/vibestack (~/.cache/vibestack by default) while the file's
device, inode, size and modification and change times stay the same, so an
unchanged toolchain is not read again, nor Z3 asked its version. A check
reads those times of Dafny's installation once, and reads them again after each
run of Dafny, so a result is not remembered when the verifier was installed
again during the run. The template install generates locally with gen --if-valid.
The install command runs its listed root prerequisite tasks together before generation.
The tooling package sets --skip-gen-on-pack in its prepare script. A
pnpm pack still builds the CLI and Studio. It skips the application's
generated models, which the tools' tarball does not contain.
The three tool selftest jobs in ci.yml run only the listed //#build task and generate their scratch
projects on demand. The packaged CLI test rebuilds from a clean copy of the
workspace. The nightly check builds the tools during install and generates the
application in its nightly task graph. Other GitHub Actions jobs use the same strict root
gen task as verification, so a successful install warms the task cache. A failed generation leaves the
remaining checks runnable and is retried by verification. Generated stories,
browser build artifacts, compiler declarations and successful test receipts
are restored with their owning task. check is never skipped whole: its
driver: programs run the real application in traces every time. Standalone examples install and check separately, with --frozen, so an example whose committed spec/lock.json misses a review fails. The selftest keeps a complete passing run for each example
under its own inputs and the shared toolchain and sources. After an edit to one example, the other examples
can reuse their passing runs. Use pnpm selftest:examples to run every install and check directly.
A complete passing Vitest run records its input fingerprint. check reuses
that result only while its source, generated core, transitive workspace
inputs, lockfile and fixed profile match. The fingerprint covers the package's
files, with the packages nested under its test/ as fixtures but not other
nested packages, and of each workspace: dependency what a dependent can
load: not its spec/, Markdown outside fixtures/, tests, drivers, traces,
counterexamples or nested packages, nor its gen/ unless its code or manifest reaches into it,
nor what git ignores and does not track unless its manifest or the code it keeps names the
ignored file or directory anywhere, with any suffix or in a pattern or template: an export of
./generated/tokens.css keeps all of generated/, while captures no code names stay out,
unlisted. A
package's own ignored files stay in, since its tests may read them by any path. A
file a test reads from elsewhere comes through a declared dependency, as the
root's @repo/design-system does. A typecheck is keyed by the scripts and
JSON alone, and then by the content of every file the compile read. Neither
covers the simulations' traces in gen/traces/, which no test reads and a
check rewrites, the review ledger spec/lock.json, which a check records, nor the prose vibestack init and the tools keep at a package's
top (README.md, AGENTS.md, CLAUDE.md, CONTRIBUTING.md, SPEC.md). Turbo's
//#test inputs cover the same files but the root's Markdown, so a restored
receipt matches unless another root document changed, and then check runs the
root's tests itself. Generated code names each rule by its heading, not its line, so
prose that only moves a rule changes none of these keys. Filtered, exclusive, interrupted
and failed runs record no complete result, nor does a run during which what it reads changed,
as a test that writes the code does; check remembers a test or driver run under the same rule. An acceptance reads these receipts
and the inner verification cache as a check does; the nightly check bypasses them. A package that declares a link:
dependency, or reaches one through a workspace dependency, runs its inner tests, typecheck and
drivers afresh. The linked checkout can supply compiled files and resources outside the
consumer's lockfile. Its project's Turbo tasks can cache those commands when they declare
the external inputs and outputs they use.
The spec cache retains recent branch and profile results for 30 days within
the larger of 256 MiB and three times what a check uses, evicting the oldest
unused results first. A check's own entries are preserved. A checkout's first
check starts from the entries the repository's main worktree keeps, cloned
where the disk can and copied elsewhere: an entry is named by everything that
decides it, and a tool's output is kept relative to the checkout, so an entry
made in another checkout is the one this checkout would make. Each entry's
first line says how it was keyed: its stage, its subject (a unit, a package, a
tool run on named inputs), when it was written, and each part of its key by
name, a long part by its digest. vibestack cache why [--json] pairs each
entry with the nearest earlier one for the same subject and names the parts
that differ, down to a value inside a part that is JSON, such as the
verifier's version, so a result produced again can be explained. Proof
identity covers the verifier and solver contents, so moving an identical
installation does not invalidate it and replacing an executable with the same
version does. The solver is chosen in a fixed order (solverCandidates in
toolchain.ts): one bundled with the Dafny in use, which is the managed one
vibestack doctor --install-dafny installs and CI proves with, then the Z3
installed beside Dafny's launcher, as Homebrew installs it, then the one the
PATH finds; vibestack doctor names the one in use. A Dafny that cannot say
its version has no identity, and nothing is proved or kept under one that
names none. A run of a tool is keyed by none of the tools' code but by
ANSWERS in action.ts, the version of what a kept run holds, so a change to
the tools that leaves the Dafny alone verifies nothing again. Raise it with any
change to what a kept run holds: a selftest records the digest of the code
that decides it, all of action.ts and run.ts but the declarations that only
find, schedule, watch and stop programs (SCHEDULING in cache.ts), and fails
on any change to that code until the digest is recorded again. Tests, drivers
and explorations are keyed by the verifier too,
since they may run proofs, as Studio's do. A process that
outlives a reinstall, as spec watch does for the generation it runs
itself, reads the installed toolchain again on the next run. Simulations and
proofs include the resolved package files
and dependency links for Quint and LemmaScript. Each check shares an installation
inventory across runs of the same tool and validates its files before publishing a batch.
Recognized stock pnpm POSIX tools run in private copies of their declared package
closure with the selected Node interpreter and no ambient module search. The
simulator uses the tool-local Quint copy, which may differ from the CLI version.
Source and private files are checked before publication. Custom launchers, Windows
shims and Node preload options retain ordinary execution without receipt reuse.
The first action, long actions, completed stages and the end of the check flush pending results.
If a concurrent installation changes these files, the check discards the pending results
and retries under the same project lock. It stops after two unsuccessful retries. A
simulation also depends on the bytes of Quint's installed Rust evaluator. A
run that installs its evaluator can produce a result; the next run records it
against the installed binary. The task runner supplies the evaluator fingerprint
to simulation-capable tests and selftests, leaving generation, builds and
typechecks reusable before and after installation. Turbo passes QUINT_HOME
to tasks so they use the selected evaluator. Its bytes determine the fingerprint.
In CI, a Turborepo cache entry is
kept for seven days after its last hit, which the run summary names.
The shared Dafny library is a direct input of the tool package build and the Studio tests that run proofs. An edit to that library leaves the application build keys unchanged.
vibestack/testing/profile.ts is the one source of the fixed profiles:
| Invocation | Values per property and maximum driver walks | Seed | Seconds exploring each page |
|---|---|---|---|
| normal local checks and every pull request or push | 1,000 | 1 | 60 |
pnpm all check -- --nightly |
20,000 | 2 | 300 |
A driver's options.walks can impose a smaller maximum for an expensive
journey. Quint mixes the selected profile's seed into its model-derived
seeds. The nightly command always performs fresh verification; it does not
reuse an earlier nightly pass. FUZZ_RUNS and FUZZ_SEED do not configure
these checks. A failing property prints its fixed-profile replay command;
a driver's shrunk counterexample is saved and replayed on every later run
(SPEC.md, "Conformance").
Exploring a page is bounded by time, Chrome's start included, not by a count, and Bombadil takes no seed: two runs try different actions. What a failing exploration found is saved and replayed instead (SPEC.md, "Exploring the page").
AGENTS.md, "Tests" defines what earns a test and the rules
check enforces. apps/app has each kind.
| Kind | Checks | Source or example |
|---|---|---|
| Formal | Rules and laws for every state and input | spec/app/; .proof.dfy where Dafny needs help, such as spec/app/echo.proof.dfy and src/greeting.proof.dfy |
| Model-based | Real shell or UI against the spec: journeys, deterministic transition-covering paths (accepted and refused), malformed input, walks and saved counterexamples | test/drivers/app.ts and the recorded test/traces/app.jsonl, run by traces; planModel and runModel from vibestack/testing in Vitest Node and browser tests (test/app.browser.test.tsx) |
| Journey/integration | A story through real services, including what a driver cannot see | @effect/vitest in test/app.test.vibe: reload from storage |
| Component/browser | Story interactions and accessibility; browser-only behavior such as focus and storage | Component metadata play; test/app.browser.test.tsx in Chromium |
| Exploratory/browser | The served page under random clicks, typing, scrolling and reloads: no uncaught error, console error or failed request, and the properties each rule gives the page, in every state reached | test/bombadil.ts, or nothing for Bombadil's defaults; apps/app/test/bombadil.ts, run by explore |
| Property | What a schema or declared contract promises for generated values | Generated from src/link.contract.ts and other *.schema.* or *.contract.* files, and from the Schemas of each gen/<name>.effect.vibe |
A generated test asserts its schema or contract, never a recorded result of
its implementation. A schema without a derivable generator is reported; a
module yielding no tests fails its package's test run with the reason.
Effect's Arbitrary produces valid values: a driver's receive checks
malformed events, and journeys cover other invalid inputs that matter.
Disabled/loading stories test refusal of clicks and keys. Tests do not
compare screenshots.
| Result | Establishes | Does not establish |
|---|---|---|
| Proved | Dafny proved the obligation for every state and input | Code outside the spec and //@ files |
| Simulated only | No sampled trace broke an obligation accepted with pnpm accept unproved |
A proof |
| Model checked within bounds | No violation in the traces and depth checked | Behavior beyond those bounds |
| Runtime tested | The journeys, properties, conformance walks and explorations that ran passed | Untested inputs |
| Not verified | Effects, timing or third parties outside test coverage | An assurance about those behaviors |
Asynchronous Effect programs are tested, not proved. Each proof line says
how many obligations are proved and how many are simulated only.
ESLint enforces workspace barrel exports (barrel/exports on workspace
package.json manifests, including publishConfig.exports, and
barrel/no-subpath-imports on code files, via withWorkspaceBarrels and
vibestackConfig in vibestack/eslint.ts with allowExports / allowImports ratchets for
adopting repositories) and the stack boundaries, and in apps/ and
packages/ the code rules of AGENTS.md, "Writing code": no comment but a spec
citation or tool directive, no effect hook, timer or console, and no inline
config but a reasoned eslint-disable of another rule. commented and
scheduled in eslint.config.js give each file that still breaks them the
count it may keep; one more fails, and cleaning a file lowers or deletes its
entry. Given eslint-plugin-react-refresh as refresh, vibestackConfig
also holds each .tsx module of the project's own code, outside test/,
to exporting components only (react-refresh/only-export-components), so
that Fast Refresh keeps a component's state across an edit instead of
reloading the page. Knip finds unused files, exports and dependencies,
reading .vibe and .vibex through VibeLang's compiler. Madge checks cycles in .ts and .tsx imports. jscpd fails on any
duplicated block of code outside the examples and test fixtures. Their
configured scopes are in knip.config.js, .madgerc, .jscpd.json and
eslint.config.js.
| When | Runs |
|---|---|
Pull request or push to main or develop |
verify runs pnpm no-bun, build, types, tests, browser tests, all checks, ESLint, Stylelint, Knip, Madge, jscpd and the docs and examples self-tests with up to four concurrent Turbo tasks on the four-core hosted runner and --continue=dependencies-successful. It starts beside the four simulate-* shards rather than after them, builds the pin, then waits for the shards of the same run and imports their receipts before its one Turbo run. In parallel, selftest-a, selftest-b and selftest-rest run the three tool self-test tasks, on a pull request only when it changes an input of theirs. |
Every push to main or develop, and a pull request into either that touches the app, packages, Android or the pin |
Android builds and audits the launcher APKs and runs their JVM unit tests; a newer push to a pull request cancels its run. A main push queues its launcher release only after this run passes. |
Pull request to main from develop or a promote/* branch, or on demand |
Promotion runs the full verification without cached receipts, on eight fresh simulation shards. |
PR merged into main or develop |
The retirement workflow cancels any active run of ci for that PR. |
| Nightly | Every check fresh under the fixed nightly profile; saved counterexamples become a pull request into the branch the run checked, or the default branch for a tag run. Beside it, the three selftest:tools tasks without the selftest's shared tool runs |
Successful CI for a canonical main push |
Opens or resumes the draft for the reserved version. Alpha builds and signs the APK, verifies its public download, then moves the launcher manifest and records the published version. Releasing |
Successful launcher publication or reconciliation on main |
Queues the GCP Pixel build and signing run with the published APK embedded. |
| Successful production Pixel signing | Queues OS publication. GitHub serves the signed whole OTA on os-pilot and the versioned release lists it alongside the APK, fastboot image, AVB public key and release index. A whole OTA of 2 GiB or more holds publication. Pixel release handoff |
GitHub may require a maintainer with write access to approve workflow runs from a fork before jobs start. The workflow run page shows when approval is required or has expired.
This repository runs its root specs in the ordinary check. Consumer
workflows using the four simulation jobs balance modules across shards with
longest-processing-time bin-packing (using structural complexity by default, or
an optional --weights <json> map, with --list to inspect the assignment). Each
shard can fill gaps in its restored spec cache from a previous run of the same
shard layout and lockfile. When a pull request starts native simulations, it
can also read that shard’s published receipts from the push to its exact base
commit while ordinary verification runs. Queued models can reuse receipts
that arrive before they start. A missing or unavailable archive leaves the
ordinary computation running. When the shard produces new simulation
aggregates, it saves its certified snapshot for later runs, even if a rule
failed. A late import only needs another save when its final snapshot has
no visible cache with the same content fingerprint. It also
transfers the available receipts to the ordinary check and reports failures.
The check keeps its restored receipts, imports missing keys on which the shards
agree, and computes the rest.
In the canonical ci.yml workspace, simulation precompute installs the root
tool workspace's production dependencies. The root prepare script leaves
application builds and generation to verification.
Each row's budget is in Seeds and budgets. A failing
run keeps test/counterexamples/ and test/__traces__/, where a broken
exploration is, as an artifact.
The run summary lists Turbo task times, cache status and exit codes.
Each run installs Dafny from its pinned release, checked against its SHA-256,
and restores pnpm's store, Quint's evaluator, and what the job adds to: a selftest-* job the selftest's shared
tool runs, any other the spec cache of the root, each workspace package and each example. The key is of the job, the
lockfile and the commit. A job tries both key layouts for its own name and current lockfile, then tries the current
layout for another lockfile. Selftest jobs on pull requests first try an archive for that pull request and lockfile.
A successful replay of the entire fixture task can reuse that archive when setup leaves the cached evaluator intact.
Fixture jobs restore their pull request’s Turbo archive before the shared fallback. A full replay keeps that archive when the cached files stay unchanged and no files need pruning. Turbo refreshes its checkout-specific restore manifests locally.
Each entry is named by the tools and inputs that produced it, so a job reads only the entries that still apply.
Nightly jobs restore the pinned Quint evaluator and run with fresh verification
results.
The default branch's verify job publishes the pnpm store after the frozen
install. All jobs can restore it by the same lockfile key. This cache holds
public packages only because fork pull requests can read it.
Turborepo shares task results through the private Cloudflare/R2 cache.
The task entry point disables Turbo telemetry. On a shared machine, each selftest:tools task waits for the root and
Studio tests. In CI, the verify job owns those integration tests. Each dedicated shard runs with Turbo's
--only after setup has built the toolchain. Its cache key covers its own declared source inputs.
CI verification installs the headless shell for Playwright. An exploration
or replay that runs Bombadil installs full Chromium on first use. CI shard A
installs full Chromium when its Bombadil journey runs. Its nightly job installs
it during setup. The other tool shards run without a browser. Release installs
both browsers during setup.
Release runs the prerequisite tasks once, then uses the same isolated shard keys as CI.
Pull requests read shared results; only branch pushes receive the publishing
credential, protected by the turbo-cache-publish environment's branch
policy. A pull request keeps its own Turborepo results in the GitHub cache
instead, which only that pull request reads, so its next push reuses them. Newer commits replace an older run of the same pull request.
When TURBO_TOKEN is unavailable, CI uses Turborepo's local cache. Branch
pushes also restore and save that cache in GitHub Actions, so a new
repository can reuse completed tasks before configuring a remote cache.
A job restores only the Turborepo results a job of its name saved.
Pushes to one branch run one at a time. A run that has started finishes and
shares its completed tasks through the cache, and the newest pushed commit
replaces any run still waiting. Re-run a specific commit when you need the
results for that revision; a re-run starts at once.
Local pnpm task commands read the operator's cache credential from
~/.config/vibestack/turbo-cache.json, outside the repository. Credentials
are never part of a task fingerprint.
The standalone examples are the tools' own subjects: pnpm selftest installs
each from its own lock file and runs its check, its page explored where it
has one. An application built on the tools never checks them: its check
reaches only its own packages, and the packed toolchain carries no example.