ref-verify 1.1.2__py3-none-any.whl

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.
@@ -0,0 +1,250 @@
1
+ Metadata-Version: 2.4
2
+ Name: ref-verify
3
+ Version: 1.1.2
4
+ Summary: Executable DOI and claim verification helpers for academic citations
5
+ Author: Moonweave Research
6
+ License-Expression: MIT
7
+ Requires-Python: >=3.10
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE
10
+ Dynamic: license-file
11
+
12
+ <div align="center">
13
+
14
+ <img src="https://raw.githubusercontent.com/Moonweave-Research/ref-verify/main/.github/assets/ref-verify-mark-512.png" alt="ref-verify mark" width="96">
15
+
16
+ </div>
17
+
18
+ # ref-verify
19
+
20
+ [English](https://github.com/Moonweave-Research/ref-verify/blob/main/README.md) | [한국어](https://github.com/Moonweave-Research/ref-verify/blob/main/README.ko.md)
21
+
22
+ **Stop citing papers that do not say what you think they say.**
23
+
24
+ `ref-verify` is an agent skill for citation verification. It helps Claude Code,
25
+ Cursor, Codex, and other skill-aware agents check references before they land in
26
+ your draft.
27
+
28
+ Use it when you want an agent to find papers, verify a DOI, check whether a paper
29
+ supports a specific claim, or audit references before submission. No server setup is required.
30
+
31
+ ---
32
+
33
+ ## Install the skill
34
+
35
+ ```bash
36
+ # requires npx (comes with Node.js)
37
+ npx skills add Moonweave-Research/ref-verify -g \
38
+ --skill ref-verify \
39
+ --agent claude-code cursor codex \
40
+ -y
41
+ ```
42
+
43
+ Works with **Claude Code, Cursor, Codex**, and any agent that supports the
44
+ `npx skills` ecosystem.
45
+
46
+ After installation, use it like a normal agent skill. You do not start a server and you do not configure MCP for this workflow. No MCP server is required for this workflow.
47
+
48
+ ---
49
+
50
+ ## Use it
51
+
52
+ Ask naturally:
53
+
54
+ ```text
55
+ verify these citations before I submit: [DOI list]
56
+ does this paper actually support the claim "actuation strain above 100%"?
57
+ find 3 papers supporting the claim that X, and verify each citation
58
+ check doi 10.1126/science.287.5454.836 against this title and year
59
+ audit all my references before submission
60
+ ```
61
+
62
+ `ref-verify` stays quiet for general topic questions, prose editing, APA/IEEE
63
+ formatting, and citation style questions.
64
+
65
+ ---
66
+
67
+ ## Optional CLI engine
68
+
69
+ The skill is the agent workflow. The Python CLI is the skill-level execution engine that the installed skill can call from a terminal.
70
+
71
+ The Python package is CLI-only. It does not install `SKILL.md`; install the agent skill from GitHub with `npx skills add` as shown above.
72
+
73
+ This is a skill/plugin-level workflow, not an MCP server. The CLI covers the
74
+ checks that are currently safe to automate directly:
75
+
76
+ - CrossRef metadata check: `ref-verify verify-doi`
77
+ - DOI-bound abstract claim check: `ref-verify check-claim`
78
+ - literal text claims
79
+ - subject-matched percentage claims such as efficiency, response rate, or actuation strain
80
+ - simple unit/count claims such as cycles, patients, voltage, temperature, and concentration
81
+ - CrossRef first, then DOI-bound Semantic Scholar and PubMed fallback when CrossRef has no abstract
82
+ - JSON output for agent-readable routing
83
+ - Non-zero exit codes for `WARN`, `REJECT`, and `UNVERIFIABLE` results
84
+
85
+ Statistical metrics such as p-values, AUC/AUROC, F1 score, hazard ratio, odds ratio, and confidence intervals still use the manual skill protocol. DOI landing-page checks still use the skill protocol. Still handled by the skill protocol: Unpaywall, arXiv, two-source existence checks, and retraction checks remain in `SKILL.md`.
86
+
87
+ The CLI has zero third-party Python runtime dependencies, but it is not an
88
+ offline verifier. Functional checks require outbound HTTPS access to public
89
+ academic APIs such as CrossRef, Semantic Scholar, and PubMed.
90
+
91
+ Install the CLI from a local checkout:
92
+
93
+ ```bash
94
+ git clone https://github.com/Moonweave-Research/ref-verify.git
95
+ cd ref-verify
96
+ python3 -m pip install -e .
97
+ ```
98
+
99
+ Check whether the CLI is available:
100
+
101
+ ```bash
102
+ ref-verify --help
103
+ ```
104
+
105
+ If you are working from an uninstalled source checkout, use the module
106
+ entrypoint:
107
+
108
+ ```bash
109
+ PYTHONPATH=src python3 -m ref_verify.cli --help
110
+ ```
111
+
112
+ Run a DOI metadata check:
113
+
114
+ ```bash
115
+ ref-verify verify-doi 10.1126/science.287.5454.836 \
116
+ --title "High-Speed Electrically Actuated Elastomers with Strain Greater Than 100%" \
117
+ --first-author Pelrine \
118
+ --year 2000 \
119
+ --json
120
+ ```
121
+
122
+ Run a DOI-bound abstract claim check:
123
+
124
+ ```bash
125
+ ref-verify check-claim 10.1126/science.287.5454.836 \
126
+ --claim "actuation strain above 100%" \
127
+ --json
128
+ ```
129
+
130
+ By default, `check-claim` uses CrossRef first. If CrossRef has no abstract, it tries DOI-bound Semantic Scholar and PubMed fallback sources. Use `--source crossref`, `--source semantic-scholar`, or `--source pubmed` for source-specific debugging; explicit non-CrossRef source selection bypasses CrossRef.
131
+
132
+ Source-checkout equivalents:
133
+
134
+ ```bash
135
+ PYTHONPATH=src python3 -m ref_verify.cli verify-doi 10.1126/science.287.5454.836 \
136
+ --title "High-Speed Electrically Actuated Elastomers with Strain Greater Than 100%" \
137
+ --first-author Pelrine \
138
+ --year 2000 \
139
+ --json
140
+
141
+ PYTHONPATH=src python3 -m ref_verify.cli check-claim 10.1126/science.287.5454.836 \
142
+ --claim "actuation strain above 100%" \
143
+ --json
144
+ ```
145
+
146
+ For local development, run:
147
+
148
+ ```bash
149
+ PYTHONPATH=src python3 -m unittest discover -s tests -v
150
+ ```
151
+
152
+ Release safety checks also build the Python package, validate metadata, and
153
+ install the built wheel in a fresh virtualenv before publishing. Live checks
154
+ against public academic APIs are kept in a manual GitHub Actions workflow so
155
+ normal CI does not fail because an upstream API is temporarily unavailable.
156
+
157
+ ---
158
+
159
+ ## What it catches
160
+
161
+ | Problem | What happens without ref-verify |
162
+ |---|---|
163
+ | **Wrong DOI** | An agent lists a plausible DOI that resolves to a different paper |
164
+ | **Wrong authors** | A citation says "Smith et al. (2020)", but CrossRef shows one author |
165
+ | **Wrong year** | The paper was published in 2008, but the draft says 2011 |
166
+ | **Made-up content** | The draft says a paper shows a result that is not in the abstract |
167
+ | **Near-miss citation** | The right number appears, but in the wrong context |
168
+ | **Retracted paper** | The DOI is valid, but the paper was retracted |
169
+
170
+ ---
171
+
172
+ ## Modes
173
+
174
+ **Quick Screen** is for DOIs you already have. It uses CrossRef to compare the
175
+ provided DOI, title, first-author surname, and year.
176
+
177
+ ```bash
178
+ ref-verify verify-doi <doi> --title "<title>" --first-author <last-name> --year <year> --json
179
+ ```
180
+
181
+ `verify-doi` exits `0` only for `PASS`. `WARN` and `REJECT` return a non-zero
182
+ exit code, so weak or mismatched metadata cannot silently pass automation gates.
183
+
184
+ **Full Audit** is for literature search and final pre-submission review. The
185
+ skill fetches abstracts through CrossRef, Semantic Scholar, Unpaywall, arXiv,
186
+ and PubMed where needed, then checks whether the paper supports the specific
187
+ claim being cited.
188
+
189
+ For a single DOI-backed claim, the CLI can run the abstract check:
190
+
191
+ ```bash
192
+ ref-verify check-claim <doi> --claim "<specific claim>" --json
193
+ ```
194
+
195
+ `check-claim` exits `0` only for `ACCEPT`. `WARN`, `PARTIAL`, and
196
+ `UNVERIFIABLE` return a non-zero exit code. JSON output includes
197
+ `abstract_source`, `source_attempts`, and `error_code` so agents can distinguish
198
+ missing abstracts, source failures, DOI mismatches, and ambiguous evidence.
199
+
200
+ Current `check-claim` error codes:
201
+
202
+ - `CLAIM_SUPPORTED`: explicit abstract support found.
203
+ - `CLAIM_NOT_EXPLICIT`: an abstract was available, but the claim was not explicitly supported.
204
+ - `CLAIM_AMBIGUOUS`: numeric evidence or context exists, but binding is ambiguous.
205
+ - `NO_ABSTRACT`: attempted DOI-bound sources did not provide abstract text.
206
+ - `DOI_NOT_FOUND`: selected source did not find a DOI-bound record.
207
+ - `DOI_MISMATCH`: the primary or explicitly selected DOI-bound record did not match the requested DOI.
208
+ - `SOURCE_API_ERROR`, `SOURCE_TIMEOUT`, `SOURCE_UNSUPPORTED`: source lookup failed or could not be used.
209
+
210
+ > Core rule: every content statement about a paper must come from a live-fetched
211
+ > abstract. If the abstract is inaccessible after fallback checks, say
212
+ > `UNVERIFIABLE`. Do not fill the gap from memory.
213
+
214
+ ---
215
+
216
+ ## Examples
217
+
218
+ **Checking citations you already have**
219
+
220
+ ```text
221
+ User: "verify these 3 citations before I submit"
222
+
223
+ Shahinpoor & Kim (2001) 10.1088/0964-1726/10/4/327 - PASS
224
+ Bar-Cohen (2004) 10.1117/3.547465 - WARN (listed as author; CrossRef: editor)
225
+ Carpi et al. (2011) 10.1016/B978-0-08-047488-5.00001-0 - REJECT
226
+ ```
227
+
228
+ **Checking a specific claim**
229
+
230
+ ```text
231
+ User: "does the Pelrine 2000 paper actually say DEAs reach over 100% strain?"
232
+
233
+ CONTENT: Supported
234
+ "Actuated strains up to 117% were demonstrated with silicone elastomers,
235
+ and up to 215% with acrylic elastomers."
236
+ [Source: CrossRef raw JSON, not recalled from memory]
237
+ ```
238
+
239
+ **Near-miss citation**
240
+
241
+ A candidate paper may contain "500% strain", but the abstract can show that the
242
+ number is a pre-strain condition, not an actuation result. `ref-verify` reports
243
+ that as `WARN (PARTIAL)` instead of accepting the citation.
244
+
245
+ ---
246
+
247
+ ## Related
248
+
249
+ - [anneal-skill](https://github.com/Moonweave-Systems/anneal-skill) - measure-first decision discipline for AI agents
250
+ - [decide-skill](https://github.com/Moonweave-Systems/decide-skill) - decision automation for non-expert domains
@@ -0,0 +1,16 @@
1
+ ref_verify/__init__.py,sha256=Jm0lbsBYq4-br0hNhw1OMAJB2MsIBdpWPrMHYbp85iw,99
2
+ ref_verify/abstract_lookup.py,sha256=Mh2bgTu7xSRw7uKQpLigjMmWIKVOdq93zlcKez_h9-M,7017
3
+ ref_verify/claim_check.py,sha256=DCs7bGcUtfO3qnOVK9_4YqTH3zdd095JrLOnfaqn7Ws,26859
4
+ ref_verify/cli.py,sha256=A_JK1BiOcYDZezMXorj8vkNjV5-xpAqOnRRnmTVufCQ,5540
5
+ ref_verify/crossref.py,sha256=tWjG4hnllPt4Dlhpb7NFmBWVRmzAnNKT59EgkbflMG0,2747
6
+ ref_verify/doi_check.py,sha256=264kPgykm8F4D9zxFHPqYzAbbMjp4hSHnGV7h1QmzQ8,5437
7
+ ref_verify/models.py,sha256=EiDeyi0cM684sIMDPoFywxR9GtIw_w2sbzu8vC8O0uw,2022
8
+ ref_verify/numeric_claim.py,sha256=St8bm5eirRIp8Q4MebLcTmYGRba61ZnqQ4v_3S0eCDA,12347
9
+ ref_verify/pubmed.py,sha256=vbaaM5ejEyPTuISmY7QhiOE8xncjQ1_zEW1pb4faqbI,5327
10
+ ref_verify/semantic_scholar.py,sha256=Pr_PpnveiH_YatN0H4SQM1Zz8ugtPXn5mCNuVZ8VIXI,2621
11
+ ref_verify-1.1.2.dist-info/licenses/LICENSE,sha256=uZ5ZIu3Cx5nVV641xe6rgSJupVjNjlaqSO8ABBYwszo,1066
12
+ ref_verify-1.1.2.dist-info/METADATA,sha256=FYhFF_FOo3cvXeUfpALTiTY3BzQT1h6t2cwJu15L40w,9054
13
+ ref_verify-1.1.2.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
14
+ ref_verify-1.1.2.dist-info/entry_points.txt,sha256=wMEGAfo40OKemy5PW_y0Pzd7WV4RjoxzEsXA84WdPEw,51
15
+ ref_verify-1.1.2.dist-info/top_level.txt,sha256=HD2I-ieUGdnXw8U-c9v8yBJemZyVOXkO8MWO8dJHv34,11
16
+ ref_verify-1.1.2.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ ref-verify = ref_verify.cli:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 moonweave
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ ref_verify