agentic-proofkit 0.1.91

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 (73) hide show
  1. package/ADOPTION.md +464 -0
  2. package/LICENSE +21 -0
  3. package/NON_CLAIMS.md +197 -0
  4. package/README.md +265 -0
  5. package/dist/agentic-proofkit +35 -0
  6. package/dist/platform/darwin-arm64/agentic-proofkit +0 -0
  7. package/dist/platform/darwin-x64/agentic-proofkit +0 -0
  8. package/dist/platform/linux-arm64/agentic-proofkit +0 -0
  9. package/dist/platform/linux-x64/agentic-proofkit +0 -0
  10. package/docs/adoption-checklist-report-design.md +138 -0
  11. package/docs/adoption-workflow-agent-envelope-design.md +67 -0
  12. package/docs/adoption-workflow-authority-routes-design.md +76 -0
  13. package/docs/adoption-workflow-contract-envelope-design.md +87 -0
  14. package/docs/adoption-workflow-plan-design.md +97 -0
  15. package/docs/agent-guidance-envelope-design.md +550 -0
  16. package/docs/binding-partition-admission-design.md +127 -0
  17. package/docs/bootstrap-agent-envelope-design.md +97 -0
  18. package/docs/bootstrap-materialization-manifest-design.md +100 -0
  19. package/docs/branch-authority-report-design.md +121 -0
  20. package/docs/changed-path-set-agent-envelope-design.md +70 -0
  21. package/docs/completion-criteria-report-design.md +132 -0
  22. package/docs/custom-rule-boundary-design.md +56 -0
  23. package/docs/deployment-evidence-admission-design.md +80 -0
  24. package/docs/document-lifecycle-boundary-design.md +62 -0
  25. package/docs/json-report-cli-adapter-design.md +83 -0
  26. package/docs/migration-parity-admission-design.md +90 -0
  27. package/docs/migration-plan-design.md +73 -0
  28. package/docs/obligation-decision-agent-envelope-design.md +105 -0
  29. package/docs/obligation-decision-state-design.md +100 -0
  30. package/docs/package-runtime-dependency-admission-design.md +80 -0
  31. package/docs/producer-policy-self-proof-design.md +142 -0
  32. package/docs/project-structure-agent-envelope-design.md +121 -0
  33. package/docs/project-structure-scaffold-design.md +89 -0
  34. package/docs/proof-obligation-algebra-design.md +108 -0
  35. package/docs/proof-receipt-admission-design.md +108 -0
  36. package/docs/proofkit-contract-map.md +55 -0
  37. package/docs/receipt-currentness-scope-admission-design.md +103 -0
  38. package/docs/receipt-producer-admission-design.md +106 -0
  39. package/docs/receipt-trust-class-admission-design.md +113 -0
  40. package/docs/rendered-artifact-freshness-design.md +55 -0
  41. package/docs/requirement-browser-view-design.md +229 -0
  42. package/docs/requirement-proof-resolver-projection-design.md +97 -0
  43. package/docs/requirement-proof-source-set-design.md +72 -0
  44. package/docs/requirement-proof-view-design.md +138 -0
  45. package/docs/requirement-source-admission-design.md +66 -0
  46. package/docs/requirement-source-transition-design.md +66 -0
  47. package/docs/requirement-source-view-design.md +51 -0
  48. package/docs/scaffold-profile-plan-design.md +72 -0
  49. package/docs/secret-shaped-json-scan-design.md +60 -0
  50. package/docs/selective-evidence-obligation-decision-design.md +139 -0
  51. package/docs/selective-evidence-producer-admission-design.md +106 -0
  52. package/docs/selective-evidence-receipt-trust-class-design.md +100 -0
  53. package/docs/selective-gate-evidence-agent-envelope-design.md +100 -0
  54. package/docs/selective-gate-plan-agent-envelope-design.md +95 -0
  55. package/docs/selective-planner-edge-coverage-design.md +89 -0
  56. package/docs/spec-overview-claim-boundary-design.md +50 -0
  57. package/docs/spec-proof-bundle-admission-design.md +105 -0
  58. package/docs/specs/proofkit-consumer-infra-retirement/overview.md +44 -0
  59. package/docs/specs/proofkit-consumer-infra-retirement/requirements.v1.json +175 -0
  60. package/docs/specs/proofkit-package-boundary/overview.md +32 -0
  61. package/docs/specs/proofkit-package-boundary/requirements.v1.json +121 -0
  62. package/docs/specs/proofkit-receipt-authority/overview.md +35 -0
  63. package/docs/specs/proofkit-receipt-authority/requirements.v1.json +121 -0
  64. package/docs/specs/proofkit-spec-proof-core/overview.md +36 -0
  65. package/docs/specs/proofkit-spec-proof-core/requirements.v1.json +148 -0
  66. package/docs/witness-scheduler-plan-design.md +57 -0
  67. package/docs/workspace-planning-agent-envelope-design.md +101 -0
  68. package/docs/workspace-registry-admission-design.md +57 -0
  69. package/package.json +54 -0
  70. package/proofkit/cli-contract.v1.json +808 -0
  71. package/proofkit/receipt-producer-policy.json +48 -0
  72. package/proofkit/requirement-bindings.json +520 -0
  73. package/proofkit/witness-plan.json +649 -0
@@ -0,0 +1,97 @@
1
+ # Bootstrap Agent Envelope Design
2
+
3
+ Status: accepted; implemented as an opt-in CLI projection.
4
+
5
+ Owner: `proofkit`.
6
+
7
+ ## Purpose
8
+
9
+ Gradual adoption bootstrap reports include starter payloads. Those payloads are
10
+ useful for materialization, but they are too large for the first agent routing
11
+ step. Agents need the smaller actionable packet: which caller-owned files are
12
+ planned, which observe-mode commands should be run, and which promotion steps
13
+ remain caller-owned.
14
+
15
+ Formal goal:
16
+
17
+ ```text
18
+ caller-owned bootstrap report
19
+ -> bounded bootstrap agent envelope
20
+ -> caller-owned file materialization and observe-mode verification
21
+ ```
22
+
23
+ ## Authority Boundary
24
+
25
+ Proofkit owns:
26
+
27
+ - deterministic envelope construction from the bootstrap result;
28
+ - bounded planned-file refs with context roles;
29
+ - command refs for emitted observe-mode bootstrap commands;
30
+ - route questions and action-plan projection;
31
+ - invalid-input envelope reporting for parsed bootstrap failures.
32
+
33
+ The consuming repository owns:
34
+
35
+ - whether to create or update the planned files;
36
+ - final specification and proof-binding content;
37
+ - native witness execution;
38
+ - receipt production and producer admission;
39
+ - CI freshness, merge approval, enforcement promotion, and rollout decisions.
40
+
41
+ Formal rule:
42
+
43
+ ```text
44
+ The bootstrap envelope routes first adoption work.
45
+ The bootstrap report owns starter payload planning.
46
+ The consuming repository owns materialization and verification.
47
+ ```
48
+
49
+ ## Model
50
+
51
+ The projection emits:
52
+
53
+ - context refs for planned module spec, profile, adoption, guidance, proof
54
+ binding, and witness-plan files;
55
+ - command refs for emitted observe-mode proofkit commands;
56
+ - bind, verify, and promote action items;
57
+ - route questions for what changed, what proves it, and who owns it;
58
+ - no payload body copies;
59
+ - no receipt refs because the bootstrap step has not executed witnesses.
60
+
61
+ The envelope is intentionally not a starter-file transport. Consumers that need
62
+ the actual starter JSON payloads must inspect the full bootstrap report.
63
+
64
+ ## Rejected Alternatives
65
+
66
+ | Alternative | Rejection reason |
67
+ |---|---|
68
+ | Emit the full bootstrap report as the agent packet | It repeats starter payloads and defeats the purpose of bounded guidance. |
69
+ | Make the bootstrap command write planned files | It would turn proofkit into a repository mutator and policy owner. |
70
+ | Treat planned commands as passed evidence | Bootstrap commands are instructions for caller-owned execution, not receipts. |
71
+ | Add a generic envelope for every report shape | Report families need separate mapping proofs to avoid misleading actions. |
72
+
73
+ ## Proof Obligations
74
+
75
+ - CLI test for `gradual-adoption-bootstrap --agent-envelope`;
76
+ - invalid-input envelope test for bootstrap parsing failures;
77
+ - unsupported command test proving unrelated report families still reject
78
+ `--agent-envelope`;
79
+ - package artifact test proving the design note ships with the public CLI
80
+ contract;
81
+ - full package check proving ordinary bootstrap output is unchanged without
82
+ `--agent-envelope`.
83
+
84
+ ## Non-Claims
85
+
86
+ Bootstrap agent envelopes do not claim:
87
+
88
+ - file writes;
89
+ - starter payload completeness inside the envelope;
90
+ - native witness execution;
91
+ - command pass evidence;
92
+ - receipt freshness;
93
+ - producer admission;
94
+ - merge approval;
95
+ - enforcement promotion approval;
96
+ - rollout approval;
97
+ - repository policy ownership.
@@ -0,0 +1,100 @@
1
+ # Bootstrap Materialization Manifest Design
2
+
3
+ Status: accepted; implemented as an opt-in dry-run projection.
4
+
5
+ Owner: `proofkit`.
6
+
7
+ ## Purpose
8
+
9
+ Gradual adoption bootstrap reports produce starter payloads, but a consuming
10
+ repository still needs a deterministic review surface before an agent writes
11
+ files. The materialization manifest turns the bootstrap result into an explicit
12
+ dry-run file list with payload content hashes, caller-owned content gaps, and
13
+ non-claims.
14
+
15
+ Formal goal:
16
+
17
+ ```text
18
+ caller-owned bootstrap input
19
+ -> bootstrap report
20
+ -> dry-run materialization manifest
21
+ -> caller-owned review and file writes
22
+ ```
23
+
24
+ ## Authority Boundary
25
+
26
+ Proofkit owns:
27
+
28
+ - deterministic manifest construction from an admitted bootstrap report;
29
+ - mapping bootstrap payload keys to repository-relative file paths;
30
+ - stable JSON payload text and `sha256:` content refs for generated starter
31
+ payloads;
32
+ - explicit caller-content-required entries for files proofkit cannot own.
33
+
34
+ The consuming repository owns:
35
+
36
+ - whether to write, overwrite, merge, or ignore each file;
37
+ - final specification text and repository profile content;
38
+ - existing-file conflict resolution;
39
+ - native witness execution;
40
+ - receipt production, CI freshness, merge approval, enforcement promotion, and
41
+ rollout decisions.
42
+
43
+ Formal rule:
44
+
45
+ ```text
46
+ The manifest describes candidate files.
47
+ It does not write candidate files.
48
+ The consuming repository owns all materialization decisions.
49
+ ```
50
+
51
+ ## Model
52
+
53
+ The projection emits:
54
+
55
+ - `manifestKind = proofkit.gradual-adoption-bootstrap-materialization-manifest`;
56
+ - a source bootstrap report ref with a stable hash;
57
+ - one file entry per planned bootstrap file;
58
+ - `payload_available` entries with stable JSON content and `contentSha256`;
59
+ - `caller_content_required` entries with no content for module specs and
60
+ repository profiles;
61
+ - next commands that should be run after caller-owned materialization review;
62
+ - non-claims denying file writes, file existence, witness execution, merge,
63
+ enforcement, rollout, and product-readiness approval.
64
+
65
+ ## Rejected Alternatives
66
+
67
+ | Alternative | Rejection reason |
68
+ |---|---|
69
+ | Let `gradual-adoption-bootstrap` write files | This would make proofkit a repository mutator and create hidden policy authority. |
70
+ | Put file content into the agent envelope | Agent envelopes are bounded routing packets; payload bodies would defeat token efficiency. |
71
+ | Emit only hashes without content | That would not help first-time adoption because the consumer would still need to recover the starter payloads elsewhere. |
72
+ | Treat module specs and profiles as generated content | Those files carry repository-specific meaning and must remain caller-owned. |
73
+
74
+ ## Proof Obligations
75
+
76
+ - API test proving deterministic file entries, content hashes, and caller-owned
77
+ gaps;
78
+ - CLI test for `gradual-adoption-bootstrap --materialization-manifest`;
79
+ - CLI test proving `--materialization-manifest` is bootstrap-only and mutually
80
+ exclusive with `--agent-envelope`;
81
+ - package artifact test proving the design note ships with the public CLI
82
+ contract;
83
+ - full package check proving ordinary bootstrap and envelope outputs are
84
+ unchanged.
85
+
86
+ ## Non-Claims
87
+
88
+ Bootstrap materialization manifests do not claim:
89
+
90
+ - file writes;
91
+ - file existence;
92
+ - overwrite safety;
93
+ - final specification or repository profile content;
94
+ - native witness execution;
95
+ - command pass evidence;
96
+ - receipt freshness;
97
+ - merge approval;
98
+ - enforcement promotion approval;
99
+ - rollout approval;
100
+ - repository policy ownership.
@@ -0,0 +1,121 @@
1
+ # Branch Authority Report Design
2
+
3
+ ## Decision
4
+
5
+ Proofkit provides a `branch-authority` report that compares caller-provided
6
+ branch authority facts against caller-provided expected branches.
7
+
8
+ ## Problem
9
+
10
+ Repository automation often depends on several branch references:
11
+
12
+ - repository default branch;
13
+ - pull request base branch;
14
+ - CI push trigger branch;
15
+ - package or release source branch;
16
+ - tag-only release workflow guard branch.
17
+
18
+ If those references drift, review, package, and publish authority can point at
19
+ different source lines. A consumer needs a compact report that exposes that
20
+ drift without requiring Proofkit to query GitHub, parse workflows, or decide
21
+ which branch name is correct.
22
+
23
+ Formal risk:
24
+
25
+ ```text
26
+ observed branch ref != expected branch ref
27
+ -> review, CI, or publish authority may evaluate a stale source line
28
+ -> proof and release evidence may no longer describe the same code line
29
+ ```
30
+
31
+ ## Boundary
32
+
33
+ Proofkit owns:
34
+
35
+ - exact validation of caller-provided branch authority records;
36
+ - deterministic comparison of `observedBranch` to `expectedBranch`;
37
+ - required versus advisory drift classification;
38
+ - stable report output and non-claims.
39
+
40
+ The consuming repository owns:
41
+
42
+ - repository default branch discovery;
43
+ - workflow parsing;
44
+ - branch protection and repository settings;
45
+ - which branch refs are required;
46
+ - whether an expected branch is correct;
47
+ - remediation, merge, publish, release, and rollout decisions.
48
+
49
+ Formal rule:
50
+
51
+ ```text
52
+ The branch authority report compares caller-provided facts.
53
+ It does not discover branch facts, mutate settings, or approve release.
54
+ ```
55
+
56
+ ## Model
57
+
58
+ The input declares:
59
+
60
+ - `reportId`;
61
+ - branch refs;
62
+ - preexisting caller failures;
63
+ - non-claims.
64
+
65
+ Each branch ref declares:
66
+
67
+ - `refId`;
68
+ - `refKind`;
69
+ - `observedBranch`;
70
+ - `expectedBranch`;
71
+ - `required`;
72
+ - `evidenceRef`;
73
+ - non-claims.
74
+
75
+ The report fails when a required branch ref drifts or the caller supplies
76
+ preexisting failures. Optional branch drift is visible as advisory diagnostics,
77
+ but it does not fail the report.
78
+
79
+ `expectedBranch` is caller policy, not Proofkit policy. This lets consumers use
80
+ `main`, `master`, release branches, protected maintenance branches, or separate
81
+ publish-source branches without Proofkit hard-coding a repository convention.
82
+
83
+ Evidence refs are opaque caller-owned references. They may name files, artifact
84
+ ids, setting snapshots, workflow excerpts, URLs, or hashes according to
85
+ consumer policy. Proofkit does not parse or dereference them.
86
+
87
+ ## Rejected Alternatives
88
+
89
+ | Alternative | Rejection reason |
90
+ |---|---|
91
+ | Query GitHub repository settings | Credentialed discovery and API trust roots are consumer-owned. |
92
+ | Parse workflow YAML in Proofkit | Workflow semantics and parser policy are repository-owned and provider-specific. |
93
+ | Hard-code `main` as the expected branch | That would make Proofkit a repository policy owner. |
94
+ | Treat optional drift as failure | Consumers need advisory visibility for fixtures, migration leftovers, and non-blocking refs. |
95
+
96
+ ## Proof Obligations
97
+
98
+ - Unit tests prove required drift failure, optional drift visibility,
99
+ preexisting-failure propagation, deterministic ordering, and malformed input
100
+ rejection.
101
+ - CLI tests prove stable JSON output, stdin parity, failed-report exit codes,
102
+ and unsupported flag rejection.
103
+ - Package artifact tests prove package binary, installed CLI smoke, and shipped
104
+ design-note coverage.
105
+ - Full package check proves existing proofkit behavior remains unchanged.
106
+
107
+ ## Non-Claims
108
+
109
+ Branch authority reports do not claim:
110
+
111
+ - repository settings discovery;
112
+ - workflow parsing;
113
+ - GitHub API access;
114
+ - branch mutation;
115
+ - branch protection proof;
116
+ - CI execution;
117
+ - publish execution;
118
+ - package publication;
119
+ - release approval;
120
+ - rollout approval;
121
+ - consumer policy authority.
@@ -0,0 +1,70 @@
1
+ # Changed Path Set Agent Envelope Design
2
+
3
+ Status: accepted.
4
+
5
+ Owner: `proofkit`.
6
+
7
+ ## Problem
8
+
9
+ `changed-path-set` is the earliest reusable input to selective proof planning.
10
+ The canonical report is correct for machines, but a coding agent should not
11
+ need to load the full path payload before deciding the next route. A bounded
12
+ agent packet is useful only if it preserves the trust boundary:
13
+
14
+ ```text
15
+ caller-supplied changed paths -> admitted set report -> bounded route packet
16
+ ```
17
+
18
+ The packet must not become git discovery, command selection, freshness proof,
19
+ or merge approval.
20
+
21
+ ## Decision
22
+
23
+ `buildProofkitChangedPathSetAgentEnvelope(report)` projects an existing
24
+ `ProofkitChangedPathSetReport` into an opt-in `ProofkitAgentGuidanceEnvelope`.
25
+ The CLI exposes the same projection via:
26
+
27
+ ```bash
28
+ agentic-proofkit changed-path-set --input proofkit/changed-path-set.json --agent-envelope
29
+ ```
30
+
31
+ The projection is intentionally narrow:
32
+
33
+ - `sourceReport.reportKind`, `reportId`, and `state` come from the report.
34
+ - `sourceReport.stableHash` is `changedPathSetHash` for caller-owned
35
+ correlation only.
36
+ - `contextRefs` are JSON pointers into the source report.
37
+ - `commands`, `receiptRefs`, and action `commandIds` are empty.
38
+ - path values and diagnostics stay in the source report and are represented by
39
+ exact omission counts.
40
+ - failed source reports produce failed envelopes and a blocked precondition.
41
+ - empty admitted sets produce a non-blocking caller-owned policy question.
42
+
43
+ ## Rejected Alternatives
44
+
45
+ | Alternative | Rejection reason |
46
+ |---|---|
47
+ | Include every changed path directly in the envelope | It breaks the bounded-envelope contract and increases agent token load. |
48
+ | Infer package commands from paths | Command selection belongs to consumer-owned selective/workspace policy, not changed-path admission. |
49
+ | Read git diff or filesystem state inside proofkit | Proofkit must remain explicit-input infrastructure and must not own repository-state discovery. |
50
+ | Treat an empty changed set as no-op approval | Empty source semantics are repository policy; proofkit cannot prove freshness or completeness. |
51
+
52
+ ## Invariants
53
+
54
+ 1. Ordinary `changed-path-set` output remains the canonical report.
55
+ 2. `--agent-envelope` changes only the output projection.
56
+ 3. The envelope never executes native witnesses.
57
+ 4. The envelope never infers command ids, proof routes, fallback policy,
58
+ receipt freshness, merge approval, release approval, or rollout approval.
59
+ 5. Failed changed-path admission remains failed in the envelope.
60
+ 6. The set hash is an identity correlation field, not source freshness or
61
+ completeness evidence.
62
+
63
+ ## Proofs
64
+
65
+ - Unit tests prove passed, failed, and empty-set envelope projections.
66
+ - CLI tests prove ordinary report output remains stable and
67
+ `changed-path-set --agent-envelope` is opt-in.
68
+ - Package artifact tests prove the packed CLI exposes the projection.
69
+ - Package boundary tests prove the design document and package binary are shipped.
70
+
@@ -0,0 +1,132 @@
1
+ # Completion Criteria Report Design
2
+
3
+ ## Decision
4
+
5
+ Proofkit provides a `completion-criteria` report that validates and classifies
6
+ caller-provided completion criteria in the falsifiable table form:
7
+
8
+ ```text
9
+ Criterion | Validator or proof | Fails when
10
+ ```
11
+
12
+ The primitive owns deterministic shape admission and state reporting only. It
13
+ does not execute validators, authenticate evidence, compute freshness, own
14
+ requirement meaning, or approve merge.
15
+
16
+ ## Problem
17
+
18
+ The spec-first machine-proof architecture is complete only when each completion
19
+ criterion has a falsifiable validator or proof and a failure predicate. A plain
20
+ checklist can say that something is done, but it does not prove that the item is
21
+ testable, owner-scoped, or blocked for a precise reason.
22
+
23
+ Without a generic report, each consuming repository must invent its own
24
+ completion table grammar. That repeats infrastructure code and lets informal
25
+ review notes masquerade as completion evidence.
26
+
27
+ ## Boundary
28
+
29
+ Proofkit owns:
30
+
31
+ - exact schema admission for caller-provided completion criteria;
32
+ - criterion class and status vocabularies;
33
+ - the rule that a criterion must declare at least one validator or proof ref;
34
+ - the rule that `satisfied`, `not_applicable`, and `deferred_admitted` states
35
+ require evidence refs;
36
+ - blocking-unsatisfied classification;
37
+ - deterministic report output and non-claims.
38
+
39
+ The consuming repository owns:
40
+
41
+ - which criteria exist and which are blocking;
42
+ - requirement meaning and proof adequacy;
43
+ - validator, proof, evidence, and owner ref content;
44
+ - evidence authenticity and receipt freshness;
45
+ - native command execution;
46
+ - merge, release, rollout, and production-readiness decisions.
47
+
48
+ Formal rule:
49
+
50
+ ```text
51
+ Completion criteria reports prove falsifiable completion shape.
52
+ They do not prove that the referenced validators or proofs actually passed.
53
+ ```
54
+
55
+ ## Model
56
+
57
+ Input records have:
58
+
59
+ - `criterionId`;
60
+ - `criterionClass = blocking | advisory | deferred`;
61
+ - human-readable criterion text;
62
+ - owner;
63
+ - validator refs;
64
+ - proof refs;
65
+ - structured decision refs for human review, checklist, or code-review
66
+ validators;
67
+ - sorted `failsWhen` conditions;
68
+ - status;
69
+ - evidence refs;
70
+ - optional blocker text;
71
+ - non-claims.
72
+
73
+ Statuses:
74
+
75
+ | Status | Required shape | Blocking meaning |
76
+ |---|---|---|
77
+ | `satisfied` | Evidence refs required, blocker forbidden | Satisfies this report |
78
+ | `not_applicable` | Evidence refs required, blocker forbidden | Satisfies this report for scoped-out criteria |
79
+ | `missing_evidence` | Blocker forbidden | Fails when blocking |
80
+ | `failed` | Blocker forbidden | Fails when blocking |
81
+ | `blocked_missing_precondition` | Blocker required | Fails when blocking |
82
+ | `deferred_admitted` | Deferred class and evidence refs required | Visible but non-blocking |
83
+ | `advisory_skipped` | Advisory class required | Visible but non-blocking |
84
+
85
+ The report passes only when every blocking criterion is `satisfied` or
86
+ `not_applicable`. Advisory and deferred criteria remain visible, but Proofkit
87
+ does not decide whether a consumer should promote them to blocking.
88
+
89
+ `failsWhen` is a sorted, non-empty array because a falsifiable completion
90
+ criterion must name concrete failure conditions instead of one opaque paragraph.
91
+ `structuredDecisionRefs` are opaque caller-owned refs. A consuming repository
92
+ must use them when a validator or proof route is a human review, checklist, or
93
+ code-review decision; Proofkit validates ref shape but does not infer that need
94
+ from repository-specific wording.
95
+
96
+ ## Rejected Alternatives
97
+
98
+ | Alternative | Rejection reason |
99
+ |---|---|
100
+ | Extend `adoption-checklist` | Adoption checklist owns adoption state, not the generic falsifiable completion table required by the architecture. |
101
+ | Use `obligation-decision` directly | Obligation decisions classify proof obligations; completion criteria describe architecture/readiness criteria and their validators. |
102
+ | Accept free-form checklist text | It would not machine-check the validator/proof and failure predicate fields. |
103
+ | Infer human-review routes from ref wording | That would encode consumer-specific semantics and make Proofkit a policy owner. |
104
+ | Execute validators from the report | Native command execution, credentials, locks, and freshness are consumer-owned. |
105
+
106
+ ## Proof Obligations
107
+
108
+ - Unit tests prove pass/fail classification, evidence requirements,
109
+ class/status restrictions, duplicate rejection, and deterministic output.
110
+ - CLI tests prove JSON output, stdin parity, JSON pointer selection, and
111
+ unsupported-mode rejection.
112
+ - Package artifact tests prove the public export, installed CLI path, and
113
+ packed design note.
114
+ - Full package check proves the additive primitive does not regress existing
115
+ reports.
116
+
117
+ ## Non-Claims
118
+
119
+ Completion criteria reports do not claim:
120
+
121
+ - validator execution;
122
+ - native proof execution;
123
+ - evidence authenticity;
124
+ - receipt freshness;
125
+ - requirement meaning;
126
+ - proof adequacy;
127
+ - structured-review completeness;
128
+ - consumer policy authority;
129
+ - merge approval;
130
+ - release approval;
131
+ - rollout approval;
132
+ - production readiness.
@@ -0,0 +1,56 @@
1
+ # Custom Rule Boundary Design
2
+
3
+ Status: implemented.
4
+
5
+ Owner: `proofkit`.
6
+
7
+ ## Problem
8
+
9
+ Consumer repositories sometimes need local diagnostic rules before a generic
10
+ Proofkit primitive exists for that exact repository invariant. Those rules are
11
+ useful only if they cannot suppress generic failures, mutate generic decision
12
+ state, read undeclared inputs, use credentials, access network resources, or
13
+ become a permanent second proof engine.
14
+
15
+ Without a generic boundary validator, custom rules can silently turn local
16
+ adoption glue into hidden proof authority.
17
+
18
+ ## Decision
19
+
20
+ Add `custom-rule-boundary`, a deterministic report over caller-provided custom
21
+ rule declarations.
22
+
23
+ The primitive validates that every custom rule is:
24
+
25
+ - namespaced under the consuming repository or profile, not under Proofkit;
26
+ - explicitly `local_diagnostics_only`;
27
+ - append-only for findings;
28
+ - unable to downgrade or satisfy generic decision state;
29
+ - network-free and credential-free;
30
+ - deterministic, stably ordered, and secret-redacted;
31
+ - bounded by affected path globs and a use limit;
32
+ - paired with remediation metadata;
33
+ - paired with a concrete removal condition and owner.
34
+
35
+ ## Authority Boundary
36
+
37
+ Proofkit validates custom-rule metadata and emits deterministic diagnostics. It
38
+ does not execute custom rules, inspect repository state, authenticate evidence,
39
+ admit receipts, compute freshness, approve merge, or promote a local invariant
40
+ into generic Proofkit behavior.
41
+
42
+ ## Rejected Alternatives
43
+
44
+ | Alternative | Rejected Because |
45
+ |---|---|
46
+ | Put custom-rule admission into repo-profile structural admission. | Repository profiles describe topology. Custom-rule monotonicity is a separate proof-infrastructure boundary. |
47
+ | Let custom rules suppress or downgrade generic findings with explicit flags. | That would make local rules a bypass for generic Proofkit failures. |
48
+ | Allow `proofkit.*` namespaces for consumer rules. | That would confuse repository-local diagnostics with generic Proofkit-owned contracts. |
49
+ | Execute custom rules from this primitive. | Execution, filesystem access, credentials, and receipts are consumer-owned native proof surfaces. |
50
+
51
+ ## Follow-Up
52
+
53
+ Consumer repositories can reference this report from adoption or selective gate
54
+ inputs when they admit repository-local custom diagnostics. Promotion from a
55
+ custom rule to a generic Proofkit primitive requires a separate design and
56
+ review path.
@@ -0,0 +1,80 @@
1
+ # Deployment Evidence Admission Design
2
+
3
+ Status: implemented.
4
+
5
+ Owner: `proofkit`.
6
+
7
+ ## Problem
8
+
9
+ Deployment evidence across repositories often repeats the same reusable
10
+ admission mechanics: stable envelope shape, required evidence coverage declared
11
+ by the caller, non-local evidence refs, digest-pinned image refs, source commit
12
+ shape, safe endpoint URLs, temporary endpoint metadata, and secret-shaped value
13
+ rejection.
14
+
15
+ If every consumer reimplements those mechanics, local deployment verifiers grow
16
+ large and drift-prone. If Proofkit defines the deployment topology, it becomes a
17
+ consumer product, environment, rollout, or production-readiness policy owner.
18
+ If raw operator artifacts are checked only after projection into normalized
19
+ facts, unprojected notes can still carry secret-shaped material.
20
+
21
+ ## Decision
22
+
23
+ Add `deployment-evidence-admission`, a deterministic report over
24
+ caller-provided deployment evidence facts and caller-provided policy facts.
25
+
26
+ The primitive validates:
27
+
28
+ - exact evidence envelope and fact shape;
29
+ - expected schema, proof scope, and deployment claim supplied by the caller;
30
+ - caller-required non-claims;
31
+ - caller-required fact ids and fact kinds;
32
+ - non-local refs using caller-provided local-ref indicators;
33
+ - caller-forbidden value indicators;
34
+ - digest-pinned image refs when required by caller policy;
35
+ - lowercase 40-character source commits when required by caller policy;
36
+ - endpoint HTTPS, URL credential rejection, local host rejection, stable versus
37
+ temporary endpoint classification, temporary endpoint approval metadata, and
38
+ RFC3339 UTC expiry shape;
39
+ - recursive secret-shaped value rejection without echoing secret values.
40
+
41
+ The evidence uses generic `facts[]`; consumers choose the fact ids, kinds,
42
+ refs, URLs, image refs, source commits, and metadata that represent their own
43
+ deployment topology.
44
+
45
+ Consumers may additionally provide `rawOperatorEvidence[]` records. Those
46
+ records are not topology authority and do not satisfy required fact coverage;
47
+ they are admitted as JSON and scanned with the reusable
48
+ `scanProofkitSecretShapedJson` primitive before the report is considered safe.
49
+
50
+ ## Authority Boundary
51
+
52
+ Proofkit validates only reusable admission mechanics. It does not read files,
53
+ query deployment systems, authenticate evidence refs, choose fact vocabulary,
54
+ choose environment names, choose endpoint policy, execute deployment, execute
55
+ rollback, prove publication, approve rollout, approve production readiness, or
56
+ decide merge policy.
57
+
58
+ The consuming repository owns the deployment schema name, proof-scope
59
+ vocabulary, claim vocabulary, required fact ids and kinds, required non-claims,
60
+ local-ref indicators, forbidden value indicators, temporary endpoint suffixes,
61
+ which raw operator artifacts are read and passed to `rawOperatorEvidence`,
62
+ native witness commands, receipt producer policy, CI admission, and rollout
63
+ decision.
64
+
65
+ ## Rejected Alternatives
66
+
67
+ | Alternative | Rejected Because |
68
+ |---|---|
69
+ | Keep every deployment evidence check in each consumer. | This duplicates reusable admission mechanics and increases drift risk. |
70
+ | Add a Proofkit production-deployment verifier with fixed topology fields. | That would move consumer product and rollout policy into Proofkit. |
71
+ | Read evidence files directly from the Proofkit primitive. | File paths, environment variables, and operator artifact locations are consumer-owned. |
72
+ | Let raw operator evidence satisfy required fact coverage. | Raw artifacts are safety-scanned only; normalized facts remain the proof-shape contract. |
73
+ | Treat local or credentialed evidence as production readiness. | Evidence admission only validates artifact shape and safety; readiness remains outside Proofkit. |
74
+
75
+ ## Follow-Up
76
+
77
+ Consumers can wrap this primitive with local file reading and policy constants,
78
+ then keep their native selftests as product witnesses. A consumer can retire
79
+ local helper code only after the exact Proofkit version is published, pinned,
80
+ and proved through its own registry-consumer and wrapper selftests.