Lab Init (/lab-init)
Vocabulary: Phase A = Plan (design and tailoring with the user and AI). Phase B = Sprout execution (materialize or run agreed steps after confirmation). Planting the seed at a root and sprouting commits that folder as a lab workspace—practically irreversible in the Lab OS model (no automated un-sprout). See docs/60-reference/FOUNDATIONS_VOCABULARY.md.
Default behavior: Phase A — Design & Tailoring (Plan) (conversation first, no file writes and no install/init commands unless the user explicitly asks for execution inside Phase A).
Optional: Phase B — Sprout only after the user confirms target path, sprout mode, and execution.
Non-Cursor users can mirror Phase B for this repo with npm run lab:init / npm run lab:verify when sprout mode is lab-os-seed here.
Phase A — Design & Tailoring (always start here)
Rules
- Do not run
npm install, npm run init, npm run lab:init, or write project files by default.
- If the user demands commands in Phase A, confirm intent; otherwise keep outputs as design text only.
- Produce a design package that matches project complexity: one Mermaid diagram for simple systems; multiple focused diagrams when boundaries, flows, or environments would be unclear in one chart.
- Diagram hygiene: no secrets in trees or Mermaid (use placeholders for tokens, keys, sensitive hostnames).
- This repository only: the living Lab OS product map (
docs/60-reference/LAB_ARCHITECTURE_FLOWCHART.md) is maintained with /flow-diagram—compact Mermaid, lookup tables, no click. Use /lab-init for Phase A/B design and sprout; /flow-diagram when refreshing that canonical chart after structural changes.
Question themes (adapt order to context)
Cover what matters; skip irrelevant sections with explicit "N/A".
- Project shape: monolith vs multi-service vs multi-repo; teams and ownership if known.
- Stacks / runtimes: Node, Python, Go, etc.; infra (Terraform, OpenTofu, K8s, etc.).
- Material and unknowns: what docs/code exist; what is unknown or disputed.
- Anchors: non-negotiables, constraints, compliance, SLAs.
- Environments: local → dev/staging → prod; promotion and rollback posture.
- Validation gates: tests, CQRS read/write paths, integration points, smoke checks per service.
- Seed placement (conceptual): where the lab or repo root might live (folder-agnostic until Phase B).
Required design package (content)
- Project profile — domains, services, stack map (prose or table).
- Known / unknown inventory — bullets.
- Anchor points and assumptions — explicit; separate risks.
- Phased plan — local → dev → prod (or your pipeline).
- Validation gates — what must pass before promotion.
- Project structure — ASCII tree with short per-folder annotations (Grand Exchange–style "where things live"; see examples.md).
- Mermaid diagram set — at least one; multiple when needed:
- service/module boundaries
- data or control flow (including CQRS if relevant)
- environments and promotion / infra touchpoints
- Artifact layout (logical paths) — use stable default paths so sprouting is predictable:
docs/project-structure.md — tree + annotations
docs/diagrams/*.md or sections in docs/architecture.md for diagrams
docs/README.md — mini-index linking structure, diagrams, risks, sprout handoff
- When boundaries change later, update the affected diagram(s) and note the change briefly.
Phase A output format
Use clear headings. End Phase A with:
- Phase A complete (summary)
- Proceed to sprout? (yes/no)
If no: stop with design artifacts in chat (user can save manually).
Phase B — Sprout (opt-in; gated)
Preconditions
- Phase A design package is accepted by the user.
- User explicitly chooses to sprout.
Steps
- Target folder — absolute or workspace-relative path where work should apply.
- Sprout mode — user must pick one:
docs-only — materialize or refine documentation only (design package files).
lab-os-seed — apply this repository’s Lab OS lab scaffold (lab.yaml, lab/ tree, validation/promotion scripts) in the target when this repo is the context; requires Node 20+ and npm here.
custom — user describes stack-specific steps; agent proposes an ordered plan; still requires confirmation before execution.
- Execution gate — do not run commands or write files until the user confirms Execute sprout.
- Emit a sprout handoff block (below) for pasting into the AI session rooted at the target folder (repeatable context).
Sprout handoff template (copy for user)
[Sprout handoff — paste into AI in <target-folder>]
Target: <path>
Mode: docs-only | lab-os-seed | custom
Summary: <one paragraph: goal, anchors, constraints>
Authoritative docs: docs/project-structure.md; docs/diagrams/... or docs/architecture.md; docs/README.md
Steps:
1) ...
2) ...
Do not: <paths, resources, or actions off limits>
STOP before: delete/overwrite/cloud apply/production impact — get explicit user confirmation
Lab OS seed (this repo only, mode lab-os-seed)
If the workspace is lab-os-lab and the user confirms execution:
npm install
npm run lab:init -- <target-or-default>
npm run lab:verify
Align targets with the user’s chosen folder. Do not assume every external project uses Node; Lab OS layout is optional and only for this mode in this seed repo.
Output format (reporting)
- Status: pass / fail / blocked (waiting on user)
- Phase: A or B
- Checks passed / failed (see checklist.md)
- Next action: concrete step
Additional resources
- checklist.md — Phase A and Phase B checkpoints
- examples.md — patterns and full examples
- VERIFICATION.md — prompt-level scenarios for acceptance checks
1---2name: lab-init3description: Runs a conversation-first design and tailoring workflow for any project shape (single or multi-service, mixed stacks, infra), then optionally produces a paste-ready sprout handoff for the target folder. Use when the user says /lab-init or asks to bootstrap, initialize, design, or tailor a lab or project before scaffolding. Lab OS npm seed commands apply only when sprout mode is lab-os-seed in this repository.4---56# Lab Init (`/lab-init`)78**Vocabulary:** **Phase A = Plan** (design and tailoring with the user and AI). **Phase B = Sprout execution** (materialize or run agreed steps after confirmation). **Planting** the seed at a root and **sprouting** commits that folder as a **lab workspace**—**practically irreversible** in the Lab OS model (no automated un-sprout). See [docs/60-reference/FOUNDATIONS_VOCABULARY.md](../../../../docs/60-reference/FOUNDATIONS_VOCABULARY.md).910**Default behavior:** **Phase A — Design & Tailoring (Plan)** (conversation first, **no file writes and no install/init commands** unless the user explicitly asks for execution inside Phase A).1112**Optional:** **Phase B — Sprout** only after the user confirms **target path**, **sprout mode**, and **execution**.1314Non-Cursor users can mirror Phase B for this repo with `npm run lab:init` / `npm run lab:verify` when sprout mode is `lab-os-seed` **here**.1516## Phase A — Design & Tailoring (always start here)1718### Rules1920- Do **not** run `npm install`, `npm run init`, `npm run lab:init`, or write project files by default.21- If the user demands commands in Phase A, confirm intent; otherwise keep outputs as **design text** only.22- Produce a **design package** that matches project complexity: one Mermaid diagram for simple systems; **multiple** focused diagrams when boundaries, flows, or environments would be unclear in one chart.23- **Diagram hygiene:** no secrets in trees or Mermaid (use placeholders for tokens, keys, sensitive hostnames).24- **This repository only:** the living Lab OS product map ([`docs/60-reference/LAB_ARCHITECTURE_FLOWCHART.md`](../../../../docs/60-reference/LAB_ARCHITECTURE_FLOWCHART.md)) is maintained with [**`/flow-diagram`**](../flow-diagram/SKILL.md)—compact Mermaid, lookup tables, no `click`. Use **`/lab-init`** for Phase A/B design and sprout; **`/flow-diagram`** when refreshing that canonical chart after structural changes.2526### Question themes (adapt order to context)2728Cover what matters; skip irrelevant sections with explicit "N/A".2930- **Project shape:** monolith vs multi-service vs multi-repo; teams and ownership if known.31- **Stacks / runtimes:** Node, Python, Go, etc.; infra (Terraform, OpenTofu, K8s, etc.).32- **Material and unknowns:** what docs/code exist; what is unknown or disputed.33- **Anchors:** non-negotiables, constraints, compliance, SLAs.34- **Environments:** local → dev/staging → prod; promotion and rollback posture.35- **Validation gates:** tests, CQRS read/write paths, integration points, smoke checks per service.36- **Seed placement (conceptual):** where the lab or repo root might live (folder-agnostic until Phase B).3738### Required design package (content)39401. **Project profile** — domains, services, stack map (prose or table).412. **Known / unknown inventory** — bullets.423. **Anchor points and assumptions** — explicit; separate **risks**.434. **Phased plan** — local → dev → prod (or your pipeline).445. **Validation gates** — what must pass before promotion.456. **Project structure** — ASCII tree with short per-folder annotations (Grand Exchange–style "where things live"; see [examples.md](examples.md)).467. **Mermaid diagram set** — at least one; multiple when needed:47 - service/module boundaries48 - data or control flow (including CQRS if relevant)49 - environments and promotion / infra touchpoints508. **Artifact layout (logical paths)** — use stable default paths so sprouting is predictable:51 - `docs/project-structure.md` — tree + annotations52 - `docs/diagrams/*.md` **or** sections in `docs/architecture.md` for diagrams53 - `docs/README.md` — mini-index linking structure, diagrams, risks, sprout handoff549. When boundaries change later, **update the affected diagram(s)** and note the change briefly.5556### Phase A output format5758Use clear headings. End Phase A with:5960- **Phase A complete** (summary)61- **Proceed to sprout?** (yes/no)6263If no: stop with design artifacts in chat (user can save manually).6465## Phase B — Sprout (opt-in; gated)6667### Preconditions6869- Phase A design package is accepted by the user.70- User explicitly chooses to sprout.7172### Steps73741. **Target folder** — absolute or workspace-relative path where work should apply.752. **Sprout mode** — user must pick one:76 - `docs-only` — materialize or refine **documentation only** (design package files).77 - `lab-os-seed` — apply **this repository’s** Lab OS lab scaffold (`lab.yaml`, `lab/` tree, validation/promotion scripts) in the target **when this repo is the context**; requires Node 20+ and npm here.78 - `custom` — user describes stack-specific steps; agent proposes an ordered plan; still requires confirmation before execution.793. **Execution gate** — do not run commands or write files until the user confirms **Execute sprout**.804. Emit a **sprout handoff** block (below) for pasting into the AI session rooted at the target folder (repeatable context).8182### Sprout handoff template (copy for user)8384```text85[Sprout handoff — paste into AI in <target-folder>]86Target: <path>87Mode: docs-only | lab-os-seed | custom88Summary: <one paragraph: goal, anchors, constraints>89Authoritative docs: docs/project-structure.md; docs/diagrams/... or docs/architecture.md; docs/README.md90Steps:91 1) ...92 2) ...93Do not: <paths, resources, or actions off limits>94STOP before: delete/overwrite/cloud apply/production impact — get explicit user confirmation95```9697### Lab OS seed (this repo only, mode `lab-os-seed`)9899If the workspace is `lab-os-lab` and the user confirms execution:100101- `npm install`102- `npm run lab:init -- <target-or-default>`103- `npm run lab:verify`104105Align targets with the user’s chosen folder. Do not assume every external project uses Node; **Lab OS layout is optional** and only for this mode in this seed repo.106107## Output format (reporting)108109- **Status:** pass / fail / blocked (waiting on user)110- **Phase:** A or B111- **Checks passed / failed** (see [checklist.md](checklist.md))112- **Next action:** concrete step113114## Additional resources115116- [checklist.md](checklist.md) — Phase A and Phase B checkpoints117- [examples.md](examples.md) — patterns and full examples118- [VERIFICATION.md](VERIFICATION.md) — prompt-level scenarios for acceptance checks