@unbrained/pm-cli 2026.9.23 → 2026.9.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/.agents/skills/README.md +1 -0
  2. package/.agents/skills/pm-developer/SKILL.md +3 -0
  3. package/.agents/skills/pm-test-audit/LICENSE.txt +21 -0
  4. package/.agents/skills/pm-test-audit/SKILL.md +103 -0
  5. package/.agents/skills/pm-test-audit/references/AUDIT.md +54 -0
  6. package/.agents/skills/pm-test-audit/references/CAMPAIGN.md +47 -0
  7. package/.claude-plugin/marketplace.json +2 -2
  8. package/AGENTS.md +6 -20
  9. package/CHANGELOG.md +49 -1
  10. package/dist/cli/error-guidance.d.ts +9 -0
  11. package/dist/cli/error-guidance.js +1 -1
  12. package/dist/cli/help-content.js +1 -1
  13. package/dist/cli/register-list-query.js +2 -2
  14. package/dist/cli/schema/registration.js +2 -2
  15. package/dist/cli-bundle/bundle-manifest.json +149 -149
  16. package/dist/cli-bundle/chunks/{chunk-NBGSRFZE.js → chunk-4ODHIX7N.js} +2 -2
  17. package/dist/cli-bundle/chunks/{chunk-VO7DHENB.js → chunk-FOTXRNY6.js} +39 -39
  18. package/dist/cli-bundle/chunks/chunk-GRWPZR7F.js +29 -0
  19. package/dist/cli-bundle/chunks/{chunk-E6ZES2X7.js → chunk-HTHTX6E6.js} +6 -6
  20. package/dist/cli-bundle/chunks/chunk-IYN4MJ2C.js +238 -0
  21. package/dist/cli-bundle/chunks/{chunk-6WBR6GMW.js → chunk-MJWKR7YA.js} +63 -62
  22. package/dist/cli-bundle/chunks/{chunk-ZSVINTXT.js → chunk-QQD3VRMZ.js} +2 -2
  23. package/dist/cli-bundle/chunks/{chunk-SXRMM72R.js → chunk-SZQCHJI4.js} +2 -2
  24. package/dist/cli-bundle/chunks/{chunk-ZWSWR2GX.js → chunk-TC74K7SS.js} +2 -2
  25. package/dist/cli-bundle/chunks/{chunk-PFWCAI4X.js → chunk-TYJXMT3Q.js} +2 -2
  26. package/dist/cli-bundle/chunks/{chunk-KOUT5SAA.js → chunk-U55RYT3I.js} +2 -2
  27. package/dist/cli-bundle/chunks/{chunk-WBB5B7G5.js → chunk-VMO4P5MX.js} +2 -2
  28. package/dist/cli-bundle/chunks/{register-list-query-IFPQ4YRD.js → register-list-query-426QTRET.js} +4 -4
  29. package/dist/cli-bundle/chunks/{register-mutation-C3O7OSXW.js → register-mutation-FLI3HHMP.js} +4 -4
  30. package/dist/cli-bundle/chunks/{register-operations-LGO7DBZ7.js → register-operations-TP7ZG4MK.js} +2 -2
  31. package/dist/cli-bundle/chunks/{register-setup-4EW2PPZD.js → register-setup-574SIVQZ.js} +2 -2
  32. package/dist/cli-bundle/focused-chunks/chunk-25BBHWMH.js +20 -0
  33. package/dist/cli-bundle/focused-chunks/{chunk-YE6F5HGF.js → chunk-ABA3KRPY.js} +2 -2
  34. package/dist/cli-bundle/focused-chunks/chunk-H3BI4EDO.js +75 -0
  35. package/dist/cli-bundle/focused-chunks/chunk-HNHMK5JI.js +2 -0
  36. package/dist/cli-bundle/focused-chunks/{chunk-S5JYIFFS.js → chunk-HQPTDJLF.js} +2 -2
  37. package/dist/cli-bundle/focused-chunks/{chunk-LZOEUNHR.js → chunk-MK5AKKHK.js} +2 -2
  38. package/dist/cli-bundle/focused-chunks/{chunk-6CWR2QFM.js → chunk-NRHTXBTI.js} +2 -2
  39. package/dist/cli-bundle/focused-chunks/{chunk-L554BKFH.js → chunk-NVVB2HJC.js} +2 -2
  40. package/dist/cli-bundle/focused-chunks/{chunk-PIHQNL32.js → chunk-O7MIBEMK.js} +2 -2
  41. package/dist/cli-bundle/focused-chunks/{chunk-BKXYQQDT.js → chunk-OY3VHCTX.js} +2 -2
  42. package/dist/cli-bundle/focused-chunks/{chunk-N2JYYEHM.js → chunk-PMPFLA6X.js} +2 -2
  43. package/dist/cli-bundle/focused-chunks/{chunk-HJA6OHWT.js → chunk-Q355NPLH.js} +28 -28
  44. package/dist/cli-bundle/focused-chunks/{chunk-BQSKFRL2.js → chunk-TLF6N56J.js} +2 -2
  45. package/dist/cli-bundle/focused-chunks/{chunk-QREDJ77O.js → chunk-UIFVIE5F.js} +2 -2
  46. package/dist/cli-bundle/focused-chunks/{chunk-E5AOEXF5.js → chunk-XKH2FC5D.js} +2 -2
  47. package/dist/cli-bundle/focused-chunks/{chunk-FIQYVDLL.js → chunk-XVBWZTU2.js} +11 -11
  48. package/dist/cli-bundle/main.js +22 -22
  49. package/dist/cli-bundle/sdk-authoring.js +1 -1
  50. package/dist/cli-bundle/sdk-contracts.js +1 -1
  51. package/dist/cli-bundle/sdk-core.js +30 -45
  52. package/dist/cli-bundle/sdk-governance.js +1 -1
  53. package/dist/cli-bundle/sdk-graph.js +1 -1
  54. package/dist/cli-bundle/sdk-merge.js +58 -42
  55. package/dist/cli-bundle/sdk-query.js +1 -1
  56. package/dist/cli-bundle/sdk-runtime.js +1 -1
  57. package/dist/cli-bundle/sdk-testing.js +1 -1
  58. package/dist/cli-bundle/sdk.js +9 -10
  59. package/dist/core/policy/workflow-policy-store.js +1 -1
  60. package/dist/core/search/embedding-batches.d.ts +47 -15
  61. package/dist/core/search/embedding-batches.js +1 -1
  62. package/dist/core/search/eval-thresholds.d.ts +14 -0
  63. package/dist/core/search/eval-thresholds.js +2 -0
  64. package/dist/core/search/eval.d.ts +4 -1
  65. package/dist/core/search/eval.js +1 -1
  66. package/dist/core/search/http-client.d.ts +7 -0
  67. package/dist/core/search/http-client.js +1 -1
  68. package/dist/core/shared/errors.d.ts +13 -0
  69. package/dist/core/shared/errors.js +1 -1
  70. package/dist/sdk/completion/bash.js +1 -1
  71. package/dist/sdk/eval.d.ts +19 -17
  72. package/dist/sdk/eval.js +1 -1
  73. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
  74. package/dist/sdk/governance/health.d.ts +1 -1
  75. package/dist/sdk/governance/health.js +1 -1
  76. package/dist/sdk/governance/reindex.d.ts +4 -1
  77. package/dist/sdk/governance/reindex.js +2 -2
  78. package/dist/sdk/init-agent-guidance.d.ts +2 -1
  79. package/dist/sdk/init-agent-guidance.js +2 -2
  80. package/dist/sdk/merge/install.js +2 -2
  81. package/dist/sdk/merge/worktree-config.d.ts +9 -0
  82. package/dist/sdk/merge/worktree-config.js +2 -0
  83. package/dist/sdk/public-surface.json +1 -1
  84. package/dist/sdk/query.d.ts +3 -0
  85. package/dist/sdk/query.js +1 -1
  86. package/dist/sdk/runtime/schema-preview.d.ts +2 -0
  87. package/dist/sdk/runtime/schema-preview.js +2 -0
  88. package/dist/sdk/runtime/schema.js +1 -1
  89. package/dist/sdk/runtime-primitives.d.ts +2 -1
  90. package/dist/sdk/runtime-primitives.js +1 -1
  91. package/docs/AGENT_RECOVERY_AND_GUIDANCE.md +49 -0
  92. package/docs/CHATGPT_CODEX_PLUGIN_IMPLEMENTATION.md +2 -0
  93. package/docs/CLAUDE_CODE_PLUGIN.md +18 -7
  94. package/docs/CODEX_PLUGIN.md +5 -12
  95. package/docs/DEFECT_RECURRENCE.md +8 -1
  96. package/docs/DEPENDENCY_KIND_CONTRACT.md +27 -0
  97. package/docs/MERGE_SAFETY.md +28 -5
  98. package/docs/README.md +2 -0
  99. package/docs/RELEASE_RELIABILITY.md +70 -0
  100. package/docs/RELEASING.md +9 -1
  101. package/docs/SEARCH_QUALITY.md +116 -0
  102. package/docs/TESTING.md +17 -0
  103. package/docs/VALIDATION_PORTABILITY.md +20 -11
  104. package/marketplace.json +2 -2
  105. package/package.json +6 -5
  106. package/packages/pm-beads/package.json +1 -1
  107. package/packages/pm-calendar/package.json +1 -1
  108. package/packages/pm-command-kit/package.json +1 -1
  109. package/packages/pm-digital-twin/package.json +1 -1
  110. package/packages/pm-governance-audit/package.json +1 -1
  111. package/packages/pm-guide-shell/package.json +1 -1
  112. package/packages/pm-kanban/package.json +1 -1
  113. package/packages/pm-lifecycle-hooks/package.json +1 -1
  114. package/packages/pm-linked-test-adapters/package.json +1 -1
  115. package/packages/pm-search-advanced/package.json +1 -1
  116. package/packages/pm-templates/package.json +1 -1
  117. package/packages/pm-todos/package.json +1 -1
  118. package/packages/pm-vcs/package.json +1 -1
  119. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  120. package/plugins/pm-claude/README.md +6 -5
  121. package/plugins/pm-claude/hooks/hooks.json +1 -1
  122. package/plugins/pm-claude/hooks/session-start.mjs +9 -6
  123. package/plugins/pm-claude/package.json +9 -0
  124. package/plugins/pm-claude/scripts/plugin-runtime.mjs +84 -0
  125. package/plugins/pm-claude/scripts/pm-mcp-server.mjs +39 -96
  126. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  127. package/plugins/pm-codex/.mcp.json +0 -3
  128. package/plugins/pm-codex/README.md +1 -1
  129. package/plugins/pm-codex/package.json +9 -0
  130. package/plugins/pm-codex/scripts/plugin-runtime.mjs +84 -0
  131. package/plugins/pm-codex/scripts/pm-mcp-server.mjs +38 -99
  132. package/dist/cli-bundle/chunks/chunk-7IABMUB6.js +0 -238
  133. package/dist/cli-bundle/chunks/chunk-OBTHQ6UX.js +0 -29
  134. package/dist/cli-bundle/focused-chunks/chunk-3JAEZ7WI.js +0 -59
  135. package/dist/cli-bundle/focused-chunks/chunk-BULUJEOL.js +0 -20
  136. package/dist/cli-bundle/focused-chunks/chunk-KMNH4G6Y.js +0 -2
@@ -24,6 +24,7 @@ it. `docs/COMMANDS.md` is ~29k tokens and `docs/SDK.md` is ~45k.
24
24
  | Skill | Use when |
25
25
  | --------------------------------- | ------------------------------------------------------ |
26
26
  | [`pm-developer`](pm-developer/SKILL.md) | Changing code, docs, tests, or release gates |
27
+ | [`pm-test-audit`](pm-test-audit/SKILL.md) | Writing, reviewing, or auditing tests and their regression value |
27
28
  | [`pm-user`](pm-user/SKILL.md) | Intake, triage, prioritization, planning, reporting |
28
29
  | [`pm-extensions`](pm-extensions/SKILL.md) | Package and extension lifecycle and authoring |
29
30
  | [`pm-sdk`](pm-sdk/SKILL.md) | Integrations, embedding, and domain packs on the SDK |
@@ -106,6 +106,9 @@ Always read the `omission_receipt` before treating a result as complete. See
106
106
 
107
107
  ## Verification Defaults
108
108
 
109
+ For test authoring, review, or cleanup, apply [pm-test-audit](../pm-test-audit/SKILL.md)
110
+ to preserve independent contracts while removing low-value duplication.
111
+
109
112
  ```bash
110
113
  pnpm build
111
114
  node scripts/run-tests.mjs test -- <targets>
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 OpenClaw Foundation
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,103 @@
1
+ ---
2
+ name: pm-test-audit
3
+ description: Use when writing, changing, reviewing, or auditing pm-cli tests. Checks regression value, duplicate coverage, implementation coupling, and test-only production seams while preserving SDK contracts, sandbox isolation, and exact coverage gates.
4
+ license: MIT
5
+ compatibility: Repository development with Node.js, pnpm, and the checkout-built pm CLI.
6
+ metadata:
7
+ owner: unbrained
8
+ domain: pm-cli
9
+ scope: test-quality
10
+ ---
11
+
12
+ # pm Test Audit
13
+
14
+ Tracker: [pm-xvibt6](../../pm/tasks/pm-xvibt6.toon).
15
+ Adapted from OpenClaw's [test-audit skill](https://github.com/openclaw/openclaw/blob/e0d80000067d224e93af6107ed093a21e046879f/.agents/skills/test-audit/SKILL.md);
16
+ upstream copyright and terms are in [LICENSE.txt](LICENSE.txt).
17
+
18
+ Use alongside [pm-developer](../pm-developer/SKILL.md). Project management is
19
+ context management: retain why a test exists, its contract owner, and the
20
+ regression evidence so the next audit need not rediscover them.
21
+
22
+ ## Choose the Scope
23
+
24
+ - **Authoring:** apply the four questions below before adding or changing tests.
25
+ - **Audit:** read [audit evidence](references/AUDIT.md) before proposing removals.
26
+ - **Campaign:** also read [campaign procedure](references/CAMPAIGN.md) for a broad sweep.
27
+
28
+ Do not expand a focused request into a repository-wide deletion campaign.
29
+
30
+ ## Four Questions Before Editing
31
+
32
+ 1. What observable behavior, invariant, or independent contract does this prove?
33
+ 2. What credible regression makes it fail? For a bug fix, demonstrate the intended
34
+ failure before the fix and success afterward with the same test and harness.
35
+ 3. Why does existing coverage not catch it? Choose one primary owner at the
36
+ strongest useful boundary. An additional layer needs a distinct risk, such as
37
+ CLI parsing, MCP transport, persistence, or package installation. Extend a
38
+ table or shared fixture when the behavior and setup are already covered.
39
+ 4. Does it demand a production export, flag, wrapper, or injection hook solely
40
+ to observe private details? Prefer exercising the real boundary. Published
41
+ `@unbrained/pm-cli/sdk/testing` helpers are public contracts, not automatically
42
+ disposable test-only seams.
43
+
44
+ Domain semantics belong in the SDK; thin CLI/MCP adapters need their own transport
45
+ proof, not copies of every SDK case. Read complete tests and production owners
46
+ before editing, plus relevant callers, neighboring tests, history, and scoped
47
+ `AGENTS.md`. Inspect actual dependency types in `node_modules`; do not guess APIs.
48
+
49
+ ## Verification and Safety
50
+
51
+ Follow [Testing](../../../docs/TESTING.md) for the affected surface. Use the
52
+ repository runner, which isolates tracker roots and builds the checkout:
53
+
54
+ ```bash
55
+ node scripts/run-tests.mjs test -- <target>
56
+ node scripts/run-tests.mjs coverage
57
+ ```
58
+
59
+ - Never run tests against the real `.agents/pm`. Manual dogfood uses a temporary
60
+ workspace outside this checkout and its ancestor workspaces, with both
61
+ `PM_PATH` and `PM_GLOBAL_PATH` isolated. Clean up only directories you created.
62
+ - Do not edit source while a runner or build owns it. Negative controls and
63
+ pre-fix comparisons belong in an isolated copy/worktree with temporary
64
+ `PM_PATH` and `PM_GLOBAL_PATH` set for every direct stateful CLI command,
65
+ including linked-test metadata commands. A nested worktree alone does not
66
+ isolate tracker discovery. Keep these test roots separate from intentional
67
+ repository tracking below. Change the intended condition; unrelated setup
68
+ failures do not establish regression sensitivity.
69
+ - Keep canonical full-source coverage at **100/100/100/100**. Do not shrink the
70
+ denominator, add ignore directives, lower gates, or duplicate assertions to
71
+ recover a number. Restore meaningful behavioral proof when coverage drops.
72
+ - Mocks may isolate external boundaries; they must not implement the behavior
73
+ being tested. Use real temporary persistence when proving writes or recovery.
74
+ - Run relevant functional, integration, package, performance, and acceptance
75
+ gates according to the changed contract. A focused green run is not a full
76
+ suite result. [Quality evidence](../../../docs/QUALITY_EVIDENCE.md) defines the
77
+ bounded mutation gate; do not describe it as whole-repository mutation proof.
78
+ - Preserve static quality, docstring, security, release, and public-surface gates.
79
+ This skill does not grant exceptions to repository coding rules.
80
+
81
+ ## PM Evidence and Handoff
82
+
83
+ Bootstrap and orient using root `AGENTS.md`; search all statuses before creating
84
+ work. Read the selected item's full metadata and history, follow omission
85
+ receipts, then claim/start only items actually being edited. Keep investigation
86
+ read-only until there is a justified change. Use typed relationships for real
87
+ ownership, dependencies, or verification; never manufacture graph depth.
88
+
89
+ Link files, docs, and sandbox-safe test commands through `pm`. Record retained
90
+ contracts, removed duplication, pre-fix failure and post-fix proof, commands and
91
+ results, and limitations. Reuse canonical follow-up items for product defects;
92
+ never delete a failing regression merely to make the suite green. Close with
93
+ structured evidence and release the claim, or return paused work to an appropriate
94
+ non-active state. Delivery and review follow the user's authorized scope and
95
+ [review loop](../../../docs/PR_REVIEW_LOOP.md).
96
+
97
+ For current command flags use command-specific help/contracts. Optional deeper
98
+ workflow guidance is available after installing guide-shell:
99
+
100
+ ```bash
101
+ pm package install guide-shell --project
102
+ pm guide workflows --depth brief
103
+ ```
@@ -0,0 +1,54 @@
1
+ # Evidence Before Removing a Test
2
+
3
+ Start with read-only discovery. Test count, runtime, coverage percentage, or a
4
+ suspicious name is a lead, not proof that a test is low-value.
5
+
6
+ ## Candidates to Investigate
7
+
8
+ - Assertion-free probes, self-comparisons, or expected values calculated by the
9
+ same implementation under test.
10
+ - Copied export/manifest inventories or source-text checks without an independent
11
+ compatibility, packaging, security, or architecture contract.
12
+ - Private predicate, mock-call-shape, and wiring assertions that repeat stronger
13
+ observable behavior coverage.
14
+ - Identical scenarios across SDK, CLI, MCP, and packages without distinct
15
+ boundary failure modes; prefer a named keeper over another copy.
16
+ - Fixtures that pre-seed the receipt, ordering, admission, or callback result the
17
+ production owner should produce; persistence tests that never write anything.
18
+ - Tests that assert a flag was forwarded but never prove its promised behavior.
19
+ - Test-only production exports, globals, wrappers, dead branches, or injected
20
+ switches with no supported consumer contract.
21
+ - Negative controls that fail at an unrelated guard, and names claiming behavior
22
+ that their assertions never observe.
23
+
24
+ Read the complete test and production owner, trace non-test callers and relevant
25
+ callees, and inspect overlapping tests, CI routing, history, and configuration.
26
+ Do not assume no in-repo caller means a published SDK export is unused.
27
+
28
+ ## Reasons to Retain
29
+
30
+ Keep independent public SDK, protocol, configuration, migration, storage,
31
+ security, platform, default, package/release, and generated cross-language
32
+ contracts. Observable ordering can be a contract. Static inspection can be the
33
+ cheapest independent architectural guard; ask whether it survives harmless
34
+ identifier refactoring. Slowness and use of mocks are not deletion criteria on
35
+ their own. A previously failing retained test may expose a product defect.
36
+
37
+ ## Candidate Ledger
38
+
39
+ For each candidate, record:
40
+
41
+ | Evidence | Required detail |
42
+ | --- | --- |
43
+ | Identity | Exact path and test/table row; production owner and callers |
44
+ | Failure | Credible regression the assertion can detect |
45
+ | Contract | Independent external obligation, or why none exists |
46
+ | Overlap | Named keeper and distinct behavior it still proves |
47
+ | Seam | Production change deletion would permit, or none |
48
+ | Decision | Retain, repair, consolidate, or delete, with rationale |
49
+ | Verification | Exact command, negative control where appropriate, and result |
50
+
51
+ Establish the keeper before removing duplicates. Remove private obsolete seams
52
+ only after caller and public-contract checks. Prefer simpler production code,
53
+ but do not use net lines deleted as a success quota. Avoid trivial one-use
54
+ wrappers or test helpers that merely mirror the implementation.
@@ -0,0 +1,47 @@
1
+ # Broad Test Audit Campaign
2
+
3
+ Use only for an authorized broad sweep. Adapted from the upstream
4
+ [campaign procedure](https://github.com/openclaw/openclaw/blob/e0d80000067d224e93af6107ed093a21e046879f/.agents/skills/test-audit/CAMPAIGN.md).
5
+
6
+ 1. **Pin a baseline.** Record the commit, test inventory, full-suite outcomes,
7
+ coverage, and existing failures in the canonical pm item. Baseline failures
8
+ are investigations, not permission to discard tests. Check all-status lineage
9
+ before creating follow-ups.
10
+ 2. **Partition by owner.** Include SDK domains, CLI/MCP adapters, packages,
11
+ release scripts, plugins, and shared harnesses within the requested scope.
12
+ Assign each test one lane. If delegation is authorized, use read-only
13
+ discovery lanes first and a single integration owner for shared harnesses.
14
+ 3. **Build the ledger.** Apply [audit evidence](AUDIT.md) to every declaration in
15
+ scope; distinguish table rows with different contracts. Mark retain, repair,
16
+ consolidate, or delete. Record uncovered/unread inventory explicitly instead
17
+ of claiming a complete sweep.
18
+ 4. **Consolidate with proof.** Name and strengthen the keeper first. Preserve
19
+ real SDK behavior and distinct CLI/MCP serialization, error, lifecycle,
20
+ persistence, package, and release guarantees. A fake external service can be
21
+ useful; a mock implementing the production algorithm proves nothing.
22
+ 5. **Integrate coherently.** Serialize shared build/harness edits, remove only
23
+ obsolete private seams, and update routing/inventory when required. Preserve
24
+ the canonical coverage denominator and every mandatory gate. Do not weaken
25
+ caps, thresholds, documentation requirements, or lint rules to pass.
26
+ 6. **Check preservation independently.** Revisit each removed contract against
27
+ the keeper and current production boundary. Use targeted mutations or pre-fix
28
+ controls in an isolated copy with temporary `PM_PATH` and `PM_GLOBAL_PATH`
29
+ for every direct stateful CLI command to establish meaningful failure. Record exact
30
+ changed bytes, failure reason, restoration, and passing rerun. Never mutate
31
+ the working tree under a running test command.
32
+ 7. **Handle product defects explicitly.** Track a real defect separately within
33
+ the coherent delivery, with failing-before/passing-after proof and the
34
+ repository's structured defect evidence. Reuse existing lineage; do not hide
35
+ unrelated repairs inside mass test deletion.
36
+ 8. **Reconcile and verify.** Incorporate upstream changes without force-pushing
37
+ shared history. Reassess newly introduced contracts rather than blindly
38
+ preserving deletions. Run focused tests, full suite/coverage, static quality,
39
+ and affected acceptance/package/performance gates on the integrated tree.
40
+ 9. **Hand off honestly.** Report baseline and final counts, covered lanes, named
41
+ keepers, production seams removed, regressions demonstrated, full commands,
42
+ results, and remaining risks. A review inventory is not a correctness
43
+ certificate. Follow the authorized PR workflow; unavailable reviewers are
44
+ unavailable evidence, not approval.
45
+
46
+ Update pm files/docs/tests/comments and durable learnings as evidence accrues.
47
+ Close only implemented work with structured results and release ownership.
@@ -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.23"
9
+ "version": "2026.9.26"
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.23",
16
+ "version": "2026.9.26",
17
17
  "author": {
18
18
  "name": "unbrained",
19
19
  "url": "https://github.com/unbraind/pm-cli"
package/AGENTS.md CHANGED
@@ -58,27 +58,13 @@ On a fresh clone or worktree, also run `pm merge install` once: the committed `.
58
58
  For real repository tracking, do not override `PM_PATH`. If a script must target a tracker explicitly, prefer `--pm-path <repo>/.agents/pm`; `--path` is only a backward-compatible tracker-root alias, not a workspace/cwd flag. For tests and dogfood runs, use sandboxed `PM_PATH` and `PM_GLOBAL_PATH`; prefer `node scripts/run-tests.mjs ...` because it sets them automatically.
59
59
 
60
60
  <!-- pm-cli:agent-guidance:start:v1 -->
61
+ ## pm Workflow (Agent Quickstart)
61
62
 
62
- ## pm Workflow Quickstart
63
-
64
- ```bash
65
- pm context --limit 10 --for orient
66
- pm search "<request keywords>" --limit 10
67
- pm list --status open --limit 20
68
- pm list --status in_progress --limit 20
69
- pm create --create-mode progressive --title "..." --description "..." --type Task --status open
70
- pm claim <id>
71
- pm update <id> --status in_progress --message "Start implementation"
72
- pm files <id> --add path=<path>,scope=project,note="<why>"
73
- pm docs <id> --add path=<path>,scope=project,note="<why>"
74
- pm test <id> --add command="node scripts/run-tests.mjs test -- <target>",scope=project,timeout_seconds=240
75
- pm comments <id> "Evidence: <what changed and what passed>"
76
- pm test <id> --run --progress
77
- pm close <id> "<reason with evidence>" --resolution "<what changed>" --expected "<expected outcome>" --actual "<observed outcome>" --validate-close warn
78
- pm release <id>
79
- ```
80
-
81
- Author identity is automatic; use `--author` only for an explicit override.
63
+ - Cold start with the measured canonical orientation: `pm context --limit 10 --for orient`; before item mutation, also run `pm search "<keywords>" --limit 10`, `pm list --status open --limit 20`, and `pm list --status in_progress --limit 20`.
64
+ - Claim and start atomically: `pm claim <id> --start`.
65
+ - Link evidence while coding: `pm files <id> --add ...`, `pm docs <id> --add ...`, `pm test <id> --add command="node scripts/run-tests.mjs test"`.
66
+ - Verify and close: `pm test <id> --run --progress`, then atomically record closure evidence with `pm close <id> "<reason>" --resolution "<what changed>" --expected "<expected outcome>" --actual "<observed outcome>" --validate-close warn`, then `pm release <id>`.
67
+ - Author identity is automatic for supported agent harnesses; use `--author` only for an explicit override.
82
68
 
83
69
  <!-- pm-cli:agent-guidance:end -->
84
70
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,54 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026.9.26 - 2026-09-26
4
+
5
+ ### Fixed
6
+
7
+ - Refuse unsupported schema dry-run flags before mutation ([pm-s74dca](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-s74dca.toon))
8
+ - Releases from the default branch are supported with analyzer evidence ([pm-u1baah](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-u1baah.toon))
9
+
10
+ ### Other
11
+
12
+ - Adapt OpenClaw test-audit skill to pm SDK and repository test governance ([pm-xvibt6](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-xvibt6.toon))
13
+ - Bound embedding requests, enforce retrieval floors, and protect schema previews ([pm-g0b88h](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/changesets/pm-g0b88h.toon))
14
+
15
+ ## 2026.9.25 - 2026-09-25
16
+
17
+ ### Fixed
18
+
19
+ - GH-1306: Isolate merge driver installation and health across Git worktrees ([pm-c1dwbt](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-c1dwbt.toon))
20
+ - GH-1305: Preserve workflow policy refusal evidence and actionable missing-field recovery ([pm-o5s22y](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-o5s22y.toon))
21
+ - GH-1303: Canonical help and refreshable agent guidance ([pm-80k965](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-80k965.toon))
22
+ - GH-1304: Deterministic release pipeline branch coverage across hosted environments ([pm-m2ai6c](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-m2ai6c.toon))
23
+ - Scheduled auto-release has a chronically high failure rate and no rolling measure, so a degraded pipeline reads as healthy one run at a time ([pm-e70zh5](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-e70zh5.toon))
24
+ - Daily auto-release never runs in its declared window: all 84 scheduled runs fired 2.5-4 hours after the cron time, so the release clock is undocumented drift ([pm-44u3wt](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-44u3wt.toon))
25
+ - GH-1294: release commit omits synchronized plugin runtime manifests ([pm-t4prek](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-t4prek.toon))
26
+ - The related ceiling is pinned to the live count with block enforcement, so recording one associative sibling relation anywhere in the tracker fails CI while the share floor it duplicates would have allowed it ([pm-r3o7x4](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-r3o7x4.toon))
27
+
28
+ ### Security
29
+
30
+ - Semgrep 874840452: Medium dependabot missing cooldown in .github/dependabot.yml\#L3 ([pm-gkut](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-gkut.toon))
31
+ - Semgrep 874840451: Medium dependabot missing cooldown in .github/dependabot.yml\#L23 ([pm-dmo5](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-dmo5.toon))
32
+
33
+ ## 2026.9.24 - 2026-09-24
34
+
35
+ ### Fixed
36
+
37
+ - Dogfood test failure must not print inherited environment secrets ([pm-jiv3dw](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-jiv3dw.toon))
38
+ - Claude plugin: marketplace installs fall back to npx @latest, not the advertised native MCP server ([pm-l9wl](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-l9wl.toon))
39
+ - Windows copied agent plugins cannot install pinned runtime through npm.cmd ([pm-d6fd85](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-d6fd85.toon))
40
+ - Nightly coverage, quality, and Windows tests exceed serial job budgets ([pm-ul9rye](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-ul9rye.toon))
41
+ - GH-1291: Windows nightly release cleanup fixture includes Node compile cache ([pm-puf5rq](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-puf5rq.toon))
42
+
43
+ ### Security
44
+
45
+ - Scorecard Token-Permissions (0→10): declare least-privilege top-level permissions in every GitHub workflow ([pm-003j](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-003j.toon))
46
+
47
+ ### Other
48
+
49
+ - Support safe Bash completion inside quoted and escaped prefixes ([pm-eswzn9](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-eswzn9.toon))
50
+ - Refresh compatible Sentry, jscpd, and TypeScript-ESLint patches for September 22 ([pm-hate9s](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-hate9s.toon))
51
+
3
52
  ## 2026.9.23 - 2026-09-23
4
53
 
5
54
  ### Other
@@ -313,7 +362,6 @@
313
362
  - Metadata index rebuilds and mutations repeatedly scan an unindexed FTS identity column ([pm-gtw5zh](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-gtw5zh.toon))
314
363
  - Read sessions emit invalid continuation identities from workspace activity rows ([pm-s8ybl9](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-s8ybl9.toon))
315
364
  - Scale fixtures silently omit unregistered Story items from metadata reads ([pm-fx80w2](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-fx80w2.toon))
316
- - Releases from the default branch are supported with analyzer evidence ([pm-u1baah](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-u1baah.toon))
317
365
 
318
366
  ### Other
319
367
 
@@ -6,6 +6,8 @@
6
6
  import { type PmCliErrorContext, type PmCliErrorRecoveryPayload } from "../sdk/runtime-primitives.js";
7
7
  import { type PmDiagnosticOutputReceipt, type PmProjectedDiagnostic } from "../sdk/cli-contracts/agent-output-contracts.js";
8
8
  interface GuidanceMessage {
9
+ policyViolations?: PmCliErrorContext["policy_violations"];
10
+ policyViolationCount?: number;
9
11
  itemId?: string;
10
12
  tombstone?: PmCliErrorContext["tombstone"];
11
13
  code: string;
@@ -31,6 +33,12 @@ export interface PmRefusalEnvelope {
31
33
  rejected_value?: string;
32
34
  /** Complete legal domain advertised by the refusal, when applicable. */
33
35
  legal_domain?: string[];
36
+ /** Required metadata paths from the displayed policy violations. */
37
+ missing_fields?: string[];
38
+ /** Policy identity, rule, rationale and missing fields, capped at three policies. */
39
+ policies?: PmCliErrorContext["policy_violations"];
40
+ /** Total violated policies, including any omitted from policies. */
41
+ policy_violation_count?: number;
34
42
  /** Process exit code paired with the refusal. */
35
43
  exit_code: number;
36
44
  }
@@ -166,6 +174,7 @@ declare function guidanceToJsonEnvelope(message: GuidanceMessage, exitCode: numb
166
174
  declare function guidanceToClassification(message: GuidanceMessage): ErrorClassification;
167
175
  declare function dedupeStrings(values: string[]): string[];
168
176
  declare function buildFallbackTitleFromMessage(message: string): string | undefined;
177
+ /** Merge SDK error evidence with CLI fallback guidance without discarding typed recovery or policy diagnostics. */
169
178
  declare function applyPmCliErrorContext(guidance: GuidanceMessage, rawMessage: string, context: PmCliErrorContext | undefined): GuidanceMessage;
170
179
  declare function commandExampleForRequiredOption(commandName: string | undefined, optionFlag: string, allowedTypes: string): string[];
171
180
  declare function buildCommanderRecoveryPayload(context: CommanderGuidanceContext | undefined, overrides?: Partial<PmCliErrorRecoveryPayload>): PmCliErrorRecoveryPayload | undefined;