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.
@@ -8,7 +8,7 @@ mdkg is pre-v1 public alpha software. Graph, cache, bundle, and DAL contracts ma
8
8
 
9
9
  - `core/`: rules, operating guide, and pinned docs
10
10
  - `design/`: product/engineering decision records
11
- - `work/`: epics, tasks, bugs, tests, checkpoints
11
+ - `work/`: epics, tasks, bugs, tests, spikes, checkpoints
12
12
  - `templates/`: default node templates
13
13
  - `archive/`: sidecar metadata and deterministic compressed source/artifact caches
14
14
  - `bundles/`: optional committed full graph snapshot bundles
@@ -20,6 +20,7 @@ mdkg is pre-v1 public alpha software. Graph, cache, bundle, and DAL contracts ma
20
20
 
21
21
  ```bash
22
22
  mdkg upgrade
23
+ mdkg index
23
24
  mdkg new task "..." --status todo --priority 1
24
25
  mdkg search "..."
25
26
  mdkg show <id>
@@ -34,18 +35,34 @@ mdkg fix plan --json
34
35
  mdkg validate
35
36
  ```
36
37
 
37
- This repo is already initialized. Use `mdkg upgrade` to preview safe scaffold updates, `mdkg new` to create work, `mdkg new goal "..."` plus `mdkg goal select/current/next/claim/evaluate` for recursive long-running objectives, `mdkg search`/`mdkg show` to inspect graph state, `mdkg capability ...` to inspect cached skill/spec/work/core/design capabilities, `mdkg spec ...` for focused optional SPEC records, `mdkg capability resolve ...` to rank local and subgraph capabilities, `mdkg archive ...` to register source/artifact sidecars, `mdkg work ...` to create work contract/order/receipt semantic mirrors and deterministic trigger/verification records, `mdkg bundle ...` to create full graph snapshot bundles, `mdkg subgraph ...` to register read-only child graph planning views, `mdkg pack <id>` to build deterministic context, and `mdkg validate` before closeout.
38
+ This repo is already initialized. Use `mdkg upgrade` to preview safe scaffold updates, `mdkg index` to create or refresh generated graph/skill/capability/subgraph and SQLite caches after init, `mdkg new` to create work, `mdkg new goal "..."` plus `mdkg goal activate/current/next/claim/evaluate` for recursive long-running objectives, `mdkg search`/`mdkg show` to inspect graph state, `mdkg capability ...` to inspect cached skill/spec/work/core/design capabilities, `mdkg spec ...` for focused optional SPEC records, `mdkg capability resolve ...` to rank local and subgraph capabilities, `mdkg archive ...` to register source/artifact sidecars, `mdkg work ...` to create work contract/order/receipt semantic mirrors and deterministic trigger/verification records, `mdkg bundle ...` to create full graph snapshot bundles, `mdkg subgraph ...` to register read-only child graph planning views, `mdkg pack <id>` to build deterministic context, and `mdkg validate` before closeout.
38
39
 
39
40
  Use `mdkg status --json` for a read-only operator summary of Git, graph,
40
41
  selected-goal, project DB, and generated-cache health before mutating work. Use
41
42
  `mdkg doctor --strict --json` for typed diagnostic checks in CI or agent
42
- orchestration. These commands inspect state; they do not apply repairs.
43
+ orchestration. These commands inspect state; they do not apply repairs. After a
44
+ fresh init, run `mdkg index` first so strict doctor can load generated caches.
43
45
 
44
46
  Use `mdkg fix plan --json` for dry-run repair guidance. It reports generated
45
47
  index/cache repair hints, missing graph references, and duplicate local ids as
46
48
  receipt-shaped planned changes with risk levels and `apply_supported: false`.
47
49
  `fix apply` is not exposed; repair application is intentionally deferred.
48
50
 
51
+ Use research spikes for investigation and planning work that should produce a
52
+ reviewable recommendation before implementation:
53
+
54
+ ```bash
55
+ mdkg new spike "research docs launch workflow" --status todo --priority 1
56
+ mdkg task start spike-1
57
+ mdkg show spike-1
58
+ ```
59
+
60
+ Spikes use the existing task lifecycle and goal routing. They do not perform web
61
+ search, execute research, create follow-up nodes, or generate `SKILL.md` files
62
+ automatically. Record sources, findings, recommendations, follow-up node ideas,
63
+ and skill candidates in the spike body, then create follow-up tasks or tests
64
+ intentionally with `mdkg new task ...` or `mdkg new test ...`.
65
+
49
66
  Agent workflow docs can use semantic ids:
50
67
 
51
68
  ```bash
@@ -67,10 +67,19 @@ It MUST NOT include:
67
67
  - verify `package.json` `"files"` includes only expected files
68
68
  - optionally run `npm pack` and inspect tarball contents
69
69
 
70
- 7) Publish
71
- - `npm publish`
72
-
73
- 8) Tag and push
70
+ 7) Confirm npm auth
71
+ - if using an exported `NPM_TOKEN`, create a temporary npm userconfig that
72
+ references `${NPM_TOKEN}` literally:
73
+ `//registry.npmjs.org/:_authToken=${NPM_TOKEN}`
74
+ - run `npm whoami --registry=https://registry.npmjs.org/ --userconfig=/private/tmp/mdkg-npm-publish.npmrc`
75
+ - do not print the token, do not commit the temp userconfig, and do not add
76
+ unsupported `always-auth` config
77
+
78
+ 8) Publish
79
+ - `npm publish --registry=https://registry.npmjs.org/ --userconfig=/private/tmp/mdkg-npm-publish.npmrc`
80
+ - omit `--userconfig` only when an existing npm login has already been verified
81
+
82
+ 9) Tag and push
74
83
  - create git tag matching version (example `v0.1.0`)
75
84
  - push commits and tags
76
85
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schema_version": 1,
3
3
  "tool": "mdkg",
4
- "mdkg_version": "0.3.1",
4
+ "mdkg_version": "0.3.3",
5
5
  "files": [
6
6
  {
7
7
  "path": ".mdkg/config.json",
@@ -46,7 +46,7 @@
46
46
  {
47
47
  "path": ".mdkg/core/rule-5-release-and-versioning.md",
48
48
  "category": "core",
49
- "sha256": "e97b00aa3ade29011f1f2b482042ec292f74aad8b1d72e2f8e691cdeca5d4f70"
49
+ "sha256": "d7862806f999ae23b1d8bc3446f8c81b3a7fdd7d87920d966f59795a84978a03"
50
50
  },
51
51
  {
52
52
  "path": ".mdkg/core/rule-6-templates-and-schemas.md",
@@ -61,7 +61,7 @@
61
61
  {
62
62
  "path": ".mdkg/README.md",
63
63
  "category": "mdkg_doc",
64
- "sha256": "0661196763bf05681523a576fcd0a29138ccc36df4f48dad7ba16a1f4b7b0418"
64
+ "sha256": "68b5f4d2d04a4dc9a062e54a594d684b3816c0b614079eb6b08f0dca16fd0b47"
65
65
  },
66
66
  {
67
67
  "path": ".mdkg/skills/build-pack-and-execute-task/SKILL.md",
@@ -71,7 +71,7 @@
71
71
  {
72
72
  "path": ".mdkg/skills/pursue-mdkg-goal/SKILL.md",
73
73
  "category": "default_skill",
74
- "sha256": "fd64f666fb1329c392ff0979ed9999b71ad948cbca6a191502eb2cdfd76ec825"
74
+ "sha256": "2bc888092d95b362e402494af4dbe6909204bd5578613d6159753a84efaae16d"
75
75
  },
76
76
  {
77
77
  "path": ".mdkg/skills/select-work-and-ground-context/SKILL.md",
@@ -163,6 +163,11 @@
163
163
  "category": "template",
164
164
  "sha256": "8c96e0b6dafa65acb83a2d84519e05a7354896aec8991c148650e9ec58196c77"
165
165
  },
166
+ {
167
+ "path": ".mdkg/templates/default/spike.md",
168
+ "category": "template",
169
+ "sha256": "ac805dca7e6edcdad35e24b615dc7399cbae3bed676b9da57e24a393eb425245"
170
+ },
166
171
  {
167
172
  "path": ".mdkg/templates/default/task.md",
168
173
  "category": "template",
@@ -241,7 +246,7 @@
241
246
  {
242
247
  "path": "AGENT_START.md",
243
248
  "category": "startup_doc",
244
- "sha256": "cf58e37c72be2593f1d920520dbdc6e316182bfda5c49837443a8b18024504c7"
249
+ "sha256": "46e734b6eae92eb957c3e29fb4d206e4be3fd6d32dd00e888e01a0dc75979428"
245
250
  },
246
251
  {
247
252
  "path": "AGENTS.md",
@@ -256,7 +261,7 @@
256
261
  {
257
262
  "path": "CLI_COMMAND_MATRIX.md",
258
263
  "category": "startup_doc",
259
- "sha256": "a9a7133e5a7c9a07a6814c679d04637370ea144eac19a6500980a37a2c4199f5"
264
+ "sha256": "7f27715427a6762ef987fb872c9e09976075c76fddac68c4df89387e5b8a6909"
260
265
  },
261
266
  {
262
267
  "path": "llms.txt",
@@ -27,7 +27,8 @@ Move one durable mdkg goal forward without losing scope, evidence, or user inten
27
27
  ## Steps
28
28
 
29
29
  1. Resolve the goal:
30
- - If a goal id is provided, run `mdkg goal select <goal-id>`.
30
+ - If a goal id is provided and you are beginning durable work on it, run `mdkg goal activate <goal-id>`.
31
+ - Use `mdkg goal select <goal-id>` only when you need a local pointer without changing lifecycle state.
31
32
  - Otherwise run `mdkg goal current`.
32
33
  - If the result is missing or ambiguous, ask the user to select a goal.
33
34
  2. Inspect the goal with `mdkg goal show <goal-id>` and build context with `mdkg pack <goal-id>`.
@@ -0,0 +1,81 @@
1
+ ---
2
+ id: {{id}}
3
+ type: spike
4
+ title: {{title}}
5
+ status: {{status}}
6
+ priority: {{priority}}
7
+ epic: {{epic}}
8
+ parent: {{parent}}
9
+ prev: {{prev}}
10
+ next: {{next}}
11
+ tags: []
12
+ owners: []
13
+ links: []
14
+ artifacts: []
15
+ relates: []
16
+ blocked_by: []
17
+ blocks: []
18
+ refs: []
19
+ aliases: []
20
+ skills: []
21
+ created: {{created}}
22
+ updated: {{updated}}
23
+ ---
24
+
25
+ # Research Question
26
+
27
+ State the question this spike must answer.
28
+
29
+ # Context And Constraints
30
+
31
+ - constraint 1
32
+ - constraint 2
33
+
34
+ # Search Plan
35
+
36
+ - source or query 1
37
+ - source or query 2
38
+
39
+ # Findings
40
+
41
+ - finding 1
42
+ - finding 2
43
+
44
+ # Options And Tradeoffs
45
+
46
+ - option 1: tradeoff
47
+ - option 2: tradeoff
48
+
49
+ # Recommendation
50
+
51
+ Summarize the recommended direction and why.
52
+
53
+ # Follow-Up Nodes To Create
54
+
55
+ - task/test/decision candidate 1
56
+ - task/test/decision candidate 2
57
+
58
+ # Skill Candidates
59
+
60
+ - skill candidate 1
61
+ - skill candidate 2
62
+
63
+ # Data Structures And Algorithms Notes
64
+
65
+ - note 1
66
+
67
+ # UX Notes
68
+
69
+ - note 1
70
+
71
+ # Security Notes
72
+
73
+ - note 1
74
+
75
+ # mdkg.dev Launch Implications
76
+
77
+ - implication 1
78
+
79
+ # Evidence And Sources
80
+
81
+ - source 1
@@ -21,9 +21,10 @@ const FALLBACK_TYPES = [
21
21
  "feat",
22
22
  "task",
23
23
  "bug",
24
+ "spike",
24
25
  "checkpoint",
25
26
  ];
26
- const WORK_TYPES = ["goal", "epic", "feat", "task", "bug", "checkpoint"];
27
+ const WORK_TYPES = ["goal", "epic", "feat", "task", "bug", "spike", "checkpoint"];
27
28
  function idNumber(id) {
28
29
  const match = id.match(/-(\d+)$/);
29
30
  if (!match) {
@@ -76,7 +77,7 @@ function buildOrderKey(index, rootQid, qid, depths) {
76
77
  const node = index.nodes[qid];
77
78
  const root = index.nodes[rootQid];
78
79
  const depth = depths.get(qid);
79
- const rootIsTask = root.type === "task" || root.type === "bug";
80
+ const rootIsTask = root.type === "task" || root.type === "bug" || root.type === "spike";
80
81
  if (qid === rootQid) {
81
82
  return {
82
83
  group: 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mdkg",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "Markdown Knowledge Graph",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -29,6 +29,8 @@
29
29
  "smoke:fix-plan": "npm run build && node scripts/smoke-fix-plan.js",
30
30
  "smoke:branch-conflicts": "npm run build && node scripts/smoke-branch-conflicts.js",
31
31
  "smoke:command-docs": "npm run build && node scripts/smoke-command-docs.js",
32
+ "smoke:spike": "npm run build && node scripts/smoke-spike.js",
33
+ "smoke:goal-lifecycle": "npm run build && node scripts/smoke-goal-lifecycle.js",
32
34
  "smoke:bundle": "npm run build && node scripts/smoke-bundle.js",
33
35
  "smoke:bundle-import": "npm run smoke:subgraph",
34
36
  "smoke:visibility": "npm run build && node scripts/smoke-visibility.js",
@@ -39,7 +41,7 @@
39
41
  "cli:check": "npm run build && node scripts/cli_help_snapshot.js --check",
40
42
  "cli:contract": "npm run build && node scripts/generate-command-contract.js --check",
41
43
  "prepack": "npm run build && node scripts/assert-publish-ready.js",
42
- "prepublishOnly": "npm run test && npm run cli:check && npm run cli:contract && node dist/cli.js validate && npm run smoke:consumer && npm run smoke:matrix && npm run smoke:upgrade && npm run smoke:init && npm run smoke:capabilities && npm run smoke:db && npm run smoke:db-queue && npm run smoke:db-queue-cli && npm run smoke:db-events && npm run smoke:db-materializer && npm run smoke:db-snapshot && npm run smoke:archive-work && npm run smoke:work-invocation && npm run smoke:cli-ux-polish && npm run smoke:operator-health && npm run smoke:fix-plan && npm run smoke:branch-conflicts && npm run smoke:command-docs && npm run smoke:bundle && npm run smoke:subgraph && npm run smoke:visibility && npm run smoke:sqlite && npm run smoke:parallel && npm run smoke:goal && node scripts/assert-publish-ready.js",
44
+ "prepublishOnly": "npm run test && npm run cli:check && npm run cli:contract && node dist/cli.js validate && npm run smoke:consumer && npm run smoke:matrix && npm run smoke:upgrade && npm run smoke:init && npm run smoke:capabilities && npm run smoke:db && npm run smoke:db-queue && npm run smoke:db-queue-cli && npm run smoke:db-events && npm run smoke:db-materializer && npm run smoke:db-snapshot && npm run smoke:archive-work && npm run smoke:work-invocation && npm run smoke:cli-ux-polish && npm run smoke:operator-health && npm run smoke:fix-plan && npm run smoke:branch-conflicts && npm run smoke:command-docs && npm run smoke:spike && npm run smoke:goal-lifecycle && npm run smoke:bundle && npm run smoke:subgraph && npm run smoke:visibility && npm run smoke:sqlite && npm run smoke:parallel && npm run smoke:goal && node scripts/assert-publish-ready.js",
43
45
  "postinstall": "node scripts/postinstall.js",
44
46
  "smoke:subgraph": "npm run build && node scripts/smoke-subgraph.js"
45
47
  },