mdkg 0.4.1 → 0.5.0

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 (71) hide show
  1. package/CHANGELOG.md +103 -15
  2. package/CLI_COMMAND_MATRIX.md +109 -2
  3. package/README.md +40 -2
  4. package/dist/cli.js +262 -2
  5. package/dist/command-contract.json +1902 -524
  6. package/dist/commands/archive.js +31 -14
  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 +624 -0
  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/argparse.js +5 -0
  69. package/dist/util/lock.js +10 -9
  70. package/dist/util/zip.js +163 -9
  71. 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.1",
4
+ "package_version": "0.5.0",
5
5
  "source": {
6
6
  "help_targets": "scripts/cli_help_targets.js",
7
7
  "command_matrix": "CLI_COMMAND_MATRIX.md"
@@ -2666,77 +2666,53 @@
2666
2666
  }
2667
2667
  },
2668
2668
  {
2669
- "key": "global",
2669
+ "key": "git",
2670
2670
  "path": [
2671
- "global"
2671
+ "git"
2672
2672
  ],
2673
- "category": "global",
2673
+ "category": "git",
2674
2674
  "status": "stable",
2675
2675
  "visibility": "public",
2676
- "summary": "mdkg - Markdown Knowledge Graph",
2676
+ "summary": "mdkg git command",
2677
2677
  "usage": [
2678
- " mdkg <command> [options]"
2678
+ " mdkg git inspect [--json]",
2679
+ " mdkg git clone <repository-ref> --target <path> [--branch <name>] [--json]",
2680
+ " mdkg git fetch [--remote <name>] [--branch <name>] [--json]",
2681
+ " mdkg git closeout [--queue-policy drain|paused] [--output <path>] [--json]",
2682
+ " mdkg git push-ready --remote <name> --branch <name> [--json]",
2683
+ " mdkg git push --remote <name> --branch <name> [--stage-all --message <text>] [--json]"
2679
2684
  ],
2680
2685
  "args": [
2681
2686
  {
2682
- "name": "command",
2687
+ "name": "repository-ref",
2683
2688
  "required": true,
2684
- "source": "<command>"
2685
- },
2686
- {
2687
- "name": "options",
2688
- "required": false,
2689
- "source": "[options]"
2689
+ "source": "<repository-ref>"
2690
2690
  }
2691
2691
  ],
2692
2692
  "flags": [
2693
2693
  {
2694
- "name": "--agent",
2695
- "value": null,
2696
- "required": false,
2697
- "description": "mdkg init --agent"
2698
- },
2699
- {
2700
- "name": "--apply",
2701
- "value": null,
2702
- "required": false,
2703
- "description": "mdkg upgrade --apply"
2704
- },
2705
- {
2706
- "name": "--description",
2707
- "value": "\"use",
2708
- "required": false,
2709
- "description": "mdkg skill new release-readiness \"release readiness audit\" --description \"use when preparing a release\""
2710
- },
2711
- {
2712
- "name": "--dry-run",
2713
- "value": null,
2694
+ "name": "--branch",
2695
+ "value": "<name>",
2714
2696
  "required": false,
2715
- "description": "mdkg pack <id> --profile concise --dry-run --stats"
2697
+ "description": "mdkg git push-ready --remote <name> --branch <name> [--json]"
2716
2698
  },
2717
2699
  {
2718
2700
  "name": "--help",
2719
2701
  "value": null,
2720
2702
  "required": false,
2721
- "description": "Run `mdkg help <command>` or `mdkg <command> --help` for details."
2722
- },
2723
- {
2724
- "name": "--json",
2725
- "value": null,
2726
- "required": false,
2727
- "description": "mdkg skill list --tags stage:plan --json"
2703
+ "description": "--help, -h Show help"
2728
2704
  },
2729
2705
  {
2730
- "name": "--priority",
2731
- "value": "1",
2706
+ "name": "--message",
2707
+ "value": "<text>",
2732
2708
  "required": false,
2733
- "description": "mdkg new task \"...\" --status todo --priority 1"
2709
+ "description": "mdkg git push --remote <name> --branch <name> [--stage-all --message <text>] [--json]"
2734
2710
  },
2735
2711
  {
2736
- "name": "--profile",
2737
- "value": "concise",
2712
+ "name": "--remote",
2713
+ "value": "<name>",
2738
2714
  "required": false,
2739
- "description": "mdkg pack <id> --profile concise --dry-run --stats"
2715
+ "description": "mdkg git push-ready --remote <name> --branch <name> [--json]"
2740
2716
  },
2741
2717
  {
2742
2718
  "name": "--root",
@@ -2745,16 +2721,10 @@
2745
2721
  "description": "--root, -r <path> Run against a specific repo root"
2746
2722
  },
2747
2723
  {
2748
- "name": "--status",
2749
- "value": "todo",
2750
- "required": false,
2751
- "description": "mdkg new task \"...\" --status todo --priority 1"
2752
- },
2753
- {
2754
- "name": "--tags",
2755
- "value": "stage:plan",
2724
+ "name": "--target",
2725
+ "value": "<path>",
2756
2726
  "required": false,
2757
- "description": "mdkg skill list --tags stage:plan --json"
2727
+ "description": "mdkg git clone <repository-ref> --target <path> [--branch <name>] [--json]"
2758
2728
  },
2759
2729
  {
2760
2730
  "name": "--version",
@@ -2769,19 +2739,28 @@
2769
2739
  ],
2770
2740
  "json_schema_ref": "mdkg.command_output.v1",
2771
2741
  "side_effects": [
2772
- "none"
2742
+ "inspect-or-mutate-git-backed-mdkg-project-lifecycle"
2773
2743
  ],
2774
2744
  "read_paths": [
2775
2745
  ".mdkg/**"
2776
2746
  ],
2777
- "write_paths": [],
2747
+ "write_paths": [
2748
+ ".mdkg/db/**",
2749
+ ".mdkg/git/**",
2750
+ ".mdkg/index/**"
2751
+ ],
2778
2752
  "dry_run": {
2779
2753
  "supported": false
2780
2754
  },
2781
- "lock_policy": "none-read-only",
2782
- "atomic_write_policy": "none-read-only",
2783
- "receipts": [],
2784
- "danger_level": "read-only",
2755
+ "lock_policy": "mutation-lock-required-for-closeout-and-stage-all-push",
2756
+ "atomic_write_policy": "atomic-file-writes-for-closeout-receipts",
2757
+ "receipts": [
2758
+ "git-closeout-receipt",
2759
+ "git-inspect-receipt",
2760
+ "git-push-ready-receipt",
2761
+ "git-push-receipt"
2762
+ ],
2763
+ "danger_level": "mixed",
2785
2764
  "aliases": [],
2786
2765
  "exit_codes": [
2787
2766
  {
@@ -2794,43 +2773,33 @@
2794
2773
  }
2795
2774
  ],
2796
2775
  "examples": [
2797
- " mdkg <command> [options]"
2776
+ " mdkg git clone <repository-ref> --target <path> [--branch <name>] [--json]",
2777
+ " mdkg git fetch [--remote <name>] [--branch <name>] [--json]",
2778
+ " mdkg git inspect [--json]"
2798
2779
  ],
2799
2780
  "docs": {
2800
- "help_target": "mdkg --help",
2781
+ "help_target": "mdkg help git",
2801
2782
  "command_matrix": "CLI_COMMAND_MATRIX.md"
2802
2783
  }
2803
2784
  },
2804
2785
  {
2805
- "key": "goal",
2786
+ "key": "git clone",
2806
2787
  "path": [
2807
- "goal"
2788
+ "git",
2789
+ "clone"
2808
2790
  ],
2809
- "category": "goal",
2791
+ "category": "git",
2810
2792
  "status": "stable",
2811
2793
  "visibility": "public",
2812
- "summary": "mdkg goal command",
2794
+ "summary": "mdkg git clone command",
2813
2795
  "usage": [
2814
- " mdkg goal show <goal-id-or-qid> [--json]",
2815
- " mdkg goal select <goal-id-or-qid> [--json]",
2816
- " mdkg goal activate <goal-id-or-qid> [--json]",
2817
- " mdkg goal current [--json]",
2818
- " mdkg goal next [goal-id-or-qid] [--json]",
2819
- " mdkg goal claim [goal-id-or-qid] <work-id-or-qid> [--json]",
2820
- " mdkg goal evaluate <goal-id-or-qid> [--json]",
2821
- " mdkg goal clear [--json]",
2822
- " mdkg goal pause|resume|done|archive <goal-id-or-qid> [--json]"
2796
+ " mdkg git clone <repository-ref> --target <path> [--branch <name>] [--json]"
2823
2797
  ],
2824
2798
  "args": [
2825
2799
  {
2826
- "name": "goal-id-or-qid",
2827
- "required": true,
2828
- "source": "<goal-id-or-qid>"
2829
- },
2830
- {
2831
- "name": "work-id-or-qid",
2800
+ "name": "repository-ref",
2832
2801
  "required": true,
2833
- "source": "<work-id-or-qid>"
2802
+ "source": "<repository-ref>"
2834
2803
  }
2835
2804
  ],
2836
2805
  "flags": [
@@ -2846,6 +2815,12 @@
2846
2815
  "required": false,
2847
2816
  "description": "--root, -r <path> Run against a specific repo root"
2848
2817
  },
2818
+ {
2819
+ "name": "--target",
2820
+ "value": "<path>",
2821
+ "required": false,
2822
+ "description": "mdkg git clone <repository-ref> --target <path> [--branch <name>] [--json]"
2823
+ },
2849
2824
  {
2850
2825
  "name": "--version",
2851
2826
  "value": null,
@@ -2859,24 +2834,23 @@
2859
2834
  ],
2860
2835
  "json_schema_ref": "mdkg.command_output.v1",
2861
2836
  "side_effects": [
2862
- "read-or-update-selected-goal-state"
2837
+ "clone-remote-git-repository-into-contained-target"
2863
2838
  ],
2864
2839
  "read_paths": [
2865
2840
  ".mdkg/**"
2866
2841
  ],
2867
2842
  "write_paths": [
2868
- ".mdkg/**/*.md",
2869
- ".mdkg/index/**"
2843
+ "<target>/**"
2870
2844
  ],
2871
2845
  "dry_run": {
2872
2846
  "supported": false
2873
2847
  },
2874
- "lock_policy": "mutation-lock-required-for-select-clear-claim-pause-resume-done",
2875
- "atomic_write_policy": "atomic-file-writes",
2848
+ "lock_policy": "not-required-for-contained-target",
2849
+ "atomic_write_policy": "delegated-to-system-git",
2876
2850
  "receipts": [
2877
- "goal-receipt"
2851
+ "git-clone-receipt"
2878
2852
  ],
2879
- "danger_level": "mixed",
2853
+ "danger_level": "moderate",
2880
2854
  "aliases": [],
2881
2855
  "exit_codes": [
2882
2856
  {
@@ -2889,35 +2863,27 @@
2889
2863
  }
2890
2864
  ],
2891
2865
  "examples": [
2892
- " mdkg goal activate <goal-id-or-qid> [--json]",
2893
- " mdkg goal select <goal-id-or-qid> [--json]",
2894
- " mdkg goal show <goal-id-or-qid> [--json]"
2866
+ " mdkg git clone <repository-ref> --target <path> [--branch <name>] [--json]"
2895
2867
  ],
2896
2868
  "docs": {
2897
- "help_target": "mdkg help goal",
2869
+ "help_target": "mdkg help git clone",
2898
2870
  "command_matrix": "CLI_COMMAND_MATRIX.md"
2899
2871
  }
2900
2872
  },
2901
2873
  {
2902
- "key": "goal activate",
2874
+ "key": "git closeout",
2903
2875
  "path": [
2904
- "goal",
2905
- "activate"
2876
+ "git",
2877
+ "closeout"
2906
2878
  ],
2907
- "category": "goal",
2879
+ "category": "git",
2908
2880
  "status": "stable",
2909
2881
  "visibility": "public",
2910
- "summary": "mdkg goal activate command",
2882
+ "summary": "mdkg git closeout command",
2911
2883
  "usage": [
2912
- " mdkg goal activate <goal-id-or-qid> [--ws <alias>] [--json]"
2913
- ],
2914
- "args": [
2915
- {
2916
- "name": "goal-id-or-qid",
2917
- "required": true,
2918
- "source": "<goal-id-or-qid>"
2919
- }
2884
+ " mdkg git closeout [--queue-policy drain|paused] [--output <path>] [--json]"
2920
2885
  ],
2886
+ "args": [],
2921
2887
  "flags": [
2922
2888
  {
2923
2889
  "name": "--help",
@@ -2944,22 +2910,23 @@
2944
2910
  ],
2945
2911
  "json_schema_ref": "mdkg.command_output.v1",
2946
2912
  "side_effects": [
2947
- "activate-goal-and-pause-competing-goals"
2913
+ "write-static-git-closeout-receipts-and-optional-db-snapshot"
2948
2914
  ],
2949
2915
  "read_paths": [
2950
2916
  ".mdkg/**"
2951
2917
  ],
2952
2918
  "write_paths": [
2953
- ".mdkg/**/*.md",
2919
+ ".mdkg/db/**",
2920
+ ".mdkg/git/**",
2954
2921
  ".mdkg/index/**"
2955
2922
  ],
2956
2923
  "dry_run": {
2957
2924
  "supported": false
2958
2925
  },
2959
2926
  "lock_policy": "mutation-lock-required",
2960
- "atomic_write_policy": "atomic-file-writes",
2927
+ "atomic_write_policy": "atomic-file-writes-and-sqlite-vacuum-into",
2961
2928
  "receipts": [
2962
- "goal-state-receipt"
2929
+ "git-closeout-receipt"
2963
2930
  ],
2964
2931
  "danger_level": "moderate",
2965
2932
  "aliases": [],
@@ -2974,33 +2941,27 @@
2974
2941
  }
2975
2942
  ],
2976
2943
  "examples": [
2977
- " mdkg goal activate <goal-id-or-qid> [--ws <alias>] [--json]"
2944
+ " mdkg git closeout [--queue-policy drain|paused] [--output <path>] [--json]"
2978
2945
  ],
2979
2946
  "docs": {
2980
- "help_target": "mdkg help goal activate",
2947
+ "help_target": "mdkg help git closeout",
2981
2948
  "command_matrix": "CLI_COMMAND_MATRIX.md"
2982
2949
  }
2983
2950
  },
2984
2951
  {
2985
- "key": "goal archive",
2952
+ "key": "git fetch",
2986
2953
  "path": [
2987
- "goal",
2988
- "archive"
2954
+ "git",
2955
+ "fetch"
2989
2956
  ],
2990
- "category": "goal",
2957
+ "category": "git",
2991
2958
  "status": "stable",
2992
2959
  "visibility": "public",
2993
- "summary": "mdkg goal archive command",
2960
+ "summary": "mdkg git fetch command",
2994
2961
  "usage": [
2995
- " mdkg goal archive <goal-id-or-qid> [--ws <alias>] [--json]"
2996
- ],
2997
- "args": [
2998
- {
2999
- "name": "goal-id-or-qid",
3000
- "required": true,
3001
- "source": "<goal-id-or-qid>"
3002
- }
2962
+ " mdkg git fetch [--remote <name>] [--branch <name>] [--json]"
3003
2963
  ],
2964
+ "args": [],
3004
2965
  "flags": [
3005
2966
  {
3006
2967
  "name": "--help",
@@ -3027,22 +2988,21 @@
3027
2988
  ],
3028
2989
  "json_schema_ref": "mdkg.command_output.v1",
3029
2990
  "side_effects": [
3030
- "archive-goal"
2991
+ "fetch-remote-git-refs"
3031
2992
  ],
3032
2993
  "read_paths": [
3033
2994
  ".mdkg/**"
3034
2995
  ],
3035
2996
  "write_paths": [
3036
- ".mdkg/**/*.md",
3037
- ".mdkg/index/**"
2997
+ ".git/**"
3038
2998
  ],
3039
2999
  "dry_run": {
3040
3000
  "supported": false
3041
3001
  },
3042
- "lock_policy": "mutation-lock-required",
3043
- "atomic_write_policy": "atomic-file-writes",
3002
+ "lock_policy": "delegated-to-system-git",
3003
+ "atomic_write_policy": "delegated-to-system-git",
3044
3004
  "receipts": [
3045
- "goal-state-receipt"
3005
+ "git-fetch-receipt"
3046
3006
  ],
3047
3007
  "danger_level": "moderate",
3048
3008
  "aliases": [],
@@ -3057,39 +3017,27 @@
3057
3017
  }
3058
3018
  ],
3059
3019
  "examples": [
3060
- " mdkg goal archive <goal-id-or-qid> [--ws <alias>] [--json]"
3020
+ " mdkg git fetch [--remote <name>] [--branch <name>] [--json]"
3061
3021
  ],
3062
3022
  "docs": {
3063
- "help_target": "mdkg help goal archive",
3023
+ "help_target": "mdkg help git fetch",
3064
3024
  "command_matrix": "CLI_COMMAND_MATRIX.md"
3065
3025
  }
3066
3026
  },
3067
3027
  {
3068
- "key": "goal claim",
3028
+ "key": "git inspect",
3069
3029
  "path": [
3070
- "goal",
3071
- "claim"
3030
+ "git",
3031
+ "inspect"
3072
3032
  ],
3073
- "category": "goal",
3033
+ "category": "git",
3074
3034
  "status": "stable",
3075
3035
  "visibility": "public",
3076
- "summary": "mdkg goal claim command",
3036
+ "summary": "mdkg git inspect command",
3077
3037
  "usage": [
3078
- " mdkg goal claim <work-id-or-qid> [--ws <alias>] [--json]",
3079
- " mdkg goal claim <goal-id-or-qid> <work-id-or-qid> [--ws <alias>] [--json]"
3080
- ],
3081
- "args": [
3082
- {
3083
- "name": "goal-id-or-qid",
3084
- "required": true,
3085
- "source": "<goal-id-or-qid>"
3086
- },
3087
- {
3088
- "name": "work-id-or-qid",
3089
- "required": true,
3090
- "source": "<work-id-or-qid>"
3091
- }
3038
+ " mdkg git inspect [--json]"
3092
3039
  ],
3040
+ "args": [],
3093
3041
  "flags": [
3094
3042
  {
3095
3043
  "name": "--help",
@@ -3116,24 +3064,21 @@
3116
3064
  ],
3117
3065
  "json_schema_ref": "mdkg.command_output.v1",
3118
3066
  "side_effects": [
3119
- "claim-goal-active-node"
3067
+ "none"
3120
3068
  ],
3121
3069
  "read_paths": [
3122
3070
  ".mdkg/**"
3123
3071
  ],
3124
- "write_paths": [
3125
- ".mdkg/**/*.md",
3126
- ".mdkg/index/**"
3127
- ],
3072
+ "write_paths": [],
3128
3073
  "dry_run": {
3129
3074
  "supported": false
3130
3075
  },
3131
- "lock_policy": "mutation-lock-required",
3132
- "atomic_write_policy": "atomic-file-writes",
3076
+ "lock_policy": "none-read-only",
3077
+ "atomic_write_policy": "none-read-only",
3133
3078
  "receipts": [
3134
- "goal-state-receipt"
3079
+ "git-inspect-receipt"
3135
3080
  ],
3136
- "danger_level": "moderate",
3081
+ "danger_level": "read-only",
3137
3082
  "aliases": [],
3138
3083
  "exit_codes": [
3139
3084
  {
@@ -3146,41 +3091,65 @@
3146
3091
  }
3147
3092
  ],
3148
3093
  "examples": [
3149
- " mdkg goal claim <goal-id-or-qid> <work-id-or-qid> [--ws <alias>] [--json]",
3150
- " mdkg goal claim <work-id-or-qid> [--ws <alias>] [--json]"
3094
+ " mdkg git inspect [--json]"
3151
3095
  ],
3152
3096
  "docs": {
3153
- "help_target": "mdkg help goal claim",
3097
+ "help_target": "mdkg help git inspect",
3154
3098
  "command_matrix": "CLI_COMMAND_MATRIX.md"
3155
3099
  }
3156
3100
  },
3157
3101
  {
3158
- "key": "goal clear",
3102
+ "key": "git push",
3159
3103
  "path": [
3160
- "goal",
3161
- "clear"
3104
+ "git",
3105
+ "push"
3162
3106
  ],
3163
- "category": "goal",
3107
+ "category": "git",
3164
3108
  "status": "stable",
3165
3109
  "visibility": "public",
3166
- "summary": "mdkg goal clear command",
3110
+ "summary": "mdkg git push command",
3167
3111
  "usage": [
3168
- " mdkg goal clear [--json]"
3112
+ " mdkg git push --remote <name> --branch <name> [--json]",
3113
+ " mdkg git push --remote <name> --branch <name> --stage-all --message <text> [--queue-policy drain|paused] [--json]"
3169
3114
  ],
3170
3115
  "args": [],
3171
3116
  "flags": [
3117
+ {
3118
+ "name": "--branch",
3119
+ "value": "<name>",
3120
+ "required": false,
3121
+ "description": "mdkg git push --remote <name> --branch <name> [--json]"
3122
+ },
3172
3123
  {
3173
3124
  "name": "--help",
3174
3125
  "value": null,
3175
3126
  "required": false,
3176
3127
  "description": "--help, -h Show help"
3177
3128
  },
3129
+ {
3130
+ "name": "--message",
3131
+ "value": null,
3132
+ "required": false,
3133
+ "description": "- --stage-all writes closeout evidence, stages all changes, commits with --message, then runs push-ready before pushing"
3134
+ },
3135
+ {
3136
+ "name": "--remote",
3137
+ "value": "<name>",
3138
+ "required": false,
3139
+ "description": "mdkg git push --remote <name> --branch <name> [--json]"
3140
+ },
3178
3141
  {
3179
3142
  "name": "--root",
3180
3143
  "value": null,
3181
3144
  "required": false,
3182
3145
  "description": "--root, -r <path> Run against a specific repo root"
3183
3146
  },
3147
+ {
3148
+ "name": "--stage-all",
3149
+ "value": null,
3150
+ "required": false,
3151
+ "description": "mdkg git push --remote <name> --branch <name> --stage-all --message <text> [--queue-policy drain|paused] [--json]"
3152
+ },
3184
3153
  {
3185
3154
  "name": "--version",
3186
3155
  "value": null,
@@ -3194,24 +3163,26 @@
3194
3163
  ],
3195
3164
  "json_schema_ref": "mdkg.command_output.v1",
3196
3165
  "side_effects": [
3197
- "clear-selected-goal"
3166
+ "optional-closeout-stage-commit-and-real-git-push"
3198
3167
  ],
3199
3168
  "read_paths": [
3200
3169
  ".mdkg/**"
3201
3170
  ],
3202
3171
  "write_paths": [
3203
- ".mdkg/**/*.md",
3204
- ".mdkg/index/**"
3172
+ ".git/**",
3173
+ ".mdkg/db/**",
3174
+ ".mdkg/git/**",
3175
+ "repo-files/**"
3205
3176
  ],
3206
3177
  "dry_run": {
3207
3178
  "supported": false
3208
3179
  },
3209
3180
  "lock_policy": "mutation-lock-required",
3210
- "atomic_write_policy": "atomic-file-writes",
3181
+ "atomic_write_policy": "atomic-file-writes-plus-system-git",
3211
3182
  "receipts": [
3212
- "goal-state-receipt"
3183
+ "git-push-receipt"
3213
3184
  ],
3214
- "danger_level": "moderate",
3185
+ "danger_level": "high",
3215
3186
  "aliases": [],
3216
3187
  "exit_codes": [
3217
3188
  {
@@ -3224,34 +3195,47 @@
3224
3195
  }
3225
3196
  ],
3226
3197
  "examples": [
3227
- " mdkg goal clear [--json]"
3198
+ " mdkg git push --remote <name> --branch <name> --stage-all --message <text> [--queue-policy drain|paused] [--json]",
3199
+ " mdkg git push --remote <name> --branch <name> [--json]"
3228
3200
  ],
3229
3201
  "docs": {
3230
- "help_target": "mdkg help goal clear",
3202
+ "help_target": "mdkg help git push",
3231
3203
  "command_matrix": "CLI_COMMAND_MATRIX.md"
3232
3204
  }
3233
3205
  },
3234
3206
  {
3235
- "key": "goal current",
3207
+ "key": "git push-ready",
3236
3208
  "path": [
3237
- "goal",
3238
- "current"
3209
+ "git",
3210
+ "push-ready"
3239
3211
  ],
3240
- "category": "goal",
3212
+ "category": "git",
3241
3213
  "status": "stable",
3242
3214
  "visibility": "public",
3243
- "summary": "mdkg goal current command",
3215
+ "summary": "mdkg git push-ready command",
3244
3216
  "usage": [
3245
- " mdkg goal current [--ws <alias>] [--json]"
3217
+ " mdkg git push-ready --remote <name> --branch <name> [--json]"
3246
3218
  ],
3247
3219
  "args": [],
3248
3220
  "flags": [
3221
+ {
3222
+ "name": "--branch",
3223
+ "value": "<name>",
3224
+ "required": false,
3225
+ "description": "mdkg git push-ready --remote <name> --branch <name> [--json]"
3226
+ },
3249
3227
  {
3250
3228
  "name": "--help",
3251
3229
  "value": null,
3252
3230
  "required": false,
3253
3231
  "description": "--help, -h Show help"
3254
3232
  },
3233
+ {
3234
+ "name": "--remote",
3235
+ "value": "<name>",
3236
+ "required": false,
3237
+ "description": "mdkg git push-ready --remote <name> --branch <name> [--json]"
3238
+ },
3255
3239
  {
3256
3240
  "name": "--root",
3257
3241
  "value": null,
@@ -3282,7 +3266,9 @@
3282
3266
  },
3283
3267
  "lock_policy": "none-read-only",
3284
3268
  "atomic_write_policy": "none-read-only",
3285
- "receipts": [],
3269
+ "receipts": [
3270
+ "git-push-ready-receipt"
3271
+ ],
3286
3272
  "danger_level": "read-only",
3287
3273
  "aliases": [],
3288
3274
  "exit_codes": [
@@ -3296,39 +3282,85 @@
3296
3282
  }
3297
3283
  ],
3298
3284
  "examples": [
3299
- " mdkg goal current [--ws <alias>] [--json]"
3285
+ " mdkg git push-ready --remote <name> --branch <name> [--json]"
3300
3286
  ],
3301
3287
  "docs": {
3302
- "help_target": "mdkg help goal current",
3288
+ "help_target": "mdkg help git push-ready",
3303
3289
  "command_matrix": "CLI_COMMAND_MATRIX.md"
3304
3290
  }
3305
3291
  },
3306
3292
  {
3307
- "key": "goal done",
3293
+ "key": "global",
3308
3294
  "path": [
3309
- "goal",
3310
- "done"
3295
+ "global"
3311
3296
  ],
3312
- "category": "goal",
3297
+ "category": "global",
3313
3298
  "status": "stable",
3314
3299
  "visibility": "public",
3315
- "summary": "mdkg goal done command",
3300
+ "summary": "mdkg - Markdown Knowledge Graph",
3316
3301
  "usage": [
3317
- " mdkg goal done <goal-id-or-qid> [--ws <alias>] [--json]"
3302
+ " mdkg <command> [options]"
3318
3303
  ],
3319
3304
  "args": [
3320
3305
  {
3321
- "name": "goal-id-or-qid",
3306
+ "name": "command",
3322
3307
  "required": true,
3323
- "source": "<goal-id-or-qid>"
3308
+ "source": "<command>"
3309
+ },
3310
+ {
3311
+ "name": "options",
3312
+ "required": false,
3313
+ "source": "[options]"
3324
3314
  }
3325
3315
  ],
3326
3316
  "flags": [
3317
+ {
3318
+ "name": "--agent",
3319
+ "value": null,
3320
+ "required": false,
3321
+ "description": "mdkg init --agent"
3322
+ },
3323
+ {
3324
+ "name": "--apply",
3325
+ "value": null,
3326
+ "required": false,
3327
+ "description": "mdkg upgrade --apply"
3328
+ },
3329
+ {
3330
+ "name": "--description",
3331
+ "value": "\"use",
3332
+ "required": false,
3333
+ "description": "mdkg skill new release-readiness \"release readiness audit\" --description \"use when preparing a release\""
3334
+ },
3335
+ {
3336
+ "name": "--dry-run",
3337
+ "value": null,
3338
+ "required": false,
3339
+ "description": "mdkg pack <id> --profile concise --dry-run --stats"
3340
+ },
3327
3341
  {
3328
3342
  "name": "--help",
3329
3343
  "value": null,
3330
3344
  "required": false,
3331
- "description": "--help, -h Show help"
3345
+ "description": "Run `mdkg help <command>` or `mdkg <command> --help` for details."
3346
+ },
3347
+ {
3348
+ "name": "--json",
3349
+ "value": null,
3350
+ "required": false,
3351
+ "description": "mdkg skill list --tags stage:plan --json"
3352
+ },
3353
+ {
3354
+ "name": "--priority",
3355
+ "value": "1",
3356
+ "required": false,
3357
+ "description": "mdkg new task \"...\" --status todo --priority 1"
3358
+ },
3359
+ {
3360
+ "name": "--profile",
3361
+ "value": "concise",
3362
+ "required": false,
3363
+ "description": "mdkg pack <id> --profile concise --dry-run --stats"
3332
3364
  },
3333
3365
  {
3334
3366
  "name": "--root",
@@ -3336,6 +3368,18 @@
3336
3368
  "required": false,
3337
3369
  "description": "--root, -r <path> Run against a specific repo root"
3338
3370
  },
3371
+ {
3372
+ "name": "--status",
3373
+ "value": "todo",
3374
+ "required": false,
3375
+ "description": "mdkg new task \"...\" --status todo --priority 1"
3376
+ },
3377
+ {
3378
+ "name": "--tags",
3379
+ "value": "stage:plan",
3380
+ "required": false,
3381
+ "description": "mdkg skill list --tags stage:plan --json"
3382
+ },
3339
3383
  {
3340
3384
  "name": "--version",
3341
3385
  "value": null,
@@ -3349,24 +3393,19 @@
3349
3393
  ],
3350
3394
  "json_schema_ref": "mdkg.command_output.v1",
3351
3395
  "side_effects": [
3352
- "complete-goal"
3396
+ "none"
3353
3397
  ],
3354
3398
  "read_paths": [
3355
3399
  ".mdkg/**"
3356
3400
  ],
3357
- "write_paths": [
3358
- ".mdkg/**/*.md",
3359
- ".mdkg/index/**"
3360
- ],
3401
+ "write_paths": [],
3361
3402
  "dry_run": {
3362
3403
  "supported": false
3363
3404
  },
3364
- "lock_policy": "mutation-lock-required",
3365
- "atomic_write_policy": "atomic-file-writes",
3366
- "receipts": [
3367
- "goal-state-receipt"
3368
- ],
3369
- "danger_level": "moderate",
3405
+ "lock_policy": "none-read-only",
3406
+ "atomic_write_policy": "none-read-only",
3407
+ "receipts": [],
3408
+ "danger_level": "read-only",
3370
3409
  "aliases": [],
3371
3410
  "exit_codes": [
3372
3411
  {
@@ -3379,31 +3418,43 @@
3379
3418
  }
3380
3419
  ],
3381
3420
  "examples": [
3382
- " mdkg goal done <goal-id-or-qid> [--ws <alias>] [--json]"
3421
+ " mdkg <command> [options]"
3383
3422
  ],
3384
3423
  "docs": {
3385
- "help_target": "mdkg help goal done",
3424
+ "help_target": "mdkg --help",
3386
3425
  "command_matrix": "CLI_COMMAND_MATRIX.md"
3387
3426
  }
3388
3427
  },
3389
3428
  {
3390
- "key": "goal evaluate",
3429
+ "key": "goal",
3391
3430
  "path": [
3392
- "goal",
3393
- "evaluate"
3431
+ "goal"
3394
3432
  ],
3395
3433
  "category": "goal",
3396
3434
  "status": "stable",
3397
3435
  "visibility": "public",
3398
- "summary": "mdkg goal evaluate command",
3436
+ "summary": "mdkg goal command",
3399
3437
  "usage": [
3400
- " mdkg goal evaluate <goal-id-or-qid> [--ws <alias>] [--json]"
3438
+ " mdkg goal show <goal-id-or-qid> [--json]",
3439
+ " mdkg goal select <goal-id-or-qid> [--json]",
3440
+ " mdkg goal activate <goal-id-or-qid> [--json]",
3441
+ " mdkg goal current [--json]",
3442
+ " mdkg goal next [goal-id-or-qid] [--json]",
3443
+ " mdkg goal claim [goal-id-or-qid] <work-id-or-qid> [--json]",
3444
+ " mdkg goal evaluate <goal-id-or-qid> [--json]",
3445
+ " mdkg goal clear [--json]",
3446
+ " mdkg goal pause|resume|done|archive <goal-id-or-qid> [--json]"
3401
3447
  ],
3402
3448
  "args": [
3403
3449
  {
3404
3450
  "name": "goal-id-or-qid",
3405
3451
  "required": true,
3406
3452
  "source": "<goal-id-or-qid>"
3453
+ },
3454
+ {
3455
+ "name": "work-id-or-qid",
3456
+ "required": true,
3457
+ "source": "<work-id-or-qid>"
3407
3458
  }
3408
3459
  ],
3409
3460
  "flags": [
@@ -3432,19 +3483,24 @@
3432
3483
  ],
3433
3484
  "json_schema_ref": "mdkg.command_output.v1",
3434
3485
  "side_effects": [
3435
- "none"
3486
+ "read-or-update-selected-goal-state"
3436
3487
  ],
3437
3488
  "read_paths": [
3438
3489
  ".mdkg/**"
3439
3490
  ],
3440
- "write_paths": [],
3491
+ "write_paths": [
3492
+ ".mdkg/**/*.md",
3493
+ ".mdkg/index/**"
3494
+ ],
3441
3495
  "dry_run": {
3442
3496
  "supported": false
3443
3497
  },
3444
- "lock_policy": "none-read-only",
3445
- "atomic_write_policy": "none-read-only",
3446
- "receipts": [],
3447
- "danger_level": "read-only",
3498
+ "lock_policy": "mutation-lock-required-for-select-clear-claim-pause-resume-done",
3499
+ "atomic_write_policy": "atomic-file-writes",
3500
+ "receipts": [
3501
+ "goal-receipt"
3502
+ ],
3503
+ "danger_level": "mixed",
3448
3504
  "aliases": [],
3449
3505
  "exit_codes": [
3450
3506
  {
@@ -3457,31 +3513,33 @@
3457
3513
  }
3458
3514
  ],
3459
3515
  "examples": [
3460
- " mdkg goal evaluate <goal-id-or-qid> [--ws <alias>] [--json]"
3516
+ " mdkg goal activate <goal-id-or-qid> [--json]",
3517
+ " mdkg goal select <goal-id-or-qid> [--json]",
3518
+ " mdkg goal show <goal-id-or-qid> [--json]"
3461
3519
  ],
3462
3520
  "docs": {
3463
- "help_target": "mdkg help goal evaluate",
3521
+ "help_target": "mdkg help goal",
3464
3522
  "command_matrix": "CLI_COMMAND_MATRIX.md"
3465
3523
  }
3466
3524
  },
3467
3525
  {
3468
- "key": "goal next",
3526
+ "key": "goal activate",
3469
3527
  "path": [
3470
3528
  "goal",
3471
- "next"
3529
+ "activate"
3472
3530
  ],
3473
3531
  "category": "goal",
3474
3532
  "status": "stable",
3475
3533
  "visibility": "public",
3476
- "summary": "mdkg goal next command",
3534
+ "summary": "mdkg goal activate command",
3477
3535
  "usage": [
3478
- " mdkg goal next [goal-id-or-qid] [--ws <alias>] [--json]"
3536
+ " mdkg goal activate <goal-id-or-qid> [--ws <alias>] [--json]"
3479
3537
  ],
3480
3538
  "args": [
3481
3539
  {
3482
3540
  "name": "goal-id-or-qid",
3483
- "required": false,
3484
- "source": "[goal-id-or-qid]"
3541
+ "required": true,
3542
+ "source": "<goal-id-or-qid>"
3485
3543
  }
3486
3544
  ],
3487
3545
  "flags": [
@@ -3510,19 +3568,24 @@
3510
3568
  ],
3511
3569
  "json_schema_ref": "mdkg.command_output.v1",
3512
3570
  "side_effects": [
3513
- "none"
3571
+ "activate-goal-and-pause-competing-goals"
3514
3572
  ],
3515
3573
  "read_paths": [
3516
3574
  ".mdkg/**"
3517
3575
  ],
3518
- "write_paths": [],
3576
+ "write_paths": [
3577
+ ".mdkg/**/*.md",
3578
+ ".mdkg/index/**"
3579
+ ],
3519
3580
  "dry_run": {
3520
3581
  "supported": false
3521
3582
  },
3522
- "lock_policy": "none-read-only",
3523
- "atomic_write_policy": "none-read-only",
3524
- "receipts": [],
3525
- "danger_level": "read-only",
3583
+ "lock_policy": "mutation-lock-required",
3584
+ "atomic_write_policy": "atomic-file-writes",
3585
+ "receipts": [
3586
+ "goal-state-receipt"
3587
+ ],
3588
+ "danger_level": "moderate",
3526
3589
  "aliases": [],
3527
3590
  "exit_codes": [
3528
3591
  {
@@ -3535,25 +3598,25 @@
3535
3598
  }
3536
3599
  ],
3537
3600
  "examples": [
3538
- " mdkg goal next [goal-id-or-qid] [--ws <alias>] [--json]"
3601
+ " mdkg goal activate <goal-id-or-qid> [--ws <alias>] [--json]"
3539
3602
  ],
3540
3603
  "docs": {
3541
- "help_target": "mdkg help goal next",
3604
+ "help_target": "mdkg help goal activate",
3542
3605
  "command_matrix": "CLI_COMMAND_MATRIX.md"
3543
3606
  }
3544
3607
  },
3545
3608
  {
3546
- "key": "goal pause",
3609
+ "key": "goal archive",
3547
3610
  "path": [
3548
3611
  "goal",
3549
- "pause"
3612
+ "archive"
3550
3613
  ],
3551
3614
  "category": "goal",
3552
3615
  "status": "stable",
3553
3616
  "visibility": "public",
3554
- "summary": "mdkg goal pause command",
3617
+ "summary": "mdkg goal archive command",
3555
3618
  "usage": [
3556
- " mdkg goal pause <goal-id-or-qid> [--ws <alias>] [--json]"
3619
+ " mdkg goal archive <goal-id-or-qid> [--ws <alias>] [--json]"
3557
3620
  ],
3558
3621
  "args": [
3559
3622
  {
@@ -3588,7 +3651,7 @@
3588
3651
  ],
3589
3652
  "json_schema_ref": "mdkg.command_output.v1",
3590
3653
  "side_effects": [
3591
- "pause-goal"
3654
+ "archive-goal"
3592
3655
  ],
3593
3656
  "read_paths": [
3594
3657
  ".mdkg/**"
@@ -3618,31 +3681,37 @@
3618
3681
  }
3619
3682
  ],
3620
3683
  "examples": [
3621
- " mdkg goal pause <goal-id-or-qid> [--ws <alias>] [--json]"
3684
+ " mdkg goal archive <goal-id-or-qid> [--ws <alias>] [--json]"
3622
3685
  ],
3623
3686
  "docs": {
3624
- "help_target": "mdkg help goal pause",
3687
+ "help_target": "mdkg help goal archive",
3625
3688
  "command_matrix": "CLI_COMMAND_MATRIX.md"
3626
3689
  }
3627
3690
  },
3628
3691
  {
3629
- "key": "goal resume",
3692
+ "key": "goal claim",
3630
3693
  "path": [
3631
3694
  "goal",
3632
- "resume"
3695
+ "claim"
3633
3696
  ],
3634
3697
  "category": "goal",
3635
3698
  "status": "stable",
3636
3699
  "visibility": "public",
3637
- "summary": "mdkg goal resume command",
3700
+ "summary": "mdkg goal claim command",
3638
3701
  "usage": [
3639
- " mdkg goal resume <goal-id-or-qid> [--ws <alias>] [--json]"
3702
+ " mdkg goal claim <work-id-or-qid> [--ws <alias>] [--json]",
3703
+ " mdkg goal claim <goal-id-or-qid> <work-id-or-qid> [--ws <alias>] [--json]"
3640
3704
  ],
3641
3705
  "args": [
3642
3706
  {
3643
3707
  "name": "goal-id-or-qid",
3644
3708
  "required": true,
3645
3709
  "source": "<goal-id-or-qid>"
3710
+ },
3711
+ {
3712
+ "name": "work-id-or-qid",
3713
+ "required": true,
3714
+ "source": "<work-id-or-qid>"
3646
3715
  }
3647
3716
  ],
3648
3717
  "flags": [
@@ -3671,7 +3740,7 @@
3671
3740
  ],
3672
3741
  "json_schema_ref": "mdkg.command_output.v1",
3673
3742
  "side_effects": [
3674
- "resume-goal"
3743
+ "claim-goal-active-node"
3675
3744
  ],
3676
3745
  "read_paths": [
3677
3746
  ".mdkg/**"
@@ -3701,33 +3770,28 @@
3701
3770
  }
3702
3771
  ],
3703
3772
  "examples": [
3704
- " mdkg goal resume <goal-id-or-qid> [--ws <alias>] [--json]"
3773
+ " mdkg goal claim <goal-id-or-qid> <work-id-or-qid> [--ws <alias>] [--json]",
3774
+ " mdkg goal claim <work-id-or-qid> [--ws <alias>] [--json]"
3705
3775
  ],
3706
3776
  "docs": {
3707
- "help_target": "mdkg help goal resume",
3777
+ "help_target": "mdkg help goal claim",
3708
3778
  "command_matrix": "CLI_COMMAND_MATRIX.md"
3709
3779
  }
3710
3780
  },
3711
3781
  {
3712
- "key": "goal select",
3782
+ "key": "goal clear",
3713
3783
  "path": [
3714
3784
  "goal",
3715
- "select"
3785
+ "clear"
3716
3786
  ],
3717
3787
  "category": "goal",
3718
3788
  "status": "stable",
3719
3789
  "visibility": "public",
3720
- "summary": "mdkg goal select command",
3790
+ "summary": "mdkg goal clear command",
3721
3791
  "usage": [
3722
- " mdkg goal select <goal-id-or-qid> [--ws <alias>] [--json]"
3723
- ],
3724
- "args": [
3725
- {
3726
- "name": "goal-id-or-qid",
3727
- "required": true,
3728
- "source": "<goal-id-or-qid>"
3729
- }
3792
+ " mdkg goal clear [--json]"
3730
3793
  ],
3794
+ "args": [],
3731
3795
  "flags": [
3732
3796
  {
3733
3797
  "name": "--help",
@@ -3754,7 +3818,7 @@
3754
3818
  ],
3755
3819
  "json_schema_ref": "mdkg.command_output.v1",
3756
3820
  "side_effects": [
3757
- "select-goal"
3821
+ "clear-selected-goal"
3758
3822
  ],
3759
3823
  "read_paths": [
3760
3824
  ".mdkg/**"
@@ -3784,33 +3848,27 @@
3784
3848
  }
3785
3849
  ],
3786
3850
  "examples": [
3787
- " mdkg goal select <goal-id-or-qid> [--ws <alias>] [--json]"
3851
+ " mdkg goal clear [--json]"
3788
3852
  ],
3789
3853
  "docs": {
3790
- "help_target": "mdkg help goal select",
3854
+ "help_target": "mdkg help goal clear",
3791
3855
  "command_matrix": "CLI_COMMAND_MATRIX.md"
3792
3856
  }
3793
3857
  },
3794
3858
  {
3795
- "key": "goal show",
3859
+ "key": "goal current",
3796
3860
  "path": [
3797
3861
  "goal",
3798
- "show"
3862
+ "current"
3799
3863
  ],
3800
3864
  "category": "goal",
3801
3865
  "status": "stable",
3802
3866
  "visibility": "public",
3803
- "summary": "mdkg goal show command",
3867
+ "summary": "mdkg goal current command",
3804
3868
  "usage": [
3805
- " mdkg goal show <goal-id-or-qid> [--ws <alias>] [--json]"
3806
- ],
3807
- "args": [
3808
- {
3809
- "name": "goal-id-or-qid",
3810
- "required": true,
3811
- "source": "<goal-id-or-qid>"
3812
- }
3869
+ " mdkg goal current [--ws <alias>] [--json]"
3813
3870
  ],
3871
+ "args": [],
3814
3872
  "flags": [
3815
3873
  {
3816
3874
  "name": "--help",
@@ -3862,38 +3920,31 @@
3862
3920
  }
3863
3921
  ],
3864
3922
  "examples": [
3865
- " mdkg goal show <goal-id-or-qid> [--ws <alias>] [--json]"
3923
+ " mdkg goal current [--ws <alias>] [--json]"
3866
3924
  ],
3867
3925
  "docs": {
3868
- "help_target": "mdkg help goal show",
3926
+ "help_target": "mdkg help goal current",
3869
3927
  "command_matrix": "CLI_COMMAND_MATRIX.md"
3870
3928
  }
3871
3929
  },
3872
3930
  {
3873
- "key": "graph",
3931
+ "key": "goal done",
3874
3932
  "path": [
3875
- "graph"
3933
+ "goal",
3934
+ "done"
3876
3935
  ],
3877
- "category": "graph",
3936
+ "category": "goal",
3878
3937
  "status": "stable",
3879
3938
  "visibility": "public",
3880
- "summary": "mdkg graph command",
3939
+ "summary": "mdkg goal done command",
3881
3940
  "usage": [
3882
- " mdkg graph clone <source-bundle-or-mdkg-dir> --target <path> [--json]",
3883
- " mdkg graph fork <source-bundle-or-mdkg-dir> --target <path> [--start-goal <goal-id>] [--json]",
3884
- " mdkg graph import-template <source-bundle-or-mdkg-dir> [--start-goal <goal-id>] [--select-goal] [--id-prefix <prefix>] [--dry-run] [--apply] [--json]",
3885
- " mdkg graph refs <id-or-qid> [--ws <alias>] [--json]"
3941
+ " mdkg goal done <goal-id-or-qid> [--ws <alias>] [--json]"
3886
3942
  ],
3887
3943
  "args": [
3888
3944
  {
3889
- "name": "id-or-qid",
3890
- "required": true,
3891
- "source": "<id-or-qid>"
3892
- },
3893
- {
3894
- "name": "source-bundle-or-mdkg-dir",
3945
+ "name": "goal-id-or-qid",
3895
3946
  "required": true,
3896
- "source": "<source-bundle-or-mdkg-dir>"
3947
+ "source": "<goal-id-or-qid>"
3897
3948
  }
3898
3949
  ],
3899
3950
  "flags": [
@@ -3909,12 +3960,6 @@
3909
3960
  "required": false,
3910
3961
  "description": "--root, -r <path> Run against a specific repo root"
3911
3962
  },
3912
- {
3913
- "name": "--target",
3914
- "value": "<path>",
3915
- "required": false,
3916
- "description": "mdkg graph clone <source-bundle-or-mdkg-dir> --target <path> [--json]"
3917
- },
3918
3963
  {
3919
3964
  "name": "--version",
3920
3965
  "value": null,
@@ -3928,19 +3973,24 @@
3928
3973
  ],
3929
3974
  "json_schema_ref": "mdkg.command_output.v1",
3930
3975
  "side_effects": [
3931
- "none"
3976
+ "complete-goal"
3932
3977
  ],
3933
3978
  "read_paths": [
3934
3979
  ".mdkg/**"
3935
3980
  ],
3936
- "write_paths": [],
3981
+ "write_paths": [
3982
+ ".mdkg/**/*.md",
3983
+ ".mdkg/index/**"
3984
+ ],
3937
3985
  "dry_run": {
3938
3986
  "supported": false
3939
3987
  },
3940
- "lock_policy": "none-read-only",
3941
- "atomic_write_policy": "none-read-only",
3942
- "receipts": [],
3943
- "danger_level": "read-only",
3988
+ "lock_policy": "mutation-lock-required",
3989
+ "atomic_write_policy": "atomic-file-writes",
3990
+ "receipts": [
3991
+ "goal-state-receipt"
3992
+ ],
3993
+ "danger_level": "moderate",
3944
3994
  "aliases": [],
3945
3995
  "exit_codes": [
3946
3996
  {
@@ -3953,33 +4003,31 @@
3953
4003
  }
3954
4004
  ],
3955
4005
  "examples": [
3956
- " mdkg graph clone <source-bundle-or-mdkg-dir> --target <path> [--json]",
3957
- " mdkg graph fork <source-bundle-or-mdkg-dir> --target <path> [--start-goal <goal-id>] [--json]",
3958
- " mdkg graph import-template <source-bundle-or-mdkg-dir> [--start-goal <goal-id>] [--select-goal] [--id-prefix <prefix>] [--dry-run] [--apply] [--json]"
4006
+ " mdkg goal done <goal-id-or-qid> [--ws <alias>] [--json]"
3959
4007
  ],
3960
4008
  "docs": {
3961
- "help_target": "mdkg help graph",
4009
+ "help_target": "mdkg help goal done",
3962
4010
  "command_matrix": "CLI_COMMAND_MATRIX.md"
3963
4011
  }
3964
4012
  },
3965
4013
  {
3966
- "key": "graph clone",
4014
+ "key": "goal evaluate",
3967
4015
  "path": [
3968
- "graph",
3969
- "clone"
4016
+ "goal",
4017
+ "evaluate"
3970
4018
  ],
3971
- "category": "graph",
4019
+ "category": "goal",
3972
4020
  "status": "stable",
3973
4021
  "visibility": "public",
3974
- "summary": "mdkg graph clone command",
4022
+ "summary": "mdkg goal evaluate command",
3975
4023
  "usage": [
3976
- " mdkg graph clone <source-bundle-or-mdkg-dir> --target <path> [--json]"
4024
+ " mdkg goal evaluate <goal-id-or-qid> [--ws <alias>] [--json]"
3977
4025
  ],
3978
4026
  "args": [
3979
4027
  {
3980
- "name": "source-bundle-or-mdkg-dir",
4028
+ "name": "goal-id-or-qid",
3981
4029
  "required": true,
3982
- "source": "<source-bundle-or-mdkg-dir>"
4030
+ "source": "<goal-id-or-qid>"
3983
4031
  }
3984
4032
  ],
3985
4033
  "flags": [
@@ -3995,12 +4043,6 @@
3995
4043
  "required": false,
3996
4044
  "description": "--root, -r <path> Run against a specific repo root"
3997
4045
  },
3998
- {
3999
- "name": "--target",
4000
- "value": "<path>",
4001
- "required": false,
4002
- "description": "mdkg graph clone <source-bundle-or-mdkg-dir> --target <path> [--json]"
4003
- },
4004
4046
  {
4005
4047
  "name": "--version",
4006
4048
  "value": null,
@@ -4039,31 +4081,31 @@
4039
4081
  }
4040
4082
  ],
4041
4083
  "examples": [
4042
- " mdkg graph clone <source-bundle-or-mdkg-dir> --target <path> [--json]"
4084
+ " mdkg goal evaluate <goal-id-or-qid> [--ws <alias>] [--json]"
4043
4085
  ],
4044
4086
  "docs": {
4045
- "help_target": "mdkg help graph clone",
4087
+ "help_target": "mdkg help goal evaluate",
4046
4088
  "command_matrix": "CLI_COMMAND_MATRIX.md"
4047
4089
  }
4048
4090
  },
4049
4091
  {
4050
- "key": "graph fork",
4092
+ "key": "goal next",
4051
4093
  "path": [
4052
- "graph",
4053
- "fork"
4094
+ "goal",
4095
+ "next"
4054
4096
  ],
4055
- "category": "graph",
4097
+ "category": "goal",
4056
4098
  "status": "stable",
4057
4099
  "visibility": "public",
4058
- "summary": "mdkg graph fork command",
4100
+ "summary": "mdkg goal next command",
4059
4101
  "usage": [
4060
- " mdkg graph fork <source-bundle-or-mdkg-dir> --target <path> [--start-goal <goal-id>] [--json]"
4102
+ " mdkg goal next [goal-id-or-qid] [--ws <alias>] [--json]"
4061
4103
  ],
4062
4104
  "args": [
4063
4105
  {
4064
- "name": "source-bundle-or-mdkg-dir",
4065
- "required": true,
4066
- "source": "<source-bundle-or-mdkg-dir>"
4106
+ "name": "goal-id-or-qid",
4107
+ "required": false,
4108
+ "source": "[goal-id-or-qid]"
4067
4109
  }
4068
4110
  ],
4069
4111
  "flags": [
@@ -4079,12 +4121,6 @@
4079
4121
  "required": false,
4080
4122
  "description": "--root, -r <path> Run against a specific repo root"
4081
4123
  },
4082
- {
4083
- "name": "--target",
4084
- "value": "<path>",
4085
- "required": false,
4086
- "description": "mdkg graph fork <source-bundle-or-mdkg-dir> --target <path> [--start-goal <goal-id>] [--json]"
4087
- },
4088
4124
  {
4089
4125
  "name": "--version",
4090
4126
  "value": null,
@@ -4123,40 +4159,34 @@
4123
4159
  }
4124
4160
  ],
4125
4161
  "examples": [
4126
- " mdkg graph fork <source-bundle-or-mdkg-dir> --target <path> [--start-goal <goal-id>] [--json]"
4162
+ " mdkg goal next [goal-id-or-qid] [--ws <alias>] [--json]"
4127
4163
  ],
4128
4164
  "docs": {
4129
- "help_target": "mdkg help graph fork",
4165
+ "help_target": "mdkg help goal next",
4130
4166
  "command_matrix": "CLI_COMMAND_MATRIX.md"
4131
4167
  }
4132
4168
  },
4133
4169
  {
4134
- "key": "graph import-template",
4170
+ "key": "goal pause",
4135
4171
  "path": [
4136
- "graph",
4137
- "import-template"
4172
+ "goal",
4173
+ "pause"
4138
4174
  ],
4139
- "category": "graph",
4175
+ "category": "goal",
4140
4176
  "status": "stable",
4141
4177
  "visibility": "public",
4142
- "summary": "mdkg graph import-template command",
4178
+ "summary": "mdkg goal pause command",
4143
4179
  "usage": [
4144
- " mdkg graph import-template <source-bundle-or-mdkg-dir> [--start-goal <goal-id>] [--select-goal] [--id-prefix <prefix>] [--dry-run] [--apply] [--json]"
4180
+ " mdkg goal pause <goal-id-or-qid> [--ws <alias>] [--json]"
4145
4181
  ],
4146
4182
  "args": [
4147
4183
  {
4148
- "name": "source-bundle-or-mdkg-dir",
4184
+ "name": "goal-id-or-qid",
4149
4185
  "required": true,
4150
- "source": "<source-bundle-or-mdkg-dir>"
4186
+ "source": "<goal-id-or-qid>"
4151
4187
  }
4152
4188
  ],
4153
4189
  "flags": [
4154
- {
4155
- "name": "--apply",
4156
- "value": "is",
4157
- "required": false,
4158
- "description": "- defaults to dry-run unless --apply is supplied"
4159
- },
4160
4190
  {
4161
4191
  "name": "--help",
4162
4192
  "value": null,
@@ -4169,18 +4199,6 @@
4169
4199
  "required": false,
4170
4200
  "description": "--root, -r <path> Run against a specific repo root"
4171
4201
  },
4172
- {
4173
- "name": "--select-goal",
4174
- "value": "requires",
4175
- "required": false,
4176
- "description": "- --select-goal requires --start-goal; on apply it activates the imported start goal, pauses competing active root goals, validates, then writes selected-goal state"
4177
- },
4178
- {
4179
- "name": "--start-goal",
4180
- "value": null,
4181
- "required": false,
4182
- "description": "- --select-goal requires --start-goal; on apply it activates the imported start goal, pauses competing active root goals, validates, then writes selected-goal state"
4183
- },
4184
4202
  {
4185
4203
  "name": "--version",
4186
4204
  "value": null,
@@ -4194,19 +4212,24 @@
4194
4212
  ],
4195
4213
  "json_schema_ref": "mdkg.command_output.v1",
4196
4214
  "side_effects": [
4197
- "none"
4215
+ "pause-goal"
4198
4216
  ],
4199
4217
  "read_paths": [
4200
4218
  ".mdkg/**"
4201
4219
  ],
4202
- "write_paths": [],
4220
+ "write_paths": [
4221
+ ".mdkg/**/*.md",
4222
+ ".mdkg/index/**"
4223
+ ],
4203
4224
  "dry_run": {
4204
4225
  "supported": false
4205
4226
  },
4206
- "lock_policy": "none-read-only",
4207
- "atomic_write_policy": "none-read-only",
4208
- "receipts": [],
4209
- "danger_level": "read-only",
4227
+ "lock_policy": "mutation-lock-required",
4228
+ "atomic_write_policy": "atomic-file-writes",
4229
+ "receipts": [
4230
+ "goal-state-receipt"
4231
+ ],
4232
+ "danger_level": "moderate",
4210
4233
  "aliases": [],
4211
4234
  "exit_codes": [
4212
4235
  {
@@ -4219,31 +4242,31 @@
4219
4242
  }
4220
4243
  ],
4221
4244
  "examples": [
4222
- " mdkg graph import-template <source-bundle-or-mdkg-dir> [--start-goal <goal-id>] [--select-goal] [--id-prefix <prefix>] [--dry-run] [--apply] [--json]"
4245
+ " mdkg goal pause <goal-id-or-qid> [--ws <alias>] [--json]"
4223
4246
  ],
4224
4247
  "docs": {
4225
- "help_target": "mdkg help graph import-template",
4248
+ "help_target": "mdkg help goal pause",
4226
4249
  "command_matrix": "CLI_COMMAND_MATRIX.md"
4227
4250
  }
4228
4251
  },
4229
4252
  {
4230
- "key": "graph refs",
4253
+ "key": "goal resume",
4231
4254
  "path": [
4232
- "graph",
4233
- "refs"
4255
+ "goal",
4256
+ "resume"
4234
4257
  ],
4235
- "category": "graph",
4258
+ "category": "goal",
4236
4259
  "status": "stable",
4237
4260
  "visibility": "public",
4238
- "summary": "mdkg graph refs command",
4261
+ "summary": "mdkg goal resume command",
4239
4262
  "usage": [
4240
- " mdkg graph refs <id-or-qid> [--ws <alias>] [--json]"
4263
+ " mdkg goal resume <goal-id-or-qid> [--ws <alias>] [--json]"
4241
4264
  ],
4242
4265
  "args": [
4243
4266
  {
4244
- "name": "id-or-qid",
4267
+ "name": "goal-id-or-qid",
4245
4268
  "required": true,
4246
- "source": "<id-or-qid>"
4269
+ "source": "<goal-id-or-qid>"
4247
4270
  }
4248
4271
  ],
4249
4272
  "flags": [
@@ -4272,21 +4295,24 @@
4272
4295
  ],
4273
4296
  "json_schema_ref": "mdkg.command_output.v1",
4274
4297
  "side_effects": [
4275
- "none"
4298
+ "resume-goal"
4276
4299
  ],
4277
4300
  "read_paths": [
4278
4301
  ".mdkg/**"
4279
4302
  ],
4280
- "write_paths": [],
4303
+ "write_paths": [
4304
+ ".mdkg/**/*.md",
4305
+ ".mdkg/index/**"
4306
+ ],
4281
4307
  "dry_run": {
4282
4308
  "supported": false
4283
4309
  },
4284
- "lock_policy": "none-read-only",
4285
- "atomic_write_policy": "none-read-only",
4310
+ "lock_policy": "mutation-lock-required",
4311
+ "atomic_write_policy": "atomic-file-writes",
4286
4312
  "receipts": [
4287
- "graph-refs-receipt"
4313
+ "goal-state-receipt"
4288
4314
  ],
4289
- "danger_level": "read-only",
4315
+ "danger_level": "moderate",
4290
4316
  "aliases": [],
4291
4317
  "exit_codes": [
4292
4318
  {
@@ -4299,26 +4325,33 @@
4299
4325
  }
4300
4326
  ],
4301
4327
  "examples": [
4302
- " mdkg graph refs <id-or-qid> [--ws <alias>] [--json]"
4328
+ " mdkg goal resume <goal-id-or-qid> [--ws <alias>] [--json]"
4303
4329
  ],
4304
4330
  "docs": {
4305
- "help_target": "mdkg help graph refs",
4331
+ "help_target": "mdkg help goal resume",
4306
4332
  "command_matrix": "CLI_COMMAND_MATRIX.md"
4307
4333
  }
4308
4334
  },
4309
4335
  {
4310
- "key": "guide",
4336
+ "key": "goal select",
4311
4337
  "path": [
4312
- "guide"
4338
+ "goal",
4339
+ "select"
4313
4340
  ],
4314
- "category": "guide",
4341
+ "category": "goal",
4315
4342
  "status": "stable",
4316
4343
  "visibility": "public",
4317
- "summary": "mdkg guide command",
4344
+ "summary": "mdkg goal select command",
4318
4345
  "usage": [
4319
- " mdkg guide"
4346
+ " mdkg goal select <goal-id-or-qid> [--ws <alias>] [--json]"
4347
+ ],
4348
+ "args": [
4349
+ {
4350
+ "name": "goal-id-or-qid",
4351
+ "required": true,
4352
+ "source": "<goal-id-or-qid>"
4353
+ }
4320
4354
  ],
4321
- "args": [],
4322
4355
  "flags": [
4323
4356
  {
4324
4357
  "name": "--help",
@@ -4340,23 +4373,29 @@
4340
4373
  }
4341
4374
  ],
4342
4375
  "output_formats": [
4343
- "text"
4376
+ "text",
4377
+ "json"
4344
4378
  ],
4345
- "json_schema_ref": null,
4379
+ "json_schema_ref": "mdkg.command_output.v1",
4346
4380
  "side_effects": [
4347
- "none"
4381
+ "select-goal"
4348
4382
  ],
4349
4383
  "read_paths": [
4350
4384
  ".mdkg/**"
4351
4385
  ],
4352
- "write_paths": [],
4386
+ "write_paths": [
4387
+ ".mdkg/**/*.md",
4388
+ ".mdkg/index/**"
4389
+ ],
4353
4390
  "dry_run": {
4354
4391
  "supported": false
4355
4392
  },
4356
- "lock_policy": "none-read-only",
4357
- "atomic_write_policy": "none-read-only",
4358
- "receipts": [],
4359
- "danger_level": "read-only",
4393
+ "lock_policy": "mutation-lock-required",
4394
+ "atomic_write_policy": "atomic-file-writes",
4395
+ "receipts": [
4396
+ "goal-state-receipt"
4397
+ ],
4398
+ "danger_level": "moderate",
4360
4399
  "aliases": [],
4361
4400
  "exit_codes": [
4362
4401
  {
@@ -4369,30 +4408,31 @@
4369
4408
  }
4370
4409
  ],
4371
4410
  "examples": [
4372
- " mdkg guide"
4411
+ " mdkg goal select <goal-id-or-qid> [--ws <alias>] [--json]"
4373
4412
  ],
4374
4413
  "docs": {
4375
- "help_target": "mdkg help guide",
4414
+ "help_target": "mdkg help goal select",
4376
4415
  "command_matrix": "CLI_COMMAND_MATRIX.md"
4377
4416
  }
4378
4417
  },
4379
4418
  {
4380
- "key": "handoff",
4419
+ "key": "goal show",
4381
4420
  "path": [
4382
- "handoff"
4421
+ "goal",
4422
+ "show"
4383
4423
  ],
4384
- "category": "handoff",
4424
+ "category": "goal",
4385
4425
  "status": "stable",
4386
4426
  "visibility": "public",
4387
- "summary": "mdkg handoff command",
4427
+ "summary": "mdkg goal show command",
4388
4428
  "usage": [
4389
- " mdkg handoff create <id-or-qid> [--ws <alias>] [--depth <n>] [--out <path>] [--json]"
4429
+ " mdkg goal show <goal-id-or-qid> [--ws <alias>] [--json]"
4390
4430
  ],
4391
4431
  "args": [
4392
4432
  {
4393
- "name": "id-or-qid",
4433
+ "name": "goal-id-or-qid",
4394
4434
  "required": true,
4395
- "source": "<id-or-qid>"
4435
+ "source": "<goal-id-or-qid>"
4396
4436
  }
4397
4437
  ],
4398
4438
  "flags": [
@@ -4402,12 +4442,6 @@
4402
4442
  "required": false,
4403
4443
  "description": "--help, -h Show help"
4404
4444
  },
4405
- {
4406
- "name": "--out",
4407
- "value": "must",
4408
- "required": false,
4409
- "description": "- --out must stay inside the repo root"
4410
- },
4411
4445
  {
4412
4446
  "name": "--root",
4413
4447
  "value": null,
@@ -4425,25 +4459,1235 @@
4425
4459
  "text",
4426
4460
  "json"
4427
4461
  ],
4428
- "json_schema_ref": "mdkg.handoff.v1",
4462
+ "json_schema_ref": "mdkg.command_output.v1",
4429
4463
  "side_effects": [
4430
- "create-sanitized-agent-handoff-when-out-is-provided"
4464
+ "none"
4431
4465
  ],
4432
4466
  "read_paths": [
4433
4467
  ".mdkg/**"
4434
4468
  ],
4435
- "write_paths": [
4436
- ".mdkg/handoffs/**"
4437
- ],
4469
+ "write_paths": [],
4438
4470
  "dry_run": {
4439
4471
  "supported": false
4440
4472
  },
4441
- "lock_policy": "not-required-for-stdout-output",
4473
+ "lock_policy": "none-read-only",
4474
+ "atomic_write_policy": "none-read-only",
4475
+ "receipts": [],
4476
+ "danger_level": "read-only",
4477
+ "aliases": [],
4478
+ "exit_codes": [
4479
+ {
4480
+ "code": 0,
4481
+ "meaning": "success"
4482
+ },
4483
+ {
4484
+ "code": 1,
4485
+ "meaning": "validation-or-runtime-error"
4486
+ }
4487
+ ],
4488
+ "examples": [
4489
+ " mdkg goal show <goal-id-or-qid> [--ws <alias>] [--json]"
4490
+ ],
4491
+ "docs": {
4492
+ "help_target": "mdkg help goal show",
4493
+ "command_matrix": "CLI_COMMAND_MATRIX.md"
4494
+ }
4495
+ },
4496
+ {
4497
+ "key": "graph",
4498
+ "path": [
4499
+ "graph"
4500
+ ],
4501
+ "category": "graph",
4502
+ "status": "stable",
4503
+ "visibility": "public",
4504
+ "summary": "mdkg graph command",
4505
+ "usage": [
4506
+ " mdkg graph clone <source-bundle-or-mdkg-dir> --target <path> [--json]",
4507
+ " mdkg graph fork <source-bundle-or-mdkg-dir> --target <path> [--start-goal <goal-id>] [--json]",
4508
+ " mdkg graph import-template <source-bundle-or-mdkg-dir> [--start-goal <goal-id>] [--select-goal] [--id-prefix <prefix>] [--dry-run] [--apply] [--json]",
4509
+ " mdkg graph refs <id-or-qid> [--ws <alias>] [--json]"
4510
+ ],
4511
+ "args": [
4512
+ {
4513
+ "name": "id-or-qid",
4514
+ "required": true,
4515
+ "source": "<id-or-qid>"
4516
+ },
4517
+ {
4518
+ "name": "source-bundle-or-mdkg-dir",
4519
+ "required": true,
4520
+ "source": "<source-bundle-or-mdkg-dir>"
4521
+ }
4522
+ ],
4523
+ "flags": [
4524
+ {
4525
+ "name": "--help",
4526
+ "value": null,
4527
+ "required": false,
4528
+ "description": "--help, -h Show help"
4529
+ },
4530
+ {
4531
+ "name": "--root",
4532
+ "value": null,
4533
+ "required": false,
4534
+ "description": "--root, -r <path> Run against a specific repo root"
4535
+ },
4536
+ {
4537
+ "name": "--target",
4538
+ "value": "<path>",
4539
+ "required": false,
4540
+ "description": "mdkg graph clone <source-bundle-or-mdkg-dir> --target <path> [--json]"
4541
+ },
4542
+ {
4543
+ "name": "--version",
4544
+ "value": null,
4545
+ "required": false,
4546
+ "description": "--version, -V Show version"
4547
+ }
4548
+ ],
4549
+ "output_formats": [
4550
+ "text",
4551
+ "json"
4552
+ ],
4553
+ "json_schema_ref": "mdkg.command_output.v1",
4554
+ "side_effects": [
4555
+ "none"
4556
+ ],
4557
+ "read_paths": [
4558
+ ".mdkg/**"
4559
+ ],
4560
+ "write_paths": [],
4561
+ "dry_run": {
4562
+ "supported": false
4563
+ },
4564
+ "lock_policy": "none-read-only",
4565
+ "atomic_write_policy": "none-read-only",
4566
+ "receipts": [],
4567
+ "danger_level": "read-only",
4568
+ "aliases": [],
4569
+ "exit_codes": [
4570
+ {
4571
+ "code": 0,
4572
+ "meaning": "success"
4573
+ },
4574
+ {
4575
+ "code": 1,
4576
+ "meaning": "validation-or-runtime-error"
4577
+ }
4578
+ ],
4579
+ "examples": [
4580
+ " mdkg graph clone <source-bundle-or-mdkg-dir> --target <path> [--json]",
4581
+ " mdkg graph fork <source-bundle-or-mdkg-dir> --target <path> [--start-goal <goal-id>] [--json]",
4582
+ " mdkg graph import-template <source-bundle-or-mdkg-dir> [--start-goal <goal-id>] [--select-goal] [--id-prefix <prefix>] [--dry-run] [--apply] [--json]"
4583
+ ],
4584
+ "docs": {
4585
+ "help_target": "mdkg help graph",
4586
+ "command_matrix": "CLI_COMMAND_MATRIX.md"
4587
+ }
4588
+ },
4589
+ {
4590
+ "key": "graph clone",
4591
+ "path": [
4592
+ "graph",
4593
+ "clone"
4594
+ ],
4595
+ "category": "graph",
4596
+ "status": "stable",
4597
+ "visibility": "public",
4598
+ "summary": "mdkg graph clone command",
4599
+ "usage": [
4600
+ " mdkg graph clone <source-bundle-or-mdkg-dir> --target <path> [--json]"
4601
+ ],
4602
+ "args": [
4603
+ {
4604
+ "name": "source-bundle-or-mdkg-dir",
4605
+ "required": true,
4606
+ "source": "<source-bundle-or-mdkg-dir>"
4607
+ }
4608
+ ],
4609
+ "flags": [
4610
+ {
4611
+ "name": "--help",
4612
+ "value": null,
4613
+ "required": false,
4614
+ "description": "--help, -h Show help"
4615
+ },
4616
+ {
4617
+ "name": "--root",
4618
+ "value": null,
4619
+ "required": false,
4620
+ "description": "--root, -r <path> Run against a specific repo root"
4621
+ },
4622
+ {
4623
+ "name": "--target",
4624
+ "value": "<path>",
4625
+ "required": false,
4626
+ "description": "mdkg graph clone <source-bundle-or-mdkg-dir> --target <path> [--json]"
4627
+ },
4628
+ {
4629
+ "name": "--version",
4630
+ "value": null,
4631
+ "required": false,
4632
+ "description": "--version, -V Show version"
4633
+ }
4634
+ ],
4635
+ "output_formats": [
4636
+ "text",
4637
+ "json"
4638
+ ],
4639
+ "json_schema_ref": "mdkg.command_output.v1",
4640
+ "side_effects": [
4641
+ "none"
4642
+ ],
4643
+ "read_paths": [
4644
+ ".mdkg/**"
4645
+ ],
4646
+ "write_paths": [],
4647
+ "dry_run": {
4648
+ "supported": false
4649
+ },
4650
+ "lock_policy": "none-read-only",
4651
+ "atomic_write_policy": "none-read-only",
4652
+ "receipts": [],
4653
+ "danger_level": "read-only",
4654
+ "aliases": [],
4655
+ "exit_codes": [
4656
+ {
4657
+ "code": 0,
4658
+ "meaning": "success"
4659
+ },
4660
+ {
4661
+ "code": 1,
4662
+ "meaning": "validation-or-runtime-error"
4663
+ }
4664
+ ],
4665
+ "examples": [
4666
+ " mdkg graph clone <source-bundle-or-mdkg-dir> --target <path> [--json]"
4667
+ ],
4668
+ "docs": {
4669
+ "help_target": "mdkg help graph clone",
4670
+ "command_matrix": "CLI_COMMAND_MATRIX.md"
4671
+ }
4672
+ },
4673
+ {
4674
+ "key": "graph fork",
4675
+ "path": [
4676
+ "graph",
4677
+ "fork"
4678
+ ],
4679
+ "category": "graph",
4680
+ "status": "stable",
4681
+ "visibility": "public",
4682
+ "summary": "mdkg graph fork command",
4683
+ "usage": [
4684
+ " mdkg graph fork <source-bundle-or-mdkg-dir> --target <path> [--start-goal <goal-id>] [--json]"
4685
+ ],
4686
+ "args": [
4687
+ {
4688
+ "name": "source-bundle-or-mdkg-dir",
4689
+ "required": true,
4690
+ "source": "<source-bundle-or-mdkg-dir>"
4691
+ }
4692
+ ],
4693
+ "flags": [
4694
+ {
4695
+ "name": "--help",
4696
+ "value": null,
4697
+ "required": false,
4698
+ "description": "--help, -h Show help"
4699
+ },
4700
+ {
4701
+ "name": "--root",
4702
+ "value": null,
4703
+ "required": false,
4704
+ "description": "--root, -r <path> Run against a specific repo root"
4705
+ },
4706
+ {
4707
+ "name": "--target",
4708
+ "value": "<path>",
4709
+ "required": false,
4710
+ "description": "mdkg graph fork <source-bundle-or-mdkg-dir> --target <path> [--start-goal <goal-id>] [--json]"
4711
+ },
4712
+ {
4713
+ "name": "--version",
4714
+ "value": null,
4715
+ "required": false,
4716
+ "description": "--version, -V Show version"
4717
+ }
4718
+ ],
4719
+ "output_formats": [
4720
+ "text",
4721
+ "json"
4722
+ ],
4723
+ "json_schema_ref": "mdkg.command_output.v1",
4724
+ "side_effects": [
4725
+ "none"
4726
+ ],
4727
+ "read_paths": [
4728
+ ".mdkg/**"
4729
+ ],
4730
+ "write_paths": [],
4731
+ "dry_run": {
4732
+ "supported": false
4733
+ },
4734
+ "lock_policy": "none-read-only",
4735
+ "atomic_write_policy": "none-read-only",
4736
+ "receipts": [],
4737
+ "danger_level": "read-only",
4738
+ "aliases": [],
4739
+ "exit_codes": [
4740
+ {
4741
+ "code": 0,
4742
+ "meaning": "success"
4743
+ },
4744
+ {
4745
+ "code": 1,
4746
+ "meaning": "validation-or-runtime-error"
4747
+ }
4748
+ ],
4749
+ "examples": [
4750
+ " mdkg graph fork <source-bundle-or-mdkg-dir> --target <path> [--start-goal <goal-id>] [--json]"
4751
+ ],
4752
+ "docs": {
4753
+ "help_target": "mdkg help graph fork",
4754
+ "command_matrix": "CLI_COMMAND_MATRIX.md"
4755
+ }
4756
+ },
4757
+ {
4758
+ "key": "graph import-template",
4759
+ "path": [
4760
+ "graph",
4761
+ "import-template"
4762
+ ],
4763
+ "category": "graph",
4764
+ "status": "stable",
4765
+ "visibility": "public",
4766
+ "summary": "mdkg graph import-template command",
4767
+ "usage": [
4768
+ " mdkg graph import-template <source-bundle-or-mdkg-dir> [--start-goal <goal-id>] [--select-goal] [--id-prefix <prefix>] [--dry-run] [--apply] [--json]"
4769
+ ],
4770
+ "args": [
4771
+ {
4772
+ "name": "source-bundle-or-mdkg-dir",
4773
+ "required": true,
4774
+ "source": "<source-bundle-or-mdkg-dir>"
4775
+ }
4776
+ ],
4777
+ "flags": [
4778
+ {
4779
+ "name": "--apply",
4780
+ "value": "is",
4781
+ "required": false,
4782
+ "description": "- defaults to dry-run unless --apply is supplied"
4783
+ },
4784
+ {
4785
+ "name": "--help",
4786
+ "value": null,
4787
+ "required": false,
4788
+ "description": "--help, -h Show help"
4789
+ },
4790
+ {
4791
+ "name": "--root",
4792
+ "value": null,
4793
+ "required": false,
4794
+ "description": "--root, -r <path> Run against a specific repo root"
4795
+ },
4796
+ {
4797
+ "name": "--select-goal",
4798
+ "value": "requires",
4799
+ "required": false,
4800
+ "description": "- --select-goal requires --start-goal; on apply it activates the imported start goal, pauses competing active root goals, validates, then writes selected-goal state"
4801
+ },
4802
+ {
4803
+ "name": "--start-goal",
4804
+ "value": null,
4805
+ "required": false,
4806
+ "description": "- --select-goal requires --start-goal; on apply it activates the imported start goal, pauses competing active root goals, validates, then writes selected-goal state"
4807
+ },
4808
+ {
4809
+ "name": "--version",
4810
+ "value": null,
4811
+ "required": false,
4812
+ "description": "--version, -V Show version"
4813
+ }
4814
+ ],
4815
+ "output_formats": [
4816
+ "text",
4817
+ "json"
4818
+ ],
4819
+ "json_schema_ref": "mdkg.command_output.v1",
4820
+ "side_effects": [
4821
+ "none"
4822
+ ],
4823
+ "read_paths": [
4824
+ ".mdkg/**"
4825
+ ],
4826
+ "write_paths": [],
4827
+ "dry_run": {
4828
+ "supported": false
4829
+ },
4830
+ "lock_policy": "none-read-only",
4831
+ "atomic_write_policy": "none-read-only",
4832
+ "receipts": [],
4833
+ "danger_level": "read-only",
4834
+ "aliases": [],
4835
+ "exit_codes": [
4836
+ {
4837
+ "code": 0,
4838
+ "meaning": "success"
4839
+ },
4840
+ {
4841
+ "code": 1,
4842
+ "meaning": "validation-or-runtime-error"
4843
+ }
4844
+ ],
4845
+ "examples": [
4846
+ " mdkg graph import-template <source-bundle-or-mdkg-dir> [--start-goal <goal-id>] [--select-goal] [--id-prefix <prefix>] [--dry-run] [--apply] [--json]"
4847
+ ],
4848
+ "docs": {
4849
+ "help_target": "mdkg help graph import-template",
4850
+ "command_matrix": "CLI_COMMAND_MATRIX.md"
4851
+ }
4852
+ },
4853
+ {
4854
+ "key": "graph refs",
4855
+ "path": [
4856
+ "graph",
4857
+ "refs"
4858
+ ],
4859
+ "category": "graph",
4860
+ "status": "stable",
4861
+ "visibility": "public",
4862
+ "summary": "mdkg graph refs command",
4863
+ "usage": [
4864
+ " mdkg graph refs <id-or-qid> [--ws <alias>] [--json]"
4865
+ ],
4866
+ "args": [
4867
+ {
4868
+ "name": "id-or-qid",
4869
+ "required": true,
4870
+ "source": "<id-or-qid>"
4871
+ }
4872
+ ],
4873
+ "flags": [
4874
+ {
4875
+ "name": "--help",
4876
+ "value": null,
4877
+ "required": false,
4878
+ "description": "--help, -h Show help"
4879
+ },
4880
+ {
4881
+ "name": "--root",
4882
+ "value": null,
4883
+ "required": false,
4884
+ "description": "--root, -r <path> Run against a specific repo root"
4885
+ },
4886
+ {
4887
+ "name": "--version",
4888
+ "value": null,
4889
+ "required": false,
4890
+ "description": "--version, -V Show version"
4891
+ }
4892
+ ],
4893
+ "output_formats": [
4894
+ "text",
4895
+ "json"
4896
+ ],
4897
+ "json_schema_ref": "mdkg.command_output.v1",
4898
+ "side_effects": [
4899
+ "none"
4900
+ ],
4901
+ "read_paths": [
4902
+ ".mdkg/**"
4903
+ ],
4904
+ "write_paths": [],
4905
+ "dry_run": {
4906
+ "supported": false
4907
+ },
4908
+ "lock_policy": "none-read-only",
4909
+ "atomic_write_policy": "none-read-only",
4910
+ "receipts": [
4911
+ "graph-refs-receipt"
4912
+ ],
4913
+ "danger_level": "read-only",
4914
+ "aliases": [],
4915
+ "exit_codes": [
4916
+ {
4917
+ "code": 0,
4918
+ "meaning": "success"
4919
+ },
4920
+ {
4921
+ "code": 1,
4922
+ "meaning": "validation-or-runtime-error"
4923
+ }
4924
+ ],
4925
+ "examples": [
4926
+ " mdkg graph refs <id-or-qid> [--ws <alias>] [--json]"
4927
+ ],
4928
+ "docs": {
4929
+ "help_target": "mdkg help graph refs",
4930
+ "command_matrix": "CLI_COMMAND_MATRIX.md"
4931
+ }
4932
+ },
4933
+ {
4934
+ "key": "guide",
4935
+ "path": [
4936
+ "guide"
4937
+ ],
4938
+ "category": "guide",
4939
+ "status": "stable",
4940
+ "visibility": "public",
4941
+ "summary": "mdkg guide command",
4942
+ "usage": [
4943
+ " mdkg guide"
4944
+ ],
4945
+ "args": [],
4946
+ "flags": [
4947
+ {
4948
+ "name": "--help",
4949
+ "value": null,
4950
+ "required": false,
4951
+ "description": "--help, -h Show help"
4952
+ },
4953
+ {
4954
+ "name": "--root",
4955
+ "value": null,
4956
+ "required": false,
4957
+ "description": "--root, -r <path> Run against a specific repo root"
4958
+ },
4959
+ {
4960
+ "name": "--version",
4961
+ "value": null,
4962
+ "required": false,
4963
+ "description": "--version, -V Show version"
4964
+ }
4965
+ ],
4966
+ "output_formats": [
4967
+ "text"
4968
+ ],
4969
+ "json_schema_ref": null,
4970
+ "side_effects": [
4971
+ "none"
4972
+ ],
4973
+ "read_paths": [
4974
+ ".mdkg/**"
4975
+ ],
4976
+ "write_paths": [],
4977
+ "dry_run": {
4978
+ "supported": false
4979
+ },
4980
+ "lock_policy": "none-read-only",
4981
+ "atomic_write_policy": "none-read-only",
4982
+ "receipts": [],
4983
+ "danger_level": "read-only",
4984
+ "aliases": [],
4985
+ "exit_codes": [
4986
+ {
4987
+ "code": 0,
4988
+ "meaning": "success"
4989
+ },
4990
+ {
4991
+ "code": 1,
4992
+ "meaning": "validation-or-runtime-error"
4993
+ }
4994
+ ],
4995
+ "examples": [
4996
+ " mdkg guide"
4997
+ ],
4998
+ "docs": {
4999
+ "help_target": "mdkg help guide",
5000
+ "command_matrix": "CLI_COMMAND_MATRIX.md"
5001
+ }
5002
+ },
5003
+ {
5004
+ "key": "handoff",
5005
+ "path": [
5006
+ "handoff"
5007
+ ],
5008
+ "category": "handoff",
5009
+ "status": "stable",
5010
+ "visibility": "public",
5011
+ "summary": "mdkg handoff command",
5012
+ "usage": [
5013
+ " mdkg handoff create <id-or-qid> [--ws <alias>] [--depth <n>] [--out <path>] [--json]"
5014
+ ],
5015
+ "args": [
5016
+ {
5017
+ "name": "id-or-qid",
5018
+ "required": true,
5019
+ "source": "<id-or-qid>"
5020
+ }
5021
+ ],
5022
+ "flags": [
5023
+ {
5024
+ "name": "--help",
5025
+ "value": null,
5026
+ "required": false,
5027
+ "description": "--help, -h Show help"
5028
+ },
5029
+ {
5030
+ "name": "--out",
5031
+ "value": "must",
5032
+ "required": false,
5033
+ "description": "- --out must stay inside the repo root"
5034
+ },
5035
+ {
5036
+ "name": "--root",
5037
+ "value": null,
5038
+ "required": false,
5039
+ "description": "--root, -r <path> Run against a specific repo root"
5040
+ },
5041
+ {
5042
+ "name": "--version",
5043
+ "value": null,
5044
+ "required": false,
5045
+ "description": "--version, -V Show version"
5046
+ }
5047
+ ],
5048
+ "output_formats": [
5049
+ "text",
5050
+ "json"
5051
+ ],
5052
+ "json_schema_ref": "mdkg.handoff.v1",
5053
+ "side_effects": [
5054
+ "create-sanitized-agent-handoff-when-out-is-provided"
5055
+ ],
5056
+ "read_paths": [
5057
+ ".mdkg/**"
5058
+ ],
5059
+ "write_paths": [
5060
+ ".mdkg/handoffs/**"
5061
+ ],
5062
+ "dry_run": {
5063
+ "supported": false
5064
+ },
5065
+ "lock_policy": "not-required-for-stdout-output",
4442
5066
  "atomic_write_policy": "atomic-file-write-when-out-is-provided",
4443
5067
  "receipts": [
4444
- "handoff-receipt"
5068
+ "handoff-receipt"
5069
+ ],
5070
+ "danger_level": "moderate",
5071
+ "aliases": [],
5072
+ "exit_codes": [
5073
+ {
5074
+ "code": 0,
5075
+ "meaning": "success"
5076
+ },
5077
+ {
5078
+ "code": 1,
5079
+ "meaning": "validation-or-runtime-error"
5080
+ }
5081
+ ],
5082
+ "examples": [
5083
+ " mdkg handoff create <id-or-qid> [--ws <alias>] [--depth <n>] [--out <path>] [--json]"
5084
+ ],
5085
+ "docs": {
5086
+ "help_target": "mdkg help handoff",
5087
+ "command_matrix": "CLI_COMMAND_MATRIX.md"
5088
+ }
5089
+ },
5090
+ {
5091
+ "key": "index",
5092
+ "path": [
5093
+ "index"
5094
+ ],
5095
+ "category": "index",
5096
+ "status": "stable",
5097
+ "visibility": "public",
5098
+ "summary": "mdkg index command",
5099
+ "usage": [
5100
+ " mdkg index [--tolerant]"
5101
+ ],
5102
+ "args": [],
5103
+ "flags": [
5104
+ {
5105
+ "name": "--help",
5106
+ "value": null,
5107
+ "required": false,
5108
+ "description": "--help, -h Show help"
5109
+ },
5110
+ {
5111
+ "name": "--root",
5112
+ "value": null,
5113
+ "required": false,
5114
+ "description": "--root, -r <path> Run against a specific repo root"
5115
+ },
5116
+ {
5117
+ "name": "--version",
5118
+ "value": null,
5119
+ "required": false,
5120
+ "description": "--version, -V Show version"
5121
+ }
5122
+ ],
5123
+ "output_formats": [
5124
+ "text"
5125
+ ],
5126
+ "json_schema_ref": null,
5127
+ "side_effects": [
5128
+ "rebuild-generated-index-cache"
5129
+ ],
5130
+ "read_paths": [
5131
+ ".mdkg/**"
5132
+ ],
5133
+ "write_paths": [
5134
+ ".mdkg/index/**"
5135
+ ],
5136
+ "dry_run": {
5137
+ "supported": false
5138
+ },
5139
+ "lock_policy": "mutation-lock-required",
5140
+ "atomic_write_policy": "sqlite-transaction-and-atomic-cache-write",
5141
+ "receipts": [
5142
+ "index-rebuild-receipt"
5143
+ ],
5144
+ "danger_level": "moderate",
5145
+ "aliases": [],
5146
+ "exit_codes": [
5147
+ {
5148
+ "code": 0,
5149
+ "meaning": "success"
5150
+ },
5151
+ {
5152
+ "code": 1,
5153
+ "meaning": "validation-or-runtime-error"
5154
+ }
5155
+ ],
5156
+ "examples": [
5157
+ " mdkg index [--tolerant]"
5158
+ ],
5159
+ "docs": {
5160
+ "help_target": "mdkg help index",
5161
+ "command_matrix": "CLI_COMMAND_MATRIX.md"
5162
+ }
5163
+ },
5164
+ {
5165
+ "key": "init",
5166
+ "path": [
5167
+ "init"
5168
+ ],
5169
+ "category": "init",
5170
+ "status": "stable",
5171
+ "visibility": "public",
5172
+ "summary": "mdkg init command",
5173
+ "usage": [
5174
+ " mdkg init [options]"
5175
+ ],
5176
+ "args": [
5177
+ {
5178
+ "name": "options",
5179
+ "required": false,
5180
+ "source": "[options]"
5181
+ }
5182
+ ],
5183
+ "flags": [
5184
+ {
5185
+ "name": "--agent",
5186
+ "value": null,
5187
+ "required": false,
5188
+ "description": "--agent Create the complete agent bootstrap, skills, events, and mirrors"
5189
+ },
5190
+ {
5191
+ "name": "--force",
5192
+ "value": null,
5193
+ "required": false,
5194
+ "description": "--force Overwrite existing mdkg files"
5195
+ },
5196
+ {
5197
+ "name": "--help",
5198
+ "value": null,
5199
+ "required": false,
5200
+ "description": "--help, -h Show help"
5201
+ },
5202
+ {
5203
+ "name": "--no-update-ignores",
5204
+ "value": null,
5205
+ "required": false,
5206
+ "description": "--no-update-ignores Skip default .gitignore/.npmignore updates"
5207
+ },
5208
+ {
5209
+ "name": "--root",
5210
+ "value": null,
5211
+ "required": false,
5212
+ "description": "--root, -r <path> Run against a specific repo root"
5213
+ },
5214
+ {
5215
+ "name": "--update-dockerignore",
5216
+ "value": "Append",
5217
+ "required": false,
5218
+ "description": "--update-dockerignore Append mdkg ignore entries"
5219
+ },
5220
+ {
5221
+ "name": "--update-gitignore",
5222
+ "value": null,
5223
+ "required": false,
5224
+ "description": "--update-gitignore Append mdkg ignore entries"
5225
+ },
5226
+ {
5227
+ "name": "--update-npmignore",
5228
+ "value": null,
5229
+ "required": false,
5230
+ "description": "--update-npmignore Append mdkg ignore entries"
5231
+ },
5232
+ {
5233
+ "name": "--version",
5234
+ "value": null,
5235
+ "required": false,
5236
+ "description": "--version, -V Show version"
5237
+ }
5238
+ ],
5239
+ "output_formats": [
5240
+ "text"
5241
+ ],
5242
+ "json_schema_ref": null,
5243
+ "side_effects": [
5244
+ "initialize-mdkg-scaffold"
5245
+ ],
5246
+ "read_paths": [
5247
+ ".mdkg/**"
5248
+ ],
5249
+ "write_paths": [
5250
+ ".mdkg/**",
5251
+ "AGENTS.md",
5252
+ "AGENT_START.md",
5253
+ "CLAUDE.md",
5254
+ "CLI_COMMAND_MATRIX.md",
5255
+ "llms.txt"
5256
+ ],
5257
+ "dry_run": {
5258
+ "supported": false
5259
+ },
5260
+ "lock_policy": "not-required-before-mdkg-config-exists",
5261
+ "atomic_write_policy": "exclusive-create-and-atomic-file-writes",
5262
+ "receipts": [
5263
+ "init-summary"
5264
+ ],
5265
+ "danger_level": "moderate",
5266
+ "aliases": [],
5267
+ "exit_codes": [
5268
+ {
5269
+ "code": 0,
5270
+ "meaning": "success"
5271
+ },
5272
+ {
5273
+ "code": 1,
5274
+ "meaning": "validation-or-runtime-error"
5275
+ }
5276
+ ],
5277
+ "examples": [
5278
+ " mdkg init [options]"
5279
+ ],
5280
+ "docs": {
5281
+ "help_target": "mdkg help init",
5282
+ "command_matrix": "CLI_COMMAND_MATRIX.md"
5283
+ }
5284
+ },
5285
+ {
5286
+ "key": "list",
5287
+ "path": [
5288
+ "list"
5289
+ ],
5290
+ "category": "list",
5291
+ "status": "stable",
5292
+ "visibility": "public",
5293
+ "summary": "mdkg list command",
5294
+ "usage": [
5295
+ " mdkg list [--type <type>] [--status <status>] [--ws <alias>] [--epic <id>]"
5296
+ ],
5297
+ "args": [],
5298
+ "flags": [
5299
+ {
5300
+ "name": "--help",
5301
+ "value": null,
5302
+ "required": false,
5303
+ "description": "--help, -h Show help"
5304
+ },
5305
+ {
5306
+ "name": "--root",
5307
+ "value": null,
5308
+ "required": false,
5309
+ "description": "--root, -r <path> Run against a specific repo root"
5310
+ },
5311
+ {
5312
+ "name": "--version",
5313
+ "value": null,
5314
+ "required": false,
5315
+ "description": "--version, -V Show version"
5316
+ }
5317
+ ],
5318
+ "output_formats": [
5319
+ "text",
5320
+ "json",
5321
+ "xml",
5322
+ "toon",
5323
+ "md"
5324
+ ],
5325
+ "json_schema_ref": "mdkg.command_output.v1",
5326
+ "side_effects": [
5327
+ "none"
5328
+ ],
5329
+ "read_paths": [
5330
+ ".mdkg/**"
5331
+ ],
5332
+ "write_paths": [],
5333
+ "dry_run": {
5334
+ "supported": false
5335
+ },
5336
+ "lock_policy": "none-read-only",
5337
+ "atomic_write_policy": "none-read-only",
5338
+ "receipts": [],
5339
+ "danger_level": "read-only",
5340
+ "aliases": [],
5341
+ "exit_codes": [
5342
+ {
5343
+ "code": 0,
5344
+ "meaning": "success"
5345
+ },
5346
+ {
5347
+ "code": 1,
5348
+ "meaning": "validation-or-runtime-error"
5349
+ }
5350
+ ],
5351
+ "examples": [
5352
+ " mdkg list [--type <type>] [--status <status>] [--ws <alias>] [--epic <id>]"
5353
+ ],
5354
+ "docs": {
5355
+ "help_target": "mdkg help list",
5356
+ "command_matrix": "CLI_COMMAND_MATRIX.md"
5357
+ }
5358
+ },
5359
+ {
5360
+ "key": "loop",
5361
+ "path": [
5362
+ "loop"
5363
+ ],
5364
+ "category": "loop",
5365
+ "status": "stable",
5366
+ "visibility": "public",
5367
+ "summary": "mdkg loop command",
5368
+ "usage": [
5369
+ "mdkg loop list [--ws <alias>] [--json]",
5370
+ "mdkg loop show <loop-or-template> [--meta] [--ws <alias>] [--json]",
5371
+ "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]",
5372
+ "mdkg loop plan <loop> [--ws <alias>] [--json]",
5373
+ "mdkg loop next <loop> [--ws <alias>] [--json]",
5374
+ "mdkg loop runs <loop> [--ws <alias>] [--json]"
5375
+ ],
5376
+ "args": [],
5377
+ "flags": [
5378
+ {
5379
+ "name": "--root",
5380
+ "value": "<path>",
5381
+ "required": false,
5382
+ "description": "Run against a specific repository root; -r is the short alias."
5383
+ },
5384
+ {
5385
+ "name": "--ws",
5386
+ "value": "<alias>",
5387
+ "required": false,
5388
+ "description": "Resolve the command against one workspace alias."
5389
+ },
5390
+ {
5391
+ "name": "--json",
5392
+ "value": null,
5393
+ "required": false,
5394
+ "description": "Emit deterministic JSON instead of text."
5395
+ },
5396
+ {
5397
+ "name": "--no-cache",
5398
+ "value": null,
5399
+ "required": false,
5400
+ "description": "Build a non-persisting in-memory index projection instead of reading the cache."
5401
+ },
5402
+ {
5403
+ "name": "--no-reindex",
5404
+ "value": null,
5405
+ "required": false,
5406
+ "description": "Do not rebuild a stale or missing index projection."
5407
+ },
5408
+ {
5409
+ "name": "--run-id",
5410
+ "value": "<id>",
5411
+ "required": false,
5412
+ "description": "Attach an optional run id to the fork event when event logging is enabled."
5413
+ }
5414
+ ],
5415
+ "output_formats": [
5416
+ "text",
5417
+ "json"
5418
+ ],
5419
+ "json_schema_ref": "mdkg.command_output.v1",
5420
+ "side_effects": [
5421
+ "read-or-write-loop-graph-state"
5422
+ ],
5423
+ "read_paths": [
5424
+ ".mdkg/**"
5425
+ ],
5426
+ "write_paths": [
5427
+ ".mdkg/**/*.md",
5428
+ ".mdkg/events/*.jsonl",
5429
+ ".mdkg/index/**"
5430
+ ],
5431
+ "dry_run": {
5432
+ "supported": true,
5433
+ "commands": [
5434
+ "fork"
5435
+ ]
5436
+ },
5437
+ "lock_policy": "mutation-lock-required-for-fork",
5438
+ "atomic_write_policy": "exclusive-create-and-atomic-file-writes",
5439
+ "receipts": [
5440
+ "loop-receipt"
5441
+ ],
5442
+ "danger_level": "mixed",
5443
+ "aliases": [],
5444
+ "exit_codes": [
5445
+ {
5446
+ "code": 0,
5447
+ "meaning": "success"
5448
+ },
5449
+ {
5450
+ "code": 1,
5451
+ "meaning": "validation-or-runtime-error"
5452
+ }
5453
+ ],
5454
+ "examples": [
5455
+ "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]",
5456
+ "mdkg loop list [--ws <alias>] [--json]",
5457
+ "mdkg loop show <loop-or-template> [--meta] [--ws <alias>] [--json]"
5458
+ ],
5459
+ "docs": {
5460
+ "help_target": "mdkg help loop",
5461
+ "command_matrix": "CLI_COMMAND_MATRIX.md"
5462
+ },
5463
+ "descriptor_source": "src/commands/loop_descriptors.ts",
5464
+ "handler": "runLoopSubcommand",
5465
+ "help_notes": [
5466
+ "loop is one first-class node type. Templates, scoped forks, and run-bearing loops are represented through metadata and links.",
5467
+ "mdkg defines reusable process state and graph context; runtimes execute agents, tools, sandboxes, traces, and model routing."
5468
+ ]
5469
+ },
5470
+ {
5471
+ "key": "loop fork",
5472
+ "path": [
5473
+ "loop",
5474
+ "fork"
5475
+ ],
5476
+ "category": "loop",
5477
+ "status": "stable",
5478
+ "visibility": "public",
5479
+ "summary": "mdkg loop fork command",
5480
+ "usage": [
5481
+ "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]"
5482
+ ],
5483
+ "args": [
5484
+ {
5485
+ "name": "template",
5486
+ "required": true,
5487
+ "source": "<template>",
5488
+ "description": "Loop template node id/qid or seed template name/ref."
5489
+ }
5490
+ ],
5491
+ "flags": [
5492
+ {
5493
+ "name": "--scope",
5494
+ "value": "<scope>",
5495
+ "required": true,
5496
+ "description": "Scope ref, qid, URI, path, or description for the scoped loop."
5497
+ },
5498
+ {
5499
+ "name": "--title",
5500
+ "value": "<title>",
5501
+ "required": false,
5502
+ "description": "Override the generated scoped loop title."
5503
+ },
5504
+ {
5505
+ "name": "--materialization",
5506
+ "value": "<mode>",
5507
+ "required": false,
5508
+ "description": "Child materialization mode: default_children, planning_only, or manual."
5509
+ },
5510
+ {
5511
+ "name": "--planning-only",
5512
+ "value": null,
5513
+ "required": false,
5514
+ "description": "Create only the scoped loop shell."
5515
+ },
5516
+ {
5517
+ "name": "--no-children",
5518
+ "value": null,
5519
+ "required": false,
5520
+ "description": "Alias for planning-only materialization."
5521
+ },
5522
+ {
5523
+ "name": "--dry-run",
5524
+ "value": null,
5525
+ "required": false,
5526
+ "description": "Plan the fork without writing loop or child nodes."
5527
+ },
5528
+ {
5529
+ "name": "--run-id",
5530
+ "value": "<id>",
5531
+ "required": false,
5532
+ "description": "Attach an optional run id to the fork event when event logging is enabled."
5533
+ },
5534
+ {
5535
+ "name": "--root",
5536
+ "value": "<path>",
5537
+ "required": false,
5538
+ "description": "Run against a specific repository root; -r is the short alias."
5539
+ },
5540
+ {
5541
+ "name": "--ws",
5542
+ "value": "<alias>",
5543
+ "required": false,
5544
+ "description": "Resolve the command against one workspace alias."
5545
+ },
5546
+ {
5547
+ "name": "--json",
5548
+ "value": null,
5549
+ "required": false,
5550
+ "description": "Emit deterministic JSON instead of text."
5551
+ },
5552
+ {
5553
+ "name": "--no-cache",
5554
+ "value": null,
5555
+ "required": false,
5556
+ "description": "Build a non-persisting in-memory index projection instead of reading the cache."
5557
+ },
5558
+ {
5559
+ "name": "--no-reindex",
5560
+ "value": null,
5561
+ "required": false,
5562
+ "description": "Do not rebuild a stale or missing index projection."
5563
+ }
5564
+ ],
5565
+ "output_formats": [
5566
+ "text",
5567
+ "json"
5568
+ ],
5569
+ "json_schema_ref": "mdkg.command_output.v1",
5570
+ "side_effects": [
5571
+ "append-loop-fork-event-when-event-logging-is-enabled",
5572
+ "create-scoped-loop-and-optional-child-nodes",
5573
+ "rebuild-derived-indexes-when-auto-reindex-is-enabled",
5574
+ "reserve-sqlite-node-ids-when-configured"
5575
+ ],
5576
+ "read_paths": [
5577
+ ".mdkg/**"
5578
+ ],
5579
+ "write_paths": [
5580
+ ".mdkg/**/*.md",
5581
+ ".mdkg/events/*.jsonl",
5582
+ ".mdkg/index/**"
5583
+ ],
5584
+ "dry_run": {
5585
+ "supported": true,
5586
+ "flag": "--dry-run",
5587
+ "side_effects": [
5588
+ "none"
5589
+ ],
5590
+ "write_paths": [],
5591
+ "reserves_ids": false
5592
+ },
5593
+ "lock_policy": "mutation-lock-required",
5594
+ "atomic_write_policy": "exclusive-create-and-atomic-file-writes",
5595
+ "receipts": [
5596
+ "loop-fork-receipt"
5597
+ ],
5598
+ "danger_level": "moderate",
5599
+ "aliases": [],
5600
+ "exit_codes": [
5601
+ {
5602
+ "code": 0,
5603
+ "meaning": "success"
5604
+ },
5605
+ {
5606
+ "code": 1,
5607
+ "meaning": "validation-or-runtime-error"
5608
+ }
5609
+ ],
5610
+ "examples": [
5611
+ "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]"
5612
+ ],
5613
+ "docs": {
5614
+ "help_target": "mdkg help loop fork",
5615
+ "command_matrix": "CLI_COMMAND_MATRIX.md"
5616
+ },
5617
+ "descriptor_source": "src/commands/loop_descriptors.ts",
5618
+ "handler": "runLoopForkCommand",
5619
+ "help_notes": [
5620
+ "Seed templates resolve from .mdkg/templates/loops/<name>.loop.md.",
5621
+ "Default forks create a scoped loop plus linked spike/task/test child nodes."
5622
+ ]
5623
+ },
5624
+ {
5625
+ "key": "loop list",
5626
+ "path": [
5627
+ "loop",
5628
+ "list"
5629
+ ],
5630
+ "category": "loop",
5631
+ "status": "stable",
5632
+ "visibility": "public",
5633
+ "summary": "mdkg loop list command",
5634
+ "usage": [
5635
+ "mdkg loop list [--ws <alias>] [--no-cache] [--no-reindex] [--json]"
5636
+ ],
5637
+ "args": [],
5638
+ "flags": [
5639
+ {
5640
+ "name": "--root",
5641
+ "value": "<path>",
5642
+ "required": false,
5643
+ "description": "Run against a specific repository root; -r is the short alias."
5644
+ },
5645
+ {
5646
+ "name": "--ws",
5647
+ "value": "<alias>",
5648
+ "required": false,
5649
+ "description": "Resolve the command against one workspace alias."
5650
+ },
5651
+ {
5652
+ "name": "--json",
5653
+ "value": null,
5654
+ "required": false,
5655
+ "description": "Emit deterministic JSON instead of text."
5656
+ },
5657
+ {
5658
+ "name": "--no-cache",
5659
+ "value": null,
5660
+ "required": false,
5661
+ "description": "Build a non-persisting in-memory index projection instead of reading the cache."
5662
+ },
5663
+ {
5664
+ "name": "--no-reindex",
5665
+ "value": null,
5666
+ "required": false,
5667
+ "description": "Do not rebuild a stale or missing index projection."
5668
+ }
5669
+ ],
5670
+ "output_formats": [
5671
+ "text",
5672
+ "json"
5673
+ ],
5674
+ "json_schema_ref": "mdkg.command_output.v1",
5675
+ "side_effects": [
5676
+ "none"
5677
+ ],
5678
+ "read_paths": [
5679
+ ".mdkg/**"
5680
+ ],
5681
+ "write_paths": [],
5682
+ "dry_run": {
5683
+ "supported": false
5684
+ },
5685
+ "lock_policy": "none-read-only",
5686
+ "atomic_write_policy": "none-read-only",
5687
+ "receipts": [
5688
+ "loop-list-receipt"
4445
5689
  ],
4446
- "danger_level": "moderate",
5690
+ "danger_level": "read-only",
4447
5691
  "aliases": [],
4448
5692
  "exit_codes": [
4449
5693
  {
@@ -4456,68 +5700,92 @@
4456
5700
  }
4457
5701
  ],
4458
5702
  "examples": [
4459
- " mdkg handoff create <id-or-qid> [--ws <alias>] [--depth <n>] [--out <path>] [--json]"
5703
+ "mdkg loop list [--ws <alias>] [--no-cache] [--no-reindex] [--json]"
4460
5704
  ],
4461
5705
  "docs": {
4462
- "help_target": "mdkg help handoff",
5706
+ "help_target": "mdkg help loop list",
4463
5707
  "command_matrix": "CLI_COMMAND_MATRIX.md"
4464
- }
5708
+ },
5709
+ "descriptor_source": "src/commands/loop_descriptors.ts",
5710
+ "handler": "runLoopListCommand",
5711
+ "help_notes": [
5712
+ "Lists indexed loop nodes and reusable seed loop templates."
5713
+ ]
4465
5714
  },
4466
5715
  {
4467
- "key": "index",
5716
+ "key": "loop next",
4468
5717
  "path": [
4469
- "index"
5718
+ "loop",
5719
+ "next"
4470
5720
  ],
4471
- "category": "index",
5721
+ "category": "loop",
4472
5722
  "status": "stable",
4473
5723
  "visibility": "public",
4474
- "summary": "mdkg index command",
5724
+ "summary": "mdkg loop next command",
4475
5725
  "usage": [
4476
- " mdkg index [--tolerant]"
5726
+ "mdkg loop next <loop> [--ws <alias>] [--no-cache] [--no-reindex] [--json]"
5727
+ ],
5728
+ "args": [
5729
+ {
5730
+ "name": "loop",
5731
+ "required": true,
5732
+ "source": "<loop>",
5733
+ "description": "Loop node id or qid."
5734
+ }
4477
5735
  ],
4478
- "args": [],
4479
5736
  "flags": [
4480
5737
  {
4481
- "name": "--help",
5738
+ "name": "--root",
5739
+ "value": "<path>",
5740
+ "required": false,
5741
+ "description": "Run against a specific repository root; -r is the short alias."
5742
+ },
5743
+ {
5744
+ "name": "--ws",
5745
+ "value": "<alias>",
5746
+ "required": false,
5747
+ "description": "Resolve the command against one workspace alias."
5748
+ },
5749
+ {
5750
+ "name": "--json",
4482
5751
  "value": null,
4483
5752
  "required": false,
4484
- "description": "--help, -h Show help"
5753
+ "description": "Emit deterministic JSON instead of text."
4485
5754
  },
4486
5755
  {
4487
- "name": "--root",
5756
+ "name": "--no-cache",
4488
5757
  "value": null,
4489
5758
  "required": false,
4490
- "description": "--root, -r <path> Run against a specific repo root"
5759
+ "description": "Build a non-persisting in-memory index projection instead of reading the cache."
4491
5760
  },
4492
5761
  {
4493
- "name": "--version",
5762
+ "name": "--no-reindex",
4494
5763
  "value": null,
4495
5764
  "required": false,
4496
- "description": "--version, -V Show version"
5765
+ "description": "Do not rebuild a stale or missing index projection."
4497
5766
  }
4498
5767
  ],
4499
5768
  "output_formats": [
4500
- "text"
5769
+ "text",
5770
+ "json"
4501
5771
  ],
4502
- "json_schema_ref": null,
5772
+ "json_schema_ref": "mdkg.command_output.v1",
4503
5773
  "side_effects": [
4504
- "rebuild-generated-index-cache"
5774
+ "none"
4505
5775
  ],
4506
5776
  "read_paths": [
4507
5777
  ".mdkg/**"
4508
5778
  ],
4509
- "write_paths": [
4510
- ".mdkg/index/**"
4511
- ],
5779
+ "write_paths": [],
4512
5780
  "dry_run": {
4513
5781
  "supported": false
4514
5782
  },
4515
- "lock_policy": "mutation-lock-required",
4516
- "atomic_write_policy": "sqlite-transaction-and-atomic-cache-write",
5783
+ "lock_policy": "none-read-only",
5784
+ "atomic_write_policy": "none-read-only",
4517
5785
  "receipts": [
4518
- "index-rebuild-receipt"
5786
+ "loop-next-receipt"
4519
5787
  ],
4520
- "danger_level": "moderate",
5788
+ "danger_level": "read-only",
4521
5789
  "aliases": [],
4522
5790
  "exit_codes": [
4523
5791
  {
@@ -4530,115 +5798,190 @@
4530
5798
  }
4531
5799
  ],
4532
5800
  "examples": [
4533
- " mdkg index [--tolerant]"
5801
+ "mdkg loop next <loop> [--ws <alias>] [--no-cache] [--no-reindex] [--json]"
4534
5802
  ],
4535
5803
  "docs": {
4536
- "help_target": "mdkg help index",
5804
+ "help_target": "mdkg help loop next",
4537
5805
  "command_matrix": "CLI_COMMAND_MATRIX.md"
4538
- }
5806
+ },
5807
+ "descriptor_source": "src/commands/loop_descriptors.ts",
5808
+ "handler": "runLoopNextCommand",
5809
+ "help_notes": [
5810
+ "Read-only routing for the next actionable child, readiness lane, or blocker recovery step."
5811
+ ]
4539
5812
  },
4540
5813
  {
4541
- "key": "init",
5814
+ "key": "loop plan",
4542
5815
  "path": [
4543
- "init"
5816
+ "loop",
5817
+ "plan"
4544
5818
  ],
4545
- "category": "init",
5819
+ "category": "loop",
4546
5820
  "status": "stable",
4547
5821
  "visibility": "public",
4548
- "summary": "mdkg init command",
5822
+ "summary": "mdkg loop plan command",
4549
5823
  "usage": [
4550
- " mdkg init [options]"
5824
+ "mdkg loop plan <loop> [--ws <alias>] [--no-cache] [--no-reindex] [--json]"
4551
5825
  ],
4552
5826
  "args": [
4553
5827
  {
4554
- "name": "options",
4555
- "required": false,
4556
- "source": "[options]"
5828
+ "name": "loop",
5829
+ "required": true,
5830
+ "source": "<loop>",
5831
+ "description": "Loop node id or qid."
4557
5832
  }
4558
5833
  ],
4559
5834
  "flags": [
4560
5835
  {
4561
- "name": "--agent",
4562
- "value": null,
5836
+ "name": "--root",
5837
+ "value": "<path>",
4563
5838
  "required": false,
4564
- "description": "--agent Create the complete agent bootstrap, skills, events, and mirrors"
5839
+ "description": "Run against a specific repository root; -r is the short alias."
4565
5840
  },
4566
5841
  {
4567
- "name": "--force",
5842
+ "name": "--ws",
5843
+ "value": "<alias>",
5844
+ "required": false,
5845
+ "description": "Resolve the command against one workspace alias."
5846
+ },
5847
+ {
5848
+ "name": "--json",
4568
5849
  "value": null,
4569
5850
  "required": false,
4570
- "description": "--force Overwrite existing mdkg files"
5851
+ "description": "Emit deterministic JSON instead of text."
4571
5852
  },
4572
5853
  {
4573
- "name": "--help",
5854
+ "name": "--no-cache",
4574
5855
  "value": null,
4575
5856
  "required": false,
4576
- "description": "--help, -h Show help"
5857
+ "description": "Build a non-persisting in-memory index projection instead of reading the cache."
4577
5858
  },
4578
5859
  {
4579
- "name": "--no-update-ignores",
5860
+ "name": "--no-reindex",
4580
5861
  "value": null,
4581
5862
  "required": false,
4582
- "description": "--no-update-ignores Skip default .gitignore/.npmignore updates"
5863
+ "description": "Do not rebuild a stale or missing index projection."
5864
+ }
5865
+ ],
5866
+ "output_formats": [
5867
+ "text",
5868
+ "json"
5869
+ ],
5870
+ "json_schema_ref": "mdkg.command_output.v1",
5871
+ "side_effects": [
5872
+ "none"
5873
+ ],
5874
+ "read_paths": [
5875
+ ".mdkg/**"
5876
+ ],
5877
+ "write_paths": [],
5878
+ "dry_run": {
5879
+ "supported": false
5880
+ },
5881
+ "lock_policy": "none-read-only",
5882
+ "atomic_write_policy": "none-read-only",
5883
+ "receipts": [
5884
+ "loop-plan-receipt"
5885
+ ],
5886
+ "danger_level": "read-only",
5887
+ "aliases": [],
5888
+ "exit_codes": [
5889
+ {
5890
+ "code": 0,
5891
+ "meaning": "success"
4583
5892
  },
5893
+ {
5894
+ "code": 1,
5895
+ "meaning": "validation-or-runtime-error"
5896
+ }
5897
+ ],
5898
+ "examples": [
5899
+ "mdkg loop plan <loop> [--ws <alias>] [--no-cache] [--no-reindex] [--json]"
5900
+ ],
5901
+ "docs": {
5902
+ "help_target": "mdkg help loop plan",
5903
+ "command_matrix": "CLI_COMMAND_MATRIX.md"
5904
+ },
5905
+ "descriptor_source": "src/commands/loop_descriptors.ts",
5906
+ "handler": "runLoopPlanCommand",
5907
+ "help_notes": [
5908
+ "Read-only readiness cockpit for loop execution planning."
5909
+ ]
5910
+ },
5911
+ {
5912
+ "key": "loop runs",
5913
+ "path": [
5914
+ "loop",
5915
+ "runs"
5916
+ ],
5917
+ "category": "loop",
5918
+ "status": "stable",
5919
+ "visibility": "public",
5920
+ "summary": "mdkg loop runs command",
5921
+ "usage": [
5922
+ "mdkg loop runs <loop> [--ws <alias>] [--no-cache] [--no-reindex] [--json]"
5923
+ ],
5924
+ "args": [
5925
+ {
5926
+ "name": "loop",
5927
+ "required": true,
5928
+ "source": "<loop>",
5929
+ "description": "Loop node id or qid."
5930
+ }
5931
+ ],
5932
+ "flags": [
4584
5933
  {
4585
5934
  "name": "--root",
4586
- "value": null,
5935
+ "value": "<path>",
4587
5936
  "required": false,
4588
- "description": "--root, -r <path> Run against a specific repo root"
5937
+ "description": "Run against a specific repository root; -r is the short alias."
4589
5938
  },
4590
5939
  {
4591
- "name": "--update-dockerignore",
4592
- "value": "Append",
5940
+ "name": "--ws",
5941
+ "value": "<alias>",
4593
5942
  "required": false,
4594
- "description": "--update-dockerignore Append mdkg ignore entries"
5943
+ "description": "Resolve the command against one workspace alias."
4595
5944
  },
4596
5945
  {
4597
- "name": "--update-gitignore",
5946
+ "name": "--json",
4598
5947
  "value": null,
4599
5948
  "required": false,
4600
- "description": "--update-gitignore Append mdkg ignore entries"
5949
+ "description": "Emit deterministic JSON instead of text."
4601
5950
  },
4602
5951
  {
4603
- "name": "--update-npmignore",
5952
+ "name": "--no-cache",
4604
5953
  "value": null,
4605
5954
  "required": false,
4606
- "description": "--update-npmignore Append mdkg ignore entries"
5955
+ "description": "Build a non-persisting in-memory index projection instead of reading the cache."
4607
5956
  },
4608
5957
  {
4609
- "name": "--version",
5958
+ "name": "--no-reindex",
4610
5959
  "value": null,
4611
5960
  "required": false,
4612
- "description": "--version, -V Show version"
5961
+ "description": "Do not rebuild a stale or missing index projection."
4613
5962
  }
4614
5963
  ],
4615
5964
  "output_formats": [
4616
- "text"
5965
+ "text",
5966
+ "json"
4617
5967
  ],
4618
- "json_schema_ref": null,
5968
+ "json_schema_ref": "mdkg.command_output.v1",
4619
5969
  "side_effects": [
4620
- "initialize-mdkg-scaffold"
5970
+ "none"
4621
5971
  ],
4622
5972
  "read_paths": [
4623
5973
  ".mdkg/**"
4624
5974
  ],
4625
- "write_paths": [
4626
- ".mdkg/**",
4627
- "AGENTS.md",
4628
- "AGENT_START.md",
4629
- "CLAUDE.md",
4630
- "CLI_COMMAND_MATRIX.md",
4631
- "llms.txt"
4632
- ],
5975
+ "write_paths": [],
4633
5976
  "dry_run": {
4634
5977
  "supported": false
4635
5978
  },
4636
- "lock_policy": "not-required-before-mdkg-config-exists",
4637
- "atomic_write_policy": "exclusive-create-and-atomic-file-writes",
5979
+ "lock_policy": "none-read-only",
5980
+ "atomic_write_policy": "none-read-only",
4638
5981
  "receipts": [
4639
- "init-summary"
5982
+ "loop-runs-receipt"
4640
5983
  ],
4641
- "danger_level": "moderate",
5984
+ "danger_level": "read-only",
4642
5985
  "aliases": [],
4643
5986
  "exit_codes": [
4644
5987
  {
@@ -4651,52 +5994,80 @@
4651
5994
  }
4652
5995
  ],
4653
5996
  "examples": [
4654
- " mdkg init [options]"
5997
+ "mdkg loop runs <loop> [--ws <alias>] [--no-cache] [--no-reindex] [--json]"
4655
5998
  ],
4656
5999
  "docs": {
4657
- "help_target": "mdkg help init",
6000
+ "help_target": "mdkg help loop runs",
4658
6001
  "command_matrix": "CLI_COMMAND_MATRIX.md"
4659
- }
6002
+ },
6003
+ "descriptor_source": "src/commands/loop_descriptors.ts",
6004
+ "handler": "runLoopRunsCommand",
6005
+ "help_notes": [
6006
+ "Lists run refs and evidence refs without executing runtime jobs."
6007
+ ]
4660
6008
  },
4661
6009
  {
4662
- "key": "list",
6010
+ "key": "loop show",
4663
6011
  "path": [
4664
- "list"
6012
+ "loop",
6013
+ "show"
4665
6014
  ],
4666
- "category": "list",
6015
+ "category": "loop",
4667
6016
  "status": "stable",
4668
6017
  "visibility": "public",
4669
- "summary": "mdkg list command",
6018
+ "summary": "mdkg loop show command",
4670
6019
  "usage": [
4671
- " mdkg list [--type <type>] [--status <status>] [--ws <alias>] [--epic <id>]"
6020
+ "mdkg loop show <loop-or-template> [--meta] [--ws <alias>] [--no-cache] [--no-reindex] [--json]"
6021
+ ],
6022
+ "args": [
6023
+ {
6024
+ "name": "loop-or-template",
6025
+ "required": true,
6026
+ "source": "<loop-or-template>",
6027
+ "description": "Loop node id/qid or seed template name/ref."
6028
+ }
4672
6029
  ],
4673
- "args": [],
4674
6030
  "flags": [
4675
6031
  {
4676
- "name": "--help",
6032
+ "name": "--meta",
4677
6033
  "value": null,
4678
6034
  "required": false,
4679
- "description": "--help, -h Show help"
6035
+ "description": "Show metadata without the full body."
4680
6036
  },
4681
6037
  {
4682
6038
  "name": "--root",
6039
+ "value": "<path>",
6040
+ "required": false,
6041
+ "description": "Run against a specific repository root; -r is the short alias."
6042
+ },
6043
+ {
6044
+ "name": "--ws",
6045
+ "value": "<alias>",
6046
+ "required": false,
6047
+ "description": "Resolve the command against one workspace alias."
6048
+ },
6049
+ {
6050
+ "name": "--json",
4683
6051
  "value": null,
4684
6052
  "required": false,
4685
- "description": "--root, -r <path> Run against a specific repo root"
6053
+ "description": "Emit deterministic JSON instead of text."
4686
6054
  },
4687
6055
  {
4688
- "name": "--version",
6056
+ "name": "--no-cache",
4689
6057
  "value": null,
4690
6058
  "required": false,
4691
- "description": "--version, -V Show version"
6059
+ "description": "Build a non-persisting in-memory index projection instead of reading the cache."
6060
+ },
6061
+ {
6062
+ "name": "--no-reindex",
6063
+ "value": null,
6064
+ "required": false,
6065
+ "description": "Do not rebuild a stale or missing index projection."
4692
6066
  }
4693
6067
  ],
4694
6068
  "output_formats": [
4695
6069
  "text",
4696
- "json",
4697
- "xml",
4698
- "toon",
4699
- "md"
6070
+ "json"
4700
6071
  ],
4701
6072
  "json_schema_ref": "mdkg.command_output.v1",
4702
6073
  "side_effects": [
@@ -4711,7 +6082,9 @@
4711
6082
  },
4712
6083
  "lock_policy": "none-read-only",
4713
6084
  "atomic_write_policy": "none-read-only",
4714
- "receipts": [],
6085
+ "receipts": [
6086
+ "loop-show-receipt"
6087
+ ],
4715
6088
  "danger_level": "read-only",
4716
6089
  "aliases": [],
4717
6090
  "exit_codes": [
@@ -4725,12 +6098,17 @@
4725
6098
  }
4726
6099
  ],
4727
6100
  "examples": [
4728
- " mdkg list [--type <type>] [--status <status>] [--ws <alias>] [--epic <id>]"
6101
+ "mdkg loop show <loop-or-template> [--meta] [--ws <alias>] [--no-cache] [--no-reindex] [--json]"
4729
6102
  ],
4730
6103
  "docs": {
4731
- "help_target": "mdkg help list",
6104
+ "help_target": "mdkg help loop show",
4732
6105
  "command_matrix": "CLI_COMMAND_MATRIX.md"
4733
- }
6106
+ },
6107
+ "descriptor_source": "src/commands/loop_descriptors.ts",
6108
+ "handler": "runLoopShowCommand",
6109
+ "help_notes": [
6110
+ "Shows an indexed loop node or a seed loop template."
6111
+ ]
4734
6112
  },
4735
6113
  {
4736
6114
  "key": "manifest",
@@ -9170,5 +10548,5 @@
9170
10548
  }
9171
10549
  }
9172
10550
  ],
9173
- "contract_hash": "65408d40dd065dfadcaa9bfe3626df5703dce2fe08ce1dd500e371899a8c4f7a"
10551
+ "contract_hash": "e9bd2d82d340887bc58d518c7e67541996f4b7744b2d1981763060575265aa29"
9174
10552
  }