Knowledge Work Plugins: give a work assistant a shared task file
Build a loss-aware task-file preview as a learning project
Design an independent parser preview that exposes unsupported Markdown and conflicting headings before a dashboard save.
What you will learn
- Show what the parser will retain
- Compare the round trip explicitly
- Make the exercise testable
Before you start
- Basic command-line and configuration reading
- Ability to work in a disposable authorized environment
Design an independent parser preview that exposes unsupported Markdown and conflicting headings before a dashboard save.
Key takeaways
- Unsupported lines should be visible before saving.
- An input hash can support a proposed conflict check.
- The extension is an independent exercise.
Show what the parser will retain
A useful exercise is a read-only preview beside a task document. Display recognized sections, checkbox tasks and notes, and show every unconsumed line separately. This makes the boundary of the dashboard’s task schema visible before any write.
Include headings that normalize to an empty identifier or collide with another heading. The preview should flag those cases with their original line numbers rather than silently merging them. Use synthetic names and preserve the original input.
Compare the round trip explicitly
Serialize the parsed structure into a second pane and compute a line diff against the input. A passing preview means the user understands the proposed changes; it does not mean the serializer can preserve unsupported content.
Before adding an Apply button, require that the file’s current hash still matches the preview input. On a mismatch, stop and ask for a fresh preview. This is a proposed conflict guard, not a feature established by the inspected dashboard.
Make the exercise testable
Test empty files, repeated headings, Chinese-only headings, checkbox subtasks and ordinary paragraphs. Acceptance requires no writes during preview and a visible explanation for each lost or merged element. Keep browser strings rendered as text.
A side-by-side diff and a small SVG flow explain the problem more clearly than a three-dimensional scene. This chapter proposes an independent learning tool; it is neither a shipped plugin capability nor an announced upstream roadmap.
Decision guide
| Criterion | Option A | Option B |
|---|---|---|
| Best when | You need predictable behavior and easy auditing | You need adaptive optimization and have reliable telemetry |
| Main risk | May leave performance on the table | Can become difficult to explain or debug |
Implementation steps
- 1
Parse synthetic input and retain original line positions.
- 2
Show unconsumed lines and a serialization diff.
- 3
Reject writes when the input hash has changed.
Copy-ready example
{
"proposal": true,
"readOnly": true,
"inputHash": null,
"unconsumedLines": [],
"headingCollisions": [],
"applyWhenHashMatchesOnly": true
}Frequently asked questions
Is this preview already included?
No. This chapter proposes a separate learning project.
Does it need Three.js?
A text diff and a compact flow diagram are sufficient for these relationships.
Sources
- Knowledge Work Plugins / productivity/skills/dashboard.htmlSource checked 2026-09-18
- Knowledge Work Plugins / productivity/skills/task-management/SKILL.mdSource checked 2026-09-18