This guide bootstraps the shared routine fleet for a new project that runs Brain, Kanban, and a PR/CR venue such as GitHub, Forgejo, or LastGit. The goal is to make routine prompts and engine skills generic: project facts live in records, not in copied prompt text.
The fleet has three layers:
- Generic engine skills live in Last Stack. They know how to rotate a registry, mine sessions, reconcile PRs, groom a board, or run probes, but they do not know project-specific paths, repos, tokens, or venues.
- Project records hold the constants and registries. The bootstrap kit
includes templates for
workspace-config,repo-venue-map,tag-repo-map,signal-sources, andprobe-registry. - Shared routine contract is the project SOP named
sop-routine-shared-contract. Routines cite it for heartbeat, dedupe, guardrails, papercut filing, shell discipline, and validation rules.
When the project has a dedicated Config app, store config-class records there.
Brain may keep rationale pointers, but must not remain a silent fallback for a
configurations:// source. The bootstrap shape stays the same:
engines read named records through the configured source instead of editing
engine skills or routine prompts.
-
Install Last Stack and the LastDB app stack.
git clone https://github.com/EdgeVector/last-stack ~/.last-stack ~/.last-stack/setup ~/.last-stack/bin/last-stack-install-apps
-
Complete one-time Brain and Kanban setup for the project using their app guides, then verify the data-plane with narrow reads. Do not make scheduled routines depend on setup or doctor commands as health checks.
kanban list brain get workspace-config || true
-
Copy the templates to a scratch directory and replace every placeholder.
mkdir -p /tmp/routine-fleet-bootstrap cp ~/.last-stack/templates/routine-fleet/*.md /tmp/routine-fleet-bootstrap/ rg '<[A-Z0-9_]+>' /tmp/routine-fleet-bootstrap
-
Seed the records.
for file in /tmp/routine-fleet-bootstrap/*.md; do brain put < "$file" done
-
Verify the records can be read by slug.
brain get workspace-config brain get repo-venue-map brain get tag-repo-map brain get signal-sources brain get probe-registry brain get sop-routine-shared-contract
-
Register scheduled routines only after the records are valid. Routine prompts should cite the engine skill, the relevant record slug, and
sop-routine-shared-contract; they should not copy project paths or repo venue tables inline.
| Template | Purpose |
|---|---|
workspace-config.md |
Workspace root, owner, CLI names, data-plane endpoints, worktree dirs, guardrails, and PATH prefix. |
repo-venue-map.md |
Repo to review venue routing, required check names, merge mechanism, and hands-off repos. |
tag-repo-map.md |
Conservative tag to Repo: mapping for groom and program-driver routines. |
signal-sources.md |
Error, usage, and alert feeds with secret locators, triage thresholds, repo routing, and dedupe ledgers. |
probe-registry.md |
Continuous sentinel recipes, pass assertions, isolation rules, verdict records, and card targets. |
sop-routine-shared-contract.md |
Shared heartbeat, dedupe, guardrail, papercut-filing, shell, verification, block-ownership, verdict, and human-gate rules. |
Before scheduling any routine, use a hypothetical project and confirm:
- every placeholder in
templates/routine-fleet/*.mdcan be filled without editing an engine skill; - every repo in
tag-repo-mapalso appears inrepo-venue-map; - every secret is a locator such as
lastsecrets://..., never a raw value; - every probe names an isolation surface and pass assertion;
- every routine prompt can say "use engine skill X with record Y and
sop-routine-shared-contract" without embedding project constants; - Kanban cards filed by routines have a valid
Repo:,Base:,Branch:,GOAL,STEPS,VERIFY, andDONE WHEN.
If any step requires editing a routine prompt to change paths, venues, tokens, or repo mappings, move that value into one of the records first.