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> |
||
|---|---|---|
| .. | ||
| Plan-agent-coordination | ||
| Plan-daily-driver-finish | ||
| Plan-multitenant-cursor-sync | ||
| Plan-multitenant-saas-hardening | ||
| README.md | ||
Plans directory
Human- and agent-oriented backlog. Structure:
plans/
Plan-<plan-slug>/
Plan-<plan-slug>.md
Epic-<epic-slug>/
Epic-<epic-slug>.md
Task-<task-slug>.md
Task-<other-task>.md
- Slug: lowercase, hyphenated, stable across renames of display title when possible.
- Templates: copy from
docs/templates/. - Chunking: keep each Task small enough for one Cursor agent or subagent to own; use Epics for milestones that need several tasks.
See docs/Glossary.md and config/CursorSync.md.
Import to database: from the repo root, with DATABASE_URL and your workspace UUID:
pnpm --filter @tasks/database watch:markdown-backlog
Set MARKDOWN_BACKLOG_WORKSPACE_ID (and optionally MARKDOWN_BACKLOG_REPO_ROOT). This runs an initial sync and watches plans/ for changes.