4.1 KiB
id, title, status, wave, depends_on, plan, requirements, acceptance_criteria, system_design
| id | title | status | wave | depends_on | plan | requirements | acceptance_criteria | system_design | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 01-canvas-saved-prompt | Seed the canvas saved prompt | done | 1 | plan.md |
|
|
|
Task 01: Seed the canvas saved prompt
Summary
Provide an editable create-canvas saved prompt with the canvas authoring
instructions. Prove that structured task launch expands it through the existing
backend service while retaining the visible reference.
In scope
- Add the embedded English definition and
builtin-create-canvasseed entry. - Preserve same-name user records, edits, existing seeding and deletion rules.
- Cover create/start and delayed start, workflow and no-step launch, prepared session, current saved content, removed reference, and exactly one expansion.
- Assert the canonical recorded message and agent prompt agree; task description stays short. Reuse current trusted-content plumbing and failure behavior.
Out of scope
- Browser changes, new expansion services, schemas, reserved prompt names, runtime flag changes, and terminal/passthrough expansion.
Acceptance
- Fresh and existing databases obtain the built-in without replacing user data.
- The default definition includes exact tools, discovery, one core skill read, source boundaries, authorized data, publication outcomes, and human promotion.
- Structured launch delivers one trusted saved definition; removing the reference removes its expansion. Delayed start uses the current definition.
Verification
Run from the repository root, following /tdd and backend scoped guidance:
(cd apps/backend && rtk go test -tags fts5 ./internal/prompts/store ./internal/prompts/service)
(cd apps/backend && rtk go test -tags fts5 ./internal/orchestrator -run 'TestCreateCanvasPromptLaunch|PromptReference|PromptLaunch|WorkflowPrompt' -count=1)
rtk git diff --check
Name new integration tests TestCreateCanvasPromptLaunch with subtests so the
command includes every new case. Inspect existing saved-prompt launch tests
before adding fixtures; use the real prompt repository/service. Add a narrow
repair only if a regression test proves the existing launch path is incomplete.
Files likely touched
apps/backend/config/prompts/create-canvas.md(new)apps/backend/internal/prompts/store/sqlite.goapps/backend/internal/prompts/store/sqlite_test.goapps/backend/internal/orchestrator/create_canvas_prompt_launch_test.goapps/backend/internal/orchestrator/workflow_prompt_test.go
Dependencies
None.
Risks
Seeding has fixed-ID and unique-name conflicts; test both. Prompt instructions do not grant canvas capabilities. User-customized definitions can intentionally differ from the shipped workflow.
Parallelism
sequential
Inputs
- Canvas design: Guided canvas task launch and Agent authoring guidance.
- Saved Prompt Delivery.
- Server-owned expansion ADR.
config/prompts/changes-walkthrough.md, current seed and expansion tests.
Results
- Added
apps/backend/config/prompts/create-canvas.mdand registered thebuiltin-create-canvasseed without changing saved-prompt resolution. - Added store coverage for the complete authoring workflow, same-name user collisions, and user edits across repository reopen.
- Added a startup-cap regression so built-in seeding cannot make a full prompt
table exceed
maxPromptListItems. - Added orchestrator coverage for new-task, prepared-session, workflow-step, current-definition, exactly-once expansion, and removed-reference launches.
cd apps/backend && rtk go test -tags fts5 ./internal/prompts/store ./internal/prompts/service: 56 passed.cd apps/backend && rtk go test -tags fts5 ./internal/orchestrator -run 'TestCreateCanvasPromptLaunch|PromptReference|PromptLaunch|WorkflowPrompt' -count=1: 26 passed.rtk git diff --check: passed.