1.7 KiB
1.7 KiB
1. Script Skeleton and Concurrency
- 1.1 Create
kanban-project-syncscript with argument parsing (--project,--board,--background), usage help, and exit code constants - 1.2 Implement
flock-based locking with pending flag file and re-run loop - 1.3 Implement
--backgroundmode (re-exec self detached with output to log file) - 1.4 Add connectivity check (
pcli status) with exit code 2 on failure
2. Bootstrap Phase
- 2.1 Implement find-or-create project by name
- 2.2 Implement find-or-create board by name within project
- 2.3 Implement find-or-create lists (Backlog, To Do, Planning, In Progress, Review, Done) with correct positions
- 2.4 Implement find-or-create
agentlabel on the board
3. Reconciliation Phases
- 3.1 Gather OpenSpec state — list active changes, parse artifact completion and task checkbox state
- 3.2 Determine target list for each change based on OpenSpec state (Planning / In Progress / Review)
- 3.3 Gather existing Planka agent-labelled cards and build name→card map
- 3.4 Create missing cards (new OpenSpec changes without a Planka card) with agent label
- 3.5 Move cards to correct list when current list doesn't match target
- 3.6 Sync task checklists — create/update task lists and tasks on cards from
tasks.md - 3.7 Move orphaned agent cards (no matching active change) to Done
4. Reporting and Summary
- 4.1 Add summary output — infrastructure created, cards created/moved, tasks synced, errors
5. Skill and Documentation Updates
- 5.1 Simplify
.claude/commands/kanban-sync.mdto invokekanban-project-sync --background - 5.2 Update
CLAUDE.mdPlanka Sync section to reference the script