@unbrained/pm-cli 2026.8.9 → 2026.8.11
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 +142 -80
- package/dist/cli/commander-usage.js +94 -17
- package/dist/cli/error-guidance.d.ts +10 -0
- package/dist/cli/error-guidance.js +76 -25
- package/dist/cli/help-json-payload.js +51 -16
- package/dist/cli/main.js +11 -6
- package/dist/cli/register-assurance.d.ts +8 -0
- package/dist/cli/register-assurance.js +52 -0
- package/dist/cli/register-files-lookup.js +14 -3
- package/dist/cli/register-mutation.js +30 -9
- package/dist/cli/register-operations.js +16 -11
- package/dist/cli-bundle/bundle-manifest.json +163 -163
- package/dist/cli-bundle/chunks/{chunk-RJC7TPF4.js → chunk-2OOU2AFH.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-2RA2YTHJ.js +33 -0
- package/dist/cli-bundle/chunks/chunk-A2SJGHSI.js +3 -0
- package/dist/cli-bundle/chunks/chunk-DSKYD4LG.js +13 -0
- package/dist/cli-bundle/chunks/chunk-HC3GM6YY.js +194 -0
- package/dist/cli-bundle/chunks/chunk-IUNRVDAI.js +2 -0
- package/dist/cli-bundle/chunks/chunk-W7CPZGSB.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-YC3UF2IO.js → chunk-WMEZHCFI.js} +66 -60
- package/dist/cli-bundle/chunks/{chunk-GMX5YOI3.js → chunk-ZU34C3LH.js} +48 -48
- package/dist/cli-bundle/chunks/chunk-ZXOC6HG5.js +5 -0
- package/dist/cli-bundle/chunks/{register-list-query-BUE7PTCU.js → register-list-query-HAUXVUPY.js} +8 -8
- package/dist/cli-bundle/chunks/register-mutation-7Y5U7ABT.js +20 -0
- package/dist/cli-bundle/chunks/register-operations-EQX3DLAZ.js +2 -0
- package/dist/cli-bundle/chunks/{register-setup-UQDTNTLJ.js → register-setup-NOCOOWQY.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-KNEHLPBF.js → chunk-23FTGO3W.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-6DO4YQWZ.js → chunk-2DL3MRTD.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-3AYKXMYX.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-4AHEC74N.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-MRWVJ3ZG.js → chunk-4H5IA6AV.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-4SV3ZKG3.js +16 -0
- package/dist/cli-bundle/focused-chunks/chunk-55BIB6DV.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-6JW6Z2P5.js +8 -0
- package/dist/cli-bundle/focused-chunks/chunk-BKPIY34S.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-D4PIWE6D.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-DPO7TEFX.js +31 -0
- package/dist/cli-bundle/focused-chunks/{chunk-3WVHTUAW.js → chunk-E3KCL7AY.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-ERAAFLPS.js +153 -0
- package/dist/cli-bundle/focused-chunks/chunk-F6E4JZKG.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-FPSYO5ZG.js +18 -0
- package/dist/cli-bundle/focused-chunks/{chunk-73FIJONU.js → chunk-J5EKAIVD.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-KDH5OX3D.js +4 -0
- package/dist/cli-bundle/focused-chunks/chunk-OJ3LVVIS.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-TL5M2PAY.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-UDAZWT25.js +6 -0
- package/dist/cli-bundle/focused-chunks/chunk-VABB4L5Y.js +17 -0
- package/dist/cli-bundle/main.js +13 -13
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +1 -1
- package/dist/cli-bundle/sdk-core.js +41 -39
- 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 +1 -1
- 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 +2 -2
- package/dist/core/diagnostics/remediation.js +9 -9
- package/dist/core/fs/fs-utils.d.ts +10 -0
- package/dist/core/fs/fs-utils.js +16 -4
- package/dist/core/item/item-format.js +3 -32
- package/dist/core/schema/fields-file.d.ts +1 -2
- package/dist/core/schema/fields-file.js +4 -11
- package/dist/core/schema/runtime-schema.js +3 -10
- package/dist/core/schema/status-defs-file.d.ts +1 -2
- package/dist/core/schema/status-defs-file.js +4 -32
- package/dist/core/schema/status-token.d.ts +2 -0
- package/dist/core/schema/status-token.js +32 -0
- package/dist/core/schema/type-workflows.d.ts +1 -2
- package/dist/core/schema/type-workflows.js +4 -11
- package/dist/core/session/session-state.d.ts +47 -0
- package/dist/core/session/session-state.js +207 -6
- package/dist/core/shared/author.d.ts +8 -2
- package/dist/core/shared/author.js +85 -52
- package/dist/core/shared/errors.d.ts +12 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/shared/text-normalization.d.ts +1 -1
- package/dist/core/shared/text-normalization.js +2 -2
- package/dist/sdk/agent/command-recovery.d.ts +4 -0
- package/dist/sdk/agent/command-recovery.js +52 -0
- package/dist/sdk/agent/command-suggestions.d.ts +4 -0
- package/dist/sdk/agent/command-suggestions.js +67 -0
- package/dist/sdk/agent/create-option-policy.d.ts +12 -0
- package/dist/sdk/agent/create-option-policy.js +32 -0
- package/dist/sdk/agent/item-addressing.d.ts +19 -0
- package/dist/sdk/agent/item-addressing.js +208 -0
- package/dist/sdk/agent/refusal-reachability.d.ts +40 -0
- package/dist/sdk/agent/refusal-reachability.js +72 -0
- package/dist/sdk/agent/subcommand-recovery.d.ts +40 -0
- package/dist/sdk/agent/subcommand-recovery.js +84 -0
- package/dist/sdk/cli-bootstrap.d.ts +9 -1
- package/dist/sdk/cli-bootstrap.js +25 -10
- package/dist/sdk/cli-contracts/commander-mutation-options.js +16 -4
- package/dist/sdk/cli-contracts/completeness.js +13 -3
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.js +3 -2
- package/dist/sdk/cli-contracts/flag-contracts.d.ts +2 -0
- package/dist/sdk/cli-contracts/flag-contracts.js +77 -21
- package/dist/sdk/cli-contracts/registration-helpers.js +10 -2
- package/dist/sdk/cli-contracts/runtime-contracts.js +6 -3
- package/dist/sdk/cli-contracts/schemas/assurance-definition.d.ts +513 -0
- package/dist/sdk/cli-contracts/schemas/assurance-definition.js +251 -0
- package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +6 -0
- package/dist/sdk/cli-contracts/tool-option-contracts.js +4 -2
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +96 -4
- package/dist/sdk/cli-contracts/tool-schema.d.ts +2 -2
- package/dist/sdk/cli-contracts/tool-schema.js +49 -6
- package/dist/sdk/cli-contracts.d.ts +1 -1
- package/dist/sdk/cli-contracts.js +3 -3
- package/dist/sdk/completion.js +9 -3
- package/dist/sdk/config.js +9 -3
- package/dist/sdk/context/semantic-session-attribution.d.ts +32 -0
- package/dist/sdk/context/semantic-session-attribution.js +83 -0
- package/dist/sdk/context-intent-runtime.js +8 -5
- package/dist/sdk/context-signal-store.d.ts +34 -0
- package/dist/sdk/context-signal-store.js +24 -2
- package/dist/sdk/core-governance.d.ts +3 -1
- package/dist/sdk/core-governance.js +5 -3
- package/dist/sdk/core.d.ts +1 -1
- package/dist/sdk/core.js +2 -2
- package/dist/sdk/dependency-flag-validation.d.ts +15 -1
- package/dist/sdk/dependency-flag-validation.js +54 -2
- package/dist/sdk/error-code-catalog.d.ts +13 -0
- package/dist/sdk/error-code-catalog.js +35 -2
- package/dist/sdk/extension.js +18 -17
- package/dist/sdk/files.d.ts +11 -0
- package/dist/sdk/files.js +82 -24
- package/dist/sdk/generated-error-code-catalog.js +104 -13
- package/dist/sdk/governance/assurance-action-contracts.d.ts +7 -0
- package/dist/sdk/governance/assurance-action-contracts.js +5 -0
- package/dist/sdk/governance/assurance-action.d.ts +70 -0
- package/dist/sdk/governance/assurance-action.js +198 -0
- package/dist/sdk/governance/assurance-limits.d.ts +7 -0
- package/dist/sdk/governance/assurance-limits.js +11 -0
- package/dist/sdk/governance/assurance-runtime.d.ts +20 -0
- package/dist/sdk/governance/assurance-runtime.js +131 -0
- package/dist/sdk/governance/assurance.d.ts +432 -0
- package/dist/sdk/governance/assurance.js +689 -0
- package/dist/sdk/governance/health.js +14 -7
- package/dist/sdk/governance/provenance-health.d.ts +13 -0
- package/dist/sdk/governance/provenance-health.js +63 -17
- package/dist/sdk/governance/validate-item-reader.d.ts +13 -0
- package/dist/sdk/governance/validate-item-reader.js +18 -0
- package/dist/sdk/governance/validate.d.ts +2 -2
- package/dist/sdk/governance/validate.js +15 -6
- package/dist/sdk/graph/run.js +8 -3
- package/dist/sdk/index.d.ts +10 -1
- package/dist/sdk/index.js +12 -3
- package/dist/sdk/lifecycle/claim.js +18 -3
- package/dist/sdk/lifecycle/close.js +17 -14
- package/dist/sdk/lifecycle/create.d.ts +2 -0
- package/dist/sdk/lifecycle/create.js +62 -9
- package/dist/sdk/lifecycle/focus.js +13 -3
- package/dist/sdk/lifecycle/plan.js +8 -3
- package/dist/sdk/lifecycle/update-many.js +39 -27
- package/dist/sdk/lifecycle/update.d.ts +6 -1
- package/dist/sdk/lifecycle/update.js +47 -10
- package/dist/sdk/merge/index.d.ts +1 -1
- package/dist/sdk/merge/index.js +3 -3
- package/dist/sdk/merge/install.d.ts +4 -0
- package/dist/sdk/merge/install.js +28 -16
- package/dist/sdk/merge/receipts.d.ts +3 -0
- package/dist/sdk/merge/receipts.js +81 -17
- package/dist/sdk/output-projection.js +24 -4
- package/dist/sdk/provenance.d.ts +38 -0
- package/dist/sdk/provenance.js +64 -2
- package/dist/sdk/query/context.d.ts +2 -0
- package/dist/sdk/query/context.js +24 -10
- package/dist/sdk/query/light-metadata.d.ts +3 -0
- package/dist/sdk/query/light-metadata.js +19 -0
- package/dist/sdk/runtime-extended-actions.js +22 -5
- package/dist/sdk/runtime-primitives.d.ts +2 -0
- package/dist/sdk/runtime-primitives.js +4 -2
- package/dist/sdk/runtime.d.ts +8 -1
- package/dist/sdk/runtime.js +37 -28
- package/dist/sdk/schema-migration.js +7 -9
- package/dist/sdk/similarity-scoring.d.ts +1 -2
- package/dist/sdk/similarity-scoring.js +4 -16
- package/dist/sdk/telemetry.js +7 -4
- package/dist/sdk/traceability/runtime-files-lookup.d.ts +8 -0
- package/dist/sdk/traceability/runtime-files-lookup.js +33 -0
- package/dist/sdk/traceability/source-traceability.d.ts +102 -0
- package/dist/sdk/traceability/source-traceability.js +293 -0
- package/dist/sdk/workspace-snapshot.d.ts +4 -0
- package/dist/sdk/workspace-snapshot.js +24 -11
- package/dist/types.d.ts +8 -2
- package/dist/types.js +2 -2
- package/docs/AGENT_GUIDE.md +3 -1
- package/docs/ASSURANCE.md +132 -0
- package/docs/COMMANDS.md +8 -5
- package/docs/MERGE_SAFETY.md +7 -5
- package/docs/README.md +3 -5
- package/docs/READ_OUTPUT_CONTRACTS.md +2 -2
- package/docs/RELEASING.md +9 -5
- package/docs/SDK.md +44 -8
- package/docs/SDK_AGENT_SESSION_CONTEXT.md +43 -6
- package/docs/SDK_CONTEXT.md +97 -0
- package/docs/SDK_CONTEXT_INTEGRITY.md +18 -3
- package/docs/SDK_EVIDENCE_TRACEABILITY.md +39 -1
- package/docs/SDK_RUNTIME_BOUNDARIES.md +36 -1
- package/docs/TESTING.md +12 -9
- package/docs/agent-task-token-baseline.json +2 -2
- package/docs/generated/AGENT_COMMAND_SURFACE.md +1 -0
- package/marketplace.json +2 -2
- package/package.json +7 -6
- 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/extensions/templates/index.ts +9 -3
- 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/sdk/public-surface.json +1028 -48
- package/dist/cli-bundle/chunks/chunk-2DTCZXSD.js +0 -13
- package/dist/cli-bundle/chunks/chunk-5JO6R4BS.js +0 -3
- package/dist/cli-bundle/chunks/chunk-5KN4DZYV.js +0 -194
- package/dist/cli-bundle/chunks/chunk-EF43KODO.js +0 -2
- package/dist/cli-bundle/chunks/chunk-HUV2Z7IS.js +0 -28
- package/dist/cli-bundle/chunks/chunk-MHBVCUF2.js +0 -2
- package/dist/cli-bundle/chunks/chunk-PYO5GZU6.js +0 -5
- package/dist/cli-bundle/chunks/register-mutation-FC3XLVIK.js +0 -20
- package/dist/cli-bundle/chunks/register-operations-YH2WAOXU.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-2VVP5RAA.js +0 -153
- package/dist/cli-bundle/focused-chunks/chunk-3GSFUDAI.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-4H6MVCK3.js +0 -16
- package/dist/cli-bundle/focused-chunks/chunk-54TZJ4BM.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-5NK5TJ5D.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-C3GCHDSQ.js +0 -31
- package/dist/cli-bundle/focused-chunks/chunk-JGRSQZJT.js +0 -18
- package/dist/cli-bundle/focused-chunks/chunk-NL57J7BZ.js +0 -4
- package/dist/cli-bundle/focused-chunks/chunk-P6BBIQRG.js +0 -6
- package/dist/cli-bundle/focused-chunks/chunk-PZAGVQNN.js +0 -3
- package/dist/cli-bundle/focused-chunks/chunk-QDAO3XEK.js +0 -14
- package/dist/cli-bundle/focused-chunks/chunk-T4IGQCSY.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-U46GQJNY.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-VRXJSGIT.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-XC2ZW3CJ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-ZG54B4XG.js +0 -2
|
@@ -12,6 +12,8 @@ Use `pm files lookup` with one or more project-relative or absolute paths:
|
|
|
12
12
|
pm files lookup src/sdk/files.ts
|
|
13
13
|
pm files lookup src/sdk/files.ts docs/SDK_EVIDENCE_TRACEABILITY.md --limit 20
|
|
14
14
|
pm files lookup /absolute/project/src/sdk/files.ts --scope project --strict-read --json
|
|
15
|
+
pm files lookup src/sdk/files.ts --explain
|
|
16
|
+
pm files lookup src/sdk/files.ts --lines 650:720 --decision-depth 12 --json
|
|
15
17
|
```
|
|
16
18
|
|
|
17
19
|
The command normalizes in-project absolute paths to project-relative paths, deduplicates targets, and returns referencing items in deterministic priority, update-time, and ID order. The default result limit is 50. Use `--offset` for bounded pagination or `--no-truncate` for an authoritative unbounded source scan.
|
|
@@ -26,6 +28,34 @@ Every response includes:
|
|
|
26
28
|
|
|
27
29
|
`--strict-read` fails instead of returning partial source-scan results. Indexed reads are intentionally reported as `unchecked`: they are cursor-bound projections optimized for bounded context retrieval, while strict reads force authoritative item loading.
|
|
28
30
|
|
|
31
|
+
## Explain why source exists
|
|
32
|
+
|
|
33
|
+
`--explain` upgrades reverse lookup from an ownership list to a bounded context
|
|
34
|
+
projection. Every match adds:
|
|
35
|
+
|
|
36
|
+
- its linked-file evidence and compact `value`, `why_now`, `outcome`, and
|
|
37
|
+
`objective` rationale;
|
|
38
|
+
- the shortest typed relationship path to a governing Decision, including
|
|
39
|
+
inverse edge names when traversal crosses an edge backwards;
|
|
40
|
+
- a deterministic relevance score used before normal priority, update-time,
|
|
41
|
+
and id tie-breakers; and
|
|
42
|
+
- explicit ambiguity codes when Git attribution is unavailable, selected lines
|
|
43
|
+
have no mapped commit, no governing Decision is reachable, or several
|
|
44
|
+
equally short Decisions exist.
|
|
45
|
+
|
|
46
|
+
`--lines start:end` is an inclusive, one-based selector that implies
|
|
47
|
+
`--explain` and accepts exactly one path. It runs bounded `git blame` and a
|
|
48
|
+
256-commit path log. A blamed commit contributes only when its commit message
|
|
49
|
+
contains the exact pm item id, so Git history supplements linked tracker
|
|
50
|
+
evidence without inventing lineage. Git failures are non-fatal and appear as
|
|
51
|
+
ambiguity rather than silently claiming attribution. `--decision-depth` is
|
|
52
|
+
bounded from 1 through 32 and defaults to 8.
|
|
53
|
+
|
|
54
|
+
The top-level `traceability_receipt` reports the requested range, blamed,
|
|
55
|
+
mapped, and unmapped commit counts, and effective decision depth. Explained
|
|
56
|
+
lookups use an authoritative source scan because a compact metadata index does
|
|
57
|
+
not contain the rationale and graph fields required to support the answer.
|
|
58
|
+
|
|
29
59
|
## SDK and MCP
|
|
30
60
|
|
|
31
61
|
The public SDK exposes both reusable-client and one-shot forms:
|
|
@@ -37,6 +67,9 @@ const client = new PmClient({ cwd: process.cwd() });
|
|
|
37
67
|
const fromClient = await client.filesLookup({
|
|
38
68
|
paths: ["src/sdk/files.ts"],
|
|
39
69
|
limit: 20,
|
|
70
|
+
explain: true,
|
|
71
|
+
lineRange: { start: 650, end: 720 },
|
|
72
|
+
decisionDepth: 12,
|
|
40
73
|
});
|
|
41
74
|
|
|
42
75
|
const oneShot = await filesLookup(
|
|
@@ -45,7 +78,12 @@ const oneShot = await filesLookup(
|
|
|
45
78
|
);
|
|
46
79
|
```
|
|
47
80
|
|
|
48
|
-
The MCP `files` action uses the same primitive when `lookupPath` is present
|
|
81
|
+
The MCP `files` action uses the same primitive when `lookupPath` is present and
|
|
82
|
+
accepts `explain`, `lines`, and `decisionDepth`. The dedicated `files_lookup`
|
|
83
|
+
tool exposes the same fields. `id` remains required for item-local add, remove,
|
|
84
|
+
discover, and list operations; reverse lookup instead requires one or more
|
|
85
|
+
`lookupPath` values. Use `pm contracts --command files --flags-only --json` for
|
|
86
|
+
the active machine contract.
|
|
49
87
|
|
|
50
88
|
SDK hosts that manage authoritative item writes directly can use `queryLinkedFileMetadataIndex` from the public item-metadata-index surface. The reverse projection is rebuilt from linked-file collections and updated in the same derived-index writer section as normal metadata deltas. A missing, stale, corrupt, or extension-incompatible index must fall back to authoritative reads.
|
|
51
89
|
|
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Tracker: [pm-1eted6](../.agents/pm/issues/pm-1eted6.toon),
|
|
4
4
|
[pm-3lhth4](../.agents/pm/issues/pm-3lhth4.toon), and
|
|
5
|
-
[pm-0xmajx](../.agents/pm/issues/pm-0xmajx.toon).
|
|
5
|
+
[pm-0xmajx](../.agents/pm/issues/pm-0xmajx.toon). Refusal reachability and
|
|
6
|
+
recovery completeness are tracked by
|
|
7
|
+
[pm-elmpav](../.agents/pm/features/pm-elmpav.toon),
|
|
8
|
+
[pm-185870](../.agents/pm/issues/pm-185870.toon), and
|
|
9
|
+
[pm-yqe0mo](../.agents/pm/issues/pm-yqe0mo.toon).
|
|
6
10
|
|
|
7
11
|
These SDK primitives keep host and project-runtime policy consistent across the
|
|
8
12
|
bundled CLI, packages, and automation without requiring consumers to reproduce
|
|
@@ -56,3 +60,34 @@ guidance when presenting refusals as human-readable or structured output.
|
|
|
56
60
|
Host-only validation remains at the transport boundary, while rules shared by
|
|
57
61
|
packages and commands live in public SDK primitives so callers receive the
|
|
58
62
|
same refusal contract regardless of entrypoint.
|
|
63
|
+
|
|
64
|
+
`createUnknownSubcommandError` is the shared constructor for positional command
|
|
65
|
+
families. It emits `unknown_subcommand` with the stable
|
|
66
|
+
`unknown_positional_token` reason, a complete sorted `allowed_values` set, the
|
|
67
|
+
attempted command, and a nearest copy-pasteable retry when edit distance gives
|
|
68
|
+
an unambiguous candidate. CLI, direct SDK dispatch, MCP, and package hosts use
|
|
69
|
+
the same primitive. The CLI also recognizes split schema actions such as
|
|
70
|
+
`schema add type Name` and recommends the declared `schema add-type Name`
|
|
71
|
+
form instead of collapsing the failure into a generic arity error.
|
|
72
|
+
Core graph, config, plan, schema, profile, merge, telemetry, workspace, and
|
|
73
|
+
package/extension lifecycle dispatchers use this contract. The bundled
|
|
74
|
+
templates package demonstrates the same primitive for package-registered
|
|
75
|
+
families; custom packages can import it from the public SDK instead of
|
|
76
|
+
inventing a private refusal envelope. The former `unknown_lifecycle_action`
|
|
77
|
+
catalog name remains a compatibility alias of `unknown_subcommand`.
|
|
78
|
+
|
|
79
|
+
`PmErrorCodeContract.owned_states` declares concrete refusal states, their
|
|
80
|
+
probe ids, reachable entrypoints, and expected exit classes. The generated
|
|
81
|
+
catalog joins those declarations to the discovered error-code inventory.
|
|
82
|
+
Package and test harnesses can pass real-entrypoint observations to
|
|
83
|
+
`verifyPmRefusalReachability`; missing probes, wrong codes, wrong exit classes,
|
|
84
|
+
and undeclared observations fail closed. This makes an error code's existence
|
|
85
|
+
and its runtime reachability independently testable.
|
|
86
|
+
|
|
87
|
+
Unknown-option recovery separates human and machine budgets. Human guidance
|
|
88
|
+
shows the first three ranked command paths plus an explicit remainder count.
|
|
89
|
+
The structured envelope returns up to twelve ranked paths alongside
|
|
90
|
+
`candidate_commands_total` and `candidate_commands_truncated`, ordered by
|
|
91
|
+
shared option vocabulary and then command path. Consumers must inspect another
|
|
92
|
+
command contract before changing operations; candidate discovery is not an
|
|
93
|
+
instruction to run a different command.
|
package/docs/TESTING.md
CHANGED
|
@@ -242,12 +242,12 @@ baseline, scorer tests, and SDK documentation together.
|
|
|
242
242
|
Tracked by [pm-k6t4yb](../.agents/pm/tasks/pm-k6t4yb.toon) and
|
|
243
243
|
[pm-b2hc4x](../.agents/pm/tasks/pm-b2hc4x.toon).
|
|
244
244
|
|
|
245
|
-
Every
|
|
246
|
-
|
|
247
|
-
|
|
245
|
+
Every workflow job is discovered by its stable `workflow-file#job-id` identity
|
|
246
|
+
and matched exactly against `scripts/release/gate-registry.json`; human-facing
|
|
247
|
+
step names never define the inventory. Each registry entry declares:
|
|
248
248
|
|
|
249
249
|
- a canonical pm owner;
|
|
250
|
-
- the enforced workflow
|
|
250
|
+
- the enforced workflow jobs it participates in;
|
|
251
251
|
- actionable failure taxonomy;
|
|
252
252
|
- explicit bypass policy and audit rationale;
|
|
253
253
|
- an executable negative-control test and assertion.
|
|
@@ -259,11 +259,14 @@ pnpm quality:gate-registry
|
|
|
259
259
|
node scripts/release/gate-registry.mjs --inventory
|
|
260
260
|
```
|
|
261
261
|
|
|
262
|
-
`pnpm quality:static` includes the registry. A
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
mapped to exact evidence strings and an
|
|
266
|
-
documentation cannot silently advertise advisory
|
|
262
|
+
`pnpm quality:static` includes the registry. A new workflow job fails until it
|
|
263
|
+
is declared under at least one canonical gate, and a removed or renamed job id
|
|
264
|
+
fails until stale policy is reconciled. Display-name edits do not mutate gate
|
|
265
|
+
identity. Public source claims are mapped to exact evidence strings and an
|
|
266
|
+
enforced registry entry so documentation cannot silently advertise advisory
|
|
267
|
+
behavior.
|
|
268
|
+
The inventory output lists registry-derived `registered` job IDs beside the
|
|
269
|
+
parsed `workflow_jobs`; validation requires the two sets to match exactly.
|
|
267
270
|
|
|
268
271
|
## Tracker Context-Quality Ratchets
|
|
269
272
|
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"id": "returning-agent",
|
|
17
|
-
"max_estimated_tokens":
|
|
17
|
+
"max_estimated_tokens": 597
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"id": "failing-command",
|
|
21
21
|
"max_estimated_tokens": 197
|
|
22
22
|
}
|
|
23
23
|
],
|
|
24
|
-
"composite_max_estimated_tokens":
|
|
24
|
+
"composite_max_estimated_tokens": 2651
|
|
25
25
|
}
|
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.8.
|
|
9
|
+
"version": "2026.8.11"
|
|
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.8.
|
|
16
|
+
"version": "2026.8.11",
|
|
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.8.
|
|
3
|
+
"version": "2026.8.11",
|
|
4
4
|
"description": "Git-native project management CLI for humans and agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@11.10.0",
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"lint:complexity:baseline": "eslint . --suppress-rule complexity --suppress-rule sonarjs/cognitive-complexity",
|
|
121
121
|
"lint:duplicates": "jscpd --config .jscpd.json",
|
|
122
122
|
"lint:codefactor": "pnpm quality:static",
|
|
123
|
-
"quality:static": "pnpm build && pnpm exec tsx scripts/release/static-quality-gate.mts --max-eslint-suppressions 114 --max-coverage-ignore-pragmas 477 --min-docstring-coverage 100 --min-exported-docstring-coverage 100 --min-member-docstring-coverage 100 && node scripts/release/audit-package-boundary.mjs && node scripts/release/package-sdk-contract-parity.mjs && node scripts/release/surface-replication-gate.mjs && node scripts/release/token-budget-gate.mjs && node scripts/release/context-intent-calibration-gate.mjs && node scripts/release/tracker-measurement-gate.mjs && node scripts/release/gate-registry.mjs && node scripts/sdk-surface-snapshot.mjs --check && node scripts/bench/sdk-entrypoint-costs.mjs --check && node scripts/bench/cli-transport-floor.mjs --check",
|
|
123
|
+
"quality:static": "pnpm build && pnpm exec tsx scripts/release/static-quality-gate.mts --max-eslint-suppressions 114 --max-coverage-ignore-pragmas 477 --min-docstring-coverage 100 --min-exported-docstring-coverage 100 --min-member-docstring-coverage 100 && node scripts/release/audit-package-boundary.mjs && node scripts/release/package-sdk-contract-parity.mjs && node scripts/release/surface-replication-gate.mjs && node scripts/release/absence-tolerance-gate.mjs && node scripts/release/token-budget-gate.mjs && node scripts/release/context-intent-calibration-gate.mjs && node scripts/release/tracker-measurement-gate.mjs && node scripts/release/gate-registry.mjs && node scripts/sdk-surface-snapshot.mjs --check && node scripts/bench/sdk-entrypoint-costs.mjs --check && node scripts/bench/cli-transport-floor.mjs --check",
|
|
124
124
|
"quality:token-budget": "node scripts/release/token-budget-gate.mjs",
|
|
125
125
|
"quality:token-surface": "node scripts/measure-agent-token-surface.mjs --check",
|
|
126
126
|
"quality:token-surface:update": "pnpm build && node scripts/measure-agent-token-surface.mjs --update",
|
|
@@ -133,6 +133,7 @@
|
|
|
133
133
|
"quality:tracker-measurements": "pnpm build && node scripts/release/tracker-measurement-gate.mjs",
|
|
134
134
|
"quality:package-artifact": "pnpm build && node scripts/release/package-artifact-gate.mjs",
|
|
135
135
|
"quality:surface-replication": "node scripts/release/surface-replication-gate.mjs",
|
|
136
|
+
"quality:absence-tolerance": "node scripts/release/absence-tolerance-gate.mjs",
|
|
136
137
|
"quality:docs-skills": "node scripts/release/docs-skills-gate.mjs",
|
|
137
138
|
"quality:docs-links": "node scripts/release/docs-skills-gate.mjs --links-only",
|
|
138
139
|
"quality:hosted-analysis": "node scripts/release/hosted-analysis-gate.mjs",
|
|
@@ -160,8 +161,8 @@
|
|
|
160
161
|
"version:next": "node scripts/release-version.mjs next",
|
|
161
162
|
"version:sync": "node scripts/sync-versions.mjs apply",
|
|
162
163
|
"changelog:pm:install": "node dist/cli.js install npm:pm-changelog --project",
|
|
163
|
-
"changelog:pm": "pnpm changelog:pm:install && node dist/cli.js changelog generate --output CHANGELOG.md --title \"Changelog\" --mode replace --all-release-tags --status closed --item-url-base https://github.com/unbraind/pm-cli/blob/main/.agents/pm",
|
|
164
|
-
"changelog:pm:check": "pnpm changelog:pm:install && node dist/cli.js changelog generate --output CHANGELOG.md --title \"Changelog\" --mode replace --all-release-tags --status closed --item-url-base https://github.com/unbraind/pm-cli/blob/main/.agents/pm --check",
|
|
164
|
+
"changelog:pm": "pnpm changelog:pm:install && node dist/cli.js changelog generate --output CHANGELOG.md --title \"Changelog\" --mode replace --all-release-tags --status closed --exclude-tag changelog-exclude --item-url-base https://github.com/unbraind/pm-cli/blob/main/.agents/pm",
|
|
165
|
+
"changelog:pm:check": "pnpm changelog:pm:install && node dist/cli.js changelog generate --output CHANGELOG.md --title \"Changelog\" --mode replace --all-release-tags --status closed --exclude-tag changelog-exclude --item-url-base https://github.com/unbraind/pm-cli/blob/main/.agents/pm --check",
|
|
165
166
|
"release:notes": "node scripts/generate-release-notes.mjs",
|
|
166
167
|
"release:gates": "node scripts/release/run-gates.mjs --telemetry-mode best-effort",
|
|
167
168
|
"verify:preflight": "node scripts/release/run-gates.mjs --telemetry-mode best-effort",
|
|
@@ -210,11 +211,11 @@
|
|
|
210
211
|
"@codspeed/vitest-plugin": "^5.7.1",
|
|
211
212
|
"@eslint/js": "^10.0.1",
|
|
212
213
|
"@sentry/cli": "^3.6.2",
|
|
213
|
-
"@types/node": "^26.
|
|
214
|
+
"@types/node": "^26.2.0",
|
|
214
215
|
"@types/npm-package-arg": "^6.1.4",
|
|
215
216
|
"@vitest/coverage-v8": "^4.1.10",
|
|
216
217
|
"esbuild": "0.28.1",
|
|
217
|
-
"eslint": "^10.8.
|
|
218
|
+
"eslint": "^10.8.1",
|
|
218
219
|
"eslint-plugin-sonarjs": "^4.2.0",
|
|
219
220
|
"eslint-plugin-unicorn": "^73.0.0",
|
|
220
221
|
"fast-check": "^4.9.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unbrained/pm-digital-twin",
|
|
3
|
-
"version": "2026.8.
|
|
3
|
+
"version": "2026.8.11",
|
|
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.",
|
|
@@ -8,6 +8,7 @@ import type {
|
|
|
8
8
|
ExtensionApi,
|
|
9
9
|
GlobalOptions,
|
|
10
10
|
} from "@unbrained/pm-cli/sdk";
|
|
11
|
+
import { createUnknownSubcommandError } from "@unbrained/pm-cli/sdk";
|
|
11
12
|
import {
|
|
12
13
|
runTemplatesList as runTemplatesListPackage,
|
|
13
14
|
runTemplatesSave as runTemplatesSavePackage,
|
|
@@ -53,9 +54,14 @@ function assertListInvocation(
|
|
|
53
54
|
): void {
|
|
54
55
|
const unexpectedSubcommand = args.find((arg) => arg.trim().length > 0);
|
|
55
56
|
if (unexpectedSubcommand) {
|
|
56
|
-
throw
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
throw createUnknownSubcommandError({
|
|
58
|
+
command_path: "templates",
|
|
59
|
+
token: unexpectedSubcommand,
|
|
60
|
+
allowed: ["list", "save", "show"],
|
|
61
|
+
message_suffix:
|
|
62
|
+
". Apply a saved template with pm create <type> <title> --template <name>.",
|
|
63
|
+
examples: ["pm create <type> <title> --template <name>"],
|
|
64
|
+
});
|
|
59
65
|
}
|
|
60
66
|
const unexpectedOptions = optionKeys(options);
|
|
61
67
|
if (unexpectedOptions.length > 0) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pm-claude",
|
|
3
3
|
"description": "Native pm CLI integration for Claude Code — 28 MCP tools, 5 workflow skills, 14 slash commands, 4 subagents (coordinator, delivery-chain, triage, verification), hybrid TUI task tracking (pm as persistent store + Claude Code task panel as live view), session context injection, and full git-based project management without leaving Claude Code.",
|
|
4
|
-
"version": "2026.8.
|
|
4
|
+
"version": "2026.8.11",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "unbrained",
|
|
7
7
|
"url": "https://github.com/unbraind/pm-cli"
|