capas-claim-gate 0.3.0__tar.gz

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 (42) hide show
  1. capas_claim_gate-0.3.0/LICENSE +179 -0
  2. capas_claim_gate-0.3.0/NOTICE +20 -0
  3. capas_claim_gate-0.3.0/PKG-INFO +468 -0
  4. capas_claim_gate-0.3.0/README.md +438 -0
  5. capas_claim_gate-0.3.0/capas.py +7512 -0
  6. capas_claim_gate-0.3.0/capas_admissibility.py +114 -0
  7. capas_claim_gate-0.3.0/capas_claim_gate.egg-info/PKG-INFO +468 -0
  8. capas_claim_gate-0.3.0/capas_claim_gate.egg-info/SOURCES.txt +40 -0
  9. capas_claim_gate-0.3.0/capas_claim_gate.egg-info/dependency_links.txt +1 -0
  10. capas_claim_gate-0.3.0/capas_claim_gate.egg-info/entry_points.txt +3 -0
  11. capas_claim_gate-0.3.0/capas_claim_gate.egg-info/requires.txt +17 -0
  12. capas_claim_gate-0.3.0/capas_claim_gate.egg-info/top_level.txt +17 -0
  13. capas_claim_gate-0.3.0/capas_intake.py +202 -0
  14. capas_claim_gate-0.3.0/capas_invariants.py +635 -0
  15. capas_claim_gate-0.3.0/capas_ledger.py +69 -0
  16. capas_claim_gate-0.3.0/capas_ledger_store.py +64 -0
  17. capas_claim_gate-0.3.0/capas_mcp.py +198 -0
  18. capas_claim_gate-0.3.0/capas_propose.py +107 -0
  19. capas_claim_gate-0.3.0/capas_quantum_physics.py +674 -0
  20. capas_claim_gate-0.3.0/capas_rcc.py +237 -0
  21. capas_claim_gate-0.3.0/capas_registry.py +120 -0
  22. capas_claim_gate-0.3.0/capas_route.py +158 -0
  23. capas_claim_gate-0.3.0/capas_sdk.py +174 -0
  24. capas_claim_gate-0.3.0/capas_trust.py +59 -0
  25. capas_claim_gate-0.3.0/capas_verify.py +1788 -0
  26. capas_claim_gate-0.3.0/integrations/universal_invariant_adversarial_engines.py +863 -0
  27. capas_claim_gate-0.3.0/pyproject.toml +61 -0
  28. capas_claim_gate-0.3.0/router/__init__.py +34 -0
  29. capas_claim_gate-0.3.0/router/backends/__init__.py +17 -0
  30. capas_claim_gate-0.3.0/router/backends/dense_backend.py +68 -0
  31. capas_claim_gate-0.3.0/router/backends/external_engine_backend.py +48 -0
  32. capas_claim_gate-0.3.0/router/backends/stim_backend.py +42 -0
  33. capas_claim_gate-0.3.0/router/backends/tensor_backend.py +21 -0
  34. capas_claim_gate-0.3.0/router/cost_model.py +222 -0
  35. capas_claim_gate-0.3.0/router/executor.py +18 -0
  36. capas_claim_gate-0.3.0/router/pipeline.py +247 -0
  37. capas_claim_gate-0.3.0/router/prov_export.py +297 -0
  38. capas_claim_gate-0.3.0/router/ro_crate_export.py +589 -0
  39. capas_claim_gate-0.3.0/router/route.py +115 -0
  40. capas_claim_gate-0.3.0/router/trace.py +218 -0
  41. capas_claim_gate-0.3.0/router/types.py +57 -0
  42. capas_claim_gate-0.3.0/setup.cfg +4 -0
@@ -0,0 +1,179 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or Derivative
95
+ Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works.
111
+
112
+ You may add Your own copyright statement to Your modifications and
113
+ may provide additional or different license terms and conditions
114
+ for use, reproduction, or distribution of Your modifications, or
115
+ for any such Derivative Works as a whole, provided Your use,
116
+ reproduction, and distribution of the Work otherwise complies with
117
+ the conditions stated in this License.
118
+
119
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
120
+ any Contribution intentionally submitted for inclusion in the Work
121
+ by You to the Licensor shall be under the terms and conditions of
122
+ this License, without any additional terms or conditions.
123
+ Notwithstanding the above, nothing herein shall supersede or modify
124
+ the terms of any separate license agreement you may have executed
125
+ with Licensor regarding such Contributions.
126
+
127
+ 6. Trademarks. This License does not grant permission to use the trade
128
+ names, trademarks, service marks, or product names of the Licensor,
129
+ except as required for reasonable and customary use in describing the
130
+ origin of the Work and reproducing the content of the NOTICE file.
131
+
132
+ 7. Disclaimer of Warranty. Unless required by applicable law or
133
+ agreed to in writing, Licensor provides the Work (and each
134
+ Contributor provides its Contributions) on an "AS IS" BASIS,
135
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
136
+ implied, including, without limitation, any warranties or conditions
137
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
138
+ PARTICULAR PURPOSE. You are solely responsible for determining the
139
+ appropriateness of using or redistributing the Work and assume any
140
+ risks associated with Your exercise of permissions under this License.
141
+
142
+ 8. Limitation of Liability. In no event and under no legal theory,
143
+ whether in tort (including negligence), contract, or otherwise,
144
+ unless required by applicable law (such as deliberate and grossly
145
+ negligent acts) or agreed to in writing, shall any Contributor be
146
+ liable to You for damages, including any direct, indirect, special,
147
+ incidental, or consequential damages of any character arising as a
148
+ result of this License or out of the use or inability to use the
149
+ Work (including but not limited to damages for loss of goodwill,
150
+ work stoppage, computer failure or malfunction, or any and all
151
+ other commercial damages or losses), even if such Contributor
152
+ has been advised of the possibility of such damages.
153
+
154
+ 9. Accepting Warranty or Additional Liability. While redistributing
155
+ the Work or Derivative Works thereof, You may choose to offer,
156
+ and charge a fee for, acceptance of support, warranty, indemnity,
157
+ or other liability obligations and/or rights consistent with this
158
+ License. However, in accepting such obligations, You may act only
159
+ on Your own behalf and on Your sole responsibility, not on behalf
160
+ of any other Contributor, and only if You agree to indemnify,
161
+ defend, and hold each Contributor harmless for any liability
162
+ incurred by, or claims asserted against, such Contributor by reason
163
+ of your accepting any such warranty or additional liability.
164
+
165
+ END OF TERMS AND CONDITIONS
166
+
167
+ Copyright 2026 CAPAS project.
168
+
169
+ Licensed under the Apache License, Version 2.0 (the "License");
170
+ you may not use this file except in compliance with the License.
171
+ You may obtain a copy of the License at
172
+
173
+ http://www.apache.org/licenses/LICENSE-2.0
174
+
175
+ Unless required by applicable law or agreed to in writing, software
176
+ distributed under the License is distributed on an "AS IS" BASIS,
177
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
178
+ See the License for the specific language governing permissions and
179
+ limitations under the License.
@@ -0,0 +1,20 @@
1
+ CAPAS — Claim Admissibility Engine
2
+ Copyright 2026 CAPAS project.
3
+
4
+ This product is licensed under the Apache License, Version 2.0 (see LICENSE).
5
+ It is published as an OPEN-CORE reference implementation + OPEN STANDARD.
6
+
7
+ Open (Apache-2.0): the schema, the admissibility calculus, the reference gate,
8
+ the CLI, the tests, and the benchmark corpus. Use, modify, and redistribute freely.
9
+
10
+ Reserved (NOT granted by the Apache license — see LICENSE §6 Trademarks): the
11
+ "CAPAS" name and marks, and any official CAPAS certification, conformance claim,
12
+ or official benchmark. You may state that software is "built with CAPAS" or
13
+ "CAPAS-schema-compatible" where true; you may NOT present a fork or service as
14
+ "CAPAS", "CAPAS-certified", or "official CAPAS" without written permission. This
15
+ is how an open standard stays trustworthy: anyone can run the code; only verified
16
+ artifacts may carry the mark.
17
+
18
+ CAPAS does not determine truth. It evaluates whether supplied evidence licenses a
19
+ specific claim under a declared admissibility contract. It is research software and
20
+ does not replace expert, legal, medical, scientific, or regulatory review.
@@ -0,0 +1,468 @@
1
+ Metadata-Version: 2.4
2
+ Name: capas-claim-gate
3
+ Version: 0.3.0
4
+ Summary: A fail-closed verification layer you wrap around your LLM: it never lets an unsupported claim through as ACCEPT, re-derives what is re-derivable, and emits a deterministic verifiable reward.
5
+ Author: CAPAS project
6
+ License-Expression: LicenseRef-Proprietary-Research-Prototype
7
+ Classifier: Development Status :: 3 - Alpha
8
+ Classifier: Intended Audience :: Science/Research
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Topic :: Scientific/Engineering
11
+ Requires-Python: >=3.11
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ License-File: NOTICE
15
+ Requires-Dist: numpy
16
+ Provides-Extra: corpus
17
+ Requires-Dist: scipy; extra == "corpus"
18
+ Requires-Dist: pyscf; extra == "corpus"
19
+ Requires-Dist: quimb; extra == "corpus"
20
+ Requires-Dist: cotengra; extra == "corpus"
21
+ Requires-Dist: stim; extra == "corpus"
22
+ Requires-Dist: rocrate==0.15.0; extra == "corpus"
23
+ Requires-Dist: rocrateValidator==0.2.15; extra == "corpus"
24
+ Provides-Extra: validation
25
+ Requires-Dist: rocrate==0.15.0; extra == "validation"
26
+ Requires-Dist: rocrateValidator==0.2.15; extra == "validation"
27
+ Provides-Extra: standalone
28
+ Requires-Dist: pypdf>=4; extra == "standalone"
29
+ Dynamic: license-file
30
+
31
+ # CAPAS INTELIGENTES
32
+
33
+ [![CAPAS CI](https://github.com/fomv9354lve/capas-inteligentes/actions/workflows/ci.yml/badge.svg)](https://github.com/fomv9354lve/capas-inteligentes/actions/workflows/ci.yml)
34
+ [![Conformance](https://github.com/fomv9354lve/capas-inteligentes/actions/workflows/conformance.yml/badge.svg)](https://github.com/fomv9354lve/capas-inteligentes/actions/workflows/conformance.yml)
35
+ [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/fomv9354lve/capas-inteligentes/badge)](https://scorecard.dev/viewer/?uri=github.com/fomv9354lve/capas-inteligentes)
36
+ [![License](https://img.shields.io/badge/license-Apache--2.0-blue)](LICENSE)
37
+ [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/fomv9354lve/capas-inteligentes/main?labpath=notebooks/run_a_claim.ipynb)
38
+ [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/fomv9354lve/capas-inteligentes/blob/main/notebooks/run_a_claim.ipynb)
39
+
40
+ ### Verify it yourself — free, neutral infrastructure (don't trust us, reproduce it)
41
+
42
+ A claim is only worth the badge if a *third party* can reproduce it. Every public claim here is checkable
43
+ on infra we don't control:
44
+
45
+ - **Conformance on neutral CI, signed.** GitHub Actions runs `python3 benchmarks/conformance.py` on every
46
+ push and **Sigstore-signs** the result into a public transparency log (keyless). The badge above is that
47
+ run — green means the load-bearing invariants hold on GitHub's runners, not just a laptop.
48
+ - **Run a claim yourself** — the Binder / Colab badges open `notebooks/run_a_claim.ipynb`: install nothing,
49
+ run the gate in your browser, get the same verdict and audit hash we publish.
50
+ - **Independent supply-chain score** — the OpenSSF Scorecard badge is a third party's assessment.
51
+ - **Every number is re-derivable** — see [`docs/CLAIMS_REGISTRY.md`](docs/CLAIMS_REGISTRY.md); each claim
52
+ carries the command that reproduces it. Governance: [`GOVERNANCE.md`](GOVERNANCE.md).
53
+
54
+ *Your turn (account-gated, one-time):* connect the repo to **Zenodo** + cut a release → mints a citable DOI
55
+ (`.zenodo.json` is ready); add a **PyPI Trusted Publisher** → `pip install` goes live via `publish.yml`;
56
+ push `spaces/` to a **Hugging Face Space** → a neutral hosted demo; register at **bestpractices.dev** for
57
+ the OpenSSF Best Practices badge.
58
+
59
+ **CAPAS does not determine truth. It evaluates whether supplied evidence licenses a
60
+ specific claim under a declared admissibility contract** — deterministically, with no
61
+ language model in the verdict, and re-derivably (same input → same verdict → same audit
62
+ hash). A claim + its structured evidence goes in; ACCEPT / REWRITE / REJECT / HOLD comes out.
63
+
64
+ CAPAS ships **open-core + open standard** (Apache-2.0). The defensible asset is the schema,
65
+ the admissibility calculus, the certificate, and the benchmark corpus — not the code. It is a
66
+ reference implementation in the lineage of OPA / SPDX / RO-Crate, not a closed SaaS. The CAPAS
67
+ name, certification, and official benchmark are reserved (see `NOTICE`).
68
+
69
+ **It gates its own claims:** every public number is `CLOSED` (proven by a test), `BACKED`
70
+ (regenerates from a command), or `SCOPED` (a declared estimate) — see
71
+ [`docs/CLAIMS_REGISTRY.md`](docs/CLAIMS_REGISTRY.md). Nothing bare.
72
+
73
+ It is not a new provenance standard, benchmark suite, workflow engine, or VVUQ
74
+ methodology. CAPAS is a profile/costurero over existing standards:
75
+
76
+ > RO-Crate/PROV packaging + sealed route/result trace + VVUQ-style physical
77
+ > evidence + witness independence + honest no-evidence/failure/rejection states.
78
+
79
+ ## Who This Is For
80
+
81
+ CAPAS is for people auditing AI-generated scientific-computation outputs:
82
+
83
+ - AI-for-science agent benchmark builders,
84
+ - scientific workflow provenance / RO-Crate users,
85
+ - quantum many-body verification and benchmark users,
86
+ - teams deciding whether a computation supports a strong claim, a weaker
87
+ rewrite, rejection, or hold.
88
+
89
+ CAPAS is not for users who only need a faster simulator or generic workflow
90
+ lineage.
91
+
92
+ ## Hybrid Pipeline Role
93
+
94
+ CAPAS is the deterministic middle of a hybrid AI-for-science verification
95
+ pipeline:
96
+
97
+ ```text
98
+ LLM / extractor / scientific verifier upstream
99
+ -> claim + evidence JSON
100
+ -> CAPAS deterministic claim gate
101
+ -> ACCEPT / REWRITE / REJECT / HOLD
102
+ ```
103
+
104
+ CAPAS now includes an explicit upstream MVP for retrieval/parsing/alignment, but
105
+ the final decision remains deterministic. Local corpus retrieval, web retrieval
106
+ with `--allow-web`, and PDF parsing can prepare candidate evidence; they do not
107
+ silently invent missing evidence or turn CAPAS into a broad scientific oracle.
108
+
109
+ The standalone direction has started with a local upstream MVP:
110
+
111
+ ```text
112
+ local text / solver log / code excerpt
113
+ -> explicit evidence extraction
114
+ -> deterministic claim-text alignment
115
+ -> CAPAS claim gate
116
+ ```
117
+
118
+ It is intentionally explicit-only and deterministic. See
119
+ `docs/STANDALONE_PRODUCT_ROADMAP.md`.
120
+
121
+ ## External Review Packet
122
+
123
+ For reviewers and potential users:
124
+
125
+ - Technical note: `docs/CAPAS_TECHNICAL_NOTE.md`
126
+ - Request for feedback: `docs/REQUEST_FOR_FEEDBACK.md`
127
+ - QMB100 / PhysVEC one-pager: `docs/CAPAS_ONE_PAGER_QMB100.md`
128
+ - Global SotA / market audit: `docs/GLOBAL_SOTA_MARKET_AUDIT.md`
129
+ - Hybrid pipeline positioning: `docs/HYBRID_PIPELINE_POSITIONING.md`
130
+ - Input hardening notes: `docs/INPUT_HARDENING.md`
131
+ - Product scope and debt status: `docs/PRODUCT_SCOPE_AND_DEBTS.md`
132
+ - Public demo: `https://fomv9354lve.github.io/capas-inteligentes/`
133
+ - Current release: `https://github.com/fomv9354lve/capas-inteligentes/releases/tag/v0.1.1`
134
+ - Public feedback issue: `https://github.com/fomv9354lve/capas-inteligentes/issues/1`
135
+ - License: **Apache-2.0** (open-core); the CAPAS mark + official certification are reserved — see `LICENSE` and `NOTICE`.
136
+
137
+ The current validation question is not "is CAPAS broadly useful?" It is narrower:
138
+ do the explicit evidence fields help audit or exchange one scientific-agent
139
+ computation result, or are they already covered by existing artifacts?
140
+
141
+ ## Try In 60 Seconds
142
+
143
+ ```bash
144
+ python -m pip install -e .
145
+ capas decide --input examples/external_claim_rewrite.json
146
+ capas batch --input examples/external_claim_batch.json --json
147
+ capas provenance-check --input examples/external_claim_fine_tune_ready.json --json
148
+ capas pipeline --input examples/standalone_pipeline_semantic_hold.json
149
+ capas inspect trace_039
150
+ capas validate
151
+ ```
152
+
153
+ Expected behavior:
154
+
155
+ - `decide` returns `REWRITE` when local checks pass but a universal anchor fails.
156
+ - `batch` applies the same deterministic gate to multiple claim/evidence objects.
157
+ - `pipeline` can block a numeric `ACCEPT` when `claim.text` overstates the scope
158
+ of the evidence.
159
+ - `inspect trace_039` shows a motor-backed claim-transition trace.
160
+ - `validate` runs the product gates and profile/RO-Crate checks.
161
+
162
+ Release assets:
163
+
164
+ ```text
165
+ https://github.com/fomv9354lve/capas-inteligentes/releases/tag/v0.1.1
166
+ ```
167
+
168
+ ## Product Demo
169
+
170
+ Install the local package entrypoint:
171
+
172
+ ```bash
173
+ python -m pip install -e .
174
+ ```
175
+
176
+ Run the product surface:
177
+
178
+ ```bash
179
+ capas demo
180
+ python3 benchmarks/verify_capas_product_demo.py
181
+ ```
182
+
183
+ The demo writes:
184
+
185
+ - `outputs/capas_product_demo_report.json`
186
+ - `outputs/capas_product_demo_report.md`
187
+
188
+ It demonstrates the current product contract: CAPAS reads sealed scientific
189
+ computation traces and emits evidence-typed claim decisions
190
+ (`ACCEPT`, `REWRITE`, `REJECT`, `HOLD`) without marking the corpus as
191
+ fine-tune-ready.
192
+
193
+ Run the core product validators:
194
+
195
+ ```bash
196
+ capas validate
197
+ ```
198
+
199
+ Run the local integration API:
200
+
201
+ ```bash
202
+ CAPAS_API_TOKEN=change-me CAPAS_AUDIT_DIR=outputs/api-audit \
203
+ capas serve --host 127.0.0.1 --port 8765
204
+ curl -H "Authorization: Bearer change-me" http://127.0.0.1:8765/health
205
+ ```
206
+
207
+ The API is local and deterministic. It exposes `GET /health`,
208
+ `GET /decisions`, `POST /decide`, `POST /batch`, and
209
+ `POST /provenance-check`. `CAPAS_API_TOKEN` enables bearer-token auth;
210
+ `CAPAS_AUDIT_DIR` writes workspace-scoped JSONL decision logs keyed by
211
+ `X-CAPAS-Workspace`. It is not a hosted SaaS service.
212
+
213
+ The canonical payload schema is published in the static docs tree:
214
+
215
+ ```text
216
+ https://fomv9354lve.github.io/capas-inteligentes/schema/v3/capas_claim_payload.schema.json
217
+ ```
218
+
219
+ Enterprise integration notes live in:
220
+
221
+ - `docs/ENTERPRISE_INTEGRATION_PACK.md`
222
+ - `docs/PROVENANCE_REGISTRY_OPERATIONS.md`
223
+ - `docs/SECURITY_COMPLIANCE_APPENDIX.md`
224
+ - `docs/PILOT_ROI_BUSINESS_CASE.md`
225
+ - `docs/PAPER_INGESTION_CONNECTORS.md`
226
+ - `docs/UPSTREAM_GITHUB_ACTIONS_POLICY.md`
227
+ - `docs/DAILY_SOTA_UPDATE.md`
228
+
229
+ Run CAPAS in GitHub Actions:
230
+
231
+ ```yaml
232
+ jobs:
233
+ claim-gate:
234
+ runs-on: ubuntu-latest
235
+ steps:
236
+ - uses: actions/checkout@v4
237
+ - uses: actions/setup-python@v5
238
+ with:
239
+ python-version: "3.11"
240
+ - uses: ./.github/actions/capas-claim-gate
241
+ with:
242
+ mode: batch
243
+ input: examples/external_claim_batch.json
244
+ output: outputs/capas-action-report.json
245
+ ```
246
+
247
+ The manual workflow `.github/workflows/claim-gate.yml` runs a batch smoke check
248
+ through `workflow_dispatch`. Other workflows can reuse the composite action
249
+ directly with `mode: decide`, `mode: batch`, or `mode: pipeline`.
250
+
251
+ Inspect a trace:
252
+
253
+ ```bash
254
+ capas inspect trace_039
255
+ ```
256
+
257
+ Decide an external claim/evidence JSON:
258
+
259
+ ```bash
260
+ capas schema
261
+ capas check-input --input examples/external_claim_accept.json
262
+ capas decide --input examples/external_claim_accept.json
263
+ capas decide --input examples/external_claim_rewrite.json
264
+ capas decide --input examples/external_claim_hold.json
265
+ ```
266
+
267
+ Run the standalone upstream MVP:
268
+
269
+ ```bash
270
+ capas retrieve --input examples/standalone_pipeline_multisource.json
271
+ capas retrieve --input examples/standalone_pipeline_web_source.json --allow-web
272
+ capas extract --input examples/standalone_pipeline_accept.json
273
+ capas extract --input examples/standalone_pipeline_pdf_source.json
274
+ capas align --input examples/standalone_pipeline_semantic_hold.json
275
+ capas reason --input examples/standalone_pipeline_semantic_hold.json
276
+ capas pipeline --input examples/standalone_pipeline_semantic_hold.json
277
+ python3 benchmarks/verify_standalone_pipeline.py
278
+ ```
279
+
280
+ This is not broad scientific reasoning. It is local explicit parsing plus a
281
+ deterministic semantic-scope guard before the CAPAS gate.
282
+
283
+ `extract` also returns `evidence_spans` with `source_id`, line number, snippet,
284
+ and parser for each extracted field, so a reviewer can audit where the evidence
285
+ came from.
286
+
287
+ Local corpus retrieval accepts JSON, JSONL, text, Markdown, or a directory of
288
+ those files and returns auditable snippets matched to claim terms and required
289
+ evidence fields. Web retrieval is opt-in with `--allow-web`. Local PDF parsing
290
+ is supported when the optional standalone dependency is installed:
291
+
292
+ ```bash
293
+ python -m pip install -e ".[standalone]"
294
+ ```
295
+
296
+ If web permission or PDF parser support is missing, CAPAS records that as an
297
+ extraction note instead of silently inventing evidence.
298
+
299
+ The published MVP input contract is
300
+ `docs/schema/capas_claim_payload.schema.json`. `check-input` validates the
301
+ payload shape; `decide` then checks whether the supplied evidence licenses the
302
+ claim, needs a rewrite, contradicts it, or must hold.
303
+
304
+ Generate the static local UI:
305
+
306
+ ```bash
307
+ capas ui
308
+ python3 benchmarks/verify_claim_gate_ui.py
309
+ ```
310
+
311
+ The UI exposes ACCEPT, REWRITE, REJECT, HOLD, and INVALID samples.
312
+ Structurally invalid payloads are shown as `HOLD` with `schema_errors`,
313
+ matching `capas decide`. It also supports batch evaluation for JSON arrays or
314
+ objects with `items` / `claims`, displays `schema v3` for audit trails, and
315
+ includes a keyboard help modal with the main shortcuts and pipeline scope.
316
+
317
+ Schema v3 supports 11 deterministic claim types, including causal mechanism,
318
+ systematic review, evidence conflict, and multimodal evidence gates.
319
+
320
+ Prepare a non-mutating GitHub release plan:
321
+
322
+ ```bash
323
+ python3 scripts/publish_github_release.py
324
+ ```
325
+
326
+ Publishing a new release still requires a GitHub remote, valid `gh auth`, a
327
+ pushed tag, a passing external CI run, and a GitHub release URL.
328
+
329
+ The public v0.1.1 release is available at:
330
+
331
+ ```text
332
+ https://github.com/fomv9354lve/capas-inteligentes/releases/tag/v0.1.1
333
+ ```
334
+
335
+ Prepare/check external reviewer feedback:
336
+
337
+ ```bash
338
+ python3 benchmarks/verify_external_user_validation.py
339
+ ```
340
+
341
+ The feedback template is `examples/external_reviewer_feedback_template.json`.
342
+ Completed external feedback belongs under `outputs/external_validation/`.
343
+
344
+ ## What It Produces
345
+
346
+ The corpus builder emits:
347
+
348
+ - sealed JSON traces: `benchmarks/gold_traces/*.json`
349
+ - W3C PROV-shaped exports: `benchmarks/gold_traces/*.prov.json`
350
+ - RO-Crate metadata: `benchmarks/ro_crates/*/ro-crate-metadata.json`
351
+ - audit table: `audits/gold_trace_audit_template.csv`
352
+
353
+ ## Evidence Fields
354
+
355
+ CAPAS adds domain evidence fields over standard provenance:
356
+
357
+ - `physical_evidence_level`
358
+ - `verification_independence`
359
+ - `witness_stack`
360
+ - `reference_truth`
361
+ - `evidenceStatus`
362
+ - `abs_error`
363
+ - `expected`
364
+ - `value`
365
+ - `observable`
366
+ - `local_property_tests`
367
+ - `universal_anchor`
368
+ - `invariant_caught`
369
+ - `claim_scope`
370
+
371
+ The important distinction is that not all traces are training gold. Some traces
372
+ exist to prove the format can honestly represent uncertainty, failure, or
373
+ rejection.
374
+
375
+ ## Validate The Published Evidence Corpus
376
+
377
+ Use a Python environment that has the declared public corpus stack available.
378
+ Check it first:
379
+
380
+ ```bash
381
+ python3 scripts/check_reproducibility_env.py
382
+ ```
383
+
384
+ The public repository ships the evidence traces and validators. Private/local
385
+ scientific engines used during exploratory corpus generation are intentionally
386
+ not packaged in the public release. The public command runs:
387
+
388
+ 1. RO-Crate validation
389
+ 2. CAPAS physical-evidence profile validation
390
+ 3. witness independence validation
391
+ 4. evidence claim validation
392
+ 5. universal anchor matrix validation
393
+ 6. audit summary
394
+
395
+ ```bash
396
+ python3 scripts/build_evidence_corpus.py
397
+ ```
398
+
399
+ `coverage_ready=True` is expected. `fine_tune_ready=False` is also expected until
400
+ blind inference review is completed.
401
+
402
+ ## Validate RO-Crate Coverage
403
+
404
+ ```bash
405
+ python3 benchmarks/validate_ro_crates.py
406
+ ```
407
+
408
+ The validator checks that evidence is present where it should be and absent where
409
+ it would be dishonest:
410
+
411
+ - analytic success: `present`
412
+ - cross-sim success: `present`
413
+ - no-evidence success: `none_declared`
414
+ - backend failure: `not_applicable_failed`
415
+ - router rejection: `not_applicable_rejected`
416
+
417
+ ## Validate CAPAS Physical Evidence Profile
418
+
419
+ ```bash
420
+ python3 benchmarks/validate_capas_profile.py
421
+ ```
422
+
423
+ This checks the local CAPAS profile over Workflow Run RO-Crate-style crates:
424
+ WRROC profile URIs, `ComputationalWorkflow`, top-level `CreateAction`, parameter
425
+ realization, `capas:evidenceStatus`, and `capas:PhysicalEvidence` semantics.
426
+ This is a local profile validator, not official profile registration.
427
+
428
+ ## External RO-Crate Validation
429
+
430
+ ```bash
431
+ python3 -m pip install -r requirements-validation.txt
432
+ python3 benchmarks/validate_ro_crates_external.py
433
+ ```
434
+
435
+ This uses the ResearchObject `rocrateValidator` package and writes
436
+ `benchmarks/ro_crates/official_validation_report.json`. Current crates validate
437
+ as RO-Crates without warnings. CAPAS emits a recognized `.cwl` workflow
438
+ descriptor for packaging and records Python as the implementation language for
439
+ the costurero.
440
+
441
+ ## Positioning
442
+
443
+ See:
444
+
445
+ - `docs/PROJECT_DASHBOARD.md`
446
+ - `docs/REPRODUCIBILITY.md`
447
+ - `docs/SOTA_POSITIONING.md`
448
+ - `docs/SOTA_DAILY_WATCH.md`
449
+ - `docs/DAILY_SOTA_UPDATE.md`
450
+ - `docs/WORKFLOW_RUN_RO_CRATE_ALIGNMENT.md`
451
+ - `docs/profile/CAPAS_PHYSICAL_EVIDENCE_PROFILE.md`
452
+ - `docs/FORMAL_BOUND_AXIS.md`
453
+ - `docs/WITNESS_INDEPENDENCE_AXIS.md`
454
+ - `docs/OPTIMIZATION_BRIDGE.md`
455
+ - `docs/EXPERIMENTAL_EVIDENCE_AXIS.md`
456
+ - `docs/UNIVERSAL_INVARIANT_ANCHORING.md`
457
+ - `docs/METAMORPHIC_TESTING_POSITIONING.md`
458
+ - `docs/SCIAGENTGYM_AUDIT.md`
459
+ - `docs/QMB100_AUDIT.md`
460
+ - `docs/VVUQ_QUANTUM_AUDIT.md`
461
+ - `docs/COVERAGE.md`
462
+ - `docs/EXTERNAL_MVP_LAUNCH_PLAN.md`
463
+
464
+ Short defensible claim:
465
+
466
+ > CAPAS is an evidence-typed claim gate over scientific-computation traces: it
467
+ > reads or packages provenance-aligned evidence and decides whether that evidence
468
+ > licenses ACCEPT, REWRITE, REJECT, or HOLD.