mdkg 0.3.7 → 0.3.9

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 (53) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/CLI_COMMAND_MATRIX.md +85 -24
  3. package/README.md +51 -26
  4. package/dist/cli.js +72 -35
  5. package/dist/command-contract.json +354 -9
  6. package/dist/commands/capability.js +1 -0
  7. package/dist/commands/doctor.js +7 -7
  8. package/dist/commands/format.js +40 -1
  9. package/dist/commands/handoff.js +6 -0
  10. package/dist/commands/init.js +84 -3
  11. package/dist/commands/new.js +12 -3
  12. package/dist/commands/skill.js +1 -1
  13. package/dist/commands/skill_mirror.js +22 -17
  14. package/dist/commands/skill_support.js +1 -1
  15. package/dist/commands/spec.js +76 -17
  16. package/dist/commands/subgraph.js +7 -4
  17. package/dist/commands/upgrade.js +137 -30
  18. package/dist/commands/validate.js +106 -3
  19. package/dist/commands/work.js +12 -5
  20. package/dist/core/config.js +132 -0
  21. package/dist/graph/agent_file_types.js +59 -20
  22. package/dist/graph/capabilities_indexer.js +45 -3
  23. package/dist/graph/indexer.js +5 -0
  24. package/dist/graph/template_schema.js +37 -17
  25. package/dist/graph/validate_graph.js +11 -5
  26. package/dist/init/AGENT_START.md +10 -9
  27. package/dist/init/CLI_COMMAND_MATRIX.md +30 -17
  28. package/dist/init/README.md +11 -9
  29. package/dist/init/config.json +15 -0
  30. package/dist/init/core/COLLABORATION.md +45 -0
  31. package/dist/init/core/HUMAN.md +7 -1
  32. package/dist/init/core/core.md +1 -0
  33. package/dist/init/core/rule-1-mdkg-conventions.md +3 -0
  34. package/dist/init/core/rule-3-cli-contract.md +5 -5
  35. package/dist/init/init-manifest.json +78 -13
  36. package/dist/init/llms.txt +2 -1
  37. package/dist/init/skills/default/author-mdkg-skill/SKILL.md +211 -0
  38. package/dist/init/skills/default/pursue-mdkg-goal/SKILL.md +10 -0
  39. package/dist/init/skills/default/select-work-and-ground-context/SKILL.md +8 -0
  40. package/dist/init/skills/default/verify-close-and-checkpoint/SKILL.md +73 -9
  41. package/dist/init/templates/default/manifest.md +45 -0
  42. package/dist/init/templates/specs/agent.MANIFEST.md +80 -0
  43. package/dist/init/templates/specs/api.MANIFEST.md +33 -0
  44. package/dist/init/templates/specs/base.MANIFEST.md +120 -0
  45. package/dist/init/templates/specs/capability.MANIFEST.md +45 -0
  46. package/dist/init/templates/specs/integration.MANIFEST.md +25 -0
  47. package/dist/init/templates/specs/model.MANIFEST.md +21 -0
  48. package/dist/init/templates/specs/project.MANIFEST.md +39 -0
  49. package/dist/init/templates/specs/runtime-agent.MANIFEST.md +49 -0
  50. package/dist/init/templates/specs/runtime-image.MANIFEST.md +21 -0
  51. package/dist/init/templates/specs/tool.MANIFEST.md +25 -0
  52. package/dist/util/argparse.js +3 -0
  53. package/package.json +19 -3
@@ -0,0 +1,21 @@
1
+ ---
2
+ extends: base.MANIFEST.md
3
+ template_kind: model
4
+ spec_kind: model
5
+ ---
6
+
7
+ # Model Identity
8
+
9
+ Provider, model id, version, and intended use.
10
+
11
+ # Capabilities
12
+
13
+ - Reasoning, coding, browsing, vision, tool-use, or structured-output needs.
14
+
15
+ # Policy Context
16
+
17
+ - Data classes, retention, privacy, and allowed prompts.
18
+
19
+ # Evaluation Checks
20
+
21
+ - Task families, quality gates, and regression criteria.
@@ -0,0 +1,39 @@
1
+ ---
2
+ extends: base.MANIFEST.md
3
+ template_kind: project
4
+ spec_kind: project_service
5
+ ---
6
+
7
+ # Project Role
8
+
9
+ Describe the repo/service responsibility and non-authorities.
10
+
11
+ # Canonical Repo
12
+
13
+ - Local path:
14
+ - Remote:
15
+ - Default branch:
16
+
17
+ # Owned Capabilities
18
+
19
+ - Capability ids and optional generic capability URIs.
20
+
21
+ # Project-Agent Boundary
22
+
23
+ - Graph writes owned by this project.
24
+ - Read-only surfaces exposed to parent or sibling orchestrators.
25
+ - Queue/event surfaces accepted from external orchestrators.
26
+
27
+ # Single-Writer Policy
28
+
29
+ - Project writer key.
30
+ - Branch or graph write policy.
31
+ - Accepted receipt before external refresh.
32
+
33
+ # Integration Boundaries
34
+
35
+ - Upstream/downstream repos and APIs.
36
+
37
+ # Validation Checks
38
+
39
+ - Build, test, mdkg, security, and release gates.
@@ -0,0 +1,49 @@
1
+ ---
2
+ extends: agent.MANIFEST.md
3
+ template_kind: runtime_agent
4
+ spec_kind: runtime_agent
5
+ ---
6
+
7
+ # Queue Ownership
8
+
9
+ - Orchestrator queue and per-agent queue responsibilities.
10
+
11
+ # Trigger Kinds
12
+
13
+ - User message, scheduled job, API event, mdkg queue event, runtime event, or
14
+ internal retry.
15
+
16
+ # Sandbox Requirements
17
+
18
+ - Lease refs, workspace bounds, cleanup, and metering requirements.
19
+
20
+ # SecretGrant Requirements
21
+
22
+ - Opaque refs and allowed consumers only.
23
+
24
+ # Single-Writer Keys
25
+
26
+ - Repo, graph, branch, or room keys that serialize writes.
27
+
28
+ # Receipt Lifecycle
29
+
30
+ - TriggerEvent contract.
31
+ - AgentRun contract.
32
+ - AttemptReceipt contract.
33
+ - ValidationReceipt contract.
34
+ - FinalReceipt contract.
35
+
36
+ # Cancellation And Retry
37
+
38
+ - Cancellation, retry, backoff, dead-letter, and finalization policy.
39
+
40
+ # Telemetry Policy
41
+
42
+ - Aggregate-safe stats and improvement proposals only unless a runtime spec says
43
+ otherwise.
44
+
45
+ # Projection Targets
46
+
47
+ - Local runtime agent manifest.
48
+ - Workflow/runtime protocol manifest.
49
+ - Downstream agent manifest owned outside mdkg canonical source.
@@ -0,0 +1,21 @@
1
+ ---
2
+ extends: base.MANIFEST.md
3
+ template_kind: runtime_image
4
+ spec_kind: runtime_image
5
+ ---
6
+
7
+ # Runtime Image
8
+
9
+ Image name, digest policy, base image, and supported commands.
10
+
11
+ # Resource Profile
12
+
13
+ - CPU, memory, storage, network, and sandbox assumptions.
14
+
15
+ # Secrets And Mounts
16
+
17
+ - Opaque refs only; no raw secret values.
18
+
19
+ # Conformance Checks
20
+
21
+ - Build, scan, smoke, and cleanup proof.
@@ -0,0 +1,25 @@
1
+ ---
2
+ extends: base.MANIFEST.md
3
+ template_kind: tool
4
+ spec_kind: tool
5
+ ---
6
+
7
+ # Tool Identity
8
+
9
+ Name, command/API surface, and owner.
10
+
11
+ # Allowed Operations
12
+
13
+ - Operations and parameters.
14
+
15
+ # Required Policy Context
16
+
17
+ - Auth, sandbox, path, network, and secret boundaries.
18
+
19
+ # Failure Modes
20
+
21
+ - Expected errors and retry behavior.
22
+
23
+ # Audit Events
24
+
25
+ - Events or receipts emitted by tool use.
@@ -15,7 +15,9 @@ const VALUE_FLAGS = new Set([
15
15
  "--edges",
16
16
  "--format",
17
17
  "--out",
18
+ "--json-out",
18
19
  "--output",
20
+ "--limit",
19
21
  "--relates",
20
22
  "--scope",
21
23
  "--blocked-by",
@@ -123,6 +125,7 @@ const BOOLEAN_FLAGS = new Set([
123
125
  "--dry-run",
124
126
  "--apply",
125
127
  "--json",
128
+ "--summary",
126
129
  "--xml",
127
130
  "--toon",
128
131
  "--md",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mdkg",
3
- "version": "0.3.7",
4
- "description": "Markdown Knowledge Graph",
3
+ "version": "0.3.9",
4
+ "description": "Git-native project memory for AI coding agents",
5
5
  "license": "MIT",
6
6
  "bin": {
7
7
  "mdkg": "dist/cli.js"
@@ -35,7 +35,23 @@
35
35
  "smoke:semantic-refs": "npm run build && node scripts/smoke-semantic-refs.js",
36
36
  "smoke:checkpoint-templates": "npm run build && node scripts/smoke-checkpoint-templates.js",
37
37
  "smoke:handoff": "npm run build && node scripts/smoke-handoff.js",
38
+ "smoke:warning-ux": "npm run build && node scripts/smoke-warning-ux.js",
38
39
  "smoke:integration-ux": "npm run build && node scripts/smoke-integration-ux.js",
40
+ "docs:generate": "npm run build && node scripts/generate-docs-reference.js --write && node scripts/generate-release-notes-data.js --write",
41
+ "docs:release-notes": "node scripts/generate-release-notes-data.js --write",
42
+ "docs:release-notes:check": "node scripts/generate-release-notes-data.js --check",
43
+ "docs:check": "npm run build && node scripts/generate-docs-reference.js --check && node scripts/generate-release-notes-data.js --check && node scripts/check-doc-command-examples.js",
44
+ "docs:check-commands": "npm run build && node scripts/check-doc-command-examples.js",
45
+ "smoke:mdkg-dev": "npm run build && node scripts/smoke-mdkg-dev.js",
46
+ "smoke:mdkg-dev-docs": "npm run build && node scripts/smoke-mdkg-dev-docs.js",
47
+ "smoke:mdkg-dev-seo": "npm run build && node scripts/smoke-mdkg-dev-seo.js",
48
+ "smoke:mdkg-dev-polish-pass2": "npm run build && node scripts/smoke-mdkg-dev-polish-pass2.js",
49
+ "smoke:mdkg-dev-polish-pass3": "npm run build && node scripts/smoke-mdkg-dev-polish-pass3.js",
50
+ "smoke:mdkg-dev-polish-pass4": "npm run build && node scripts/smoke-mdkg-dev-polish-pass4.js",
51
+ "smoke:mdkg-dev-polish-pass5": "npm run build && node scripts/smoke-mdkg-dev-polish-pass5.js",
52
+ "smoke:mdkg-dev-a11y": "npm run build && node scripts/smoke-mdkg-dev-a11y.js",
53
+ "smoke:mdkg-dev-perf": "npm run build && node scripts/smoke-mdkg-dev-perf.js",
54
+ "smoke:demo-graph": "npm run build && node scripts/smoke-demo-graph.js",
39
55
  "smoke:bundle": "npm run build && node scripts/smoke-bundle.js",
40
56
  "smoke:graph-clone": "npm run build && node scripts/smoke-graph-clone.js",
41
57
  "smoke:mcp": "npm run build && node scripts/smoke-mcp.js",
@@ -48,7 +64,7 @@
48
64
  "cli:check": "npm run build && node scripts/cli_help_snapshot.js --check",
49
65
  "cli:contract": "npm run build && node scripts/generate-command-contract.js --check",
50
66
  "prepack": "npm run build && node scripts/assert-publish-ready.js",
51
- "prepublishOnly": "npm run test && npm run cli:check && npm run cli:contract && node dist/cli.js validate && npm run smoke:consumer && npm run smoke:matrix && npm run smoke:upgrade && npm run smoke:init && npm run smoke:capabilities && npm run smoke:db && npm run smoke:db-queue && npm run smoke:db-queue-cli && npm run smoke:db-events && npm run smoke:db-materializer && npm run smoke:db-snapshot && npm run smoke:archive-work && npm run smoke:work-invocation && npm run smoke:cli-ux-polish && npm run smoke:operator-health && npm run smoke:fix-plan && npm run smoke:branch-conflicts && npm run smoke:id-repair && npm run smoke:command-docs && npm run smoke:spike && npm run smoke:goal-lifecycle && npm run smoke:semantic-refs && npm run smoke:checkpoint-templates && npm run smoke:handoff && npm run smoke:integration-ux && npm run smoke:bundle && npm run smoke:graph-clone && npm run smoke:mcp && npm run smoke:subgraph && npm run smoke:visibility && npm run smoke:sqlite && npm run smoke:parallel && npm run smoke:goal && node scripts/assert-publish-ready.js",
67
+ "prepublishOnly": "npm run test && npm run cli:check && npm run cli:contract && npm run docs:check && node dist/cli.js validate && npm run smoke:consumer && npm run smoke:matrix && npm run smoke:upgrade && npm run smoke:init && npm run smoke:capabilities && npm run smoke:db && npm run smoke:db-queue && npm run smoke:db-queue-cli && npm run smoke:db-events && npm run smoke:db-materializer && npm run smoke:db-snapshot && npm run smoke:archive-work && npm run smoke:work-invocation && npm run smoke:cli-ux-polish && npm run smoke:operator-health && npm run smoke:fix-plan && npm run smoke:branch-conflicts && npm run smoke:id-repair && npm run smoke:command-docs && npm run smoke:spike && npm run smoke:goal-lifecycle && npm run smoke:semantic-refs && npm run smoke:checkpoint-templates && npm run smoke:handoff && npm run smoke:warning-ux && npm run smoke:integration-ux && npm run smoke:mdkg-dev && npm run smoke:mdkg-dev-docs && npm run smoke:mdkg-dev-seo && npm run smoke:mdkg-dev-polish-pass2 && npm run smoke:mdkg-dev-polish-pass3 && npm run smoke:mdkg-dev-polish-pass4 && npm run smoke:mdkg-dev-polish-pass5 && npm run smoke:mdkg-dev-a11y && npm run smoke:mdkg-dev-perf && npm run smoke:demo-graph && npm run smoke:bundle && npm run smoke:graph-clone && npm run smoke:mcp && npm run smoke:subgraph && npm run smoke:visibility && npm run smoke:sqlite && npm run smoke:parallel && npm run smoke:goal && node scripts/assert-publish-ready.js",
52
68
  "postinstall": "node scripts/postinstall.js",
53
69
  "smoke:subgraph": "npm run build && node scripts/smoke-subgraph.js"
54
70
  },