Work Node Types
mdkg uses familiar software delivery shapes as Markdown graph nodes.
Agents need more than files and prompts. They need bounded work, durable intent, evidence, and validation.
A goal is a long-running objective. It owns the active-node route, scoped work, required checks, and closeout evidence.
Valid minimal goal frontmatter:
---id: goal-1type: goaltitle: Improve release validationstatus: todopriority: 1goal_state: activeactive_node: task-1scope_refs: - task-1 - test-1context_refs: - dec-1required_checks: - npm run test - mdkg validate---Useful commands:
Replace uppercase placeholders such as GOAL_ID, WORK_ID, and TASK_ID with concrete ids from your repo.
mdkg goal currentmdkg goal next GOAL_IDmdkg goal claim GOAL_ID WORK_IDUse goals when a task will span more than one concrete node or session. A good goal includes:
- a measurable goal condition
scope_refsfor executable work- required checks
- stop conditions
- checkpoint requirements
mdkg goal next is read-only. mdkg goal claim records the chosen active node.
Epic and feature
Section titled “Epic and feature”Epics and features group larger bodies of work. They help keep related tasks, tests, bugs, and checkpoints discoverable.
Use an epic for a capability area. Use a feature for a user-visible slice. Both help humans and agents understand why a concrete task exists.
A task is a concrete implementation unit. Use tasks for focused code, docs, graph, or operational changes.
Valid task frontmatter:
---id: task-1type: tasktitle: Add release validation smokestatus: todopriority: 1epic: epic-1parent: goal-1blocked_by: - dec-1context_refs: - prd-1evidence_refs: []---Use the returned task id in place of TASK_ID:
mdkg task start TASK_IDmdkg task done TASK_ID --checkpoint "Meaningful milestone"A bug records a defect or regression. It should include reproduction context and validation expectations.
A test node records proof work. Tests can represent automated checks, browser QA, migration smokes, or manual acceptance contracts.
Use test nodes when validation is important enough to track as work, not just a one-line command in a task body.
A spike is actionable research or planning work. Spikes do not run research automatically; they capture questions, sources, findings, tradeoffs, recommendations, and follow-up nodes.
Valid spike frontmatter:
---id: spike-1type: spiketitle: Research release validation risksstatus: todopriority: 1epic: epic-1parent: goal-1context_refs: - archive://release-auditevidence_refs: []---Checkpoint
Section titled “Checkpoint”A checkpoint is evidence captured at a meaningful boundary. Good checkpoints summarize commands, pass/fail state, known warnings, changed surfaces, boundaries, and next refs.
mdkg checkpoint new "Browser QA proof" --kind test-proofDecision, PRD, EDD, and rule
Section titled “Decision, PRD, EDD, and rule”Decision, PRD, EDD, and rule nodes are planning context. They can support a goal through context_refs, but they are not automatically executable work.
How they fit
Section titled “How they fit”goal epic feature task test bug spike checkpoint evidenceAgents should use mdkg goal current, mdkg goal next, mdkg show, and mdkg pack WORK_ID to discover bounded work instead of browsing the repo ad hoc.
Common mistake
Section titled “Common mistake”Do not put every related design or checkpoint in scope_refs. Scope is the executable queue. Put background documents in context_refs and proof in evidence_refs.
Other common mistakes:
- Leaving a completed goal with a stale
active_nodeinstead of preserving the final route aslast_active_node. - Treating required checks as automated execution. mdkg records the checklist; humans or agents still run the commands.
- Storing raw prompts, tokens, provider payloads, or bulky logs in node bodies. Summarize evidence and link to safe artifacts.
- Creating many disconnected tasks without a goal or epic. Agents route better when concrete work has an owning objective.