@unbrained/pm-cli 2026.9.10 → 2026.9.12
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/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +53 -11
- package/dist/cli/command-namespaces.d.ts +2 -2
- package/dist/cli/command-namespaces.js +1 -1
- package/dist/cli/error-guidance.d.ts +10 -0
- package/dist/cli/error-guidance.js +1 -1
- package/dist/cli/extension-command-help.js +3 -3
- package/dist/cli/main.d.ts +4 -0
- package/dist/cli/main.js +2 -2
- package/dist/cli/option-values.d.ts +3 -0
- package/dist/cli/option-values.js +2 -0
- package/dist/cli/register-history-maintenance.js +2 -1
- package/dist/cli/register-list-query.js +2 -2
- package/dist/cli/register-mutation.d.ts +5 -0
- package/dist/cli/register-mutation.js +2 -16
- package/dist/cli/schema/registration.d.ts +4 -0
- package/dist/cli/schema/registration.js +16 -0
- package/dist/cli-bundle/bundle-manifest.json +156 -156
- package/dist/cli-bundle/chunks/{chunk-NKOYVKFM.js → chunk-2JAY4LFI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-I6XT3DLQ.js → chunk-3ZJDGTYC.js} +53 -53
- package/dist/cli-bundle/chunks/chunk-67H4PKQ5.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-EOCKPCEY.js → chunk-7H33WPDF.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-7KF6HCRC.js +20 -0
- package/dist/cli-bundle/chunks/chunk-DEGRLB6Y.js +235 -0
- package/dist/cli-bundle/chunks/chunk-GKY655T7.js +6 -0
- package/dist/cli-bundle/chunks/chunk-I6VQUHK6.js +8 -0
- package/dist/cli-bundle/chunks/chunk-PTX2JRFR.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-PYUITRSV.js → chunk-TAGDYARO.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-X6POOZKD.js +29 -0
- package/dist/cli-bundle/chunks/{chunk-4SFBH77G.js → chunk-YU75JRTW.js} +156 -142
- package/dist/cli-bundle/chunks/{register-list-query-CUIW7SSE.js → register-list-query-KEZPDR6X.js} +6 -6
- package/dist/cli-bundle/chunks/register-mutation-HEXA3ZDM.js +20 -0
- package/dist/cli-bundle/chunks/{register-operations-XIZPLPQY.js → register-operations-TEZT65JF.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-JVGPCAIL.js → register-setup-IIL74WUG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-ZAWAL2CG.js → chunk-2BQ4JSJQ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-5CRND7UA.js +12 -0
- package/dist/cli-bundle/focused-chunks/chunk-5PSYV3AT.js +164 -0
- package/dist/cli-bundle/focused-chunks/{chunk-SL5YVVPV.js → chunk-7EKXAUKF.js} +53 -52
- package/dist/cli-bundle/focused-chunks/chunk-BIOWOU6S.js +30 -0
- package/dist/cli-bundle/focused-chunks/chunk-EIXGDI77.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-GAKFECOQ.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-HFAW3FJQ.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-U5SHHU7E.js → chunk-IURELABV.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-KK7KSXUP.js +8 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ZDNAWWQI.js → chunk-LWJBBM6X.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-MFVABYEU.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-7N5MRONP.js → chunk-PERRTPIY.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-FHUARRMA.js → chunk-SDQOOL34.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-M36SF4GE.js → chunk-TTRB47KM.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-VWMP6W7Y.js +20 -0
- package/dist/cli-bundle/focused-chunks/chunk-YNBACVQ2.js +2 -0
- package/dist/cli-bundle/main.js +21 -21
- 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 +29 -29
- 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 +42 -42
- 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 +10 -10
- package/dist/core/history/digest.d.ts +12 -0
- package/dist/core/history/digest.js +2 -0
- package/dist/core/history/drift-scan.js +1 -1
- package/dist/core/history/history.d.ts +5 -3
- package/dist/core/history/history.js +2 -2
- package/dist/core/history/operation-contract.d.ts +30 -0
- package/dist/core/history/operation-contract.js +2 -0
- package/dist/core/history/replay.d.ts +3 -2
- package/dist/core/history/replay.js +1 -1
- package/dist/core/history/tombstone.d.ts +3 -0
- package/dist/core/history/tombstone.js +2 -0
- package/dist/core/item/id.d.ts +8 -7
- package/dist/core/item/id.js +1 -1
- package/dist/core/output/mutation-projection.d.ts +1 -0
- package/dist/core/output/mutation-projection.js +1 -1
- package/dist/core/shared/command-line.d.ts +10 -0
- package/dist/core/shared/command-line.js +2 -0
- package/dist/core/shared/errors.d.ts +13 -0
- package/dist/core/shared/errors.js +1 -1
- package/dist/core/store/item-store.d.ts +5 -1
- package/dist/core/store/item-store.js +1 -1
- package/dist/core/telemetry/runtime.d.ts +1 -0
- package/dist/core/telemetry/runtime.js +2 -2
- package/dist/sdk/agent/command-recovery.js +1 -1
- package/dist/sdk/agent/item-addressing.js +1 -1
- package/dist/sdk/agent/refusal-corpus-contracts.js +1 -1
- package/dist/sdk/agent-capability-contracts.js +1 -1
- package/dist/sdk/cli-bootstrap.d.ts +2 -1
- package/dist/sdk/cli-bootstrap.js +1 -1
- package/dist/sdk/cli-contracts/command-aliases.d.ts +2 -0
- package/dist/sdk/cli-contracts/command-aliases.js +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.js +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.d.ts +2 -0
- package/dist/sdk/cli-contracts/flag-contracts.js +1 -1
- package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +1 -1
- package/dist/sdk/cli-contracts/grammar-contracts.js +1 -1
- package/dist/sdk/cli-contracts/runtime-contracts.d.ts +3 -0
- package/dist/sdk/cli-contracts/runtime-contracts.js +1 -1
- package/dist/sdk/cli-contracts/tool-schema.d.ts +2 -2
- package/dist/sdk/cli-contracts/tool-schema.js +1 -1
- package/dist/sdk/cli-contracts.d.ts +1 -1
- package/dist/sdk/cli-contracts.js +1 -1
- package/dist/sdk/command-line.d.ts +1 -6
- package/dist/sdk/command-line.js +1 -1
- package/dist/sdk/comments.js +1 -1
- package/dist/sdk/completion.d.ts +2 -0
- package/dist/sdk/completion.js +26 -14
- package/dist/sdk/contracts.d.ts +2 -0
- package/dist/sdk/contracts.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -1
- package/dist/sdk/governance/storage-integrity.js +1 -1
- package/dist/sdk/governance/workflow-completeness.js +1 -1
- package/dist/sdk/governance/workflow-policy.js +2 -2
- package/dist/sdk/governance.d.ts +3 -0
- package/dist/sdk/governance.js +1 -1
- package/dist/sdk/history/attestation-command.d.ts +22 -0
- package/dist/sdk/history/attestation-command.js +3 -0
- package/dist/sdk/history/attestation-contract.d.ts +103 -0
- package/dist/sdk/history/attestation-contract.js +2 -0
- package/dist/sdk/history/attestation-scan.d.ts +16 -0
- package/dist/sdk/history/attestation-scan.js +2 -0
- package/dist/sdk/history/attestation.d.ts +8 -0
- package/dist/sdk/history/attestation.js +2 -0
- package/dist/sdk/history/salvage.js +1 -1
- package/dist/sdk/history-compact.js +1 -1
- package/dist/sdk/history-read.js +1 -1
- package/dist/sdk/history-redact.js +1 -1
- package/dist/sdk/history-repair.js +1 -1
- package/dist/sdk/index.d.ts +3 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/learnings.js +1 -1
- package/dist/sdk/lifecycle/claim.d.ts +2 -0
- package/dist/sdk/lifecycle/claim.js +1 -1
- package/dist/sdk/lifecycle/mcp-actions.d.ts +4 -0
- package/dist/sdk/lifecycle/mcp-actions.js +1 -1
- package/dist/sdk/lifecycle/task-composition.d.ts +2 -0
- package/dist/sdk/lifecycle/task-composition.js +1 -1
- package/dist/sdk/merge/reconcile.js +1 -1
- package/dist/sdk/merge/three-way.js +2 -2
- package/dist/sdk/notes.js +1 -1
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/query/projection-contracts.d.ts +1 -1
- package/dist/sdk/query/projection-contracts.js +1 -1
- package/dist/sdk/read-output-budget.d.ts +4 -10
- package/dist/sdk/read-output-budget.js +1 -1
- package/dist/sdk/read-output-contracts.d.ts +1 -1
- package/dist/sdk/read-output-contracts.js +1 -1
- package/dist/sdk/read-output-session.d.ts +1 -1
- package/dist/sdk/read-output-session.js +1 -1
- package/dist/sdk/runtime-input.js +1 -1
- package/dist/sdk/runtime.d.ts +3 -0
- package/dist/sdk/runtime.js +1 -1
- package/dist/types.d.ts +5 -1
- package/dist/types.js +1 -1
- package/docs/AGENT_UX_CONTRACTS.md +8 -0
- package/docs/ARCHITECTURE.md +7 -0
- package/docs/CLI_GRAMMAR.md +23 -0
- package/docs/HISTORY_ATTESTATION.md +164 -0
- package/docs/HISTORY_OPERATIONS.md +46 -0
- package/docs/HISTORY_RECOVERY.md +27 -2
- package/docs/LIFECYCLE_COMMANDS.md +19 -2
- package/docs/MERGE_SAFETY.md +64 -3
- package/docs/README.md +1 -0
- package/docs/READ_OUTPUT_CONTRACTS.md +13 -0
- package/docs/WORKFLOW_POLICIES.md +47 -3
- package/docs/generated/AGENT_CAPABILITY_ROUTING.md +4 -4
- package/docs/generated/AGENT_COMMAND_SURFACE.md +5 -0
- package/docs/generated/FLAG_LEXICON_BUDGETS.md +5 -0
- package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +10 -7
- package/marketplace.json +2 -2
- package/package.json +4 -4
- 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/README.md +31 -7
- package/packages/pm-governance-audit/extensions/governance-audit/index.ts +6 -3
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +7 -19
- 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/README.md +9 -5
- package/packages/pm-search-advanced/extensions/search-advanced/index.ts +3 -2
- 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/dist/cli-bundle/chunks/chunk-74RGSPLL.js +0 -2
- package/dist/cli-bundle/chunks/chunk-7WIHZI2M.js +0 -5
- package/dist/cli-bundle/chunks/chunk-GLQMKUGP.js +0 -2
- package/dist/cli-bundle/chunks/chunk-MACGGTLQ.js +0 -29
- package/dist/cli-bundle/chunks/chunk-P6BEYAON.js +0 -8
- package/dist/cli-bundle/chunks/chunk-TSWEX72T.js +0 -20
- package/dist/cli-bundle/chunks/chunk-YKQTETJI.js +0 -235
- package/dist/cli-bundle/chunks/register-mutation-5F5CYUWZ.js +0 -20
- package/dist/cli-bundle/focused-chunks/chunk-26O2WB73.js +0 -10
- package/dist/cli-bundle/focused-chunks/chunk-5YU75QLV.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-B2CMFYRZ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-CRY5MHEI.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-F6WKFXBT.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-OROZM37I.js +0 -177
- package/dist/cli-bundle/focused-chunks/chunk-PNGYYQY7.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-TPOL4TWE.js +0 -9
- package/dist/cli-bundle/focused-chunks/chunk-XSMA2W6Q.js +0 -12
- package/dist/cli-bundle/focused-chunks/chunk-ZJHYQOTM.js +0 -20
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# History operation contracts
|
|
2
|
+
|
|
3
|
+
Tracked by [pm-0elqjj](../.agents/pm/issues/pm-0elqjj.toon).
|
|
4
|
+
|
|
5
|
+
History operation names are durable data. The public
|
|
6
|
+
`PM_HISTORY_OPERATION_CONTRACT` declares native item operations, workspace
|
|
7
|
+
operations, parameterized families, and historical aliases. Inspect it through
|
|
8
|
+
`pm contracts --command history --json` or import it from
|
|
9
|
+
`@unbrained/pm-cli/sdk/contracts`.
|
|
10
|
+
|
|
11
|
+
Native write sites are checked against that declaration by the mandatory
|
|
12
|
+
`operation-source-contract.spec.ts` test. New literal operation names fail the
|
|
13
|
+
gate until their contract is declared. Schema migration families also have a
|
|
14
|
+
type-exhaustive test covering their forward and compensation identities. JSON Patch verbs, extension write-hook
|
|
15
|
+
labels, remediation-plan verbs, and telemetry span names are different domains;
|
|
16
|
+
they do not become history operations merely because they have an `op` field.
|
|
17
|
+
|
|
18
|
+
`createHistoryEntry` canonicalizes declared aliases before sealing new records.
|
|
19
|
+
Both `init:type-preset` and `init:type_preset` write `init:type_preset`.
|
|
20
|
+
Existing
|
|
21
|
+
records retain their exact operation and hashes. Readers can explicitly call
|
|
22
|
+
`resolveHistoryOperation` for comparison; unknown historical operations remain
|
|
23
|
+
unchanged so a newer writer does not make an older reader destroy information.
|
|
24
|
+
These additive naming contracts do not change the item storage format or hash
|
|
25
|
+
epochs.
|
|
26
|
+
|
|
27
|
+
Custom SDK consumers retain their own operation identities. New packages should
|
|
28
|
+
use `extension:<package_name>:<snake_case_operation>`. Legacy custom names remain
|
|
29
|
+
accepted when they use lowercase alphanumeric segments separated by underscores,
|
|
30
|
+
hyphens, colons, or dots. Workspace retry keys remain opaque colon suffixes,
|
|
31
|
+
including schema reference paths. Whitespace and control characters are rejected
|
|
32
|
+
before new record construction. The native inventory
|
|
33
|
+
gate is stricter than this compatibility grammar: a typo in product code cannot
|
|
34
|
+
silently become a custom operation.
|
|
35
|
+
|
|
36
|
+
Validation separates the prefix from its opaque suffix at the first colon.
|
|
37
|
+
Both checks run in linear time, including long invalid inputs; no arbitrary
|
|
38
|
+
length cap truncates or rejects otherwise valid SDK identities.
|
|
39
|
+
|
|
40
|
+
`requireHistoryOperation` validates a native identity or a declared parameterized
|
|
41
|
+
family. `normalizeHistoryOperationForWrite` applies the compatible SDK writer
|
|
42
|
+
grammar. Existing append/rewrite primitives retain their responsibility to
|
|
43
|
+
preserve imported and historical records; reading old records does not run a
|
|
44
|
+
new-writer naming migration. Custom writers using other spellings must select
|
|
45
|
+
grammar-compliant identities for new events; their retained records remain
|
|
46
|
+
readable under their original names.
|
package/docs/HISTORY_RECOVERY.md
CHANGED
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
Tracked by [pm-96fsma](../.agents/pm/issues/pm-96fsma.toon),
|
|
4
4
|
[pm-m0yjtg](../.agents/pm/issues/pm-m0yjtg.toon),
|
|
5
5
|
[pm-qw1uw6](../.agents/pm/issues/pm-qw1uw6.toon),
|
|
6
|
-
[pm-e3gn0z](../.agents/pm/issues/pm-e3gn0z.toon),
|
|
7
|
-
[pm-wlqxg3](../.agents/pm/tasks/pm-wlqxg3.toon)
|
|
6
|
+
[pm-e3gn0z](../.agents/pm/issues/pm-e3gn0z.toon),
|
|
7
|
+
[pm-wlqxg3](../.agents/pm/tasks/pm-wlqxg3.toon), and
|
|
8
|
+
[pm-nb4zwz](../.agents/pm/issues/pm-nb4zwz.toon).
|
|
8
9
|
|
|
9
10
|
Project management depends on trustworthy context. History is not just an
|
|
10
11
|
activity feed: it is the reconstructable source for prior item states, including
|
|
@@ -104,6 +105,30 @@ separate recovery implementation.
|
|
|
104
105
|
|
|
105
106
|
## Permanent item identities
|
|
106
107
|
|
|
108
|
+
Reading a deleted ID returns `item_deleted`, distinct from an unknown ID.
|
|
109
|
+
The SDK error context and JSON diagnostic include `item_id` and a bounded
|
|
110
|
+
`tombstone` with deletion time, recoverability, and the last materialized durable
|
|
111
|
+
version. Human output supplies the same recovery commands:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
pm get <id> --at <last-materialized-version>
|
|
115
|
+
pm restore <id> <last-materialized-version>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
The not-found exit code remains `3`. Hosts that branch on diagnostic codes
|
|
119
|
+
should handle `item_deleted` alongside other not-found cases; the new context
|
|
120
|
+
fields are optional on general SDK errors. No existing required SDK input changes.
|
|
121
|
+
|
|
122
|
+
The diagnostic verifies retained history before claiming deletion. A missing
|
|
123
|
+
file whose history ends in a live state is not called deleted. A corrupt stream
|
|
124
|
+
retains its integrity refusal. For legacy compacted streams, a timestamp is
|
|
125
|
+
suggested only if it selects exactly the last materialized state; ambiguous
|
|
126
|
+
timestamps or a pruned materialized state report `recoverable: false` and direct
|
|
127
|
+
the caller to retained history and version control. The suggested read is
|
|
128
|
+
available as `recovery.suggested_retry_args` for execution without shell parsing.
|
|
129
|
+
|
|
130
|
+
Immutable event naming is documented in [History operations](HISTORY_OPERATIONS.md).
|
|
131
|
+
|
|
107
132
|
Deleting an item retains its identity reservation through its history file.
|
|
108
133
|
Generated IDs skip those reservations, even under reproducible execution.
|
|
109
134
|
Explicit recreation fails with `item_identity_reserved`; use restore to recover
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# Lifecycle Commands and Ownership
|
|
2
2
|
|
|
3
3
|
Tracked by [pm-ik19](../.agents/pm/tasks/pm-ik19.toon) and
|
|
4
|
-
[pm-eq4x](../.agents/pm/tasks/pm-eq4x.toon)
|
|
4
|
+
[pm-eq4x](../.agents/pm/tasks/pm-eq4x.toon) and
|
|
5
|
+
[pm-r1f9f1](../.agents/pm/tasks/pm-r1f9f1.toon).
|
|
5
6
|
|
|
6
7
|
Bulk mutations and ownership compositions share SDK implementations with their
|
|
7
8
|
compatibility spellings. Runtime help and contracts describe the active surface:
|
|
@@ -41,7 +42,23 @@ close and its inline evidence, then releases ownership.
|
|
|
41
42
|
Each constituent operation enforces its own policy and writes its own history.
|
|
42
43
|
Compositions do not provide rollback across operations: for example, if the
|
|
43
44
|
status transition fails after a successful claim, the claim remains. Inspect the
|
|
44
|
-
item before retrying after an error.
|
|
45
|
+
item before retrying after an error. A second-step failure retains the original
|
|
46
|
+
error code and adds recovery guidance naming the completed operation. Its SDK
|
|
47
|
+
error `cause` retains the underlying failure.
|
|
48
|
+
|
|
49
|
+
## Compact transport receipts
|
|
50
|
+
|
|
51
|
+
CLI and MCP compositions default to an `id`, final `status`, `action`, and
|
|
52
|
+
`changed_field_count`, plus compact receipts for each constituent step. The root
|
|
53
|
+
count is the number of distinct fields touched across the steps, not their sum.
|
|
54
|
+
Step receipts retain ownership, close reason, warnings, and recovery evidence.
|
|
55
|
+
Item descriptions, bodies, and annotation histories are not echoed by default.
|
|
56
|
+
|
|
57
|
+
Use CLI `--full-changed-fields` or MCP `fullChangedFields: true` for complete
|
|
58
|
+
constituent results; `--id-only` or `idOnly: true` returns only the final identity
|
|
59
|
+
and status. CLI `--no-changed-fields` preserves item snapshots while replacing
|
|
60
|
+
field arrays with counts. Plain release supports the same output controls.
|
|
61
|
+
Typed `PmClient` methods and the direct SDK primitives retain full results.
|
|
45
62
|
|
|
46
63
|
## SDK and MCP
|
|
47
64
|
|
package/docs/MERGE_SAFETY.md
CHANGED
|
@@ -235,18 +235,79 @@ Deleting or ignoring them would lose the evidence needed by other clones.
|
|
|
235
235
|
|
|
236
236
|
## Cross-branch id collision safety
|
|
237
237
|
|
|
238
|
-
|
|
238
|
+
Tracked by [pm-qx95lz](../.agents/pm/issues/pm-qx95lz.toon).
|
|
239
|
+
|
|
240
|
+
Item ids are `<prefix>` plus random base36 characters. Local allocation reserves
|
|
241
|
+
both live documents and retained history, but cannot see independent creations
|
|
242
|
+
on another branch. The four-character default is a small, synchronized-workspace
|
|
243
|
+
setting; it is not a fleet uniqueness guarantee. `ids.token_length` accepts 4–12.
|
|
244
|
+
The allocator increases width after 32 local collisions to escape local density;
|
|
245
|
+
this does not measure concurrent branch activity.
|
|
246
|
+
|
|
247
|
+
For a shared base containing `n` reserved ids and `m` unsynchronized creations,
|
|
248
|
+
choose width `L` so `m*(m-1)/(2*(36^L-n))` stays below the desired per-sync
|
|
249
|
+
collision probability. This birthday union bound assumes independent uniform
|
|
250
|
+
allocation and all branches know the same reserved ids. At one million reserved
|
|
251
|
+
ids, eight characters keep 1,000 concurrent creations below one in a million;
|
|
252
|
+
nine characters do so for 10,000 creations. Configure the width before branching:
|
|
239
253
|
|
|
240
|
-
|
|
241
|
-
|
|
254
|
+
```bash
|
|
255
|
+
pm config project set ids_token_length 8
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
The SDK item merge refuses an empty common ancestor with
|
|
259
|
+
`item_identity_conflict`, even for equal item content: document equality alone
|
|
260
|
+
cannot prove a common creation. It leaves the driver output untouched instead
|
|
261
|
+
of combining two identities through scalar preference. The history merge also
|
|
262
|
+
refuses different create events across its inputs, multiple creates in either
|
|
263
|
+
input, or creations on both sides when the ancestor lacks a create event even
|
|
264
|
+
when their bytes match, before fast-forwarding or reanchoring. A common ancestor
|
|
265
|
+
containing the shared create event remains valid.
|
|
266
|
+
|
|
267
|
+
`storage_integrity` detects multiple physical documents and a second create event
|
|
268
|
+
within one history stream, reporting its line in `history_unparseable_streams`
|
|
269
|
+
as an invalid lifecycle. This check also protects merges Git resolves without
|
|
270
|
+
invoking a content driver. `pm get` and SDK item lookup refuse multiple physical
|
|
271
|
+
matches with `item_identity_ambiguous`; the message lists tracker-relative paths
|
|
272
|
+
and SDK error context exposes a typed `paths` array. Format preference cannot
|
|
273
|
+
select a winner. Only candidate paths are probed, so lookup
|
|
274
|
+
does not enumerate every item in the workspace.
|
|
275
|
+
|
|
276
|
+
Preserve both branches when a collision is reported. Recover each item from its
|
|
277
|
+
unambiguous source branch, create the second under a fresh id, and update its
|
|
278
|
+
references before retrying the merge. Do not repair a fused stream merely to
|
|
279
|
+
make its hashes pass: a new hash chain does not recover a lost identity.
|
|
242
280
|
|
|
243
281
|
Within one working tree, create and copy serialize on the candidate id and
|
|
244
282
|
recheck every built-in and extension-defined type folder before the
|
|
245
283
|
authoritative write. A raced collision fails with `item_id_collision` instead
|
|
246
284
|
of replacing the existing document.
|
|
247
285
|
|
|
286
|
+
### Executable convergence evidence
|
|
287
|
+
|
|
288
|
+
[pm-1tns7o](../.agents/pm/tasks/pm-1tns7o.toon) replaces the tag-only property
|
|
289
|
+
with generated complete-document comparisons. Fixed branch snapshots are folded
|
|
290
|
+
in original, reversed, and rotated order, with both ours/theirs directions.
|
|
291
|
+
Cases cover conflicting scalar writes and bodies, collection additions, distinct
|
|
292
|
+
and equal timestamps, disjoint edits, and optional-field deletion. Independent
|
|
293
|
+
expected documents are constructed directly for every N-branch case to check
|
|
294
|
+
retained values and preserved context. A policy table
|
|
295
|
+
also asserts that the compatibility `preferred_side` option is directional.
|
|
296
|
+
The field-class inventories are pinned so changes require an explicit test update.
|
|
297
|
+
|
|
298
|
+
These properties exercise the declared three-way policies; they do not turn the
|
|
299
|
+
document-level timestamp into per-field causal provenance. In particular, the
|
|
300
|
+
N-branch conflict fixture compares competing writes to the same scalar set.
|
|
301
|
+
Arbitrary histories, ordered executable test definitions with receiving-clone
|
|
302
|
+
trust, and relationship-event ordering retain their separate conformance contracts.
|
|
303
|
+
|
|
248
304
|
## Required post-merge gate
|
|
249
305
|
|
|
306
|
+
Reconciliation resolves receipt discovery and settlement from the requested
|
|
307
|
+
tracker. An explicit tracker outside Git does not consume clone-local receipts
|
|
308
|
+
from an unrelated invocation directory; see
|
|
309
|
+
[pm-q5grv5](../.agents/pm/issues/pm-q5grv5.toon).
|
|
310
|
+
|
|
250
311
|
After every branch merge that touches `.agents/pm`, run:
|
|
251
312
|
|
|
252
313
|
```bash
|
package/docs/README.md
CHANGED
|
@@ -62,6 +62,7 @@ pm guide release --json
|
|
|
62
62
|
- [Generated Refusal Closure Census](generated/REFUSAL_CLOSURE_CENSUS.md) - complete error-catalog join to executable refusal evidence and explicit uncovered obligations.
|
|
63
63
|
- [Universal Read Output Contracts](READ_OUTPUT_CONTRACTS.md) - cross-command include, amount, cost, and encoding controls for CLI, SDK, MCP, and packages.
|
|
64
64
|
- [Diagnostic Output Contracts](DIAGNOSTIC_OUTPUT_CONTRACTS.md) - action-first error budgets, deterministic degradation, SDK projection, and executable refusal assurance.
|
|
65
|
+
- [History Algorithms and Detached Attestations](HISTORY_ATTESTATION.md) - named record digests, portable exact-byte proofs, and read-only verification.
|
|
65
66
|
- [History Maintenance and Recovery](HISTORY_MAINTENANCE.md) - native history commands, permanent aliases, shared SDK transforms, and transactional recovery.
|
|
66
67
|
- [Declarative Workflow Policies](WORKFLOW_POLICIES.md) - portable lifecycle requirements, independent approvals, and completeness reports.
|
|
67
68
|
- [Mutation Integrity](MUTATION_INTEGRITY.md) - shared CLI/SDK/MCP author, secret, append-only disposition, and stale-work guardrails.
|
|
@@ -153,6 +153,19 @@ pm contracts --full --json
|
|
|
153
153
|
|
|
154
154
|
Every projected result carries a `read_output` receipt with the requested dimensions, precedence, observed option provenance, deterministic estimated token count, string/row compaction signals, and budget outcome. When canonical controls are present, `canonical_options_used` records spellings such as `--output-include`; the optional field is omitted when no canonical control was supplied so minimum-budget session receipts remain compact. `legacy_aliases_used` and `migration_hints` record only compatibility flags the caller actually supplied. A command-local flag synthesized internally to execute a canonical projection mode is therefore never misreported as deprecated syntax. When both spellings are supplied, both provenance arrays report that mixed invocation. Budget degradation discovers nested arrays as well as declared result rows, so validation diagnostics and other governance payloads compact their inner findings before the useful result is omitted. `compacted_row_paths` names every reduced collection without redefining those nested arrays as ordinary pagination rows.
|
|
155
155
|
|
|
156
|
+
The estimate is `ceil(utf8_bytes / 4)` for the complete envelope. The CLI uses
|
|
157
|
+
its selected built-in JSON or TOON representation, including indentation and
|
|
158
|
+
the final newline. SDK calls that select `outputFormat` use that representation;
|
|
159
|
+
structured SDK calls without a renderer retain compact JSON measurement.
|
|
160
|
+
Those unformatted calls keep the conservative workload-class ceiling
|
|
161
|
+
(`default_max_estimated_tokens`, also used as the generated TOON ceiling).
|
|
162
|
+
Selecting JSON explicitly opts into its larger declared rendering allowance;
|
|
163
|
+
serializing an SDK object for measurement does not implicitly select that policy.
|
|
164
|
+
Per-call and session receipts include their own cost and continuation disclosure.
|
|
165
|
+
Compaction reserves room for that disclosure before returning a useful page, so
|
|
166
|
+
an envelope cannot claim to fit merely because its rows fit before receipts were
|
|
167
|
+
added. An infeasible ceiling returns the explicit omission result.
|
|
168
|
+
|
|
156
169
|
For `context` and `next`, that final projection is also the usage-feedback
|
|
157
170
|
delivery boundary. The SDK carries a JSON-invisible serve receipt through
|
|
158
171
|
intent and universal output projection, then appends the final omitted decision
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Declarative workflow policies
|
|
2
2
|
|
|
3
|
-
Tracker: [pm-mj42og](../.agents/pm/features/pm-mj42og.toon)
|
|
3
|
+
Tracker: [pm-mj42og](../.agents/pm/features/pm-mj42og.toon) [pm-htbetn](../.agents/pm/features/pm-htbetn.toon), [pm-khd2fd](../.agents/pm/issues/pm-khd2fd.toon), and [pm-ycv2cz](../.agents/pm/issues/pm-ycv2cz.toon).
|
|
4
4
|
|
|
5
5
|
Projects can describe their lifecycle requirements as versioned data. The SDK
|
|
6
6
|
uses the same evaluator for item mutations, policy previews, and completeness
|
|
@@ -10,7 +10,7 @@ warn, or refuse; refusal also requires an explicit workspace opt-in.
|
|
|
10
10
|
## Configure a requirement
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
pm schema policy-put close-evidence --definition '{"
|
|
13
|
+
pm schema policy-put close-evidence --definition '{"effect":"refuse","subject":{"statuses":["closed"]},"rule":{"kind":"require_fields","fields":["resolution","actual_result"]}}'
|
|
14
14
|
pm schema policies
|
|
15
15
|
pm schema policy-check pm-example --definition '{"status":"closed"}'
|
|
16
16
|
pm schema policy-mode refuse
|
|
@@ -21,6 +21,10 @@ body. Custom fields can use dotted paths with at most eight segments. Empty
|
|
|
21
21
|
strings, arrays, objects, null, and absent values do not satisfy required fields;
|
|
22
22
|
zero and false are meaningful values.
|
|
23
23
|
|
|
24
|
+
`policy-put` accepts the id once: pass it as the operand, or omit the operand
|
|
25
|
+
and include `id` in the definition. When both are supplied their normalized ids
|
|
26
|
+
must agree; a mismatch refuses without changing the registry or history.
|
|
27
|
+
The same normalization applies to JSON strings, objects, previews, SDK, and MCP.
|
|
24
28
|
`policy-put` replaces a declaration with the same id. `policy-remove <id>` removes
|
|
25
29
|
one declaration. `policy-mode advise` disables refusal while retaining diagnostics.
|
|
26
30
|
Registry writes are locked and recorded in workspace history. `--dry-run` previews
|
|
@@ -122,8 +126,48 @@ declaration once. Later edits to the supplied document do not change that
|
|
|
122
126
|
snapshot; create another evaluator to adopt them. Completeness validation uses
|
|
123
127
|
one such snapshot for the whole supplied corpus.
|
|
124
128
|
|
|
125
|
-
The schema contract version is 4.
|
|
129
|
+
The schema contract version is 4.19; `policy-put` requires `definition` but
|
|
130
|
+
no longer requires a separate `name`. Existing schema operations remain available;
|
|
126
131
|
`SchemaResult` now also includes `WorkflowPolicyActionResult`. Consumers that
|
|
127
132
|
exhaustively narrow schema results should handle the `policy_result: true`
|
|
128
133
|
discriminant. Validation options include `checkCompleteness`, and validation
|
|
129
134
|
results can contain a `completeness` check.
|
|
135
|
+
|
|
136
|
+
## Require a meaningful completeness contract
|
|
137
|
+
|
|
138
|
+
A successful completeness check means no applicable field requirement was
|
|
139
|
+
violated. It does not establish that a project declared any requirements.
|
|
140
|
+
The receipt exposes these independent measurements even in counts mode:
|
|
141
|
+
|
|
142
|
+
| Field | Meaning |
|
|
143
|
+
| --- | --- |
|
|
144
|
+
| `declared_requirement_count` | Number of `require_fields` declarations, including operation-specific ones |
|
|
145
|
+
| `state_requirement_count` | Number eligible for a state scan, without operation selectors |
|
|
146
|
+
| `applicable_requirement_count` | Distinct requirements that matched at least one supplied item |
|
|
147
|
+
| `requirement_application_count` | Item/requirement pairs actually evaluated |
|
|
148
|
+
| `governed_items`, `ungoverned_items` | Items with and without a matching state requirement |
|
|
149
|
+
| `contract_status` | `undeclared`, `empty`, `inapplicable`, `partial`, or `covered` |
|
|
150
|
+
|
|
151
|
+
`applied_policy_ids` is bounded by the diagnostic row limit; its truncation flag
|
|
152
|
+
and `applicable_requirement_count` retain the complete total. `covered` describes
|
|
153
|
+
applicability, not compliance: violations are reported independently. Unreadable
|
|
154
|
+
source data still fails the check, regardless of the coverage of readable items.
|
|
155
|
+
|
|
156
|
+
Projects can require a nonempty applied contract with the existing assurance
|
|
157
|
+
primitives. Replace `pm-example` with the accountable item in your workspace:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
pm assurance put measurement completeness-contract --definition '{"id":"completeness-contract","source":{"kind":"validate","check":"completeness","field":"applicable_requirement_count"}}'
|
|
161
|
+
pm assurance put assertion completeness-contract-required --definition '{"id":"completeness-contract-required","measurement_id":"completeness-contract","owner_item_id":"pm-example","scope":{"kind":"all"},"floor":1,"lifetime":"hold","enforcement":"block","negative_control":{"cases":[{"observed":0,"expected":"fail"},{"observed":1,"expected":"pass"}]}}'
|
|
162
|
+
pm assurance put gate completeness-contract --definition '{"id":"completeness-contract","assertion_ids":["completeness-contract-required"],"triggers":["ci"]}'
|
|
163
|
+
pm assurance run completeness-contract --trigger ci --dry-run
|
|
164
|
+
pm ops validate --check-completeness --strict-exit
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Run both checks: the gate requires applicability and validation checks compliance.
|
|
168
|
+
Deleting the last applicable policy fails the gate. For an empty workspace, or a
|
|
169
|
+
contract intended only for a future lifecycle state, measure
|
|
170
|
+
`state_requirement_count` instead. To require coverage of every current item,
|
|
171
|
+
also enforce a zero bound on `ungoverned_items`. Higher per-project floors can
|
|
172
|
+
protect against partial policy deletion; a floor of one only proves at least
|
|
173
|
+
one requirement applies.
|
|
@@ -6,11 +6,11 @@ This file is generated from `PM_COMMAND_CAPABILITY_CONTRACTS`. Do not edit it ma
|
|
|
6
6
|
|
|
7
7
|
| Capability family | Commands |
|
|
8
8
|
| --- | --- |
|
|
9
|
-
| workspace | `init`, `config`, `merge`, `schema`, `profile`, `ops telemetry`, `ops health`, `ops gc`, `workspace` |
|
|
10
|
-
| intake | `create`, `copy`, `context focus`, `history restore` |
|
|
11
|
-
| context | `list`, `aggregate`, `context`, `get`, `search`, `duplicates`, `ops eval`, `context next`, `history activity`, `ops stats`, `help` |
|
|
9
|
+
| workspace | `init`, `config`, `workspace merge`, `schema`, `profile`, `ops telemetry`, `ops health`, `ops gc`, `workspace` |
|
|
10
|
+
| intake | `create`, `item copy`, `context focus`, `history restore` |
|
|
11
|
+
| context | `list`, `aggregate`, `context`, `get`, `search`, `item duplicates`, `ops eval`, `context next`, `history activity`, `ops stats`, `help` |
|
|
12
12
|
| lifecycle | `update`, `update many`, `close`, `close many`, `close delete`, `claim`, `release` |
|
|
13
|
-
| evidence | `history`, `history events`, `history redact`, `history repair`, `history compact`, `history-author-acknowledge`, `append`, `comments`, `notes`, `learnings`, `files`, `docs` |
|
|
13
|
+
| evidence | `history`, `history events`, `history redact`, `history repair`, `history compact`, `history attest`, `history-author-acknowledge`, `append`, `comments`, `notes`, `learnings`, `files`, `docs` |
|
|
14
14
|
| graph | `graph`, `deps`, `plan` |
|
|
15
15
|
| quality | `test`, `ops test-all`, `ops validate`, `assurance`, `contracts`, `ops` |
|
|
16
16
|
| automation | `meet`, `event`, `remind` |
|
|
@@ -14,6 +14,7 @@ This file is generated from `PM_COMMAND_CAPABILITY_CONTRACTS`. Do not edit it ma
|
|
|
14
14
|
| `create` | core | intake |
|
|
15
15
|
| `item-reopen` | full | lifecycle |
|
|
16
16
|
| `copy` | full | intake |
|
|
17
|
+
| `item copy` | full | intake |
|
|
17
18
|
| `focus` | standard | intake |
|
|
18
19
|
| `context focus` | standard | intake |
|
|
19
20
|
| `list` | core | context |
|
|
@@ -31,6 +32,7 @@ This file is generated from `PM_COMMAND_CAPABILITY_CONTRACTS`. Do not edit it ma
|
|
|
31
32
|
| `graph` | standard | graph |
|
|
32
33
|
| `search` | core | context |
|
|
33
34
|
| `duplicates` | full | context |
|
|
35
|
+
| `item duplicates` | full | context |
|
|
34
36
|
| `eval` | full | context |
|
|
35
37
|
| `ops eval` | full | context |
|
|
36
38
|
| `next` | core | context |
|
|
@@ -44,8 +46,11 @@ This file is generated from `PM_COMMAND_CAPABILITY_CONTRACTS`. Do not edit it ma
|
|
|
44
46
|
| `history repair` | full | evidence |
|
|
45
47
|
| `history-compact` | full | evidence |
|
|
46
48
|
| `history compact` | full | evidence |
|
|
49
|
+
| `history-attest` | full | evidence |
|
|
50
|
+
| `history attest` | full | evidence |
|
|
47
51
|
| `history-author-acknowledge` | full | evidence |
|
|
48
52
|
| `merge` | full | workspace |
|
|
53
|
+
| `workspace merge` | full | workspace |
|
|
49
54
|
| `schema` | standard | workspace |
|
|
50
55
|
| `profile` | standard | workspace |
|
|
51
56
|
| `activity` | full | context |
|
|
@@ -33,6 +33,7 @@ This file is generated by `listPmFlagLexicon()`. Compatibility aliases do not co
|
|
|
33
33
|
| `next` | context | 38 | 38 |
|
|
34
34
|
| `history` | evidence | 35 | 35 |
|
|
35
35
|
| `events` | evidence | 33 | 33 |
|
|
36
|
+
| `history-attest` | evidence | 23 | 23 |
|
|
36
37
|
| `history-redact` | evidence | 27 | 27 |
|
|
37
38
|
| `history-repair` | evidence | 27 | 27 |
|
|
38
39
|
| `history-compact` | evidence | 30 | 30 |
|
|
@@ -74,6 +75,7 @@ This file is generated by `listPmFlagLexicon()`. Compatibility aliases do not co
|
|
|
74
75
|
| `event` | automation | 33 | 33 |
|
|
75
76
|
| `remind` | automation | 29 | 29 |
|
|
76
77
|
| `test-runs-worker` | internal | 25 | 25 |
|
|
78
|
+
| `history attest` | evidence | 23 | 23 |
|
|
77
79
|
| `history redact` | evidence | 27 | 27 |
|
|
78
80
|
| `history repair` | evidence | 27 | 27 |
|
|
79
81
|
| `history compact` | evidence | 30 | 30 |
|
|
@@ -92,3 +94,6 @@ This file is generated by `listPmFlagLexicon()`. Compatibility aliases do not co
|
|
|
92
94
|
| `update many` | lifecycle | 146 | 146 |
|
|
93
95
|
| `close many` | lifecycle | 72 | 72 |
|
|
94
96
|
| `close delete` | lifecycle | 24 | 24 |
|
|
97
|
+
| `item copy` | intake | 24 | 24 |
|
|
98
|
+
| `workspace merge` | workspace | 27 | 27 |
|
|
99
|
+
| `item duplicates` | context | 25 | 25 |
|
|
@@ -4,14 +4,14 @@ Tracker: `pm-f05lsg`.
|
|
|
4
4
|
|
|
5
5
|
Every catalog code is listed. An `uncovered` row is an explicit closure obligation, never an omission or implied approval.
|
|
6
6
|
|
|
7
|
-
- Catalog error codes:
|
|
7
|
+
- Catalog error codes: 374
|
|
8
8
|
- Executable error codes: 19
|
|
9
9
|
- Executable-code ratchet floor: 18
|
|
10
10
|
- Required executable canonical codes: `bulk_ids_input_empty`, `bulk_ids_input_missing_path`, `bulk_ids_input_unreadable`, `invalid_argument_value`, `manifest_unknown_key`, `missing_lifecycle_target`, `missing_required_argument`, `no_version_bounds_declared`, `projection_options_mutually_exclusive`, `tracker_not_initialized`, `tracker_root_missing`, `tracker_root_not_directory`, `tracker_root_unreadable`, `unknown_context_intent`, `unknown_field_projection`, `unknown_option`, `unknown_subcommand`
|
|
11
|
-
- Uncovered error codes:
|
|
12
|
-
- Coverage fraction: 0.
|
|
11
|
+
- Uncovered error codes: 355
|
|
12
|
+
- Coverage fraction: 0.050802
|
|
13
13
|
- Closed-domain probes: 19
|
|
14
|
-
- Grammar probes:
|
|
14
|
+
- Grammar probes: 101
|
|
15
15
|
|
|
16
16
|
| Error code | Canonical code | Disposition | Evidence kinds | Probe count |
|
|
17
17
|
| --- | --- | --- | --- | --- |
|
|
@@ -169,10 +169,13 @@ Every catalog code is listed. An `uncovered` row is an explicit closure obligati
|
|
|
169
169
|
| `invalid_reproducible_process_environment` | `invalid_reproducible_process_environment` | uncovered | none | 0 |
|
|
170
170
|
| `invalid_workspace_snapshot_target` | `invalid_workspace_snapshot_target` | uncovered | none | 0 |
|
|
171
171
|
| `item_already_active` | `item_already_active` | uncovered | none | 0 |
|
|
172
|
+
| `item_deleted` | `item_deleted` | uncovered | none | 0 |
|
|
172
173
|
| `item_document_encoding_invalid` | `item_document_encoding_invalid` | uncovered | none | 0 |
|
|
173
174
|
| `item_document_invalid` | `item_document_invalid` | uncovered | none | 0 |
|
|
174
175
|
| `item_document_roundtrip_failed` | `item_document_roundtrip_failed` | uncovered | none | 0 |
|
|
175
176
|
| `item_id_collision` | `item_id_collision` | uncovered | none | 0 |
|
|
177
|
+
| `item_identity_ambiguous` | `item_identity_ambiguous` | uncovered | none | 0 |
|
|
178
|
+
| `item_identity_conflict` | `item_identity_conflict` | uncovered | none | 0 |
|
|
176
179
|
| `item_identity_reserved` | `item_identity_reserved` | uncovered | none | 0 |
|
|
177
180
|
| `item_not_found` | `item_not_found` | uncovered | none | 0 |
|
|
178
181
|
| `likely_duplicate` | `likely_duplicate` | uncovered | none | 0 |
|
|
@@ -211,7 +214,7 @@ Every catalog code is listed. An `uncovered` row is an explicit closure obligati
|
|
|
211
214
|
| `missing_parameter_alias` | `missing_parameter_alias` | uncovered | none | 0 |
|
|
212
215
|
| `missing_positive_execution_receipt` | `missing_positive_execution_receipt` | uncovered | none | 0 |
|
|
213
216
|
| `missing_probe` | `missing_probe` | uncovered | none | 0 |
|
|
214
|
-
| `missing_required_argument` | `missing_required_argument` | executable | grammar |
|
|
217
|
+
| `missing_required_argument` | `missing_required_argument` | executable | grammar | 63 |
|
|
215
218
|
| `missing_required_option` | `missing_required_option` | uncovered | none | 0 |
|
|
216
219
|
| `missing_suggested_retry` | `missing_suggested_retry` | uncovered | none | 0 |
|
|
217
220
|
| `missing_suggested_retry_args` | `missing_suggested_retry_args` | uncovered | none | 0 |
|
|
@@ -313,13 +316,13 @@ Every catalog code is listed. An `uncovered` row is an explicit closure obligati
|
|
|
313
316
|
| `unknown_field` | `unknown_field` | uncovered | none | 0 |
|
|
314
317
|
| `unknown_field_projection` | `unknown_field_projection` | executable | closed_domain | 10 |
|
|
315
318
|
| `unknown_item_type` | `unknown_item_type` | uncovered | none | 0 |
|
|
316
|
-
| `unknown_lifecycle_action` | `unknown_subcommand` | executable | grammar, owned_state |
|
|
319
|
+
| `unknown_lifecycle_action` | `unknown_subcommand` | executable | grammar, owned_state | 12 |
|
|
317
320
|
| `unknown_noun` | `unknown_noun` | uncovered | none | 0 |
|
|
318
321
|
| `unknown_option` | `unknown_option` | executable | owned_state | 1 |
|
|
319
322
|
| `unknown_plan_template` | `unknown_plan_template` | uncovered | none | 0 |
|
|
320
323
|
| `unknown_provenance_dimension` | `unknown_provenance_dimension` | uncovered | none | 0 |
|
|
321
324
|
| `unknown_status` | `unknown_status` | uncovered | none | 0 |
|
|
322
|
-
| `unknown_subcommand` | `unknown_subcommand` | executable | grammar, owned_state |
|
|
325
|
+
| `unknown_subcommand` | `unknown_subcommand` | executable | grammar, owned_state | 12 |
|
|
323
326
|
| `unsafe_init_recovery` | `unsafe_init_recovery` | uncovered | none | 0 |
|
|
324
327
|
| `unsupported_update_option` | `unsupported_update_option` | uncovered | none | 0 |
|
|
325
328
|
| `validate_command_references_stale_pm_ids` | `validate_command_references_stale_pm_ids` | uncovered | none | 0 |
|
package/marketplace.json
CHANGED
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
8
|
"description": "Official marketplace for pm CLI — native git-based project management for Claude Code and AI coding agents.",
|
|
9
|
-
"version": "2026.9.
|
|
9
|
+
"version": "2026.9.12"
|
|
10
10
|
},
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
13
13
|
"name": "pm-claude",
|
|
14
14
|
"source": "./plugins/pm-claude",
|
|
15
15
|
"description": "Native pm CLI integration for Claude Code — 28 MCP tools, 5 workflow skills, 14 slash commands, 4 subagents, hybrid TUI task tracking, session context injection, and coordination subagents for git-based project management without leaving Claude Code.",
|
|
16
|
-
"version": "2026.9.
|
|
16
|
+
"version": "2026.9.12",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "unbrained",
|
|
19
19
|
"url": "https://github.com/unbraind/pm-cli"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unbrained/pm-cli",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.12",
|
|
4
4
|
"description": "Git-native project management CLI for humans and agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@11.10.0",
|
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
"node": ">=22.18.0"
|
|
206
206
|
},
|
|
207
207
|
"dependencies": {
|
|
208
|
-
"@sentry/node": "10.
|
|
208
|
+
"@sentry/node": "10.74.0",
|
|
209
209
|
"@toon-format/toon": "^4.1.1",
|
|
210
210
|
"@types/node": ">=22",
|
|
211
211
|
"commander": "^15.0.0",
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
"devDependencies": {
|
|
219
219
|
"@codspeed/vitest-plugin": "^5.7.1",
|
|
220
220
|
"@eslint/js": "^10.0.1",
|
|
221
|
-
"@modelcontextprotocol/ext-apps": "
|
|
221
|
+
"@modelcontextprotocol/ext-apps": "2.0.0",
|
|
222
222
|
"@sentry/cli": "^3.7.0",
|
|
223
223
|
"@types/node": "^26.5.0",
|
|
224
224
|
"@types/npm-package-arg": "^6.1.4",
|
|
@@ -230,7 +230,7 @@
|
|
|
230
230
|
"fast-check": "^4.9.0",
|
|
231
231
|
"github-slugger": "2.0.0",
|
|
232
232
|
"greptile": "^3.5.2",
|
|
233
|
-
"jscpd": "^5.
|
|
233
|
+
"jscpd": "^5.2.0",
|
|
234
234
|
"marked": "18.0.12",
|
|
235
235
|
"parse5": "8.0.1",
|
|
236
236
|
"tsx": "^4.23.13",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unbrained/pm-digital-twin",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.12",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Beyond-PM exemplar: a temporal production-facility digital twin built entirely on public pm SDK and extension primitives.",
|
|
@@ -1,9 +1,31 @@
|
|
|
1
1
|
# pm-governance-audit
|
|
2
2
|
|
|
3
|
-
Trackers: [pm-vjk3](../../.agents/pm/features/pm-vjk3.toon), [pm-mp49](../../.agents/pm/issues/pm-mp49.toon), [pm-v657](../../.agents/pm/issues/pm-v657.toon)
|
|
3
|
+
Trackers: [pm-fmy9ih](../../.agents/pm/tasks/pm-fmy9ih.toon), [pm-vjk3](../../.agents/pm/features/pm-vjk3.toon), [pm-mp49](../../.agents/pm/issues/pm-mp49.toon), [pm-v657](../../.agents/pm/issues/pm-v657.toon)
|
|
4
4
|
|
|
5
5
|
First-party package that restores optional governance audit surfaces in bare-core `pm`.
|
|
6
6
|
|
|
7
|
+
## Concurrent annotations under strict ownership
|
|
8
|
+
|
|
9
|
+
Tracked by [pm-nrkjik](../../.agents/pm/issues/pm-nrkjik.toon).
|
|
10
|
+
|
|
11
|
+
Merge-safe notes preserve independent entries during merging. Strict ownership
|
|
12
|
+
still applies to writes. For an approved append across owners, install this
|
|
13
|
+
package and use its narrow flag:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pm package install governance-audit --project
|
|
17
|
+
pm notes pm-example "Review observation" --allow-audit-comment
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The same flag works for `comments` and `learnings`. It permits additions only:
|
|
21
|
+
edit and delete still require ownership, and the existing assignee is preserved.
|
|
22
|
+
For a non-terminal handoff, the current owner runs `pm release <id>`, then the
|
|
23
|
+
new owner runs `pm claim <id>`; claim refuses work still held by another owner.
|
|
24
|
+
This changes the assignee;
|
|
25
|
+
it is a different operation from appending an observation. Bare `--force` remains
|
|
26
|
+
an explicit override requiring approval. Body `append` is not merge-safe and has
|
|
27
|
+
no annotation bypass; use a note when the information is an independent event.
|
|
28
|
+
|
|
7
29
|
## Hooks
|
|
8
30
|
|
|
9
31
|
The package also registers default-inert `onRead` and `onWrite` hooks as the
|
|
@@ -20,9 +42,9 @@ bodies and full before/after snapshots.
|
|
|
20
42
|
|
|
21
43
|
## Commands
|
|
22
44
|
|
|
23
|
-
- `pm
|
|
24
|
-
- `pm
|
|
25
|
-
- `pm comments
|
|
45
|
+
- `pm item duplicates audit`
|
|
46
|
+
- `pm item duplicates merge`
|
|
47
|
+
- `pm item audit-comments`
|
|
26
48
|
- `pm ops normalize`
|
|
27
49
|
|
|
28
50
|
The package also augments existing commands with audit-only flags:
|
|
@@ -60,9 +82,9 @@ pm install audit --project
|
|
|
60
82
|
## Verify
|
|
61
83
|
|
|
62
84
|
```bash
|
|
63
|
-
pm
|
|
64
|
-
pm
|
|
65
|
-
pm comments
|
|
85
|
+
pm item duplicates audit --mode parent_scope --status all --limit 20 --json
|
|
86
|
+
pm item duplicates merge --keep pm-canonical --close pm-duplicate --dry-run --json
|
|
87
|
+
pm item audit-comments --latest 3 --limit-items 20 --limit-rows 50 --json
|
|
66
88
|
pm ops normalize --dry-run --json
|
|
67
89
|
```
|
|
68
90
|
|
|
@@ -82,3 +104,5 @@ result. The older `--limit` spelling remains a deprecated alias for
|
|
|
82
104
|
`--limit-rows`; do not combine the two row-limit spellings.
|
|
83
105
|
|
|
84
106
|
`pm normalize` remains a compatibility alias for `pm ops normalize`.
|
|
107
|
+
|
|
108
|
+
`dedupe-audit`, `dedupe-merge`, and `comments-audit` remain hidden compatibility aliases. Core `pm item duplicates` discovers bounded candidate clusters; this package adds detailed audit and explicit reconciliation. Comment coverage is an independent item audit, not a duplicate detector. SDK action names remain unchanged.
|
|
@@ -321,9 +321,10 @@ const allowAuditCommentFlags = [
|
|
|
321
321
|
},
|
|
322
322
|
];
|
|
323
323
|
|
|
324
|
+
/** Expose duplicate discovery under the item namespace while retaining its stable action and read-only handler. */
|
|
324
325
|
function dedupeAuditCommand(): CommandDefinition {
|
|
325
326
|
return {
|
|
326
|
-
name: "
|
|
327
|
+
name: "item duplicates audit",
|
|
327
328
|
action: "dedupe-audit",
|
|
328
329
|
description:
|
|
329
330
|
"Audit likely duplicate items by title and parent scope heuristics.",
|
|
@@ -334,9 +335,10 @@ function dedupeAuditCommand(): CommandDefinition {
|
|
|
334
335
|
};
|
|
335
336
|
}
|
|
336
337
|
|
|
338
|
+
/** Declare duplicate consolidation flags and route preview or apply requests to the existing package handler. */
|
|
337
339
|
function dedupeMergeCommand(): CommandDefinition {
|
|
338
340
|
return {
|
|
339
|
-
name: "
|
|
341
|
+
name: "item duplicates merge",
|
|
340
342
|
action: "dedupe-merge",
|
|
341
343
|
description:
|
|
342
344
|
"Consolidate duplicates into a canonical item: re-parent active children and close duplicates with duplicate_of.",
|
|
@@ -347,9 +349,10 @@ function dedupeMergeCommand(): CommandDefinition {
|
|
|
347
349
|
};
|
|
348
350
|
}
|
|
349
351
|
|
|
352
|
+
/** Register bounded comment-coverage inspection under the item namespace with the existing action identity. */
|
|
350
353
|
function commentsAuditCommand(): CommandDefinition {
|
|
351
354
|
return {
|
|
352
|
-
name: "comments
|
|
355
|
+
name: "item audit-comments",
|
|
353
356
|
action: "comments-audit",
|
|
354
357
|
description: "Audit item comment coverage and export comment history rows.",
|
|
355
358
|
intent: "Audit comment coverage and read bounded comment-history evidence.",
|