Development Seed Data
For changes to task workflow, Git/worktree handling, agent orchestration, or
provider lifecycle, use npm run test:agent-workflow instead. Add -- --ui
when the executed state also needs semantic browser inspection. The seed and
executed workflows are complementary; seed records are not evidence that a
provider process, worktree lifecycle, or post-run Git observation worked.
Contract#
The deterministic identifiers are scenario slugs and the generated manifest,
not store IDs. SqliteTaskStore owns UUIDs and timestamps, so agents must read
.local/task-monki-dev-seed/manifest.json to map a stable slug to the task ID
created for that run.
The seed generator writes current-schema Task Monki records through store APIs: two real Git repositories, tasks, saved views, iterations, worktrees, runs, interaction requests, Git snapshots, GitHub rollups, artifacts, and domain events. It does not patch task projections by hand.
Usage#
npm run dev:seed
source .local/task-monki-dev-seed/dev-api.env
npm run dev:api
npm run dev:rendererThe browser renderer uses the Vite same-origin /api proxy. dev:api writes a
short-lived private proxy token outside the repository, and Vite reads it on
each request, so restart the API without copying credentials into the browser
or an environment file. Use the printed 127.0.0.1 renderer URL; other origins
are rejected. If the default ports must change, export the same
TASK_MANAGER_API_PORT and TASK_MANAGER_RENDERER_PORT values in both
terminals.
npm run dev:seed resets only the seed-owned root and then prints the same
environment variables written to dev-api.env:
TASK_MANAGER_PROFILE_ROOTTASK_MANAGER_REPO_PATHTASK_MANAGER_WORKTREE_ROOTTASK_MANAGER_PREVIEW_ROOTTASK_MANAGER_DISCOURSE_WORKSPACE_ROOTTASK_MANAGER_PREVIEW_RECONCILE=0(keeps synthetic preview UI states intact; normal product/dev runs reconcile by default)TASK_MANAGER_DETERMINISTIC_SEED=1(keeps the live Codex provider inert so synthetic provider records cannot start or recover real agent work)TASK_MANAGER_DEV_SEED_MODE=1(enables deterministic Design composition)
The seed manifest and environment file are forced to mode 0600.
The browser development host always forces agent network access and external Codex tools off. When the deterministic seed flag is present, it also skips provider startup and reports that explicit disabled reason through provider preflight and any attempted run action. Unset the seed environment before using the development host for live, local-only Codex work.
The default seed root is .local/task-monki-dev-seed, which is ignored by git.
Reset safety is marker-based: non-empty directories without the Task Monki seed
marker or manifest are refused.
Scenario Coverage#
The catalog in src/dev/seedData.ts covers the important UI and workflow
states:
- board setup: backlog, ready, clean/missing/error worktrees
- imported work: idle with committed and dirty changes, review findings before the first coding run, and a moved checkout that needs explicit reconnection
- agent lifecycle: running, approval, user input with provider choices, a custom choice, and free text, interrupted, runtime lost, ambiguous mutation, stale interaction
- agent review: not run, running, passed, needs changes, inconclusive, failed, canceled, stale after follow-up, active follow-up
- delivery without PR: Git not inspected, clean, dirty, conflicted, unavailable, unknown, branch publish in progress, retryable failure, remote-newer failure, branch pushed without PR
- PR Status: draft, open, pending/failed/canceled checks, no required checks, GitHub review waiting, changes requested, ready to merge, merged, closed without merge, stale evidence, local changes not pushed, PR newer commits, branch diverged
- completion policy:
MERGED_AND_VERIFIEDwith failing, stale, and passing checks, plusMANUALwith a merged PR - terminal workflow: fork alternative, canceled, archived
- repository and saved-view behavior: global review filtering plus a repository-specific view containing a task from the secondary checkout
- preview: missing recipe, approval required, preparing, ready, failed, stale, stopped, recovery required, and cleanup incomplete
Each task title starts with [seed:<slug>], so the UI can be searched by slug.
Extending#
When a UI change needs a state that is not represented, extend the seed catalog instead of manually constructing state in the app:
- Add a scenario definition in
src/dev/seedScenarios.ts. - Add a builder path that uses
SqliteTaskStoreAPIs and domain events. - Add or update
src/dev/seedData.integration.test.tsto assert the resulting selector or view-model output. - Regenerate with
npm run dev:seedand test the UI against the new slug.
scripts/serve-readme-screenshot-data.mjs is screenshot-only legacy fixture
data. It is not the authoritative workflow seed path.