Skip to content

Latest commit

 

History

History
361 lines (281 loc) · 34 KB

FURPS.md

File metadata and controls

361 lines (281 loc) · 34 KB

Scaffold — FURPS+

FURPS+

Functionality

  1. One public DevNet vertical slice: generate wallet, fund wallet, deploy contract, execute one transaction type, verify result. (Not implemented; the slice exists for localnet only. See Revisions R1.)
  2. Integrate wallet generation as part of the scaffold workflow for bootstrap and interaction flows.
  3. Support native token topup for wallet operations on local and DevNet environments. (Localnet and test nodes only. See R1.)
  4. Deploy command auto-discovers program binaries by matching program names across scaffold's deterministic target/riscv-guest-docker/ output, the canonical workspace target/riscv-guest/ layout, the sub-crate methods/target/ compatibility layout, and methods/guest/target/ (cargo risczero build / spel make build), so non-template projects deploy without --program-path. Deterministic docker/ output ranks first only in the root the project kind owns (target/riscv-guest-docker/ for default, methods/guest/target/ for spel).
  5. Build command auto-compiles methods/Cargo.toml when present, so projects whose parent workspace excludes the Risc0 guest crate produce guest binaries via lgs build without a separate cargo build --manifest-path methods/Cargo.toml. (This is now the [build].guest = "local" path. The default is the container build in #10, and spel projects build through make build. See R2.)
  6. Deploy outputs the deployed program's on-chain ID (the risc0 image ID) for every successful submission, in both the human-readable output and the --json output, so users can hand the value to a client without rerunning a separate inspection tool. The value is computed locally from the submitted ELF; on-chain inclusion verification is future work and depends on LEZ exposing deploy receipts.
  7. (Location and pins revised. See R3.) Scaffold vendors the spel CLI per project — clones logos-co/spel to a project-local path, pinned via [repos.spel] in scaffold.toml, and builds it during setup — mirroring the LEZ vendoring pattern. deploy invokes the project-local binary; no global spel install is required. The default spel pin is selected so spel itself vendors the same LEZ commit scaffold pins; doctor enforces this alignment at runtime by inspecting spel-cli/Cargo.toml and warning if spel's vendored LEZ diverges from DEFAULT_LEZ_PIN.
  8. logos-scaffold spel -- <args...> (and the lgs spel -- <args...> alias) proxies trailing arguments to the project-vendored spel binary, so any spel command (inspect, pda, generate-idl, etc.) runs against the project's pinned version without a global install. Exit codes are forwarded.
  9. logos-scaffold deploy --json output is a pure JSON object on stdout — no command-echo, no informational text — and absent values are omitted from the object rather than emitted as null. Consumers can pipe directly to jq and test field presence with has(...). Subprocess command-echoes and progress messages stay off the JSON channel. Two shapes by code path: --program-path … --json emits a bare object {"status":"submitted","program":...,"tx"?:...,"program_id"?:...}; auto-discovery --json emits {"deploys":[<entry>,...]} with one entry per attempted program. Failed entries replace program_id with error. Auto-discovery exit code is non-zero when any entry failed; the JSON object is still emitted so consumers can inspect partial results.
  10. Guest programs can be built reproducibly. [build].guest = "docker" (the default; also lgs build --guest docker) compiles methods/ guests with cargo risczero build inside the pinned risczero/risc0-guest-builder:<tag> container, so the same source produces the same ELF — and therefore the same program_id — on any machine or CI runner. This is the default. [build].guest = "local" (or --guest local) opts into the host-toolchain embed_methods() path, which is faster and needs no container runtime but is not bit-reproducible; lgs doctor reports the active strategy. lgs deploy prefers the deterministic artefact, and each lgs build clears the other mode's output, so the last build is always what deploy ships.

Usability

  1. Single command bootstrap with no manual project wiring required.
  2. Generated layout clearly separates contract code, client code, config, and deploy scripts.
  3. Deterministic wallet generation and .env handling for repeatability. (Superseded. See R4.)
  4. Clear happy-path docs, reproducible setup, discoverable commands.
  5. CLI prints underlying commands for each step so users can drop down to lower-level tooling.

Reliability

  1. The vertical slice must succeed 3 times in a row on a clean machine with deterministic wallets.
  2. Local network can be started and torn down in isolation without modifying host-global blockchain state.

Performance

  1. Each workshop step must complete within a demo-tolerable threshold (a few minutes).

Supportability

  1. Scaffold version and toolchain versions are explicit in generated output so projects remain buildable over time.
  2. Network configuration for local and DevNet deployment is .env based config. (Superseded. See R1.)
  3. The scaffolded project includes command references for build, deploy, and interaction steps.
  4. logos-scaffold doctor reports the spel repo presence and pin status, mirroring the existing LEZ checks, so drift from DEFAULT_SPEL is surfaced before it bites at deploy time.
  5. scaffold.toml files predating the [repos.spel] section produce a targeted error from the config loader pointing at logos-scaffold init as the fix; init is safe to re-run and back-fills the missing section without overwriting customized fields.

+ (Privacy, Anonymity, Censorship-Resistance)

  • Local workflow does not require uploading source code, artifacts, or private keys to third-party services.
  • CLI interaction flow works with locally controlled wallet keys and does not require custodial key management.
  • Local development and testing can run fully offline from public networks.
  • DevNet interaction uses explicit wallet and RPC configuration so developers can avoid accidental cross-network key reuse.

Dependencies

Internal Dependencies

  • Logos Core DevEx for overall developer journey alignment and terminology.
  • Logos Blockchain and Logos Execution Environment for functionality.
  • Wallet Module for interactions with Logos Execution Environment.
  • logos-co/spel CLI — vendored per project at a pinned commit (DEFAULT_SPEL; was tag v0.2.0-rc.5 when written, now v0.7.0, see R3); supplies the spel program-id output that deploy parses for the program ID.

Runtime Dependencies

  • Local network runtime availability for local deploy and interaction workflows.
  • DevNet RPC endpoint availability and stable chain configuration. (Not applicable until DevNet support exists. See R1.)
  • Deterministic local/DevNet account and chain configuration via environment files.

Wallet Dependencies

  • Wallet available for signing transactions initiated by CLI interaction commands.
  • Network-aware wallet configuration to prevent cross-network key misuse.

FURPS+ — lgs run

Functionality

  1. lgs run collapses the inner-loop sequence — build → IDL build → ensure-localnet → wallet topup → deploy → optional post-deploy hooks — into one command. Every step's failure aborts the pipeline with a numbered step header ([3/N] …) so the failing phase is unambiguous in console output. Step ordering is fixed, but a run profile may opt out of the two steps a project can own itself: topup = false skips wallet topup and deploy = false skips deploy. A skipped step keeps its slot and prints a header saying it was skipped, so the pipeline shape stays visible and step numbers do not shift.
  2. Source edits drive fresh on-chain program identity automatically: when the guest ELF changes, its risc0 image ID changes, and the new program's storage starts empty. Scaffold relies on this for the default cycle and adds no per-run reset.
  3. Post-deploy hooks: [run].post_deploy is a list of shell commands executed in order via sh -c with cwd set to the project root. Hooks see a documented env contract: SEQUENCER_URL, NSSA_WALLET_HOME_DIR and LEE_WALLET_HOME_DIR (the same wallet home under both the pre-v0.2.0 and v0.2.0 LEZ names), SCAFFOLD_PROJECT_ROOT, SCAFFOLD_IDL_DIR, SCAFFOLD_TOPUP_SKIPPED and SCAFFOLD_DEPLOY_SKIPPED (1/0, always set, reporting whether each step ran on this invocation for any reason — a config knob such as topup = false / deploy = false, or deploy's own unchanged-inputs dedup — not whether a knob was set), plus single-program shortcuts SCAFFOLD_PROGRAM_ID / SCAFFOLD_GUEST_BIN (set only when exactly one program is deployable).
  4. CLI overrides: --post-deploy <cmd> (repeatable) replaces [run].post_deploy for one invocation. --no-post-deploy skips hooks entirely. The two flags conflict and are rejected at clap parse time.
  5. Localnet reuse: if a managed sequencer is already running, the run reuses it. If the configured port is held by an unrelated process, the run aborts with a diagnostic naming the foreign PID.
  6. Topup safety: a wallet-topup confirmation timeout aborts before deploy so the developer is never left wondering whether deploy used a half-funded wallet.

Usability

  1. The command produces a single human-readable output stream with numbered step headers and one-line summaries per phase. No JSON output flag — --json is reserved for deploy's programmatic consumers. (run still has no --json, but --json is no longer deploy-only. See R5.)
  2. The single-program shortcuts (SCAFFOLD_PROGRAM_ID / SCAFFOLD_GUEST_BIN) cover the most common dogfooding shape (one guest program per project) without leaking ambiguous values into multi-program projects — they're unset when the project has more than one deployable program.
  3. Hook log markers (===> post_deploy[i/n]: and <=== post_deploy[i/n] OK) frame each hook's stdout for grep-friendly log reading.

Reliability

  1. The conflicting flag pair (--post-deploy --no-post-deploy) is rejected at parse time, not silently coerced.
  2. The pipeline anchors itself at the discovered project root: lgs run from a subdirectory builds and deploys from the project root, not from cwd.

Performance

  1. The run is bounded by the underlying tools (cargo build, IDL test harness, sequencer startup, wallet topup, wallet deploy-program); scaffold adds no waiting steps beyond what each underlying command already imposes.
  2. Single-program metadata (program ID, guest binary path) is resolved once per invocation and reused across every post-deploy hook, so multiple hooks don't multiply spel program-id cost.

Supportability

  1. [run] round-trips cleanly through parse_config / serialize_config. Default values are omitted from the serialized output to keep diffs minimal.
  2. The hook env contract is documented in docs/configuration.md and validated by unit and integration tests in src/commands/run.rs::tests and tests/cli.rs.
  3. Flag-conflict rejection messages list the conflicting flags and exit non-zero, matching clap's standard error format.

+ (Privacy, Anonymity, Censorship-Resistance)

  • Hooks run locally with the developer's own wallet; no network egress beyond what the deploy step already needs.
  • Post-deploy hooks have direct access to the deployer's wallet home via NSSA_WALLET_HOME_DIR and LEE_WALLET_HOME_DIR. Hooks are user-authored and trusted — same threat model as scaffold.toml itself.

Dependencies

Internal Dependencies

  • cmd_build_shortcut for the build phase.
  • build_idl_for_current_project for IDL generation (SPEL projects generate their IDL inside build; only legacy lez-framework projects run it as a separate step, and default projects skip it).
  • cmd_localnet (start) for localnet lifecycle when no managed sequencer is already running.
  • cmd_wallet_topup_inner for the topup phase.
  • cmd_deploy for deploy submission and extract_program_id for image-ID extraction.

FURPS+ — Basecamp

Functionality

  1. Fetch and build a pinned basecamp (nix build '.#app') and pinned lgpm as project-local artifacts, in the same pin-isolated cache layout used for LEZ.
  2. Pre-seed two isolated basecamp profiles (alice, bob) per project for p2p dogfooding. (Custom profiles are also supported. See R7.)
  3. Build and install the project's .lgx module(s) into one or both profiles via lgpm, with source resolution that follows the .#lgx flake-output convention used by existing modules.
  4. Launch basecamp for a named profile with clean-slate semantics: kill any prior process tree for that profile, scrub the profile directory, reinstall recorded .lgx sources, and exec basecamp with profile-scoped XDG_* environment.
  5. Set per-profile values for each module's documented port-override env vars on launch (names owned by each module), so multiple profiles can coexist without port collisions on the same machine. (Not implemented. See R8.)
  6. basecamp build-portable builds the project's .#lgx-portable flake outputs (the variant that loads cleanly into a release basecamp AppImage), orders them topologically by metadata.json dependencies so leaves load first, symlinks the results into <project>/.scaffold/basecamp/portable/ with names carrying the load order, and prints those symlink paths. The wipe-and-recreate on every run keeps the staging dir idempotent.
  7. Source resolution for build-portable reuses the same auto-discovery + --path / --flake escape hatches as install, but targets #lgx-portable instead of #lgx.
  8. scaffold.toml gains one [modules.<module_name>] sub-section per captured module, with flake and role (project | dependency) fields. The collection of these sub-sections is the sole source of truth for the captured module set; basecamp.state holds only derived artefacts (pin outputs, binaries). Sub-section form fits scaffold's existing line-oriented TOML parser — no inline tables.
  9. basecamp modules writes [modules] during capture. For each captured source, the command derives module_name as follows:
    • path: flake ref → read <flake-path>/metadata.json, use .name. Deterministic.
    • .lgx file path → read metadata.json from the sibling directory if present; otherwise fall back to the filename stem.
    • github: flake ref → heuristic: strip logos- prefix from the repo stem, replace - with _. Printed at capture time with an assumption note (see Usability 7).
  10. Dep resolution walks each project source's metadata.json dependencies array and, for each declared name:
    • Already keyed in [modules] → no-op (already covered, irrespective of role).
    • In BASECAMP_PREINSTALLED_MODULES → no-op (basecamp ships it).
    • Not covered → resolve a flake ref via the declaring source's flake.lock, then the scaffold-default pin table. On success, insert into [modules] with role = "dependency".
    • Unresolved after all fallbacks → fail with a targeted error naming the two user-side fixes (capture as project source, or add an explicit dependency entry). No silent skip.
  11. [basecamp.dependencies] (the legacy override table) is removed. Its role is subsumed by explicit role = "dependency" entries in [modules].

Usability

  1. basecamp setup is opt-in — it is never triggered implicitly by new, the top-level setup, or build.
  2. When install or launch run without prior basecamp setup, the CLI prints a single one-line hint pointing at the required command instead of erroring with a raw subprocess trace.
  3. When only .#lgx-portable is found on a project, the CLI fails explicitly, names the missing .#lgx output, and suggests --flake <ref>#lgx-portable for explicit opt-in.
  4. Commands follow the existing logos-scaffold CLI idioms (subcommand groups, --help output, project-context errors).
  5. Projects exposing only .#lgx (no .#lgx-portable) receive a targeted hint naming the missing attribute and suggesting --flake <ref>#lgx-portable for explicit opt-in — mirror of the install failure mode, in reverse.
  6. build-portable stages a user-facing mirror of every built artefact as a symlink under <project>/.scaffold/basecamp/portable/<NN>-<module_name>.lgx. The two-digit NN is the load-order index so a file-browser lists the artefacts in the exact order basecamp needs to load them — the AppImage's "install lgx" picker sees human-named files in the right order rather than opaque /nix/store/…-source/… paths. Nix's own ./result-lgx-portable symlinks still land next to each flake; the scaffold-owned dir is a separate concern layered on top.
  7. For each github: flake where scaffold derives module_name from the repo slug, basecamp modules prints exactly one assumption note at capture time: the flake ref and the inferred module_name, with "edit [modules] in scaffold.toml if wrong." One-time UX cost, never repeats.
  8. scaffold.toml is human-editable at all times. basecamp modules is idempotent: if a key already exists in [modules], its module_name and role are preserved (user intent wins over auto-derivation).
  9. Unresolved dep diagnostics are a fail-fast error at basecamp modules time — the dep name must resolve to an entry in [modules], a metadata.json source flake-input pin, the scaffold default pin table, or the basecamp preinstall list, otherwise the command exits non-zero before writing any state. No warn-and-skip path for required deps; an optional_dependencies entry that resolves nowhere is skipped with a note, since basecamp loads the module without it.
  10. No migration path for the captured module set: the whole basecamp subcommand is unreleased. Users on earlier iterations re-run basecamp modules against a fresh scaffold.toml. (Superseded. See R9.)

Reliability

  1. Two basecamp launch invocations for different profiles on the same machine run concurrently without colliding on XDG paths, p2p identity keys, or module ports (subject to modules honoring the external port-override contract).
  2. basecamp setup is idempotent when the pinned commit is unchanged: no rebuild, no reseeding, no state mutation.
  3. basecamp launch <profile> produces a reproducible profile state — clean-slate on every invocation.
  4. rm -rf during scrub targets only paths under <project>/.scaffold/basecamp/profiles/<name>/.
  5. build-portable writes only under <project>/.scaffold/basecamp/portable/ (a wiped-and-recreated staging dir of symlinks into the nix store), never invokes lgpm, and never touches basecamp.state or the alice/bob profile trees — so a failed portable build cannot corrupt install/launch state.
  6. Dep resolution is deterministic given the same scaffold.toml and source metadata.json files — no reliance on github repo naming conventions, no string substring matches, no ordering dependencies.
  7. basecamp modules writes to scaffold.toml atomically (write-temp-then-rename) so a crash mid-write cannot corrupt an otherwise-valid scaffold.toml.
  8. Re-running basecamp modules with an unchanged project set is a no-op against scaffold.toml contents; hashes of the serialized section match byte-for-byte on re-entry.

Performance

  1. basecamp install completes in the low-seconds range with a warm Nix cache; cold first-run wall-clock is bounded by upstream nix build '.#lgx' time.
  2. basecamp setup first-run wall-clock is bounded by upstream basecamp + lgpm build time; re-runs on unchanged pin are effectively instant.

Supportability

  1. logos-scaffold doctor gains a basecamp section when .scaffold/basecamp/ exists, covering binary presence, profile integrity, and installed-module state. (These checks live in basecamp doctor. See R10.)
  2. Basecamp and lgpm pinned commits are explicit in scaffold.toml, and the defaults move as a set: scaffold's default lgpm rev is the one the pinned basecamp release locks, because the app embeds that same package-manager library to read what lgpm installed. Scaffold supports one basecamp release at a time (currently 0.3.0): setup moves a project still on a retired default pin set (and captured default companion flakes) to the current one and says so; any pin that is not exactly one of scaffold's retired defaults is kept until the user edits both and re-runs setup. A deliberate pin to a retired default is moved too — scaffold cannot tell it from a left-behind one.
  3. .scaffold/state/basecamp.state is plain-text and line-oriented, matching existing scaffold state conventions.
  4. Dogfooding scenarios (B1–B4 in DOGFOODING.md) cover setup, single-instance, multi-instance p2p, and clean-slate behaviors. (Now the BCSETUP, BCMOD and BCLAUNCH scenarios in .dogfooding/features/. See R10.)
  5. build-portable's manual load-into-AppImage step is explicit: scaffold stages browsable symlinks under .scaffold/basecamp/portable/ but does not know or auto-feed the AppImage's install dialog. The AppImage lifecycle is intentionally outside scaffold's scope — see ADR "AppImage Path is Outside Scaffold's Scope".
  6. Known limitation: multi-sub-flake projects must unify transitive logos-module-builder references via inputs.<dep>.inputs.logos-module-builder.follows = "logos-module-builder". Without it, install can fail via the overridden sibling's lock even when a direct nix build succeeds. Documented fully in docs/basecamp-module-requirements.md; expected to become obsolete once upstream logos-module-builder scaffolding emits this follows automatically.
  7. Assumption notes from Usability 7 are printed to stderr (not the captured log), so pasting them into a bug report is straightforward.
  8. scaffold.toml diffs in version control surface module-identity changes as explicit, reviewable edits — same footing as any other project config change.
  9. Known limitation: modules must be packaged by logos-module-builder 0.3.0 (or nix-bundle-lgx against the same SDK set) — scaffold supports basecamp 0.3.0 only. The pinned lgpm validates package structure and Merkle content hashes on install, which tutorial-era .lgx files do not carry; install surfaces that as a targeted hint rather than a bare exit status. Scaffold deliberately does not pass --allow-unsigned to work around it — that would disable the same validation basecamp itself performs.

+ (Privacy, Anonymity, Censorship-Resistance)

  • Per-profile isolation of p2p identity keys: fresh profile directory produces a fresh libp2p / Waku identity with no cross-profile leakage.
  • No state mutation outside the project's .scaffold/ directory — the user's global Logos state is never touched.
  • No telemetry, no upload of module artifacts, identities, or profile state to third-party services.

Dependencies

Internal Dependencies

  • Logos Basecamp (dev variant only).
  • Logos Package Manager (lgpm).
  • Module repositories (delivery, storage, etc.) exposing env-var overrides for every listening port, with env var names chosen and documented by each module; tracked via upstream issues (e.g., logos-delivery-module#18).
  • Module metadata.json schema: name (string), dependencies (array of strings). Already documented in docs/basecamp-module-requirements.md.

Runtime Dependencies

  • Nix with flakes enabled on the developer machine.
  • Qt build toolchain (supplied via the basecamp flake dev shell).
  • Unix-like OS (Linux, macOS). Windows is out of scope.

Module Dependencies

  • .#lgx flake output on the project (or sub-flakes) — .#lgx-portable-only projects fail explicitly until they expose .#lgx.
  • .#lgx-portable flake output for any module the developer wants to test against a basecamp AppImage. Projects without it get a clear error from build-portable, not a silent miss.
  • Modules that bind sockets must honor external port override via env var (names chosen by each module) for multi-instance launch to be fully useful.

FURPS+ — Revisions (scaffold 0.4.1)

The sections above describe requirements as they were written. This section records where the shipped product has moved away from them, and the requirements it has gained since. An item marked (Superseded …) or (… See R#) above is governed by the matching entry here. .dogfooding/ and docs/commands.md are the operational detail.

Corrections

  • R1. No DevNet target. Scaffold targets project-local sequencers only: the localnet developer sequencer and test-node instances. No DevNet profile, RPC configuration or deploy path exists. The network configuration lives in scaffold.toml ([localnet].port) and the wallet config under [wallet].home_dir, not in env files. The generated .env.local carries only RUST_LOG and RISC0_DEV_MODE. The DevNet items in Functionality 1/3, Supportability 2 and the DevNet RPC runtime dependency remain open goals, not shipped behavior.
  • R2. Guest build producers. [build].guest = "docker" (Functionality 10) is the default. The host cargo build --manifest-path methods/Cargo.toml path of Functionality 5 runs only under [build].guest = "local". spel projects (framework.kind = "spel") ignore [build].guest and always build their guest through make build (cargo risczero build in Docker).
  • R3. spel location and pins. By default spel is cache-managed, not project-local: it is checked out at <cache_root>/repos/spel/<pin>, with [repos.spel].path left empty so scaffold.toml stays portable. It is cloned into .scaffold/repos/spel only for --vendor-deps projects or when [repos.spel].path is set. The current defaults are spel v0.7.0 and LEZ v0.2.4. The alignment rule (spel vendors the same LEZ that scaffold pins, which doctor checks) still holds.
  • R4. Default wallet seeding. Seeding is deterministic only when the pinned LEZ debug wallet config ships a preconfigured account. LEZ v0.2.x ships none, so setup runs the wallet once to create its storage and adopts the first public account it lists. That is freshly generated key material, protected by LOGOS_SCAFFOLD_WALLET_PASSWORD. From LEZ v0.2.4 every wallet command needs a running sequencer, so with no localnet up seeding is reported as deferred and completes on the next run, or on the next setup/build with localnet up.
  • R5. --json is not deploy-only. Machine-readable output is available on doctor, localnet status, localnet logs, wallet list, wallet topup, basecamp doctor, basecamp paths, and every test-node subcommand, as well as deploy. run still has no --json.
  • R6. lgs run options. In addition to Functionality 1–6 of lgs run:
    • deploy is skipped when guest binaries, IDL, config and the sequencer instance are unchanged (state in .scaffold/state/run_deploy.json);
    • --profile NAME selects a [run.profiles.<name>] pipeline;
    • --reset wipes sequencer state and the wallet and re-seeds before the run, and --no-reset overrides a config default;
    • --watch re-runs the pipeline on file changes, filtered by [run.watch] include/exclude globs with a debounce;
    • --localnet-timeout bounds the localnet start (default 120 s).
  • R7. Custom basecamp profiles. Besides alice and bob, any [basecamp.profiles.<name>] whose name is a single safe path component launches the same way. Profiles can set env_file, runtime_dir, log_file and an inline env. [basecamp.env] and [basecamp.env_append] apply to every profile.
  • R8. No per-module port overrides yet. basecamp launch exports no module port-override env vars, because no module has published names to set. [basecamp].port_base / port_stride are reserved: they are parsed and round-tripped so existing files stay valid, init does not write them, and nothing uses them at launch. Until a module publishes override names, a project gives each profile its own port through [basecamp.profiles.<name>.env]. Isolation between concurrent profiles comes from per-profile XDG dirs, HOME, LOGOS_USER_DIR and a private runtime dir. A module-level port collision belongs to the owning module.
  • R9. Basecamp migration exists. basecamp has shipped. init migrates the pre-0.2.0 [basecamp.modules.*], [basecamp].pin, .source and .lgpm_flake to [modules.*], [repos.basecamp] and [repos.lgpm]. basecamp setup moves projects off retired default pin sets (ADR "Scaffold Supports One Basecamp Release").
  • R10. Basecamp diagnostics and coverage. Basecamp health checks are reported by basecamp doctor, not by the top-level doctor. Dogfooding coverage is the BCSETUP, BCMOD and BCLAUNCH scenarios in .dogfooding/features/. That adds artefact builds by variant (BCMOD-005), the standalone run loop (BCMOD-007), and pin-set checks that need no app build (BCSETUP-007).

Added requirements

Functionality

  • A1. Circuits are project configuration. scaffold.toml [circuits] pins the logos-blockchain-circuits release. setup, build, build idl, localnet and test-node startup download it into [circuits].install_dir (default .scaffold/circuits) on first need. LOGOS_BLOCKCHAIN_CIRCUITS overrides it with a local checkout. Ambient ~/.logos-blockchain-circuits/ is not consulted.
  • A2. Test nodes. test-node runs isolated, short-lived sequencers for integration tests. Each has its own port, config, database, log and runtime dir under .scaffold/test-nodes/<id>. They follow the caller project's LEZ and circuits pins, and each resolved value reports its origin. Caller-provided LEZ checkouts are validated, never mutated. Test nodes offer typed reads with structured outcomes: transaction outcomes, classified blocks, clock state, block-scoped account and proof reads, and exact-state seeding. These are also available as api::testnode.
  • A3. Localnet reset. localnet reset stops the sequencer, clears chain state, restarts it and verifies block production. It requires --yes unless --dry-run is passed. --reset-wallet also deletes the project wallet.
  • A4. Paced multi-program deploys. deploy submits one program per sequencer block, because the pinned LEZ panics on blocks whose inscription exceeds about 896 KiB. A stalled head aborts the remaining submissions with a non-zero exit instead of batching them. LOGOS_SCAFFOLD_DEPLOY_PACING_TIMEOUT_MS raises the ceiling.
  • A5. Verified prebuilt sequencer. setup --prebuilt installs a downloaded sequencer_service only if it matches the published sequencer_service.sha256. A missing or unusable checksum falls back to a source build, and a mismatch is a hard error.
  • A6. AI skills in every project. new, new --template spel and init install the canonical lgs-cli, lez-template, spel-template and basecamp skills into .claude/skills/ and .cursor/rules/, with an AGENTS.md index. They are version-controlled. Re-running init refreshes them idempotently and touches only those four names.
  • A7. Library surface. logos_scaffold::api exposes setup, localnet, wallet, deploy, doctor, report and test-node operations against an explicit project root, with typed results and categorized errors (api::Error).

Usability

  • A8. init --dry-run previews an adoption or migration, and migrations write scaffold.toml.bak unless --no-backup is passed.
  • A9. completions <bash|zsh> prints completion scripts for both binary names. Global -q/--quiet (or LOGOS_SCAFFOLD_QUIET=1) suppresses echoed external commands.

FURPS+ — lgs tui

Functionality

  1. lgs tui, run inside a project, shows in one screen: localnet state (running, starting, stopped, stale state, foreign listener) with its pid and current block height; the project's default wallet address; each guest program in methods/guest/src/bin with the build deploy would ship (docker, release, debug, or not built) and whether the last lgs run deployed exactly that build to the running localnet; and an Output pane.
  2. Each action key runs the matching CLI command as a child process in the project root and streams its output into the Output pane: r run, w run --watch, b build, d deploy <selected>, s localnet start or stop, R localnet reset --yes, t wallet topup, c doctor. The job's exit code is shown when it ends.
  3. l switches the Output pane between job output and the tail of the sequencer log.
  4. x stops the running job and its whole process tree.

Usability

  1. Every key is listed on screen; there is no mode to learn and no configuration.
  2. The empty Output pane names the one key a new project needs (r).
  3. A key pressed while a job runs says which job is running and how to stop it, instead of queueing or racing.

Reliability

  1. One job at a time, so two commands never write the same project state at once.
  2. localnet reset and quitting with a running job ask for confirmation; the reset keeps the wallet.
  3. Quitting stops the running job's process tree but never the localnet, which stays up as it does after localnet start.
  4. Status polling runs on a background thread, so a slow lsof or an unresponsive sequencer never freezes input or drawing.
  5. Without an interactive terminal it exits non-zero with a message instead of drawing into a pipe.

Performance

  1. Status refreshes once a second; the screen redraws at least every 100 ms while idle.
  2. Output is capped at the last 5,000 lines.

Supportability

  1. Actions are the CLI commands themselves, so their behaviour, output and documentation are the CLI's; the dashboard adds no second implementation to keep in sync.
  2. Status comes from the functions behind localnet status, deploy discovery and the run deploy cache.
  3. Rendering is covered by a ratatui TestBackend test; key handling and job lifecycle by unit tests; the no-project and no-terminal paths by CLI tests.

+ (Privacy, Anonymity, Censorship-Resistance)

  • Local only: it reads project files and the localnet RPC on 127.0.0.1, and runs the same commands a developer would.

Dependencies

  • ratatui 0.29 with its default crossterm backend.
  • Unix sessions (setsid, kill of the process group) for detaching a job from the terminal and stopping its process tree, consistent with the CLI's Unix-only support.