packages/plugin-dev/sync-md/docs/markdown-id-inspection.md
The SuperProductivity sync-md plugin uses HTML comments embedded in task notes to track the relationship between SuperProductivity tasks and their corresponding markdown file entries.
The plugin uses the following format to store markdown IDs in task notes:
<!-- sp:id -->
Where id is typically the task ID from SuperProductivity, creating a bidirectional link between the task and its markdown representation.
In Markdown Files: When tasks are synced to markdown, each task line includes the ID:
- [ ] <!-- sp:task-id-123 --> Task title here
- [x] <!-- sp:task-id-456 --> Completed task
In SuperProductivity: The same ID is stored in the task's notes field, allowing the sync process to match tasks between the two systems.
A script has been created at /scripts/inspect-sync.ts that can be run within the SuperProductivity plugin context to:
To run the inspection script:
Based on the code analysis, here are the patterns the plugin uses:
<!-- sp:task-id --> - Used by the sync-md plugin(task-id) - Used in older sync logic (in parentheses at start of title)If tasks aren't syncing properly:
a-zA-Z0-9_-<!-- sp:id -->/<!-- sp:([a-zA-Z0-9_-]+) -->/