Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 9 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ jobs:
go-version-file: go.mod
cache: true

- name: Setup Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: '3.14.6'

- name: Verify diff hygiene
run: |
set -euo pipefail
Expand All @@ -70,26 +75,11 @@ jobs:
- name: Verify Go formatting
run: npm run go:fmt

- name: Run Go tests for app
run: go test ./cmd/agentic-proofkit ./internal/app

- name: Run Go tests for kernel
run: go test ./internal/kernel/...

- name: Run Go tests for commands
run: go test ./internal/command/...

- name: Run Go tests for coverage and package tools
run: go test ./internal/tools/coveragemetrics ./internal/tools/packagebuild ./internal/tools/packagepack ./internal/tools/packageverify

- name: Run Go tests for registry and Python tools
run: go test ./internal/tools/pypiregistry ./internal/tools/pythonpackage

- name: Run Go tests for release tools
run: go test ./internal/tools/releasecloseoutinput ./internal/tools/releasemanifest ./internal/tools/releasepreflight ./internal/tools/releasesbom ./internal/tools/textpolicyinput
- name: Verify generated command family catalog
run: npm run command-family:check

- name: Run Go tests for scripts
run: go test ./scripts
- name: Run all Go tests
run: npm run go:test

- name: Run Go vet
run: npm run go:vet
Expand Down
4 changes: 2 additions & 2 deletions docs/proofkit-contract-map.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ owner boundaries. It is not a second command-family inventory.
| 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 |
| 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 |
| Supply-chain and quality | `self-check`, 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 self-check report shape, SBOM candidate evidence, coverage metrics, workflow lint routing, benchmark entrypoints | public-source provenance, vulnerability triage, license approval, CI run admission, release approval | self-check report, SBOM, metrics report, CI signal, or benchmark output |
| Repository structure | `repo-profile-admission`, `workspace-manifest-facts`, `workspace-registry`, `workspace-changed-package-plan`, `workspace-shard-partition`, `typescript-public-api-surfaces`, `text-policy`, `secret-scan`, `package-runtime-dependency-admission` | explicit repo/profile facts, caller-owned manifest records, caller-owned roots, caller-owned text file inventories, optional `environmentClassPolicies` tuples | structural admission, manifest-to-workspace fact projection, workspace graph projections, TypeScript package public API checks, text policy admission, explicit-inventory secret-like text detection, shard plans | repository freshness, git/file discovery, command policy, package manager truth, provider secret scanning | structural, fact, policy, or planning report |
| Repository structure | `repo-profile-admission`, `workspace-manifest-facts`, `workspace-registry`, `workspace-changed-package-plan`, `workspace-shard-partition`, `typescript-public-api-surfaces`, `text-policy`, `secret-scan`, `package-runtime-dependency-admission` | explicit repo/profile facts, caller-owned manifest records, caller-owned roots, caller-owned text file inventories, explicit TypeScript package-manifest and per-condition source paths, optional `environmentClassPolicies` tuples | structural admission, manifest-to-workspace fact projection, workspace graph projections, bounded TypeScript package public API checks over referenced files, text policy admission, explicit-inventory secret-like text detection, shard plans | repository freshness, git/file discovery, compiler output provenance, command policy, package manager truth, provider secret scanning | structural, fact, policy, or planning report |
| 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 |
| CLI metadata | `help` | optional command name or help flag | built-in command catalog and help text routing | command selection, semantic proof, freshness, merge policy | text help only |

Expand Down Expand Up @@ -121,7 +121,7 @@ Decision tree:
| Tests or proof evidence need inventory. | `test-evidence-inventory`; use `--projection discovery-draft` only for explicit discovered-test facts, then `requirement-coverage-input-compose` when an aggregate `coverage_compose_input` exists, then `requirement-coverage-view` when a `coverage_view_input` exists | Compose only from explicit caller-owned facts. Discovery drafts are candidate-only and cannot close coverage. Use `failureClassifications[]`, `warningClassifications[]`, and `agentActionPlan[]` for machine routing. Escalate when tests are route-only, weak-oracle, unbound, or outside the caller-owned coverage universe. |
| 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`. Use `scanObligation` to name whether a `text-policy`, `secret-scan`, or caller-owned external scanner is required. Fail closed on unknown scope, dynamic edges, missing owner routes, unbound proof-like paths, or full-gate escalation. |
| Caller-owned file contents need secret-like text detection. | `secret-scan` | Provide explicit sorted file inventory with content. Stop before claiming repository-wide discovery, credential validity, provider ingestion, merge readiness, or replacement of GitHub secret scanning. |
| 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. |
| 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>` | The manifest must name each referenced `package.json`, sorted-unique export conditions, and a non-JSX `.ts`, `.mts`, or `.cts` `sourcePath` whose canonical target has the same admitted extension class. The bounded scanner accepts only the fail-closed export grammar in `proofkit/cli-contract.v1.json`; it does not parse unrestricted TypeScript or TSX, infer conventional layouts, or prove compiler output provenance, checkout freshness, package-manager truth, or merge readiness. |
| Receipts are available for planned checks. | `selective-gate-evidence --agent-envelope`; then materialize a caller-owned `obligation_decision_input` from the evidence output plus command routes, currentness, and trust facts; then run `selective-gate-obligation-decision-input`; then materialize the resulting `obligation_decision` input and run `obligation-decision --agent-envelope` | Escalate on missing, stale, invalid, untrusted, blocked, unavailable, or unknown-scope evidence. |
| 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. |
| 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. |
Expand Down
21 changes: 13 additions & 8 deletions docs/specs/proofkit-package-boundary/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,27 @@ denial, and package artifact behavior only.
- `REQ-PROOFKIT-PACKAGE-002`: the CLI builds deterministic reports, plans,
generated source artifacts, and policy-admission results from explicit
caller-owned JSON, declared no-input command parameters, or declared explicit
scanner scope classes without executing native witnesses, scanning implicit
repository state, deciding proof freshness, or accepting broad caller-supplied
phrase suppressors that can hide readiness overclaims.
scanner scope classes. Explicit scanners consume only caller-named bounded
canonical files under documented fail-closed grammars rather than guessing
layouts or silently accepting unsupported syntax; no command executes native
witnesses, scans implicit repository state, decides proof freshness, or accepts
broad caller-supplied phrase suppressors that can hide readiness overclaims.
- `REQ-PROOFKIT-PACKAGE-003`: the root package remains installable and
executable by an outside consumer on the current native platform without
claiming registry publication.
- `REQ-PROOFKIT-PACKAGE-004`: CI package-gate receipts used as merge evidence
are admitted through a declared producer policy and proof-receipt shape
validator instead of current-build output alone.
- `REQ-PROOFKIT-PACKAGE-005`: the Go source, static analysis, package gate,
and vulnerability gates remain the native merge-critical quality floor for
the current Proofkit source tree.
- `REQ-PROOFKIT-PACKAGE-005`: tracked source hygiene covers each admitted text
language in staged blobs and the current worktree; Go formatting, static
analysis, test, package, and vulnerability gates remain the native
merge-critical quality floor and explicitly provision every runtime required
by a merge-critical oracle.
- `REQ-PROOFKIT-PACKAGE-006`: Python/uv distribution is a platform wheel
wrapper over the same Go CLI, with wheel-safe package metadata, wheel tags,
embedded binary identity, local install smoke proof, and explicit non-claims
until PyPI publication.
embedded binary identity, local install smoke proof, POSIX exec
process-identity and signal preservation, and explicit non-claims until PyPI
publication.
- `REQ-PROOFKIT-PACKAGE-007`: package-public Markdown records release-channel
state only and must not embed exact per-version provider facts that are owned
by immutable registry, release, and manifest artifacts.
Expand Down
6 changes: 3 additions & 3 deletions docs/specs/proofkit-package-boundary/requirements.v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
{
"requirementId": "REQ-PROOFKIT-PACKAGE-002",
"ownerId": "proofkit.package-boundary",
"invariant": "The CLI builds deterministic reports, plans, generated source artifacts, and policy-admission results from explicit caller-owned JSON, declared no-input command parameters, or declared explicit scanner scope classes without executing native witnesses, scanning implicit repository state, deciding proof freshness, or accepting broad caller-supplied phrase suppressors that can hide readiness overclaims.",
"invariant": "The CLI builds deterministic reports, plans, generated source artifacts, and policy-admission results from explicit caller-owned JSON, declared no-input command parameters, or declared explicit scanner scope classes; explicit scanners consume only caller-named bounded canonical files under documented fail-closed grammars rather than guessing layouts or silently accepting unsupported syntax, and no command executes native witnesses, scans implicit repository state, decides proof freshness, or accepts broad caller-supplied phrase suppressors that can hide readiness overclaims.",
"claimLevel": "blocking",
"riskClass": "high",
"proofBindingRefs": [
Expand Down Expand Up @@ -116,7 +116,7 @@
{
"requirementId": "REQ-PROOFKIT-PACKAGE-005",
"ownerId": "proofkit.package-boundary",
"invariant": "The Go source, formatting, static analysis, vet, test, package artifact, and vulnerability gates remain the native merge-critical quality floor for the current Proofkit source tree.",
"invariant": "Tracked source hygiene covers every admitted project text language in both staged blobs and the current worktree, while Go formatting, static analysis, vet, test, package artifact, and vulnerability gates remain the native merge-critical quality floor and explicitly provision every runtime required by a merge-critical oracle.",
"claimLevel": "blocking",
"riskClass": "high",
"proofBindingRefs": [
Expand All @@ -143,7 +143,7 @@
{
"requirementId": "REQ-PROOFKIT-PACKAGE-006",
"ownerId": "proofkit.package-boundary",
"invariant": "Python/uv distribution is a platform wheel wrapper over the same Go CLI, with wheel-safe package metadata, wheel tags, embedded binary identity, local install smoke proof, and explicit non-claims until PyPI publication.",
"invariant": "Python/uv distribution is a platform wheel wrapper over the same Go CLI, with wheel-safe package metadata, wheel tags, embedded binary identity, local install smoke proof, POSIX exec process-identity and signal preservation, and explicit non-claims until PyPI publication.",
"claimLevel": "blocking",
"riskClass": "medium",
"proofBindingRefs": [
Expand Down
18 changes: 10 additions & 8 deletions docs/specs/proofkit-spec-proof-core/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,18 @@ execution receipts, and merge policy.
- `REQ-PROOFKIT-SPEC-003`: witness planning accepts caller-owned structured
command metadata, scheduler constraints, environment classes, and
binding-derived command projections only through admitted witness vocabulary
and conservative safe argv policy, without executing commands or selecting
repository policy.
and conservative safe argv policy. Self-hosting bindings and witness plans
preserve command ids, argv, and environment classes without executing
commands or selecting repository policy.
- `REQ-PROOFKIT-SPEC-004`: selective planning and selective evidence reports
keep changed-path facts, planned commands, receipts, evidence class,
producer-admission state, and obligation candidates explicit, keep merge
approval consumer-owned, and fail closed for unknown or unmatched proof
inputs.
keep canonical changed-path facts, resolvable agent references, planned
commands, receipts, evidence class, producer-admission state, and obligation
candidates explicit, keep merge approval consumer-owned, and fail closed for
unknown or unmatched proof inputs.
- `REQ-PROOFKIT-SPEC-005`: rendered proof views and agent envelopes remain
bounded, derived presentations over structured source and never become
canonical proof or requirement authority.
bounded, reference-closed derived presentations over structured source,
count each semantic omission once, and never become canonical proof or
requirement authority.
- `REQ-PROOFKIT-SPEC-006`: test evidence inventory, explicit test-discovery
draft projections, proof-binding-derived inventory projections, normalized
inventory projections, coverage-view input composition, and requirement
Expand Down
6 changes: 3 additions & 3 deletions docs/specs/proofkit-spec-proof-core/requirements.v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
{
"requirementId": "REQ-PROOFKIT-SPEC-003",
"ownerId": "proofkit.spec-proof-core",
"invariant": "Witness planning accepts caller-owned structured command metadata, scheduler constraints, environment classes, and binding-derived command projections only through admitted witness vocabulary and conservative safe argv policy, without executing commands or selecting repository policy.",
"invariant": "Witness planning accepts caller-owned structured command metadata, scheduler constraints, environment classes, and binding-derived command projections only through admitted witness vocabulary and conservative safe argv policy; self-hosting requirement bindings and witness plans preserve the same command ids, argv, and environment classes without executing commands or selecting repository policy.",
"claimLevel": "blocking",
"riskClass": "high",
"proofBindingRefs": [
Expand All @@ -89,7 +89,7 @@
{
"requirementId": "REQ-PROOFKIT-SPEC-004",
"ownerId": "proofkit.spec-proof-core",
"invariant": "Selective planning and selective evidence reports keep changed-path facts, planned commands, receipts, evidence class, producer-admission state, and obligation candidates explicit, keep merge approval consumer-owned, and fail closed for unknown or unmatched proof inputs.",
"invariant": "Selective planning and selective evidence reports keep canonical changed-path facts, resolvable agent references, planned commands, receipts, evidence class, producer-admission state, and obligation candidates explicit, keep merge approval consumer-owned, and fail closed for unknown or unmatched proof inputs.",
"claimLevel": "blocking",
"riskClass": "high",
"proofBindingRefs": [
Expand All @@ -116,7 +116,7 @@
{
"requirementId": "REQ-PROOFKIT-SPEC-005",
"ownerId": "proofkit.spec-proof-core",
"invariant": "Rendered proof views and agent envelopes remain bounded, derived presentations over structured source and never become canonical proof or requirement authority.",
"invariant": "Rendered proof views and agent envelopes remain bounded, reference-closed derived presentations over structured source, count each semantic omission once, and never become canonical proof or requirement authority.",
"claimLevel": "blocking",
"riskClass": "medium",
"proofBindingRefs": [
Expand Down
Loading
Loading