planr 1.10.0-alpha.9 → 2.0.0

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 (126) hide show
  1. package/.claude-plugin/plugin.json +11 -0
  2. package/CHANGELOG.md +20 -0
  3. package/README.md +27 -245
  4. package/docs/board.md +44 -0
  5. package/docs/cli.md +100 -0
  6. package/docs/concepts.md +133 -0
  7. package/docs/contract.md +150 -0
  8. package/docs/plugins/bb.md +49 -0
  9. package/docs/plugins/claude-code.md +84 -0
  10. package/docs/plugins/codex.md +77 -0
  11. package/docs/quickstart.md +307 -0
  12. package/docs/setup.md +103 -0
  13. package/package.json +21 -68
  14. package/plugin.json +12 -0
  15. package/skills/planr/SKILL.md +64 -0
  16. package/skills/planr/assets/board/fonts/LICENSE-mona-sans.txt +93 -0
  17. package/skills/planr/assets/board/fonts/LICENSE-monaspace.txt +93 -0
  18. package/skills/planr/assets/board/fonts/MonaSans-Variable.woff2 +0 -0
  19. package/skills/planr/assets/board/fonts/MonaspaceNeon-400.woff2 +0 -0
  20. package/skills/planr/assets/board/fonts/MonaspaceNeon-500.woff2 +0 -0
  21. package/skills/planr/assets/board/fonts/MonaspaceNeon-600.woff2 +0 -0
  22. package/skills/planr/assets/board/template.html +788 -0
  23. package/skills/planr/assets/templates/goal.md +13 -0
  24. package/skills/planr/assets/templates/hook.sh +4 -0
  25. package/skills/planr/assets/templates/in-repo.config.json +6 -0
  26. package/skills/planr/assets/templates/planr.config.json +6 -0
  27. package/skills/planr/assets/templates/tasks-README.md +14 -0
  28. package/skills/planr/references/format.md +88 -0
  29. package/skills/planr/references/work-a-goal.md +62 -0
  30. package/skills/planr/scripts/lib/board.mjs +39 -0
  31. package/skills/planr/scripts/lib/graph.mjs +345 -0
  32. package/skills/planr/scripts/lib/runs.mjs +127 -0
  33. package/skills/planr/scripts/lib/version.mjs +11 -0
  34. package/skills/planr/scripts/planr.mjs +386 -0
  35. package/docs/ARCHITECTURE.md +0 -136
  36. package/docs/RELEASE.md +0 -275
  37. package/docs/SWITCHLOOM_COMPATIBILITY.md +0 -14
  38. package/docs/contracts/BROWSER_HARNESS_ADAPTER_V1.md +0 -75
  39. package/docs/contracts/EVAL_CONTRACT_V1.md +0 -2072
  40. package/docs/contracts/EVIDENCE_ADAPTER_PROTOCOL_V1.md +0 -98
  41. package/docs/contracts/EVIDENCE_CONTRACT_V1.md +0 -382
  42. package/docs/contracts/GROK_INTEGRATION_V1.md +0 -139
  43. package/docs/contracts/LINUX_RELEASE_PORTABILITY.json +0 -9
  44. package/docs/contracts/PI_INTEGRATION_V1.md +0 -164
  45. package/docs/contracts/V1_1_DIFFERENTIATION_CONTRACT.md +0 -177
  46. package/docs/contracts/fixtures/evidence/v1/examples/coverage-verdict.json +0 -66
  47. package/docs/contracts/fixtures/evidence/v1/examples/evidence-attempt.json +0 -39
  48. package/docs/contracts/fixtures/evidence/v1/examples/evidence-policy.json +0 -108
  49. package/docs/contracts/fixtures/evidence/v1/examples/evidence-receipt.json +0 -93
  50. package/docs/contracts/fixtures/evidence/v1/examples/evidence-waiver.json +0 -31
  51. package/docs/contracts/fixtures/evidence/v1/examples/proof-obligation.json +0 -55
  52. package/docs/contracts/fixtures/evidence/v1/examples/proof-preset.json +0 -19
  53. package/docs/contracts/fixtures/evidence/v1/examples/untrusted-evidence-proposal.json +0 -20
  54. package/docs/contracts/fixtures/evidence/v1/examples/verification-capability-instance.json +0 -39
  55. package/docs/contracts/fixtures/evidence/v1/examples/verification-capability-manifest.json +0 -52
  56. package/docs/contracts/fixtures/evidence/v1/negative/aborted-zero-exit-attempt.json +0 -39
  57. package/docs/contracts/fixtures/evidence/v1/negative/adapter-registration-missing-execution-contract.json +0 -88
  58. package/docs/contracts/fixtures/evidence/v1/negative/available-empty-probe-capability.json +0 -27
  59. package/docs/contracts/fixtures/evidence/v1/negative/blocked-coverage-with-stale-reason.json +0 -27
  60. package/docs/contracts/fixtures/evidence/v1/negative/empty-trust-bindings-receipt.json +0 -72
  61. package/docs/contracts/fixtures/evidence/v1/negative/failed-zero-exit-attempt.json +0 -39
  62. package/docs/contracts/fixtures/evidence/v1/negative/forged-trusted-receipt.json +0 -35
  63. package/docs/contracts/fixtures/evidence/v1/negative/inconclusive-clean-exit-attempt.json +0 -39
  64. package/docs/contracts/fixtures/evidence/v1/negative/inconclusive-coverage-with-blocked-reason.json +0 -27
  65. package/docs/contracts/fixtures/evidence/v1/negative/minimal-policy-missing-owned-inputs.json +0 -5
  66. package/docs/contracts/fixtures/evidence/v1/negative/mismatched-probe-execution-id-capability.json +0 -42
  67. package/docs/contracts/fixtures/evidence/v1/negative/passed-empty-attempt.json +0 -22
  68. package/docs/contracts/fixtures/evidence/v1/negative/policy-default-preset-unregistered.json +0 -102
  69. package/docs/contracts/fixtures/evidence/v1/negative/policy-weakening-without-waiver.json +0 -102
  70. package/docs/contracts/fixtures/evidence/v1/negative/process-probe-missing-output-limits.json +0 -49
  71. package/docs/contracts/fixtures/evidence/v1/negative/satisfied-empty-coverage-verdict.json +0 -14
  72. package/docs/contracts/fixtures/evidence/v1/negative/skipped-zero-exit-attempt.json +0 -39
  73. package/docs/contracts/fixtures/evidence/v1/negative/stale-coverage-with-inconclusive-reason.json +0 -27
  74. package/docs/contracts/fixtures/evidence/v1/negative/timed-out-zero-exit-attempt.json +0 -39
  75. package/docs/contracts/fixtures/evidence/v1/negative/unavailable-zero-exit-attempt.json +0 -39
  76. package/docs/contracts/fixtures/evidence/v1/negative/unbound-waiver.json +0 -21
  77. package/docs/contracts/fixtures/evidence/v1/negative/unsatisfied-coverage-without-gap.json +0 -63
  78. package/docs/contracts/fixtures/evidence/v1/negative/waived-coverage-forbidden-gap-reason.json +0 -28
  79. package/docs/contracts/fixtures/evidence/v1/negative/waived-coverage-missing-waiver-id.json +0 -27
  80. package/docs/contracts/fixtures/evidence/v1/schemas/evidence-contract-v1.schema.json +0 -2685
  81. package/docs/contracts/schemas/com.planr.web.dom_state.v1.schema.json +0 -30
  82. package/docs/documentation/CONTRACT.md +0 -164
  83. package/docs/documentation/COVERAGE.md +0 -98
  84. package/docs/documentation/INFORMATION_ARCHITECTURE.md +0 -151
  85. package/docs/fixtures/mcp-contract.json +0 -153
  86. package/npm/bin/native-launcher.js +0 -67
  87. package/npm/bin/planr-browser-harness-adapter.js +0 -8
  88. package/npm/bin/planr.js +0 -8
  89. package/npm/native/darwin-arm64/planr +0 -0
  90. package/npm/native/darwin-arm64/planr-browser-harness-adapter +0 -0
  91. package/npm/native/darwin-arm64/planr-host-capability-validator +0 -0
  92. package/npm/native/darwin-x86_64/planr +0 -0
  93. package/npm/native/darwin-x86_64/planr-browser-harness-adapter +0 -0
  94. package/npm/native/darwin-x86_64/planr-host-capability-validator +0 -0
  95. package/npm/native/linux-arm64/planr +0 -0
  96. package/npm/native/linux-arm64/planr-browser-harness-adapter +0 -0
  97. package/npm/native/linux-arm64/planr-host-capability-validator +0 -0
  98. package/npm/native/linux-x86_64/planr +0 -0
  99. package/npm/native/linux-x86_64/planr-browser-harness-adapter +0 -0
  100. package/npm/native/linux-x86_64/planr-host-capability-validator +0 -0
  101. package/plugins/planr/.claude-plugin/plugin.json +0 -11
  102. package/plugins/planr/.codex-plugin/plugin.json +0 -25
  103. package/plugins/planr/agents/pi/planr-reviewer.md +0 -20
  104. package/plugins/planr/agents/pi/planr-worker.md +0 -35
  105. package/plugins/planr/agents/planr-reviewer.md +0 -21
  106. package/plugins/planr/agents/planr-worker.md +0 -40
  107. package/plugins/planr/skills/planr/SKILL.md +0 -60
  108. package/plugins/planr/skills/planr-goal/SKILL.md +0 -52
  109. package/plugins/planr/skills/planr-loop/SKILL.md +0 -126
  110. package/plugins/planr/skills/planr-loop/agents/planr-reviewer.md +0 -21
  111. package/plugins/planr/skills/planr-loop/agents/planr-worker.md +0 -36
  112. package/plugins/planr/skills/planr-loop/references/host-dispatch.md +0 -52
  113. package/plugins/planr/skills/planr-loop/references/recovery-and-verification.md +0 -26
  114. package/plugins/planr/skills/planr-plan/SKILL.md +0 -86
  115. package/plugins/planr/skills/planr-review/SKILL.md +0 -55
  116. package/plugins/planr/skills/planr-status/SKILL.md +0 -52
  117. package/plugins/planr/skills/planr-summary/SKILL.md +0 -30
  118. package/plugins/planr/skills/planr-task-graph/SKILL.md +0 -67
  119. package/plugins/planr/skills/planr-verify-web/SKILL.md +0 -62
  120. package/plugins/planr/skills/planr-work/SKILL.md +0 -93
  121. package/scripts/host-capability-experiment.mjs +0 -2481
  122. package/scripts/host-capability-runtime/v1/schemas/host-capability-expected-manifest.schema.json +0 -377
  123. package/scripts/host-capability-runtime/v1/schemas/host-capability-observed-raw.schema.json +0 -439
  124. package/scripts/host-capability-runtime/v1/schemas/host-capability-provenance.schema.json +0 -178
  125. package/scripts/planr-host-capability-validator +0 -57
  126. /package/{LICENSE.md → LICENSE} +0 -0
@@ -1,98 +0,0 @@
1
- # Evidence adapter protocol v1
2
-
3
- Status: frozen for the `planr.evidence.adapter-request.v1` request and the
4
- `planr.structured_observation_results.v2` result.
5
-
6
- This reference defines the process protocol between Planr Core and a registered
7
- Evidence adapter. It extends `EVIDENCE_CONTRACT_V1.md`. It does not change the
8
- Evidence domain schema.
9
-
10
- ## Trust ownership
11
-
12
- Planr Core creates the adapter request, starts the registered process, and
13
- validates the result. The adapter reports observations. It cannot assign
14
- provenance, decide coverage, or close work.
15
-
16
- Planr treats adapter output as untrusted input until all execution and binding
17
- checks pass. A valid JSON result without a Planr-observed process execution
18
- cannot create trusted Evidence.
19
-
20
- ## Process transport
21
-
22
- Planr starts the adapter with bounded time, stdout, and stderr limits. Planr
23
- writes one JSON request to stdin and then closes stdin. The adapter writes one
24
- JSON result to stdout.
25
-
26
- An availability probe starts the same executable with closed, empty stdin. The
27
- adapter can use that invocation to check runtime availability. A probe result
28
- cannot satisfy an Evidence requirement.
29
-
30
- Planr reserves the `PLANR_EVIDENCE_` environment variable namespace. An adapter
31
- request does not use environment variables for target, environment, or contract
32
- bindings.
33
-
34
- ## `planr.evidence.adapter-request.v1`
35
-
36
- The request has these fields:
37
-
38
- - `schema_version`: `planr.evidence.adapter-request.v1`.
39
- - `request_id`: A new Planr-assigned ID for this process execution.
40
- - `request_digest`: The SHA-256 canonical JSON digest of the request without
41
- `request_digest`.
42
- - `obligation_id` and `criterion_id`: The exact Evidence obligation identity.
43
- - `requirements`: The selected `ObservationRequirement` objects. The array
44
- includes each subject, expected value, target, payload schema, and optional
45
- execution method.
46
- - `target` and `environment`: The runtime bindings selected by Planr.
47
- - `fixture_disclosure`: The fixture and mock disclosure admitted by policy.
48
- - `assurance_policy`: The policy that controls required capture strength.
49
- - `result_contract`: The registered outer result schema binding.
50
- - `execution_contract_digest`: The digest of the registered process contract.
51
- - `execution_binding`: The sealed run-index subset and its requirement IDs.
52
- - `retry`: The exact attempt number, maximum attempts, and predecessor IDs.
53
-
54
- The request contains no provider-specific fields. A Browser Harness, native
55
- browser, Playwright, mobile, desktop, game-engine, API, or CLI adapter receives
56
- the same request shape.
57
-
58
- ## `planr.structured_observation_results.v2`
59
-
60
- A structured adapter result has these required fields:
61
-
62
- - `schema_version`: `planr.structured_observation_results.v2`.
63
- - `request_id` and `request_digest`: Exact copies from the current request.
64
- - `target`, `observed_target`, and `environment`: The declared and observed
65
- runtime identity.
66
- - `execution_contract_digest`: An exact copy from the current request.
67
- - `fixture_disclosure`: The actual fixture and mock use.
68
- - `observations`: One result for every selected requirement and no other
69
- results.
70
-
71
- Each observation contains only `requirement_id`, `type`, and `actual`. The
72
- `actual` object names its payload schema. Planr validates the object against the
73
- registered JSON Schema and evaluates the expected predicate.
74
-
75
- If a requirement selects an agent skill as its execution method, the result
76
- also includes the structured `agent_skill` invocation record required by the
77
- Evidence domain contract. The supervised adapter creates this record. Agent or
78
- user JSON cannot submit it through another trusted path.
79
-
80
- Adapters can include diagnostic top-level fields. Diagnostics do not affect
81
- provenance or coverage.
82
-
83
- ## Failure behavior
84
-
85
- Planr rejects the result if the process fails or if any required binding does
86
- not match. This includes a stale request ID, a stale request digest, a wrong
87
- target, a wrong environment, a wrong execution contract, missing observations,
88
- extra observations, a schema mismatch, and an unsatisfied expected predicate.
89
-
90
- Planr records the failed attempt. Planr does not create a trusted passing
91
- receipt from that result.
92
-
93
- ## Version transition
94
-
95
- `planr.structured_observation_results.v2` replaces
96
- `planr.structured_observation_results.v1`. Planr does not keep a second trusted
97
- compatibility path. Adapter manifests and policy registrations must use the v2
98
- schema reference and artifact name.
@@ -1,382 +0,0 @@
1
- # Evidence Contract v1
2
-
3
- Status: frozen for implementation; v1.1 additive one-shot lifecycle amendment frozen for implementation
4
-
5
- Evidence Contract v1 is Planr's local-first contract for proving acceptance criteria. It defines the durable vocabulary for proof obligations, observation requirements, capability declarations, execution attempts, untrusted proposals, trusted receipts, coverage verdicts, policy, presets, waivers, statuses, compatibility, and extension naming. It does not add public commands by itself and does not grant closure authority until later implementation slices wire the contract into storage, audit, review, trace, pick, and active-goal enforcement. The v1.1 amendment is additive: it binds an explicitly non-repeatable capability to one terminal attempt without changing existing object shapes or repeatable-capability behavior.
6
-
7
- ## Ownership
8
-
9
- - Typed build-plan frontmatter owns authored criterion identity as one non-empty, unique, closed list of `{id, title}` entries. Acceptance prose is narrative only.
10
- - Explicit Evidence migration owns materialization of reviewed `ProofObligation` records bound to those declared criteria.
11
- - The Evidence domain owns `ProofObligation`, `ObservationRequirement`, `VerificationCapabilityManifest`, `VerificationCapabilityInstance`, `EvidenceAttempt`, `UntrustedEvidenceProposal`, `EvidenceReceipt`, `CoverageVerdict`, `EvidencePolicy`, `ProofPreset`, and `EvidenceWaiver`.
12
- - Planr assigns trusted provenance only from Planr-observed execution, verified host events, accepted MCP attestation, validated artifact import, or explicit approval-backed user attestation.
13
- - Public JSON, agent-authored JSON, adapter stdout, logs, and artifacts may propose claims, but they cannot construct trusted provenance, execution identity, freshness, target binding, receipt digest, or closure authority.
14
- - `src/canonical_json.rs` is the future single production owner for RFC 8785/JCS-compatible canonical bytes and SHA-256 digests used by this contract.
15
- - `src/execution.rs` is the future shared owner for bounded process execution, cancellation, process-tree cleanup, output limits, and stdout/stderr digests.
16
- - CLI, MCP, HTTP, docs, audit, hooks, review, trace, and pick surfaces are renderers or consumers. They must use the same Evidence application service and cannot implement alternate coverage decisions.
17
-
18
- ## Existing-System Boundaries
19
-
20
- - Eval remains the owner of comparative candidate evaluation, immutable eval runs, case results, samples, comparisons, invalidations, and eval evidence references. Eval evidence keeps `closure_authority = false`; an eval verdict may support review but cannot close or reopen Planr work by itself.
21
- - Route Audit remains the owner of requested, resolved, and effective routing evidence. Evidence may consume a mapped provenance view, but it must not copy requested route declarations into effective execution proof.
22
- - Agent Profiles, model-routing capability classes, usage-policy capability classes, MCP protocol capabilities, and context tags are dispatch or protocol metadata. They are not verification capability instances and do not prove runtime availability.
23
- - Planr logs remain narrative and supporting records. A `kind = verification` log is a claim that can be referenced, but it never satisfies a binding observation.
24
- - A repository without a binding Evidence policy and without binding plan obligations is explicitly non-binding. A binding plan is `binding_unsatisfied` unless its authoritative active obligations match the declared build-plan criterion set exactly: zero, partial, duplicate, or undeclared bindings all fail closed. Planr returns a hold before leasing or creating a FeatureRun, persists a capability hold when an existing run reaches readiness, rejects coverage settlement, closure, and stop activation, and never substitutes logs or an empty receipt lineage.
25
- - Migration is the sole obligation-materialization path. It is explicit, plan-scoped, previewable, idempotent, and accepts only an exact declared criterion binding set before materializing ordinary immutable `ProofObligation` rows. It must not rewrite plans, logs, reviews, artifacts, or historical claims.
26
- - Planr artifacts remain files or references with digests. An artifact alone is not trusted evidence unless a trusted receipt binds it to the source revision, target, environment, execution identity, observation results, and policy.
27
-
28
- ## Binding Execution Orchestration
29
-
30
- The normal public success path is one plan-scoped `evidence verify` broker call. The caller identity
31
- must differ from the responsible maker. Planr uses that identity for the verifier lease, readiness
32
- admission, adapter execution, coverage evaluation, and FeatureRun settlement. A coordinator or host
33
- must not spawn another model to perform this mechanical Evidence phase. The lower-level readiness
34
- and run services remain diagnostic and application primitives; they do not define a second trusted
35
- workflow.
36
-
37
- Before verification admission, FeatureRun source freeze is legal only when no open ordinary
38
- implementation outcome remains. Planned `code`, `fix`, `docs`, and `test` share the one domain-owned
39
- maker-compatible classification. An active source-frozen run that still has open ordinary work and
40
- has no verifier admission, Evidence attempt, or receipt for its immutable freeze is retired only by
41
- the typed `premature-source-freeze` transition. Retirement preserves the freeze and all Evidence
42
- history, releases active ordinary leases, and creates no successor. The repository-owned no-model
43
- `com.planr.premature_freeze.lifecycle.v1` capability is reserved for the final frozen-source HARDEN
44
- observation; registering it does not execute or satisfy that observation during BUILD.
45
-
46
- An active Verification FeatureRun whose current admission is absent or unequal across the active
47
- plan/run/revision, freeze, verifier worker/generation, optional item, or admitted/sealed run-index
48
- digest is retired only by the typed `inconsistent-verification` transition. A current item whose
49
- status or worker does not match the verifier lease is
50
- `verification_item_ownership_conflict`. Exact equality rejects retirement. One immediate
51
- optimistic transaction invalidates but preserves the freeze, ends or preserves-ended the referenced
52
- batch, releases exact roles, Verification reservations, and the exact observed optional item state,
53
- preserves every prior Evidence/history identity, emits one typed event, and creates no successor.
54
- Repetition reads that event and writes nothing. The
55
- repository-owned `com.planr.inconsistent_verification.retirement.v1` capability is registered during
56
- BUILD but first executes only after HARDEN supplies the exact focused invariant.
57
-
58
- `planr.evidence.run-index.v2` is the sole executable run-index shape. Readiness consumes canonical
59
- authoritative obligation rows and seals exactly one run for every distinct canonical target within
60
- each obligation. A run names one `obligation_id`, one target, and sorted non-empty unique
61
- `requirement_ids`. For each obligation, admission recomputes the target partition and requires the
62
- run subsets to be disjoint and to form the exact union of authoritative observation requirement
63
- IDs. Requirements from different obligations never share a run.
64
-
65
- Execution, structured and ordinary result validation, receipt observation construction, retry
66
- predecessor validation, independence, hermetic reuse, and persisted attempt/receipt lineage bind
67
- only the selected requirement subset plus the sealed source, policy, target, capability,
68
- environment, execution contract, and run-index digest. Extra, missing, duplicate, foreign-target,
69
- or cross-subset data fails before trusted receipt persistence. `evidence/coverage` remains the sole
70
- coverage and closure owner; a run-index result is not a coverage verdict.
71
-
72
- A multi-target obligation that would execute a `non_repeatable_one_shot` capability fails readiness
73
- before launch or durable allowance claim. Host capture consumes the same sealed target/subset
74
- contract as process execution and owns no first-observation or all-targets-equal policy.
75
-
76
- Pre-receipt admission failure persists no attempt, receipt, coverage verdict, or ProductFinding.
77
- One explicit optimistic plan/run/freeze/revision-scoped FeatureRun repair request has a closed
78
- reason enum and conditional seal binding. Pre-seal `readiness-blocked` and
79
- `run-index-seal-failed` require `run_index_digest` to be absent; post-seal pre-receipt
80
- `sealed-run-rejected` and `capability-admission-failed` require the exact admitted digest. A failed
81
- readiness lease transaction rolls back before Planr persists its durable capability hold and
82
- diagnostic, so no unusable verifier lease is committed to create repair context. The repair
83
- invalidates the active freeze, releases verifier ownership and any present verification-item
84
- lease, restores the original maker at the next lease generation, starts one repair batch, emits one
85
- repair event, and projects an optional `verification_item_id`. Post-receipt `product_failed` and
86
- terminal one-shot exhaustion remain their existing distinct lifecycles.
87
-
88
- Satisfied plan coverage settles the active FeatureRun by exact verifier lease generation, active
89
- immutable freeze, and accepted trusted receipt lineage whose source binding exactly equals that
90
- freeze. A verification map item is a zero-or-one projection. If one item is picked or running under
91
- the verifier, settlement closes and logs it in the same transaction; if none exists, settlement
92
- performs zero item/log mutations. A ready unleased verification item remains fail-closed. The
93
- transition always reconciles the verification budget wall, applies `VerificationPassed` to
94
- `Complete` when no ordinary work remains (or `Implementation` if ordinary work reopened),
95
- persists/releases roles through the canonical repository transaction, and emits one event shape
96
- with nullable `item_id` and `log_id`. Binding coverage settlement returns `next_action: none` on
97
- completion and creates no final ReviewGate. `planr plan final-review` is a non-binding-plan flow.
98
-
99
- Terminal `non_repeatable_one_shot` exhaustion is also zero-or-one item inside the trusted
100
- attempt/receipt transaction. Attempt/receipt persistence, budget reconciliation, FeatureRun
101
- cancellation, and verifier release always commit atomically; item failure/logging occurs only when
102
- one active projection is present, and ready-unleased remains fail-closed.
103
-
104
- Post-receipt ProductFinding repair remains distinct from pre-receipt admission repair. The
105
- application resolves the verification map item as an optional current plan-path projection for
106
- routing, maker work packets, settlement, idempotent replay, selective-replay handoff, and verifier
107
- release. Absence performs no item mutation; only a present eligible item is updated. Durable
108
- ProductRepair settlement persists invalidation/run/maker/selective-obligation/settlement/freeze
109
- lineage and no item identity. The lifecycle does not reclassify the outcome or create a receipt.
110
-
111
- This is a hard cut: run-index v1, first-observation target inference, all-targets-equal checks,
112
- item-keyed `pick release --repair`, item-required repair, persisted repair-item identity,
113
- settlement, final-review, and exhaustion ownership, readers, aliases, fallbacks, shims, and runtime
114
- compatibility do not exist.
115
- Completed trusted Evidence v1 receipts remain coverage records because coverage is independent of
116
- run-index orchestration; unexecuted v1 run indexes and in-flight retry lineage lacking the v2
117
- execution binding are not translated or inferred.
118
-
119
- ## Versioning And Compatibility
120
-
121
- - `schema_version` for all v1 objects is `evidence.contract.v1`.
122
- - Additive optional fields are allowed only when old readers can ignore them without changing coverage, trust, freshness, or closure decisions.
123
- - Status enum values, failure reason codes, provenance source kinds, namespace rules, digest algorithms, and trusted/untrusted boundaries are frozen for v1.
124
- - Removing fields, renaming statuses, weakening required trust checks, changing digest semantics, or treating legacy logs as binding proof requires a new major contract.
125
- - Unknown object kinds, observation types, schema versions, status values, provenance kinds, or namespaces are invalid for trusted coverage unless an explicit project extension registers them.
126
- - Canonical JSON bytes and digests are computed over the object without non-contractual display fields. The frozen schema fixture in `docs/contracts/fixtures/evidence/v1/schemas/evidence-contract-v1.schema.json` names each object's required fields.
127
-
128
- ## Contract Digests
129
-
130
- Digest preimages use RFC 8785/JCS canonical JSON bytes over the contract object after the digest field being produced is removed. No other contract field is implicitly excluded.
131
-
132
- - `EvidenceReceipt.receipt_digest`: hash the complete receipt object without the top-level `receipt_digest` field. Source, target, environment, capability, provenance, execution identity, observations, attempts, artifacts, raw result, config digest, fixture disclosure, permissions, sandbox, proof gaps, and timings all remain in the preimage.
133
- - `EvidencePolicy.policy_digest`: hash the complete policy object without the top-level `policy_digest` field. Defaults, presets, observation schema registrations, adapter registrations, extension namespaces, trust/freshness/fixture/completion/layering policy all remain in the preimage. Nested `PolicyLayer.policy_digest` values are included as references to already-materialized lower-layer policies and must not repeat the enclosing policy digest.
134
-
135
- The canonical fixture vectors are executable through `node scripts/verify-evidence-contract-vectors.mjs`.
136
-
137
- ## Namespaces And Extensions
138
-
139
- Built-in observation types and proof presets are starter vocabulary only. They are conveniences for common API, process, browser, desktop, mobile, deployment, filesystem, database, queue, and artifact cases, not a closed enum.
140
-
141
- Observation type names and preset names use one of these namespaces:
142
-
143
- - `planr.*`: reserved for Planr-owned built-ins.
144
- - `mcp.*`: reserved for MCP attestation vocabulary that Planr validates.
145
- - `host.*`: reserved for verified host-native capture contracts.
146
- - Reverse-domain namespaces such as `com.example.queue.job.processed`.
147
- - Project-local namespaces such as `project.queue.job.processed` inside the repository that defines them.
148
-
149
- Custom observation types must reference a versioned JSON Schema and a registration digest in repository-local Evidence policy. Unknown, unregistered, or unavailable custom types remain uncovered and cannot be silently accepted as a weaker built-in.
150
-
151
- ## Object Model
152
-
153
- ### ProofObligation
154
-
155
- A reviewed, binding or advisory contract for one acceptance criterion.
156
-
157
- For a binding build plan, `criterion_id` must name one criterion declared in that plan's checked frontmatter. The obligation does not create criterion identity.
158
-
159
- Required fields:
160
-
161
- - `id`, `schema_version`, `criterion_id`, `plan_id`, optional `item_id`.
162
- - `title`, `binding`, `observations`, `fixture_policy`, `freshness_policy`, `assurance_policy`.
163
- - `policy_digest`, `config_digest`, `created_at`, and optional `supersedes`.
164
-
165
- `binding = true` means closure must evaluate Evidence coverage. `binding = false` may be rendered as guidance but cannot block or satisfy closure.
166
-
167
- ### ObservationRequirement
168
-
169
- One atomic fact that must be observed.
170
-
171
- Required fields:
172
-
173
- - `id`, namespaced `type`, `subject`, `expected`, `target`, `environment`, `runtime_target`.
174
- - Optional `payload_schema`, `state_transitions`, `persistence`, `negative_assertions`, `freshness_policy`, and `assurance_policy`.
175
-
176
- The `type` says what fact is being observed, not which tool must observe it. Tool preference belongs in policy.
177
-
178
- ### VerificationCapabilityManifest
179
-
180
- A versioned static declaration from an adapter, host, or attestor.
181
-
182
- Required fields:
183
-
184
- - `id`, `schema_version`, `version`, `adapter_kind`, `adapter_digest`.
185
- - Supported surfaces, observation type/schema/digest triples, interactions, artifacts, runtime targets, provenance path, permissions, costs, determinism, repeatability, independence, blind spots, and availability probe contract.
186
- - When a capability explicitly declares `repeatability = non_repeatable_one_shot`, Planr derives `max_attempts = 1`; any conflicting caller declaration is rejected before launch. Before the adapter can spawn, Planr atomically claims one durable allowance scoped to the active FeatureRun source freeze. That claim survives process, receipt, or settlement failure, so every later fresh initial, retry, or concurrent contender for the freeze is rejected without spawning. Its committed non-passing attempt (`attempt_index + 1 = max_attempts`), including `product_failed`, atomically exhausts that FeatureRun verification allowance with the attempt and receipt. Planr records `verification_attempts_exhausted`, releases the verifier lease, exposes no next verification action, and does not create a product-finding repair or replay path. A projected verification item is optional: when active it is failed/logged atomically; when absent there is no item/log mutation; when ready but unleased the transaction fails closed. Missing or other repeatability values never infer one-shot behavior.
187
- - Every other capability also defaults to `max_attempts = 1`. A manifest may explicitly admit a larger bounded value only for a repeatable execution contract. Planr never starts a second attempt merely because a verifier or environment failure was returned; a later execution requires a fresh canonical invocation after the reported external state has materially changed.
188
- - A fresh canonical invocation may append a superseding admission for the same exact active source freeze only when the previously admitted run-index digest already has both a durable Evidence attempt and receipt. The previous admission and execution history remain immutable. A conflicting admission with no execution receipt is pre-receipt state and remains rejected; it cannot bypass Verification Admission Repair.
189
- - When source is stale after such a receipt, one canonical broker invocation may perform exactly one observed refresh: invalidate and preserve the old freeze and receipt bindings, release the exact verifier lease, freeze the current source, reacquire verification, and seal again. The broker does not repeat this transition if the replacement source becomes stale.
190
- - Process adapters declare a closed `availability_probe.kind = process` contract with executable name, arguments, optional working directory, timeout, stdout/stderr byte limits, and the payload schema binding for emitted observations.
191
-
192
- A manifest is a claim about what a method can observe. It is not proof that the method is available now.
193
-
194
- ### VerificationCapabilityInstance
195
-
196
- A runtime availability snapshot for one exact manifest, host, surface, version, environment, and permission set.
197
-
198
- Required fields:
199
-
200
- - `id`, `schema_version`, `manifest_id`, `manifest_digest`, `host`, `surface`, `host_version`, `adapter_version`, `environment`, `permissions`, `availability`, `probe_result`, `observed_payload_contract`, `limitations`, `captured_at`.
201
-
202
- `probe_result.probe_execution_id` is the single authoritative runtime probe execution identity for a capability instance. A separate top-level probe execution ID is not part of the contract.
203
-
204
- Instances expire or become stale when manifest, host, environment, permission, schema, or policy inputs change.
205
-
206
- ### EvidenceAttempt
207
-
208
- An immutable record of each verification attempt.
209
-
210
- Required fields:
211
-
212
- - `id`, `schema_version`, `criterion_id`, `obligation_id`, `capability_instance_id`.
213
- - `started_at`, `ended_at`, `status`, resolved command or tool call, exit/signal/error details, retry lineage, stdout/stderr digests, raw result reference, artifact references, and output bounds.
214
-
215
- Attempts are durable whether they pass, fail, time out, abort, skip, become unavailable, or end inconclusively. A later passing attempt does not erase earlier failures.
216
-
217
- Attempt status and execution result must agree: `passed` requires clean exit code `0`; `failed` requires a non-zero exit code; `timed_out`, `skipped`, and `unavailable` require no exit code or signal and the matching error value; `aborted` requires no exit code plus an abort signal and error; `inconclusive` requires a completed exit with an inconclusive error marker.
218
-
219
- ### UntrustedEvidenceProposal
220
-
221
- Adapter, host, import, or agent input before Planr assigns provenance.
222
-
223
- Required fields:
224
-
225
- - `id`, `schema_version`, `source_kind`, `submitted_at`, `claims`, `artifact_refs`, `producer_metadata`.
226
-
227
- Forbidden authoritative fields:
228
-
229
- - Trusted provenance, execution identity, source revision binding, target digest binding, environment identity, freshness result, policy result, coverage result, receipt digest, or closure authority.
230
-
231
- ### EvidenceReceipt
232
-
233
- The trusted outer envelope created only by Planr or an accepted attestation verifier after validation.
234
-
235
- Required fields:
236
-
237
- - `id`, `schema_version`, `criterion_id`, `obligation_id`, `receipt_status`.
238
- - Source revision/tree state, target digest/URI/deployment ID, environment identity, vantage point.
239
- - Capability manifest and instance digests, Planr-assigned provenance, execution/tool-call ID.
240
- - Observation results, attempt IDs and retry history, artifact references and digests.
241
- - Fixture/mock disclosure, permission and sandbox state, proof gaps, started/ended timestamps, and `receipt_digest`.
242
-
243
- Receipts can satisfy coverage only when trusted, fresh, policy-compliant, target-matched, schema-valid, and observation-equivalent to the requirement.
244
-
245
- ### CoverageVerdict
246
-
247
- The canonical coverage result for a criterion, item, plan, or goal.
248
-
249
- Required fields:
250
-
251
- - `id`, `schema_version`, `scope`, `evaluated_at`, `status`, `observation_coverage`, `validation_details`, `suggested_next_action`, `actionable_now`.
252
-
253
- Allowed statuses:
254
-
255
- - `satisfied`: every binding observation is covered by trusted, fresh, policy-compliant receipts.
256
- - `unsatisfied`: one or more observations lack sufficient proof and a product or test failure is indicated.
257
- - `blocked`: proof cannot currently be produced because a required capability, permission, sandbox, environment, or dependency is unavailable.
258
- - `inconclusive`: attempted evidence cannot decide the required observation.
259
- - `waived`: every remaining binding gap is covered by a valid scoped waiver.
260
- - `stale`: previously sufficient evidence was invalidated by source, target, environment, policy, adapter, schema, configuration, or freshness change.
261
-
262
- Gap coverage must match the verdict status:
263
-
264
- - `unsatisfied` uses `missing` or `unsatisfied` gap entries with missing/product/verifier/policy/trust/schema/fixture/waiver/unsupported-observation reasons.
265
- - `blocked` uses `blocked` gap entries with capability, permission, sandbox, environment, dependency, or runtime-target reasons.
266
- - `inconclusive` uses `inconclusive` gap entries with timeout, abort, inconclusive-result, or verifier-failed reasons.
267
- - `waived` uses `waived` gap entries, requires `waiver_id`, and records the underlying waived reason rather than `waiver_missing` or `waiver_expired`.
268
- - `stale` uses `stale` gap entries with stale source, target, environment, policy, adapter schema, or configuration reasons.
269
-
270
- ### EvidencePolicy, ProofPreset, EvidenceWaiver
271
-
272
- Repository policy lives in `.planr/evidence.yaml`. It owns defaults, named presets, observation schema registrations, adapter registrations, trust/freshness/fixture/completion policy, and extension namespaces.
273
-
274
- Adapter registrations bind the manifest ID, repository-local manifest path, manifest digest, observation types, payload schema bindings, provenance path, and closed execution contract used by Planr-observed process adapters.
275
-
276
- Policy layer scope uses the frozen `EvidenceScope` chain. Repository policy defaults and extension declarations are document-level policy. Product-level policy is represented by `goal`, plan-level policy by `plan`, item-specific branches by `item`, and criterion-level policy by `criterion`.
277
-
278
- Policy layers may strengthen lower-level requirements. Weakening requires an explicit waiver. Waivers include identity, reason, scope, exact observation IDs, source/target binding, created-at, expires-at, approval reference, and audit trail.
279
-
280
- ## Status And Failure Vocabularies
281
-
282
- `EvidenceAttempt.status` values:
283
-
284
- - `passed`, `failed`, `skipped`, `timed_out`, `aborted`, `unavailable`, `inconclusive`.
285
-
286
- `EvidenceReceipt.receipt_status` values:
287
-
288
- - `trusted`, `rejected`, `untrusted`, `stale`, `superseded`.
289
-
290
- `VerificationCapabilityInstance.availability.status` values:
291
-
292
- - `available`, `unavailable`, `degraded`, `permission_denied`, `sandbox_blocked`, `unsupported`, `probe_failed`.
293
-
294
- Coverage gap/failure reason codes:
295
-
296
- - `missing_observation`, `missing_capability`, `permission_denied`, `sandbox_blocked`, `environment_unavailable`, `external_dependency_unavailable`, `product_failed`, `verifier_failed`, `timed_out`, `aborted`, `inconclusive_result`, `stale_source`, `stale_target`, `stale_environment`, `stale_policy`, `stale_adapter_schema`, `stale_configuration`, `target_mismatch`, `schema_mismatch`, `manifest_mismatch`, `untrusted_provenance`, `fixture_disallowed`, `mock_disallowed`, `insufficient_assurance`, `waiver_missing`, `waiver_expired`, `unknown_observation_type`, `unsupported_runtime_target`.
297
-
298
- Operator aliases are rendered as aliases only and resolve to the canonical codes above: `capability_unavailable` -> `missing_capability`, `dependency_unavailable` -> `external_dependency_unavailable`, `policy_failed` -> `stale_policy`, `trust_failed` -> `untrusted_provenance`, and `stale_evidence` -> `stale_source`. Unknown aliases are classified as `verifier_failed` rather than `product_failed`.
299
-
300
- Explicit Evidence migration input uses `schema_version = "planr.evidence.migration.v1"`, a single `plan_id`, and an `obligations[]` array of full `ProofObligation` objects whose `plan_id` matches the migration plan and whose `binding` is `true`. The payload's criterion bindings must exactly match the checked build-plan frontmatter set. Preview is non-mutating. Apply is atomic for the migration payload: any conflict, malformed obligation, missing criterion, duplicate criterion, or undeclared criterion leaves the plan with no newly bound partial obligations. Reapplying an identical payload is `unchanged`.
301
-
302
- Process adapters may report a host boundary failure only with an exact single-field JSON line on stdout or stderr:
303
-
304
- - `{"planr_adapter_boundary":"permission_denied"}`
305
- - `{"planr_adapter_boundary":"sandbox_blocked"}`
306
-
307
- Planr treats those structured lines as adapter boundary signals for failed process attempts and capability probes. Numeric exit codes alone do not imply `sandbox_blocked`; shell exit code 126 remains permission denied.
308
-
309
- ## Trust And Provenance Rules
310
-
311
- - Public deserialization always produces an `UntrustedEvidenceProposal` or authored policy object, never a trusted receipt.
312
- - Adapter output can report observed facts and artifact references, but Planr binds the actual source revision, target, environment, execution identity, timings, retries, sandbox, permissions, output bounds, and receipt digest.
313
- - Requested route metadata, declared agent profile metadata, and model names are not effective execution proof.
314
- - A user approval can attest a fact only through the waiver or user-attestation path, with identity, reason, scope, expiry where applicable, and audit trail. It cannot silently convert agent JSON into Planr-observed execution.
315
- - Artifacts referenced by trusted receipts require content digests and repository/root containment or explicit external URI policy.
316
- - Fixture and mock use must be disclosed and accepted by policy for the exact observation.
317
-
318
- ## Canonical Fixtures
319
-
320
- The v1 frozen fixtures are:
321
-
322
- - `docs/contracts/fixtures/evidence/v1/schemas/evidence-contract-v1.schema.json`
323
- - `docs/contracts/fixtures/evidence/v1/examples/proof-obligation.json`
324
- - `docs/contracts/fixtures/evidence/v1/examples/verification-capability-manifest.json`
325
- - `docs/contracts/fixtures/evidence/v1/examples/verification-capability-instance.json`
326
- - `docs/contracts/fixtures/evidence/v1/examples/evidence-attempt.json`
327
- - `docs/contracts/fixtures/evidence/v1/examples/untrusted-evidence-proposal.json`
328
- - `docs/contracts/fixtures/evidence/v1/examples/evidence-receipt.json`
329
- - `docs/contracts/fixtures/evidence/v1/examples/coverage-verdict.json`
330
- - `docs/contracts/fixtures/evidence/v1/examples/evidence-policy.json`
331
- - `docs/contracts/fixtures/evidence/v1/examples/proof-preset.json`
332
- - `docs/contracts/fixtures/evidence/v1/examples/evidence-waiver.json`
333
- - `docs/contracts/fixtures/evidence/v1/negative/available-empty-probe-capability.json`
334
- - `docs/contracts/fixtures/evidence/v1/negative/mismatched-probe-execution-id-capability.json`
335
- - `docs/contracts/fixtures/evidence/v1/negative/empty-trust-bindings-receipt.json`
336
- - `docs/contracts/fixtures/evidence/v1/negative/failed-zero-exit-attempt.json`
337
- - `docs/contracts/fixtures/evidence/v1/negative/forged-trusted-receipt.json`
338
- - `docs/contracts/fixtures/evidence/v1/negative/timed-out-zero-exit-attempt.json`
339
- - `docs/contracts/fixtures/evidence/v1/negative/aborted-zero-exit-attempt.json`
340
- - `docs/contracts/fixtures/evidence/v1/negative/skipped-zero-exit-attempt.json`
341
- - `docs/contracts/fixtures/evidence/v1/negative/unavailable-zero-exit-attempt.json`
342
- - `docs/contracts/fixtures/evidence/v1/negative/inconclusive-clean-exit-attempt.json`
343
- - `docs/contracts/fixtures/evidence/v1/negative/passed-empty-attempt.json`
344
- - `docs/contracts/fixtures/evidence/v1/negative/unbound-waiver.json`
345
- - `docs/contracts/fixtures/evidence/v1/negative/minimal-policy-missing-owned-inputs.json`
346
- - `docs/contracts/fixtures/evidence/v1/negative/policy-default-preset-unregistered.json`
347
- - `docs/contracts/fixtures/evidence/v1/negative/policy-weakening-without-waiver.json`
348
- - `docs/contracts/fixtures/evidence/v1/negative/satisfied-empty-coverage-verdict.json`
349
- - `docs/contracts/fixtures/evidence/v1/negative/unsatisfied-coverage-without-gap.json`
350
- - `docs/contracts/fixtures/evidence/v1/negative/process-probe-missing-output-limits.json`
351
- - `docs/contracts/fixtures/evidence/v1/negative/adapter-registration-missing-execution-contract.json`
352
- - `docs/contracts/fixtures/evidence/v1/negative/waived-coverage-missing-waiver-id.json`
353
- - `docs/contracts/fixtures/evidence/v1/negative/waived-coverage-forbidden-gap-reason.json`
354
- - `docs/contracts/fixtures/evidence/v1/negative/blocked-coverage-with-stale-reason.json`
355
- - `docs/contracts/fixtures/evidence/v1/negative/inconclusive-coverage-with-blocked-reason.json`
356
- - `docs/contracts/fixtures/evidence/v1/negative/stale-coverage-with-inconclusive-reason.json`
357
-
358
- Replayable schema validation:
359
-
360
- ```bash
361
- set -e
362
- schema='docs/contracts/fixtures/evidence/v1/schemas/evidence-contract-v1.schema.json'
363
- node scripts/verify-evidence-contract-vectors.mjs
364
- npx --yes ajv-cli@5.0.0 validate --spec=draft2020 --validate-formats=false -s "$schema" -d 'docs/contracts/fixtures/evidence/v1/examples/*.json'
365
- for fixture in docs/contracts/fixtures/evidence/v1/negative/*.json; do
366
- case "$fixture" in
367
- *policy-default-preset-unregistered.json)
368
- npx --yes ajv-cli@5.0.0 validate --spec=draft2020 --validate-formats=false -s "$schema" -d "$fixture"
369
- echo "$fixture accepted by schema for semantic validation"
370
- continue
371
- ;;
372
- esac
373
- if npx --yes ajv-cli@5.0.0 validate --spec=draft2020 --validate-formats=false -s "$schema" -d "$fixture" >/tmp/planr-evidence-negative.out 2>&1; then
374
- cat /tmp/planr-evidence-negative.out
375
- echo "unexpected valid negative fixture: $fixture" >&2
376
- exit 1
377
- fi
378
- echo "$fixture rejected as expected"
379
- done
380
- ```
381
-
382
- Later implementation slices must use these fixtures as no-drift inputs for production canonicalization, schema validation, and coverage behavior.
@@ -1,139 +0,0 @@
1
- # Grok Build Integration Contract v1
2
-
3
- Status: frozen for implementation
4
-
5
- Frozen: 2026-07-27
6
-
7
- Upstream source probe: `xai-org/grok-build` commit
8
- `b41c75a578f98bddbd326ab02cd53618451d97ee` (2026-07-26)
9
-
10
- This contract is the implementation boundary for first-class Grok Build support.
11
- It reconciles the public xAI documentation, the locally cloned upstream source,
12
- and Planr's local-first integration rules. Live authenticated verification is a
13
- separate maintainer-local release gate; it never runs in CI.
14
-
15
- ## Frozen artifact and discovery policy
16
-
17
- `planr install grok` owns exactly the repository paths in the executable
18
- contract below. Workflow files are copied byte-for-byte from the canonical
19
- `plugins/planr` sources. There is no second Grok-specific workflow body.
20
-
21
- Planr does **not** emit `.grok/plugins/planr` or a Grok plugin manifest in v1.
22
- Current Grok source discovers project plugins from `.grok/plugins`, but project
23
- plugins default to disabled and project `.grok/config.toml` does not merge
24
- `[plugins].enabled`. A repository-local plugin would therefore require
25
- user-level enablement and would not satisfy one-command project setup. Native
26
- `.grok/skills/<name>/` and `.grok/agents/*.md` are documented, directly
27
- discovered project paths and do not depend on Claude compatibility scanners.
28
-
29
- Grok's current manifest lookup is still relevant for troubleshooting: a plugin
30
- root checks `plugin.json`, then `.grok-plugin/plugin.json`, then
31
- `.claude-plugin/plugin.json`, and finally convention-based component folders.
32
- That behavior is observed upstream but deliberately not used by Planr v1.
33
-
34
- ```json
35
- {
36
- "contract_version": 1,
37
- "upstream_revision": "b41c75a578f98bddbd326ab02cd53618451d97ee",
38
- "artifacts": [
39
- {"target": ".grok/config.toml", "source": "generated:grok_project_config", "kind": "mcp"},
40
- {"target": ".grok/agents/planr-reviewer.md", "source": "plugins/planr/agents/planr-reviewer.md", "kind": "agent"},
41
- {"target": ".grok/agents/planr-worker.md", "source": "plugins/planr/agents/planr-worker.md", "kind": "agent"},
42
- {"target": ".grok/skills/planr-goal/SKILL.md", "source": "plugins/planr/skills/planr-goal/SKILL.md", "kind": "skill"},
43
- {"target": ".grok/skills/planr-loop/SKILL.md", "source": "plugins/planr/skills/planr-loop/SKILL.md", "kind": "skill"},
44
- {"target": ".grok/skills/planr-loop/agents/planr-reviewer.md", "source": "plugins/planr/skills/planr-loop/agents/planr-reviewer.md", "kind": "skill_asset"},
45
- {"target": ".grok/skills/planr-loop/agents/planr-worker.md", "source": "plugins/planr/skills/planr-loop/agents/planr-worker.md", "kind": "skill_asset"},
46
- {"target": ".grok/skills/planr-loop/references/host-dispatch.md", "source": "plugins/planr/skills/planr-loop/references/host-dispatch.md", "kind": "skill_asset"},
47
- {"target": ".grok/skills/planr-loop/references/recovery-and-verification.md", "source": "plugins/planr/skills/planr-loop/references/recovery-and-verification.md", "kind": "skill_asset"},
48
- {"target": ".grok/skills/planr-plan/SKILL.md", "source": "plugins/planr/skills/planr-plan/SKILL.md", "kind": "skill"},
49
- {"target": ".grok/skills/planr-review/SKILL.md", "source": "plugins/planr/skills/planr-review/SKILL.md", "kind": "skill"},
50
- {"target": ".grok/skills/planr-status/SKILL.md", "source": "plugins/planr/skills/planr-status/SKILL.md", "kind": "skill"},
51
- {"target": ".grok/skills/planr-summary/SKILL.md", "source": "plugins/planr/skills/planr-summary/SKILL.md", "kind": "skill"},
52
- {"target": ".grok/skills/planr-task-graph/SKILL.md", "source": "plugins/planr/skills/planr-task-graph/SKILL.md", "kind": "skill"},
53
- {"target": ".grok/skills/planr-verify-web/SKILL.md", "source": "plugins/planr/skills/planr-verify-web/SKILL.md", "kind": "skill"},
54
- {"target": ".grok/skills/planr-work/SKILL.md", "source": "plugins/planr/skills/planr-work/SKILL.md", "kind": "skill"},
55
- {"target": ".grok/skills/planr/SKILL.md", "source": "plugins/planr/skills/planr/SKILL.md", "kind": "skill"}
56
- ],
57
- "mcp": {
58
- "table": "mcp_servers.planr",
59
- "command": "planr",
60
- "args": ["mcp"],
61
- "enabled": true,
62
- "startup_timeout_sec": 30,
63
- "tool_timeout_sec": 6000,
64
- "env": {"PLANR_MCP_CLIENT": "grok"},
65
- "forbidden_fields": ["XAI_API_KEY", "api_key", "auth", "model", "headers", "url"]
66
- },
67
- "plugin": {
68
- "emitted": false,
69
- "project_root": ".grok/plugins",
70
- "manifest_precedence": ["plugin.json", ".grok-plugin/plugin.json", ".claude-plugin/plugin.json", "convention"],
71
- "project_default": "disabled",
72
- "project_config_enabled_merged": false
73
- },
74
- "hooks": {"supported": false, "artifacts": []},
75
- "client_all_includes_grok": false,
76
- "headless": {"command": "grok --no-auto-update -p \"<prompt>\" --output-format json"}
77
- }
78
- ```
79
-
80
- The generated `.grok/config.toml` table is therefore:
81
-
82
- ```toml
83
- [mcp_servers.planr]
84
- command = "planr"
85
- args = ["mcp"]
86
- enabled = true
87
- startup_timeout_sec = 30
88
- tool_timeout_sec = 6000
89
- env = { PLANR_MCP_CLIENT = "grok" }
90
- ```
91
-
92
- `PLANR_MCP_CLIENT=grok` is a narrow adapter marker applied by Grok's MCP
93
- launcher to the Planr child process. Planr may use the exact value as an
94
- advisory observed-client signal. It is not authentication, authorization, or a
95
- general worker identity. Ambient `GROK_*` variables are not accepted as the v1
96
- signal because the probed Grok MCP launcher does not inject a stable one.
97
-
98
- ## Merge and overwrite policy
99
-
100
- - Missing `.grok/config.toml`: create it with only the Planr MCP table.
101
- - Existing valid config: perform a document-preserving TOML merge. Preserve
102
- every foreign table, key, comment, and order; only `mcp_servers.planr` is
103
- owned by Planr.
104
- - Existing different `mcp_servers.planr`: without `--force`, preserve it and
105
- report a conflict; with `--force`, replace only that table.
106
- - Malformed config: fail with a path-and-parse diagnostic and write nothing,
107
- including under `--force`.
108
- - Workflow target missing: write the canonical source. Existing identical
109
- content is unchanged. Existing different content is preserved without
110
- `--force` and replaced from the canonical source with `--force`.
111
- - `--no-mcp` omits `.grok/config.toml` reconciliation. `--no-hooks` is accepted
112
- for CLI parity but changes no Grok paths because v1 installs no hooks.
113
- - Dry-run enumerates the same paths the corresponding write would reconcile.
114
-
115
- ## Security and CI boundary
116
-
117
- Repository artifacts contain no xAI credential, token, auth-file path, model
118
- selection, endpoint, or absolute maintainer path. Planr never reads or copies
119
- `~/.grok`, `$GROK_HOME`, session data, `auth.json`, or
120
- `mcp_credentials.json` while installing.
121
-
122
- GitHub Actions and release workflows must not install or invoke Grok, reference
123
- `XAI_API_KEY`, gate on an xAI secret, or perform live inference. Deterministic
124
- tests parse and compare generated files without Grok installed. Maintainer-local
125
- release verification may use an existing login, but recorded evidence is
126
- limited to redacted discovery/origin, diagnostics, and the disposable Planr
127
- project identity.
128
-
129
- The supported inspection and headless syntax is `grok inspect --json` and
130
- `grok --no-auto-update -p "<prompt>" --output-format json`; `grok exec` is not part of this contract.
131
-
132
- ## Sources
133
-
134
- - https://docs.x.ai/build/features/skills-plugins-marketplaces
135
- - https://docs.x.ai/build/settings
136
- - https://docs.x.ai/build/features/mcp-servers
137
- - https://docs.x.ai/build/cli/reference
138
- - https://docs.x.ai/build/cli/headless-scripting
139
- - https://github.com/xai-org/grok-build/tree/b41c75a578f98bddbd326ab02cd53618451d97ee
@@ -1,9 +0,0 @@
1
- {
2
- "affectedReleases": [
3
- "1.7.2"
4
- ],
5
- "affectedThrough": "1.7.2",
6
- "correctedFrom": "1.7.3",
7
- "noticeSchema": 1,
8
- "status": "corrected"
9
- }