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.
- package/ADOPTION.md +464 -0
- package/LICENSE +21 -0
- package/NON_CLAIMS.md +197 -0
- package/README.md +265 -0
- package/dist/agentic-proofkit +35 -0
- package/dist/platform/darwin-arm64/agentic-proofkit +0 -0
- package/dist/platform/darwin-x64/agentic-proofkit +0 -0
- package/dist/platform/linux-arm64/agentic-proofkit +0 -0
- package/dist/platform/linux-x64/agentic-proofkit +0 -0
- package/docs/adoption-checklist-report-design.md +138 -0
- package/docs/adoption-workflow-agent-envelope-design.md +67 -0
- package/docs/adoption-workflow-authority-routes-design.md +76 -0
- package/docs/adoption-workflow-contract-envelope-design.md +87 -0
- package/docs/adoption-workflow-plan-design.md +97 -0
- package/docs/agent-guidance-envelope-design.md +550 -0
- package/docs/binding-partition-admission-design.md +127 -0
- package/docs/bootstrap-agent-envelope-design.md +97 -0
- package/docs/bootstrap-materialization-manifest-design.md +100 -0
- package/docs/branch-authority-report-design.md +121 -0
- package/docs/changed-path-set-agent-envelope-design.md +70 -0
- package/docs/completion-criteria-report-design.md +132 -0
- package/docs/custom-rule-boundary-design.md +56 -0
- package/docs/deployment-evidence-admission-design.md +80 -0
- package/docs/document-lifecycle-boundary-design.md +62 -0
- package/docs/json-report-cli-adapter-design.md +83 -0
- package/docs/migration-parity-admission-design.md +90 -0
- package/docs/migration-plan-design.md +73 -0
- package/docs/obligation-decision-agent-envelope-design.md +105 -0
- package/docs/obligation-decision-state-design.md +100 -0
- package/docs/package-runtime-dependency-admission-design.md +80 -0
- package/docs/producer-policy-self-proof-design.md +142 -0
- package/docs/project-structure-agent-envelope-design.md +121 -0
- package/docs/project-structure-scaffold-design.md +89 -0
- package/docs/proof-obligation-algebra-design.md +108 -0
- package/docs/proof-receipt-admission-design.md +108 -0
- package/docs/proofkit-contract-map.md +55 -0
- package/docs/receipt-currentness-scope-admission-design.md +103 -0
- package/docs/receipt-producer-admission-design.md +106 -0
- package/docs/receipt-trust-class-admission-design.md +113 -0
- package/docs/rendered-artifact-freshness-design.md +55 -0
- package/docs/requirement-browser-view-design.md +229 -0
- package/docs/requirement-proof-resolver-projection-design.md +97 -0
- package/docs/requirement-proof-source-set-design.md +72 -0
- package/docs/requirement-proof-view-design.md +138 -0
- package/docs/requirement-source-admission-design.md +66 -0
- package/docs/requirement-source-transition-design.md +66 -0
- package/docs/requirement-source-view-design.md +51 -0
- package/docs/scaffold-profile-plan-design.md +72 -0
- package/docs/secret-shaped-json-scan-design.md +60 -0
- package/docs/selective-evidence-obligation-decision-design.md +139 -0
- package/docs/selective-evidence-producer-admission-design.md +106 -0
- package/docs/selective-evidence-receipt-trust-class-design.md +100 -0
- package/docs/selective-gate-evidence-agent-envelope-design.md +100 -0
- package/docs/selective-gate-plan-agent-envelope-design.md +95 -0
- package/docs/selective-planner-edge-coverage-design.md +89 -0
- package/docs/spec-overview-claim-boundary-design.md +50 -0
- package/docs/spec-proof-bundle-admission-design.md +105 -0
- package/docs/specs/proofkit-consumer-infra-retirement/overview.md +44 -0
- package/docs/specs/proofkit-consumer-infra-retirement/requirements.v1.json +175 -0
- package/docs/specs/proofkit-package-boundary/overview.md +32 -0
- package/docs/specs/proofkit-package-boundary/requirements.v1.json +121 -0
- package/docs/specs/proofkit-receipt-authority/overview.md +35 -0
- package/docs/specs/proofkit-receipt-authority/requirements.v1.json +121 -0
- package/docs/specs/proofkit-spec-proof-core/overview.md +36 -0
- package/docs/specs/proofkit-spec-proof-core/requirements.v1.json +148 -0
- package/docs/witness-scheduler-plan-design.md +57 -0
- package/docs/workspace-planning-agent-envelope-design.md +101 -0
- package/docs/workspace-registry-admission-design.md +57 -0
- package/package.json +54 -0
- package/proofkit/cli-contract.v1.json +808 -0
- package/proofkit/receipt-producer-policy.json +48 -0
- package/proofkit/requirement-bindings.json +520 -0
- package/proofkit/witness-plan.json +649 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Requirement Proof Resolver Projection Design
|
|
2
|
+
|
|
3
|
+
Status: active package design.
|
|
4
|
+
|
|
5
|
+
Owner: `proofkit`.
|
|
6
|
+
|
|
7
|
+
## Problem
|
|
8
|
+
|
|
9
|
+
Some consuming repositories already store compact row-array requirement proof
|
|
10
|
+
contracts, but their local resolver outputs need more than the compact
|
|
11
|
+
conformance projection: invariant role, owned invariant, mutation-resistance
|
|
12
|
+
state, witness resolution order, surface/scenario lookup rows, and selector
|
|
13
|
+
matches. Reimplementing that resolver in every repository duplicates generic
|
|
14
|
+
projection mechanics and blocks retirement of consumer-local infrastructure
|
|
15
|
+
code.
|
|
16
|
+
|
|
17
|
+
## Decision
|
|
18
|
+
|
|
19
|
+
Proofkit owns a deterministic compact resolver projection:
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
caller compact requirement-proof contract
|
|
23
|
+
+ optional caller-owned local environment class list
|
|
24
|
+
-> proofkit resolver projection
|
|
25
|
+
-> lookup rows for requirements, surfaces, scenarios, and witness selectors
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The CLI exposes
|
|
29
|
+
`projectProofkitCompactRequirementProofResolver`. The CLI exposes the same
|
|
30
|
+
projection through `agentic-proofkit requirement-proof-resolver --input <path>`.
|
|
31
|
+
Repeatable `--local-environment-class <id>` flags are policy input, not
|
|
32
|
+
Proofkit-owned policy. The CLI also accepts `--empty-local-environment-policy`
|
|
33
|
+
to represent the explicit caller decision that no environment class is local.
|
|
34
|
+
Absent policy fails closed because a boolean `preconditioned` value cannot
|
|
35
|
+
represent unknown environment policy without overclaiming.
|
|
36
|
+
|
|
37
|
+
## Authority Boundary
|
|
38
|
+
|
|
39
|
+
Proofkit owns:
|
|
40
|
+
|
|
41
|
+
- compact contract shape admission;
|
|
42
|
+
- deterministic row sorting and selector grouping;
|
|
43
|
+
- preservation of resolver-relevant compact fields;
|
|
44
|
+
- preconditioned projection from caller-supplied local environment classes;
|
|
45
|
+
- surface-level precondition propagation;
|
|
46
|
+
- caller non-claim preservation;
|
|
47
|
+
- lookup-only non-claims.
|
|
48
|
+
|
|
49
|
+
Consumers own:
|
|
50
|
+
|
|
51
|
+
- requirement meaning;
|
|
52
|
+
- local environment-class policy;
|
|
53
|
+
- command/environment vocabulary;
|
|
54
|
+
- repository file discovery and source freshness;
|
|
55
|
+
- native witness execution and receipt trust;
|
|
56
|
+
- proof adequacy, merge policy, rollout, and production claims.
|
|
57
|
+
|
|
58
|
+
Formal rule:
|
|
59
|
+
|
|
60
|
+
```text
|
|
61
|
+
Proofkit can project explicit contract facts.
|
|
62
|
+
Proofkit cannot decide whether a consumer environment is local unless the
|
|
63
|
+
consumer supplies that policy as input.
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Rejected Alternatives
|
|
67
|
+
|
|
68
|
+
| Alternative | Rejection reason |
|
|
69
|
+
|---|---|
|
|
70
|
+
| Keep the resolver in each consumer repository | Duplicates generic projection code and makes proof-route retirement harder to prove. |
|
|
71
|
+
| Hardcode local environment classes in Proofkit | Would turn Proofkit into a repository-policy owner and break reuse across stacks. |
|
|
72
|
+
| Infer environment locality from command strings | Shell text is not policy authority and cannot safely classify credentials, network, or live resources. |
|
|
73
|
+
| Replace native witnesses with resolver rows | Resolver rows are lookup metadata; native tests and tools still own executable verification procedures. |
|
|
74
|
+
|
|
75
|
+
## Proof Obligations
|
|
76
|
+
|
|
77
|
+
- Unit tests prove full resolver fields, selector grouping, and witness order.
|
|
78
|
+
- Unit tests prove preconditioned state depends on caller-provided local
|
|
79
|
+
environment classes.
|
|
80
|
+
- Negative tests reject malformed compact witness order.
|
|
81
|
+
- CLI tests prove deterministic projection and flag admission.
|
|
82
|
+
- Package artifact tests prove the public API, CLI, design note, and built
|
|
83
|
+
dist are included in the published artifact.
|
|
84
|
+
|
|
85
|
+
## Non-Claims
|
|
86
|
+
|
|
87
|
+
Requirement proof resolver projections do not claim:
|
|
88
|
+
|
|
89
|
+
- native witness execution;
|
|
90
|
+
- command success;
|
|
91
|
+
- receipt freshness;
|
|
92
|
+
- producer authentication;
|
|
93
|
+
- local environment policy unless supplied by the caller;
|
|
94
|
+
- proof satisfaction;
|
|
95
|
+
- merge approval;
|
|
96
|
+
- rollout approval;
|
|
97
|
+
- production readiness.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Requirement Proof Source Set Design
|
|
2
|
+
|
|
3
|
+
Status: active package design.
|
|
4
|
+
|
|
5
|
+
Owner: `proofkit`.
|
|
6
|
+
|
|
7
|
+
## Problem
|
|
8
|
+
|
|
9
|
+
Large repositories can split requirement proof bindings into owner fragments.
|
|
10
|
+
Consumers still need one canonical `requirement-proof-bindings/v1` payload for
|
|
11
|
+
projection, impact routing, selective planning, and view rendering. Rewriting
|
|
12
|
+
the source-set resolver in every repository duplicates fail-closed mechanics and
|
|
13
|
+
increases infrastructure code.
|
|
14
|
+
|
|
15
|
+
## Decision
|
|
16
|
+
|
|
17
|
+
Proofkit owns a generic source-set normalizer:
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
caller source-set payload
|
|
21
|
+
+ caller source text/hash/path facts
|
|
22
|
+
+ caller canonical envelope
|
|
23
|
+
-> proofkit source-set normalization
|
|
24
|
+
-> canonical requirement-proof-bindings/v1 payload
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The `agentic-proofkit requirement-proof-source-set` CLI exposes
|
|
28
|
+
the same boundary. The CLI is for language-neutral consumers that can provide
|
|
29
|
+
the source-set payload, exact source texts, hashes, paths, and canonical
|
|
30
|
+
envelope explicitly. It does not read repository files or discover sources.
|
|
31
|
+
|
|
32
|
+
The normalizer admits `requirement-proof-bindings/source-set/v1`, full
|
|
33
|
+
`requirement-proof-bindings/v1` sources, compact `fragment/v1` sources, and
|
|
34
|
+
owner-defaulted `fragment/v2` sources. `fragment/v2` defaults `surface_id` from
|
|
35
|
+
the fragment `source_id`, derives the default `scenario_id` from
|
|
36
|
+
`source_id::owned_invariant`, and lets compact witness rows inherit binding
|
|
37
|
+
environment classes and verify commands only when the row explicitly uses the
|
|
38
|
+
compact witness shape.
|
|
39
|
+
|
|
40
|
+
## Authority Boundary
|
|
41
|
+
|
|
42
|
+
Proofkit owns:
|
|
43
|
+
|
|
44
|
+
- source-set and fragment shape admission;
|
|
45
|
+
- source text SHA-256 comparison against caller-owned source-set rows;
|
|
46
|
+
- nested source-set rejection;
|
|
47
|
+
- role/payload/source-id mismatch rejection;
|
|
48
|
+
- compact fragment inflation into the caller-provided canonical envelope;
|
|
49
|
+
- deterministic source path reporting.
|
|
50
|
+
|
|
51
|
+
Consumers own:
|
|
52
|
+
|
|
53
|
+
- repository file discovery and source text reads;
|
|
54
|
+
- canonical envelope text, non-claims, and column authority;
|
|
55
|
+
- requirement meaning;
|
|
56
|
+
- command/environment vocabulary;
|
|
57
|
+
- native witness execution;
|
|
58
|
+
- proof freshness, receipt trust, merge policy, rollout, and production claims.
|
|
59
|
+
|
|
60
|
+
## Non-Claims
|
|
61
|
+
|
|
62
|
+
This primitive does not scan repositories, execute commands, authenticate
|
|
63
|
+
receipts, decide proof satisfaction, infer changed scope, approve merges, or
|
|
64
|
+
replace consumer-specific validators. It only converts caller-provided source
|
|
65
|
+
facts into one canonical binding payload or fails closed.
|
|
66
|
+
|
|
67
|
+
## Proof Invariant
|
|
68
|
+
|
|
69
|
+
For any accepted source set, downstream consumers must observe the same
|
|
70
|
+
canonical contract shape as if the consumer had stored one monolithic
|
|
71
|
+
`requirement-proof-bindings/v1` contract. Any semantic difference after
|
|
72
|
+
normalization is a defect in the normalizer or the caller-provided envelope.
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Requirement Proof View Design
|
|
2
|
+
|
|
3
|
+
Status: accepted; implemented as on-demand view-model and renderer primitives.
|
|
4
|
+
|
|
5
|
+
Owner: `proofkit`.
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Structured requirement proof records are the machine authority, but humans need
|
|
10
|
+
a readable view that does not require scanning raw JSON. Proofkit should provide
|
|
11
|
+
deterministic presentation machinery while preserving the authority split:
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
structured requirement proof input
|
|
15
|
+
-> lookup-only view model
|
|
16
|
+
-> on-demand Markdown or self-contained browser-ready HTML rendering
|
|
17
|
+
|
|
18
|
+
compact requirement proof contract
|
|
19
|
+
+ caller-owned local environment policy
|
|
20
|
+
-> compact lookup-only view model
|
|
21
|
+
-> on-demand Markdown or self-contained browser-ready HTML rendering
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Authority Boundary
|
|
25
|
+
|
|
26
|
+
Proofkit owns:
|
|
27
|
+
|
|
28
|
+
- deterministic view-model construction from caller-owned requirement proof
|
|
29
|
+
binding input;
|
|
30
|
+
- deterministic compact view-model construction from caller-owned compact
|
|
31
|
+
requirement proof contracts and explicit local environment policy;
|
|
32
|
+
- graph or selected-slice presentation scope;
|
|
33
|
+
- Markdown and HTML string rendering from the view model;
|
|
34
|
+
- local browser search, field filters, and ID visibility controls in HTML
|
|
35
|
+
outputs;
|
|
36
|
+
- HTML escaping for rendered text;
|
|
37
|
+
- fail-closed rejection of invalid requirement proof bindings;
|
|
38
|
+
- explicit lookup-only authority and non-claims.
|
|
39
|
+
|
|
40
|
+
The consuming repository owns:
|
|
41
|
+
|
|
42
|
+
- requirement meaning;
|
|
43
|
+
- proof-binding content;
|
|
44
|
+
- source-set and repository file discovery before a compact contract reaches
|
|
45
|
+
the renderer;
|
|
46
|
+
- local environment-class policy;
|
|
47
|
+
- native witness execution;
|
|
48
|
+
- receipt freshness and producer admission;
|
|
49
|
+
- merge, rollout, and product-readiness decisions;
|
|
50
|
+
- whether any rendered output is tracked with freshness gates.
|
|
51
|
+
|
|
52
|
+
Formal rule:
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
Structured records own machine-admissible proof routing.
|
|
56
|
+
Rendered views explain those records to humans.
|
|
57
|
+
Rendered views never become authority by default.
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Model
|
|
61
|
+
|
|
62
|
+
The view model includes:
|
|
63
|
+
|
|
64
|
+
- binding id;
|
|
65
|
+
- scope: `graph` or `slice`;
|
|
66
|
+
- lookup-only authority marker;
|
|
67
|
+
- selected requirements;
|
|
68
|
+
- owner, spec path, claim level, proof state;
|
|
69
|
+
- scenario, command, environment, and witness-path summaries;
|
|
70
|
+
- non-claims.
|
|
71
|
+
|
|
72
|
+
The compact view model includes:
|
|
73
|
+
|
|
74
|
+
- compact contract id;
|
|
75
|
+
- lookup-only authority marker;
|
|
76
|
+
- requirement, preconditioned requirement, and command counts;
|
|
77
|
+
- surface id, scenario id, invariant role, owned invariant, proof state,
|
|
78
|
+
blocking status, required environments, verify commands, witness selectors,
|
|
79
|
+
positive/falsification witness roles, and mutation-resistance state;
|
|
80
|
+
- caller-provided local environment policy;
|
|
81
|
+
- non-claims.
|
|
82
|
+
|
|
83
|
+
Markdown and HTML renderers accept only the view model. They do not read files,
|
|
84
|
+
execute commands, or inspect repository state.
|
|
85
|
+
|
|
86
|
+
HTML renderers emit self-contained browser documents. Browser filters operate
|
|
87
|
+
only on fields already present in the view model. They do not parse rendered
|
|
88
|
+
text as authority, fetch external assets, or persist repository state.
|
|
89
|
+
|
|
90
|
+
View-model construction fails closed when the underlying requirement proof
|
|
91
|
+
binding report fails. A rendered view must not make malformed or semantically
|
|
92
|
+
invalid proof bindings easier to cite as evidence.
|
|
93
|
+
|
|
94
|
+
Compact view construction fails closed without explicit local environment
|
|
95
|
+
policy because preconditioned presentation is policy-dependent. Proofkit may
|
|
96
|
+
render explicit compact facts, but it must not infer spec paths, owner routes,
|
|
97
|
+
or whether an environment class is local.
|
|
98
|
+
|
|
99
|
+
## Rejected Alternatives
|
|
100
|
+
|
|
101
|
+
| Alternative | Rejection reason |
|
|
102
|
+
|---|---|
|
|
103
|
+
| Commit generated Markdown or HTML views by default | Adds drift-prone generated truth and token load. |
|
|
104
|
+
| Use HTML as the canonical source format | HTML is presentation-heavy and weak for deterministic machine validation. |
|
|
105
|
+
| Render from raw test output | Test output does not own requirement meaning or proof routing. |
|
|
106
|
+
| Add a local web server in this slice | Server lifecycle, browser launch, port auth, and annotation feedback are optional presentation adapters, not proof-view authority. |
|
|
107
|
+
| Keep compact view rendering only in consumers | Duplicates generic presentation mechanics for the current compact proof format and delays consumer infrastructure retirement. |
|
|
108
|
+
| Infer local environment classes from command strings | Command text is not policy authority and cannot safely classify live, credentialed, or local environments. |
|
|
109
|
+
| Collapse positive and falsification witnesses into an unordered selector list | Requirement proof views must not erase witness roles that consumers need for audit and generated lookup routing. |
|
|
110
|
+
|
|
111
|
+
## Proof Obligations
|
|
112
|
+
|
|
113
|
+
- Unit tests for graph and slice view models.
|
|
114
|
+
- Unit tests for compact view models built from compact contracts.
|
|
115
|
+
- Negative test proving invalid proof bindings do not render.
|
|
116
|
+
- Negative test proving compact views require explicit local environment
|
|
117
|
+
policy.
|
|
118
|
+
- Role-preservation test proving positive and falsification witnesses remain
|
|
119
|
+
distinct in compact views.
|
|
120
|
+
- Renderer tests for Markdown content and HTML escaping.
|
|
121
|
+
- Renderer tests for browser controls and filter metadata.
|
|
122
|
+
- CLI test for `requirement-proof-view` with JSON, Markdown, and HTML output
|
|
123
|
+
for both structured and compact inputs.
|
|
124
|
+
- Package artifact test proving the package binary and packed contract files.
|
|
125
|
+
|
|
126
|
+
## Non-Claims
|
|
127
|
+
|
|
128
|
+
Requirement proof views do not claim:
|
|
129
|
+
|
|
130
|
+
- canonical requirement meaning;
|
|
131
|
+
- native witness execution;
|
|
132
|
+
- command success;
|
|
133
|
+
- receipt freshness;
|
|
134
|
+
- producer authentication;
|
|
135
|
+
- local environment policy beyond caller-provided inputs;
|
|
136
|
+
- merge approval;
|
|
137
|
+
- rollout approval;
|
|
138
|
+
- generated artifact freshness.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Requirement Source Admission Design
|
|
2
|
+
|
|
3
|
+
Status: implemented.
|
|
4
|
+
|
|
5
|
+
Owner: `proofkit`.
|
|
6
|
+
|
|
7
|
+
## Problem
|
|
8
|
+
|
|
9
|
+
Spec-first proof architecture needs a machine-admissible source record before
|
|
10
|
+
requirement-to-proof bindings can be trusted. Existing proof-binding validation
|
|
11
|
+
accepts requirement rows as routing input, but it does not validate the
|
|
12
|
+
canonical `requirements.v1.json` source package lifecycle.
|
|
13
|
+
|
|
14
|
+
Formal gap:
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
Human spec owns durable meaning.
|
|
18
|
+
Proof binding owns verification route.
|
|
19
|
+
Therefore the requirement source must be admitted before downstream routes can
|
|
20
|
+
claim stable REQ-* identity.
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Decision
|
|
24
|
+
|
|
25
|
+
Add `requirement-source-admission`, a deterministic report over
|
|
26
|
+
caller-provided requirement source records.
|
|
27
|
+
|
|
28
|
+
The primitive validates:
|
|
29
|
+
|
|
30
|
+
- exact `docs/specs/<capability>/overview.md` and
|
|
31
|
+
`docs/specs/<capability>/requirements.v1.json` package shape;
|
|
32
|
+
- stable sorted `REQ-*` records;
|
|
33
|
+
- exact requirement source fields;
|
|
34
|
+
- claim level, risk class, owner, invariant text, non-claim refs, and
|
|
35
|
+
non-claims;
|
|
36
|
+
- lifecycle state, replacement traceability, and removal evidence;
|
|
37
|
+
- non-active lifecycle evidence and active replacement targets;
|
|
38
|
+
- deferral policy for deferred requirements;
|
|
39
|
+
- active blocking requirement proof-binding route refs;
|
|
40
|
+
- update policy for impact declaration and proof-binding review.
|
|
41
|
+
|
|
42
|
+
## Authority Boundary
|
|
43
|
+
|
|
44
|
+
Proofkit owns reusable admission grammar and deterministic diagnostics only.
|
|
45
|
+
|
|
46
|
+
Consumer repositories own:
|
|
47
|
+
|
|
48
|
+
- requirement sentence meaning;
|
|
49
|
+
- whether a requirement should exist;
|
|
50
|
+
- proof-binding adequacy;
|
|
51
|
+
- native witness behavior;
|
|
52
|
+
- producer admission and receipt freshness;
|
|
53
|
+
- merge, release, rollout, and deferral approval.
|
|
54
|
+
|
|
55
|
+
## Rejected Alternatives
|
|
56
|
+
|
|
57
|
+
| Alternative | Rejected Because |
|
|
58
|
+
|---|---|
|
|
59
|
+
| Extend `requirement-bindings` to validate source lifecycle. | It would merge source authority and proof-route authority, making the first layer harder to review and reuse. |
|
|
60
|
+
| Parse Markdown overview files. | Proofkit must not read implicit repository state or infer durable claims from prose. A later consumer-owned linter can enforce overview-to-REQ citation policy. |
|
|
61
|
+
| Make source admission execute proof bindings. | Execution and freshness belong to native witnesses, receipts, and consumer CI policy. |
|
|
62
|
+
|
|
63
|
+
## Non-Claims
|
|
64
|
+
|
|
65
|
+
The report does not prove that the overview file has no uncited durable claims,
|
|
66
|
+
that proof bindings are adequate, that tests pass, or that merge is allowed.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Requirement Source Transition Design
|
|
2
|
+
|
|
3
|
+
Status: implemented.
|
|
4
|
+
|
|
5
|
+
Owner: `proofkit`.
|
|
6
|
+
|
|
7
|
+
## Problem
|
|
8
|
+
|
|
9
|
+
Requirement source admission validates one `requirements.v1.json` snapshot. It
|
|
10
|
+
cannot prove that a pull request changed requirement lifecycle records
|
|
11
|
+
monotonically, because it does not receive the previous source package.
|
|
12
|
+
|
|
13
|
+
Formal gap:
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
Durable REQ-* identity must survive ordinary source edits.
|
|
17
|
+
Single-snapshot admission cannot observe from -> to lifecycle changes.
|
|
18
|
+
Therefore lifecycle transition admission needs caller-provided previous and
|
|
19
|
+
next source records.
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Decision
|
|
23
|
+
|
|
24
|
+
Add `requirement-source-transition`, a deterministic report over explicit
|
|
25
|
+
previous and next requirement source snapshots.
|
|
26
|
+
|
|
27
|
+
The primitive validates:
|
|
28
|
+
|
|
29
|
+
- both snapshots pass requirement-source admission;
|
|
30
|
+
- both snapshots describe the same source package paths;
|
|
31
|
+
- durable previous `REQ-*` records remain present in the next source before
|
|
32
|
+
deletion;
|
|
33
|
+
- new requirements start as `active`;
|
|
34
|
+
- terminal `removed` and `superseded` states do not change later;
|
|
35
|
+
- terminal `superseded` replacement sets do not expand or shrink later;
|
|
36
|
+
- deprecation, removal, supersession, and reactivation transitions carry a
|
|
37
|
+
lifecycle evidence ref that was not already present in the previous source;
|
|
38
|
+
- superseded requirements replace only to requirements that are active in the
|
|
39
|
+
next source;
|
|
40
|
+
- previous lifecycle evidence and replacement refs are not silently dropped.
|
|
41
|
+
|
|
42
|
+
## Authority Boundary
|
|
43
|
+
|
|
44
|
+
Proofkit owns reusable transition grammar and deterministic diagnostics only.
|
|
45
|
+
|
|
46
|
+
Consumer repositories own:
|
|
47
|
+
|
|
48
|
+
- finding the previous and next source records;
|
|
49
|
+
- requirement sentence meaning;
|
|
50
|
+
- replacement semantic equivalence;
|
|
51
|
+
- proof-binding adequacy;
|
|
52
|
+
- witness execution and receipt freshness;
|
|
53
|
+
- merge, release, rollout, and deletion approval.
|
|
54
|
+
|
|
55
|
+
## Rejected Alternatives
|
|
56
|
+
|
|
57
|
+
| Alternative | Rejected Because |
|
|
58
|
+
|---|---|
|
|
59
|
+
| Add previous-state fields to every requirement source record. | It would mix durable source truth with PR-local transition evidence and make stable specs noisier. |
|
|
60
|
+
| Infer the previous source by scanning git history. | Proofkit must stay repository-neutral and must not own VCS access or freshness. |
|
|
61
|
+
| Fold transition checks into proof bindings. | Proof bindings own verification routes, not source lifecycle identity. |
|
|
62
|
+
|
|
63
|
+
## Non-Claims
|
|
64
|
+
|
|
65
|
+
The report does not discover diffs, prove replacement equivalence, execute
|
|
66
|
+
native witnesses, compute freshness, approve record deletion, or decide merge.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Requirement Source View Design
|
|
2
|
+
|
|
3
|
+
Status: implemented.
|
|
4
|
+
|
|
5
|
+
Owner: `proofkit`.
|
|
6
|
+
|
|
7
|
+
## Problem
|
|
8
|
+
|
|
9
|
+
`requirements.v1.json` is the machine-admissible source for `REQ-*` identity,
|
|
10
|
+
invariant text, lifecycle, risk, update policy, and non-claims. Humans still
|
|
11
|
+
need a readable view. If repositories solve that by making Markdown or HTML the
|
|
12
|
+
canonical source, presentation and authority become mixed.
|
|
13
|
+
|
|
14
|
+
## Decision
|
|
15
|
+
|
|
16
|
+
Add `requirement-source-view`, an on-demand presentation view over admitted
|
|
17
|
+
requirement source records.
|
|
18
|
+
|
|
19
|
+
The primitive:
|
|
20
|
+
|
|
21
|
+
- reuses requirement-source admission before rendering;
|
|
22
|
+
- emits a deterministic JSON view model by default;
|
|
23
|
+
- renders Markdown and self-contained browser-ready HTML on demand;
|
|
24
|
+
- marks every output as `presentation_only`;
|
|
25
|
+
- includes counts, owner, invariant, claim level, risk, lifecycle, proof-binding
|
|
26
|
+
refs, update policy, deferral, and non-claims;
|
|
27
|
+
- gives HTML readers local search, field filters, and an ID visibility toggle
|
|
28
|
+
over admitted view-model fields;
|
|
29
|
+
- escapes HTML output.
|
|
30
|
+
|
|
31
|
+
## Authority Boundary
|
|
32
|
+
|
|
33
|
+
Proofkit owns the generic view model and renderers. It does not read repository
|
|
34
|
+
files, own requirement meaning, lint overview Markdown, validate proof-binding
|
|
35
|
+
adequacy, execute witnesses, compute freshness, or approve merge.
|
|
36
|
+
|
|
37
|
+
## Rejected Alternatives
|
|
38
|
+
|
|
39
|
+
| Alternative | Rejected Because |
|
|
40
|
+
|---|---|
|
|
41
|
+
| Use `overview.md` as the only human-readable source. | It would push durable fields back into prose and weaken machine validation. |
|
|
42
|
+
| Track generated rendered files by default. | It adds drift and token load; views should be generated on demand unless a consumer proves review value and freshness. |
|
|
43
|
+
| Fold requirement source rendering into proof-binding views. | Source meaning and proof routes are different authority surfaces. |
|
|
44
|
+
| Render invalid source inputs with warnings. | That would let malformed source records become readable-looking authority. |
|
|
45
|
+
| Add server lifecycle to source view rendering. | Browser launch, ports, auth keys, and process ownership are a separate presentation adapter boundary. |
|
|
46
|
+
|
|
47
|
+
## Follow-Up
|
|
48
|
+
|
|
49
|
+
Consumer repositories may wrap this primitive with a local viewer or static page
|
|
50
|
+
only when rendered-artifact freshness proves the generated output is
|
|
51
|
+
presentation-only and current.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Scaffold Profile Plan Design
|
|
2
|
+
|
|
3
|
+
## Decision
|
|
4
|
+
|
|
5
|
+
Proofkit provides a deterministic `scaffold-profile-plan` primitive that helps a
|
|
6
|
+
consumer author a repository profile without turning Proofkit into a repository
|
|
7
|
+
scanner, file writer, policy owner, or profile authority.
|
|
8
|
+
|
|
9
|
+
## Problem
|
|
10
|
+
|
|
11
|
+
`stack-preset` reports describe starter repository shapes, and repo-profile
|
|
12
|
+
admission validates a caller-owned profile against caller-provided facts. The
|
|
13
|
+
missing step is a bounded authoring plan that tells a developer or agent which
|
|
14
|
+
profile fields are already derivable from explicit caller input, which fields
|
|
15
|
+
remain caller-owned gaps, and which follow-up checks should run after review.
|
|
16
|
+
|
|
17
|
+
Without that bridge, adoption agents either guess repository-profile structure
|
|
18
|
+
or copy repository-specific examples. Both options weaken portability and
|
|
19
|
+
increase token load.
|
|
20
|
+
|
|
21
|
+
## Boundary
|
|
22
|
+
|
|
23
|
+
The scaffold plan accepts only explicit caller input:
|
|
24
|
+
|
|
25
|
+
- repository identity, package name, primary languages, and target profile path;
|
|
26
|
+
- optional stack preset id;
|
|
27
|
+
- caller-owned requirement id pattern;
|
|
28
|
+
- caller-selected policy, router, binding, spec, proof-like, and generated
|
|
29
|
+
artifact paths;
|
|
30
|
+
- caller-selected environment classes and command matcher hints.
|
|
31
|
+
|
|
32
|
+
It emits:
|
|
33
|
+
|
|
34
|
+
- a deterministic draft profile candidate;
|
|
35
|
+
- field provenance for every drafted value;
|
|
36
|
+
- caller-required gaps;
|
|
37
|
+
- follow-up commands for caller-owned validation;
|
|
38
|
+
- non-claims that prevent authority creep.
|
|
39
|
+
|
|
40
|
+
It does not:
|
|
41
|
+
|
|
42
|
+
- read repository state;
|
|
43
|
+
- write files or decide overwrite safety;
|
|
44
|
+
- execute native witnesses;
|
|
45
|
+
- infer command policy from shell text;
|
|
46
|
+
- prove profile correctness, proof coverage, freshness, CI readiness, merge
|
|
47
|
+
readiness, or rollout readiness.
|
|
48
|
+
|
|
49
|
+
## Invariant
|
|
50
|
+
|
|
51
|
+
For the same admitted input, the scaffold plan must emit the same stable JSON
|
|
52
|
+
shape and the same ordered caller-required gaps. Every draft value must be
|
|
53
|
+
traceable to either caller input or a named stack preset. Every value that
|
|
54
|
+
cannot be derived without repository-specific judgment must remain a gap.
|
|
55
|
+
|
|
56
|
+
## Rejected Alternatives
|
|
57
|
+
|
|
58
|
+
| Alternative | Rejection |
|
|
59
|
+
|---|---|
|
|
60
|
+
| Generate a complete `repo-profile.v1.json` file | Final profile content is repository-owned semantic policy. A complete generated file would hide caller decisions behind Proofkit defaults. |
|
|
61
|
+
| Scan the repository to discover scripts, tracked files, or package topology | Ambient scanning would make Proofkit a repo-state authority and would create non-determinism outside the explicit input contract. |
|
|
62
|
+
| Add a write mode | File writes require conflict, overwrite, and review policy that belongs to the consuming repository. |
|
|
63
|
+
| Fold this into `stack-preset` | Presets are generic starter shapes. Scaffold planning combines a preset with caller decisions and therefore owns a distinct authoring invariant. |
|
|
64
|
+
|
|
65
|
+
## Proof Obligations
|
|
66
|
+
|
|
67
|
+
- Unit tests prove deterministic draft shape, provenance, caller-owned gaps,
|
|
68
|
+
sorted arrays, non-claims, and no mutation of stack preset data.
|
|
69
|
+
- CLI tests prove `scaffold-profile-plan --input <path>` emits stable JSON,
|
|
70
|
+
supports stdin through the shared CLI path, and rejects unrelated flags.
|
|
71
|
+
- Package artifact tests prove the public API and design note are included while
|
|
72
|
+
source, tests, maps, and implementation plans remain outside the package.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Secret-Shaped JSON Scan Design
|
|
2
|
+
|
|
3
|
+
Status: implemented.
|
|
4
|
+
|
|
5
|
+
Owner: `proofkit`.
|
|
6
|
+
|
|
7
|
+
## Problem
|
|
8
|
+
|
|
9
|
+
Consumer repositories often need to reject secret-shaped strings in
|
|
10
|
+
caller-provided evidence artifacts before those artifacts are projected into a
|
|
11
|
+
smaller report model.
|
|
12
|
+
|
|
13
|
+
If every repository reimplements that recursive scan, diagnostics drift and
|
|
14
|
+
secret redaction becomes inconsistent. If Proofkit scans repositories, files,
|
|
15
|
+
logs, or credentials by itself, it becomes a repository policy owner and
|
|
16
|
+
duplicates dedicated secret-scanning tools.
|
|
17
|
+
|
|
18
|
+
## Decision
|
|
19
|
+
|
|
20
|
+
Add `scanProofkitSecretShapedJson`, a reusable API-only primitive over an
|
|
21
|
+
explicit caller-provided JSON value.
|
|
22
|
+
|
|
23
|
+
The primitive:
|
|
24
|
+
|
|
25
|
+
- admits only JSON-serializable values;
|
|
26
|
+
- traverses object keys in deterministic order;
|
|
27
|
+
- returns stable JSON-style paths and finding kinds;
|
|
28
|
+
- rejects common secret-shaped strings and URL userinfo in values and object
|
|
29
|
+
keys;
|
|
30
|
+
- reports secret-shaped object keys by stable sorted key index instead of
|
|
31
|
+
echoing the key text;
|
|
32
|
+
- never returns the matched value or reads files;
|
|
33
|
+
- accepts an optional stable root path label for embedding findings in a
|
|
34
|
+
consumer report.
|
|
35
|
+
|
|
36
|
+
## Authority Boundary
|
|
37
|
+
|
|
38
|
+
Proofkit owns only deterministic JSON traversal, finding shape, path shape, and
|
|
39
|
+
non-echoing diagnostics for caller-provided values.
|
|
40
|
+
|
|
41
|
+
The consuming repository owns which files, logs, evidence objects, or operator
|
|
42
|
+
artifacts are read; which values are passed to the scanner; which findings are
|
|
43
|
+
merge-blocking; and whether an additional dedicated secret scanner such as a
|
|
44
|
+
repository-wide credential detector is required.
|
|
45
|
+
|
|
46
|
+
## Rejected Alternatives
|
|
47
|
+
|
|
48
|
+
| Alternative | Rejected Because |
|
|
49
|
+
|---|---|
|
|
50
|
+
| Keep raw evidence string scans in every consumer. | This duplicates reusable redaction-sensitive mechanics and creates diagnostic drift. |
|
|
51
|
+
| Add a generic Proofkit secret-scanning CLI. | Repository traversal, ignore policy, baselines, binary handling, and credential policy belong to consumer tools or dedicated scanners. |
|
|
52
|
+
| Return the matched string for debugging. | The result itself would become a secret exposure surface. |
|
|
53
|
+
| Accept arbitrary runtime values. | Non-JSON runtime objects have unstable traversal semantics and should be normalized by the caller first. |
|
|
54
|
+
|
|
55
|
+
## Follow-Up
|
|
56
|
+
|
|
57
|
+
Consumers should call this primitive only from owner-specific wrappers that
|
|
58
|
+
already own artifact reading and gate policy. Proofkit command reports may
|
|
59
|
+
reuse the primitive internally when the command already receives explicit JSON
|
|
60
|
+
input from the caller.
|