mdkg 0.4.2 → 0.5.1

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.
Files changed (70) hide show
  1. package/CHANGELOG.md +88 -15
  2. package/CLI_COMMAND_MATRIX.md +74 -5
  3. package/README.md +30 -2
  4. package/dist/cli.js +132 -5
  5. package/dist/command-contract.json +778 -16
  6. package/dist/commands/archive.js +196 -42
  7. package/dist/commands/bundle.js +180 -44
  8. package/dist/commands/capability.js +1 -0
  9. package/dist/commands/checkpoint.js +6 -5
  10. package/dist/commands/event_support.js +16 -7
  11. package/dist/commands/fix.js +11 -8
  12. package/dist/commands/git.js +41 -10
  13. package/dist/commands/goal.js +23 -23
  14. package/dist/commands/graph.js +64 -10
  15. package/dist/commands/handoff.js +4 -2
  16. package/dist/commands/init.js +28 -23
  17. package/dist/commands/loop.js +1668 -0
  18. package/dist/commands/loop_descriptors.js +219 -0
  19. package/dist/commands/mcp.js +101 -11
  20. package/dist/commands/new.js +49 -3
  21. package/dist/commands/pack.js +14 -7
  22. package/dist/commands/search.js +10 -1
  23. package/dist/commands/skill.js +12 -9
  24. package/dist/commands/skill_mirror.js +39 -31
  25. package/dist/commands/subgraph.js +59 -26
  26. package/dist/commands/task.js +77 -4
  27. package/dist/commands/upgrade.js +13 -15
  28. package/dist/commands/validate.js +20 -7
  29. package/dist/commands/work.js +44 -26
  30. package/dist/commands/workspace.js +10 -4
  31. package/dist/core/config.js +45 -17
  32. package/dist/core/filesystem_authority.js +281 -0
  33. package/dist/core/project_db_events.js +4 -0
  34. package/dist/core/project_db_materializer.js +2 -0
  35. package/dist/core/project_db_migrations.js +238 -181
  36. package/dist/core/project_db_snapshot.js +64 -14
  37. package/dist/core/workspace_path.js +7 -0
  38. package/dist/graph/archive_integrity.js +1 -1
  39. package/dist/graph/capabilities_index_cache.js +4 -1
  40. package/dist/graph/frontmatter.js +38 -0
  41. package/dist/graph/goal_scope.js +4 -1
  42. package/dist/graph/index_cache.js +37 -7
  43. package/dist/graph/loop_bindings.js +39 -0
  44. package/dist/graph/node.js +209 -1
  45. package/dist/graph/node_body.js +52 -6
  46. package/dist/graph/skills_index_cache.js +41 -6
  47. package/dist/graph/skills_indexer.js +5 -2
  48. package/dist/graph/sqlite_index.js +118 -105
  49. package/dist/graph/subgraphs.js +142 -5
  50. package/dist/graph/validate_graph.js +109 -13
  51. package/dist/graph/workspace_files.js +39 -9
  52. package/dist/init/AGENT_START.md +16 -0
  53. package/dist/init/CLI_COMMAND_MATRIX.md +14 -0
  54. package/dist/init/config.json +7 -1
  55. package/dist/init/init-manifest.json +49 -4
  56. package/dist/init/skills/default/pursue-mdkg-loop/SKILL.md +150 -0
  57. package/dist/init/templates/default/loop.md +160 -0
  58. package/dist/init/templates/loops/backend-api-cli-bloat-audit.loop.md +117 -0
  59. package/dist/init/templates/loops/design-frontend-ux-audit.loop.md +117 -0
  60. package/dist/init/templates/loops/duplicate-code-and-linting-audit.loop.md +114 -0
  61. package/dist/init/templates/loops/security-audit.loop.md +140 -0
  62. package/dist/init/templates/loops/tech-stack-best-practices-audit.loop.md +116 -0
  63. package/dist/init/templates/loops/test-ci-skill-infrastructure-audit.loop.md +116 -0
  64. package/dist/init/templates/loops/user-story-audit-and-recommendations.loop.md +116 -0
  65. package/dist/pack/order.js +3 -1
  66. package/dist/pack/pack.js +139 -6
  67. package/dist/templates/loader.js +9 -3
  68. package/dist/util/lock.js +10 -9
  69. package/dist/util/zip.js +163 -9
  70. package/package.json +8 -4
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schema_version": 1,
3
3
  "tool": "mdkg",
4
- "package_version": "0.4.2",
4
+ "package_version": "0.5.1",
5
5
  "source": {
6
6
  "help_targets": "scripts/cli_help_targets.js",
7
7
  "command_matrix": "CLI_COMMAND_MATRIX.md"
@@ -25,7 +25,7 @@
25
25
  " mdkg archive list [--kind source|artifact] [--visibility private|internal|public] [--json]",
26
26
  " mdkg archive show <id-or-archive-uri> [--json]",
27
27
  " mdkg archive verify [id-or-archive-uri] [--json]",
28
- " mdkg archive compress <id-or-archive-uri|--all> [--json]"
28
+ " mdkg archive compress <id-or-archive-uri-or-qid|--all> [--ws <local-alias>] [--json]"
29
29
  ],
30
30
  "args": [
31
31
  {
@@ -39,9 +39,9 @@
39
39
  "source": "<id-or-archive-uri>"
40
40
  },
41
41
  {
42
- "name": "id-or-archive-uri|--all",
42
+ "name": "id-or-archive-uri-or-qid|--all",
43
43
  "required": true,
44
- "source": "<id-or-archive-uri|--all>"
44
+ "source": "<id-or-archive-uri-or-qid|--all>"
45
45
  }
46
46
  ],
47
47
  "flags": [
@@ -203,22 +203,22 @@
203
203
  "visibility": "public",
204
204
  "summary": "mdkg archive compress command",
205
205
  "usage": [
206
- " mdkg archive compress <id-or-archive-uri> [--ws <alias>] [--json]",
207
- " mdkg archive compress --all [--json]"
206
+ " mdkg archive compress <id-or-archive-uri-or-qid> [--ws <local-alias>] [--json]",
207
+ " mdkg archive compress --all [--ws <local-alias>] [--json]"
208
208
  ],
209
209
  "args": [
210
210
  {
211
- "name": "id-or-archive-uri",
211
+ "name": "id-or-archive-uri-or-qid",
212
212
  "required": true,
213
- "source": "<id-or-archive-uri>"
213
+ "source": "<id-or-archive-uri-or-qid>"
214
214
  }
215
215
  ],
216
216
  "flags": [
217
217
  {
218
218
  "name": "--all",
219
- "value": "[--json]",
219
+ "value": "[--ws <local-alias>]",
220
220
  "required": false,
221
- "description": "mdkg archive compress --all [--json]"
221
+ "description": "mdkg archive compress --all [--ws <local-alias>] [--json]"
222
222
  },
223
223
  {
224
224
  "name": "--help",
@@ -237,6 +237,12 @@
237
237
  "value": null,
238
238
  "required": false,
239
239
  "description": "--version, -V Show version"
240
+ },
241
+ {
242
+ "name": "--ws",
243
+ "value": "<imported-alias>",
244
+ "required": false,
245
+ "description": "- direct imported qids and --ws <imported-alias> fail with source-workspace guidance"
240
246
  }
241
247
  ],
242
248
  "output_formats": [
@@ -245,7 +251,7 @@
245
251
  ],
246
252
  "json_schema_ref": "mdkg.command_output.v1",
247
253
  "side_effects": [
248
- "refresh-archive-zip-cache"
254
+ "refresh-local-workspace-archive-zip-caches"
249
255
  ],
250
256
  "read_paths": [
251
257
  ".mdkg/**"
@@ -258,9 +264,11 @@
258
264
  "supported": false
259
265
  },
260
266
  "lock_policy": "mutation-lock-required",
261
- "atomic_write_policy": "zip-temp-rename",
267
+ "atomic_write_policy": "full-selection-preflight-then-per-file-atomic-replacement",
262
268
  "receipts": [
263
- "archive-compress-receipt"
269
+ "archive-compress-receipt",
270
+ "archive-workspace-selection-receipt",
271
+ "read-only-exclusion-receipt"
264
272
  ],
265
273
  "danger_level": "moderate",
266
274
  "aliases": [],
@@ -275,8 +283,8 @@
275
283
  }
276
284
  ],
277
285
  "examples": [
278
- " mdkg archive compress --all [--json]",
279
- " mdkg archive compress <id-or-archive-uri> [--ws <alias>] [--json]"
286
+ " mdkg archive compress --all [--ws <local-alias>] [--json]",
287
+ " mdkg archive compress <id-or-archive-uri-or-qid> [--ws <local-alias>] [--json]"
280
288
  ],
281
289
  "docs": {
282
290
  "help_target": "mdkg help archive compress",
@@ -5356,6 +5364,760 @@
5356
5364
  "command_matrix": "CLI_COMMAND_MATRIX.md"
5357
5365
  }
5358
5366
  },
5367
+ {
5368
+ "key": "loop",
5369
+ "path": [
5370
+ "loop"
5371
+ ],
5372
+ "category": "loop",
5373
+ "status": "stable",
5374
+ "visibility": "public",
5375
+ "summary": "mdkg loop command",
5376
+ "usage": [
5377
+ "mdkg loop list [--ws <alias>] [--json]",
5378
+ "mdkg loop show <loop-or-template> [--meta] [--ws <alias>] [--json]",
5379
+ "mdkg loop fork <template> --scope <scope> [--title <title>] [--materialization default_children|planning_only|manual] [--planning-only] [--no-children] [--dry-run] [--run-id <id>] [--ws <alias>] [--json]",
5380
+ "mdkg loop plan <loop> [--ws <alias>] [--json]",
5381
+ "mdkg loop next <loop> [--ws <alias>] [--json]",
5382
+ "mdkg loop runs <loop> [--ws <alias>] [--json]"
5383
+ ],
5384
+ "args": [],
5385
+ "flags": [
5386
+ {
5387
+ "name": "--root",
5388
+ "value": "<path>",
5389
+ "required": false,
5390
+ "description": "Run against a specific repository root; -r is the short alias."
5391
+ },
5392
+ {
5393
+ "name": "--ws",
5394
+ "value": "<alias>",
5395
+ "required": false,
5396
+ "description": "Resolve the command against one workspace alias."
5397
+ },
5398
+ {
5399
+ "name": "--json",
5400
+ "value": null,
5401
+ "required": false,
5402
+ "description": "Emit deterministic JSON instead of text."
5403
+ },
5404
+ {
5405
+ "name": "--no-cache",
5406
+ "value": null,
5407
+ "required": false,
5408
+ "description": "Build a non-persisting in-memory index projection instead of reading the cache."
5409
+ },
5410
+ {
5411
+ "name": "--no-reindex",
5412
+ "value": null,
5413
+ "required": false,
5414
+ "description": "Do not rebuild a stale or missing index projection."
5415
+ },
5416
+ {
5417
+ "name": "--run-id",
5418
+ "value": "<id>",
5419
+ "required": false,
5420
+ "description": "Attach an optional run id to the fork event when event logging is enabled."
5421
+ }
5422
+ ],
5423
+ "output_formats": [
5424
+ "text",
5425
+ "json"
5426
+ ],
5427
+ "json_schema_ref": "mdkg.command_output.v1",
5428
+ "side_effects": [
5429
+ "read-or-write-loop-graph-state"
5430
+ ],
5431
+ "read_paths": [
5432
+ ".mdkg/**"
5433
+ ],
5434
+ "write_paths": [
5435
+ ".mdkg/**/*.md",
5436
+ ".mdkg/events/*.jsonl",
5437
+ ".mdkg/index/**"
5438
+ ],
5439
+ "dry_run": {
5440
+ "supported": true,
5441
+ "commands": [
5442
+ "fork"
5443
+ ]
5444
+ },
5445
+ "lock_policy": "mutation-lock-required-for-fork",
5446
+ "atomic_write_policy": "exclusive-create-and-atomic-file-writes",
5447
+ "receipts": [
5448
+ "loop-receipt"
5449
+ ],
5450
+ "danger_level": "mixed",
5451
+ "aliases": [],
5452
+ "exit_codes": [
5453
+ {
5454
+ "code": 0,
5455
+ "meaning": "success"
5456
+ },
5457
+ {
5458
+ "code": 1,
5459
+ "meaning": "validation-or-runtime-error"
5460
+ }
5461
+ ],
5462
+ "examples": [
5463
+ "mdkg loop fork <template> --scope <scope> [--title <title>] [--materialization default_children|planning_only|manual] [--planning-only] [--no-children] [--dry-run] [--run-id <id>] [--ws <alias>] [--json]",
5464
+ "mdkg loop list [--ws <alias>] [--json]",
5465
+ "mdkg loop show <loop-or-template> [--meta] [--ws <alias>] [--json]"
5466
+ ],
5467
+ "docs": {
5468
+ "help_target": "mdkg help loop",
5469
+ "command_matrix": "CLI_COMMAND_MATRIX.md"
5470
+ },
5471
+ "descriptor_source": "src/commands/loop_descriptors.ts",
5472
+ "handler": "runLoopSubcommand",
5473
+ "help_notes": [
5474
+ "loop is one first-class node type. Templates, scoped forks, and run-bearing loops are represented through metadata and links.",
5475
+ "mdkg defines reusable process state and graph context; runtimes execute agents, tools, sandboxes, traces, and model routing."
5476
+ ]
5477
+ },
5478
+ {
5479
+ "key": "loop fork",
5480
+ "path": [
5481
+ "loop",
5482
+ "fork"
5483
+ ],
5484
+ "category": "loop",
5485
+ "status": "stable",
5486
+ "visibility": "public",
5487
+ "summary": "mdkg loop fork command",
5488
+ "usage": [
5489
+ "mdkg loop fork <template> --scope <scope> [--title <title>] [--materialization <mode>] [--planning-only] [--no-children] [--dry-run] [--run-id <id>] [--ws <alias>] [--no-cache] [--no-reindex] [--json]"
5490
+ ],
5491
+ "args": [
5492
+ {
5493
+ "name": "template",
5494
+ "required": true,
5495
+ "source": "<template>",
5496
+ "description": "Loop template node id/qid or seed template name/ref."
5497
+ }
5498
+ ],
5499
+ "flags": [
5500
+ {
5501
+ "name": "--scope",
5502
+ "value": "<scope>",
5503
+ "required": true,
5504
+ "description": "Scope ref, qid, URI, path, or description for the scoped loop."
5505
+ },
5506
+ {
5507
+ "name": "--title",
5508
+ "value": "<title>",
5509
+ "required": false,
5510
+ "description": "Override the generated scoped loop title."
5511
+ },
5512
+ {
5513
+ "name": "--materialization",
5514
+ "value": "<mode>",
5515
+ "required": false,
5516
+ "description": "Child materialization mode: default_children, planning_only, or manual."
5517
+ },
5518
+ {
5519
+ "name": "--planning-only",
5520
+ "value": null,
5521
+ "required": false,
5522
+ "description": "Create only the scoped loop shell."
5523
+ },
5524
+ {
5525
+ "name": "--no-children",
5526
+ "value": null,
5527
+ "required": false,
5528
+ "description": "Alias for planning-only materialization."
5529
+ },
5530
+ {
5531
+ "name": "--dry-run",
5532
+ "value": null,
5533
+ "required": false,
5534
+ "description": "Plan the fork without writing loop or child nodes."
5535
+ },
5536
+ {
5537
+ "name": "--run-id",
5538
+ "value": "<id>",
5539
+ "required": false,
5540
+ "description": "Attach an optional run id to the fork event when event logging is enabled."
5541
+ },
5542
+ {
5543
+ "name": "--root",
5544
+ "value": "<path>",
5545
+ "required": false,
5546
+ "description": "Run against a specific repository root; -r is the short alias."
5547
+ },
5548
+ {
5549
+ "name": "--ws",
5550
+ "value": "<alias>",
5551
+ "required": false,
5552
+ "description": "Resolve the command against one workspace alias."
5553
+ },
5554
+ {
5555
+ "name": "--json",
5556
+ "value": null,
5557
+ "required": false,
5558
+ "description": "Emit deterministic JSON instead of text."
5559
+ },
5560
+ {
5561
+ "name": "--no-cache",
5562
+ "value": null,
5563
+ "required": false,
5564
+ "description": "Build a non-persisting in-memory index projection instead of reading the cache."
5565
+ },
5566
+ {
5567
+ "name": "--no-reindex",
5568
+ "value": null,
5569
+ "required": false,
5570
+ "description": "Do not rebuild a stale or missing index projection."
5571
+ }
5572
+ ],
5573
+ "output_formats": [
5574
+ "text",
5575
+ "json"
5576
+ ],
5577
+ "json_schema_ref": "mdkg.command_output.v1",
5578
+ "side_effects": [
5579
+ "append-loop-fork-event-when-event-logging-is-enabled",
5580
+ "create-scoped-loop-and-optional-child-nodes",
5581
+ "rebuild-derived-indexes-when-auto-reindex-is-enabled",
5582
+ "reserve-sqlite-node-ids-when-configured"
5583
+ ],
5584
+ "read_paths": [
5585
+ ".mdkg/**"
5586
+ ],
5587
+ "write_paths": [
5588
+ ".mdkg/**/*.md",
5589
+ ".mdkg/events/*.jsonl",
5590
+ ".mdkg/index/**"
5591
+ ],
5592
+ "dry_run": {
5593
+ "supported": true,
5594
+ "flag": "--dry-run",
5595
+ "side_effects": [
5596
+ "none"
5597
+ ],
5598
+ "write_paths": [],
5599
+ "reserves_ids": false
5600
+ },
5601
+ "lock_policy": "mutation-lock-required",
5602
+ "atomic_write_policy": "exclusive-create-and-atomic-file-writes",
5603
+ "receipts": [
5604
+ "loop-fork-receipt"
5605
+ ],
5606
+ "danger_level": "moderate",
5607
+ "aliases": [],
5608
+ "exit_codes": [
5609
+ {
5610
+ "code": 0,
5611
+ "meaning": "success"
5612
+ },
5613
+ {
5614
+ "code": 1,
5615
+ "meaning": "validation-or-runtime-error"
5616
+ }
5617
+ ],
5618
+ "examples": [
5619
+ "mdkg loop fork <template> --scope <scope> [--title <title>] [--materialization <mode>] [--planning-only] [--no-children] [--dry-run] [--run-id <id>] [--ws <alias>] [--no-cache] [--no-reindex] [--json]"
5620
+ ],
5621
+ "docs": {
5622
+ "help_target": "mdkg help loop fork",
5623
+ "command_matrix": "CLI_COMMAND_MATRIX.md"
5624
+ },
5625
+ "descriptor_source": "src/commands/loop_descriptors.ts",
5626
+ "handler": "runLoopForkCommand",
5627
+ "help_notes": [
5628
+ "Seed templates resolve from .mdkg/templates/loops/<name>.loop.md.",
5629
+ "Default forks create a scoped loop plus linked spike/task/test child nodes."
5630
+ ]
5631
+ },
5632
+ {
5633
+ "key": "loop list",
5634
+ "path": [
5635
+ "loop",
5636
+ "list"
5637
+ ],
5638
+ "category": "loop",
5639
+ "status": "stable",
5640
+ "visibility": "public",
5641
+ "summary": "mdkg loop list command",
5642
+ "usage": [
5643
+ "mdkg loop list [--ws <alias>] [--no-cache] [--no-reindex] [--json]"
5644
+ ],
5645
+ "args": [],
5646
+ "flags": [
5647
+ {
5648
+ "name": "--root",
5649
+ "value": "<path>",
5650
+ "required": false,
5651
+ "description": "Run against a specific repository root; -r is the short alias."
5652
+ },
5653
+ {
5654
+ "name": "--ws",
5655
+ "value": "<alias>",
5656
+ "required": false,
5657
+ "description": "Resolve the command against one workspace alias."
5658
+ },
5659
+ {
5660
+ "name": "--json",
5661
+ "value": null,
5662
+ "required": false,
5663
+ "description": "Emit deterministic JSON instead of text."
5664
+ },
5665
+ {
5666
+ "name": "--no-cache",
5667
+ "value": null,
5668
+ "required": false,
5669
+ "description": "Build a non-persisting in-memory index projection instead of reading the cache."
5670
+ },
5671
+ {
5672
+ "name": "--no-reindex",
5673
+ "value": null,
5674
+ "required": false,
5675
+ "description": "Do not rebuild a stale or missing index projection."
5676
+ }
5677
+ ],
5678
+ "output_formats": [
5679
+ "text",
5680
+ "json"
5681
+ ],
5682
+ "json_schema_ref": "mdkg.command_output.v1",
5683
+ "side_effects": [
5684
+ "none"
5685
+ ],
5686
+ "read_paths": [
5687
+ ".mdkg/**"
5688
+ ],
5689
+ "write_paths": [],
5690
+ "dry_run": {
5691
+ "supported": false
5692
+ },
5693
+ "lock_policy": "none-read-only",
5694
+ "atomic_write_policy": "none-read-only",
5695
+ "receipts": [
5696
+ "loop-list-receipt"
5697
+ ],
5698
+ "danger_level": "read-only",
5699
+ "aliases": [],
5700
+ "exit_codes": [
5701
+ {
5702
+ "code": 0,
5703
+ "meaning": "success"
5704
+ },
5705
+ {
5706
+ "code": 1,
5707
+ "meaning": "validation-or-runtime-error"
5708
+ }
5709
+ ],
5710
+ "examples": [
5711
+ "mdkg loop list [--ws <alias>] [--no-cache] [--no-reindex] [--json]"
5712
+ ],
5713
+ "docs": {
5714
+ "help_target": "mdkg help loop list",
5715
+ "command_matrix": "CLI_COMMAND_MATRIX.md"
5716
+ },
5717
+ "descriptor_source": "src/commands/loop_descriptors.ts",
5718
+ "handler": "runLoopListCommand",
5719
+ "help_notes": [
5720
+ "Lists indexed loop nodes and reusable seed loop templates."
5721
+ ]
5722
+ },
5723
+ {
5724
+ "key": "loop next",
5725
+ "path": [
5726
+ "loop",
5727
+ "next"
5728
+ ],
5729
+ "category": "loop",
5730
+ "status": "stable",
5731
+ "visibility": "public",
5732
+ "summary": "mdkg loop next command",
5733
+ "usage": [
5734
+ "mdkg loop next <loop> [--ws <alias>] [--no-cache] [--no-reindex] [--json]"
5735
+ ],
5736
+ "args": [
5737
+ {
5738
+ "name": "loop",
5739
+ "required": true,
5740
+ "source": "<loop>",
5741
+ "description": "Loop node id or qid."
5742
+ }
5743
+ ],
5744
+ "flags": [
5745
+ {
5746
+ "name": "--root",
5747
+ "value": "<path>",
5748
+ "required": false,
5749
+ "description": "Run against a specific repository root; -r is the short alias."
5750
+ },
5751
+ {
5752
+ "name": "--ws",
5753
+ "value": "<alias>",
5754
+ "required": false,
5755
+ "description": "Resolve the command against one workspace alias."
5756
+ },
5757
+ {
5758
+ "name": "--json",
5759
+ "value": null,
5760
+ "required": false,
5761
+ "description": "Emit deterministic JSON instead of text."
5762
+ },
5763
+ {
5764
+ "name": "--no-cache",
5765
+ "value": null,
5766
+ "required": false,
5767
+ "description": "Build a non-persisting in-memory index projection instead of reading the cache."
5768
+ },
5769
+ {
5770
+ "name": "--no-reindex",
5771
+ "value": null,
5772
+ "required": false,
5773
+ "description": "Do not rebuild a stale or missing index projection."
5774
+ }
5775
+ ],
5776
+ "output_formats": [
5777
+ "text",
5778
+ "json"
5779
+ ],
5780
+ "json_schema_ref": "mdkg.command_output.v1",
5781
+ "side_effects": [
5782
+ "none"
5783
+ ],
5784
+ "read_paths": [
5785
+ ".mdkg/**"
5786
+ ],
5787
+ "write_paths": [],
5788
+ "dry_run": {
5789
+ "supported": false
5790
+ },
5791
+ "lock_policy": "none-read-only",
5792
+ "atomic_write_policy": "none-read-only",
5793
+ "receipts": [
5794
+ "loop-next-receipt"
5795
+ ],
5796
+ "danger_level": "read-only",
5797
+ "aliases": [],
5798
+ "exit_codes": [
5799
+ {
5800
+ "code": 0,
5801
+ "meaning": "success"
5802
+ },
5803
+ {
5804
+ "code": 1,
5805
+ "meaning": "validation-or-runtime-error"
5806
+ }
5807
+ ],
5808
+ "examples": [
5809
+ "mdkg loop next <loop> [--ws <alias>] [--no-cache] [--no-reindex] [--json]"
5810
+ ],
5811
+ "docs": {
5812
+ "help_target": "mdkg help loop next",
5813
+ "command_matrix": "CLI_COMMAND_MATRIX.md"
5814
+ },
5815
+ "descriptor_source": "src/commands/loop_descriptors.ts",
5816
+ "handler": "runLoopNextCommand",
5817
+ "help_notes": [
5818
+ "Read-only routing for the next actionable child, readiness lane, or blocker recovery step."
5819
+ ]
5820
+ },
5821
+ {
5822
+ "key": "loop plan",
5823
+ "path": [
5824
+ "loop",
5825
+ "plan"
5826
+ ],
5827
+ "category": "loop",
5828
+ "status": "stable",
5829
+ "visibility": "public",
5830
+ "summary": "mdkg loop plan command",
5831
+ "usage": [
5832
+ "mdkg loop plan <loop> [--ws <alias>] [--no-cache] [--no-reindex] [--json]"
5833
+ ],
5834
+ "args": [
5835
+ {
5836
+ "name": "loop",
5837
+ "required": true,
5838
+ "source": "<loop>",
5839
+ "description": "Loop node id or qid."
5840
+ }
5841
+ ],
5842
+ "flags": [
5843
+ {
5844
+ "name": "--root",
5845
+ "value": "<path>",
5846
+ "required": false,
5847
+ "description": "Run against a specific repository root; -r is the short alias."
5848
+ },
5849
+ {
5850
+ "name": "--ws",
5851
+ "value": "<alias>",
5852
+ "required": false,
5853
+ "description": "Resolve the command against one workspace alias."
5854
+ },
5855
+ {
5856
+ "name": "--json",
5857
+ "value": null,
5858
+ "required": false,
5859
+ "description": "Emit deterministic JSON instead of text."
5860
+ },
5861
+ {
5862
+ "name": "--no-cache",
5863
+ "value": null,
5864
+ "required": false,
5865
+ "description": "Build a non-persisting in-memory index projection instead of reading the cache."
5866
+ },
5867
+ {
5868
+ "name": "--no-reindex",
5869
+ "value": null,
5870
+ "required": false,
5871
+ "description": "Do not rebuild a stale or missing index projection."
5872
+ }
5873
+ ],
5874
+ "output_formats": [
5875
+ "text",
5876
+ "json"
5877
+ ],
5878
+ "json_schema_ref": "mdkg.command_output.v1",
5879
+ "side_effects": [
5880
+ "none"
5881
+ ],
5882
+ "read_paths": [
5883
+ ".mdkg/**"
5884
+ ],
5885
+ "write_paths": [],
5886
+ "dry_run": {
5887
+ "supported": false
5888
+ },
5889
+ "lock_policy": "none-read-only",
5890
+ "atomic_write_policy": "none-read-only",
5891
+ "receipts": [
5892
+ "loop-plan-receipt"
5893
+ ],
5894
+ "danger_level": "read-only",
5895
+ "aliases": [],
5896
+ "exit_codes": [
5897
+ {
5898
+ "code": 0,
5899
+ "meaning": "success"
5900
+ },
5901
+ {
5902
+ "code": 1,
5903
+ "meaning": "validation-or-runtime-error"
5904
+ }
5905
+ ],
5906
+ "examples": [
5907
+ "mdkg loop plan <loop> [--ws <alias>] [--no-cache] [--no-reindex] [--json]"
5908
+ ],
5909
+ "docs": {
5910
+ "help_target": "mdkg help loop plan",
5911
+ "command_matrix": "CLI_COMMAND_MATRIX.md"
5912
+ },
5913
+ "descriptor_source": "src/commands/loop_descriptors.ts",
5914
+ "handler": "runLoopPlanCommand",
5915
+ "help_notes": [
5916
+ "Read-only readiness cockpit for loop execution planning."
5917
+ ]
5918
+ },
5919
+ {
5920
+ "key": "loop runs",
5921
+ "path": [
5922
+ "loop",
5923
+ "runs"
5924
+ ],
5925
+ "category": "loop",
5926
+ "status": "stable",
5927
+ "visibility": "public",
5928
+ "summary": "mdkg loop runs command",
5929
+ "usage": [
5930
+ "mdkg loop runs <loop> [--ws <alias>] [--no-cache] [--no-reindex] [--json]"
5931
+ ],
5932
+ "args": [
5933
+ {
5934
+ "name": "loop",
5935
+ "required": true,
5936
+ "source": "<loop>",
5937
+ "description": "Loop node id or qid."
5938
+ }
5939
+ ],
5940
+ "flags": [
5941
+ {
5942
+ "name": "--root",
5943
+ "value": "<path>",
5944
+ "required": false,
5945
+ "description": "Run against a specific repository root; -r is the short alias."
5946
+ },
5947
+ {
5948
+ "name": "--ws",
5949
+ "value": "<alias>",
5950
+ "required": false,
5951
+ "description": "Resolve the command against one workspace alias."
5952
+ },
5953
+ {
5954
+ "name": "--json",
5955
+ "value": null,
5956
+ "required": false,
5957
+ "description": "Emit deterministic JSON instead of text."
5958
+ },
5959
+ {
5960
+ "name": "--no-cache",
5961
+ "value": null,
5962
+ "required": false,
5963
+ "description": "Build a non-persisting in-memory index projection instead of reading the cache."
5964
+ },
5965
+ {
5966
+ "name": "--no-reindex",
5967
+ "value": null,
5968
+ "required": false,
5969
+ "description": "Do not rebuild a stale or missing index projection."
5970
+ }
5971
+ ],
5972
+ "output_formats": [
5973
+ "text",
5974
+ "json"
5975
+ ],
5976
+ "json_schema_ref": "mdkg.command_output.v1",
5977
+ "side_effects": [
5978
+ "none"
5979
+ ],
5980
+ "read_paths": [
5981
+ ".mdkg/**"
5982
+ ],
5983
+ "write_paths": [],
5984
+ "dry_run": {
5985
+ "supported": false
5986
+ },
5987
+ "lock_policy": "none-read-only",
5988
+ "atomic_write_policy": "none-read-only",
5989
+ "receipts": [
5990
+ "loop-runs-receipt"
5991
+ ],
5992
+ "danger_level": "read-only",
5993
+ "aliases": [],
5994
+ "exit_codes": [
5995
+ {
5996
+ "code": 0,
5997
+ "meaning": "success"
5998
+ },
5999
+ {
6000
+ "code": 1,
6001
+ "meaning": "validation-or-runtime-error"
6002
+ }
6003
+ ],
6004
+ "examples": [
6005
+ "mdkg loop runs <loop> [--ws <alias>] [--no-cache] [--no-reindex] [--json]"
6006
+ ],
6007
+ "docs": {
6008
+ "help_target": "mdkg help loop runs",
6009
+ "command_matrix": "CLI_COMMAND_MATRIX.md"
6010
+ },
6011
+ "descriptor_source": "src/commands/loop_descriptors.ts",
6012
+ "handler": "runLoopRunsCommand",
6013
+ "help_notes": [
6014
+ "Lists run refs and evidence refs without executing runtime jobs."
6015
+ ]
6016
+ },
6017
+ {
6018
+ "key": "loop show",
6019
+ "path": [
6020
+ "loop",
6021
+ "show"
6022
+ ],
6023
+ "category": "loop",
6024
+ "status": "stable",
6025
+ "visibility": "public",
6026
+ "summary": "mdkg loop show command",
6027
+ "usage": [
6028
+ "mdkg loop show <loop-or-template> [--meta] [--ws <alias>] [--no-cache] [--no-reindex] [--json]"
6029
+ ],
6030
+ "args": [
6031
+ {
6032
+ "name": "loop-or-template",
6033
+ "required": true,
6034
+ "source": "<loop-or-template>",
6035
+ "description": "Loop node id/qid or seed template name/ref."
6036
+ }
6037
+ ],
6038
+ "flags": [
6039
+ {
6040
+ "name": "--meta",
6041
+ "value": null,
6042
+ "required": false,
6043
+ "description": "Show metadata without the full body."
6044
+ },
6045
+ {
6046
+ "name": "--root",
6047
+ "value": "<path>",
6048
+ "required": false,
6049
+ "description": "Run against a specific repository root; -r is the short alias."
6050
+ },
6051
+ {
6052
+ "name": "--ws",
6053
+ "value": "<alias>",
6054
+ "required": false,
6055
+ "description": "Resolve the command against one workspace alias."
6056
+ },
6057
+ {
6058
+ "name": "--json",
6059
+ "value": null,
6060
+ "required": false,
6061
+ "description": "Emit deterministic JSON instead of text."
6062
+ },
6063
+ {
6064
+ "name": "--no-cache",
6065
+ "value": null,
6066
+ "required": false,
6067
+ "description": "Build a non-persisting in-memory index projection instead of reading the cache."
6068
+ },
6069
+ {
6070
+ "name": "--no-reindex",
6071
+ "value": null,
6072
+ "required": false,
6073
+ "description": "Do not rebuild a stale or missing index projection."
6074
+ }
6075
+ ],
6076
+ "output_formats": [
6077
+ "text",
6078
+ "json"
6079
+ ],
6080
+ "json_schema_ref": "mdkg.command_output.v1",
6081
+ "side_effects": [
6082
+ "none"
6083
+ ],
6084
+ "read_paths": [
6085
+ ".mdkg/**"
6086
+ ],
6087
+ "write_paths": [],
6088
+ "dry_run": {
6089
+ "supported": false
6090
+ },
6091
+ "lock_policy": "none-read-only",
6092
+ "atomic_write_policy": "none-read-only",
6093
+ "receipts": [
6094
+ "loop-show-receipt"
6095
+ ],
6096
+ "danger_level": "read-only",
6097
+ "aliases": [],
6098
+ "exit_codes": [
6099
+ {
6100
+ "code": 0,
6101
+ "meaning": "success"
6102
+ },
6103
+ {
6104
+ "code": 1,
6105
+ "meaning": "validation-or-runtime-error"
6106
+ }
6107
+ ],
6108
+ "examples": [
6109
+ "mdkg loop show <loop-or-template> [--meta] [--ws <alias>] [--no-cache] [--no-reindex] [--json]"
6110
+ ],
6111
+ "docs": {
6112
+ "help_target": "mdkg help loop show",
6113
+ "command_matrix": "CLI_COMMAND_MATRIX.md"
6114
+ },
6115
+ "descriptor_source": "src/commands/loop_descriptors.ts",
6116
+ "handler": "runLoopShowCommand",
6117
+ "help_notes": [
6118
+ "Shows an indexed loop node or a seed loop template."
6119
+ ]
6120
+ },
5359
6121
  {
5360
6122
  "key": "manifest",
5361
6123
  "path": [
@@ -9794,5 +10556,5 @@
9794
10556
  }
9795
10557
  }
9796
10558
  ],
9797
- "contract_hash": "b6ce5590f19cd90b00820a9488c5773f2824c6525730d83d5f32d6e04612327c"
10559
+ "contract_hash": "1d137b3c750bc1d8b9bcb863123719d070291266582c8aec20f8e21529434d54"
9798
10560
  }