@unbrained/pm-cli 2026.8.25 → 2026.8.27
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/.agents/skills/HARNESS_COMPATIBILITY.md +32 -0
- package/.agents/skills/README.md +47 -0
- package/.agents/skills/pm-developer/SKILL.md +117 -0
- package/.agents/skills/pm-developer/references/COMMAND_PLAYBOOK.md +49 -0
- package/.agents/skills/pm-developer/references/GRAPH_AND_RELATIONSHIPS.md +91 -0
- package/.agents/skills/pm-developer/references/MULTI_AGENT_MERGE.md +72 -0
- package/.agents/skills/pm-developer/references/PROMPTS.md +17 -0
- package/.agents/skills/pm-developer/references/SCRIPTING_COMPOSITION.md +82 -0
- package/.agents/skills/pm-developer/references/TOKEN_BUDGETS.md +85 -0
- package/.agents/skills/pm-extensions/SKILL.md +106 -0
- package/.agents/skills/pm-extensions/references/AUTHORING.md +95 -0
- package/.agents/skills/pm-extensions/references/LIFECYCLE.md +40 -0
- package/.agents/skills/pm-extensions/references/TROUBLESHOOTING.md +25 -0
- package/.agents/skills/pm-sdk/SKILL.md +107 -0
- package/.agents/skills/pm-sdk/references/DOMAIN_MODELING.md +78 -0
- package/.agents/skills/pm-sdk/references/INTEGRATION_CHECKLIST.md +31 -0
- package/.agents/skills/pm-sdk/references/PROMPTS.md +13 -0
- package/.agents/skills/pm-sdk/references/SURFACE_MAP.md +82 -0
- package/.agents/skills/pm-user/SKILL.md +111 -0
- package/.agents/skills/pm-user/references/BACKLOG_SHAPING.md +105 -0
- package/.agents/skills/pm-user/references/PROMPTS.md +17 -0
- package/.agents/skills/pm-user/references/WORKFLOWS.md +35 -0
- package/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +58 -3
- package/README.md +8 -5
- package/dist/cli/commander-usage.js +11 -7
- package/dist/cli/error-guidance.js +3 -3
- package/dist/cli/help-content.d.ts +2 -0
- package/dist/cli/help-content.js +53 -17
- package/dist/cli/help-json-payload.d.ts +8 -2
- package/dist/cli/help-json-payload.js +46 -12
- package/dist/cli/main.js +52 -74
- package/dist/cli/register-annotations.js +27 -21
- package/dist/cli/register-setup.js +98 -57
- package/dist/cli-bundle/bundle-manifest.json +156 -156
- package/dist/cli-bundle/chunks/chunk-3OO3W6FW.js +202 -0
- package/dist/cli-bundle/chunks/chunk-52EKTW6V.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-QLUORNIB.js → chunk-CVBBGWW5.js} +62 -44
- package/dist/cli-bundle/chunks/chunk-MFNTKMTI.js +13 -0
- package/dist/cli-bundle/chunks/chunk-OS27HHBN.js +35 -0
- package/dist/cli-bundle/chunks/chunk-QTO7USTH.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-5I5RWIJC.js → chunk-R4ETAOJC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OWHNAR2B.js → chunk-SH6P7FXI.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-SHMDY36D.js +8 -0
- package/dist/cli-bundle/chunks/{chunk-244MI4GS.js → chunk-SKXLJIEK.js} +60 -60
- package/dist/cli-bundle/chunks/chunk-TNX6HC54.js +3 -0
- package/dist/cli-bundle/chunks/{register-list-query-XVN2ZLI7.js → register-list-query-EUWM6VII.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-QCKAEGIJ.js → register-mutation-FD4HSAVU.js} +4 -4
- package/dist/cli-bundle/chunks/{register-operations-SDEAXE7E.js → register-operations-HRMNFEC3.js} +2 -2
- package/dist/cli-bundle/chunks/register-setup-33GNICLX.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-IBZZZGK3.js → chunk-2AGZ5BRT.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-4BR5UU52.js +50 -0
- package/dist/cli-bundle/focused-chunks/{chunk-OHIHZ7HS.js → chunk-6GCRSLPG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-OVJL6NZE.js → chunk-AD6ULRAF.js} +4 -4
- package/dist/cli-bundle/focused-chunks/{chunk-7YCDTCBC.js → chunk-AQ5IYEZZ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-YO3ZF3FI.js → chunk-EKX37ZHA.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-N7W67YIG.js → chunk-FC2AXLB5.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-H5JZEIQV.js → chunk-HC7ODMH3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-NOOZGIXP.js → chunk-HVQ22RC4.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-A644DUFQ.js → chunk-MEASX544.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-RAFKLNZX.js → chunk-MXTYGECH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-2UIWOP3O.js → chunk-SUBSWYW3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-VXWATRFL.js → chunk-XDPYBQCF.js} +9 -9
- package/dist/cli-bundle/focused-chunks/{chunk-XUQPEKRN.js → chunk-Y3JJXRVK.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-GQR3WH3F.js → chunk-Y5A7SJJ7.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-YHWHX6YY.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ONYQCALA.js → chunk-YVVZ3LQ6.js} +6 -6
- package/dist/cli-bundle/focused-chunks/chunk-Z2USIBR2.js +5 -0
- package/dist/cli-bundle/main.js +15 -14
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +2 -2
- package/dist/cli-bundle/sdk-core.js +31 -31
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +31 -31
- package/dist/cli-bundle/sdk-query.js +1 -1
- package/dist/cli-bundle/sdk-runtime.js +1 -1
- package/dist/cli-bundle/sdk-testing.js +1 -1
- package/dist/cli-bundle/sdk.js +32 -6
- package/dist/core/extensions/manifest-schema.d.ts +20 -0
- package/dist/core/extensions/manifest-schema.js +28 -10
- package/dist/core/governance/issue-codes.d.ts +11 -2
- package/dist/core/governance/issue-codes.js +29 -10
- package/dist/core/item/item-format.js +3 -3
- package/dist/core/store/item-store.js +12 -5
- package/dist/mcp/http-server.d.ts +60 -0
- package/dist/mcp/http-server.js +451 -0
- package/dist/mcp/legacy-adapter.d.ts +50 -0
- package/dist/mcp/legacy-adapter.js +64 -0
- package/dist/mcp/server.d.ts +42 -9
- package/dist/mcp/server.js +572 -59
- package/dist/mcp/tool-definitions.d.ts +2 -0
- package/dist/mcp/tool-definitions.js +2 -2
- package/dist/sdk/agent/closed-domain-contracts.d.ts +1 -1
- package/dist/sdk/agent/closed-domain-contracts.js +24 -2
- package/dist/sdk/agent/refusal-closure-census.d.ts +6 -2
- package/dist/sdk/agent/refusal-closure-census.js +16 -8
- package/dist/sdk/agent-capability-contracts.js +6 -2
- package/dist/sdk/cli-bootstrap.js +3 -2
- package/dist/sdk/cli-contracts/command-aliases.js +15 -2
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +4 -1
- package/dist/sdk/cli-contracts/enum-contracts.js +7 -2
- package/dist/sdk/cli-contracts/flag-contracts.js +9 -5
- package/dist/sdk/cli-contracts/grammar-contracts.d.ts +3 -3
- package/dist/sdk/cli-contracts/grammar-contracts.js +24 -17
- package/dist/sdk/cli-contracts/runtime-contracts.js +13 -11
- package/dist/sdk/cli-contracts/tool-schema.js +18 -15
- package/dist/sdk/cli-contracts.d.ts +1 -1
- package/dist/sdk/cli-contracts.js +3 -3
- package/dist/sdk/cli-program.js +3 -2
- package/dist/sdk/completion.js +40 -13
- package/dist/sdk/compose.d.ts +4 -1
- package/dist/sdk/compose.js +23 -36
- package/dist/sdk/extension/author-manifest.d.ts +22 -0
- package/dist/sdk/extension/author-manifest.js +93 -0
- package/dist/sdk/extension.js +6 -3
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +20 -5
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +18 -3
- package/dist/sdk/governance/health.js +7 -2
- package/dist/sdk/governance/upgrade.d.ts +2 -0
- package/dist/sdk/governance/upgrade.js +30 -8
- package/dist/sdk/governance/validate.js +8 -6
- package/dist/sdk/guide-topics.js +6 -6
- package/dist/sdk/index.d.ts +10 -2
- package/dist/sdk/index.js +11 -3
- package/dist/sdk/mcp/apps.d.ts +70 -0
- package/dist/sdk/mcp/apps.js +154 -0
- package/dist/sdk/mcp/authorization.d.ts +134 -0
- package/dist/sdk/mcp/authorization.js +405 -0
- package/dist/sdk/mcp/interactions.d.ts +118 -0
- package/dist/sdk/mcp/interactions.js +337 -0
- package/dist/sdk/mcp/protocol.d.ts +142 -0
- package/dist/sdk/mcp/protocol.js +174 -0
- package/dist/sdk/mcp/skills.d.ts +127 -0
- package/dist/sdk/mcp/skills.js +390 -0
- package/dist/sdk/mcp/subscriptions.d.ts +65 -0
- package/dist/sdk/mcp/subscriptions.js +212 -0
- package/dist/sdk/mcp/tasks.d.ts +107 -0
- package/dist/sdk/mcp/tasks.js +431 -0
- package/dist/sdk/mcp/transport.d.ts +30 -0
- package/dist/sdk/mcp/transport.js +261 -0
- package/dist/sdk/merge/receipts.d.ts +16 -0
- package/dist/sdk/merge/receipts.js +9 -8
- package/dist/sdk/read-output-contracts.js +16 -3
- package/dist/sdk/runtime-action-aliases.js +7 -3
- package/dist/sdk/runtime-input.js +12 -4
- package/dist/sdk/runtime-primitives.d.ts +2 -2
- package/dist/sdk/runtime-primitives.js +4 -4
- package/dist/sdk/test/execution.d.ts +6 -0
- package/dist/sdk/test/execution.js +32 -3
- package/docs/AGENT_PROVENANCE_ADR.md +6 -4
- package/docs/AGENT_RUNTIME_PRIMITIVES.md +6 -5
- package/docs/CLAUDE_CODE_PLUGIN.md +12 -5
- package/docs/CLI_GRAMMAR.md +7 -1
- package/docs/COMMANDS.md +2 -2
- package/docs/DIAGNOSTIC_OUTPUT_CONTRACTS.md +8 -0
- package/docs/EXTENSIONS.md +36 -36
- package/docs/MCP_2026_07_28.md +160 -0
- package/docs/MCP_2026_07_28_CONFORMANCE.md +30 -0
- package/docs/MCP_REMOTE_TRANSPORT_SECURITY.md +180 -0
- package/docs/MCP_SKILLS_AND_APPS.md +107 -0
- package/docs/QUICKSTART.md +15 -15
- package/docs/README.md +5 -0
- package/docs/RELEASING.md +12 -3
- package/docs/SDK.md +22 -1
- package/docs/SDK_AGENT_SESSION_CONTEXT.md +18 -13
- package/docs/SDK_CONTEXT_INTEGRITY.md +6 -0
- package/docs/SDK_EVIDENCE_TRACEABILITY.md +9 -1
- package/docs/SDK_MCP_INTERACTIONS.md +227 -0
- package/docs/TESTING.md +4 -0
- package/docs/generated/AGENT_CAPABILITY_ROUTING.md +1 -1
- package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +13 -11
- package/marketplace.json +2 -2
- package/package.json +15 -11
- package/packages/pm-beads/README.md +12 -6
- package/packages/pm-beads/docs/MIGRATION.md +53 -0
- package/packages/pm-beads/extensions/beads/index.ts +8 -0
- package/packages/pm-beads/extensions/beads/runtime.ts +671 -112
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/scripts/finalize-build.mjs +1 -0
- package/sdk/public-surface.json +902 -54
- package/dist/cli-bundle/chunks/chunk-2F3LUFMW.js +0 -8
- package/dist/cli-bundle/chunks/chunk-65MHLHAA.js +0 -2
- package/dist/cli-bundle/chunks/chunk-6C7GIMIL.js +0 -13
- package/dist/cli-bundle/chunks/chunk-QKGMHGEI.js +0 -202
- package/dist/cli-bundle/chunks/chunk-T2ENPRXF.js +0 -3
- package/dist/cli-bundle/chunks/chunk-TPQIBSL2.js +0 -3
- package/dist/cli-bundle/chunks/chunk-YQMYF3YD.js +0 -35
- package/dist/cli-bundle/chunks/register-setup-LXVBRCJ3.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-42S3GGZ7.js +0 -50
- package/dist/cli-bundle/focused-chunks/chunk-7I23XGWO.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-LMKG3DFE.js +0 -5
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pm-extensions
|
|
3
|
+
description: Manages pm-cli package and extension lifecycle — explore, install, activate, author, diagnose, and release-safe validation. Use when building, integrating, or troubleshooting pm packages, extensions, and extension-provided commands.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires pm package/extension commands and local project/global extension directories.
|
|
6
|
+
metadata:
|
|
7
|
+
owner: unbrained
|
|
8
|
+
domain: pm-cli
|
|
9
|
+
scope: extension-workflow
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# pm Packages and Extensions Skill
|
|
13
|
+
|
|
14
|
+
Extensions are how pm becomes specific to a project without forking it. They
|
|
15
|
+
register commands, item types, importers, exporters, search providers, and
|
|
16
|
+
profiles over the same substrate.
|
|
17
|
+
|
|
18
|
+
## Load Order
|
|
19
|
+
|
|
20
|
+
| Tier | Load | Cost | When |
|
|
21
|
+
| ---- | ------------------------------------------------- | --------- | ----------------------------- |
|
|
22
|
+
| 0 | This file | ~650 tok | Always. |
|
|
23
|
+
| 1 | `pm package explore --project` | ~0.5-2k | See what is installed. |
|
|
24
|
+
| 1 | `pm package doctor --detail deep` | ~1-3k | Diagnose activation failures. |
|
|
25
|
+
| 2 | `pm contracts --runtime-only --availability-only` | ~1-2k | What this install exposes. |
|
|
26
|
+
| 3 | `references/*.md` below | ~0.3-1k | Procedure detail. |
|
|
27
|
+
| 4 | `docs/EXTENSIONS.md`, `docs/EXTENSION_LIFECYCLE.md` | varies | Only when routed there. |
|
|
28
|
+
|
|
29
|
+
Optional deep routing that never goes stale:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pm install guide-shell --project
|
|
33
|
+
pm guide extensions
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Non-Negotiables
|
|
37
|
+
|
|
38
|
+
- Author identity is detected automatically. **Never pass `--author`, never set
|
|
39
|
+
`PM_AUTHOR`.**
|
|
40
|
+
- Declare the minimum capability set; anything undeclared is not granted.
|
|
41
|
+
- Never mirror a public SDK type inside a package — import it or derive it.
|
|
42
|
+
- Inspect before mutating; verify exposure after.
|
|
43
|
+
|
|
44
|
+
## Before Creating A Package
|
|
45
|
+
|
|
46
|
+
Check whether an existing package already owns the capability. Extending a
|
|
47
|
+
published package is almost always correct; a near-duplicate package is the
|
|
48
|
+
most expensive mistake in an ecosystem.
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
pm package explore --project
|
|
52
|
+
pm package explore --global
|
|
53
|
+
pm contracts --runtime-only --availability-only
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Lifecycle Loop
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
pm package explore --project # inspect state first
|
|
60
|
+
pm package manage --detail summary
|
|
61
|
+
pm package doctor --detail deep
|
|
62
|
+
pm install <package> --project # then mutate
|
|
63
|
+
pm contracts --command <extension-command> --flags-only
|
|
64
|
+
pm package doctor --detail deep # verify after
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Order matters: inspect, mutate, verify exposure, record evidence on the linked
|
|
68
|
+
pm item. Deactivation and uninstall are reversible only if you recorded what
|
|
69
|
+
they removed.
|
|
70
|
+
|
|
71
|
+
## Authoring
|
|
72
|
+
|
|
73
|
+
Author with `defineExtension` and declared capabilities. A capability the
|
|
74
|
+
manifest does not declare is not granted at activation, which is what keeps a
|
|
75
|
+
third-party extension from silently widening its own reach.
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
pm contracts --command package --flags-only
|
|
79
|
+
pm contracts --schema-only
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Packages ship TypeScript entries and are loaded through native type stripping,
|
|
83
|
+
so there is no separate build step for a package's own sources. Installed npm
|
|
84
|
+
extensions are not tracked in the host repository; only the managed-extension
|
|
85
|
+
manifest is.
|
|
86
|
+
|
|
87
|
+
## Verification
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
pm package doctor --detail deep
|
|
91
|
+
pm contracts --runtime-only --availability-only
|
|
92
|
+
pm health --check-only
|
|
93
|
+
pm validate --check-resolution
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
An extension is correctly integrated when `pm contracts` reports its commands
|
|
97
|
+
and actions as available and `pm <command> --help --json` returns a complete
|
|
98
|
+
flag contract for each one.
|
|
99
|
+
|
|
100
|
+
## References
|
|
101
|
+
|
|
102
|
+
| Need | Load | Cost |
|
|
103
|
+
| --------------------------------- | ---------------------------------------------------- | -------- |
|
|
104
|
+
| Lifecycle recipes | [Extension lifecycle](references/LIFECYCLE.md) | ~450 tok |
|
|
105
|
+
| Failure diagnosis playbook | [Troubleshooting](references/TROUBLESHOOTING.md) | ~300 tok |
|
|
106
|
+
| Authoring an extension end to end | [Authoring](references/AUTHORING.md) | ~900 tok |
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Authoring An Extension
|
|
2
|
+
|
|
3
|
+
The procedure, with routes into the detail rather than a copy of it.
|
|
4
|
+
|
|
5
|
+
## Route To A Section
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
grep -n "^## " docs/EXTENSIONS.md
|
|
9
|
+
sed -n '<start>,<end>p' docs/EXTENSIONS.md
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
| Topic | Heading in docs/EXTENSIONS.md |
|
|
13
|
+
| ------------------------------ | ----------------------------- |
|
|
14
|
+
| Where packages come from | `## Package Sources` |
|
|
15
|
+
| Package manifest fields | `## Package Manifest` |
|
|
16
|
+
| Directory layout | `## Extension Layout` |
|
|
17
|
+
| Extension manifest fields | `## Extension Manifest` |
|
|
18
|
+
| Capability and governance policy| `## Governance Policy` |
|
|
19
|
+
| Name collisions | `## Registration Collisions` |
|
|
20
|
+
| Runtime APIs available | `## Runtime APIs` |
|
|
21
|
+
| Lifecycle commands | `## Lifecycle Commands` |
|
|
22
|
+
| Upgrades | `## Upgrade Workflow` |
|
|
23
|
+
| Runnable examples | `## Runnable Examples` |
|
|
24
|
+
|
|
25
|
+
Author-time contracts live in
|
|
26
|
+
[docs/EXTENSION_AUTHOR_CONTRACTS.md](../../../../docs/EXTENSION_AUTHOR_CONTRACTS.md)
|
|
27
|
+
and lifecycle detail in
|
|
28
|
+
[docs/EXTENSION_LIFECYCLE.md](../../../../docs/EXTENSION_LIFECYCLE.md).
|
|
29
|
+
|
|
30
|
+
## Shape
|
|
31
|
+
|
|
32
|
+
An extension exports `activate(api)` and registers through the `register*`
|
|
33
|
+
family, or declares itself with `defineExtension` and a blueprint. Both forms
|
|
34
|
+
end in the same registration, so choose declarative authoring when the surface
|
|
35
|
+
is static and imperative activation when registration depends on runtime state.
|
|
36
|
+
|
|
37
|
+
Registrable surfaces:
|
|
38
|
+
|
|
39
|
+
- Commands and command actions
|
|
40
|
+
- Custom item types and their fields
|
|
41
|
+
- Statuses with declared lifecycle roles
|
|
42
|
+
- Importers and exporters
|
|
43
|
+
- Search providers
|
|
44
|
+
- Project profiles
|
|
45
|
+
- Templates
|
|
46
|
+
|
|
47
|
+
## Capabilities Are Declared, Not Assumed
|
|
48
|
+
|
|
49
|
+
The manifest declares what the extension may do. Anything undeclared is not
|
|
50
|
+
granted at activation. Declare the minimum, then verify:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pm package doctor --detail deep
|
|
54
|
+
pm contracts --runtime-only --availability-only
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
A declared version bound must be one the loader actually enforces — a bound
|
|
58
|
+
written in a field nothing reads is worse than no bound, because it reads as a
|
|
59
|
+
guarantee.
|
|
60
|
+
|
|
61
|
+
## Sources
|
|
62
|
+
|
|
63
|
+
Extensions come from npm, GitHub, a bundled package, or a local directory, and
|
|
64
|
+
the same source works from all four. Package runtime modules use ordinary
|
|
65
|
+
static ESM imports from the published SDK entrypoints; they do not locate copied
|
|
66
|
+
source files through environment variables or generate loader shims.
|
|
67
|
+
|
|
68
|
+
Never mirror a public SDK type inside a package. Import it, or derive its shape
|
|
69
|
+
with `typeof`. A hand-copied signature becomes immutable consumer code the
|
|
70
|
+
moment the package publishes.
|
|
71
|
+
|
|
72
|
+
## Author Loop
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
pm package init <name> # scaffold
|
|
76
|
+
# ...implement extensions/*.ts...
|
|
77
|
+
pm install <path-or-name> --project # install locally
|
|
78
|
+
pm package doctor --detail deep # activation diagnostics
|
|
79
|
+
pm contracts --command <your-command> --flags-only
|
|
80
|
+
pm <your-command> --help --json # the contract a consumer will read
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Record the work on a pm item as you go: link the package sources with
|
|
84
|
+
`pm files`, the docs with `pm docs`, and a runnable check with `pm test`.
|
|
85
|
+
|
|
86
|
+
## Release Safety
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
pm package doctor --detail deep
|
|
90
|
+
pm contracts --runtime-only --availability-only
|
|
91
|
+
pm health --check-only
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
An extension that changes what a shared command emits is changing a contract,
|
|
95
|
+
not adding a feature. Treat the contract snapshot as the review artifact.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Extension Lifecycle Recipes
|
|
2
|
+
|
|
3
|
+
## Inspect Current State
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
pm package explore --project
|
|
7
|
+
pm package manage --detail summary
|
|
8
|
+
pm package doctor --detail deep
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Install and Activate
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pm install <target> --project
|
|
15
|
+
pm package activate <target> --project
|
|
16
|
+
pm package doctor --detail summary
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Adopt Existing Extensions
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pm package adopt <name> --project
|
|
23
|
+
pm package adopt-all --project
|
|
24
|
+
pm package manage --detail summary
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Deactivate / Uninstall
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pm package deactivate <target> --project
|
|
31
|
+
pm package uninstall <target> --project
|
|
32
|
+
pm package doctor --detail deep
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Contract Checks
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pm contracts --runtime-only --availability-only
|
|
39
|
+
pm contracts --command package --flags-only
|
|
40
|
+
```
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Extension Troubleshooting
|
|
2
|
+
|
|
3
|
+
## Common Diagnostic Sequence
|
|
4
|
+
|
|
5
|
+
1. `pm extension explore --project`
|
|
6
|
+
2. `pm extension manage --detail summary`
|
|
7
|
+
3. `pm extension doctor --detail deep --trace`
|
|
8
|
+
4. `pm contracts --runtime-only --availability-only`
|
|
9
|
+
|
|
10
|
+
## Symptoms and Checks
|
|
11
|
+
|
|
12
|
+
- **Command not visible**
|
|
13
|
+
- Confirm extension is managed and active.
|
|
14
|
+
- Confirm capability includes `commands`.
|
|
15
|
+
- Check `pm contracts` action availability.
|
|
16
|
+
|
|
17
|
+
- **Schema mismatch**
|
|
18
|
+
- Confirm capability includes `schema`.
|
|
19
|
+
- Re-run doctor with `--detail deep --trace`.
|
|
20
|
+
- Validate runtime-only contracts output.
|
|
21
|
+
|
|
22
|
+
- **Unexpected behavior after updates**
|
|
23
|
+
- Check registration precedence with manage/doctor.
|
|
24
|
+
- Run with `--no-extensions` to isolate core behavior.
|
|
25
|
+
- Re-activate extension after fixing manifest or entry path.
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pm-sdk
|
|
3
|
+
description: Implements pm-cli integrations on the published @unbrained/pm-cli SDK entrypoints and runtime contracts. Use when authoring extensions, embedding pm in another tool, building a domain on pm primitives, or keeping a wrapper aligned with command/action schema changes.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires Node.js and access to pm contracts output for runtime parity checks.
|
|
6
|
+
metadata:
|
|
7
|
+
owner: unbrained
|
|
8
|
+
domain: pm-cli
|
|
9
|
+
scope: sdk-integration
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# pm SDK Skill
|
|
13
|
+
|
|
14
|
+
The SDK is the implementation; the CLI and the MCP server are thin consumers of
|
|
15
|
+
it. Anything the CLI can do is reachable from the published surface, and an
|
|
16
|
+
integration should never import repository internals to get it.
|
|
17
|
+
|
|
18
|
+
## Load Order
|
|
19
|
+
|
|
20
|
+
| Tier | Load | Cost | When |
|
|
21
|
+
| ---- | ----------------------------------------------- | --------- | ------------------------------------- |
|
|
22
|
+
| 0 | This file | ~700 tok | Always. |
|
|
23
|
+
| 1 | `pm contracts --summary` | ~2.6k | The command/action surface. |
|
|
24
|
+
| 1 | `sdk/public-surface.json` | query it | Exact exported symbols and signatures.|
|
|
25
|
+
| 2 | `pm contracts --command <cmd> --full --json` | ~1-4k | One command's complete contract. |
|
|
26
|
+
| 3 | `references/*.md` below | ~0.3-1k | Procedure detail. |
|
|
27
|
+
| 4 | `docs/SDK.md` **by section only** | 45k whole | Never read whole; grep to a heading. |
|
|
28
|
+
|
|
29
|
+
Optional deep routing that never goes stale:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pm install guide-shell --project
|
|
33
|
+
pm guide sdk
|
|
34
|
+
pm guide tokens --depth brief
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Entrypoints
|
|
38
|
+
|
|
39
|
+
Import the narrowest entrypoint that owns the capability. Startup cost is
|
|
40
|
+
proportional to what you import.
|
|
41
|
+
|
|
42
|
+
| Export | Capability family |
|
|
43
|
+
| ----------------------------------------- | -------------------------------------------------------- |
|
|
44
|
+
| `@unbrained/pm-cli/sdk/core` | Items, schema, profile, transactions, runtime primitives |
|
|
45
|
+
| `@unbrained/pm-cli/sdk/query` | List and search engines, filtering, pagination, rendering |
|
|
46
|
+
| `@unbrained/pm-cli/sdk/graph` | Relationship stores, traversal, analytics, remediation |
|
|
47
|
+
| `@unbrained/pm-cli/sdk/governance` | Validation, health, gc, transaction cleanup |
|
|
48
|
+
| `@unbrained/pm-cli/sdk/merge` | VCS-neutral tracker merge contracts |
|
|
49
|
+
| `@unbrained/pm-cli/sdk/authoring` | Extension blueprints, builders, manifests |
|
|
50
|
+
| `@unbrained/pm-cli/sdk/contracts` | Static command/action contracts, expected-error protocol |
|
|
51
|
+
| `@unbrained/pm-cli/sdk/runtime` | Embedded command execution, package runtime helpers |
|
|
52
|
+
| `@unbrained/pm-cli/sdk/testing` | Package and extension assertion/invocation helpers |
|
|
53
|
+
| `@unbrained/pm-cli/sdk` | Compatibility aggregate over every supported export |
|
|
54
|
+
| `@unbrained/pm-cli/sdk/public-surface.json` | Machine-readable surface snapshot shipped with the package |
|
|
55
|
+
| `@unbrained/pm-cli/cli` | Executable entry (`runPmCli`), not a typed library API |
|
|
56
|
+
|
|
57
|
+
Query the shipped surface instead of guessing a symbol name:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
jq -r '.entrypoints["./sdk/graph"].symbols[].name' \
|
|
61
|
+
node_modules/@unbrained/pm-cli/sdk/public-surface.json | head -40
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Non-Negotiables
|
|
65
|
+
|
|
66
|
+
- Never import from `src/core/...` or any unpublished module path. The boundary
|
|
67
|
+
is gated and a private import fails the build.
|
|
68
|
+
- Never mirror an SDK type in your own package. Import it or derive it with
|
|
69
|
+
`typeof`; a hand-copied signature becomes immutable consumer code.
|
|
70
|
+
- Treat `pm contracts` output as the source of truth for flags, actions, and
|
|
71
|
+
availability. Snapshot it in a test so drift fails rather than surprises.
|
|
72
|
+
- Author identity is detected automatically. Pass an author only for a
|
|
73
|
+
deliberate identity override.
|
|
74
|
+
|
|
75
|
+
## Integration Loop
|
|
76
|
+
|
|
77
|
+
1. Capture the runtime surface: `pm contracts --schema-only`,
|
|
78
|
+
`pm contracts --runtime-only --availability-only`.
|
|
79
|
+
2. Map payload fields to contract keys — do not assume the CLI flag spelling
|
|
80
|
+
equals the SDK option key.
|
|
81
|
+
3. Implement against the narrowest entrypoint.
|
|
82
|
+
4. Add a regression test that fails when a required contract field drifts.
|
|
83
|
+
5. Verify the packed artifact, not just the working tree.
|
|
84
|
+
|
|
85
|
+
## Surface Compatibility
|
|
86
|
+
|
|
87
|
+
The published surface is a reviewed artifact. Additive changes are recorded;
|
|
88
|
+
removals and signature changes require an explicit acknowledgement with a
|
|
89
|
+
reason that stays in the snapshot.
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
pnpm sdk:surface:check
|
|
93
|
+
pnpm sdk:surface:update
|
|
94
|
+
pnpm sdk:surface:update -- --acknowledge-breaking "<release rationale>"
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Every package export that declares a `types` path must carry a classification,
|
|
98
|
+
so a new public entrypoint cannot ship ungoverned.
|
|
99
|
+
|
|
100
|
+
## References
|
|
101
|
+
|
|
102
|
+
| Need | Load | Cost |
|
|
103
|
+
| ------------------------------------------- | -------------------------------------------------------- | -------- |
|
|
104
|
+
| Step-by-step integration checklist | [Integration checklist](references/INTEGRATION_CHECKLIST.md) | ~400 tok |
|
|
105
|
+
| Prompt templates | [Prompts](references/PROMPTS.md) | ~200 tok |
|
|
106
|
+
| Which entrypoint owns which capability | [Surface map](references/SURFACE_MAP.md) | ~900 tok |
|
|
107
|
+
| Building a non-PM domain on pm primitives | [Domain modeling](references/DOMAIN_MODELING.md) | ~900 tok |
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Modeling A Domain On pm Primitives
|
|
2
|
+
|
|
3
|
+
pm's primitives are not specific to software project management. A record with
|
|
4
|
+
a type, a status lifecycle, typed relationships, an append-only history, and
|
|
5
|
+
bounded reads describes many domains. This reference is the procedure for
|
|
6
|
+
building one.
|
|
7
|
+
|
|
8
|
+
## The Primitive Set
|
|
9
|
+
|
|
10
|
+
| Primitive | What it gives the domain |
|
|
11
|
+
| -------------------- | ---------------------------------------------------------- |
|
|
12
|
+
| Item type | The nouns of the domain |
|
|
13
|
+
| Status + lifecycle role | The state machine each noun moves through |
|
|
14
|
+
| Typed relationship | The verbs between nouns, with direction and inverse |
|
|
15
|
+
| Custom fields | Domain attributes with declared types |
|
|
16
|
+
| Append-only history | Immutable proof of every transition, restorable to any version |
|
|
17
|
+
| Assurance gate | The domain's invariants, declared as data |
|
|
18
|
+
| Projection + budget | Bounded reads that stay usable as the corpus grows |
|
|
19
|
+
| Extension | Domain-specific commands over the same substrate |
|
|
20
|
+
|
|
21
|
+
## Procedure
|
|
22
|
+
|
|
23
|
+
1. **Name the nouns as item types.**
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pm schema add-type --name Experiment --description "One training run"
|
|
27
|
+
pm contracts --schema-only
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
2. **Give each type its lifecycle.** A status without a declared lifecycle role
|
|
31
|
+
is orphaned from every work-selection surface, so declare the role.
|
|
32
|
+
|
|
33
|
+
3. **Name the verbs as relationship kinds.** Prefer the built-in typed kinds
|
|
34
|
+
where the meaning matches — `implements`, `verifies`, `discovered_from`,
|
|
35
|
+
`supersedes`, `incident_from`, `blocked_by`, `parent`. Reach for `related`
|
|
36
|
+
only when the relationship genuinely has no direction.
|
|
37
|
+
|
|
38
|
+
4. **Declare invariants rather than writing checker scripts.** A floor, a
|
|
39
|
+
ceiling, or a monotone property over the record is expressible as an
|
|
40
|
+
assurance measurement plus an assertion, evaluated by the SDK and bound to a
|
|
41
|
+
trigger. See `pm guide assurance`.
|
|
42
|
+
|
|
43
|
+
5. **Ship domain verbs as an extension**, not as a fork. Extensions register
|
|
44
|
+
commands, item types, importers, exporters, search providers, and profiles
|
|
45
|
+
through `defineExtension` and declared capabilities.
|
|
46
|
+
|
|
47
|
+
6. **Prove it from the published surface only.** If the domain needs something
|
|
48
|
+
the published SDK cannot express, that is a gap in the SDK, not a reason to
|
|
49
|
+
import internals.
|
|
50
|
+
|
|
51
|
+
## Workflow Shapes This Already Serves
|
|
52
|
+
|
|
53
|
+
- **Tracker** — the default shape: work items, lifecycle, evidence.
|
|
54
|
+
- **Evaluation and benchmark** — cases as items, runs as history entries,
|
|
55
|
+
scores as recorded verdicts, invariants as gates.
|
|
56
|
+
- **RL and sim-to-RL environment** — an episode is a bounded observation, an
|
|
57
|
+
action is a recorded mutation, the trajectory is the history stream read in
|
|
58
|
+
order, and the reward is a declared predicate over recorded state.
|
|
59
|
+
- **Incident and change management** — `incident_from` and `supersedes` carry
|
|
60
|
+
causality; history carries the audit trail.
|
|
61
|
+
- **Content-addressed or temporal domains** — items as versions, `supersedes`
|
|
62
|
+
as lineage, point-in-time reads as the query.
|
|
63
|
+
|
|
64
|
+
The property that makes all of these work is the same one: every mutation is
|
|
65
|
+
recorded immutably and every read can be bounded, so the record is both proof
|
|
66
|
+
and context.
|
|
67
|
+
|
|
68
|
+
## Checks Before Calling A Domain Pack Done
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
pm contracts --schema-only --json | jq '.schema.types'
|
|
72
|
+
pm validate --check-lifecycle --check-resolution
|
|
73
|
+
pm graph audit --json | jq '.profile.edges_by_kind'
|
|
74
|
+
pm assurance run <your-gate> --trigger ci --dry-run --json
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
A domain pack is complete when a new agent can be handed the workspace and the
|
|
78
|
+
contracts, with no prose, and still act correctly.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# SDK Integration Checklist
|
|
2
|
+
|
|
3
|
+
## Contract Capture
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
pm contracts --schema-only --json
|
|
7
|
+
pm contracts --runtime-only --availability-only --json
|
|
8
|
+
pm contracts --command <command> --flags-only --json
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Implementation Rules
|
|
12
|
+
|
|
13
|
+
- Use `@unbrained/pm-cli/sdk` exports only.
|
|
14
|
+
- Do not import internal runtime modules from `src/core/...`.
|
|
15
|
+
- Keep action/flag mappings derived from `pm contracts` outputs.
|
|
16
|
+
- Handle extension-unavailable states through availability metadata.
|
|
17
|
+
|
|
18
|
+
## Validation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
pnpm build
|
|
22
|
+
node scripts/run-tests.mjs test -- <targeted sdk/integration tests>
|
|
23
|
+
node scripts/run-tests.mjs coverage
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Release Readiness
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
node scripts/release/docs-skills-gate.mjs
|
|
30
|
+
node scripts/release/run-gates.mjs --telemetry-mode best-effort
|
|
31
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# SDK Prompt Templates
|
|
2
|
+
|
|
3
|
+
## Runtime Contract Mapping
|
|
4
|
+
|
|
5
|
+
`Map this integration request to pm contracts output first, then generate implementation steps keyed to command flags and action schema fields.`
|
|
6
|
+
|
|
7
|
+
## Extension Capability Design
|
|
8
|
+
|
|
9
|
+
`Design extension capabilities for <feature> using defineExtension. Include only needed capabilities and provide a verification command list for activation and contracts checks.`
|
|
10
|
+
|
|
11
|
+
## Wrapper Parity Check
|
|
12
|
+
|
|
13
|
+
`Audit wrapper action/command mapping parity against current pm contracts output and report any missing or stale fields with patch recommendations.`
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# SDK Surface Map
|
|
2
|
+
|
|
3
|
+
Where each capability lives, and how to reach the detail without loading
|
|
4
|
+
[docs/SDK.md](../../../../docs/SDK.md) whole (~45k tokens).
|
|
5
|
+
|
|
6
|
+
## Route To A Section, Not To The File
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
grep -n "^## \|^### " docs/SDK.md # heading index, ~40 lines
|
|
10
|
+
sed -n '<start>,<end>p' docs/SDK.md # read one section
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
| Topic | Heading in docs/SDK.md |
|
|
14
|
+
| ---------------------------------------- | --------------------------------- |
|
|
15
|
+
| Install and package resolution | `## Install` |
|
|
16
|
+
| Entrypoints and import cost | `## Import Surfaces` |
|
|
17
|
+
| Surface snapshot and breaking-change gate | `### Public-surface compatibility`|
|
|
18
|
+
| The full export inventory | `## Public Exports` |
|
|
19
|
+
| Building a custom project tool | `### Build an entire custom project tool` |
|
|
20
|
+
| Building a non-PM domain | `### Build a non-PM temporal domain` |
|
|
21
|
+
| Plan workflows | `### Plan workflows` |
|
|
22
|
+
| History, restore, rich item reads | `### Immutable history and rich item reads` |
|
|
23
|
+
| Linked resources and dependency governance| `### Linked resources and dependency governance` |
|
|
24
|
+
| Output budgets and discovery | `### Agent output budgets and discovery` |
|
|
25
|
+
| Static and runtime contracts | `## Static And Runtime Contracts` |
|
|
26
|
+
| Atomic workspace transactions | `### Atomic workspace transactions` |
|
|
27
|
+
| Schema evolution | `### Schema evolution and workspace history` |
|
|
28
|
+
| Query execution | `### Query execution` |
|
|
29
|
+
| Context relevance and evaluation | `### Context relevance and evaluation` |
|
|
30
|
+
| Extension capability requirements | `## Capability Requirements` |
|
|
31
|
+
| Declarative authoring and blueprints | `## Declarative Authoring` |
|
|
32
|
+
| Testing helpers | `## Testing Helpers` |
|
|
33
|
+
| Custom item types | `## Custom Item Type` |
|
|
34
|
+
| Importers and exporters | `## Importer / Exporter` |
|
|
35
|
+
| Search providers | `## Search Provider` |
|
|
36
|
+
|
|
37
|
+
## Query The Shipped Surface
|
|
38
|
+
|
|
39
|
+
`sdk/public-surface.json` ships inside the package, so an integration can read
|
|
40
|
+
the exact surface it compiled against without locating repository files.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
SURFACE=node_modules/@unbrained/pm-cli/sdk/public-surface.json
|
|
44
|
+
|
|
45
|
+
# Which entrypoints exist and how they are classified
|
|
46
|
+
jq -r '.entrypoints | to_entries[] | "\(.key)\t\(.value.classification)"' "$SURFACE"
|
|
47
|
+
|
|
48
|
+
# Does a symbol exist, and where
|
|
49
|
+
jq -r --arg n createItem '.entrypoints | to_entries[]
|
|
50
|
+
| select(.value.symbols[]?.name == $n) | .key' "$SURFACE"
|
|
51
|
+
|
|
52
|
+
# The exact signature the package compiled against
|
|
53
|
+
jq -r --arg n createItem '.entrypoints["./sdk"].symbols[]
|
|
54
|
+
| select(.name == $n) | .signature' "$SURFACE"
|
|
55
|
+
|
|
56
|
+
# Stable error-code vocabulary
|
|
57
|
+
jq -r '.error_codes[]' "$SURFACE" | head -30
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Classifications carry intent:
|
|
61
|
+
|
|
62
|
+
- `supported` — stable authoring surface.
|
|
63
|
+
- `contract_data` — generated contract tables.
|
|
64
|
+
- `advanced_export` — reachable but not the recommended path.
|
|
65
|
+
- `aggregate_alias` — republishes another entrypoint's declarations verbatim.
|
|
66
|
+
- `executable_entry` — the CLI runtime entry, not a typed library API.
|
|
67
|
+
|
|
68
|
+
## Other Contract Artifacts
|
|
69
|
+
|
|
70
|
+
| Artifact | Answers |
|
|
71
|
+
| ------------------------------------------ | ---------------------------------------------- |
|
|
72
|
+
| `pm contracts --summary --json` | Commands, intents, per-command token ceilings |
|
|
73
|
+
| `pm contracts --command <c> --full --json` | Flags, exit vocabulary, output contract |
|
|
74
|
+
| `pm contracts --schema-only` | Item schema, types, statuses, fields |
|
|
75
|
+
| `pm contracts --runtime-only --availability-only` | What this installation actually exposes |
|
|
76
|
+
| `pm contracts --json --full \| jq '.mcp_tools'` | The MCP tool surface |
|
|
77
|
+
| `pm contracts --json --full \| jq '.relationship_kind_contracts'` | Edge kinds and inverses |
|
|
78
|
+
| `docs/generated/AGENT_COMMAND_SURFACE.md` | Command visibility tiers |
|
|
79
|
+
|
|
80
|
+
`contracts --json --full` is large enough that the default budget omits it.
|
|
81
|
+
Pass `--output-budget unbounded` when scripting it, and never into an agent's
|
|
82
|
+
own context unfiltered — pipe it through `jq` first.
|