@research-engineering/agentic-proofkit 0.1.136

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 (30) hide show
  1. package/ADOPTION.md +198 -0
  2. package/AGENTS.md +160 -0
  3. package/BACKLOG.md +217 -0
  4. package/CONTRIBUTING.md +70 -0
  5. package/LICENSE +21 -0
  6. package/NON_CLAIMS.md +45 -0
  7. package/README.md +50 -0
  8. package/SECURITY.md +52 -0
  9. package/dist/agentic-proofkit +36 -0
  10. package/dist/platform/darwin-arm64/agentic-proofkit +0 -0
  11. package/dist/platform/darwin-x64/agentic-proofkit +0 -0
  12. package/dist/platform/linux-arm64/agentic-proofkit +0 -0
  13. package/dist/platform/linux-x64/agentic-proofkit +0 -0
  14. package/docs/proofkit-contract-map.md +148 -0
  15. package/docs/release-process.md +228 -0
  16. package/docs/specs/proofkit-consumer-infra-retirement/overview.md +62 -0
  17. package/docs/specs/proofkit-consumer-infra-retirement/requirements.v1.json +283 -0
  18. package/docs/specs/proofkit-package-boundary/overview.md +43 -0
  19. package/docs/specs/proofkit-package-boundary/requirements.v1.json +176 -0
  20. package/docs/specs/proofkit-receipt-authority/overview.md +35 -0
  21. package/docs/specs/proofkit-receipt-authority/requirements.v1.json +121 -0
  22. package/docs/specs/proofkit-spec-proof-core/overview.md +98 -0
  23. package/docs/specs/proofkit-spec-proof-core/requirements.v1.json +448 -0
  24. package/docs/specs/proofkit-supply-chain-quality/overview.md +95 -0
  25. package/docs/specs/proofkit-supply-chain-quality/requirements.v1.json +260 -0
  26. package/package.json +71 -0
  27. package/proofkit/cli-contract.v1.json +1601 -0
  28. package/proofkit/receipt-producer-policy.json +49 -0
  29. package/proofkit/requirement-bindings.json +1914 -0
  30. package/proofkit/witness-plan.json +1226 -0
package/NON_CLAIMS.md ADDED
@@ -0,0 +1,45 @@
1
+ # Non-Claims
2
+
3
+ Proofkit owns reusable proof infrastructure primitives only after the relevant
4
+ source, contracts, tests, and release evidence are imported and reviewed.
5
+
6
+ This repository state does not claim:
7
+
8
+ - runtime implementation readiness;
9
+ - package publication readiness;
10
+ - public-source provenance for any existing package version;
11
+ - source-code completeness;
12
+ - production readiness;
13
+ - vulnerability absence;
14
+ - license approval for future dependencies;
15
+ - consumer repository security coverage;
16
+ - consuming repository requirement meaning;
17
+ - consuming repository proof-binding adequacy;
18
+ - consuming repository command policy;
19
+ - native witness execution;
20
+ - command pass evidence;
21
+ - receipt authenticity;
22
+ - proof freshness;
23
+ - merge approval;
24
+ - rollout approval;
25
+ - deployment approval;
26
+ - package-registry access-control proof;
27
+ - provider-side CodeQL, OSV, Scorecard, secret-scanning, or dependency-scanning
28
+ ingestion;
29
+ - GitHub branch-protection proof;
30
+ - Trusted Publisher or OIDC publication proof;
31
+ - generated HTML, Markdown, reports, lookup graphs, or agent envelopes as
32
+ canonical repository source.
33
+
34
+ Consuming repositories must keep their own specifications, proof bindings,
35
+ native witnesses, CI gates, rollback policy, and rollout decisions.
36
+
37
+ Reference infrastructure boundary:
38
+
39
+ ```text
40
+ Proofkit may own reusable grammar, algorithms, reports, rendering/view-model
41
+ machinery, selective planning, impact routing, receipt validation, and agent
42
+ guidance when those capabilities are generic.
43
+ Consuming repositories provide the requirement sentences, policies, witnesses,
44
+ receipts, and rollout decisions.
45
+ ```
package/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # agentic-proofkit
2
+
3
+ Reusable CLI and JSON proof infrastructure for spec-to-proof workflows in
4
+ software repositories.
5
+
6
+ `agentic-proofkit` helps repositories validate structured requirements, bind
7
+ requirements to proof routes, plan selective checks, admit receipt-shaped
8
+ evidence, render human views, and give coding agents bounded next-action
9
+ packets without copying verifier logic between projects.
10
+
11
+ ## Current Repository State
12
+
13
+ | Surface | State |
14
+ |---|---|
15
+ | Source visibility | Public |
16
+ | Current layer | Public source with admitted unscoped npm release evidence; scoped npm identity is staged for the next release |
17
+ | Runtime implementation | Go CLI with npm and Python wrapper packaging |
18
+ | Package release | `agentic-proofkit@0.1.135` is admitted; `@research-engineering/agentic-proofkit@0.1.136` is pending release evidence |
19
+ | Public-source provenance | Admitted for `v0.1.135`; scoped package provenance is pending a reviewed scoped release |
20
+ | License | MIT |
21
+
22
+ ## Project Boundary
23
+
24
+ `agentic-proofkit` is intended to provide reusable proof-workflow mechanics for
25
+ repositories that want explicit requirements, proof bindings, deterministic
26
+ reports, and bounded guidance for coding agents.
27
+
28
+ Proofkit does not own a consuming repository's product requirements, native
29
+ witness execution, receipt authenticity, proof freshness, merge admission,
30
+ rollout, deployment, or production readiness.
31
+
32
+ ## Start Here
33
+
34
+ | Need | Owner |
35
+ |---|---|
36
+ | Human orientation | This README |
37
+ | Coding-agent startup | `AGENTS.md` |
38
+ | Adoption and release-channel model | `ADOPTION.md` |
39
+ | Completion criteria and remaining work | `BACKLOG.md` |
40
+ | Contribution rules | `CONTRIBUTING.md` |
41
+ | Vulnerability reporting boundary | `SECURITY.md` |
42
+ | Explicit boundary denials | `NON_CLAIMS.md` |
43
+ | `LICENSE` | MIT license |
44
+
45
+ ## Non-Claims
46
+
47
+ This README is a human landing page. It is not a CLI contract, release proof,
48
+ package publication claim, security audit, or consumer readiness claim. CLI and
49
+ package behavior are owned by their source, tests, machine-readable contracts,
50
+ and release evidence, not by this overview.
package/SECURITY.md ADDED
@@ -0,0 +1,52 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ No public source-based release is claimed by this repository state yet.
6
+ Supported versions will be named after a reviewed public release exists.
7
+
8
+ ## Reporting A Vulnerability
9
+
10
+ Private vulnerability intake is not claimed by this repository layer. Before a
11
+ public release, maintainers must enable GitHub private vulnerability reporting
12
+ or publish another private reporting channel.
13
+
14
+ Until a private channel is available, do not open a public issue with exploit
15
+ details.
16
+
17
+ Do not include live credentials, private keys, access tokens, or third-party
18
+ secrets in reports. Use redacted examples and describe how to reproduce the
19
+ issue with synthetic data.
20
+
21
+ ## Security Boundary
22
+
23
+ Proofkit is intended to validate and render caller-owned inputs after those
24
+ runtime surfaces are imported. It does not execute native witnesses,
25
+ authenticate receipt producers, read implicit repository state, publish
26
+ artifacts, approve merge, approve rollout, or decide proof freshness.
27
+
28
+ Security-sensitive findings usually belong to one of these classes:
29
+
30
+ - command or argument injection in a Proofkit CLI path;
31
+ - unsafe file path, JSON, or JSON Pointer admission;
32
+ - secret leakage in reports, rendered views, logs, package metadata, or
33
+ diagnostics;
34
+ - incorrect trust-boundary wording that could make consumers treat advisory
35
+ evidence as merge-satisfying proof;
36
+ - package artifact or release workflow behavior that changes installed bytes or
37
+ provenance claims.
38
+
39
+ ## Disclosure And Fix Process
40
+
41
+ 1. Maintainers acknowledge the report and identify the affected surface.
42
+ 2. The fix is developed with a targeted regression proof.
43
+ 3. A patched version is released only through the documented release process
44
+ after that process exists in this repository.
45
+ 4. The advisory or release notes state impact, affected versions, fixed
46
+ version, and any required consumer action.
47
+
48
+ ## Non-Claims
49
+
50
+ This policy does not guarantee a response SLA, third-party dependency support,
51
+ consumer repository security coverage, or production readiness of any consuming
52
+ system.
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env sh
2
+ set -eu
3
+
4
+ script="$0"
5
+ while [ -L "$script" ]; do
6
+ link=$(readlink "$script")
7
+ case "$link" in
8
+ /*) script="$link" ;;
9
+ *) script=$(CDPATH= cd -- "$(dirname -- "$script")" && pwd)/"$link" ;;
10
+ esac
11
+ done
12
+
13
+ dir=$(CDPATH= cd -- "$(dirname -- "$script")" && pwd)
14
+ package_dir=$(CDPATH= cd -- "$dir/.." && pwd)
15
+
16
+ case "$(uname -s)/$(uname -m)" in
17
+ Darwin/aarch64) platform="darwin-arm64" ;;
18
+ Darwin/amd64) platform="darwin-x64" ;;
19
+ Darwin/arm64) platform="darwin-arm64" ;;
20
+ Darwin/x86_64) platform="darwin-x64" ;;
21
+ Linux/aarch64) platform="linux-arm64" ;;
22
+ Linux/amd64) platform="linux-x64" ;;
23
+ Linux/arm64) platform="linux-arm64" ;;
24
+ Linux/x86_64) platform="linux-x64" ;;
25
+ *) echo "agentic-proofkit: unsupported platform: $(uname -s)/$(uname -m)" >&2; exit 1 ;;
26
+ esac
27
+
28
+ binary="$package_dir/dist/platform/$platform/agentic-proofkit"
29
+
30
+ if [ ! -x "$binary" ]; then
31
+ echo "agentic-proofkit: missing embedded platform binary for $platform" >&2
32
+ echo "agentic-proofkit: reinstall agentic-proofkit from the published package artifact" >&2
33
+ exit 1
34
+ fi
35
+
36
+ exec "$binary" "$@"
@@ -0,0 +1,148 @@
1
+ # Proofkit Contract Map
2
+
3
+ Status: maintained consumer routing surface.
4
+
5
+ Owner: `proofkit`.
6
+
7
+ ## Purpose
8
+
9
+ This map helps consuming repositories choose the smallest Proofkit CLI command
10
+ or JSON contract without loading the full README or source tree. It is not an
11
+ exhaustive schema reference. The canonical command inventory is
12
+ `proofkit/cli-contract.v1.json`.
13
+
14
+ Formal rule:
15
+
16
+ ```text
17
+ Contract map routes humans and agents.
18
+ CLI/JSON records own cross-language behavior.
19
+ Go packages implement the shipped executable.
20
+ Consumer repositories own product truth, local policy, and native witnesses.
21
+ ```
22
+
23
+ Scope-class rule:
24
+
25
+ ```text
26
+ Most commands consume explicit caller-owned JSON/input refs.
27
+ Explicit filesystem scanners must be named in the CLI contract.
28
+ Scanner commands require caller-selected roots or scopes.
29
+ No command may infer ambient repository truth from the current directory.
30
+ ```
31
+
32
+ ## Families
33
+
34
+ | Family | Main commands | Caller provides | Proofkit owns | Consumer owns | Output authority |
35
+ |---|---|---|---|---|---|
36
+ | Adoption and scaffolding | `adoption-contract-envelope`, `adoption-workflow-plan`, `adoption-doctor`, `gradual-adoption`, `gradual-adoption-bootstrap`, `gradual-adoption-guidance`, `scaffold-profile-plan`, `scaffold-project-structure`, `stack-preset` | adoption intent, aggregate adoption contract envelope, target paths, owner routes, caller-extracted stale authority vocabulary facts, stack preset id | aggregate contract-envelope admission, deterministic starter plans, bounded guidance envelopes, dry-run manifests, adoption gap and stale-authority classification | final files, final requirements, rollout policy, text extraction from files | selected child output, plan, report, or agent envelope |
37
+ | Requirement source | `requirement-authoring-plan`, `requirement-source-admission`, `requirement-source-transition`, `spec-overview-claims`, `requirement-spec-tree`, `requirement-spec-tree-view`, `requirement-source-view`, `requirement-browser-server` | `requirements.v1.json`, caller-owned authoring facts, overview claim extraction, explicit spec hierarchy, view options | candidate-only authoring packets, source-shape admission, lifecycle checks, explicit tree topology/source-ref admission, shared safe renderer fragments, presentation-only views | requirement meaning, extraction completeness, Markdown extraction completeness, hierarchy ownership, proof adequacy, file materialization | authoring packet, source report, spec-tree report, rendered view, or browser presentation |
38
+ | Requirement proof binding | `requirement-bindings`, `proof-slice`, `evidence-graph`, `requirement-proof-resolver`, `requirement-proof-source-set`, `requirement-proof-view`, `spec-proof-bundle-admission` | requirement records, bindings, witness commands, source-set facts, receipt reports | graph validation, compact slices, typed compact proof contract projections, resolver projections, bundle linkage checks | test semantics, witness execution, proof freshness, merge policy | proof report, slice, lookup graph, or view |
39
+ | Test inventory and coverage | `test-evidence-inventory`, `test-evidence-inventory --normalized-inventory`, `requirement-coverage-input-compose`, `requirement-coverage-view`, `requirement-browser-server --view coverage` | caller-owned direct or source-set test inventory, declared quality findings, requirement source, proof binding or compact proof contract, coverage universe, optional owner-invariant registry | strict inventory/source-set admission, fail-closed normalized inventory projection, deterministic coverage-view input composition from explicit facts, weak-oracle and declared-quality classification, requirement/test/command/owner-invariant joins, nonsemantic command-evidence classification, stable coverage failure/warning classifications, presentation-only coverage view | inventory completeness, weak-test truth, native test execution, receipt freshness, producer trust, merge policy | inventory report, normalized inventory data product, coverage-view input, coverage view, or browser presentation |
40
+ | Selective planning | `changed-path-set`, `requirement-impact-input-compose`, `impact`, `selective-gate-plan`, `selective-gate-evidence`, `selective-gate-obligation-decision-input`, `obligation-decision` | changed paths, base/current requirement sources, base/current single-binding-per-requirement proof contracts, generated-artifact policy, local environment policy, proof-like path policy, planned receipts, obligation routes | fail-closed impact input composition, fail-closed planning, receipt comparison, bounded agent packets | git diff truth, repository scanning, command execution, producer trust, final admission | composed impact input, plan, evidence report, or obligation input |
41
+ | Receipts and producers | `proof-receipt-admission`, `receipt-producer-admission`, `receipt-currentness-scope`, `receipt-trust-class`, `producer-policy-self-proof` | receipt sets, producer policy, scope/currentness facts, trust classes | receipt shape, producer/receipt compatibility, self-proof diagnostics | producer authentication, freshness policy, CI trust roots | receipt/provenance report |
42
+ | Release and deployment | `release-authority`, `external-consumer`, `registry-consumer-proof-input-compose`, `registry-consumer`, `deployment-evidence-admission`, `completion-criteria`, `branch-authority`, `readiness-closeout` | package facts, tarball/registry facts, explicit primitive registry/install/smoke facts, deployment evidence, criteria, branch facts | artifact/channel boundary checks, registry-consumer input composition, release diagnostics, falsifiable criteria shape | package publication, registry fetch, package-manager execution, deployment, rollback, approval | composed input, release/deployment/readiness report |
43
+ | Supply-chain and quality | release workflow, `npm run release:sbom`, `npm run self:coverage`, `npm run go:actionlint`, `npm run go:bench` | release artifacts, source workflows, specs, bindings, witness plans, explicit benchmark invocation | deterministic SBOM candidate evidence, coverage metrics, workflow lint routing, benchmark entrypoints | public-source provenance, vulnerability triage, license approval, CI run admission, release approval | SBOM, metrics report, CI signal, or benchmark output |
44
+ | Repository structure | `repo-profile-admission`, `workspace-manifest-facts`, `workspace-registry`, `workspace-changed-package-plan`, `workspace-shard-partition`, `typescript-public-api-surfaces`, `text-policy`, `package-runtime-dependency-admission` | explicit repo/profile facts, caller-owned manifest records, caller-owned roots, and caller-owned text file inventories | structural admission, manifest-to-workspace fact projection, workspace graph projections, TypeScript package public API checks, text policy admission, shard plans | repository freshness, git/file discovery, command policy, package manager truth | structural, fact, policy, or planning report |
45
+ | Custom and generated artifacts | `custom-rule-boundary`, `document-lifecycle-boundary`, `rendered-artifact-freshness`, `conformance-profile`, `json-report-cli-adapter-source`, `witness-plan`, `witness-scheduler-plan` | custom rule metadata, document lifecycle records, artifact digests, profile manifests, command metadata, adapter language | boundary checks, generated-view freshness shape, deterministic adapter source generation, scheduler metadata checks | rule execution, document meaning, cache contents, CI scheduling, committed generated-source freshness | boundary report, generated source artifact, or scheduler report |
46
+
47
+ ## Migrating Repository Route
48
+
49
+ For imperfect repositories, use Proofkit as a transition toolkit rather than a
50
+ semantic judge.
51
+
52
+ ```text
53
+ inventory facts from caller
54
+ -> adoption workflow or bootstrap guidance
55
+ -> owner-selected boundary
56
+ -> requirement source admission
57
+ -> proof-binding validation
58
+ -> native witnesses plus contract tests
59
+ -> selective plan and admitted receipts
60
+ ```
61
+
62
+ Route ambiguous modernization work through the smallest matching family:
63
+
64
+ | Question | First route | Why |
65
+ |---|---|---|
66
+ | Where should adoption start? | `adoption-workflow-plan` or `scaffold-project-structure`; use `adoption-contract-envelope` when one caller-owned aggregate adoption file already exists. | They route scenario steps and first-module starter records without scanning the repository; the aggregate route removes consumer-local root-key projection scripts without owning rollout policy. |
67
+ | Is a candidate module ready for gradual enforcement? | `gradual-adoption-guidance` | It reports missing source, binding, witness, blocked-precondition, and advisory candidate-boundary facts by adoption mode. |
68
+ | What still blocks an imperfect repository from enforcement? | `adoption-doctor` | It classifies caller-provided owner routes, candidate boundaries, child reports, blocked preconditions, and stale current authority vocabulary facts without scanning repository state or owning semantic boundary decisions. |
69
+ | Does current documentation still name a retired proof package or proof owner? | `adoption-doctor --agent-envelope` with caller-extracted `staleAuthority` facts | It fails current authority surfaces, admits only explicitly scoped historical vocabulary, and emits bounded repair actions without substring-scanning files itself. |
70
+ | Can old local proof infrastructure be retired? | `migration-parity-admission` then `migration-plan` | Parity evidence and post-retirement validation are required before retirement actions appear. |
71
+ | Did a requirement move, split, or retire correctly? | `requirement-source-transition` | Requirement lifecycle and replacement ids belong to source transition, not proof binding. |
72
+ | Should temporary external design or PR facts become candidate requirements? | `requirement-authoring-plan` | It packages caller-owned extracted facts into candidate-only updates and owner-review questions without writing source files, retaining design documents, or approving meaning. |
73
+ | Does a `REQ-*` have a route to execution? | `requirement-bindings` or `proof-slice` | Proof bindings own route closure, while tests own executable behavior. |
74
+ | Which checks should run for a change? | `selective-gate-plan` then `selective-gate-evidence` | Planning and receipt comparison stay separate from command execution. |
75
+
76
+ ## Agent Decision Procedure
77
+
78
+ Agents should use `agent-route` for executable routing and
79
+ `agent-route --agent-envelope` when a bounded work packet is needed. The command
80
+ returns deterministic JSON from explicit caller-owned facts; the envelope is an
81
+ opt-in derived projection over the same report. This map explains the route
82
+ families without becoming an execution, freshness, or merge decision.
83
+ The exact route input vocabulary is machine-readable in
84
+ `proofkit/cli-contract.v1.json` under `agent-route.inputContract`; the Go
85
+ admission implementation and shipped CLI contract are parity-tested.
86
+
87
+ Formal rule:
88
+
89
+ ```text
90
+ goal plus caller-owned state
91
+ -> smallest matching command family
92
+ -> explicit required input
93
+ -> deterministic report or bounded envelope
94
+ -> caller-owned execution, proof freshness, and merge decision
95
+ ```
96
+
97
+ Decision tree:
98
+
99
+ | State or goal | Next Proofkit route | Stop or escalation condition |
100
+ |---|---|---|
101
+ | No admitted spec/profile exists. | `scaffold-project-structure`, `adoption-workflow-plan`, or `stack-preset` | Stop before writing files; the consumer owns materialization, overwrite policy, and final requirement text. |
102
+ | Candidate boundary is uncertain. | `adoption-doctor` or `gradual-adoption-guidance --agent-envelope` | Escalate to owner review when the boundary is advisory, ambiguous, or missing native witnesses. |
103
+ | Temporary external design, implementation-plan, PR, code, or test observations may contain durable requirements. | `requirement-authoring-plan` | Treat output as candidate-only; stop before writing `requirements.v1.json`, retaining temporary documents, or claiming requirement meaning. |
104
+ | Requirement records exist. | `requirement-source-admission`; use `requirement-source-transition` for lifecycle changes. | Escalate when blocking requirements lack proof routes or lifecycle replacement ids are incomplete. |
105
+ | Humans or agents need meta/module/submodule navigation. | `requirement-spec-tree`, then `requirement-spec-tree-view` or `requirement-browser-server --view spec-tree` from the same caller-owned tree input. | Stop before inferring hierarchy from paths. The consumer owns source hierarchy; CLI/browser outputs remain presentation only and are not committed by default. |
106
+ | Overview prose may contain durable claims. | `spec-overview-claims` | Escalate when normative claims are not tied to `REQ-*` records. |
107
+ | Requirements have no verified proof route. | `requirement-bindings`, `witness-plan`, `proof-slice`, or `requirement-proof-resolver` | Stop before claiming proof adequacy; native witness semantics stay with the consumer. |
108
+ | Tests or proof evidence need inventory. | `test-evidence-inventory`, optionally `requirement-coverage-input-compose`, then `requirement-coverage-view` | Compose only from explicit caller-owned facts. Use `failureClassifications[]` and `warningClassifications[]` for machine routing. Escalate when tests are route-only, weak-oracle, unbound, or outside the caller-owned coverage universe. |
109
+ | A change set is known. | `changed-path-set`, optionally `requirement-impact-input-compose`, `impact`, then `selective-gate-plan --agent-envelope` | Raw `knownChangedPaths` in `agent-route` are diagnostic only. Materialize a caller-owned `changed_path_set`, compose a caller-owned `impact_input` before `impact`, and compose a caller-owned `selective_gate_plan_input` before `selective-gate-plan`. Fail closed on unknown scope, dynamic edges, missing owner routes, unbound proof-like paths, or full-gate escalation. |
110
+ | Does a TypeScript package public API match a caller-owned manifest? | `agent-route` with `goal: "verify_typescript_public_api"` and explicit `typescript_public_api_manifest` plus `typescript_public_api_repo_root`, then `typescript-public-api-surfaces --repo-root <caller-selected-root>` | This is an explicit filesystem scanner. Stop before guessing `repo-root`, claiming checkout freshness, package-manager truth, or merge readiness. |
111
+ | Receipts are available for planned checks. | `selective-gate-evidence --agent-envelope`, then `obligation-decision --agent-envelope` | Escalate on missing, stale, invalid, untrusted, blocked, unavailable, or unknown-scope evidence. |
112
+ | Human inspection is needed. | `requirement-source-view`, `requirement-proof-view`, `requirement-coverage-view`, `requirement-spec-tree-view`, or `requirement-browser-server` | `agent-route` emits browser commands as plan-only by default. Use `browserMode: "serve_local_view"` for `--serve` and `openBrowser: true` for `--open`. Rendered HTML and Markdown are presentation only unless the consumer admits a tracked artifact freshness gate. |
113
+ | Temporary external document lifecycle facts, generated views, or rendered views need authority classification. | `document-lifecycle-boundary` | Treat lifecycle records as caller-owned metadata. Temporary design docs and implementation plans are not retained repository authority unless rewritten into deterministic specs, proof bindings, tests, package-public docs, or backlog rows. |
114
+ | A JavaScript/TypeScript consumer needs less wrapper code. | `json-report-cli-adapter-source --language typescript` | Generated adapter source is caller-owned after materialization. The consumer still owns package pin, binary path, repo paths, local policy, and freshness proof. |
115
+ | Local proof infrastructure may be retired. | `migration-parity-admission`, then `migration-plan` | Stop before deleting local owners unless parity and post-retirement validation are caller-approved. |
116
+ | Release, package, or deploy evidence is in scope. | `release-authority`, `registry-consumer-proof-input-compose`, `registry-consumer`, `external-consumer`, `deployment-evidence-admission`, or `readiness-closeout` | Compose registry-consumer input from explicit primitive facts first when needed; final registry-consumer validation remains separate. Treat registry, release, CI, deployment, and readiness evidence as separate classes. |
117
+ | The agent does not know which route applies. | `agent-route` with a known goal, or this map when no route input exists yet. | Escalate to the consumer owner instead of guessing, scanning ambient state, or executing commands. |
118
+
119
+ ## Routing Rules
120
+
121
+ 1. Start from `proofkit/cli-contract.v1.json` when a machine needs the exact
122
+ command, flags, input mode, output mode, scope class, or `agent-route` input
123
+ contract.
124
+ 2. Start from this map when a human or agent only needs the correct command
125
+ family.
126
+ 3. Use `agent-route` when a coding agent needs a deterministic next-command
127
+ packet from explicit current state. Use `agent-route --agent-envelope` when
128
+ the agent needs compact context refs, blockers, command refs, and non-claims
129
+ instead of a plain route report. Treat `blocked_*` states as stop signals,
130
+ not as permission to guess missing inputs. `knownChangedPaths` are
131
+ diagnostic-only until the caller supplies a `changed_path_set`; browser
132
+ server startup requires explicit `browserMode: "serve_local_view"`.
133
+ 4. Use agent-envelope output only when a coding agent needs bounded context;
134
+ do not expand whole proof graphs into chat.
135
+ 5. Treat generated views and rendered HTML as presentation only. They never
136
+ replace the structured source record.
137
+ 6. Escalate to the consuming repository's owner policy whenever Proofkit reports
138
+ unknown scope, missing receipts, unavailable preconditions, or command
139
+ execution requirements.
140
+ 7. Treat candidate boundaries from imperfect repositories as advisory until the
141
+ consuming repository commits stable requirement records and proof bindings.
142
+
143
+ ## Omitted Surfaces
144
+
145
+ This map intentionally omits exhaustive per-field schema documentation,
146
+ generated view instances, generated graph instances, receipt instances, and
147
+ language-specific wrapper APIs. Those surfaces are either generated on demand,
148
+ owned by the caller, or derived from the CLI/JSON contracts.
@@ -0,0 +1,228 @@
1
+ # Release Process
2
+
3
+ This is the release how-to for `agentic-proofkit`. It owns the package release
4
+ procedure and evidence requirements. It does not own product semantics for
5
+ consuming repositories.
6
+
7
+ ## Release Model
8
+
9
+ ```text
10
+ reviewed source
11
+ -> version tag
12
+ -> release workflow
13
+ -> candidate package evidence
14
+ -> deterministic SBOM, release manifest, and checksums
15
+ -> public npm publish or exact existing-byte match
16
+ -> optional PyPI publish or exact existing-byte match
17
+ -> post-publish npm registry identity with publication mode
18
+ -> optional post-publish PyPI registry identity with publication mode
19
+ -> root-only npm registry install and JSON CLI ABI proof
20
+ -> optional checksum-bound GitHub artifact attestations
21
+ -> GitHub Release archive assets and release evidence
22
+ ```
23
+
24
+ Public npm is the primary dependency authority. The npm package identity is
25
+ `@research-engineering/agentic-proofkit`; the installed executable name remains
26
+ `agentic-proofkit`. The Python package identity remains `agentic-proofkit`.
27
+ GitHub Release assets are archive and provenance lookup. Consumer repositories
28
+ still own whether a released version becomes an admitted dependency.
29
+
30
+ Release and adoption evidence uses canonical `authorityChannel` ids:
31
+ `tarball_pilot`, `registry_release`, `python_wheel_candidate`,
32
+ `pypi_registry_release`, and `github_release_archive`. Labels such as
33
+ `public-npm`, `pypi`, and `github-release` are display projections, not
34
+ authority ids.
35
+
36
+ The target distribution model is multi-channel but single-source:
37
+
38
+ ```text
39
+ Go source
40
+ -> npm package for JavaScript/TypeScript/Bun consumers
41
+ -> PyPI wheels for Python/uv consumers
42
+ -> GitHub Release assets with checksums and SBOM for provenance lookup
43
+ ```
44
+
45
+ The repository-owned `release:manifest` tool creates `release-manifest.json`,
46
+ `checksums.sha256`, `metadata-checksums.sha256`, `sbom-subjects.sha256`,
47
+ release notes, and deterministic SBOM candidate evidence from explicit package,
48
+ registry, and release evidence. `checksums.sha256` covers distributable archive
49
+ assets, including the SBOM file itself. `metadata-checksums.sha256` covers
50
+ release metadata files such as `release-manifest.json` and release notes.
51
+ `sbom-subjects.sha256` covers only the package and wheel subjects described by
52
+ that SBOM, so SBOM attestations do not make the SBOM file describe itself.
53
+ Workflow-local scripts must not own a divergent release manifest or SBOM
54
+ algorithm. PyPI wheels may be built and archived as candidate artifacts before
55
+ PyPI publication. PyPI publication is enabled only when
56
+ `PROOFKIT_ENABLE_PYPI_PUBLISH=true` and the PyPI Trusted Publisher is admitted.
57
+ Wheels become PyPI dependency authority only after the dedicated PyPI job either
58
+ publishes them through Trusted Publisher or records an exact existing-byte
59
+ match, the repository-owned PyPI registry capture tool verifies filename, tag,
60
+ URL, and SHA-256 identity against the candidate wheel set, and the release
61
+ manifest binds that registry identity to the retained publication-mode sidecar.
62
+ When a registry channel records `published_by_workflow` or `mixed`, the release
63
+ manifest must also retain the Trusted Publisher identity tuple: provider,
64
+ registry, project name, repository, exact `refs/tags/v<version>` workflow ref,
65
+ publisher job, and
66
+ environment. That tuple is retained provenance evidence for this workflow path;
67
+ it does not prove provider UI configuration or provider-side OIDC acceptance by
68
+ itself. `existing_byte_match` channels must not invent Trusted Publisher
69
+ provenance for bytes that already existed in the registry.
70
+
71
+ ## Preconditions
72
+
73
+ Before publishing a version:
74
+
75
+ 1. The source tree is clean.
76
+ 2. `package.json` contains the exact new version.
77
+ 3. `package.json` repository, license, bin, exports, files, and publishConfig
78
+ match the intended public package contract.
79
+ 4. The npm account has verified email and write-protective 2FA, or the package
80
+ uses an admitted Trusted Publisher configuration.
81
+ 5. When `PROOFKIT_ENABLE_PYPI_PUBLISH=true`, the PyPI account has a normal or
82
+ pending Trusted Publisher configured for project `agentic-proofkit`,
83
+ repository `research-engineering/agentic-proofkit`, workflow `release.yml`, and
84
+ environment `pypi`.
85
+ 6. The release workflow is configured for the package, public npm registry, and
86
+ release environments. PyPI release configuration is required only when the
87
+ PyPI channel is explicitly enabled.
88
+ 7. `npm run check` passes locally or the release candidate workflow provides
89
+ equivalent current-head evidence.
90
+
91
+ ## Candidate Proof
92
+
93
+ Run locally before tagging when practical:
94
+
95
+ ```bash
96
+ npm run check
97
+ npm pack --dry-run --json
98
+ git diff --check
99
+ ```
100
+
101
+ `npm run check` verifies text policy admission, Go formatting, tests, vet,
102
+ static analysis, workflow linting, vulnerability checks, npm package artifact
103
+ creation, package artifact verification, Python wheel artifact creation, Python
104
+ wheel verification, release SBOM, release manifest and checksum generation,
105
+ outside-consumer binary smoke proof, self-hosting receipt validation, and
106
+ coverage metrics generation.
107
+
108
+ The dry-run package identity proves candidate tarball shape only. It does not
109
+ prove the bytes served by the registry after publish.
110
+
111
+ ## Publish
112
+
113
+ Create and push an exact version tag:
114
+
115
+ ```bash
116
+ git tag v<version>
117
+ git push origin v<version>
118
+ ```
119
+
120
+ The `release` workflow must:
121
+
122
+ 1. verify source package identity;
123
+ 2. run the package gate;
124
+ 3. build publish dry-run evidence;
125
+ 4. build Python wheel candidates for the same embedded Go CLI;
126
+ 5. prove publish readiness before any registry side effect: the tag must equal
127
+ `v<package.json version>`, target a commit reachable from `main`, and have
128
+ npm dry-run evidence plus PyPI wheel candidates;
129
+ 6. publish to public npm through the admitted trusted path, or record
130
+ `existing_byte_match` when the same version already exists with exact
131
+ candidate bytes;
132
+ 7. when `PROOFKIT_ENABLE_PYPI_PUBLISH=true`, publish to PyPI through the
133
+ admitted trusted path, or record `existing_byte_match` when the same wheel
134
+ set already exists with exact candidate bytes;
135
+ 8. capture post-publish npm registry identity with package name, version, filename,
136
+ shasum, and integrity;
137
+ 9. when PyPI publication is enabled, capture post-publish PyPI registry identity
138
+ with package name, version, filename, wheel tags, URL, SHA-256, and retained
139
+ publication mode;
140
+ 10. verify a root-only npm registry install, signature audit, successful JSON
141
+ report command, and failed-report JSON command with stdout/stderr/exit-code
142
+ discipline;
143
+ 11. install and verify the pinned Node/npm toolchain before final metadata
144
+ generation, then run the repository-owned release manifest tool against the
145
+ candidate SBOM plus candidate and registry evidence, retaining Trusted
146
+ Publisher identity tuples for workflow-published registry channels;
147
+ 12. when `PROOFKIT_ENABLE_GITHUB_ATTESTATIONS=true` and the repository is
148
+ public, publish GitHub artifact provenance and SBOM attestations for the
149
+ checksum-bound release artifacts;
150
+ 13. create GitHub Release assets with checksums, metadata checksums, SBOM, and
151
+ a release manifest;
152
+ 14. retain normalized GitHub Release metadata as
153
+ `artifacts/release/github-release.json` after byte-for-byte asset
154
+ verification. The release manifest records GitHub Release channel data as
155
+ candidate/archive inventory; `github-release.json` owns post-create GitHub
156
+ Release facts.
157
+
158
+ When `PROOFKIT_REQUIRE_VERIFIED_RELEASE_TAG=true`, the readiness gate also
159
+ requires `GITHUB_REF_PROTECTED=true` and a GitHub-verified signed annotated tag.
160
+ That hardening mode is enabled only after the repository has an admitted tag
161
+ protection and signing-key policy; otherwise it would be an unreachable release
162
+ precondition rather than a proof.
163
+
164
+ ## Post-Publish Evidence
165
+
166
+ After publish, record the registry identity from npm:
167
+
168
+ ```bash
169
+ npm view @research-engineering/agentic-proofkit@<version> version dist.tarball dist.integrity dist.shasum repository.url license --json
170
+ ```
171
+
172
+ The release workflow records PyPI identity through:
173
+
174
+ ```bash
175
+ npm run pypi:registry
176
+ ```
177
+
178
+ The evidence must distinguish:
179
+
180
+ - local candidate tarball facts;
181
+ - local candidate wheel facts;
182
+ - post-publish npm registry facts;
183
+ - optional post-publish PyPI registry facts;
184
+ - Trusted Publisher identity tuples for workflow-published npm/PyPI channels;
185
+ - GitHub Release archive publication facts from retained `github-release.json`;
186
+ - GitHub Release candidate asset inventory from `release-manifest.json`;
187
+ - SBOM inventory facts;
188
+ - optional GitHub artifact attestation facts;
189
+ - planned but unpublished channel facts;
190
+ - consumer install facts.
191
+
192
+ These evidence classes are not interchangeable.
193
+
194
+ ## Rollback
195
+
196
+ Published npm versions are immutable. Rollback means pinning consumers back to
197
+ the previous admitted version and recording that consumer migration evidence.
198
+ It does not delete the published package or mutate release assets.
199
+
200
+ ## Public Source Provenance
201
+
202
+ Public-source provenance may be claimed only when the source repository is
203
+ intentionally public and the release workflow publishes a later version from
204
+ that public source. A release from a private source repository may be a valid
205
+ package release, but it is not public-source provenance.
206
+
207
+ Artifact attestation workflow wiring is not the same as completed provenance.
208
+ When attestation storage is enabled and the repository visibility supports
209
+ provider attestations, the release workflow must complete the attestation job
210
+ before the GitHub Release asset job can publish archive assets. Provider-side
211
+ attestation evidence becomes release evidence only after that job runs with
212
+ attestation storage enabled and records the result. User-owned private
213
+ repositories currently cannot store GitHub artifact attestations; in that state
214
+ the release may still publish package and archive evidence, but it must not
215
+ claim provider artifact attestation or public-source provenance.
216
+
217
+ ## Non-Claims
218
+
219
+ This process does not:
220
+
221
+ - approve adoption in a consuming repository;
222
+ - execute consumer-native witnesses;
223
+ - prove consumer proof freshness;
224
+ - approve merge, rollout, deployment, or production readiness;
225
+ - make GitHub Release assets package-manager dependency authority;
226
+ - make SBOM inventory vulnerability absence or license approval;
227
+ - make optional attestation wiring public-source provenance before a qualifying
228
+ public-source tag release exists.
@@ -0,0 +1,62 @@
1
+ # Proofkit Consumer Infrastructure Retirement Spec
2
+
3
+ This spec owns Proofkit's reusable primitives for retiring duplicated
4
+ consumer-side proof infrastructure. It covers migration planning, installed
5
+ package runtime dependency admission, workspace registry admission,
6
+ repo-profile admission, and adoption workflow routing.
7
+ It also covers structured parity evidence admission for repositories that need
8
+ machine-checkable preconditions before local proof-owner retirement review.
9
+
10
+ It is intentionally infrastructure-only. Consumers own old proof surfaces, new
11
+ Proofkit inputs, parity evidence, native witness execution, command policy,
12
+ receipt freshness, file deletion, CI admission, merge approval, release
13
+ approval, rollout approval, and production decisions.
14
+
15
+ ## Requirements
16
+
17
+ - `REQ-PROOFKIT-RETIRE-001`: migration plans keep old and new proof owners
18
+ explicit and block retirement unless caller-provided parity evidence and
19
+ post-retirement validation commands exist.
20
+ - `REQ-PROOFKIT-RETIRE-002`: package runtime dependency admission validates
21
+ caller-provided installed package identity and location facts without reading
22
+ package manager state or resolving packages.
23
+ - `REQ-PROOFKIT-RETIRE-003`: workspace registry admission validates
24
+ caller-provided script, dependency, and lockfile facts against caller policy
25
+ without owning repository command policy or lockfile freshness.
26
+ - `REQ-PROOFKIT-RETIRE-004`: repo-profile structural and command admission
27
+ validates caller-owned profile, path, command, and environment facts without
28
+ scanning repositories or approving native proof coverage.
29
+ - `REQ-PROOFKIT-RETIRE-005`: adoption workflow plans route legacy migration,
30
+ gradual adoption, and release-channel scenarios to existing Proofkit
31
+ primitives through bounded structured command refs.
32
+ - `REQ-PROOFKIT-RETIRE-006`: migration parity admission validates
33
+ caller-provided parity evidence shape, source/target closure, typed
34
+ equivalence dimensions, and matched digest equality without owning evidence
35
+ authenticity, freshness, semantic correctness, or retirement approval.
36
+ - `REQ-PROOFKIT-RETIRE-007`: gradual adoption guidance keeps caller-provided
37
+ candidate boundaries advisory, exposes owner-review questions, routes mode
38
+ and checked-scope semantics through one private owner, and fails closed for
39
+ enforcement modes until the consumer admits stable requirements and proof
40
+ bindings.
41
+ - `REQ-PROOFKIT-RETIRE-008`: adoption doctor reports classify caller-provided
42
+ imperfect-repository migration gaps and non-passing child reports into
43
+ advisory, failed, or blocked states and emit bounded owner-specific guidance
44
+ without scanning repositories or owning semantic boundary decisions.
45
+ - `REQ-PROOFKIT-RETIRE-009`: workspace manifest fact projection turns explicit
46
+ caller-owned manifest records into registry-compatible workspace facts and
47
+ planning inputs without reading manifests from disk or owning package-manager
48
+ policy.
49
+ - `REQ-PROOFKIT-RETIRE-010`: registry consumer proof input composition turns
50
+ explicit caller-owned registry metadata, registry pack comparison, lock,
51
+ smoke, rollback, precondition, and release-authority facts into a
52
+ `registry-consumer` input only when those facts are complete and aligned,
53
+ while preserving `registry-consumer` as the final proof-schema owner.
54
+
55
+ ## Non-Claims
56
+
57
+ - This spec does not authorize deletion of consumer files or local proof owners.
58
+ - This spec does not execute commands, authenticate parity evidence, compute
59
+ proof freshness, or approve merge.
60
+ - This spec does not make Proofkit a repository scanner, command-policy owner,
61
+ CI authority, release authority, rollout authority, or production-readiness
62
+ authority for consumers.