ubiquitous-invention/plans/Plan-multitenant-cursor-sync/Epic-markdown-backlog/Task-parser-requirements.md

55 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

---
kind: task
slug: parser-requirements
title: Specify markdown import parser requirements (frontmatter + sections)
plan_slug: multitenant-cursor-sync
epic_slug: markdown-backlog
status: ready
priority: P1
tenant_id: global
owner: unassigned
cursor_todo_id: null
updated_at: "2026-04-26"
---
# Task summary
Document and then implement a parser that maps `Plan-` / `Epic-` / `Task-` files into internal entities with tenant scope.
## Description
Requirements draft:
- Parse YAML frontmatter; required keys: `kind`, `slug`, `title`, `status`, `tenant_id`.
- Optional: `cursor_plan_id`, `cursor_epic_id`, `cursor_todo_id`, `priority`, `updated_at`.
- Derive `plan_slug` / `epic_slug` from path if missing in frontmatter (validation step).
- Body markdown stored for search and AI context; structured fields prefer frontmatter.
## Subtasks
- [ ] Write ADR or short spec in app `docs/` (optional) or extend `config/CursorSync.md`
- [ ] Implement `packages/` or `apps/web` import job with idempotent upsert
- [ ] Unit tests for golden files under `plans/`
## Owner or assignee
Unassigned
## Status
ready
## Estimation
M
## Acceptance criteria
- [ ] Importing the example tree creates consistent DB rows per tenant.
- [ ] Re-import does not duplicate rows (upsert by `tenant_id` + `slug` + `kind`).
## Links to related Epic / Plan
- Epic: `./Epic-markdown-backlog.md`
- Plan: `../Plan-multitenant-cursor-sync.md`