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,211 @@
1
+ ---
2
+ name: author-mdkg-skill
3
+ description: Create or update an mdkg SKILL.md or MANIFEST.md when a repeatable workflow, capability, agent, tool, runtime, API, or projection contract should become durable mdkg-authored knowledge.
4
+ tags: [stage:plan, writer:orchestrator, mdkg, skills, authoring]
5
+ version: 0.2.0
6
+ authors: [mdkg]
7
+ links: [AGENT_START.md, CLI_COMMAND_MATRIX.md, .mdkg/design/edd-5-mdkg-skills-integration-guide-v0-4-agent-skills-standard-and-packs.md]
8
+ ---
9
+
10
+ # Goal
11
+
12
+ Create or update focused mdkg-authored SKILL.md and MANIFEST.md assets that make
13
+ repeatable workflows and durable capabilities explicit without creating
14
+ duplicated procedures or projection-only behavior.
15
+
16
+ ## When To Use
17
+
18
+ - When a repo workflow is repeated often enough to deserve a reusable skill
19
+ - When an existing skill no longer matches the current command surface or docs
20
+ - When a builder asks to codify a procedure for future humans or agents
21
+ - When a capability, agent, tool, runtime image, API, model, or integration
22
+ needs a durable MANIFEST before it is projected into a runtime-specific config
23
+ - When `.codex/agents` or another projection surface contains behavior that
24
+ should be mirrored into durable mdkg/MANIFEST/SKILL state
25
+
26
+ ## Inputs
27
+
28
+ - Repo root
29
+ - Workflow trigger and desired outcome
30
+ - Any existing related skills, docs, or command references
31
+ - Candidate capability, resource, agent, tool, runtime, API, model, or
32
+ integration boundary
33
+ - Source mdkg nodes and intended projection targets, if any
34
+
35
+ ## Required Output Sections
36
+
37
+ For SKILL.md output, include:
38
+
39
+ - Purpose
40
+ - When to use
41
+ - Inputs
42
+ - Outputs
43
+ - Required capabilities
44
+ - Resources touched
45
+ - Steps
46
+ - Validation checks
47
+ - Closeout evidence
48
+ - Failure modes
49
+ - Safety rules
50
+ - Related manifests
51
+ - Projection targets
52
+ - Open questions
53
+
54
+ For MANIFEST.md output, include:
55
+
56
+ - Identity
57
+ - Purpose
58
+ - Scope
59
+ - Non-goals
60
+ - Status
61
+ - Owners
62
+ - Source mdkg nodes
63
+ - Resource URIs
64
+ - Capabilities
65
+ - Inputs
66
+ - Outputs
67
+ - Dependencies
68
+ - Security boundaries
69
+ - Validation checks
70
+ - Closeout evidence
71
+ - Projection targets
72
+ - Versioning
73
+ - Change policy
74
+ - Open questions
75
+
76
+ ## Steps
77
+
78
+ 1. Check for an existing fit first with `mdkg skill list`, `mdkg skill search`, and `mdkg skill show <slug>`.
79
+ 2. If an existing skill already covers the workflow, update it instead of creating a near-duplicate.
80
+ 3. If a manifest already covers the capability, update that MANIFEST or create a
81
+ repair task instead of adding behavior only to a projection file.
82
+ 4. Use existing templates from `.mdkg/templates/skills/` and
83
+ `.mdkg/templates/specs/` before proposing a new template family.
84
+ 5. If the workflow is really task mutation or event provenance, prefer teaching
85
+ `mdkg task ...` and `mdkg event ...` for structured fields while still
86
+ allowing markdown narrative edits where they fit better.
87
+ 6. If a new skill is justified, scaffold it with
88
+ `mdkg skill new <slug> "<name>" --description "..."`.
89
+ 7. Write the description so it says both what the skill does and when to use it.
90
+ 8. Add only the minimum tags needed for discovery, including the correct
91
+ `stage:*` tag and a single `writer:*` tag.
92
+ 9. Keep the body concise and procedural; move detailed reference material into
93
+ `references/` only when needed.
94
+ 10. Distinguish durable source from projection:
95
+ mdkg/MANIFEST/SKILL is source; `.codex/agents`, future runtime manifests, and
96
+ protocol resources are projections.
97
+ 11. Add validation checks and closeout evidence to every authored or revised
98
+ SKILL/MANIFEST.
99
+ 12. If input is incomplete, create repair tasks instead of guessing.
100
+ 13. Validate the new or updated skill with `mdkg skill validate <slug>`.
101
+ 14. If the skill changes the public workflow, update `AGENT_START.md`,
102
+ `CLI_COMMAND_MATRIX.md`, root onboarding docs, and the skill registry in the
103
+ same pass.
104
+ 15. When mirrored skill folders are enabled, run `mdkg skill sync` after broad
105
+ manual changes so every configured `.mdkg/config.json`
106
+ `customization.skill_mirrors.targets` path stays current. The default
107
+ targets are `.agents/skills/` and `.claude/skills/`; other agent-local
108
+ skill roots may be configured by the repo.
109
+
110
+ ## Outputs
111
+
112
+ - One valid `SKILL.md` using the mdkg canonical section shape
113
+ - One valid `MANIFEST.md` when the work is a durable capability, agent, project,
114
+ tool, runtime, API, model, or integration contract
115
+ - Any needed `references/`, `assets/`, or opt-in `scripts/` scaffolding
116
+ - Updated docs and registry entries when the workflow surface changed
117
+ - Repair tasks for weak, missing, ambiguous, projection-only, or unsafe input
118
+ - Validation and closeout evidence sufficient for a future agent to trust the
119
+ asset
120
+
121
+ ## Required Capabilities
122
+
123
+ - mdkg skill discovery
124
+ - mdkg capability discovery
125
+ - Markdown frontmatter and body authoring
126
+ - source/projection boundary review
127
+ - validation and closeout evidence review
128
+
129
+ ## Resources Touched
130
+
131
+ - `.mdkg/skills/<slug>/SKILL.md`
132
+ - `.mdkg/templates/skills/`
133
+ - `.mdkg/templates/specs/`
134
+ - relevant `MANIFEST.md` nodes or template files, with legacy `SPEC.md`
135
+ references retained only for compatibility
136
+ - configured mirrored skill roots only through `mdkg skill sync`
137
+
138
+ ## Validation Checks
139
+
140
+ - `mdkg skill validate <slug>`
141
+ - `mdkg skill sync --json` when mirror targets are present
142
+ - `mdkg capability search "<skill or manifest concept>" --json`
143
+ - `mdkg validate --changed-only --json`
144
+ - `mdkg validate`
145
+ - Template coverage check when template files are changed
146
+ - Projection validation report when `.codex/agents` or another projection
147
+ target is involved
148
+
149
+ ## Closeout Evidence
150
+
151
+ - Changed skill or MANIFEST paths
152
+ - Checks run and results
153
+ - Related mdkg nodes
154
+ - Projection targets reviewed
155
+ - Repair tasks created for incomplete inputs
156
+ - Explicit note that no generator/exporter was implemented unless selected work
157
+ asked for it
158
+
159
+ ## Safety Rules
160
+
161
+ - Do not create skills for one-off tasks or vague advice.
162
+ - Prefer repo truth over chat memory when deciding the skill body and examples.
163
+ - Do not add `scripts/` unless instructions are insufficient and deterministic execution really needs them.
164
+ - Only the durable writer stage should commit the new or updated skill.
165
+ - mdkg indexes and discovers skills, but does not execute skill scripts.
166
+ - Do not treat `.codex/agents`, future runtime manifests, or package exports as
167
+ durable source of truth.
168
+ - Do not create new `SPEC.md` capability docs; use `MANIFEST.md`. Keep legacy
169
+ `SPEC.md` references only when documenting compatibility or migration repair.
170
+ - Do not export secrets, provider credentials, raw auth state, production
171
+ controls, wallet/ledger state, or local-only user paths into templates or
172
+ projections.
173
+ - Do not create a skill-factory-agent until SKILL/MANIFEST templates and projection
174
+ doctrine are stable.
175
+ - Optional `draft_uri` fields are future-facing hints, not finalized protocol
176
+ semantics. Use generic examples such as `capability://repo.inspect` or
177
+ `mdkg://capability/repo.inspect` in canonical mdkg templates.
178
+ - Do not use downstream product names or product-specific URI schemes as public
179
+ mdkg template examples.
180
+
181
+ ## Failure Handling
182
+
183
+ - If the trigger or writer role is unclear, stop and resolve that before authoring the skill.
184
+ - If multiple skills overlap, merge or narrow them instead of creating redundant procedures.
185
+ - If the workflow still feels too broad, split it into smaller skills before finalizing.
186
+ - If durable behavior exists only in a projection file, create or update a MANIFEST
187
+ and record projection repair work.
188
+ - If a requested template family is missing, propose a template backlog task
189
+ before inventing a one-off shape.
190
+ - If validation cannot run, record the exact blocker and keep the work open.
191
+
192
+ ## Related Manifests
193
+
194
+ - Future `agent.*` manifests for Codex and runtime agents
195
+ - Future capability, tool, model, runtime image, integration, and API manifests
196
+ - Root/child project manifests discovered through mdkg capability search
197
+
198
+ ## Projection Targets
199
+
200
+ - `.codex/agents` TOML
201
+ - future runtime agent manifests
202
+ - future workflow/runtime protocol resource and capability objects
203
+ - future workflow/runtime protocol definitions
204
+
205
+ ## Open Questions
206
+
207
+ - Which MANIFEST template families should be promoted into public seeded assets
208
+ first?
209
+ - Which projection fields should be generated versus manually maintained?
210
+ - What validation command should become the canonical MANIFEST template coverage
211
+ check?
@@ -46,6 +46,16 @@ Move one durable mdkg goal forward without losing scope, evidence, or user inten
46
46
  - Edit `SKILL.md` files only when the active node is explicitly skill-maintenance work.
47
47
  - After intentional skill edits, run `mdkg skill sync`, `mdkg skill validate`, `mdkg index`, and `mdkg validate`.
48
48
 
49
+ ## Multi-Repo And Subgraph Goals
50
+
51
+ - Gather read-only baselines before mutating any repo: git status, mdkg status, validation, doctor, and subgraph audit where relevant.
52
+ - Require one explicit matrix approval before applying coordinated upgrades across multiple repos.
53
+ - Apply and verify upgrades one repo at a time.
54
+ - Commit accepted child repo mdkg-only changes locally before refreshing a root-owned subgraph bundle.
55
+ - Refresh root-owned bundles only from clean, accepted child commits; avoid `--allow-dirty` unless the user explicitly approves that risk.
56
+ - Keep root-qualified qids in cross-repo planning so overlapping child ids stay unambiguous.
57
+ - Do not store raw secrets, tokens, provider payloads, raw prompts, or unrelated runtime payloads in graph state, checkpoints, or handoffs.
58
+
49
59
  ## Outputs
50
60
 
51
61
  - One active scoped work item at a time.
@@ -42,6 +42,14 @@ Choose the correct work item and load the smallest deterministic context needed
42
42
  - Clear understanding of the active task, related docs, and current state
43
43
  - No durable mdkg writes or commits from this stage
44
44
 
45
+ ## Multi-Repo Grounding
46
+
47
+ - For root/subgraph work, inspect the root graph and each child graph read-only before choosing a mutation target.
48
+ - Collect a small matrix with repo path, git status, mdkg version, status, validation result, doctor result, and selected goal state.
49
+ - Treat dirty child repos as ownership boundaries; ask before mutating them or before refreshing root bundles from them.
50
+ - Prefer root-qualified qids in packs, handoffs, and cross-repo blockers so same-number child ids cannot be confused.
51
+ - Use compact diagnostics when available: `mdkg validate --summary --json --limit 20`, `mdkg validate --changed-only --json`, and `mdkg format --headings --dry-run --summary --json --limit 20`.
52
+
45
53
  ## Safety
46
54
 
47
55
  - Do not start coding from chat memory alone.
@@ -45,15 +45,67 @@ Finish work with evidence, validation, and minimal memory drift.
45
45
 
46
46
  Use this local repo-only checklist before publishing mdkg:
47
47
 
48
- 1. Confirm package intent and version in `package.json`, `package-lock.json`, `README.md`, `CLI_COMMAND_MATRIX.md`, and `CHANGELOG.md`.
49
- 2. Confirm release-line intent before bumping: when a change crosses a capability-track boundary, prefer the next minor release line over patch-style continuation. For the current project DB track, follow `0.1.9 -> 0.2.0` rather than naming the next planned source line `0.1.10`.
50
- 3. Use a clean npm cache: `export NPM_CONFIG_CACHE=/private/tmp/mdkg-npm-cache`.
51
- 4. Run `npm ci`, `npm run build`, `node scripts/assert-publish-ready.js`, `npm run test`, `npm run cli: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:archive-work`, `npm run smoke:bundle`, `npm run smoke:subgraph`, and `npm run smoke:visibility`.
52
- 5. Run `npm pack --dry-run --json` and confirm the tarball includes `dist/cli.js`, compiled folders, `dist/init/`, release docs, and `scripts/postinstall.js`.
53
- 6. Confirm registry state with `npm view mdkg version --registry=https://registry.npmjs.org/`.
54
- 7. Publish only after the registry still shows the previous version and npm auth is known to have write access.
55
- 8. If publishing fails with 2FA or token policy errors, do not commit; fix npm auth or package policy, then rerun publish.
56
- 9. After successful publish, verify `npm view mdkg version` and `npm view mdkg dist-tags`, then commit the release changes.
48
+ 1. Confirm package intent and version in `package.json`, `package-lock.json`,
49
+ `README.md`, `CLI_COMMAND_MATRIX.md`, generated docs, and `CHANGELOG.md`.
50
+ 2. Map every publish-bound change in `origin/main..HEAD` to release notes. Treat
51
+ missing changelog coverage, stale public version strings, and generated-doc
52
+ drift as publish blockers, not cosmetic notes.
53
+ 3. Confirm release-line intent before bumping: when a change crosses a
54
+ capability-track boundary, prefer the next minor release line over patch-style
55
+ continuation.
56
+ 4. Use a clean npm cache path such as `/private/tmp/mdkg-npm-cache`.
57
+ 5. Run `npm ci`, `npm run build`, `node scripts/assert-publish-ready.js`,
58
+ `npm run test`, `npm run cli:check`, `npm run cli:contract`,
59
+ `npm run docs:check`, `node dist/cli.js validate --json`,
60
+ `node dist/cli.js validate --changed-only --json`, `npm run smoke:consumer`,
61
+ `npm run smoke:matrix`, `npm run smoke:upgrade`, `npm run smoke:init`,
62
+ `npm run smoke:capabilities`, `npm run smoke:archive-work`,
63
+ `npm run smoke:bundle`, `npm run smoke:bundle-import`,
64
+ `npm run smoke:subgraph`, and `npm run smoke:visibility`.
65
+ 6. Run `NPM_CONFIG_CACHE=/private/tmp/mdkg-npm-cache npm pack --dry-run --json`
66
+ and confirm the tarball includes `dist/cli.js`, compiled folders,
67
+ `dist/init/`, release docs, and `scripts/postinstall.js`.
68
+ 7. Run the publish dry-run before recommending publish readiness:
69
+
70
+ ```bash
71
+ NPM_CONFIG_CACHE=/private/tmp/mdkg-npm-cache npm publish --dry-run --registry=https://registry.npmjs.org/
72
+ ```
73
+
74
+ 8. Confirm registry state with these checks; readiness requires latest below the
75
+ target and the target version not already published:
76
+
77
+ ```bash
78
+ npm view mdkg version --registry=https://registry.npmjs.org/
79
+ npm view mdkg@<version> version --registry=https://registry.npmjs.org/
80
+ ```
81
+
82
+ 9. Stop with either a publish-readiness recommendation or an exact gaps list.
83
+ Do not run real `npm publish`, create a tag, or push release commits without
84
+ explicit user approval after the dry-run gates.
85
+ 10. When publishing with an exported `NPM_TOKEN`, create a temporary npm
86
+ userconfig that references the environment variable literally, then verify
87
+ auth before publish:
88
+
89
+ ```bash
90
+ printf '//registry.npmjs.org/:_authToken=${NPM_TOKEN}\nregistry=https://registry.npmjs.org/\n' > /private/tmp/mdkg-npm-publish.npmrc
91
+ NPM_CONFIG_CACHE=/private/tmp/mdkg-npm-cache npm whoami --registry=https://registry.npmjs.org/ --userconfig=/private/tmp/mdkg-npm-publish.npmrc
92
+ ```
93
+
94
+ Do not print the token, do not write the expanded token into committed files,
95
+ and do not add unsupported `always-auth` config.
96
+ 11. Publish only after explicit user approval, the registry still shows the
97
+ previous version, and npm auth is known to have write access. Use the
98
+ verified userconfig when relying on `NPM_TOKEN`:
99
+
100
+ ```bash
101
+ NPM_CONFIG_CACHE=/private/tmp/mdkg-npm-cache npm publish --registry=https://registry.npmjs.org/ --userconfig=/private/tmp/mdkg-npm-publish.npmrc
102
+ ```
103
+
104
+ 12. If publishing fails with 2FA, token policy, or permission errors, do not
105
+ commit; fix npm auth or package policy, then rerun publish.
106
+ 13. After successful publish, verify `npm view mdkg version`, `npm view mdkg dist-tags`,
107
+ and a temp-dir global install of the latest package before closing
108
+ post-publish validation.
57
109
 
58
110
  ## Bundle-Aware Commit Gate
59
111
 
@@ -68,6 +120,18 @@ mdkg bundle verify .mdkg/bundles/private/all.mdkg.zip
68
120
 
69
121
  Skip `mdkg archive compress --all` only when the repo has no `.mdkg/archive` sidecars. Skip bundle refresh only when the repo intentionally does not track `.mdkg/bundles/`. Use `--profile public` or `mdkg pack --visibility public` only for explicit export-safe output after public workspace, archive, and import visibility has been reviewed.
70
122
 
123
+ ## Multi-Repo Closeout Gate
124
+
125
+ Use this order for root orchestration, child repo upgrades, and subgraph refresh work:
126
+
127
+ 1. Gather read-only baselines for every involved repo before mutation.
128
+ 2. Get one explicit approval matrix for which repos may be updated.
129
+ 3. Apply and validate one repo at a time.
130
+ 4. Commit accepted child repo mdkg-only changes locally before root subgraph sync.
131
+ 5. Sync root-owned bundles only from clean child commits and record the child commit id in the root evidence.
132
+ 6. Run root subgraph audit or verify after bundle refresh.
133
+ 7. Keep handoffs refs-only and sanitized; never copy raw secrets, tokens, prompts, provider payloads, or unrelated raw runtime payloads into checkpoints or packs.
134
+
71
135
  ## Outputs
72
136
 
73
137
  - Verified mdkg graph state
@@ -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.
@@ -0,0 +1,80 @@
1
+ ---
2
+ extends: base.MANIFEST.md
3
+ template_kind: agent
4
+ spec_kind: agent
5
+ ---
6
+
7
+ # Agent Role
8
+
9
+ Define the durable agent role and trigger conditions.
10
+
11
+ Suggested generic roles:
12
+
13
+ - orchestrator agent.
14
+ - worker agent.
15
+ - reviewer agent.
16
+ - summarizer agent.
17
+ - graph/project agent.
18
+
19
+ # Trigger Conditions
20
+
21
+ - Human request.
22
+ - Graph work item.
23
+ - Queue event.
24
+ - Scheduled check.
25
+ - API or runtime event.
26
+
27
+ # Allowed Resources
28
+
29
+ - Resources the agent may read or write.
30
+
31
+ # Allowed Capabilities
32
+
33
+ - Capability ids and optional generic capability URIs.
34
+
35
+ # Forbidden Actions
36
+
37
+ - Actions this agent must never perform.
38
+
39
+ # Input Context
40
+
41
+ - Required room, goal, task, pack, or queue context.
42
+
43
+ # Output Contract
44
+
45
+ - Required report, patch, receipt, or handoff.
46
+
47
+ # Receipt / Evidence Contract
48
+
49
+ - Attempt, validation, and final evidence requirements.
50
+
51
+ # Queue / Event Semantics
52
+
53
+ - Accepted trigger events.
54
+ - AgentRun claim rules.
55
+ - AttemptReceipt requirements.
56
+ - ValidationReceipt requirements.
57
+ - FinalReceipt requirements.
58
+
59
+ # Single-Writer Policy
60
+
61
+ - The graph, repo, path, branch, queue, or work item key that serializes writes.
62
+
63
+ # Escalation Behavior
64
+
65
+ - When to stop, ask, or return a blocker.
66
+
67
+ # Failure Modes
68
+
69
+ - Ambiguous scope.
70
+ - Conflicting writers.
71
+ - Invalid or stale context.
72
+ - Validation failure.
73
+ - Missing final receipt.
74
+
75
+ # Projection Targets
76
+
77
+ - Tool-specific agent manifest.
78
+ - Future runtime agent manifest.
79
+ - Future workflow/runtime capability object.
80
+ - Future workflow/runtime agent definition.
@@ -0,0 +1,33 @@
1
+ ---
2
+ extends: base.MANIFEST.md
3
+ template_kind: api
4
+ spec_kind: api
5
+ ---
6
+
7
+ # Service Name
8
+
9
+ API or service identity.
10
+
11
+ # Methods
12
+
13
+ - Method name, request, response, and streaming behavior.
14
+
15
+ # Idempotency
16
+
17
+ - Idempotency keys and replay behavior.
18
+
19
+ # Auth
20
+
21
+ - Required principal, policy, and capability context.
22
+
23
+ # Errors
24
+
25
+ - Error taxonomy and fail-closed behavior.
26
+
27
+ # Versioning
28
+
29
+ - Package/version and compatibility policy.
30
+
31
+ # Conformance Tests
32
+
33
+ - Fixture and integration proof requirements.
@@ -0,0 +1,120 @@
1
+ ---
2
+ id: {{manifest_id}}
3
+ type: manifest
4
+ title: {{title}}
5
+ version: 0.1.0
6
+ spec_kind: capability
7
+ role: {{role}}
8
+ runtime_mode: {{runtime_mode}}
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: builder
18
+ update_policy: manual
19
+ tags: [manifest]
20
+ owners: []
21
+ links: []
22
+ artifacts: []
23
+ relates: []
24
+ refs: []
25
+ aliases: []
26
+ created: {{created}}
27
+ updated: {{updated}}
28
+ ---
29
+
30
+ # Identity
31
+
32
+ Name, stable id, owner, status, and source mdkg nodes.
33
+
34
+ # Purpose
35
+
36
+ What durable capability or contract this MANIFEST defines.
37
+
38
+ # Authority Boundary
39
+
40
+ Who or what is allowed to make decisions, mutate state, delegate work, or accept
41
+ evidence under this MANIFEST.
42
+
43
+ # Resource Boundary
44
+
45
+ Included behavior, resources, paths, graph nodes, queues, services, and
46
+ explicit non-authorities.
47
+
48
+ # Optional Resource URIs
49
+
50
+ - Optional generic draft URI: `resource://...`
51
+ - Optional mdkg draft URI: `mdkg://resource/...`
52
+
53
+ # Capabilities
54
+
55
+ - Capability id:
56
+ - Optional generic draft URI: `capability://...`
57
+ - Optional mdkg draft URI: `mdkg://capability/...`
58
+
59
+ # Queue / Event Semantics
60
+
61
+ - Trigger events accepted:
62
+ - Queue ownership:
63
+ - Retry, ack, fail, and dead-letter expectations:
64
+ - Ordering or idempotency rules:
65
+
66
+ # Single-Writer Policy
67
+
68
+ - Writer key:
69
+ - Allowed write surfaces:
70
+ - Forbidden write surfaces:
71
+ - Conflict handling:
72
+
73
+ # Inputs
74
+
75
+ - Required input contract.
76
+
77
+ # Outputs
78
+
79
+ - Required output or receipt contract.
80
+
81
+ # Receipts / Evidence
82
+
83
+ - Attempt evidence:
84
+ - Validation evidence:
85
+ - Final receipt or closeout evidence:
86
+ - Aggregate checkpoint policy:
87
+
88
+ # Dependencies
89
+
90
+ - Other manifests, skills, tools, models, services, or runtime images.
91
+
92
+ # Security / Privacy
93
+
94
+ - Authority, secret, data, and mutation boundaries.
95
+ - No raw secrets, credentials, local auth state, or production controls.
96
+
97
+ # Validation Checks
98
+
99
+ - Commands or review checks.
100
+
101
+ # Closeout Evidence
102
+
103
+ - Evidence required to accept this MANIFEST or implementation.
104
+
105
+ # Projection Targets
106
+
107
+ - Runtime manifest, package metadata, API contract, tool manifest, or protocol
108
+ projection.
109
+
110
+ # Versioning
111
+
112
+ - Compatibility rules.
113
+
114
+ # Change Policy
115
+
116
+ - Who can change this MANIFEST and what validation is required.
117
+
118
+ # Open Questions
119
+
120
+ - Decision needed before implementation.
@@ -0,0 +1,45 @@
1
+ ---
2
+ extends: base.MANIFEST.md
3
+ template_kind: capability
4
+ spec_kind: capability
5
+ ---
6
+
7
+ # Capability Name
8
+
9
+ Stable mdkg capability id.
10
+
11
+ # Optional Capability URI
12
+
13
+ Optional generic URI: `capability://...`
14
+
15
+ Optional mdkg URI: `mdkg://capability/...`
16
+
17
+ # Resource Types
18
+
19
+ - Optional generic resource URI: `resource://...`
20
+ - Optional mdkg resource URI: `mdkg://resource/...`
21
+
22
+ # Allowed Principals
23
+
24
+ - Roles or agents allowed to use this capability.
25
+
26
+ # Required Policy Context
27
+
28
+ - Preconditions, policy refs, scopes, or approval state required before use.
29
+
30
+ # Delegation Rules
31
+
32
+ - Whether and how the capability can be delegated.
33
+
34
+ # Revocation Rules
35
+
36
+ - Conditions that revoke or disable the capability.
37
+
38
+ # Audit Events
39
+
40
+ - Receipts, summaries, or metrics created by use.
41
+
42
+ # Validation Checks
43
+
44
+ - Checks that prove capability use remains inside its authority and resource
45
+ boundaries.
@@ -0,0 +1,25 @@
1
+ ---
2
+ extends: base.MANIFEST.md
3
+ template_kind: integration
4
+ spec_kind: integration
5
+ ---
6
+
7
+ # Integration Boundary
8
+
9
+ Systems, repos, protocols, and ownership split.
10
+
11
+ # Data Flow
12
+
13
+ - Inputs, outputs, transformations, and receipts.
14
+
15
+ # Failure And Retry
16
+
17
+ - Retry, idempotency, dead-letter, and cleanup policy.
18
+
19
+ # Security
20
+
21
+ - Auth, secret refs, network, and data minimization.
22
+
23
+ # Conformance
24
+
25
+ - Contract tests and fixture expectations.