bootstrap: skeleton — the monorepo skeleton, Nix dev shells, and CI #23

Closed
opened 2026-07-25 04:53:56 +00:00 by ben · 1 comment
Owner

Parent

Wayfinder map: #7 — the engineering foundation (PROCESS.md Phase 2½, emitted as DAG root slices).

What to build

The monorepo skeleton every other slice builds inside, per ADR 0040 as amended by ADR 0047. Five codebases scaffold: app/ (the Quasar Electron operator app, plus the bundled per-platform Go helper as a build target — the clan seam's founding decision has the app embed the seam, so the helper binary is first-class from day one), dashboard/ (the Quasar SPA web dashboard), control-plane/ (Go), agent/ (Go), and broker/ (the fifth codebase, Go — the Matou-run rental broker that lives in the repo but deploys to Matou infrastructure and never runs inside a community fleet, ADR 0047). Alongside them the shared UI-kit package (which implements the wireframes' data-field/data-action/data-status contract) and the OpenAPI-spec package are first-class workspace members.

A root Nix flake provides dev shells only — pinning Go, Node/pnpm, and the clan CLI so operators, developers, and Sandcastle agents all get identical toolchains. Nix is the pin, not the build system: inside the shell, ordinary tooling runs everything — pnpm workspaces for TypeScript, go.work for Go, vitest and go test for tests. CI is Forgejo Actions on git.matou.nz. Every task manifest's seam command must run inside nix develop, so this slice is what makes that entry point real.

Notes: this slice roots the whole DAG — every feature slice depends on it directly or transitively. Cross-OS Electron packaging (per-OS runners) is a known deferred cost due when founding ships installers (ADR 0040), not part of this slice. CODING-STANDARDS.md already exists as the Standards review contract; this slice makes the repo it describes.

Acceptance criteria

  • Given a clean checkout, when nix develop is entered, then a single dev shell provides pinned Go, Node/pnpm, and the clan CLI, and the same shell is what CI and Sandcastle enter.
  • Given the dev shell, when each codebase is scaffolded, then app/, dashboard/, control-plane/, agent/, and broker/ all exist as buildable workspace members, with the shared UI-kit and OpenAPI-spec as first-class packages.
  • Given the workspaces, when the TypeScript build/test runs, then pnpm workspaces resolve and vitest runs; and when the Go build/test runs, then go.work resolves both Go modules and go test runs.
  • Given the repo on git.matou.nz, when a change is pushed, then Forgejo Actions CI enters nix develop and runs the per-language test commands.
  • Given the UI-kit package, when a wireframe's shared-asset contract is consumed, then the UI kit implements the data-field/data-action/data-status fields the wireframes declare.

Blocked by

None — can start immediately.

Task manifest

task: bootstrap:skeleton
implements_seam: —   # the repo skeleton itself; roots the DAG (ADR 0040 + ADR 0047)
implements_edge: —   # engineering slice; no flow edge
wireframe: —         # no wireframe; the ADRs are the contract
interface: the five-codebase monorepo layout (app/ + bundled Go helper build target,
  dashboard/, control-plane/, agent/, broker/) with shared UI-kit + OpenAPI-spec
  packages, a root Nix flake dev shell (Go, Node/pnpm, clan CLI), pnpm workspaces +
  go.work, and Forgejo Actions CI
seam: the skeleton's own smoke tests — `nix develop` enters, each workspace scaffolds
  and builds, vitest + go test run, CI green (Go + TS, inside the dev shell)
acceptance:
  - given: a clean checkout
    when: nix develop is entered
    then: one dev shell provides pinned Go, Node/pnpm, and the clan CLI, shared by humans, CI, and Sandcastle
  - given: the dev shell
    when: each codebase is scaffolded
    then: app/ (with the bundled Go helper build target), dashboard/, control-plane/, agent/, broker/, ui-kit, and openapi-spec all exist as buildable workspace members
  - given: the workspaces
    when: the per-language build/test runs
    then: pnpm workspaces + vitest run for TS and go.work + go test run for Go
  - given: a push to git.matou.nz
    when: CI runs
    then: Forgejo Actions enters nix develop and runs the test commands
depends_on: []
out_of_scope: [clan-seam/enroll-seam/brandkit-seam adapter implementations (their own
  slices), cross-OS Electron installer packaging (ADR 0040, due at founding),
  a full Nix build system for the product code (rejected — dev shells only)]
needs_human_decision: []
## Parent Wayfinder map: #7 — the engineering foundation (PROCESS.md Phase 2½, emitted as DAG root slices). ## What to build The monorepo skeleton every other slice builds inside, per ADR 0040 as amended by ADR 0047. Five codebases scaffold: `app/` (the Quasar Electron operator app, plus the bundled per-platform Go helper as a build target — the clan seam's founding decision has the app embed the seam, so the helper binary is first-class from day one), `dashboard/` (the Quasar SPA web dashboard), `control-plane/` (Go), `agent/` (Go), and `broker/` (the fifth codebase, Go — the Matou-run rental broker that lives in the repo but deploys to Matou infrastructure and never runs inside a community fleet, ADR 0047). Alongside them the shared UI-kit package (which implements the wireframes' `data-field`/`data-action`/`data-status` contract) and the OpenAPI-spec package are first-class workspace members. A root Nix flake provides dev shells only — pinning Go, Node/pnpm, and the clan CLI so operators, developers, and Sandcastle agents all get identical toolchains. Nix is the pin, not the build system: inside the shell, ordinary tooling runs everything — pnpm workspaces for TypeScript, `go.work` for Go, vitest and `go test` for tests. CI is Forgejo Actions on git.matou.nz. Every task manifest's seam command must run inside `nix develop`, so this slice is what makes that entry point real. Notes: this slice roots the whole DAG — every feature slice depends on it directly or transitively. Cross-OS Electron packaging (per-OS runners) is a known deferred cost due when founding ships installers (ADR 0040), not part of this slice. CODING-STANDARDS.md already exists as the Standards review contract; this slice makes the repo it describes. ## Acceptance criteria - [ ] Given a clean checkout, when `nix develop` is entered, then a single dev shell provides pinned Go, Node/pnpm, and the clan CLI, and the same shell is what CI and Sandcastle enter. - [ ] Given the dev shell, when each codebase is scaffolded, then `app/`, `dashboard/`, `control-plane/`, `agent/`, and `broker/` all exist as buildable workspace members, with the shared UI-kit and OpenAPI-spec as first-class packages. - [ ] Given the workspaces, when the TypeScript build/test runs, then pnpm workspaces resolve and vitest runs; and when the Go build/test runs, then `go.work` resolves both Go modules and `go test` runs. - [ ] Given the repo on git.matou.nz, when a change is pushed, then Forgejo Actions CI enters `nix develop` and runs the per-language test commands. - [ ] Given the UI-kit package, when a wireframe's shared-asset contract is consumed, then the UI kit implements the `data-field`/`data-action`/`data-status` fields the wireframes declare. ## Blocked by None — can start immediately. ## Task manifest ```yaml task: bootstrap:skeleton implements_seam: — # the repo skeleton itself; roots the DAG (ADR 0040 + ADR 0047) implements_edge: — # engineering slice; no flow edge wireframe: — # no wireframe; the ADRs are the contract interface: the five-codebase monorepo layout (app/ + bundled Go helper build target, dashboard/, control-plane/, agent/, broker/) with shared UI-kit + OpenAPI-spec packages, a root Nix flake dev shell (Go, Node/pnpm, clan CLI), pnpm workspaces + go.work, and Forgejo Actions CI seam: the skeleton's own smoke tests — `nix develop` enters, each workspace scaffolds and builds, vitest + go test run, CI green (Go + TS, inside the dev shell) acceptance: - given: a clean checkout when: nix develop is entered then: one dev shell provides pinned Go, Node/pnpm, and the clan CLI, shared by humans, CI, and Sandcastle - given: the dev shell when: each codebase is scaffolded then: app/ (with the bundled Go helper build target), dashboard/, control-plane/, agent/, broker/, ui-kit, and openapi-spec all exist as buildable workspace members - given: the workspaces when: the per-language build/test runs then: pnpm workspaces + vitest run for TS and go.work + go test run for Go - given: a push to git.matou.nz when: CI runs then: Forgejo Actions enters nix develop and runs the test commands depends_on: [] out_of_scope: [clan-seam/enroll-seam/brandkit-seam adapter implementations (their own slices), cross-OS Electron installer packaging (ADR 0040, due at founding), a full Nix build system for the product code (rejected — dev shells only)] needs_human_decision: [] ```
Author
Owner

Done — the monorepo skeleton is built and committed (0fe6cde). It roots the DAG per ADR 0040 as amended by ADR 0047.

What shipped

  • Five codebases scaffold as buildable members: app/ (+ the bundled per-platform Go helper build target at app/helper/), dashboard/, control-plane/, agent/, broker/ — plus the shared ui-kit and openapi-spec packages as first-class workspace members.
  • Two Go modules (issue AC "both Go modules"), tied by go.work: the root module . (control-plane + agent + app/helper + the shared internal/protocol wire types — one module, per ADR 0040 "agent/control-plane share a Go module natively") and broker/ (its own module — Matou-side, never in a fleet, ADR 0047).
  • pnpm workspaces (pnpm-workspace.yaml) + vitest for TS; go.work + go test for Go.
  • Root Nix flake (flake.nix) — dev shells only, pinning Go 1.23, Node 22/pnpm, golangci-lint and the clan CLI (from clan-core). The one shell CI, Sandcastle and humans all enter.
  • Forgejo Actions CI (.forgejo/workflows/ci.yml) enters nix develop --command scripts/seam-smoke.sh — the seam that makes every task manifest's nix develop -c <seam> real.
  • ui-kit implements the wireframes' contract (AC5): dataAttrs() maps data-field/data-action/data-status. The Oc* Vue primitives + full Quasar shells are the shell slice's job.
  • Standards contract enforceable: eslint.config.mjs, .prettierrc.json, .golangci.yml, strict tsconfig.base.json.

Acceptance criteria — all satisfied. The Go+TS seams were run locally GREEN: go build/vet/test (both modules); pnpm -r build (tsc) + pnpm -r test (vitest, 7 tests) + pnpm lint (eslint). nix develop itself, the clan CLI, and golangci-lint aren't installed in the build sandbox — they're provided by the dev shell, so they execute in CI. First nix develop generates flake.lock (no nix binary here to pre-generate it).

Non-breaking: the Sandcastle harness's npm ci path is intact — package.json/package-lock.json changed only additively (root lint devDeps + lint script); npm ci --dry-run clean.

Evidence: the commit 0fe6cde on main; the seam is scripts/seam-smoke.sh. STATUS.md, docs/slices/bootstrap.yaml (status: done) and map.html updated in the same commit. With this merged, the clan-seam/enroll-seam/brandkit-seam and shell root slices unblock.

Done — the monorepo skeleton is built and committed (`0fe6cde`). It roots the DAG per ADR 0040 as amended by ADR 0047. **What shipped** - **Five codebases** scaffold as buildable members: `app/` (+ the bundled per-platform Go helper build target at `app/helper/`), `dashboard/`, `control-plane/`, `agent/`, `broker/` — plus the shared **ui-kit** and **openapi-spec** packages as first-class workspace members. - **Two Go modules** (issue AC "both Go modules"), tied by `go.work`: the root module `.` (control-plane + agent + `app/helper` + the shared `internal/protocol` wire types — one module, per ADR 0040 "agent/control-plane share a Go module natively") and `broker/` (its own module — Matou-side, never in a fleet, ADR 0047). - **pnpm workspaces** (`pnpm-workspace.yaml`) + **vitest** for TS; **`go.work`** + **`go test`** for Go. - **Root Nix flake** (`flake.nix`) — dev shells only, pinning Go 1.23, Node 22/pnpm, golangci-lint and the clan CLI (from clan-core). The one shell CI, Sandcastle and humans all enter. - **Forgejo Actions CI** (`.forgejo/workflows/ci.yml`) enters `nix develop --command scripts/seam-smoke.sh` — the seam that makes every task manifest's `nix develop -c <seam>` real. - **ui-kit implements the wireframes' contract** (AC5): `dataAttrs()` maps `data-field`/`data-action`/`data-status`. The `Oc*` Vue primitives + full Quasar shells are the shell slice's job. - **Standards contract enforceable**: `eslint.config.mjs`, `.prettierrc.json`, `.golangci.yml`, strict `tsconfig.base.json`. **Acceptance criteria** — all satisfied. The Go+TS seams were run **locally GREEN**: `go build/vet/test` (both modules); `pnpm -r build` (tsc) + `pnpm -r test` (vitest, 7 tests) + `pnpm lint` (eslint). `nix develop` itself, the clan CLI, and golangci-lint aren't installed in the build sandbox — they're provided by the dev shell, so they execute in CI. First `nix develop` generates `flake.lock` (no nix binary here to pre-generate it). **Non-breaking**: the Sandcastle harness's `npm ci` path is intact — `package.json`/`package-lock.json` changed only additively (root lint devDeps + `lint` script); `npm ci --dry-run` clean. Evidence: the commit `0fe6cde` on `main`; the seam is `scripts/seam-smoke.sh`. STATUS.md, `docs/slices/bootstrap.yaml` (`status: done`) and `map.html` updated in the same commit. With this merged, the `clan-seam`/`enroll-seam`/`brandkit-seam` and `shell` root slices unblock.
ben closed this issue 2026-07-25 05:34:08 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks
Reference
Matou/idss#23
No description provided.