Adds the data layer for per-item agent prompts. Markdown frontmatter gets an `agent_prompt:` block scalar that survives the importer round-trip (newlines preserved), and `resolveWorkflowPrompt()` walks task → epic → plan → built-in default returning both the resolved string and the source level. Walk is slug-based, not parent_id-based, because the importer leaves parent_id briefly null mid-transaction. tRPC `backlog.getWorkflowPrompt` returns ownOverride + effectivePrompt so future UI can render the override box + preview without two queries. `backlog.updateWorkflowPrompt` is owner/admin-gated (prompts change downstream Cursor/Claude behavior) and audit-logged on every write. UI deferred — apps/web doesn't have a backlog-item detail panel yet; the existing object-detail panel is for the objects table. Follow-up filed at Task-workflow-prompt-task-detail-ui.md. Co-authored-by: Cursor <cursoragent@cursor.com>
1 KiB
1 KiB
| kind | slug | title | status | priority | tenant_id | cursor_plan_id | updated_at |
|---|---|---|---|---|---|---|---|
| plan | <plan-slug> | <Plan title> | draft | P2 | <tenant-uuid-or-placeholder> | null | <ISO-8601> |
Plan overview
Short summary of the initiative and why it exists.
Objectives and success criteria
- Objective 1 — measurable outcome
- Objective 2
Scope and boundaries
In scope: …
Out of scope: …
Cross-team collaborators
| Name / group | Role |
|---|---|
Epics
| Epic | Link |
|---|---|
<Epic title> |
./Epic-<epic-slug>/Epic-<epic-slug>.md |
Metrics and milestones
| Milestone | Target date | Metric |
|---|---|---|
Risks and mitigations
| Risk | Mitigation |
|---|---|