Build a standalone npm package + CLI sync engine to keep a local TASKS.md (Markdown Kanban format) in sync with GitHub Issues and GitHub Projects (Projects v2). The package will be used by multiple clients:
- VS Code extension (markdown-kanban-roadmap)
- OpenCode plugin (separate repo)
- CLI for developers
GitHub Issues + Projects are the source of truth after sync.
TASKS.md is editable locally and can be pushed to GitHub, but sync must always pull before push.
- Use Node.js (TypeScript preferred).
- Publish to npm (public package).
- Provide both CLI and programmatic API.
- Use
ghCLI internally for auth + API calls (REST + GraphQL for Projects v2). - Support manual + hook usage (pull/push commands).
- Keep
TASKS.mdformat compatible with Markdown Kanban rules. - Must work across branches and multiple agents without diverging status.
The file follows Markdown Kanban sections:
- Backlog
- Doing
- Review
- Done
- Paused
- Notas (or Notes)
Tasks are formatted like:
### Task Title
- id: T-001
- tags: [tag1, tag2]
- priority: high|medium|low
- workload: Easy|Normal|Hard|Extreme
- milestone: sprint-26-1_1
- start: YYYY-MM-DD
- due: YYYY-MM-DD
- updated: YYYY-MM-DD
- completed: YYYY-MM-DD
- detail: ./tasks/T-001.md
- defaultExpanded: true|false
- Task <-> Issue (1:1)
- Section <-> Project Status field
- tags/priority/workload -> Issue labels
- milestone -> GitHub milestone
- Additional fields (detail, defaultExpanded) are local-only
- Add a stable mapping field in TASKS.md:
issue: <number>(recommended)
- Always
pullbeforepush. - If conflicts:
- Remote wins for status + labels.
- Local wins for local-only fields (detail, defaultExpanded).
- Provide
dry-runandstatuscommands.
sync pullsync pushsync status
Use a config file (example name: sync.config.json) in repo root with:
- owner, repo
- projectId
- statusFieldId
- status mapping (Backlog/Doing/Review/Done/Paused)
- tasksFile path (default: ./TASKS.md)
- VS Code extension should expose commands: Sync Tasks / Pull / Push
- OpenCode plugin should call
sync pullon session start andsync pushwhen TASKS.md changes
- Migration: create Issues/Project items from existing TASKS.md
- Update TASKS.md with
issue: <number>for mapping - Normal workflow: pull -> edit -> push
- Prefer ASCII content; avoid special characters unless required.
- Keep the parser compatible with existing example format.