@unbrained/pm-cli 2026.8.16 → 2026.8.18
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/AGENTS.md +4 -3
- package/CHANGELOG.md +65 -6
- package/README.md +16 -16
- package/dist/cli/error-guidance.js +7 -4
- package/dist/cli/public.d.ts +2 -0
- package/dist/cli/public.js +21 -0
- package/dist/cli/register-list-query.js +132 -51
- package/dist/cli/register-mutation.js +4 -4
- package/dist/cli-bundle/bundle-manifest.json +148 -148
- package/dist/cli-bundle/chunks/chunk-5UZZAJKR.js +3 -0
- package/dist/cli-bundle/chunks/chunk-ALDJGKAK.js +2 -0
- package/dist/cli-bundle/chunks/chunk-BSK2IN3C.js +8 -0
- package/dist/cli-bundle/chunks/chunk-DY4DMUMC.js +197 -0
- package/dist/cli-bundle/chunks/{chunk-73UGEBRS.js → chunk-GNFAFIJI.js} +10 -10
- package/dist/cli-bundle/chunks/chunk-L5Q2CLPE.js +35 -0
- package/dist/cli-bundle/chunks/{chunk-RIS565OA.js → chunk-PVRUN5ZS.js} +5 -5
- package/dist/cli-bundle/chunks/chunk-RZQTVMRQ.js +2 -0
- package/dist/cli-bundle/chunks/chunk-SARFF5H5.js +3 -0
- package/dist/cli-bundle/chunks/chunk-UYCLQVL2.js +13 -0
- package/dist/cli-bundle/chunks/{chunk-URW4QRMI.js → chunk-YRGOLZA7.js} +59 -55
- package/dist/cli-bundle/chunks/register-list-query-I23LALEE.js +11 -0
- package/dist/cli-bundle/chunks/register-mutation-6YGU3GPH.js +20 -0
- package/dist/cli-bundle/chunks/{register-operations-KGDNRMCL.js → register-operations-4HTFC6J7.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-NVXBOD5I.js → register-setup-PPPEF3SN.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-2PN4TJXH.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-C7JUBRFP.js → chunk-3TKWMNKF.js} +3 -3
- package/dist/cli-bundle/focused-chunks/chunk-5AF3ZBNB.js +155 -0
- package/dist/cli-bundle/focused-chunks/chunk-C5IW2NDA.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-CODV5LUT.js → chunk-EUEGXZ2A.js} +3 -3
- package/dist/cli-bundle/focused-chunks/{chunk-4JPEBFFC.js → chunk-EX6MKP2X.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-SSNDYZTM.js → chunk-K43KKAFS.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-6ROKKT4X.js → chunk-M62NO7EI.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-T46KLOIB.js → chunk-ODOVCP45.js} +47 -47
- package/dist/cli-bundle/focused-chunks/chunk-RNDNMARJ.js +16 -0
- package/dist/cli-bundle/focused-chunks/chunk-TN4AE665.js +26 -0
- package/dist/cli-bundle/focused-chunks/chunk-TVV2DONO.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-UI6AJ5TD.js +4 -0
- package/dist/cli-bundle/focused-chunks/chunk-V5XTGLK7.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-WGHQVU6P.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-XYNBXTDQ.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-Z56ECT7I.js +2 -0
- package/dist/cli-bundle/main.js +7 -7
- 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 +31 -31
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +32 -32
- 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 +4 -2
- package/dist/core/config/nested-settings.js +8 -2
- package/dist/core/extensions/exporter-output-contract.d.ts +12 -0
- package/dist/core/extensions/exporter-output-contract.js +67 -0
- package/dist/core/extensions/extension-types.d.ts +36 -1
- package/dist/core/extensions/extension-types.js +2 -2
- package/dist/core/extensions/loader.js +43 -48
- package/dist/core/extensions/manifest-schema.d.ts +20 -0
- package/dist/core/extensions/manifest-schema.js +52 -0
- package/dist/core/history/event-index.d.ts +5 -0
- package/dist/core/history/event-index.js +133 -27
- package/dist/core/history/replay.js +32 -14
- package/dist/core/schema/fields-file.d.ts +1 -1
- package/dist/core/schema/fields-file.js +2 -2
- package/dist/core/schema/runtime-field-values.js +115 -9
- package/dist/core/schema/runtime-schema.d.ts +3 -1
- package/dist/core/schema/runtime-schema.js +124 -3
- package/dist/core/sentry/helpers.js +3 -3
- package/dist/core/shared/constants.js +5 -2
- package/dist/core/shared/errors.d.ts +10 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/shared/time.d.ts +2 -0
- package/dist/core/shared/time.js +27 -2
- package/dist/core/store/settings-validator.d.ts +4 -0
- package/dist/core/store/settings-validator.js +3 -2
- package/dist/core/store/settings.js +8 -2
- package/dist/mcp/tool-definitions.js +12 -7
- package/dist/sdk/agent/refusal-reachability.d.ts +46 -6
- package/dist/sdk/agent/refusal-reachability.js +350 -8
- package/dist/sdk/authoring.d.ts +1 -1
- package/dist/sdk/authoring.js +2 -2
- package/dist/sdk/cli-bootstrap.d.ts +2 -2
- package/dist/sdk/cli-bootstrap.js +4 -4
- package/dist/sdk/cli-contracts/command-aliases.d.ts +34 -2
- package/dist/sdk/cli-contracts/command-aliases.js +64 -13
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +4 -0
- package/dist/sdk/cli-contracts/enum-contracts.js +9 -2
- package/dist/sdk/cli-contracts/flag-contracts.js +11 -7
- package/dist/sdk/cli-contracts/grammar-contracts.d.ts +70 -0
- package/dist/sdk/cli-contracts/grammar-contracts.js +345 -0
- package/dist/sdk/cli-contracts/runtime-contracts.d.ts +19 -2
- package/dist/sdk/cli-contracts/runtime-contracts.js +61 -14
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +10 -4
- package/dist/sdk/cli-contracts/tool-schema.d.ts +2 -2
- package/dist/sdk/cli-contracts/tool-schema.js +20 -11
- package/dist/sdk/cli-contracts.d.ts +2 -2
- package/dist/sdk/cli-contracts.js +4 -4
- package/dist/sdk/completion.js +13 -15
- package/dist/sdk/compose.d.ts +9 -5
- package/dist/sdk/compose.js +33 -3
- package/dist/sdk/context-intent-contracts.d.ts +8 -4
- package/dist/sdk/context-intent-contracts.js +76 -31
- package/dist/sdk/contracts.d.ts +1 -0
- package/dist/sdk/contracts.js +3 -2
- package/dist/sdk/core.d.ts +1 -1
- package/dist/sdk/core.js +3 -3
- package/dist/sdk/dependency-flag-validation.d.ts +9 -2
- package/dist/sdk/dependency-flag-validation.js +101 -35
- package/dist/sdk/environment/host-environment-errors.js +25 -7
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +78 -14
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +62 -14
- package/dist/sdk/governance/assurance-action.d.ts +3 -7
- package/dist/sdk/governance/assurance-action.js +97 -2
- package/dist/sdk/governance/boundary-fixtures.d.ts +86 -0
- package/dist/sdk/governance/boundary-fixtures.js +201 -0
- package/dist/sdk/governance/defect-recurrence-signals.d.ts +10 -0
- package/dist/sdk/governance/defect-recurrence-signals.js +25 -0
- package/dist/sdk/governance/defect-recurrence.d.ts +242 -0
- package/dist/sdk/governance/defect-recurrence.js +523 -0
- package/dist/sdk/governance.d.ts +2 -0
- package/dist/sdk/governance.js +4 -2
- package/dist/sdk/graph/governance.js +3 -2
- package/dist/sdk/guide-topics.js +193 -4
- package/dist/sdk/index.d.ts +7 -3
- package/dist/sdk/index.js +8 -5
- package/dist/sdk/init-agent-guidance.js +3 -3
- package/dist/sdk/lifecycle/create.js +4 -2
- package/dist/sdk/lifecycle/update-many.js +15 -2
- package/dist/sdk/lifecycle/update.js +5 -2
- package/dist/sdk/linked-artifacts.js +63 -14
- package/dist/sdk/mutation-events.d.ts +18 -2
- package/dist/sdk/mutation-events.js +59 -16
- package/dist/sdk/output.d.ts +44 -0
- package/dist/sdk/output.js +28 -2
- package/dist/sdk/query/complete-list.d.ts +94 -0
- package/dist/sdk/query/complete-list.js +173 -0
- package/dist/sdk/query/get.d.ts +2 -0
- package/dist/sdk/query/get.js +32 -7
- package/dist/sdk/query/list.js +5 -2
- package/dist/sdk/query.d.ts +1 -0
- package/dist/sdk/query.js +3 -2
- package/dist/sdk/read-output-contracts.d.ts +2 -2
- package/dist/sdk/read-output-contracts.js +36 -9
- package/dist/sdk/relationship-analytics.js +90 -14
- package/dist/sdk/relationship-kinds/contract.d.ts +4 -0
- package/dist/sdk/relationship-kinds/contract.js +3 -2
- package/dist/sdk/relationships.d.ts +1 -1
- package/dist/sdk/relationships.js +11 -2
- package/dist/sdk/runtime-extended-actions.js +10 -2
- package/dist/sdk/runtime.d.ts +8 -2
- package/dist/sdk/runtime.js +11 -8
- package/dist/sdk/schema.d.ts +1 -0
- package/dist/sdk/schema.js +2 -2
- package/dist/sdk/test/execution.d.ts +6 -2
- package/dist/sdk/test/execution.js +39 -13
- package/dist/types.d.ts +34 -2
- package/dist/types.js +4 -2
- package/docs/AGENT_GUIDE.md +25 -9
- package/docs/CLI_GRAMMAR.md +106 -0
- package/docs/COMMANDS.md +23 -23
- package/docs/CONFIGURATION.md +58 -1
- package/docs/CONTEXT_INTEGRITY_CONTRACTS.md +58 -0
- package/docs/DEFECT_RECURRENCE.md +134 -0
- package/docs/DEPENDENCY_KIND_CONTRACT.md +12 -2
- package/docs/ONBOARDING.md +4 -4
- package/docs/QUICKSTART.md +1 -1
- package/docs/README.md +4 -0
- package/docs/RELATIONSHIP_GRAPH.md +16 -2
- package/docs/RELEASING.md +30 -6
- package/docs/SDK.md +74 -7
- package/docs/SDK_ARTIFACT_OUTPUT.md +72 -0
- package/docs/SDK_CONTEXT_COORDINATION.md +46 -12
- package/docs/SDK_RUNTIME_BOUNDARIES.md +9 -1
- package/docs/TESTING.md +18 -1
- package/docs/TRUSTWORTHY_CONTEXT_EVIDENCE.md +1 -1
- package/docs/agent-task-token-baseline.json +5 -5
- package/marketplace.json +2 -2
- package/package.json +8 -5
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/skills/pm-audit/SKILL.md +26 -0
- package/plugins/pm-claude/skills/pm-developer/SKILL.md +26 -0
- package/plugins/pm-claude/skills/pm-planner/SKILL.md +26 -0
- package/plugins/pm-claude/skills/pm-release/SKILL.md +26 -0
- package/plugins/pm-claude/skills/pm-workflow/SKILL.md +26 -0
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/pm-codex/skills/pm-auditor/SKILL.md +26 -0
- package/plugins/pm-codex/skills/pm-native/SKILL.md +26 -0
- package/plugins/pm-codex/skills/pm-release/SKILL.md +26 -0
- package/sdk/public-surface.json +1243 -54
- package/dist/cli-bundle/chunks/chunk-47OQEOQB.js +0 -2
- package/dist/cli-bundle/chunks/chunk-HCIYWD6M.js +0 -35
- package/dist/cli-bundle/chunks/chunk-I2LUWWR5.js +0 -3
- package/dist/cli-bundle/chunks/chunk-IC5W2T34.js +0 -2
- package/dist/cli-bundle/chunks/chunk-OAC5NIV4.js +0 -3
- package/dist/cli-bundle/chunks/chunk-PANOOBIS.js +0 -13
- package/dist/cli-bundle/chunks/chunk-TK6N7HGM.js +0 -8
- package/dist/cli-bundle/chunks/chunk-TOFG2URD.js +0 -197
- package/dist/cli-bundle/chunks/register-list-query-EYCXHZAG.js +0 -10
- package/dist/cli-bundle/chunks/register-mutation-7YVIG54J.js +0 -20
- package/dist/cli-bundle/focused-chunks/chunk-5NMFSX26.js +0 -155
- package/dist/cli-bundle/focused-chunks/chunk-725JSCMP.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-DQ6SMTBF.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-HAACPSUW.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-J4UFYHOD.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-JX5Z344Q.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-L4RDYBIQ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-NJ5RLEFD.js +0 -26
- package/dist/cli-bundle/focused-chunks/chunk-QYZERYR5.js +0 -4
- package/dist/cli-bundle/focused-chunks/chunk-TZATVC4G.js +0 -16
- package/dist/cli-bundle/focused-chunks/chunk-WY3WRPVN.js +0 -2
package/docs/CONFIGURATION.md
CHANGED
|
@@ -156,7 +156,7 @@ Telemetry is opt-in via `pm config set telemetry-tracking on` (see [Common Setti
|
|
|
156
156
|
| `PM_TELEMETRY_OTEL_DISABLED` | boolean | Disable only OTLP trace-span export; the event queue still flushes. |
|
|
157
157
|
| `PM_TELEMETRY_INLINE_FLUSH` | boolean | Flush the queue and OTLP spans inline instead of dispatching the detached worker. Mainly for tests; normal use relies on the background worker. |
|
|
158
158
|
| `PM_TELEMETRY_SOURCE_CONTEXT` | `user` \| `automation` \| `test` \| `dogfood` | Override the inferred source context recorded on each event. Any other value is ignored and the context is inferred. |
|
|
159
|
-
| `PM_TELEMETRY_HTTP_TIMEOUT_MS`
|
|
159
|
+
| `PM_TELEMETRY_HTTP_TIMEOUT_MS` | integer milliseconds | Bound each background event or OTLP request (default `20000`, clamped to `1000`–`25000` to stay below the worker lock TTL). |
|
|
160
160
|
| `PM_TELEMETRY_INGEST_KEY` | string | Sent as the `x-pm-telemetry-key` header on queue flushes; never logged. |
|
|
161
161
|
| `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` | URL | OTLP/HTTP traces endpoint for command spans. Takes precedence over the base endpoint. |
|
|
162
162
|
| `OTEL_EXPORTER_OTLP_ENDPOINT` | URL | Base OTLP endpoint; the traces endpoint is derived by appending `/v1/traces`. |
|
|
@@ -523,6 +523,11 @@ Fields live in `.agents/pm/schema/fields.json` with the shape `{ "fields": [Runt
|
|
|
523
523
|
"required_on_create": false, // required only on create
|
|
524
524
|
"allow_unset": true, // allow clearing via --component "" / --no-component
|
|
525
525
|
"required_types": ["Task"], // only required for these item types (subset of required*)
|
|
526
|
+
"value_schema": {
|
|
527
|
+
// optional recursive semantic constraints
|
|
528
|
+
"type": "string",
|
|
529
|
+
"enum": ["frontend", "backend", "operations"],
|
|
530
|
+
},
|
|
526
531
|
},
|
|
527
532
|
],
|
|
528
533
|
}
|
|
@@ -541,6 +546,7 @@ Fields live in `.agents/pm/schema/fields.json` with the shape `{ "fields": [Runt
|
|
|
541
546
|
- `allow_unset` — when `true` (default), the field can be cleared; when `false`, an explicit unset is rejected.
|
|
542
547
|
- `required_types` — narrows `required`/`required_on_create` to only the listed item types.
|
|
543
548
|
- `description` — surfaced in `--help`.
|
|
549
|
+
- `value_schema` — optional recursive JSON-value validation applied after CLI coercion and before create/update persistence. It supports `type`, `const`, `enum`, `min_length`, `min_items`, `format: "date-time"`, object `properties`/`required`/`additional_properties`, array `items`, and exact-one `one_of` variants. This lets project-defined fields enforce domain semantics without custom command code.
|
|
544
550
|
|
|
545
551
|
End-to-end example — add a required-on-create `component` string field on `Task` items:
|
|
546
552
|
|
|
@@ -561,6 +567,57 @@ End-to-end example — add a required-on-create `component` string field on `Tas
|
|
|
561
567
|
}
|
|
562
568
|
```
|
|
563
569
|
|
|
570
|
+
Object schemas can model discriminated evidence contracts. The following accepts either complete gate proof or an expiring waiver and rejects unknown keys:
|
|
571
|
+
|
|
572
|
+
```jsonc
|
|
573
|
+
{
|
|
574
|
+
"key": "gate_evidence",
|
|
575
|
+
"type": "object",
|
|
576
|
+
"value_schema": {
|
|
577
|
+
"type": "object",
|
|
578
|
+
"required": ["disposition", "owner"],
|
|
579
|
+
"additional_properties": false,
|
|
580
|
+
"properties": {
|
|
581
|
+
"disposition": {
|
|
582
|
+
"enum": ["gate_added", "gate_strengthened", "explicit_waiver"],
|
|
583
|
+
},
|
|
584
|
+
"owner": { "type": "string", "min_length": 1 },
|
|
585
|
+
"gate_id": { "type": "string", "min_length": 1 },
|
|
586
|
+
"negative_control": { "type": "string", "min_length": 1 },
|
|
587
|
+
"local_checks": {
|
|
588
|
+
"type": "array",
|
|
589
|
+
"min_items": 1,
|
|
590
|
+
"items": { "type": "string", "min_length": 1 },
|
|
591
|
+
},
|
|
592
|
+
"hosted_checks": {
|
|
593
|
+
"type": "array",
|
|
594
|
+
"min_items": 1,
|
|
595
|
+
"items": { "type": "string", "min_length": 1 },
|
|
596
|
+
},
|
|
597
|
+
"waiver_reason": { "type": "string", "min_length": 1 },
|
|
598
|
+
"waiver_expires_at": { "type": "string", "format": "date-time" },
|
|
599
|
+
},
|
|
600
|
+
"one_of": [
|
|
601
|
+
{
|
|
602
|
+
"properties": {
|
|
603
|
+
"disposition": { "enum": ["gate_added", "gate_strengthened"] },
|
|
604
|
+
},
|
|
605
|
+
"required": [
|
|
606
|
+
"gate_id",
|
|
607
|
+
"negative_control",
|
|
608
|
+
"local_checks",
|
|
609
|
+
"hosted_checks",
|
|
610
|
+
],
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
"properties": { "disposition": { "const": "explicit_waiver" } },
|
|
614
|
+
"required": ["waiver_reason", "waiver_expires_at"],
|
|
615
|
+
},
|
|
616
|
+
],
|
|
617
|
+
},
|
|
618
|
+
}
|
|
619
|
+
```
|
|
620
|
+
|
|
564
621
|
```bash
|
|
565
622
|
pm create Task "Fix token refresh" --component auth # stored in item metadata
|
|
566
623
|
pm list --component auth # filter by the custom field
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Context Integrity Contracts
|
|
2
|
+
|
|
3
|
+
Tracker references: [pm-4fwgaz](../.agents/pm/issues/pm-4fwgaz.toon), [pm-qqoumq](../.agents/pm/issues/pm-qqoumq.toon), [pm-fpdk37](../.agents/pm/issues/pm-fpdk37.toon), [pm-jn1x30](../.agents/pm/issues/pm-jn1x30.toon), and [pm-0wfdim](../.agents/pm/issues/pm-0wfdim.toon).
|
|
4
|
+
|
|
5
|
+
## Agent Quick Context
|
|
6
|
+
|
|
7
|
+
Project management is context management. A successful read or analysis must not silently erase an item's identity, reinterpret a reference, reverse a relationship, accept an ignored compatibility spelling, or rewrite history into a format an older supported CLI cannot read. These rules are implemented in shared SDK/core primitives so the CLI, packages, extensions, and MCP hosts inherit the same behavior.
|
|
8
|
+
|
|
9
|
+
## Sparse Read Identity
|
|
10
|
+
|
|
11
|
+
`pm get <id> --fields ...` always returns `item.id`, even when `id` was not explicitly requested. Explicitly requested collection metadata is materialized as an empty array when absent. This distinguishes “the requested collection is empty” from “the field was not read” without forcing callers to request a larger projection.
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pm get pm-example --fields comments,notes,learnings,tests,test_runs,docs,plan_steps,plan_decisions,plan_discoveries,plan_validation --json
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The result retains the canonical ID and every requested empty group, including planning and test-run collections. The public `GetResult` type requires `item.id`, so SDK consumers do not need an impossible missing-identity branch. Unrequested groups remain omitted, preserving the token-saving projection contract.
|
|
18
|
+
|
|
19
|
+
## Extension Manifest Compatibility
|
|
20
|
+
|
|
21
|
+
Extension manifests use the canonical top-level `pm_min_version` and optional `pm_max_version` fields. `compatibility.pm`, `engines.pm`, or other alternate spellings do not establish the loader's pm version floor.
|
|
22
|
+
|
|
23
|
+
`checkExtensionManifestCompatibility` now performs a closed top-level schema inspection before evaluating bounds. It reports deterministic advisory findings for unknown keys and independently reports when both canonical bounds are absent, including for an otherwise recognized manifest. A recognized `compatibility` spelling includes `suggested_key: "pm_min_version"`. Runtime discovery emits matching `extension_manifest_*` warnings, which means `pm extension doctor` cannot silently report a clean manifest after discarding an unknown compatibility block or after receiving no compatibility intent at all.
|
|
24
|
+
|
|
25
|
+
Warnings are advisory; malformed or unmet canonical bounds retain their existing blocking behavior.
|
|
26
|
+
|
|
27
|
+
## Lossless Remote Documentation Links
|
|
28
|
+
|
|
29
|
+
`pm docs <id> --add` accepts structured `path=...,scope=...,note=...` values, bare paths, Markdown links, and CSV label/URL pairs:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pm docs pm-example --add '[Pull request](https://github.com/org/repo/pull/42)'
|
|
33
|
+
pm docs pm-example --add 'Issue report,https://github.com/org/repo/issues/17'
|
|
34
|
+
pm docs pm-example --add 'Query evidence,https://example.com/report?fields=id,status'
|
|
35
|
+
pm docs pm-example --add '[Nested path](https://example.com/report_(final))'
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Each example creates one project-scoped documentation reference. The first comma separates a CSV label from the complete URL remainder, and balanced parentheses inside Markdown destinations remain part of the destination. The URL is preserved byte-for-byte as the path and the label becomes the note. File-link parsing is unchanged, and ordinary comma-separated bare document paths continue to expand as before.
|
|
39
|
+
|
|
40
|
+
## Direction-Locked Graph Impact
|
|
41
|
+
|
|
42
|
+
Dependency storage is oriented from the item that declares a relationship (`source`) to the referenced item (`target`). Impact analysis uses that stored orientation even for associative kinds:
|
|
43
|
+
|
|
44
|
+
- `incoming` follows source items that point at the current target: dependents and requesters.
|
|
45
|
+
- `outgoing` follows targets referenced by the current source: prerequisites and context dependencies.
|
|
46
|
+
- `both` is the deterministic union of the complete incoming and outgoing traversals. Each branch keeps its starting direction; traversal never reverses through an associative edge halfway through a path.
|
|
47
|
+
|
|
48
|
+
This prevents a shared `related` item from bridging an incoming impact query into an unrelated epic. Rows retain shortest explanation paths, bounded pagination, truncation, and query-cost receipts.
|
|
49
|
+
|
|
50
|
+
## Cross-Version History Epochs
|
|
51
|
+
|
|
52
|
+
History writers using item-hash epoch 2 always emit `item_hash_version: 2`. An entry without an explicit epoch is therefore legacy epoch 1 when the entire stream is implicit, including documents whose hashes happen to be identical under both algorithms. A supported explicit epoch becomes authoritative from its marker forward, so earlier unversioned entries retain both legacy and transitional candidates while a trailing ambiguous hash cannot downgrade the marked epoch. Verification and repair no longer guess a different epoch from the last ambiguous entry.
|
|
53
|
+
|
|
54
|
+
Repair keeps implicit legacy streams implicit and byte-stable when no drift exists. Unsupported explicit epochs still fail with a typed `unsupported_item_hash_version` diagnostic instead of being rewritten.
|
|
55
|
+
|
|
56
|
+
## Verification Boundary
|
|
57
|
+
|
|
58
|
+
The regression suite covers each contract at its public SDK or command boundary. Release verification additionally installs the packed package into a temporary project and exercises sparse reads, remote docs, graph impact, extension diagnostics, and history repair without touching the repository tracker.
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# Defect Recurrence and Boundary Evidence
|
|
2
|
+
|
|
3
|
+
Tracked by [pm-1qkivy](../.agents/pm/features/pm-1qkivy.toon), [pm-rtn5h6](../.agents/pm/tasks/pm-rtn5h6.toon), [pm-0pzgit](../.agents/pm/tasks/pm-0pzgit.toon), and [pm-h8tpeh](../.agents/pm/features/pm-h8tpeh.toon).
|
|
4
|
+
|
|
5
|
+
## Agent Quick Context
|
|
6
|
+
|
|
7
|
+
`pm` treats project management as context management. A resolved defect is therefore not only a closed item: it is durable context that should select the checks most likely to prevent the same failure from recurring.
|
|
8
|
+
|
|
9
|
+
The public SDK now provides three composable contracts:
|
|
10
|
+
|
|
11
|
+
- a captured-boundary registry that rejects self-generated fixtures, unsafe samples, missing samples, and expired waivers;
|
|
12
|
+
- a defect-evidence ratchet that requires a typed escape class plus a gate improvement or reviewed, expiring waiver on new terminal defects;
|
|
13
|
+
- a versioned recurrence index that maps proposed files, packages, PM items, tags, and error codes to shared local and hosted checks.
|
|
14
|
+
|
|
15
|
+
The CLI and MCP use the same SDK action path. Repository policy can be replaced by a package or workspace policy without changing the analyzer.
|
|
16
|
+
|
|
17
|
+
## Public SDK
|
|
18
|
+
|
|
19
|
+
Import the governance surface from the package root or the narrow governance entrypoint:
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import {
|
|
23
|
+
analyzeDefectChangeRisk,
|
|
24
|
+
buildDefectRecurrenceIndex,
|
|
25
|
+
evaluateBoundaryFixtures,
|
|
26
|
+
evaluateDefectGateEvidence,
|
|
27
|
+
parseDefectRecurrencePolicy,
|
|
28
|
+
type DefectChangeRiskInput,
|
|
29
|
+
type DefectRecurrencePolicy,
|
|
30
|
+
} from "@unbrained/pm-cli/sdk/governance";
|
|
31
|
+
|
|
32
|
+
const policy: DefectRecurrencePolicy =
|
|
33
|
+
parseDefectRecurrencePolicy(serializedPolicy);
|
|
34
|
+
const index = buildDefectRecurrenceIndex(policy, pmItems, {
|
|
35
|
+
previous_index: previousIndex,
|
|
36
|
+
changed_item_ids: changedItemIds,
|
|
37
|
+
});
|
|
38
|
+
const change: DefectChangeRiskInput = {
|
|
39
|
+
files: ["src/sdk/governance/assurance-action.ts"],
|
|
40
|
+
item_ids: ["pm-1qkivy"],
|
|
41
|
+
};
|
|
42
|
+
const report = analyzeDefectChangeRisk(index, change, { limit: 25 });
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The index and report are deterministic. `policy_fingerprint` identifies the versioned policy; `index_fingerprint` also covers the sparse PM item-to-family contributions. Continuation cursors bind to the latter, so a cursor cannot silently continue against changed context.
|
|
46
|
+
|
|
47
|
+
Each report explains its exact matching signals, returns deduplicated local and hosted checks, and includes a small cost receipt. Package authors may keep their own recurrence policy and feed the same SDK from a custom command, extension, CI adapter, or application.
|
|
48
|
+
|
|
49
|
+
## CLI and MCP Action
|
|
50
|
+
|
|
51
|
+
`assurance risk` accepts one JSON request through the same `definition` transport already used by SDK and MCP hosts:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
risk_request=$(jq -cn \
|
|
55
|
+
--slurpfile policy config/defect-recurrence-policy.json \
|
|
56
|
+
'{policy:$policy[0],change:{files:["src/sdk/governance/assurance-action.ts"],item_ids:["pm-1qkivy"]},limit:25}')
|
|
57
|
+
pm assurance risk --definition "$risk_request" --json
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
The result uses `items` as its bounded row collection and publishes `.items[]` as the stable selector. When `next_cursor` is present, submit it in the next request. A stale or malformed cursor fails rather than restarting from an ambiguous offset.
|
|
61
|
+
|
|
62
|
+
Use `pm assurance risk` for an operator or agent decision. Use the pure SDK functions when a package already owns the item projection, wants to preserve an incremental index, or needs to combine risk with another domain model.
|
|
63
|
+
|
|
64
|
+
### TypeScript compatibility
|
|
65
|
+
|
|
66
|
+
The exported `ASSURANCE_ACTIONS` tuple and `AssuranceActionResult` union now include `risk` and `DefectChangeRiskReport`. This is additive at runtime, but TypeScript consumers with an exhaustive action or result switch must add the new branch. The SDK surface snapshot records that source-compatibility change explicitly.
|
|
67
|
+
|
|
68
|
+
## Policy Model
|
|
69
|
+
|
|
70
|
+
The repository example is [config/defect-recurrence-policy.json](../config/defect-recurrence-policy.json). Every family declares:
|
|
71
|
+
|
|
72
|
+
- a stable id, monotonic version, title, and accountable PM item;
|
|
73
|
+
- one of `production_defect`, `nightly_regression`, `scanner_finding`, or `review_caught_late`;
|
|
74
|
+
- file, package, item, tag, or error-code triggers;
|
|
75
|
+
- local and hosted checks selected from the same policy;
|
|
76
|
+
- a negative-control change that must select the family;
|
|
77
|
+
- historical PM items that justify the family;
|
|
78
|
+
- maximum escape-rate and false-positive-rate budgets.
|
|
79
|
+
|
|
80
|
+
Repository policy validation rejects duplicate ids, absent historical examples, missing family negative controls, invalid taxonomy values, and budgets outside zero through one. Deterministic sorting makes the serialized policy merge-friendly.
|
|
81
|
+
|
|
82
|
+
## Defect Evidence on PM Items
|
|
83
|
+
|
|
84
|
+
Projects can register the structured fields without changing the SDK:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
pm schema add-field escape_class \
|
|
88
|
+
--type string \
|
|
89
|
+
--commands create,update,list,search,context \
|
|
90
|
+
--description "Defect escape taxonomy"
|
|
91
|
+
pm schema add-field gate_evidence \
|
|
92
|
+
--type object \
|
|
93
|
+
--commands create,update,list,search,context \
|
|
94
|
+
--description "Gate improvement or explicit waiver evidence"
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
`gate_evidence` accepts one of these dispositions:
|
|
98
|
+
|
|
99
|
+
- `gate_added` and `gate_strengthened` require `gate_id`, a runnable `negative_control`, non-empty `local_checks` and `hosted_checks`, and an accountable `owner`;
|
|
100
|
+
- `explicit_waiver` requires an accountable `owner`, a concrete `waiver_reason`, and a future `waiver_expires_at` timestamp.
|
|
101
|
+
|
|
102
|
+
The evidence epoch lets an adopting project ratchet new closures immediately while backfilling historical items deliberately. A valid `completed_at` is authoritative, `closed_at` is the compatibility fallback, and timestamp-less items created after the epoch fail closed; timestamp-less items created before the epoch remain explicitly grandfathered. Reports keep historical escape-class and disposition counts visible even before those older items become closure blockers.
|
|
103
|
+
|
|
104
|
+
## Captured Boundary Fixtures
|
|
105
|
+
|
|
106
|
+
The repository inventory is [config/boundary-fixtures.json](../config/boundary-fixtures.json). Each externally produced or consumed value must carry either:
|
|
107
|
+
|
|
108
|
+
- a committed JSON sample with `capture_source` set to `captured_redacted` or `captured_verbatim`, capture provenance, explicit redactions, input, and observed output; or
|
|
109
|
+
- an explicit reason, owner, and future expiry for a boundary that cannot yet be captured safely.
|
|
110
|
+
|
|
111
|
+
The evaluator rejects a `self_generated` source because a fixture created by the same implementation cannot reveal disagreement with an external format. It also scans committed JSON for common home-directory, package-token, GitHub-token, and private-key patterns.
|
|
112
|
+
|
|
113
|
+
The Claude Code directory-slug fixture is consumed directly by the author-provenance test. The npm, GitHub Actions, Git commit, and Sentry samples preserve real field shapes while replacing identifiers, paths, URLs, and user data.
|
|
114
|
+
|
|
115
|
+
## Repository Gate
|
|
116
|
+
|
|
117
|
+
Run the complete local gate after building:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
pnpm quality:defect-evidence
|
|
121
|
+
node scripts/release/defect-evidence-gate.mjs --negative-control --json
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
The first command must pass. The negative control must exit `1` after replacing a captured sample with a forbidden source and adding a terminal defect without evidence. Focused provider modes are available as `--boundary-only`, `--evidence-only`, and `--policy-only`.
|
|
125
|
+
|
|
126
|
+
`repository-defect-evidence-required` is part of the blocking `repository-static-quality` assurance composition. That makes local and CI behavior share the same provider result, assertion negative control, enforcement, and immutable verdict semantics.
|
|
127
|
+
|
|
128
|
+
## Recovery Producer Census
|
|
129
|
+
|
|
130
|
+
`censusPmRecoveryReferenceProducers` scans complete source files for static object-literal recovery fields. It ignores type literals, destructuring patterns, labels, comments, strings, templates, and regular expressions. Aliases such as `candidate_commands`, nested `fallback_candidates[].command`, `next_best_command`, `retry_command`, and `suggested_next_steps` normalize to the same six public recovery kinds used by executable reachability verification.
|
|
131
|
+
|
|
132
|
+
The census fails when a kind has no producer or when a recovery-like envelope field lacks a typed contract. The integration gate scans every `src/**/*.ts` producer; the existing real-entrypoint corpus then executes or resolves every normalized kind and proves recovery, replacement, or behavior-preserving semantics.
|
|
133
|
+
|
|
134
|
+
This separation is intentional: the producer census prevents silent omissions as source grows, while entrypoint execution proves that a reference is not merely syntactically present.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Dependency-kind contract
|
|
2
2
|
|
|
3
|
-
Tracker: [pm-4020c5](../.agents/pm/issues/pm-4020c5.toon), [pm-jkbqt8](../.agents/pm/issues/pm-jkbqt8.toon), [pm-q6n8sj](../.agents/pm/issues/pm-q6n8sj.toon)
|
|
3
|
+
Tracker: [pm-4020c5](../.agents/pm/issues/pm-4020c5.toon), [pm-jkbqt8](../.agents/pm/issues/pm-jkbqt8.toon), [pm-q6n8sj](../.agents/pm/issues/pm-q6n8sj.toon), [pm-ouyq3n](../.agents/pm/issues/pm-ouyq3n.toon)
|
|
4
4
|
|
|
5
5
|
Dependency rows have one canonical stored spelling per relationship meaning. Command inputs remain compatibility-friendly: hyphens normalize to underscores and the aliases below are accepted, but `pm create` and `pm update` persist the canonical kind. Existing historical rows are never rewritten implicitly.
|
|
6
6
|
|
|
@@ -15,6 +15,16 @@ Dependency rows have one canonical stored spelling per relationship meaning. Com
|
|
|
15
15
|
|
|
16
16
|
The SDK relationship registry is authoritative. `canonicalizeRelationshipKind()` rejects unknown spellings, while `resolveCanonicalRelationshipKind()` supports validation flows that need an undefined result. `pm contracts` publishes `relationship_kind_contracts` with canonical names, aliases, inverses, and ordering/hierarchy semantics.
|
|
17
17
|
|
|
18
|
+
`recurs_from` has no alias: a later occurrence points to an earlier occurrence.
|
|
19
|
+
It is persistent after both items become terminal and carries temporal identity,
|
|
20
|
+
not execution precedence. `supersedes` keeps replacement semantics, while
|
|
21
|
+
`duplicate_of` remains item-level record identity rather than an edge between
|
|
22
|
+
distinct events. Local create, update, and update-many mutations compare the
|
|
23
|
+
endpoint `created_at` values before persistence and reject equal or reverse
|
|
24
|
+
chronology with `dependency_temporal_order_invalid`; explicit cross-workspace
|
|
25
|
+
references remain external because their target metadata is not locally
|
|
26
|
+
available.
|
|
27
|
+
|
|
18
28
|
## Direction and actionability
|
|
19
29
|
|
|
20
30
|
`blocked_by` and `blocks` are inverse storage directions with identical scheduling meaning:
|
|
@@ -26,6 +36,6 @@ Readiness, `pm next`, context blocker summaries, `pm list-blocked`, downstream `
|
|
|
26
36
|
|
|
27
37
|
## Legacy observability
|
|
28
38
|
|
|
29
|
-
`pm deps` returns `legacy_alias_counts` for the workspace. `pm graph audit` returns the same field beside canonical `profile.edges_by_kind` counts, `profile.edge_share_by_kind` composition ratios, and the `semantic_edges`/`semantic_edge_share` context-preservation census. The semantic census counts `discovered_from`, `incident_from`, `supersedes`, and `verifies` over all deduplicated directed edges. Empty objects and zero shares are explicit, not omitted. These diagnostics are read-only; terminal history remains untouched until an explicitly governed migration is requested.
|
|
39
|
+
`pm deps` returns `legacy_alias_counts` for the workspace. `pm graph audit` returns the same field beside canonical `profile.edges_by_kind` counts, `profile.edge_share_by_kind` composition ratios, and the `semantic_edges`/`semantic_edge_share` context-preservation census. The semantic census counts `discovered_from`, `incident_from`, `recurs_from`, `supersedes`, and `verifies` over all deduplicated directed edges. Empty objects and zero shares are explicit, not omitted. These diagnostics are read-only; terminal history remains untouched until an explicitly governed migration is requested.
|
|
30
40
|
|
|
31
41
|
Assurance `dependency_kind` measurements canonicalize both the declaration and stored row before comparing. A declaration using `related` and one using the accepted `related_to` alias therefore measure the same edge population; alias debt remains separately observable through `legacy_alias_counts`.
|
package/docs/ONBOARDING.md
CHANGED
|
@@ -41,8 +41,8 @@ Use progressive disclosure:
|
|
|
41
41
|
```bash
|
|
42
42
|
pm context --limit 10
|
|
43
43
|
pm search "<request keywords>" --limit 10
|
|
44
|
-
pm list
|
|
45
|
-
pm list
|
|
44
|
+
pm list --status open --limit 20
|
|
45
|
+
pm list --status in_progress --limit 20
|
|
46
46
|
pm install guide-shell --project
|
|
47
47
|
pm guide workflows
|
|
48
48
|
```
|
|
@@ -82,8 +82,8 @@ The canonical loop is maintained in [AGENT_GUIDE.md](AGENT_GUIDE.md) — this is
|
|
|
82
82
|
```bash
|
|
83
83
|
pm context --limit 10
|
|
84
84
|
pm search "<keywords>" --limit 10
|
|
85
|
-
pm list
|
|
86
|
-
pm list
|
|
85
|
+
pm list --status open --limit 20
|
|
86
|
+
pm list --status in_progress --limit 20
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
2. Claim and start
|
package/docs/QUICKSTART.md
CHANGED
|
@@ -94,7 +94,7 @@ Useful item types:
|
|
|
94
94
|
```bash
|
|
95
95
|
pm context --limit 10
|
|
96
96
|
pm search "restore lock retry" --limit 10
|
|
97
|
-
pm list
|
|
97
|
+
pm list --status open --limit 20
|
|
98
98
|
pm claim <item-id>
|
|
99
99
|
pm update <item-id> --status in_progress --message "Start implementation"
|
|
100
100
|
pm update <item-id> --add-tags urgent,backend
|
package/docs/README.md
CHANGED
|
@@ -40,9 +40,11 @@ pm guide release --json
|
|
|
40
40
|
- [Testing](TESTING.md) - sandbox-safe local tests and linked-test orchestration.
|
|
41
41
|
- [Security Governance](SECURITY_GOVERNANCE.md) - vulnerability reporting, review discipline, property fuzzing, and OpenSSF limitations.
|
|
42
42
|
- [Architecture](ARCHITECTURE.md) - contributor internals: storage, mutation flow, search, extensions, and command contracts.
|
|
43
|
+
- [Noun–Verb CLI Grammar](CLI_GRAMMAR.md) - accepted command architecture, exhaustive destination census, hidden aliases, and the surface-growth gate.
|
|
43
44
|
- [SDK Primitive Inventory](SDK_PRIMITIVE_INVENTORY.md) - SDK-first migration map and private-import ratchet for CLI/MCP layering.
|
|
44
45
|
- [Package SDK Contract Conformance](PACKAGE_SDK_CONTRACT_CONFORMANCE.md) - authoritative public types, `typeof` module derivation, and the first-party parity gate.
|
|
45
46
|
- [SDK Action and Boundary Conformance](SDK_ACTION_CONFORMANCE.md) - derived CLI/SDK/MCP action vocabulary, public-import ratchets, intent budget diagnostics, and package-runner proof.
|
|
47
|
+
- [SDK Artifact Output Contracts](SDK_ARTIFACT_OUTPUT.md) - clean stdout/file exporter channels, bounded receipts, binary-safe delivery, and shared NDJSON terminal framing.
|
|
46
48
|
- [Context Relevance and Packing](CONTEXT_RELEVANCE.md) - shared CLI/SDK signals, derived-store provenance, ranking explanations, and token budgets.
|
|
47
49
|
- [Output Projection and Omission Contracts](OUTPUT_PROJECTION_CONTRACTS.md) - explicit withheld-field receipts, mode-paired row keys, and completion resolver outcomes.
|
|
48
50
|
- [Output Token Accounting](OUTPUT_TOKEN_ACCOUNTING.md) - opt-in CLI/MCP byte attribution, bounded receipt overhead, and release-level tokens-per-task baselines.
|
|
@@ -54,7 +56,9 @@ pm guide release --json
|
|
|
54
56
|
- [SDK Agent Session and Episode Context](SDK_AGENT_SESSION_CONTEXT.md) - inherited role/topic context, cross-process episode identity, and deterministic history grouping.
|
|
55
57
|
- [Improvement Ledger and History Analytics](IMPROVEMENT_ANALYTICS.md) - audited quantitative observations, live provenance coverage, and bounded observational fleet outcomes.
|
|
56
58
|
- [Project Assurance Primitives](ASSURANCE.md) - SDK-owned measurements, assertions, lifecycle gates, cost receipts, and durable verdict history shared by CLI and MCP.
|
|
59
|
+
- [Defect Recurrence and Boundary Evidence](DEFECT_RECURRENCE.md) - captured external samples, structured defect-escape evidence, incremental change-risk indexing, and executable recovery-producer census.
|
|
57
60
|
- [Trustworthy Context and Evidence Contracts](TRUSTWORTHY_CONTEXT_EVIDENCE.md) - full-record assurance, graph composition, boolean health rows, lossless linked-test removal, and role-labelled recovery.
|
|
61
|
+
- [Context Integrity Contracts](CONTEXT_INTEGRITY_CONTRACTS.md) - sparse-read identity, closed extension manifests, lossless remote docs, direction-locked graph impact, and cross-version history epochs.
|
|
58
62
|
- [SDK Evidence Traceability and Integrity](SDK_EVIDENCE_TRACEABILITY.md) - reverse source-to-item lookup, atomic evidence replacement, no-op history, linked-test collision classification, and telemetry drain receipts.
|
|
59
63
|
- [SDK Context and Evidence Contracts](SDK_CONTEXT_EVIDENCE_CONTRACTS.md) - material omission receipts, scoped preflight activation, truthful merge preference, claim-race classification, and versioned history hashes.
|
|
60
64
|
- [Reproducible Workspaces and Snapshots](REPRODUCIBLE_WORKSPACES.md) - deterministic SDK recipes and content-addressed authoritative tracker restore points.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Relationship graph semantics
|
|
2
2
|
|
|
3
|
-
Tracked by [pm-4jqm](../.agents/pm/decisions/pm-4jqm.toon), [pm-dwj33e](../.agents/pm/decisions/pm-dwj33e.toon), [pm-ju83](../.agents/pm/features/pm-ju83.toon), [pm-8xr8](../.agents/pm/stories/pm-8xr8.toon), [pm-m2il](../.agents/pm/chores/pm-m2il.toon), [pm-jiusod](../.agents/pm/issues/pm-jiusod.toon), [pm-mfvsng](../.agents/pm/issues/pm-mfvsng.toon), [pm-9gzr4r](../.agents/pm/issues/pm-9gzr4r.toon),
|
|
3
|
+
Tracked by [pm-4jqm](../.agents/pm/decisions/pm-4jqm.toon), [pm-dwj33e](../.agents/pm/decisions/pm-dwj33e.toon), [pm-ju83](../.agents/pm/features/pm-ju83.toon), [pm-8xr8](../.agents/pm/stories/pm-8xr8.toon), [pm-m2il](../.agents/pm/chores/pm-m2il.toon), [pm-jiusod](../.agents/pm/issues/pm-jiusod.toon), [pm-mfvsng](../.agents/pm/issues/pm-mfvsng.toon), [pm-9gzr4r](../.agents/pm/issues/pm-9gzr4r.toon), [pm-xvt7ps](../.agents/pm/issues/pm-xvt7ps.toon), and [pm-ouyq3n](../.agents/pm/issues/pm-ouyq3n.toon).
|
|
4
4
|
|
|
5
5
|
## Decision
|
|
6
6
|
|
|
@@ -10,7 +10,21 @@ The alternatives were rejected as follows: a closed enum cannot model applicatio
|
|
|
10
10
|
|
|
11
11
|
## Contract
|
|
12
12
|
|
|
13
|
-
Each relationship kind declares direction, inverse, ordering and hierarchy participation, incoming and outgoing cardinality, lifecycle, aliases, payload schema, self-edge policy, and compatibility version. Built-ins normalize legacy `related_to`, `depends_on`, `child_of`, `parent_child`, `epic`, and `task` spellings. Unknown custom kinds remain importable only after their definitions are registered, preventing algorithms from guessing their meaning.
|
|
13
|
+
Each relationship kind declares direction, inverse, ordering and hierarchy participation, optional temporal order, incoming and outgoing cardinality, lifecycle, aliases, payload schema, self-edge policy, and compatibility version. Built-ins normalize legacy `related_to`, `depends_on`, `child_of`, `parent_child`, `epic`, and `task` spellings. Unknown custom kinds remain importable only after their definitions are registered, preventing algorithms from guessing their meaning.
|
|
14
|
+
|
|
15
|
+
`recurs_from` is the canonical recurrence relation: `new --recurs_from--> old`
|
|
16
|
+
means the source is a later event with the same observable failure identity as
|
|
17
|
+
the target. Its `temporalOrder: "source_after_target"` states chronology without
|
|
18
|
+
making recurrence an execution-order dependency. The edge is directed,
|
|
19
|
+
many-to-many, and `persistent`, so it remains valid after either endpoint closes.
|
|
20
|
+
Local mutation adapters enforce that contract against both endpoint
|
|
21
|
+
`created_at` values before writing the item or immutable history; equal and
|
|
22
|
+
reverse timestamps are rejected, including update-many dry runs.
|
|
23
|
+
It does not replace the older event (`supersedes`) and does not assert that two
|
|
24
|
+
records describe one event (`duplicate_of`). Traverse recurrence families with
|
|
25
|
+
`direction: "both"`; impact, paths, dominators, centrality, cut structure, and
|
|
26
|
+
community detection then operate on the connected family without special-case
|
|
27
|
+
labels or retyping historical replacement edges.
|
|
14
28
|
|
|
15
29
|
Ordering-cycle validation considers only kinds whose registry definition sets `ordering: true`. Associative and provenance edges never block execution. Hierarchy cycles remain a separate structural check. Canonical edge identity includes kind and ordered endpoints for directed edges, or sorted endpoints for undirected edges.
|
|
16
30
|
|
package/docs/RELEASING.md
CHANGED
|
@@ -27,7 +27,8 @@ The local/hosted gate selection contract is tracked by
|
|
|
27
27
|
[pm-ei6x66](../.agents/pm/tasks/pm-ei6x66.toon). Release-candidate analyzer
|
|
28
28
|
provenance is tracked by [pm-u1baah](../.agents/pm/issues/pm-u1baah.toon), and
|
|
29
29
|
authoritative blocker-recovery run selection by
|
|
30
|
-
[pm-db8onn](../.agents/pm/issues/pm-db8onn.toon)
|
|
30
|
+
[pm-db8onn](../.agents/pm/issues/pm-db8onn.toon), and queued automatic
|
|
31
|
+
same-day recovery by [pm-dm2vfz](../.agents/pm/issues/pm-dm2vfz.toon).
|
|
31
32
|
|
|
32
33
|
## Version Policy
|
|
33
34
|
|
|
@@ -78,11 +79,11 @@ Policy:
|
|
|
78
79
|
created, a non-`github-actions[bot]` closure of the exact bot-created
|
|
79
80
|
`Auto Release blocked` issue on the same UTC day triggers one preparation
|
|
80
81
|
retry
|
|
81
|
-
- if today's tag already exists, blocker closure bypasses
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
- if today's tag already exists, a queued schedule or blocker closure bypasses
|
|
83
|
+
candidate preparation and accepts the immutable result only after independent
|
|
84
|
+
public-distribution evidence confirms the exact release; incomplete
|
|
85
|
+
publication continues through bounded recovery instead of being accepted
|
|
86
|
+
from tag presence alone
|
|
86
87
|
- release preparation must pass all quality and compatibility gates before commit+tag push
|
|
87
88
|
- before dependency installation or build, auto-release verifies that the
|
|
88
89
|
candidate has exact-commit analyzer results or an immutable tree-identical
|
|
@@ -104,6 +105,10 @@ Policy:
|
|
|
104
105
|
before release mutation and reported as `retry_already_attempted`, and
|
|
105
106
|
workflow cleanup closures by `github-actions[bot]` are ignored.
|
|
106
107
|
- after a scheduled run publishes a tag and the downstream release workflow succeeds, auto-release closes any open `Auto Release blocked` issue so the GitHub tracker reflects current release health
|
|
108
|
+
- workflow concurrency can leave a delayed schedule queued behind another
|
|
109
|
+
production run. The queued schedule resolves the current UTC-day immutable
|
|
110
|
+
result before candidate provenance, proves publication, and exits without
|
|
111
|
+
evaluating the generated release commit as a new candidate
|
|
107
112
|
|
|
108
113
|
Pipeline entrypoint:
|
|
109
114
|
|
|
@@ -268,6 +273,25 @@ confirms that exact merge SHA, `main` base, and reviewed head. Remediate a
|
|
|
268
273
|
refused direct-main candidate by landing the next tree-changing fix through a
|
|
269
274
|
reviewed PR; never copy, synthesize, or bypass analyzer evidence.
|
|
270
275
|
|
|
276
|
+
### Reviewed Delivery Closeout
|
|
277
|
+
|
|
278
|
+
The reviewed delivery includes its PM evidence, item closure, and generated
|
|
279
|
+
changelog. Complete those mutations on the implementation branch before merge
|
|
280
|
+
whenever their evidence is already available. A pull request is not complete
|
|
281
|
+
while known tracker or changelog closeout remains queued for a direct push.
|
|
282
|
+
|
|
283
|
+
When a repository update genuinely depends on the merge SHA or a post-merge
|
|
284
|
+
hosted result, create a normal follow-up branch from `main` and land that update
|
|
285
|
+
through another reviewed pull request. Do not push `.agents/pm/**` or
|
|
286
|
+
`CHANGELOG.md` closeout directly to `main`. Although tracker-only commits do not
|
|
287
|
+
create package-release eligibility by themselves, the direct commit still
|
|
288
|
+
becomes the default-branch head and lacks the reviewed analyzer evidence needed
|
|
289
|
+
by the next release-relevant candidate. `Release analyzer readiness (main)`
|
|
290
|
+
must fail closed in that state; its failure is a provenance control, not an
|
|
291
|
+
analyzer approval. Restore readiness only with a tree-changing, `main`-based,
|
|
292
|
+
reviewed pull request—never by copying statuses, weakening the gate, or
|
|
293
|
+
synthesizing a pull-request association.
|
|
294
|
+
|
|
271
295
|
```bash
|
|
272
296
|
# Read-only parity check
|
|
273
297
|
pnpm release:pipeline:dry-run
|