mdkg 0.3.6 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +93 -0
- package/CLI_COMMAND_MATRIX.md +132 -24
- package/README.md +80 -25
- package/dist/cli.js +193 -36
- package/dist/command-contract.json +882 -122
- package/dist/commands/bundle.js +2 -0
- package/dist/commands/capability.js +1 -0
- package/dist/commands/checkpoint.js +139 -1
- package/dist/commands/db.js +8 -0
- package/dist/commands/doctor.js +7 -7
- package/dist/commands/format.js +155 -0
- package/dist/commands/goal.js +60 -0
- package/dist/commands/graph.js +148 -0
- package/dist/commands/handoff.js +301 -0
- package/dist/commands/mcp.js +9 -0
- package/dist/commands/new.js +12 -3
- package/dist/commands/pack.js +3 -1
- package/dist/commands/query_output.js +2 -0
- package/dist/commands/show.js +8 -0
- package/dist/commands/spec.js +76 -17
- package/dist/commands/status.js +1 -0
- package/dist/commands/subgraph.js +7 -4
- package/dist/commands/task.js +2 -0
- package/dist/commands/upgrade.js +128 -3
- package/dist/commands/validate.js +268 -6
- package/dist/commands/work.js +176 -5
- package/dist/core/project_db_queue_contract.js +101 -0
- package/dist/graph/agent_file_types.js +59 -20
- package/dist/graph/capabilities_indexer.js +45 -3
- package/dist/graph/edges.js +15 -0
- package/dist/graph/frontmatter.js +4 -1
- package/dist/graph/indexer.js +13 -0
- package/dist/graph/node.js +12 -1
- package/dist/graph/sqlite_index.js +2 -0
- package/dist/graph/subgraphs.js +2 -0
- package/dist/graph/template_schema.js +37 -17
- package/dist/graph/validate_graph.js +16 -5
- package/dist/graph/visibility.js +6 -0
- package/dist/init/AGENT_START.md +9 -6
- package/dist/init/CLI_COMMAND_MATRIX.md +50 -16
- package/dist/init/README.md +26 -9
- package/dist/init/init-manifest.json +67 -12
- package/dist/init/templates/default/bug.md +2 -0
- package/dist/init/templates/default/chk.md +3 -0
- package/dist/init/templates/default/epic.md +2 -0
- package/dist/init/templates/default/feat.md +2 -0
- package/dist/init/templates/default/goal.md +3 -0
- package/dist/init/templates/default/manifest.md +45 -0
- package/dist/init/templates/default/spike.md +2 -0
- package/dist/init/templates/default/task.md +2 -0
- package/dist/init/templates/default/test.md +2 -0
- package/dist/init/templates/specs/agent.MANIFEST.md +80 -0
- package/dist/init/templates/specs/api.MANIFEST.md +33 -0
- package/dist/init/templates/specs/base.MANIFEST.md +120 -0
- package/dist/init/templates/specs/capability.MANIFEST.md +45 -0
- package/dist/init/templates/specs/integration.MANIFEST.md +25 -0
- package/dist/init/templates/specs/model.MANIFEST.md +21 -0
- package/dist/init/templates/specs/project.MANIFEST.md +39 -0
- package/dist/init/templates/specs/runtime-agent.MANIFEST.md +49 -0
- package/dist/init/templates/specs/runtime-image.MANIFEST.md +21 -0
- package/dist/init/templates/specs/tool.MANIFEST.md +25 -0
- package/dist/pack/export_json.js +20 -8
- package/dist/pack/export_md.js +15 -4
- package/dist/pack/export_xml.js +9 -4
- package/dist/pack/metrics.js +12 -4
- package/dist/pack/pack.js +9 -1
- package/dist/util/argparse.js +3 -0
- package/package.json +21 -3
package/dist/init/AGENT_START.md
CHANGED
|
@@ -29,8 +29,8 @@ Agent operating prompt:
|
|
|
29
29
|
- Treat goal `required_checks` as report-only guidance from mdkg. Run commands yourself, then record evidence in the goal or active work item.
|
|
30
30
|
- Record skill improvement candidates during normal goal execution; edit `SKILL.md` only when the active node is explicit skill-maintenance work.
|
|
31
31
|
- Use `mdkg skill list`, `mdkg skill search`, and `mdkg skill show <slug>` for skill discovery.
|
|
32
|
-
- Use `mdkg capability list/search/show` for deterministic skills, `SPEC.md`, `WORK.md`, core-doc, and design-doc capability discovery.
|
|
33
|
-
- Use `mdkg
|
|
32
|
+
- Use `mdkg capability list/search/show` for deterministic skills, `MANIFEST.md` / legacy `SPEC.md`, `WORK.md`, core-doc, and design-doc capability discovery.
|
|
33
|
+
- Use `mdkg manifest list/show/validate` for focused optional `MANIFEST.md` capability records; `mdkg spec ...` remains a legacy alias for one compatibility release.
|
|
34
34
|
- Use `mdkg index` to refresh JSON compatibility caches and `.mdkg/index/mdkg.sqlite` when SQLite mode is enabled.
|
|
35
35
|
- Treat `.mdkg/db` as project application state; use `mdkg db init` to create
|
|
36
36
|
the generic scaffold and enable `db.enabled` without creating an active
|
|
@@ -39,7 +39,10 @@ Agent operating prompt:
|
|
|
39
39
|
node:sqlite queue delivery, internal event/receipt/reducer, writer lease/CAS,
|
|
40
40
|
and queue control migrations. Queue state is delivery infrastructure, not
|
|
41
41
|
canonical event history; use `mdkg db queue ...` to create, pause, enqueue,
|
|
42
|
-
claim, settle, inspect, and drain local queues.
|
|
42
|
+
claim, settle, inspect, and drain local queues. Use
|
|
43
|
+
`mdkg db queue contract --json` for the public adapter contract covering
|
|
44
|
+
payload hashing, dedupe, claim order, lease-owner settlement, retry,
|
|
45
|
+
dead-letter, release-expired, pause/resume, snapshot policy, and stats. Event rows are durable local
|
|
43
46
|
project DB history; receipts, reducers, writer leases, and materializers are
|
|
44
47
|
internal local helper surfaces, with no public `mdkg db event`,
|
|
45
48
|
`mdkg db reducer`, `mdkg db lease`, or `mdkg db materializer` CLI yet. Use `mdkg db verify` and `mdkg db stats` for
|
|
@@ -108,9 +111,9 @@ Capability discovery:
|
|
|
108
111
|
- `mdkg capability list --kind skill --json`
|
|
109
112
|
- `mdkg capability search "<query>" --kind spec --json`
|
|
110
113
|
- `mdkg capability search "<query>" --kind work --json`
|
|
111
|
-
- `mdkg
|
|
112
|
-
- `mdkg
|
|
113
|
-
- `mdkg
|
|
114
|
+
- `mdkg manifest list --json`
|
|
115
|
+
- `mdkg manifest show <id-or-qid-or-alias> --json`
|
|
116
|
+
- `mdkg manifest validate <id-or-qid-or-alias> --json`
|
|
114
117
|
|
|
115
118
|
Conventions:
|
|
116
119
|
- `AGENTS.md` is the Codex/OpenAI-oriented wrapper doc.
|
|
@@ -6,8 +6,9 @@ Verify live help with:
|
|
|
6
6
|
- `mdkg --help`
|
|
7
7
|
- `mdkg help <command>`
|
|
8
8
|
|
|
9
|
-
Optional reusable
|
|
10
|
-
Repos without SPEC files remain valid.
|
|
9
|
+
Optional reusable manifest capability records are accessed through `mdkg manifest ...`.
|
|
10
|
+
Repos without MANIFEST/SPEC files remain valid. `mdkg spec ...` remains a
|
|
11
|
+
legacy alias for one compatibility release.
|
|
11
12
|
|
|
12
13
|
Primary commands:
|
|
13
14
|
- `mdkg init`
|
|
@@ -17,8 +18,10 @@ Primary commands:
|
|
|
17
18
|
- `mdkg list`
|
|
18
19
|
- `mdkg search`
|
|
19
20
|
- `mdkg pack`
|
|
21
|
+
- `mdkg handoff create <id-or-qid> [--ws <alias>] [--depth <n>] [--out <path>] [--json]`
|
|
20
22
|
- `mdkg skill`
|
|
21
23
|
- `mdkg capability`
|
|
24
|
+
- `mdkg manifest`
|
|
22
25
|
- `mdkg spec`
|
|
23
26
|
- `mdkg archive`
|
|
24
27
|
- `mdkg bundle`
|
|
@@ -34,6 +37,14 @@ Primary commands:
|
|
|
34
37
|
- `mdkg fix apply [--family ids] [--target <id-or-qid>] [--base-ref <ref>] [--json]`
|
|
35
38
|
- `mdkg fix ids [--target <id-or-qid>] [--base-ref <ref>] [--apply] [--json]`
|
|
36
39
|
|
|
40
|
+
Semantic refs:
|
|
41
|
+
- work nodes may use `context_refs` for non-executable background and `evidence_refs` for proof/audit refs
|
|
42
|
+
- semantic refs may point at local ids, subgraph qids, or URI refs
|
|
43
|
+
- use `mdkg pack <id> --edges context_refs,evidence_refs` when a handoff should traverse semantic refs
|
|
44
|
+
- use `mdkg handoff create <id-or-qid> --json` for sanitized copy-ready agent handoff prompts
|
|
45
|
+
- handoffs summarize graph state, latest checkpoint, boundaries, required checks, next actions, and raw-marker warnings without copying raw node bodies
|
|
46
|
+
- executable goal queues still belong in goal `scope_refs`
|
|
47
|
+
|
|
37
48
|
Operator health:
|
|
38
49
|
- `mdkg status [--json]` is a read-only summary for scripts and agents
|
|
39
50
|
- reports mdkg version/config, git state, graph/index freshness, selected-goal state, project DB verification summary, and generated cache status
|
|
@@ -71,6 +82,7 @@ Project database commands:
|
|
|
71
82
|
- `mdkg db verify [--json]`
|
|
72
83
|
- `mdkg db stats [--json]`
|
|
73
84
|
- `mdkg db queue create|pause|resume|enqueue|claim|ack|fail|dead-letter|release-expired|stats|list|show ... [--json]`
|
|
85
|
+
- `mdkg db queue contract [--json]`
|
|
74
86
|
- `mdkg db snapshot seal [--queue-policy drain|paused] [--json]`
|
|
75
87
|
- `mdkg db snapshot verify [--json]`
|
|
76
88
|
- `mdkg db snapshot status [--json]`
|
|
@@ -87,6 +99,9 @@ Project database commands:
|
|
|
87
99
|
in the configured migration table
|
|
88
100
|
- `mdkg db queue ...` exposes durable local delivery operations backed by
|
|
89
101
|
node:sqlite; queue rows are delivery state, not canonical event history
|
|
102
|
+
- `mdkg db queue contract --json` returns the public adapter contract for
|
|
103
|
+
payload hashes, dedupe, claim order, lease-owner settlement, retries,
|
|
104
|
+
dead-letter, release-expired, pause/resume, snapshot policy, and stats
|
|
90
105
|
- paused queues reject enqueue and claim, but ack/fail/dead-letter and
|
|
91
106
|
release-expired remain available so leased work can settle
|
|
92
107
|
- event tables are durable local history for project DB state transitions;
|
|
@@ -105,7 +120,11 @@ Project database commands:
|
|
|
105
120
|
- active `.mdkg/db/runtime/` files and `.mdkg/db` WAL/SHM/journal/lock/temp files are ignored by default
|
|
106
121
|
|
|
107
122
|
Validation commands:
|
|
108
|
-
- `mdkg validate [--out <path>] [--quiet] [--json]`
|
|
123
|
+
- `mdkg validate [--out <path>] [--json-out <path>] [--quiet] [--changed-only] [--summary] [--limit <n>] [--json]`
|
|
124
|
+
- `--changed-only` filters warning presentation to changed `.mdkg` files while full graph errors still run
|
|
125
|
+
- `--summary` emits bounded warning samples for agent/CI logs; `--limit <n>` controls the sample size
|
|
126
|
+
- `--out <path>` writes the compatibility text report; `--json-out <path>` writes a clean full JSON receipt
|
|
127
|
+
- JSON receipts include `warning_summary` and `warning_diagnostics` with warning ids, categories, severity, paths, refs, and remediation text
|
|
109
128
|
|
|
110
129
|
Node creation commands:
|
|
111
130
|
- `mdkg new <type> "<title>" [options] [--json]`
|
|
@@ -113,19 +132,21 @@ Node creation commands:
|
|
|
113
132
|
- `mdkg new spike "<research question>" [options] [--json]`
|
|
114
133
|
|
|
115
134
|
Agent workflow file type creation:
|
|
116
|
-
- `mdkg new
|
|
135
|
+
- `mdkg new manifest "<title>" [options] [--json]`
|
|
117
136
|
- `mdkg new work "<title>" [options] [--json]`
|
|
118
137
|
- `mdkg new work_order "<title>" [options] [--json]`
|
|
119
138
|
- `mdkg new receipt "<title>" [options] [--json]`
|
|
120
139
|
- `mdkg new feedback "<title>" [options] [--json]`
|
|
121
140
|
- `mdkg new dispute "<title>" [options] [--json]`
|
|
122
141
|
- `mdkg new proposal "<title>" [options] [--json]`
|
|
123
|
-
- `mdkg new spec "
|
|
142
|
+
- `mdkg new spec "<title>" [options] [--json]` is a deprecated alias for
|
|
143
|
+
`mdkg new manifest` and creates `MANIFEST.md` with `type: manifest`
|
|
144
|
+
- `mdkg new manifest "image worker" --id agent.image-worker`
|
|
124
145
|
- `mdkg new work "generate image" --id work.generate-image`
|
|
125
146
|
|
|
126
147
|
Agent workflow notes:
|
|
127
148
|
- `--id <portable-id>` is only for agent workflow file types.
|
|
128
|
-
- `
|
|
149
|
+
- `manifest` and `work` scaffold as validation-clean standalone docs.
|
|
129
150
|
- `work_order`, `receipt`, `feedback`, `dispute`, and `proposal` need real refs before strict `mdkg validate` passes.
|
|
130
151
|
- `goal` nodes capture recursive objective state and required checks, but normal `mdkg next` does not select them.
|
|
131
152
|
- `spike` nodes are actionable research/planning work under `.mdkg/work/`; use `mdkg task start|update|done` for lifecycle state.
|
|
@@ -146,11 +167,12 @@ Event log commands:
|
|
|
146
167
|
Task mutation commands:
|
|
147
168
|
- `mdkg task start <id-or-qid> [--ws <alias>] [--run-id <id>] [--note "<text>"] [--json]`
|
|
148
169
|
- `mdkg task update <id-or-qid> [options] [--json]`
|
|
149
|
-
- `mdkg task done <id-or-qid> [--checkpoint "<title>"] [options] [--json]`
|
|
170
|
+
- `mdkg task done <id-or-qid> [--checkpoint "<title>"] [--checkpoint-kind implementation|test-proof|goal-closeout|audit|handoff] [options] [--json]`
|
|
150
171
|
- task commands support task-like `feat`, `task`, `bug`, `test`, and `spike` nodes
|
|
151
172
|
|
|
152
173
|
Checkpoint commands:
|
|
153
|
-
- `mdkg checkpoint new <title> [--ws <alias>] [--json]`
|
|
174
|
+
- `mdkg checkpoint new <title> [--kind implementation|test-proof|goal-closeout|audit|handoff] [--ws <alias>] [--json]`
|
|
175
|
+
- checkpoint kinds render bodies with command evidence, pass/fail status, known warnings, changed surfaces, boundaries, and follow-up refs
|
|
154
176
|
|
|
155
177
|
Agent bootstrap:
|
|
156
178
|
- `mdkg init --agent`
|
|
@@ -179,18 +201,25 @@ Capability discovery:
|
|
|
179
201
|
- `mdkg capability resolve [query] [--requires <capability>] [--fresh-only] [--json]`
|
|
180
202
|
- capability records are deterministic cache projections from Markdown
|
|
181
203
|
- records include source hash, headings, refs, and `indexed_at`
|
|
182
|
-
- SPEC and WORK capability records include read-only `linkage` arrays for related
|
|
204
|
+
- MANIFEST/SPEC and WORK capability records include read-only `linkage` arrays for related manifests, work contracts, work orders, and receipts when those graph mirrors exist
|
|
183
205
|
- normal task, epic, feat, bug, test, spike, and checkpoint nodes are intentionally excluded
|
|
184
206
|
|
|
185
|
-
|
|
207
|
+
Manifest capability records:
|
|
208
|
+
- `mdkg manifest list [--json]`
|
|
209
|
+
- `mdkg manifest show <id-or-qid-or-alias> [--json]`
|
|
210
|
+
- `mdkg manifest validate [<id-or-qid-or-alias>] [--json]`
|
|
211
|
+
- `MANIFEST.md` is optional; repos with no manifest files still validate
|
|
212
|
+
- manifest records describe reusable capability surfaces, not general planning notes
|
|
213
|
+
- `mdkg manifest validate` with no ref validates the graph and all optional manifest records
|
|
214
|
+
- `mdkg manifest validate <ref>` also checks that the target manifest reference exists
|
|
215
|
+
- `mdkg manifest ...` is the focused manifest command family; `mdkg capability ...` remains broader skill/manifest/work/core/design discovery
|
|
216
|
+
|
|
217
|
+
Legacy spec capability records:
|
|
186
218
|
- `mdkg spec list [--json]`
|
|
187
219
|
- `mdkg spec show <id-or-qid-or-alias> [--json]`
|
|
188
220
|
- `mdkg spec validate [<id-or-qid-or-alias>] [--json]`
|
|
189
|
-
- `
|
|
190
|
-
- SPEC
|
|
191
|
-
- `mdkg spec validate` with no ref validates the graph and all optional SPEC records
|
|
192
|
-
- `mdkg spec validate <ref>` also checks that the target SPEC reference exists
|
|
193
|
-
- `mdkg spec ...` is the focused SPEC command family; `mdkg capability ...` remains broader skill/spec/work/core/design discovery
|
|
221
|
+
- `mdkg spec ...` is a deprecated alias for `mdkg manifest ...` during the compatibility bridge
|
|
222
|
+
- legacy `SPEC.md` files remain valid for one compatibility release
|
|
194
223
|
|
|
195
224
|
Archive sidecars:
|
|
196
225
|
- `mdkg archive add <file> [--id <archive.id>] [--kind source|artifact] [--visibility private|internal|public] [--title <title>] [--refs <...>] [--relates <...>] [--json]`
|
|
@@ -220,6 +249,7 @@ Graph clone, fork, and template import:
|
|
|
220
249
|
- `mdkg graph clone <source-bundle-or-mdkg-dir> --target <path> [--json]`
|
|
221
250
|
- `mdkg graph fork <source-bundle-or-mdkg-dir> --target <path> [--start-goal <goal-id>] [--json]`
|
|
222
251
|
- `mdkg graph import-template <source-bundle-or-mdkg-dir> [--start-goal <goal-id>] [--select-goal] [--id-prefix <prefix>] [--dry-run] [--apply] [--json]`
|
|
252
|
+
- `mdkg graph refs <id-or-qid> [--ws <alias>] [--json]`
|
|
223
253
|
- `graph clone` and `graph fork` preserve IDs because the target is a separate graph namespace
|
|
224
254
|
- clone/fork targets must be empty or absent and stay under the current mdkg root
|
|
225
255
|
- live directory sources are never mutated; clone/fork refuses targets nested inside a live source directory
|
|
@@ -230,6 +260,7 @@ Graph clone, fork, and template import:
|
|
|
230
260
|
- colliding semantic template IDs require `--id-prefix`
|
|
231
261
|
- `--select-goal` requires `--start-goal`; on apply it activates the imported start goal, pauses competing active root goals, validates, then writes selected-goal state
|
|
232
262
|
- importing active template goals without `--select-goal` fails before writing when it would create multiple active root goals
|
|
263
|
+
- `graph refs` is read-only and summarizes inbound/outbound scope, context, evidence, blocker, related, and structural refs across local and subgraph qids
|
|
233
264
|
- subgraphs remain read-only bundle projections for orchestration context; use `graph clone|fork|import-template` when authored graph state should be created
|
|
234
265
|
|
|
235
266
|
Subgraph orchestration:
|
|
@@ -263,11 +294,13 @@ Work semantic mirrors:
|
|
|
263
294
|
- `mdkg work receipt verify <id-or-qid> [--json]`
|
|
264
295
|
- `mdkg work receipt update <id-or-qid> [--receipt-status <status>] [--add-artifacts <...>] [--add-proof-refs <...>] [--add-attestation-refs <...>] [--json]`
|
|
265
296
|
- `mdkg work artifact add <order-or-receipt-id-or-qid> <file> [--id <archive.id>] [--kind source|artifact] [--json]`
|
|
266
|
-
- `work
|
|
297
|
+
- `mdkg work validate [<id-or-qid>] [--type manifest|spec|work|work_order|receipt|feedback|dispute|proposal] [--json]`
|
|
298
|
+
- `work trigger` accepts a `WORK.md` ref directly or a `MANIFEST.md` / legacy `SPEC.md` capability ref with exactly one resolvable work contract; it creates a submitted order mirror and never executes work
|
|
267
299
|
- example: `mdkg work trigger work.example --id order.example-1 --requester user://example --json`
|
|
268
300
|
- `work trigger --enqueue <queue>` requires a valid project DB plus an explicitly created active queue, creates a submitted order mirror, and enqueues a local delivery message without executing work
|
|
269
301
|
- `work order status` is read-only and reports deterministic order state plus linked receipts
|
|
270
302
|
- `work receipt verify` is read-only and reports linkage, evidence, archive ref, hash, outcome, and redaction-policy checks
|
|
303
|
+
- `work validate` is read-only and reports typed diagnostics for agent workflow mirrors; obvious raw secret, prompt, token, or payload markers are warnings, not hard failures
|
|
271
304
|
- work commands mutate mdkg semantic mirror files only; production order, receipt, feedback, dispute, payment, ledger, marketplace inventory, fulfillment, and execution state remains canonical outside mdkg
|
|
272
305
|
- do not store raw secrets, credentials, live payment state, ledger mutations, or canonical marketplace state in work mirrors
|
|
273
306
|
- `artifact://...` refs identify external/runtime-managed artifacts; `archive://...` refs identify committed mdkg archive sidecars
|
|
@@ -299,6 +332,7 @@ Goal nodes:
|
|
|
299
332
|
- `goal activate` makes one local root goal active, pauses competing local active goals in the same workspace, and writes selected-goal state
|
|
300
333
|
- `goal archive` marks a superseded historical goal archived so it remains readable but not actionable
|
|
301
334
|
- `goal next` is read-only; use `goal claim` to set `active_node`
|
|
335
|
+
- `goal done` preserves the final actionable item as `last_active_node` and removes actionable `active_node`
|
|
302
336
|
- `mdkg goal evaluate` is report-only and never runs commands from `required_checks`
|
|
303
337
|
- skill improvements discovered during normal goal execution should be recorded as candidates or proposals unless the active node is skill-maintenance
|
|
304
338
|
|
package/dist/init/README.md
CHANGED
|
@@ -25,8 +25,9 @@ mdkg new task "..." --status todo --priority 1
|
|
|
25
25
|
mdkg search "..."
|
|
26
26
|
mdkg show <id>
|
|
27
27
|
mdkg pack <id>
|
|
28
|
+
mdkg handoff create <id-or-qid> --json
|
|
28
29
|
mdkg capability search "..."
|
|
29
|
-
mdkg
|
|
30
|
+
mdkg manifest list --json
|
|
30
31
|
mdkg archive list
|
|
31
32
|
mdkg bundle create --profile private
|
|
32
33
|
mdkg graph clone .mdkg/bundles/private/all.mdkg.zip --target demos/demo-1 --json
|
|
@@ -36,7 +37,14 @@ mdkg fix plan --json
|
|
|
36
37
|
mdkg validate
|
|
37
38
|
```
|
|
38
39
|
|
|
39
|
-
This repo is already initialized. Use `mdkg upgrade` to preview safe scaffold updates, `mdkg index` to create or refresh generated graph/skill/capability/subgraph and SQLite caches after init, `mdkg new` to create work, `mdkg new goal "..."` plus `mdkg goal activate/current/next/claim/evaluate` for recursive long-running objectives, `mdkg search`/`mdkg show` to inspect graph state, `mdkg capability ...` to inspect cached skill/spec/work/core/design capabilities, `mdkg
|
|
40
|
+
This repo is already initialized. Use `mdkg upgrade` to preview safe scaffold updates, `mdkg index` to create or refresh generated graph/skill/capability/subgraph and SQLite caches after init, `mdkg new` to create work, `mdkg new goal "..."` plus `mdkg goal activate/current/next/claim/evaluate` for recursive long-running objectives, `mdkg search`/`mdkg show` to inspect graph state, `mdkg capability ...` to inspect cached skill/manifest/spec/work/core/design capabilities, `mdkg manifest ...` for focused optional manifest records, `mdkg capability resolve ...` to rank local and subgraph capabilities, `mdkg archive ...` to register source/artifact sidecars, `mdkg work ...` to create work contract/order/receipt semantic mirrors and deterministic trigger/verification records, `mdkg bundle ...` to create full graph snapshot bundles, `mdkg graph ...` to clone/fork/import authored graph templates, `mdkg subgraph ...` to register read-only child graph planning views, `mdkg pack <id>` to build deterministic context, `mdkg handoff create <id-or-qid> --json` to create a sanitized copy-ready agent handoff prompt, and `mdkg validate` before closeout.
|
|
41
|
+
|
|
42
|
+
`mdkg handoff create` summarizes goal/work state, included pack nodes, latest
|
|
43
|
+
checkpoint, boundaries, required checks, next actions, and raw-content marker
|
|
44
|
+
warnings without copying raw node bodies into the prompt. Use `--out` to write
|
|
45
|
+
the handoff artifact inside the repo root.
|
|
46
|
+
|
|
47
|
+
For large historical graphs, `mdkg validate --changed-only --json` keeps warning review focused on changed `.mdkg` files while full graph errors still run. `mdkg validate --summary --json --limit 20` keeps agent and CI logs bounded, and `--json-out <path>` writes a clean full JSON receipt artifact. `mdkg format --headings --dry-run --summary --json --limit 20` previews missing recommended heading additions with bounded output before `--apply`.
|
|
40
48
|
|
|
41
49
|
Use `mdkg status --json` for a read-only operator summary of Git, graph,
|
|
42
50
|
selected-goal, project DB, and generated-cache health before mutating work. Use
|
|
@@ -72,15 +80,17 @@ intentionally with `mdkg new task ...` or `mdkg new test ...`.
|
|
|
72
80
|
Agent workflow docs can use semantic ids:
|
|
73
81
|
|
|
74
82
|
```bash
|
|
75
|
-
mdkg new
|
|
83
|
+
mdkg new manifest "image worker" --id agent.image-worker
|
|
76
84
|
mdkg new work "generate image" --id work.generate-image
|
|
77
85
|
```
|
|
78
86
|
|
|
79
|
-
`
|
|
80
|
-
|
|
81
|
-
notes. `
|
|
82
|
-
`mdkg
|
|
83
|
-
|
|
87
|
+
`MANIFEST.md` is optional. Repos without manifest files still validate. When
|
|
88
|
+
present, manifest records describe reusable capability surfaces rather than
|
|
89
|
+
general planning notes. `SPEC.md` remains a legacy alias for one compatibility
|
|
90
|
+
release, and `mdkg spec list/show/validate` remains a deprecated alias for
|
|
91
|
+
`mdkg manifest list/show/validate`. `mdkg capability ...` remains the broader
|
|
92
|
+
read-only discovery surface for skills, manifests, WORK contracts, core docs,
|
|
93
|
+
and design docs.
|
|
84
94
|
|
|
85
95
|
Read `AGENT_START.md` first when this repo includes it.
|
|
86
96
|
|
|
@@ -124,7 +134,11 @@ infrastructure, not canonical event history; use `mdkg db queue ...` to create,
|
|
|
124
134
|
pause, enqueue, claim, settle, inspect, and drain local queues. Event rows are
|
|
125
135
|
durable local project DB history; receipts, reducers, writer leases, and
|
|
126
136
|
materializers are internal local helper surfaces, with no public `mdkg db event`,
|
|
127
|
-
`mdkg db reducer`, `mdkg db lease`, or `mdkg db materializer` CLI yet.
|
|
137
|
+
`mdkg db reducer`, `mdkg db lease`, or `mdkg db materializer` CLI yet.
|
|
138
|
+
`mdkg db queue contract --json` returns the read-only public adapter contract
|
|
139
|
+
for canonical payload hashing, dedupe keys, oldest-ready claim order,
|
|
140
|
+
lease-owner checked settlement, retry/dead-letter behavior, release-expired,
|
|
141
|
+
pause/resume, snapshot queue policy, and stats. Use `mdkg db verify` for non-mutating health checks and
|
|
128
142
|
`mdkg db stats` for table counts, DB size, migration state, and receipt-file
|
|
129
143
|
counts. Use `mdkg db snapshot seal` to create an opt-in sealed checkpoint under
|
|
130
144
|
`.mdkg/db/state`; the default queue policy is drain, and
|
|
@@ -235,6 +249,9 @@ Update and artifact commands accept local ids or local qids; subgraph qids are r
|
|
|
235
249
|
`mdkg work trigger` creates a deterministic submitted `WORK_ORDER.md` from a
|
|
236
250
|
WORK contract or a SPEC with exactly one resolvable work contract. `mdkg work
|
|
237
251
|
order status` and `mdkg work receipt verify` are read-only review helpers.
|
|
252
|
+
`mdkg work validate [<id-or-qid>] [--type spec|work|work_order|receipt|feedback|dispute|proposal] --json`
|
|
253
|
+
is a read-only focused validator for agent workflow mirrors with typed diagnostics
|
|
254
|
+
and raw secret, prompt, token, or payload marker warnings.
|
|
238
255
|
`mdkg work trigger --enqueue <queue>` optionally writes a local project DB queue
|
|
239
256
|
delivery message after the queue has been explicitly created and is active; it
|
|
240
257
|
still does not execute work.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
3
|
"tool": "mdkg",
|
|
4
|
-
"mdkg_version": "0.3.
|
|
4
|
+
"mdkg_version": "0.3.8",
|
|
5
5
|
"files": [
|
|
6
6
|
{
|
|
7
7
|
"path": ".mdkg/config.json",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
{
|
|
62
62
|
"path": ".mdkg/README.md",
|
|
63
63
|
"category": "mdkg_doc",
|
|
64
|
-
"sha256": "
|
|
64
|
+
"sha256": "e876acfbf3e9de411cd45eb86e7e9bff821f8a5dd6dc933bd6da4ac88a9686e6"
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
"path": ".mdkg/skills/build-pack-and-execute-task/SKILL.md",
|
|
@@ -91,12 +91,12 @@
|
|
|
91
91
|
{
|
|
92
92
|
"path": ".mdkg/templates/default/bug.md",
|
|
93
93
|
"category": "template",
|
|
94
|
-
"sha256": "
|
|
94
|
+
"sha256": "27ed977c67030befccfc469d9db257fadc9ad5331963e259c489ba03754194cb"
|
|
95
95
|
},
|
|
96
96
|
{
|
|
97
97
|
"path": ".mdkg/templates/default/chk.md",
|
|
98
98
|
"category": "template",
|
|
99
|
-
"sha256": "
|
|
99
|
+
"sha256": "9e32f46665fc7cc582c4695772f5d99799f574229e740fa8892c7b9e75324de9"
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
102
|
"path": ".mdkg/templates/default/dec.md",
|
|
@@ -116,12 +116,12 @@
|
|
|
116
116
|
{
|
|
117
117
|
"path": ".mdkg/templates/default/epic.md",
|
|
118
118
|
"category": "template",
|
|
119
|
-
"sha256": "
|
|
119
|
+
"sha256": "0f515c046064771e3f9abaa3689634bfae3ffcf2ffe9825e8e3b7dc15c24fc50"
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
122
|
"path": ".mdkg/templates/default/feat.md",
|
|
123
123
|
"category": "template",
|
|
124
|
-
"sha256": "
|
|
124
|
+
"sha256": "25c04ce41d8cf519d5c3009219eeed48f76c23600c6b7999264831aa92cefc4b"
|
|
125
125
|
},
|
|
126
126
|
{
|
|
127
127
|
"path": ".mdkg/templates/default/feedback.md",
|
|
@@ -131,7 +131,12 @@
|
|
|
131
131
|
{
|
|
132
132
|
"path": ".mdkg/templates/default/goal.md",
|
|
133
133
|
"category": "template",
|
|
134
|
-
"sha256": "
|
|
134
|
+
"sha256": "8f984580aefd02b34639fa7f5d2a834662656bbf2e12f14a285f5ae31aff74ce"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"path": ".mdkg/templates/default/manifest.md",
|
|
138
|
+
"category": "template",
|
|
139
|
+
"sha256": "2ff2af58cae6a0381a66949d7d9e997fac6486da85171b09096c43663889da95"
|
|
135
140
|
},
|
|
136
141
|
{
|
|
137
142
|
"path": ".mdkg/templates/default/prd.md",
|
|
@@ -166,17 +171,17 @@
|
|
|
166
171
|
{
|
|
167
172
|
"path": ".mdkg/templates/default/spike.md",
|
|
168
173
|
"category": "template",
|
|
169
|
-
"sha256": "
|
|
174
|
+
"sha256": "56e881fad20bd4fda8ae53cc78ce6f30f4dacd083f4eda40f9f2ba3723d52e0e"
|
|
170
175
|
},
|
|
171
176
|
{
|
|
172
177
|
"path": ".mdkg/templates/default/task.md",
|
|
173
178
|
"category": "template",
|
|
174
|
-
"sha256": "
|
|
179
|
+
"sha256": "2db6e56298b22e9da9121e2ac31f2fd68e370211218c5bcaae1014a9e63b7cde"
|
|
175
180
|
},
|
|
176
181
|
{
|
|
177
182
|
"path": ".mdkg/templates/default/test.md",
|
|
178
183
|
"category": "template",
|
|
179
|
-
"sha256": "
|
|
184
|
+
"sha256": "59484d4cf397707d738ccbc2f788c08eab58d3d73f37591f7bde8f1533b828ce"
|
|
180
185
|
},
|
|
181
186
|
{
|
|
182
187
|
"path": ".mdkg/templates/default/work_order.md",
|
|
@@ -193,51 +198,101 @@
|
|
|
193
198
|
"category": "template",
|
|
194
199
|
"sha256": "08a1bd65297173a1dc9df95776775d406337a419d4bc51863593b6f28777ebdb"
|
|
195
200
|
},
|
|
201
|
+
{
|
|
202
|
+
"path": ".mdkg/templates/specs/agent.MANIFEST.md",
|
|
203
|
+
"category": "template",
|
|
204
|
+
"sha256": "79fb755c95747d3f673e1333ec3f039d08f76488ba268b7fa32f457d8638ee64"
|
|
205
|
+
},
|
|
196
206
|
{
|
|
197
207
|
"path": ".mdkg/templates/specs/agent.SPEC.md",
|
|
198
208
|
"category": "template",
|
|
199
209
|
"sha256": "dab10c0ed12aa10a752ee3bd61f263065644826eb950c71a9e3458673edb0ca5"
|
|
200
210
|
},
|
|
211
|
+
{
|
|
212
|
+
"path": ".mdkg/templates/specs/api.MANIFEST.md",
|
|
213
|
+
"category": "template",
|
|
214
|
+
"sha256": "dd342ab2bd331b716e4b7de9f8c7cfa503703422a4cc88c21fe90ff49b11aa83"
|
|
215
|
+
},
|
|
201
216
|
{
|
|
202
217
|
"path": ".mdkg/templates/specs/api.SPEC.md",
|
|
203
218
|
"category": "template",
|
|
204
219
|
"sha256": "aee86cadcca31a5a015d7e15ad7503c4aa30f2af0079ec03f857b82b3ecbae59"
|
|
205
220
|
},
|
|
221
|
+
{
|
|
222
|
+
"path": ".mdkg/templates/specs/base.MANIFEST.md",
|
|
223
|
+
"category": "template",
|
|
224
|
+
"sha256": "056c4ccf8285db72c8befdc6acd165d625dbe892d70e89ce586f081db8e250fc"
|
|
225
|
+
},
|
|
206
226
|
{
|
|
207
227
|
"path": ".mdkg/templates/specs/base.SPEC.md",
|
|
208
228
|
"category": "template",
|
|
209
229
|
"sha256": "6d4171fac00c2f3d8f2a2ac746b8a47c59aaecebe224c3a0046dd6e6974a1d08"
|
|
210
230
|
},
|
|
231
|
+
{
|
|
232
|
+
"path": ".mdkg/templates/specs/capability.MANIFEST.md",
|
|
233
|
+
"category": "template",
|
|
234
|
+
"sha256": "0ab2c2f90c6bdcddaafd77ac6cc36422d6ee10cc935942d8f80728f5b184d5cc"
|
|
235
|
+
},
|
|
211
236
|
{
|
|
212
237
|
"path": ".mdkg/templates/specs/capability.SPEC.md",
|
|
213
238
|
"category": "template",
|
|
214
239
|
"sha256": "68a91e8bbd80d1ff1972e4c31e29f26451d5a1be1d25d414170fdd670010066f"
|
|
215
240
|
},
|
|
241
|
+
{
|
|
242
|
+
"path": ".mdkg/templates/specs/integration.MANIFEST.md",
|
|
243
|
+
"category": "template",
|
|
244
|
+
"sha256": "7af890bdac5515600661c241dd488c2bc270248ae6fba9afb0307d7a643022a4"
|
|
245
|
+
},
|
|
216
246
|
{
|
|
217
247
|
"path": ".mdkg/templates/specs/integration.SPEC.md",
|
|
218
248
|
"category": "template",
|
|
219
249
|
"sha256": "e907ce6ebc1fa5a455e31e39036e3f8699dccb3d9e45288c8ea025eaec4ca4a2"
|
|
220
250
|
},
|
|
251
|
+
{
|
|
252
|
+
"path": ".mdkg/templates/specs/model.MANIFEST.md",
|
|
253
|
+
"category": "template",
|
|
254
|
+
"sha256": "3fe36a424b6eba8542bd08d3e2728ffd7f35d2c72037f2e565757cea15da2e1f"
|
|
255
|
+
},
|
|
221
256
|
{
|
|
222
257
|
"path": ".mdkg/templates/specs/model.SPEC.md",
|
|
223
258
|
"category": "template",
|
|
224
259
|
"sha256": "56061a241819dfda4d3022c075f744cf6650f5f52c58cd15b0af9d1f613af4f2"
|
|
225
260
|
},
|
|
261
|
+
{
|
|
262
|
+
"path": ".mdkg/templates/specs/project.MANIFEST.md",
|
|
263
|
+
"category": "template",
|
|
264
|
+
"sha256": "e1f68306a9cff3d73e65a2fea38d52b49dd76921b5d7c7ea9710eb2c23cb6f89"
|
|
265
|
+
},
|
|
226
266
|
{
|
|
227
267
|
"path": ".mdkg/templates/specs/project.SPEC.md",
|
|
228
268
|
"category": "template",
|
|
229
269
|
"sha256": "386c41852cbb46e7a6ba583a7b0c4126262a56618d8e214aaa601b68d55818b9"
|
|
230
270
|
},
|
|
271
|
+
{
|
|
272
|
+
"path": ".mdkg/templates/specs/runtime-agent.MANIFEST.md",
|
|
273
|
+
"category": "template",
|
|
274
|
+
"sha256": "4ba2013362597f101fb225bc6a3369a47a0c1cac3de78220efea4e53d42f0393"
|
|
275
|
+
},
|
|
231
276
|
{
|
|
232
277
|
"path": ".mdkg/templates/specs/runtime-agent.SPEC.md",
|
|
233
278
|
"category": "template",
|
|
234
279
|
"sha256": "53af7c3e172f5ed1297f340aca0be5e53302613d2e6bb9145915067d7b0004c8"
|
|
235
280
|
},
|
|
281
|
+
{
|
|
282
|
+
"path": ".mdkg/templates/specs/runtime-image.MANIFEST.md",
|
|
283
|
+
"category": "template",
|
|
284
|
+
"sha256": "098debed22f274c9f408defcf330ef27c760e1a3166876f2a6e16cb28cfb4757"
|
|
285
|
+
},
|
|
236
286
|
{
|
|
237
287
|
"path": ".mdkg/templates/specs/runtime-image.SPEC.md",
|
|
238
288
|
"category": "template",
|
|
239
289
|
"sha256": "37416b045cd7733d1f5e1cc629ac9b6616024d5fa52f2bdcd90110267151e593"
|
|
240
290
|
},
|
|
291
|
+
{
|
|
292
|
+
"path": ".mdkg/templates/specs/tool.MANIFEST.md",
|
|
293
|
+
"category": "template",
|
|
294
|
+
"sha256": "79e45600a3b83d70e2791cbdff0138b57018a30b7e277d9017b7ba142deccb91"
|
|
295
|
+
},
|
|
241
296
|
{
|
|
242
297
|
"path": ".mdkg/templates/specs/tool.SPEC.md",
|
|
243
298
|
"category": "template",
|
|
@@ -246,7 +301,7 @@
|
|
|
246
301
|
{
|
|
247
302
|
"path": "AGENT_START.md",
|
|
248
303
|
"category": "startup_doc",
|
|
249
|
-
"sha256": "
|
|
304
|
+
"sha256": "0d3bb2f9ea156f53c1bf68595e591578caadc18d296fa919e71ea1a3d9a968e8"
|
|
250
305
|
},
|
|
251
306
|
{
|
|
252
307
|
"path": "AGENTS.md",
|
|
@@ -261,7 +316,7 @@
|
|
|
261
316
|
{
|
|
262
317
|
"path": "CLI_COMMAND_MATRIX.md",
|
|
263
318
|
"category": "startup_doc",
|
|
264
|
-
"sha256": "
|
|
319
|
+
"sha256": "8f426fd8da402b4b550b71e7ec3882c614ceb2d79d23c47b9c27bca7e39fadb2"
|
|
265
320
|
},
|
|
266
321
|
{
|
|
267
322
|
"path": "llms.txt",
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
id: {{id}}
|
|
3
3
|
type: checkpoint
|
|
4
4
|
title: {{title}}
|
|
5
|
+
checkpoint_kind: {{checkpoint_kind}}
|
|
5
6
|
status: {{status}}
|
|
6
7
|
priority: {{priority}}
|
|
7
8
|
epic: {{epic}}
|
|
@@ -16,6 +17,8 @@ relates: []
|
|
|
16
17
|
blocked_by: []
|
|
17
18
|
blocks: []
|
|
18
19
|
refs: []
|
|
20
|
+
context_refs: []
|
|
21
|
+
evidence_refs: []
|
|
19
22
|
aliases: []
|
|
20
23
|
skills: []
|
|
21
24
|
scope: []
|
|
@@ -8,6 +8,7 @@ goal_state: {{goal_state}}
|
|
|
8
8
|
goal_condition: {{goal_condition}}
|
|
9
9
|
scope_refs: []
|
|
10
10
|
active_node: {{active_node}}
|
|
11
|
+
last_active_node: {{last_active_node}}
|
|
11
12
|
required_skills: []
|
|
12
13
|
required_checks: []
|
|
13
14
|
max_iterations: {{max_iterations}}
|
|
@@ -24,6 +25,8 @@ relates: []
|
|
|
24
25
|
blocked_by: []
|
|
25
26
|
blocks: []
|
|
26
27
|
refs: []
|
|
28
|
+
context_refs: []
|
|
29
|
+
evidence_refs: []
|
|
27
30
|
aliases: []
|
|
28
31
|
skills: []
|
|
29
32
|
created: {{created}}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: {{id}}
|
|
3
|
+
type: manifest
|
|
4
|
+
title: {{title}}
|
|
5
|
+
version: 0.1.0
|
|
6
|
+
spec_kind: capability
|
|
7
|
+
role: tool_service
|
|
8
|
+
runtime_mode: tool_service
|
|
9
|
+
work_contracts: []
|
|
10
|
+
requested_capabilities: []
|
|
11
|
+
skill_refs: []
|
|
12
|
+
tool_refs: []
|
|
13
|
+
model_refs: []
|
|
14
|
+
wasm_component_refs: []
|
|
15
|
+
runtime_image_refs: []
|
|
16
|
+
subagent_refs: []
|
|
17
|
+
resource_profile: local_cli
|
|
18
|
+
update_policy: manual
|
|
19
|
+
tags: []
|
|
20
|
+
owners: []
|
|
21
|
+
links: []
|
|
22
|
+
artifacts: []
|
|
23
|
+
relates: []
|
|
24
|
+
refs: []
|
|
25
|
+
aliases: []
|
|
26
|
+
created: {{created}}
|
|
27
|
+
updated: {{updated}}
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
# Purpose
|
|
31
|
+
|
|
32
|
+
Define the reusable capability surface.
|
|
33
|
+
|
|
34
|
+
# Runtime
|
|
35
|
+
|
|
36
|
+
Describe the role, runtime mode, resource profile, and update policy.
|
|
37
|
+
|
|
38
|
+
# Work Contracts
|
|
39
|
+
|
|
40
|
+
List related WORK.md contracts.
|
|
41
|
+
|
|
42
|
+
# Capabilities
|
|
43
|
+
|
|
44
|
+
List requested capabilities and the authority/resource constraints that govern
|
|
45
|
+
use.
|