@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,32 @@
|
|
|
1
|
+
# Harness Compatibility
|
|
2
|
+
|
|
3
|
+
This repository supports external automation harnesses through shared docs and `.agents/skills` workflows only. Harness-specific runtime code belongs in separate adapter packages, not in the main `pm` CLI or SDK.
|
|
4
|
+
|
|
5
|
+
## Progressive-Disclosure Route
|
|
6
|
+
|
|
7
|
+
Use the same low-token route in every harness:
|
|
8
|
+
|
|
9
|
+
1. `pm install guide-shell --project` (enable optional local guide commands)
|
|
10
|
+
2. `pm guide` (topic index)
|
|
11
|
+
3. `pm guide <topic>` (focused route)
|
|
12
|
+
4. `pm guide <topic> --depth standard|deep` (details only when needed)
|
|
13
|
+
5. `pm contracts --command <command> --flags-only --json` (strict machine flags)
|
|
14
|
+
|
|
15
|
+
## Harness Mapping
|
|
16
|
+
|
|
17
|
+
| Harness need | Preferred prompt/doc entrypoint | Skill route |
|
|
18
|
+
|--------------|----------------------------------|-------------|
|
|
19
|
+
| Development loop | `AGENTS.md` + optional `pm guide workflows` | `.agents/skills/pm-developer/SKILL.md` |
|
|
20
|
+
| User/operator workflow | repository docs + optional `pm guide quickstart` | `.agents/skills/pm-user/SKILL.md` |
|
|
21
|
+
| Package authoring | repository docs + optional `pm guide extensions` | `.agents/skills/pm-extensions/SKILL.md` |
|
|
22
|
+
| SDK integration | repository docs + optional `pm guide sdk` | `.agents/skills/pm-sdk/SKILL.md` |
|
|
23
|
+
|
|
24
|
+
## Verification
|
|
25
|
+
|
|
26
|
+
Before release, run:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pm install guide-shell --project
|
|
30
|
+
pm guide skills --depth standard
|
|
31
|
+
node scripts/release/docs-skills-gate.mjs
|
|
32
|
+
```
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# pm Agent Skills
|
|
2
|
+
|
|
3
|
+
`agentskills.io`-style skill bundles for `pm` workflows, written for
|
|
4
|
+
progressive disclosure: each `SKILL.md` is a router of roughly one screen, each
|
|
5
|
+
`references/*.md` is a bounded expansion, and the exhaustive surface is fetched
|
|
6
|
+
at runtime from contracts rather than copied into prose that can drift.
|
|
7
|
+
|
|
8
|
+
## Load Order
|
|
9
|
+
|
|
10
|
+
| Tier | Source | Typical cost | Staleness risk |
|
|
11
|
+
| ---- | -------------------------------------- | ------------ | -------------- |
|
|
12
|
+
| 0 | `SKILL.md` | ~650 tok | Gated |
|
|
13
|
+
| 1 | `pm next`, `pm context`, `pm search` | ~0.5-2.5k | None (live) |
|
|
14
|
+
| 2 | `pm contracts ...`, `pm <cmd> --help --json` | ~1-3.4k | None (generated) |
|
|
15
|
+
| 2 | `pm guide <topic> --depth brief` | ~0.6-1k | Gated |
|
|
16
|
+
| 3 | `references/*.md` | ~0.3-1k each | Gated |
|
|
17
|
+
| 4 | `docs/*.md` | 0.7k-45k | Gated |
|
|
18
|
+
|
|
19
|
+
Never load a tier-4 document whole when a reference routes into a section of
|
|
20
|
+
it. `docs/COMMANDS.md` is ~29k tokens and `docs/SDK.md` is ~45k.
|
|
21
|
+
|
|
22
|
+
## Bundles
|
|
23
|
+
|
|
24
|
+
| Skill | Use when |
|
|
25
|
+
| --------------------------------- | ------------------------------------------------------ |
|
|
26
|
+
| [`pm-developer`](pm-developer/SKILL.md) | Changing code, docs, tests, or release gates |
|
|
27
|
+
| [`pm-user`](pm-user/SKILL.md) | Intake, triage, prioritization, planning, reporting |
|
|
28
|
+
| [`pm-extensions`](pm-extensions/SKILL.md) | Package and extension lifecycle and authoring |
|
|
29
|
+
| [`pm-sdk`](pm-sdk/SKILL.md) | Integrations, embedding, and domain packs on the SDK |
|
|
30
|
+
|
|
31
|
+
Harness-specific bundles ship with the plugins under `plugins/pm-claude/skills`
|
|
32
|
+
and `plugins/pm-codex/skills`; they route to the same guide topics and
|
|
33
|
+
contracts.
|
|
34
|
+
|
|
35
|
+
## Runtime Routing
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pm install guide-shell --project
|
|
39
|
+
pm guide # topic index
|
|
40
|
+
pm guide skills
|
|
41
|
+
pm guide harnesses --depth standard
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Guide topics: `quickstart`, `commands`, `workflows`, `sdk`, `extensions`,
|
|
45
|
+
`skills`, `harnesses`, `release`, `tokens`, `graph`, `assurance`, `merge`.
|
|
46
|
+
|
|
47
|
+
Compatibility routing: [Harness compatibility matrix](HARNESS_COMPATIBILITY.md)
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pm-developer
|
|
3
|
+
description: Runs the pm-cli developer execution loop (orient, claim, implement, verify, close) with linked files/tests/docs evidence, under an explicit token budget. Use when coding, debugging, refactoring, or shipping repository changes tracked in pm items.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Works in terminal-based coding agents with bash, Node.js, and pnpm.
|
|
6
|
+
metadata:
|
|
7
|
+
owner: unbrained
|
|
8
|
+
domain: pm-cli
|
|
9
|
+
scope: developer-workflow
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# pm Developer Skill
|
|
13
|
+
|
|
14
|
+
Implementation work that changes code, docs, tests, or release gates. `pm` is the
|
|
15
|
+
system of record: every change is linked to an item, and every mutation is
|
|
16
|
+
recorded in an append-only history stream.
|
|
17
|
+
|
|
18
|
+
## Load Order
|
|
19
|
+
|
|
20
|
+
Load only the tier the task needs. Costs are measured, not estimated.
|
|
21
|
+
|
|
22
|
+
| Tier | Load | Cost | When |
|
|
23
|
+
| ---- | --------------------------------------------- | --------- | ---------------------------------------- |
|
|
24
|
+
| 0 | This file | ~650 tok | Always. |
|
|
25
|
+
| 1 | `pm next` or `pm context --limit 10` | ~2.1-2.5k | Pick or resume work. |
|
|
26
|
+
| 2 | `pm contracts --command <cmd> --flags-only` | ~1-3.4k | Exact flags for one command. |
|
|
27
|
+
| 2 | `pm guide <topic> --depth brief` | ~0.6-1k | A capability family you have not used. |
|
|
28
|
+
| 3 | `references/*.md` below | ~0.3-1k | Repeatable procedure detail. |
|
|
29
|
+
| 4 | `docs/*.md` | 0.7k-45k | Only when a reference routes you there. |
|
|
30
|
+
|
|
31
|
+
Never load `docs/COMMANDS.md` (~29k) or `docs/SDK.md` (~45k) whole. Both are
|
|
32
|
+
routed into by section from the references below.
|
|
33
|
+
|
|
34
|
+
Optional deep routing that never goes stale:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pm install guide-shell --project
|
|
38
|
+
pm guide workflows --depth brief
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Non-Negotiables
|
|
42
|
+
|
|
43
|
+
- Author identity is detected automatically. **Never pass `--author` and never
|
|
44
|
+
set `PM_AUTHOR`.** The harness, model, effort, role, and topic are probed and
|
|
45
|
+
recorded on every history entry.
|
|
46
|
+
- Never edit files under `.agents/pm` directly. Every mutation goes through `pm`.
|
|
47
|
+
- Never claim an item's state from memory. Read it live before asserting it.
|
|
48
|
+
- Claim before substantial edits; release when paused, handed off, or closed.
|
|
49
|
+
- Search before creating. Record the duplicate check as a create-time comment.
|
|
50
|
+
|
|
51
|
+
## Canonical Loop
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pm next # or: pm context --limit 10
|
|
55
|
+
pm search "<task keywords>" --limit 10
|
|
56
|
+
pm claim <ID>
|
|
57
|
+
pm update <ID> --status in_progress --message "Start implementation"
|
|
58
|
+
# ...implement...
|
|
59
|
+
pm files <ID> --add path=<path>,scope=project,note="<why>"
|
|
60
|
+
pm docs <ID> --add path=<doc>,scope=project,note="<why>"
|
|
61
|
+
pm test <ID> --add command="node scripts/run-tests.mjs test -- <target>",scope=project,timeout_seconds=240
|
|
62
|
+
pm comments <ID> "Evidence: <what changed and what passed>"
|
|
63
|
+
pm test <ID> --run --progress
|
|
64
|
+
pm close <ID> "<reason with evidence>" --validate-close warn
|
|
65
|
+
pm release <ID>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Capability Map
|
|
69
|
+
|
|
70
|
+
Capability families and their commands are generated from the public SDK
|
|
71
|
+
contract. Start with `pm guide capabilities`, expand only the family the task
|
|
72
|
+
enters, and use these drift-gated references:
|
|
73
|
+
|
|
74
|
+
- [Capability routing](../../../docs/generated/AGENT_CAPABILITY_ROUTING.md)
|
|
75
|
+
- [Visibility tiers and families](../../../docs/generated/AGENT_COMMAND_SURFACE.md)
|
|
76
|
+
|
|
77
|
+
`pm help` shows the bounded core tier. Use `pm guide capabilities`, `pm
|
|
78
|
+
contracts --summary`, or `pm <command> --help --json` for progressive
|
|
79
|
+
disclosure into the wider surface.
|
|
80
|
+
|
|
81
|
+
## Token Discipline
|
|
82
|
+
|
|
83
|
+
Every read declares a default ceiling and degrades deterministically rather
|
|
84
|
+
than truncating silently. Choose in this order:
|
|
85
|
+
|
|
86
|
+
1. **Projection** — ask for fewer fields: `pm get <ID> --output-include id,title,status,dependencies`.
|
|
87
|
+
2. **Row limit** — `--output-limit 20`, or the command's own `--limit`.
|
|
88
|
+
3. **Budget** — `--output-budget <tokens>` only when the first two are set.
|
|
89
|
+
4. **Continuation** — when a response carries `output_budget_truncation`, use
|
|
90
|
+
the declared `--output-cursor`. Re-running with `--output-budget unbounded`
|
|
91
|
+
can cost orders of magnitude more.
|
|
92
|
+
|
|
93
|
+
Always read the `omission_receipt` before treating a result as complete. See
|
|
94
|
+
[Token budgets and read output](references/TOKEN_BUDGETS.md).
|
|
95
|
+
|
|
96
|
+
## Verification Defaults
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
pnpm build
|
|
100
|
+
node scripts/run-tests.mjs test -- <targets>
|
|
101
|
+
node scripts/run-tests.mjs coverage
|
|
102
|
+
pm validate --check-resolution --check-history-drift
|
|
103
|
+
pm health --summary
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Repository-wide gates before proposing a merge: `pnpm quality:static`.
|
|
107
|
+
|
|
108
|
+
## References
|
|
109
|
+
|
|
110
|
+
| Need | Load | Cost |
|
|
111
|
+
| ------------------------------------------------ | -------------------------------------------------------- | -------- |
|
|
112
|
+
| Command recipes for the developer loop | [Command playbook](references/COMMAND_PLAYBOOK.md) | ~275 tok |
|
|
113
|
+
| Prompt templates | [Prompts](references/PROMPTS.md) | ~250 tok |
|
|
114
|
+
| Bounded reads, cursors, projections, receipts | [Token budgets](references/TOKEN_BUDGETS.md) | ~900 tok |
|
|
115
|
+
| Typed edges, traversal, planning analytics | [Relationship graph](references/GRAPH_AND_RELATIONSHIPS.md) | ~900 tok |
|
|
116
|
+
| Branching, merging, concurrent agents | [Multi-agent and merge](references/MULTI_AGENT_MERGE.md) | ~800 tok |
|
|
117
|
+
| Composing pm with grep, jq, xargs, and scripts | [Scripting](references/SCRIPTING_COMPOSITION.md) | ~800 tok |
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Developer Command Playbook
|
|
2
|
+
|
|
3
|
+
## Session Bootstrap (Maintainer Run)
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install -g .
|
|
7
|
+
pm --version
|
|
8
|
+
node -v
|
|
9
|
+
pnpm -v
|
|
10
|
+
pnpm build
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Item Lifecycle
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pm context --limit 10
|
|
17
|
+
pm search "<keywords>" --limit 10
|
|
18
|
+
pm list-open --limit 20
|
|
19
|
+
pm claim <ID>
|
|
20
|
+
pm update <ID> --status in_progress --description "..."
|
|
21
|
+
pm append <ID> --body "Implementation notes"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Evidence Linking
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pm files <ID> --add path=src/<file>.ts,scope=project,note="implementation"
|
|
28
|
+
pm docs <ID> --add path=docs/<doc>.md,scope=project,note="public docs update"
|
|
29
|
+
pm test <ID> --add command="node scripts/run-tests.mjs test -- tests/unit/<file>.spec.ts",scope=project,timeout_seconds=240
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Close Workflow
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pm test <ID> --run --progress
|
|
36
|
+
node scripts/run-tests.mjs coverage
|
|
37
|
+
pm comments <ID> "Evidence: linked tests passed; coverage remained green."
|
|
38
|
+
pm close <ID> "Acceptance criteria met with verification evidence." --validate-close warn
|
|
39
|
+
pm release <ID>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Local Docs Routing
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pm install guide-shell --project
|
|
46
|
+
pm guide workflows
|
|
47
|
+
pm guide commands --depth standard
|
|
48
|
+
pm guide release --json
|
|
49
|
+
```
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Relationships and Graph Analytics
|
|
2
|
+
|
|
3
|
+
The tracker is a directed graph, not a list. Typed edges are what make the
|
|
4
|
+
project's history readable by algorithm. Full contract:
|
|
5
|
+
[docs/RELATIONSHIP_GRAPH.md](../../../../docs/RELATIONSHIP_GRAPH.md) (~7.4k tok)
|
|
6
|
+
and [docs/DEPENDENCY_KIND_CONTRACT.md](../../../../docs/DEPENDENCY_KIND_CONTRACT.md) (~700 tok).
|
|
7
|
+
|
|
8
|
+
## The Edge Vocabulary
|
|
9
|
+
|
|
10
|
+
Authoritative at runtime:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pm contracts --json --full | jq '.relationship_kind_contracts'
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
| Kind | Meaning | Ordering | Hierarchy |
|
|
17
|
+
| ----------------- | ---------------------------------------------- | -------- | --------- |
|
|
18
|
+
| `parent` | This item belongs under that one | no | yes |
|
|
19
|
+
| `child` | Inverse of `parent` | no | yes |
|
|
20
|
+
| `blocked_by` | This item waits for that one | yes | no |
|
|
21
|
+
| `blocks` | Inverse of `blocked_by` | yes | no |
|
|
22
|
+
| `implements` | This item realizes that goal, story, or ADR | no | no |
|
|
23
|
+
| `verifies` | This item proves that one behaves as claimed | no | no |
|
|
24
|
+
| `discovered_from` | This item was found while doing that one | no | no |
|
|
25
|
+
| `incident_from` | This item originates in that recorded incident | no | no |
|
|
26
|
+
| `supersedes` | This item replaces that one | no | no |
|
|
27
|
+
| `commits_to` | This item lands in that changeset or release | yes | no |
|
|
28
|
+
| `related` | Associative, non-directional | no | no |
|
|
29
|
+
|
|
30
|
+
`related` carries the least information. Prefer a typed kind whenever one
|
|
31
|
+
applies — `discovered_from`, `implements`, and `verifies` are the three that
|
|
32
|
+
most often replace a reflexive `related`.
|
|
33
|
+
|
|
34
|
+
## Adding Edges
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pm update <ID> --dep "id=<other>,kind=implements"
|
|
38
|
+
pm update <ID> --dep "id=<other>,kind=discovered_from"
|
|
39
|
+
pm update <ID> --dep-remove "id=<other>,kind=related"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Rules that prevent damage:
|
|
43
|
+
|
|
44
|
+
- `--dep` **appends**; it does not replace the dependency list.
|
|
45
|
+
- `--dep-remove` with a bare id deletes **every** row for that id. Always pass
|
|
46
|
+
`kind=` unless removing all of them is the intent.
|
|
47
|
+
- Never record both `A blocks B` and `B blocked_by A`. They are inverse
|
|
48
|
+
spellings of one edge, and recording both creates a cycle.
|
|
49
|
+
- Never add an edge to satisfy a count. Each edge should cite durable text, a
|
|
50
|
+
history event, or a linked artifact.
|
|
51
|
+
- A placeholder or misspelled id passes `create` silently. Verify with
|
|
52
|
+
`pm deps <ID>` after adding.
|
|
53
|
+
|
|
54
|
+
## Reading The Graph
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pm deps <ID> # tree view of one item's neighborhood
|
|
58
|
+
pm deps <ID> --format context --direction both --kind implements,verifies
|
|
59
|
+
pm graph analyze # layers, critical path, components, hubs
|
|
60
|
+
pm graph audit # findings, coverage, edge composition
|
|
61
|
+
pm graph impact <ID> --direction downstream
|
|
62
|
+
pm graph ancestors <ID> / descendants <ID>
|
|
63
|
+
pm graph paths <A> <B>
|
|
64
|
+
pm graph dominators <ID> # what must pass through this node
|
|
65
|
+
pm graph articulation # single points of failure
|
|
66
|
+
pm graph communities / centrality / slack / redundancy
|
|
67
|
+
pm graph plan # critical path method over the ordering DAG
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
`pm graph impact` and the traversal verbs are directional. Pass `--direction`
|
|
71
|
+
explicitly rather than relying on a default when the answer depends on it.
|
|
72
|
+
|
|
73
|
+
## Governance Signals Worth Checking
|
|
74
|
+
|
|
75
|
+
`pm graph audit` reports the properties that decide whether the graph is
|
|
76
|
+
trustworthy:
|
|
77
|
+
|
|
78
|
+
- `isolated_active_nodes` and `degree_leq_one_active_nodes` — work nobody can
|
|
79
|
+
reach from anywhere.
|
|
80
|
+
- `redundant_edges` — edges implied by another path; they cost storage and
|
|
81
|
+
dilute analytics.
|
|
82
|
+
- `ordering_contradiction_edges` — a scheduling claim contradicted elsewhere.
|
|
83
|
+
- `outcome_unreachable_nodes` — items that resolve to no declared goal.
|
|
84
|
+
- `articulation_points` and `bridge_edges` — the structural chokepoints.
|
|
85
|
+
|
|
86
|
+
When a workspace declares these as assurance bounds, adding edges can move a
|
|
87
|
+
ratchet. Check headroom before a bulk enrichment pass:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
pm assurance run graph-composition --trigger ci --dry-run --json
|
|
91
|
+
```
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Multiple Agents, Branches, and Merges
|
|
2
|
+
|
|
3
|
+
Tracker data is versioned alongside the code, so several agents can work on
|
|
4
|
+
separate branches and merge without hand-resolving item files. Full contract:
|
|
5
|
+
[docs/MERGE_SAFETY.md](../../../../docs/MERGE_SAFETY.md) (~4.4k tok).
|
|
6
|
+
|
|
7
|
+
## Once Per Clone Or Worktree
|
|
8
|
+
|
|
9
|
+
The `.gitattributes` merge fence is committed, but the driver definitions it
|
|
10
|
+
names are clone-local git config. A fresh clone or worktree merges tracker data
|
|
11
|
+
textually until the installer has run:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pm merge install
|
|
15
|
+
pm merge install --dry-run # preview
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Skipping this is the single most common cause of tracker merge conflicts.
|
|
19
|
+
|
|
20
|
+
## Ownership Across Agents
|
|
21
|
+
|
|
22
|
+
- `pm claim <ID>` before substantial edits. A claim is a recorded lease, not a
|
|
23
|
+
lock file, and it survives branching.
|
|
24
|
+
- `pm release <ID>` when pausing, handing off, closing, or canceling.
|
|
25
|
+
- `pm list-in-progress` shows what the fleet currently holds.
|
|
26
|
+
- Never force an ownership or lock override without explicit human approval.
|
|
27
|
+
|
|
28
|
+
Author identity is detected per invocation — harness, model, effort, role, and
|
|
29
|
+
topic — so two agents on the same branch remain distinguishable in history
|
|
30
|
+
without anyone passing `--author`.
|
|
31
|
+
|
|
32
|
+
## What Merges Field-Aware
|
|
33
|
+
|
|
34
|
+
The driver resolves four artifact classes: `item`, `history`, `relationship`,
|
|
35
|
+
and `json`. Set-valued fields such as tags and dependency rows union rather
|
|
36
|
+
than collide. Scalar fields follow the recorded field policy.
|
|
37
|
+
|
|
38
|
+
Two properties to keep in mind when designing concurrent work:
|
|
39
|
+
|
|
40
|
+
- **Additive beats rewriting.** `pm comments`, `pm notes`, and `--dep` append.
|
|
41
|
+
Rewriting a description or replacing acceptance criteria on two branches is a
|
|
42
|
+
genuine conflict that no driver can invent an answer for.
|
|
43
|
+
- **Independent ids do not collide** unless two branches mint the same id for
|
|
44
|
+
unrelated items. Prefer creating items on a branch that has seen the other
|
|
45
|
+
branch's ids when doing bulk creation.
|
|
46
|
+
|
|
47
|
+
## After A Merge
|
|
48
|
+
|
|
49
|
+
A clean field-aware merge can still leave history streams needing
|
|
50
|
+
reconciliation. Always run the post-merge gate:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pm merge report
|
|
54
|
+
pm merge reconcile --message "Post-merge history reconciliation"
|
|
55
|
+
pm validate --check-history-drift
|
|
56
|
+
pm health --check-only
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
`pm merge report` lists what the driver decided and what it discarded. Review
|
|
60
|
+
it before reconciling; reconciliation is an audited write.
|
|
61
|
+
|
|
62
|
+
## Proving Nothing Was Lost
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
pm validate --check-resolution --check-history-drift
|
|
66
|
+
pm graph audit
|
|
67
|
+
pm activity --limit 20
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
History is append-only and hash-chained. `--check-history-drift` compares each
|
|
71
|
+
stream's recorded chain against its contents, so a silently rewritten entry
|
|
72
|
+
fails the check rather than passing unnoticed.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Prompt Templates
|
|
2
|
+
|
|
3
|
+
## Implement Feature
|
|
4
|
+
|
|
5
|
+
`Implement <feature> on <ID>. Reuse existing architecture, link all changed files/tests/docs, run targeted + coverage checks, and append evidence before close.`
|
|
6
|
+
|
|
7
|
+
## Fix Bug
|
|
8
|
+
|
|
9
|
+
`Fix <bug> on <ID>. Add a regression test, keep the patch minimal, run focused tests first, then full gate commands if scope expands.`
|
|
10
|
+
|
|
11
|
+
## Refactor
|
|
12
|
+
|
|
13
|
+
`Refactor <area> on <ID> without behavior changes. Preserve API contracts, update docs where command behavior is clarified, and validate with existing regression suite.`
|
|
14
|
+
|
|
15
|
+
## Release Readiness Sweep
|
|
16
|
+
|
|
17
|
+
`Perform release readiness checks for <ID>. Run build, coverage, static quality, secret scan, and release gates. Document all results in a closure comment.`
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Composing pm With Shell Tools
|
|
2
|
+
|
|
3
|
+
`pm` is designed to be a process in a pipeline. Full contract:
|
|
4
|
+
[docs/SCRIPTING.md](../../../../docs/SCRIPTING.md) (~1.9k tok).
|
|
5
|
+
|
|
6
|
+
## Exit Codes Are Part Of The Answer
|
|
7
|
+
|
|
8
|
+
| Exit | Meaning | Response |
|
|
9
|
+
| ---- | ----------------------------------------- | ----------------------------------- |
|
|
10
|
+
| 0 | Completed (a read may return zero rows) | Parse stdout. |
|
|
11
|
+
| 1 | Runtime failure | Preserve stderr and stop. |
|
|
12
|
+
| 2 | Invalid flags or composition | Fix the invocation; do not retry. |
|
|
13
|
+
| 3 | Tracker or resource not found | Fix the path or id. |
|
|
14
|
+
| 4 | State or concurrency conflict | Refresh live state, then decide. |
|
|
15
|
+
| 5 | A dependency operation failed | Inspect dependency evidence. |
|
|
16
|
+
| 6 | Succeeded, matched nothing to change | Success. Inspect the receipt. |
|
|
17
|
+
| 7 | Succeeded, changed part of the selection | Success. Inspect unmatched rows. |
|
|
18
|
+
|
|
19
|
+
`0`, `6`, and `7` are all success. A bare `if pm ...; then` treats `6` and `7`
|
|
20
|
+
as failure, so classify the status explicitly in scripts.
|
|
21
|
+
|
|
22
|
+
## JSON Shapes
|
|
23
|
+
|
|
24
|
+
- CLI JSON has **no result wrapper**. `pm get <ID> --json` returns the entity
|
|
25
|
+
envelope directly.
|
|
26
|
+
- Collections return `items`, `count`, `total`, `has_more`, `next_cursor`, and
|
|
27
|
+
a `completeness` block.
|
|
28
|
+
- Mutations return a flat receipt: `id`, `status`, `changed_field_count`.
|
|
29
|
+
- `--lean` drops nulls and empty containers, which makes `jq` selectors shorter
|
|
30
|
+
and the payload smaller.
|
|
31
|
+
|
|
32
|
+
## Patterns
|
|
33
|
+
|
|
34
|
+
Select ids and act on them:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
ids=$(pm list --status open --type Issue --json --output-budget unbounded \
|
|
38
|
+
| jq -r '.items[] | select(.title | test("Semgrep")) | .id' | paste -sd,)
|
|
39
|
+
pm update-many --ids "$ids" --tags triaged --dry-run
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Bulk writes take ids comma-joined in a single argument; reads emit one id per
|
|
43
|
+
line. `paste -sd,` or `tr '\n' ','` bridges the two.
|
|
44
|
+
|
|
45
|
+
Aggregate without loading rows:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pm aggregate --group-by type --json | jq '.groups'
|
|
49
|
+
pm stats --json | jq '.by_status'
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Drive a check from graph structure:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
pm graph audit --json | jq '{findings: .finding_count, redundant: .profile.redundant_edges}'
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Stream history:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
pm activity --limit 50 --json | jq -r '.events[] | [.at, .op, .item_id] | @tsv'
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Guardrails
|
|
65
|
+
|
|
66
|
+
- One malformed flag makes a whole bulk update apply nothing. Use `--dry-run`
|
|
67
|
+
first on any `*-many` command.
|
|
68
|
+
- Never delete items by search match. Delete only by exact id.
|
|
69
|
+
- Do not write absolute filesystem paths into item text; run the repository
|
|
70
|
+
secret scan before committing tracker changes.
|
|
71
|
+
- Prefer `--output-budget unbounded` only inside scripts that consume the output
|
|
72
|
+
programmatically, never in an agent's own context.
|
|
73
|
+
|
|
74
|
+
## Discovering Exact Flags
|
|
75
|
+
|
|
76
|
+
The contract is authoritative and never stale:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
pm <command> --help --json
|
|
80
|
+
pm contracts --command <command> --flags-only --json
|
|
81
|
+
pm contracts --command <command> --full --json | jq '.command_exit_contracts'
|
|
82
|
+
```
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Token Budgets and Read Output
|
|
2
|
+
|
|
3
|
+
Every `pm` read declares a default token ceiling, degrades deterministically
|
|
4
|
+
when it is reached, and reports what it withheld. This reference is the
|
|
5
|
+
operating procedure; [docs/READ_OUTPUT_CONTRACTS.md](../../../../docs/READ_OUTPUT_CONTRACTS.md)
|
|
6
|
+
(~3.6k tok) is the full contract.
|
|
7
|
+
|
|
8
|
+
## The Four Levers, In Order
|
|
9
|
+
|
|
10
|
+
Apply the cheapest lever that answers the question.
|
|
11
|
+
|
|
12
|
+
1. **Projection.** Ask for fewer fields or sections.
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
pm get <ID> --output-include id,title,status,dependencies
|
|
16
|
+
pm list --status open --output-include id,title,type
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
2. **Row limit.** Bound the number of rows before bounding tokens.
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pm list --status open --output-limit 20
|
|
23
|
+
pm search "<terms>" --limit 10
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
3. **Budget.** Only after 1 and 2 are set.
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pm context --limit 10 --output-budget 4000
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
4. **Continuation.** Resume rather than re-read.
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pm notes <ID> --output-cursor <cursor-from-previous-response>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Reading The Receipt
|
|
39
|
+
|
|
40
|
+
Two blocks decide whether a result may be treated as complete.
|
|
41
|
+
|
|
42
|
+
- `omission_receipt` — declares whether field groups were dropped and the flag
|
|
43
|
+
that restores each one. `has_omissions: false` means the projection is whole.
|
|
44
|
+
- `output_budget_truncation` — appears only when a ceiling bound the result. It
|
|
45
|
+
names the `reason`, the `budget_source`, the row collections it compacted, and
|
|
46
|
+
whether a continuation is available.
|
|
47
|
+
|
|
48
|
+
A truncated read is a claim about the part it withheld. Never summarize a
|
|
49
|
+
truncated list as if it were the population. When `continuation_available` is
|
|
50
|
+
true, the cursor is the correct recovery; `--output-budget unbounded` is the
|
|
51
|
+
last resort and can be hundreds of times more expensive.
|
|
52
|
+
|
|
53
|
+
## Formats
|
|
54
|
+
|
|
55
|
+
- `--output-format toon` (default) is the agent-loop encoding: tabular rows are
|
|
56
|
+
emitted once as a header plus values, not repeated per row.
|
|
57
|
+
- `--output-format json` / `--json` is for strict parsing. JSON ceilings are
|
|
58
|
+
higher than TOON ceilings for the same command because the encoding is larger.
|
|
59
|
+
- `--lean` omits null and empty containers from JSON output.
|
|
60
|
+
- `--token-accounting` attaches a per-section cost receipt so a read can be
|
|
61
|
+
profiled before it is made routine.
|
|
62
|
+
|
|
63
|
+
## Measuring Before Committing To A Pattern
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
pm contracts --summary --json | jq '.command_summaries[]
|
|
67
|
+
| {command, toon: .default_max_estimated_tokens_by_format.toon}'
|
|
68
|
+
pm list --status open --token-accounting
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Use the declared ceiling per command rather than assuming a global one. A
|
|
72
|
+
command with no declared ceiling inherits the workspace default, which is a
|
|
73
|
+
weaker guarantee than a declared one.
|
|
74
|
+
|
|
75
|
+
## Cold-Start Cost
|
|
76
|
+
|
|
77
|
+
The cheapest useful orientation is two calls:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
pm next # ~2.5k tok — one actionable item with its context
|
|
81
|
+
pm contracts --summary # ~2.6k tok — the command surface with per-command ceilings
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Prefer `pm next` over `pm list-open` when the goal is to start work: it applies
|
|
85
|
+
relevance ranking and returns a working set rather than a page of rows.
|