mdkg 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +81 -0
- package/CLI_COMMAND_MATRIX.md +26 -8
- package/README.md +55 -5
- package/dist/cli.js +44 -7
- package/dist/command-contract.json +171 -4
- package/dist/commands/fix.js +37 -27
- package/dist/commands/goal.js +149 -13
- package/dist/commands/new.js +4 -3
- package/dist/commands/next.js +2 -2
- package/dist/commands/task.js +2 -2
- package/dist/commands/validate.js +11 -0
- package/dist/graph/goal_scope.js +1 -1
- package/dist/graph/node.js +6 -4
- package/dist/graph/validate_graph.js +21 -0
- package/dist/init/AGENT_START.md +2 -2
- package/dist/init/CLI_COMMAND_MATRIX.md +13 -3
- package/dist/init/README.md +20 -3
- package/dist/init/core/rule-5-release-and-versioning.md +13 -4
- package/dist/init/init-manifest.json +11 -6
- package/dist/init/skills/default/pursue-mdkg-goal/SKILL.md +2 -1
- package/dist/init/templates/default/spike.md +81 -0
- package/dist/pack/order.js +3 -2
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -12,6 +12,87 @@ mdkg is pre-v1 public alpha software. Command, graph, cache, bundle, and DAL con
|
|
|
12
12
|
|
|
13
13
|
- No changes yet.
|
|
14
14
|
|
|
15
|
+
## 0.3.3 - 2026-06-16
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- Added `mdkg goal activate <goal-id>` to make one local root goal active,
|
|
20
|
+
select it for goal routing, and pause competing active local root goals in the
|
|
21
|
+
same workspace.
|
|
22
|
+
- Added goal-only archived lifecycle support with `mdkg goal archive`, allowing
|
|
23
|
+
historical roadmap goals to remain readable through show/list/search while
|
|
24
|
+
being excluded from actionable current/next routing.
|
|
25
|
+
- Added parser and graph validation support for exactly one active local root
|
|
26
|
+
goal, while imported subgraph goals keep independent active-goal state in
|
|
27
|
+
their owning graphs.
|
|
28
|
+
- Added packed `smoke:goal-lifecycle` prepublish coverage for goal activation,
|
|
29
|
+
archived-goal routing, archived discovery filters, strict doctor behavior, and
|
|
30
|
+
imported subgraph active-goal independence.
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
|
|
34
|
+
- Updated README, init assets, agent startup guidance, command matrix, help
|
|
35
|
+
surfaces, generated command contract metadata, and publish-readiness assertions
|
|
36
|
+
to prefer `goal activate` for active goal selection.
|
|
37
|
+
- Archived superseded local roadmap goals `goal-11`, `goal-12`, and `goal-15`
|
|
38
|
+
in this repository after replacement versioned goals were created.
|
|
39
|
+
- Tightened the 0.3.3 graph hygiene path so the remaining release-candidate
|
|
40
|
+
sequence is smoke coverage followed by dry-run prepublish closeout.
|
|
41
|
+
|
|
42
|
+
### Security
|
|
43
|
+
|
|
44
|
+
- Archived goals are non-actionable historical context: they cannot be selected,
|
|
45
|
+
activated, claimed, resumed, or paused through the goal lifecycle surface.
|
|
46
|
+
- `goal activate` keeps single-writer planning safer by pausing competing local
|
|
47
|
+
root goals instead of allowing multiple active local root goals to remain
|
|
48
|
+
silently actionable.
|
|
49
|
+
|
|
50
|
+
## 0.3.2 - 2026-06-16
|
|
51
|
+
|
|
52
|
+
### Added
|
|
53
|
+
|
|
54
|
+
- Added first-class research spike work-node support with `mdkg new spike`,
|
|
55
|
+
`spike-#` ids, `.mdkg/work/` storage, and compatibility with existing
|
|
56
|
+
`mdkg task start/update/done` lifecycle commands.
|
|
57
|
+
- Added spike participation in `mdkg next`, `mdkg goal next`, `mdkg goal claim`,
|
|
58
|
+
list/search/show structured exports, deterministic packs, goal-root pack
|
|
59
|
+
closure, and generated command contract metadata.
|
|
60
|
+
- Added a default spike template for research question, context, search plan,
|
|
61
|
+
findings, options/tradeoffs, recommendation, follow-up nodes, skill
|
|
62
|
+
candidates, domain notes, mdkg.dev launch implications, and evidence/sources.
|
|
63
|
+
- Added packed `smoke:spike` coverage that installs mdkg from a tarball in a
|
|
64
|
+
temp prefix, creates a fresh repo, exercises spike lifecycle and goal routing,
|
|
65
|
+
verifies structured exports and pack formats, creates follow-up task/test
|
|
66
|
+
nodes, and confirms no automatic skill generation occurs.
|
|
67
|
+
- Added mdkg.dev dogfood research spike nodes and follow-up roadmap nodes so
|
|
68
|
+
launch planning can proceed from evidence-backed spikes after this release.
|
|
69
|
+
|
|
70
|
+
### Changed
|
|
71
|
+
|
|
72
|
+
- Updated README, `CLI_COMMAND_MATRIX.md`, init assets, help text, command docs,
|
|
73
|
+
and publish-readiness assertions to describe spikes as actionable research
|
|
74
|
+
work nodes, not autonomous web-search or file-generation agents.
|
|
75
|
+
- Hardened init and upgrade compatibility so fresh and upgraded repos receive
|
|
76
|
+
the bundled spike template while customized spike templates are preserved.
|
|
77
|
+
- Hardened spike pack/export behavior across JSON, Markdown, XML, and toon
|
|
78
|
+
pack formats plus public visibility filtering for spike archive references.
|
|
79
|
+
- Hardened validation and fix-plan UX for malformed spikes: invalid ids,
|
|
80
|
+
statuses, priorities, missing refs, duplicate spike ids, and missing spike
|
|
81
|
+
body sections now have explicit test coverage and read-only repair guidance
|
|
82
|
+
where existing fix-plan families apply.
|
|
83
|
+
- Extended `mdkg fix plan refs` to inspect indexed `links`, `artifacts`, and
|
|
84
|
+
`refs` fields in addition to custom attributes, so missing archive refs in
|
|
85
|
+
normal node metadata appear in repair plans.
|
|
86
|
+
|
|
87
|
+
### Security
|
|
88
|
+
|
|
89
|
+
- Kept spikes as human/agent-authored Markdown work nodes only. This release
|
|
90
|
+
does not add a `mdkg spike ...` namespace, automatic web search, automatic
|
|
91
|
+
follow-up node creation, automatic `SKILL.md` generation, or repair apply
|
|
92
|
+
behavior.
|
|
93
|
+
- Preserved dry-run-only repair planning: spike-related fix guidance remains
|
|
94
|
+
receipt-shaped, non-mutating, and `apply_supported: false`.
|
|
95
|
+
|
|
15
96
|
## 0.3.1 - 2026-06-11
|
|
16
97
|
|
|
17
98
|
### Added
|
package/CLI_COMMAND_MATRIX.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# CLI Command Matrix
|
|
2
2
|
|
|
3
3
|
as_of: 2026-06-06
|
|
4
|
-
package_version_in_source: 0.
|
|
4
|
+
package_version_in_source: 0.3.1
|
|
5
5
|
source: live help from `src/cli.ts`, runtime command handlers, and `dec-15`..`dec-18`
|
|
6
6
|
status: canonical single-source command and flag reference for mdkg
|
|
7
7
|
|
|
@@ -101,6 +101,7 @@ Notes:
|
|
|
101
101
|
- removed flags `--llm`, `--agents`, `--claude`, and `--omni` fail before mutation with guidance to use `mdkg init --agent`
|
|
102
102
|
- published bootstrap config is root-only by default
|
|
103
103
|
- `--agent` creates `AGENT_START.md`, `AGENTS.md`, `CLAUDE.md`, `llms.txt`, `CLI_COMMAND_MATRIX.md`, strict-node core docs, default mdkg usage skills, `events.jsonl`, registry, and skill mirrors
|
|
104
|
+
- run `mdkg index` after fresh init before treating `mdkg doctor --strict --json` as a clean health gate; init writes source scaffold files and index writes generated caches
|
|
104
105
|
|
|
105
106
|
### `mdkg upgrade`
|
|
106
107
|
|
|
@@ -145,6 +146,7 @@ Types:
|
|
|
145
146
|
- `feat`
|
|
146
147
|
- `task`
|
|
147
148
|
- `bug`
|
|
149
|
+
- `spike`
|
|
148
150
|
- `checkpoint`
|
|
149
151
|
- `test`
|
|
150
152
|
|
|
@@ -169,6 +171,16 @@ Agent workflow file type creation:
|
|
|
169
171
|
Goal node creation:
|
|
170
172
|
- `mdkg new goal "<title>" [options] [--json]`
|
|
171
173
|
|
|
174
|
+
Spike node creation:
|
|
175
|
+
- `mdkg new spike "<research question>" [options] [--json]`
|
|
176
|
+
- spikes are actionable research/planning work nodes under `.mdkg/work/`
|
|
177
|
+
- use `mdkg task start|update|done <spike-id>` for lifecycle state
|
|
178
|
+
- spikes record research, sources, recommendations, follow-up node ideas, and
|
|
179
|
+
skill candidates in Markdown body sections
|
|
180
|
+
- spikes do not perform web search, execute research, create follow-up nodes,
|
|
181
|
+
or generate `SKILL.md` files automatically
|
|
182
|
+
- no `mdkg spike ...` namespace is exposed in this release
|
|
183
|
+
|
|
172
184
|
Primary flags:
|
|
173
185
|
- `--id <portable-id>` agent workflow file types only
|
|
174
186
|
- `--ws <alias>`
|
|
@@ -500,7 +512,7 @@ Notes:
|
|
|
500
512
|
- records include deterministic source metadata such as workspace, visibility, kind, id/qid/slug, path, headings, refs, source hash, and `indexed_at`
|
|
501
513
|
- SPEC and WORK capability records include read-only `linkage` arrays for related SPECs, work contracts, work orders, and receipts when those graph mirrors exist
|
|
502
514
|
- `.mdkg/index/capabilities.json` is rebuilt by `mdkg index` and by capability commands when stale
|
|
503
|
-
- normal task, epic, feat, bug, test, and checkpoint nodes are intentionally excluded
|
|
515
|
+
- normal task, epic, feat, bug, test, spike, and checkpoint nodes are intentionally excluded
|
|
504
516
|
- visibility is mdkg export metadata used by capability filters, `pack --visibility`, public bundle checks, validation, and doctor diagnostics; it is not secret scanning or body redaction
|
|
505
517
|
|
|
506
518
|
### `mdkg spec`
|
|
@@ -723,14 +735,16 @@ When to use:
|
|
|
723
735
|
Usage:
|
|
724
736
|
- `mdkg goal show <goal-id-or-qid> [--json]`
|
|
725
737
|
- `mdkg goal select <goal-id-or-qid> [--json]`
|
|
738
|
+
- `mdkg goal activate <goal-id-or-qid> [--json]`
|
|
726
739
|
- `mdkg goal current [--json]`
|
|
727
740
|
- `mdkg goal clear [--json]`
|
|
728
741
|
- `mdkg goal next [goal-id-or-qid] [--json]`
|
|
729
742
|
- `mdkg goal claim [goal-id-or-qid] <work-id-or-qid> [--json]`
|
|
730
743
|
- `mdkg goal evaluate <goal-id-or-qid> [--json]`
|
|
731
|
-
- `mdkg goal pause|resume|done <goal-id-or-qid> [--json]`
|
|
744
|
+
- `mdkg goal pause|resume|done|archive <goal-id-or-qid> [--json]`
|
|
732
745
|
- `mdkg goal show <goal-id-or-qid> [--ws <alias>] [--json]`
|
|
733
746
|
- `mdkg goal select <goal-id-or-qid> [--ws <alias>] [--json]`
|
|
747
|
+
- `mdkg goal activate <goal-id-or-qid> [--ws <alias>] [--json]`
|
|
734
748
|
- `mdkg goal current [--ws <alias>] [--json]`
|
|
735
749
|
- `mdkg goal next [goal-id-or-qid] [--ws <alias>] [--json]`
|
|
736
750
|
- `mdkg goal claim <work-id-or-qid> [--ws <alias>] [--json]`
|
|
@@ -739,27 +753,31 @@ Usage:
|
|
|
739
753
|
- `mdkg goal pause <goal-id-or-qid> [--ws <alias>] [--json]`
|
|
740
754
|
- `mdkg goal resume <goal-id-or-qid> [--ws <alias>] [--json]`
|
|
741
755
|
- `mdkg goal done <goal-id-or-qid> [--ws <alias>] [--json]`
|
|
756
|
+
- `mdkg goal archive <goal-id-or-qid> [--ws <alias>] [--json]`
|
|
742
757
|
|
|
743
758
|
Behavior:
|
|
744
759
|
- `goal show` reports goal condition, goal state, scope refs, active node, required skills, required checks, and source path.
|
|
745
760
|
- `goal select` writes local ignored selected-goal state so `goal next` can omit the goal id.
|
|
761
|
+
- `goal activate` makes one local root goal active, pauses competing local active goals in the same workspace, and writes selected-goal state.
|
|
746
762
|
- `goal current` shows the selected goal or unique active goal fallback.
|
|
747
763
|
- `goal clear` removes local selected-goal state.
|
|
748
|
-
- `goal next` is read-only and selects feature, task, bug, or
|
|
764
|
+
- `goal next` is read-only and selects feature, task, bug, test, or spike work inside explicit `scope_refs`; epics are recursive containers, not executable returns.
|
|
749
765
|
- `goal claim` mutates only `active_node` after the work item is confirmed inside the goal scope.
|
|
750
766
|
- `goal evaluate` is report-only and never runs commands from `required_checks`.
|
|
751
767
|
- `goal pause`, `goal resume`, and `goal done` update `goal_state`, compatible work status, and `updated`.
|
|
768
|
+
- `goal archive` marks a superseded historical goal as `status: archived` and `goal_state: archived`; archived goals remain show/search/list readable but are excluded from active routing.
|
|
752
769
|
- subgraph goal qids are read-only; update the source workspace instead.
|
|
753
770
|
|
|
754
771
|
JSON receipts:
|
|
755
772
|
- `show`: `{ action: "showed", goal }`
|
|
756
773
|
- `select`: `{ action: "selected_goal", goal, selection }`
|
|
774
|
+
- `activate`: `{ action: "activated", goal, activated_goal, paused_goals, selection, warnings }`
|
|
757
775
|
- `current`: `{ action: "current", goal, source, warnings }`
|
|
758
776
|
- `clear`: `{ action: "cleared_goal", path, cleared }`
|
|
759
777
|
- `next`: `{ action: "selected", goal, goal_source, node, warnings }`
|
|
760
778
|
- `claim`: `{ action: "claimed", goal, node }`
|
|
761
779
|
- `evaluate`: `{ action: "evaluated", goal, report_only, runs_scripts, checks, completion_evidence_present }`
|
|
762
|
-
- `pause|resume|done`: `{ action, goal }`
|
|
780
|
+
- `pause|resume|done|archive`: `{ action, goal }`
|
|
763
781
|
|
|
764
782
|
### `mdkg task`
|
|
765
783
|
|
|
@@ -779,7 +797,7 @@ Usage:
|
|
|
779
797
|
- `mdkg task start <id-or-qid> [--ws <alias>] [--run-id <id>] [--note "<text>"] [--json]`
|
|
780
798
|
|
|
781
799
|
Behavior:
|
|
782
|
-
- supports `task`, `bug`, and `
|
|
800
|
+
- supports task-like `feat`, `task`, `bug`, `test`, and `spike` nodes
|
|
783
801
|
- sets `status: progress`
|
|
784
802
|
- if `events.jsonl` is missing for the workspace, prints a short `stderr` reminder about `mdkg event enable`
|
|
785
803
|
|
|
@@ -795,7 +813,7 @@ Usage:
|
|
|
795
813
|
- ` [--clear-blocked-by] [--run-id <id>] [--note "<text>"] [--json]`
|
|
796
814
|
|
|
797
815
|
Behavior:
|
|
798
|
-
- supports `task`, `bug`, and `
|
|
816
|
+
- supports task-like `feat`, `task`, `bug`, `test`, and `spike` nodes
|
|
799
817
|
- list mutations are additive and unique
|
|
800
818
|
- scalar fields replace existing values
|
|
801
819
|
- `--clear-blocked-by` clears blockers before optional re-add
|
|
@@ -810,7 +828,7 @@ Usage:
|
|
|
810
828
|
- ` [--add-refs <id,...>] [--checkpoint "<title>"] [--run-id <id>] [--note "<text>"] [--json]`
|
|
811
829
|
|
|
812
830
|
Behavior:
|
|
813
|
-
- supports `task`, `bug`, and `
|
|
831
|
+
- supports task-like `feat`, `task`, `bug`, `test`, and `spike` nodes
|
|
814
832
|
- sets `status: done`
|
|
815
833
|
- `--checkpoint` creates a related checkpoint
|
|
816
834
|
- if `events.jsonl` is missing for the workspace, prints a short `stderr` reminder about `mdkg event enable`
|
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ mdkg stays deliberately boring:
|
|
|
14
14
|
- first-class rebuildable SQLite cache through built-in `node:sqlite`
|
|
15
15
|
- no daemon, hosted index, or vector DB
|
|
16
16
|
|
|
17
|
-
Current package version in source: `0.
|
|
17
|
+
Current package version in source: `0.3.1`
|
|
18
18
|
|
|
19
19
|
mdkg is still pre-v1 public alpha software. The public package is usable, but graph, cache, bundle, and DAL contracts may continue to change quickly while the project converges on a stable v1 surface.
|
|
20
20
|
|
|
@@ -48,10 +48,16 @@ Initialize mdkg in a repo:
|
|
|
48
48
|
|
|
49
49
|
```bash
|
|
50
50
|
mdkg init --agent
|
|
51
|
+
mdkg index
|
|
51
52
|
```
|
|
52
53
|
|
|
53
54
|
This is the canonical AI-agent bootstrap path. It creates `.mdkg/`, `AGENT_START.md`, `AGENTS.md`, `CLAUDE.md`, `llms.txt`, `CLI_COMMAND_MATRIX.md`, strict-node `SOUL.md` / `HUMAN.md`, the three default mdkg usage skills, `events.jsonl`, the skill registry, core pin updates, and mirrored skill folders under `.agents/skills/` and `.claude/skills/`. It also updates `.gitignore` / `.npmignore` by default. Use `--no-update-ignores` to opt out of those ignore-file updates.
|
|
54
55
|
|
|
56
|
+
Run `mdkg index` after a fresh init before using `mdkg status --json` or
|
|
57
|
+
`mdkg doctor --strict --json` as health gates. Init writes source scaffold
|
|
58
|
+
files; indexing creates the generated graph, skill, capability, subgraph, and
|
|
59
|
+
SQLite caches that strict doctor expects.
|
|
60
|
+
|
|
55
61
|
For a non-agent markdown graph only, run `mdkg init`.
|
|
56
62
|
|
|
57
63
|
Preview safe scaffold upgrades in an existing mdkg workspace:
|
|
@@ -86,7 +92,28 @@ mdkg goal next goal-1
|
|
|
86
92
|
mdkg goal evaluate goal-1 --json
|
|
87
93
|
```
|
|
88
94
|
|
|
89
|
-
Goal nodes capture a measurable end condition, recursive loop state, required skills, required checks, and completion evidence. They guide agent harnesses through repeated graph-backed progress, while tasks, bugs, tests, and features remain the concrete executable work units. In this release `mdkg goal evaluate` is report-only: it lists required checks and evidence state, but does not execute scripts.
|
|
95
|
+
Goal nodes capture a measurable end condition, recursive loop state, required skills, required checks, and completion evidence. They guide agent harnesses through repeated graph-backed progress, while tasks, bugs, tests, spikes, and features remain the concrete executable work units. In this release `mdkg goal evaluate` is report-only: it lists required checks and evidence state, but does not execute scripts.
|
|
96
|
+
|
|
97
|
+
Create a research spike when the next useful work is investigation, planning,
|
|
98
|
+
or grounding a future implementation:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
mdkg new spike "research mdkg.dev launch guide" --status todo --priority 1
|
|
102
|
+
mdkg task start spike-1
|
|
103
|
+
mdkg show spike-1
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Spikes are task-like work nodes, not autonomous research agents. mdkg does not
|
|
107
|
+
perform web search, execute research, create follow-up nodes, or generate
|
|
108
|
+
`SKILL.md` files automatically. Record sources, findings, tradeoffs,
|
|
109
|
+
recommendations, follow-up node ideas, and skill candidates in the spike body,
|
|
110
|
+
then create follow-up work intentionally:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
mdkg new task "write mdkg.dev quickstart guide" --parent spike-1 --status todo --priority 1
|
|
114
|
+
mdkg new test "validate mdkg.dev docs examples" --parent spike-1 --status todo --priority 1
|
|
115
|
+
mdkg new task "author mdkg.dev launch planning skill" --parent spike-1 --status todo --priority 2
|
|
116
|
+
```
|
|
90
117
|
|
|
91
118
|
Create an agent workflow document with a semantic portable id:
|
|
92
119
|
|
|
@@ -250,7 +277,7 @@ The root docs below are the canonical fast-start set for humans and agents:
|
|
|
250
277
|
mdkg lives under a hidden root directory:
|
|
251
278
|
- `.mdkg/core/` rules and pinned docs
|
|
252
279
|
- `.mdkg/design/` product, design, and decision docs
|
|
253
|
-
- `.mdkg/work/` tasks, bugs, tests, epics, checkpoints
|
|
280
|
+
- `.mdkg/work/` tasks, bugs, tests, spikes, epics, checkpoints
|
|
254
281
|
- `.mdkg/templates/` templates used by `mdkg new`
|
|
255
282
|
- `.mdkg/skills/` Agent Skills packages
|
|
256
283
|
- `.mdkg/archive/` sidecar metadata plus deterministic compressed source/artifact caches
|
|
@@ -434,12 +461,35 @@ as sealed state.
|
|
|
434
461
|
|
|
435
462
|
Goal nodes are durable recursive objective contracts. Use `mdkg new goal "<objective>"` when a human or agent needs to keep working across multiple concrete nodes until a measurable end condition is achieved.
|
|
436
463
|
|
|
437
|
-
`goal` is work-like but distinct from `task`: it can have status, priority, graph links, skills, explicit `scope_refs`, and structured goal fields, but normal `mdkg next` does not select goals. Use `mdkg goal
|
|
464
|
+
`goal` is work-like but distinct from `task`: it can have status, priority, graph links, skills, explicit `scope_refs`, and structured goal fields, but normal `mdkg next` does not select goals. Use `mdkg goal activate <goal-id>` to make one local root goal active, pause competing local active goals, and select it for future `goal next` calls. Use `mdkg goal select <goal-id>` only when you want to change the local ignored selected-goal pointer without changing lifecycle state. `mdkg goal next <goal-id>` remains available for explicit selection. Epics organize goal scope recursively but are not returned as executable work.
|
|
438
465
|
|
|
439
|
-
Use `mdkg goal claim [goal-id] <work-id>` to durably set `active_node` after choosing the next scoped item. `goal next` is read-only. Use `mdkg goal pause|resume|done` to update goal state after review.
|
|
466
|
+
Use `mdkg goal claim [goal-id] <work-id>` to durably set `active_node` after choosing the next scoped item. `goal next` is read-only. Use `mdkg goal pause|resume|done` to update goal state after review, and `mdkg goal archive` for superseded historical roadmap goals that should remain readable but non-actionable.
|
|
440
467
|
|
|
441
468
|
Required checks are stored as report-only guidance. Agents should run the checks themselves, record evidence in the goal or active work item, then use `mdkg goal evaluate` to summarize the current evidence state. During normal goal execution, skill improvements should be recorded as improvement candidates or proposal nodes; edit `SKILL.md` files only when the active node is explicit skill-maintenance work.
|
|
442
469
|
|
|
470
|
+
## Research spikes
|
|
471
|
+
|
|
472
|
+
Spikes are first-class actionable work nodes for research and planning. Use
|
|
473
|
+
`mdkg new spike "<question>"` when the right output is a documented
|
|
474
|
+
recommendation, not code. They share the existing task lifecycle:
|
|
475
|
+
|
|
476
|
+
```bash
|
|
477
|
+
mdkg new spike "research queue-backed materializer UX" --status todo --priority 1
|
|
478
|
+
mdkg task start spike-1
|
|
479
|
+
mdkg task update spike-1 --status review --add-refs task-250
|
|
480
|
+
mdkg task done spike-1
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
The default spike template includes sections for research question, context,
|
|
484
|
+
search plan, findings, options and tradeoffs, recommendation, follow-up nodes,
|
|
485
|
+
skill candidates, data-structure and algorithm notes, UX notes, security notes,
|
|
486
|
+
mdkg.dev launch implications, and evidence/sources.
|
|
487
|
+
|
|
488
|
+
Spikes deliberately do not expose a `mdkg spike ...` namespace in this release,
|
|
489
|
+
do not run browser or web-search tools, do not create tasks/tests/goals, and do
|
|
490
|
+
not write `SKILL.md` files. They make the research output reviewable so humans
|
|
491
|
+
or agents can intentionally create the next nodes with normal mdkg commands.
|
|
492
|
+
|
|
443
493
|
## Agent workflow files
|
|
444
494
|
|
|
445
495
|
mdkg recognizes a small set of canonical agent workflow documents:
|
package/dist/cli.js
CHANGED
|
@@ -136,7 +136,7 @@ function printNewHelp(log) {
|
|
|
136
136
|
log("Usage:");
|
|
137
137
|
log(' mdkg new <type> "<title>" [options] [--json]');
|
|
138
138
|
log("\nTypes:");
|
|
139
|
-
log(" rule prd edd dec prop goal epic feat task bug checkpoint test");
|
|
139
|
+
log(" rule prd edd dec prop goal epic feat task bug spike checkpoint test");
|
|
140
140
|
log("\nAgent workflow file types:");
|
|
141
141
|
log(" spec work work_order receipt feedback dispute proposal");
|
|
142
142
|
log(" Use --id <portable-id> with these types for semantic ids like agent.image-worker.");
|
|
@@ -157,6 +157,9 @@ function printNewHelp(log) {
|
|
|
157
157
|
log(" --owners <owner,owner,...> Owners");
|
|
158
158
|
log("\nNotes:");
|
|
159
159
|
log(" spec/work scaffold as validation-clean docs; relational workflow docs need real refs.");
|
|
160
|
+
log(" spike creates actionable research/planning work; use `mdkg task ...` for lifecycle.");
|
|
161
|
+
log(" record spike research evidence by editing the Markdown body sections.");
|
|
162
|
+
log(" spikes do not run web search, create follow-up nodes, generate SKILL.md, or expose `mdkg spike ...`.");
|
|
160
163
|
printGlobalOptions(log);
|
|
161
164
|
}
|
|
162
165
|
function printGuideHelp(log) {
|
|
@@ -690,7 +693,7 @@ function printTaskHelp(log, subcommand) {
|
|
|
690
693
|
log("Usage:");
|
|
691
694
|
log(' mdkg task start <id-or-qid> [--ws <alias>] [--run-id <id>] [--note "<text>"] [--json]');
|
|
692
695
|
log("\nWhen to use:");
|
|
693
|
-
log(" Move a task, bug, or
|
|
696
|
+
log(" Move a task-like node (feat, task, bug, test, or spike) into progress as a structured state change.");
|
|
694
697
|
log(" If `events.jsonl` is missing, mdkg prints a short reminder about `mdkg event enable`.");
|
|
695
698
|
printGlobalOptions(log);
|
|
696
699
|
return;
|
|
@@ -719,7 +722,8 @@ function printTaskHelp(log, subcommand) {
|
|
|
719
722
|
log(" mdkg task update <id-or-qid> [options] [--json]");
|
|
720
723
|
log(' mdkg task done <id-or-qid> [--checkpoint "<title>"] [options] [--json]');
|
|
721
724
|
log("\nNotes:");
|
|
722
|
-
log(" `mdkg task ...` only supports feat, task, bug, and
|
|
725
|
+
log(" `mdkg task ...` only supports feat, task, bug, test, and spike nodes.");
|
|
726
|
+
log(" Spikes use this lifecycle; there is no separate `mdkg spike ...` command family.");
|
|
723
727
|
log(" Feat and epic closeout remain checkpoint-first guidance plus manual parent updates.");
|
|
724
728
|
printGlobalOptions(log);
|
|
725
729
|
}
|
|
@@ -737,7 +741,7 @@ function printGoalHelp(log, subcommand) {
|
|
|
737
741
|
log("Usage:");
|
|
738
742
|
log(" mdkg goal next [goal-id-or-qid] [--ws <alias>] [--json]");
|
|
739
743
|
log("\nWhen to use:");
|
|
740
|
-
log(" Select the next local feature, task, bug, or
|
|
744
|
+
log(" Select the next local feature, task, bug, test, or spike inside a recursive goal without mutating active_node.");
|
|
741
745
|
log(" If no goal id is supplied, mdkg uses the selected goal or the unique active goal.");
|
|
742
746
|
printGlobalOptions(log);
|
|
743
747
|
return;
|
|
@@ -748,6 +752,21 @@ function printGoalHelp(log, subcommand) {
|
|
|
748
752
|
log(" Store a local selected goal so `mdkg goal next` can omit the goal id.");
|
|
749
753
|
printGlobalOptions(log);
|
|
750
754
|
return;
|
|
755
|
+
case "activate":
|
|
756
|
+
log("Usage:");
|
|
757
|
+
log(" mdkg goal activate <goal-id-or-qid> [--ws <alias>] [--json]");
|
|
758
|
+
log("\nWhen to use:");
|
|
759
|
+
log(" Make one local root goal active, pause competing local active goals, and select it for `goal next`.");
|
|
760
|
+
log(" Imported subgraph goals are read-only and are not mutated by activation.");
|
|
761
|
+
printGlobalOptions(log);
|
|
762
|
+
return;
|
|
763
|
+
case "archive":
|
|
764
|
+
log("Usage:");
|
|
765
|
+
log(" mdkg goal archive <goal-id-or-qid> [--ws <alias>] [--json]");
|
|
766
|
+
log("\nWhen to use:");
|
|
767
|
+
log(" Mark a superseded historical goal archived so it remains readable but is excluded from active routing.");
|
|
768
|
+
printGlobalOptions(log);
|
|
769
|
+
return;
|
|
751
770
|
case "current":
|
|
752
771
|
log("Usage:");
|
|
753
772
|
log(" mdkg goal current [--ws <alias>] [--json]");
|
|
@@ -790,15 +809,17 @@ function printGoalHelp(log, subcommand) {
|
|
|
790
809
|
log("Usage:");
|
|
791
810
|
log(" mdkg goal show <goal-id-or-qid> [--json]");
|
|
792
811
|
log(" mdkg goal select <goal-id-or-qid> [--json]");
|
|
812
|
+
log(" mdkg goal activate <goal-id-or-qid> [--json]");
|
|
793
813
|
log(" mdkg goal current [--json]");
|
|
794
814
|
log(" mdkg goal next [goal-id-or-qid] [--json]");
|
|
795
815
|
log(" mdkg goal claim [goal-id-or-qid] <work-id-or-qid> [--json]");
|
|
796
816
|
log(" mdkg goal evaluate <goal-id-or-qid> [--json]");
|
|
797
817
|
log(" mdkg goal clear [--json]");
|
|
798
|
-
log(" mdkg goal pause|resume|done <goal-id-or-qid> [--json]");
|
|
818
|
+
log(" mdkg goal pause|resume|done|archive <goal-id-or-qid> [--json]");
|
|
799
819
|
log("\nNotes:");
|
|
800
|
-
log(" - goals orchestrate recursive progress; features, tasks, bugs, and
|
|
820
|
+
log(" - goals orchestrate recursive progress; features, tasks, bugs, tests, and spikes are iterable work units");
|
|
801
821
|
log(" - `mdkg goal next` is read-only; use `mdkg goal claim` to update active_node");
|
|
822
|
+
log(" - `mdkg goal activate` enforces one active local root goal and pauses competing active goals");
|
|
802
823
|
log(" - goal evaluation is report-only and never executes required_checks");
|
|
803
824
|
log(" - subgraph goal qids are read-only; update the source workspace instead");
|
|
804
825
|
printGlobalOptions(log);
|
|
@@ -2086,6 +2107,14 @@ function runGoalSubcommand(parsed, root) {
|
|
|
2086
2107
|
(0, goal_1.runGoalSelectCommand)({ root, id, ws, json });
|
|
2087
2108
|
return 0;
|
|
2088
2109
|
}
|
|
2110
|
+
case "activate": {
|
|
2111
|
+
const id = parsed.positionals[2];
|
|
2112
|
+
if (!id || parsed.positionals.length > 3) {
|
|
2113
|
+
throw new errors_1.UsageError("goal activate requires <goal-id-or-qid>");
|
|
2114
|
+
}
|
|
2115
|
+
(0, goal_1.runGoalActivateCommand)({ root, id, ws, json });
|
|
2116
|
+
return 0;
|
|
2117
|
+
}
|
|
2089
2118
|
case "current":
|
|
2090
2119
|
if (parsed.positionals.length > 2) {
|
|
2091
2120
|
throw new errors_1.UsageError("goal current does not accept positional arguments");
|
|
@@ -2147,8 +2176,16 @@ function runGoalSubcommand(parsed, root) {
|
|
|
2147
2176
|
(0, goal_1.runGoalDoneCommand)({ root, id, ws, json });
|
|
2148
2177
|
return 0;
|
|
2149
2178
|
}
|
|
2179
|
+
case "archive": {
|
|
2180
|
+
const id = parsed.positionals[2];
|
|
2181
|
+
if (!id || parsed.positionals.length > 3) {
|
|
2182
|
+
throw new errors_1.UsageError("goal archive requires <goal-id-or-qid>");
|
|
2183
|
+
}
|
|
2184
|
+
(0, goal_1.runGoalArchiveCommand)({ root, id, ws, json });
|
|
2185
|
+
return 0;
|
|
2186
|
+
}
|
|
2150
2187
|
default:
|
|
2151
|
-
throw new errors_1.UsageError("goal requires show/select/current/clear/next/claim/evaluate/pause/resume/done");
|
|
2188
|
+
throw new errors_1.UsageError("goal requires show/select/activate/current/clear/next/claim/evaluate/pause/resume/done/archive");
|
|
2152
2189
|
}
|
|
2153
2190
|
}
|
|
2154
2191
|
function runTaskSubcommand(parsed, root) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
3
|
"tool": "mdkg",
|
|
4
|
-
"package_version": "0.3.
|
|
4
|
+
"package_version": "0.3.3",
|
|
5
5
|
"source": {
|
|
6
6
|
"help_targets": "scripts/cli_help_targets.js",
|
|
7
7
|
"command_matrix": "CLI_COMMAND_MATRIX.md"
|
|
@@ -2430,12 +2430,13 @@
|
|
|
2430
2430
|
"usage": [
|
|
2431
2431
|
" mdkg goal show <goal-id-or-qid> [--json]",
|
|
2432
2432
|
" mdkg goal select <goal-id-or-qid> [--json]",
|
|
2433
|
+
" mdkg goal activate <goal-id-or-qid> [--json]",
|
|
2433
2434
|
" mdkg goal current [--json]",
|
|
2434
2435
|
" mdkg goal next [goal-id-or-qid] [--json]",
|
|
2435
2436
|
" mdkg goal claim [goal-id-or-qid] <work-id-or-qid> [--json]",
|
|
2436
2437
|
" mdkg goal evaluate <goal-id-or-qid> [--json]",
|
|
2437
2438
|
" mdkg goal clear [--json]",
|
|
2438
|
-
" mdkg goal pause|resume|done <goal-id-or-qid> [--json]"
|
|
2439
|
+
" mdkg goal pause|resume|done|archive <goal-id-or-qid> [--json]"
|
|
2439
2440
|
],
|
|
2440
2441
|
"args": [
|
|
2441
2442
|
{
|
|
@@ -2505,7 +2506,7 @@
|
|
|
2505
2506
|
}
|
|
2506
2507
|
],
|
|
2507
2508
|
"examples": [
|
|
2508
|
-
" mdkg goal
|
|
2509
|
+
" mdkg goal activate <goal-id-or-qid> [--json]",
|
|
2509
2510
|
" mdkg goal select <goal-id-or-qid> [--json]",
|
|
2510
2511
|
" mdkg goal show <goal-id-or-qid> [--json]"
|
|
2511
2512
|
],
|
|
@@ -2514,6 +2515,172 @@
|
|
|
2514
2515
|
"command_matrix": "CLI_COMMAND_MATRIX.md"
|
|
2515
2516
|
}
|
|
2516
2517
|
},
|
|
2518
|
+
{
|
|
2519
|
+
"key": "goal activate",
|
|
2520
|
+
"path": [
|
|
2521
|
+
"goal",
|
|
2522
|
+
"activate"
|
|
2523
|
+
],
|
|
2524
|
+
"category": "goal",
|
|
2525
|
+
"status": "stable",
|
|
2526
|
+
"visibility": "public",
|
|
2527
|
+
"summary": "mdkg goal activate command",
|
|
2528
|
+
"usage": [
|
|
2529
|
+
" mdkg goal activate <goal-id-or-qid> [--ws <alias>] [--json]"
|
|
2530
|
+
],
|
|
2531
|
+
"args": [
|
|
2532
|
+
{
|
|
2533
|
+
"name": "goal-id-or-qid",
|
|
2534
|
+
"required": true,
|
|
2535
|
+
"source": "<goal-id-or-qid>"
|
|
2536
|
+
}
|
|
2537
|
+
],
|
|
2538
|
+
"flags": [
|
|
2539
|
+
{
|
|
2540
|
+
"name": "--help",
|
|
2541
|
+
"value": null,
|
|
2542
|
+
"required": false,
|
|
2543
|
+
"description": "--help, -h Show help"
|
|
2544
|
+
},
|
|
2545
|
+
{
|
|
2546
|
+
"name": "--root",
|
|
2547
|
+
"value": null,
|
|
2548
|
+
"required": false,
|
|
2549
|
+
"description": "--root, -r <path> Run against a specific repo root"
|
|
2550
|
+
},
|
|
2551
|
+
{
|
|
2552
|
+
"name": "--version",
|
|
2553
|
+
"value": null,
|
|
2554
|
+
"required": false,
|
|
2555
|
+
"description": "--version, -V Show version"
|
|
2556
|
+
}
|
|
2557
|
+
],
|
|
2558
|
+
"output_formats": [
|
|
2559
|
+
"text",
|
|
2560
|
+
"json"
|
|
2561
|
+
],
|
|
2562
|
+
"json_schema_ref": "mdkg.command_output.v1",
|
|
2563
|
+
"side_effects": [
|
|
2564
|
+
"activate-goal-and-pause-competing-goals"
|
|
2565
|
+
],
|
|
2566
|
+
"read_paths": [
|
|
2567
|
+
".mdkg/**"
|
|
2568
|
+
],
|
|
2569
|
+
"write_paths": [
|
|
2570
|
+
".mdkg/**/*.md",
|
|
2571
|
+
".mdkg/index/**"
|
|
2572
|
+
],
|
|
2573
|
+
"dry_run": {
|
|
2574
|
+
"supported": false
|
|
2575
|
+
},
|
|
2576
|
+
"lock_policy": "mutation-lock-required",
|
|
2577
|
+
"atomic_write_policy": "atomic-file-writes",
|
|
2578
|
+
"receipts": [
|
|
2579
|
+
"goal-state-receipt"
|
|
2580
|
+
],
|
|
2581
|
+
"danger_level": "moderate",
|
|
2582
|
+
"aliases": [],
|
|
2583
|
+
"exit_codes": [
|
|
2584
|
+
{
|
|
2585
|
+
"code": 0,
|
|
2586
|
+
"meaning": "success"
|
|
2587
|
+
},
|
|
2588
|
+
{
|
|
2589
|
+
"code": 1,
|
|
2590
|
+
"meaning": "validation-or-runtime-error"
|
|
2591
|
+
}
|
|
2592
|
+
],
|
|
2593
|
+
"examples": [
|
|
2594
|
+
" mdkg goal activate <goal-id-or-qid> [--ws <alias>] [--json]"
|
|
2595
|
+
],
|
|
2596
|
+
"docs": {
|
|
2597
|
+
"help_target": "mdkg help goal activate",
|
|
2598
|
+
"command_matrix": "CLI_COMMAND_MATRIX.md"
|
|
2599
|
+
}
|
|
2600
|
+
},
|
|
2601
|
+
{
|
|
2602
|
+
"key": "goal archive",
|
|
2603
|
+
"path": [
|
|
2604
|
+
"goal",
|
|
2605
|
+
"archive"
|
|
2606
|
+
],
|
|
2607
|
+
"category": "goal",
|
|
2608
|
+
"status": "stable",
|
|
2609
|
+
"visibility": "public",
|
|
2610
|
+
"summary": "mdkg goal archive command",
|
|
2611
|
+
"usage": [
|
|
2612
|
+
" mdkg goal archive <goal-id-or-qid> [--ws <alias>] [--json]"
|
|
2613
|
+
],
|
|
2614
|
+
"args": [
|
|
2615
|
+
{
|
|
2616
|
+
"name": "goal-id-or-qid",
|
|
2617
|
+
"required": true,
|
|
2618
|
+
"source": "<goal-id-or-qid>"
|
|
2619
|
+
}
|
|
2620
|
+
],
|
|
2621
|
+
"flags": [
|
|
2622
|
+
{
|
|
2623
|
+
"name": "--help",
|
|
2624
|
+
"value": null,
|
|
2625
|
+
"required": false,
|
|
2626
|
+
"description": "--help, -h Show help"
|
|
2627
|
+
},
|
|
2628
|
+
{
|
|
2629
|
+
"name": "--root",
|
|
2630
|
+
"value": null,
|
|
2631
|
+
"required": false,
|
|
2632
|
+
"description": "--root, -r <path> Run against a specific repo root"
|
|
2633
|
+
},
|
|
2634
|
+
{
|
|
2635
|
+
"name": "--version",
|
|
2636
|
+
"value": null,
|
|
2637
|
+
"required": false,
|
|
2638
|
+
"description": "--version, -V Show version"
|
|
2639
|
+
}
|
|
2640
|
+
],
|
|
2641
|
+
"output_formats": [
|
|
2642
|
+
"text",
|
|
2643
|
+
"json"
|
|
2644
|
+
],
|
|
2645
|
+
"json_schema_ref": "mdkg.command_output.v1",
|
|
2646
|
+
"side_effects": [
|
|
2647
|
+
"archive-goal"
|
|
2648
|
+
],
|
|
2649
|
+
"read_paths": [
|
|
2650
|
+
".mdkg/**"
|
|
2651
|
+
],
|
|
2652
|
+
"write_paths": [
|
|
2653
|
+
".mdkg/**/*.md",
|
|
2654
|
+
".mdkg/index/**"
|
|
2655
|
+
],
|
|
2656
|
+
"dry_run": {
|
|
2657
|
+
"supported": false
|
|
2658
|
+
},
|
|
2659
|
+
"lock_policy": "mutation-lock-required",
|
|
2660
|
+
"atomic_write_policy": "atomic-file-writes",
|
|
2661
|
+
"receipts": [
|
|
2662
|
+
"goal-state-receipt"
|
|
2663
|
+
],
|
|
2664
|
+
"danger_level": "moderate",
|
|
2665
|
+
"aliases": [],
|
|
2666
|
+
"exit_codes": [
|
|
2667
|
+
{
|
|
2668
|
+
"code": 0,
|
|
2669
|
+
"meaning": "success"
|
|
2670
|
+
},
|
|
2671
|
+
{
|
|
2672
|
+
"code": 1,
|
|
2673
|
+
"meaning": "validation-or-runtime-error"
|
|
2674
|
+
}
|
|
2675
|
+
],
|
|
2676
|
+
"examples": [
|
|
2677
|
+
" mdkg goal archive <goal-id-or-qid> [--ws <alias>] [--json]"
|
|
2678
|
+
],
|
|
2679
|
+
"docs": {
|
|
2680
|
+
"help_target": "mdkg help goal archive",
|
|
2681
|
+
"command_matrix": "CLI_COMMAND_MATRIX.md"
|
|
2682
|
+
}
|
|
2683
|
+
},
|
|
2517
2684
|
{
|
|
2518
2685
|
"key": "goal claim",
|
|
2519
2686
|
"path": [
|
|
@@ -7469,5 +7636,5 @@
|
|
|
7469
7636
|
}
|
|
7470
7637
|
}
|
|
7471
7638
|
],
|
|
7472
|
-
"contract_hash": "
|
|
7639
|
+
"contract_hash": "be42c29b89c1c3e3d059a8f9cbc564908d4dd694d848cf3d1b1800e8b30705e5"
|
|
7473
7640
|
}
|