ref-verify 1.1.2__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.
- ref_verify-1.1.2/LICENSE +21 -0
- ref_verify-1.1.2/PKG-INFO +250 -0
- ref_verify-1.1.2/README.md +239 -0
- ref_verify-1.1.2/pyproject.toml +21 -0
- ref_verify-1.1.2/setup.cfg +4 -0
- ref_verify-1.1.2/src/ref_verify/__init__.py +5 -0
- ref_verify-1.1.2/src/ref_verify/abstract_lookup.py +226 -0
- ref_verify-1.1.2/src/ref_verify/claim_check.py +876 -0
- ref_verify-1.1.2/src/ref_verify/cli.py +162 -0
- ref_verify-1.1.2/src/ref_verify/crossref.py +89 -0
- ref_verify-1.1.2/src/ref_verify/doi_check.py +191 -0
- ref_verify-1.1.2/src/ref_verify/models.py +89 -0
- ref_verify-1.1.2/src/ref_verify/numeric_claim.py +425 -0
- ref_verify-1.1.2/src/ref_verify/pubmed.py +156 -0
- ref_verify-1.1.2/src/ref_verify/semantic_scholar.py +80 -0
- ref_verify-1.1.2/src/ref_verify.egg-info/PKG-INFO +250 -0
- ref_verify-1.1.2/src/ref_verify.egg-info/SOURCES.txt +26 -0
- ref_verify-1.1.2/src/ref_verify.egg-info/dependency_links.txt +1 -0
- ref_verify-1.1.2/src/ref_verify.egg-info/entry_points.txt +2 -0
- ref_verify-1.1.2/src/ref_verify.egg-info/top_level.txt +1 -0
- ref_verify-1.1.2/tests/test_abstract_sources.py +105 -0
- ref_verify-1.1.2/tests/test_claim_check.py +1164 -0
- ref_verify-1.1.2/tests/test_cli.py +1884 -0
- ref_verify-1.1.2/tests/test_crossref.py +79 -0
- ref_verify-1.1.2/tests/test_doi_check.py +300 -0
- ref_verify-1.1.2/tests/test_numeric_claim.py +88 -0
- ref_verify-1.1.2/tests/test_package_smoke.py +35 -0
- ref_verify-1.1.2/tests/test_skill_docs.py +259 -0
ref_verify-1.1.2/LICENSE
ADDED
|
@@ -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,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,239 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<img src="https://raw.githubusercontent.com/Moonweave-Research/ref-verify/main/.github/assets/ref-verify-mark-512.png" alt="ref-verify mark" width="96">
|
|
4
|
+
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
# ref-verify
|
|
8
|
+
|
|
9
|
+
[English](https://github.com/Moonweave-Research/ref-verify/blob/main/README.md) | [한국어](https://github.com/Moonweave-Research/ref-verify/blob/main/README.ko.md)
|
|
10
|
+
|
|
11
|
+
**Stop citing papers that do not say what you think they say.**
|
|
12
|
+
|
|
13
|
+
`ref-verify` is an agent skill for citation verification. It helps Claude Code,
|
|
14
|
+
Cursor, Codex, and other skill-aware agents check references before they land in
|
|
15
|
+
your draft.
|
|
16
|
+
|
|
17
|
+
Use it when you want an agent to find papers, verify a DOI, check whether a paper
|
|
18
|
+
supports a specific claim, or audit references before submission. No server setup is required.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Install the skill
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# requires npx (comes with Node.js)
|
|
26
|
+
npx skills add Moonweave-Research/ref-verify -g \
|
|
27
|
+
--skill ref-verify \
|
|
28
|
+
--agent claude-code cursor codex \
|
|
29
|
+
-y
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Works with **Claude Code, Cursor, Codex**, and any agent that supports the
|
|
33
|
+
`npx skills` ecosystem.
|
|
34
|
+
|
|
35
|
+
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.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Use it
|
|
40
|
+
|
|
41
|
+
Ask naturally:
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
verify these citations before I submit: [DOI list]
|
|
45
|
+
does this paper actually support the claim "actuation strain above 100%"?
|
|
46
|
+
find 3 papers supporting the claim that X, and verify each citation
|
|
47
|
+
check doi 10.1126/science.287.5454.836 against this title and year
|
|
48
|
+
audit all my references before submission
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
`ref-verify` stays quiet for general topic questions, prose editing, APA/IEEE
|
|
52
|
+
formatting, and citation style questions.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Optional CLI engine
|
|
57
|
+
|
|
58
|
+
The skill is the agent workflow. The Python CLI is the skill-level execution engine that the installed skill can call from a terminal.
|
|
59
|
+
|
|
60
|
+
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.
|
|
61
|
+
|
|
62
|
+
This is a skill/plugin-level workflow, not an MCP server. The CLI covers the
|
|
63
|
+
checks that are currently safe to automate directly:
|
|
64
|
+
|
|
65
|
+
- CrossRef metadata check: `ref-verify verify-doi`
|
|
66
|
+
- DOI-bound abstract claim check: `ref-verify check-claim`
|
|
67
|
+
- literal text claims
|
|
68
|
+
- subject-matched percentage claims such as efficiency, response rate, or actuation strain
|
|
69
|
+
- simple unit/count claims such as cycles, patients, voltage, temperature, and concentration
|
|
70
|
+
- CrossRef first, then DOI-bound Semantic Scholar and PubMed fallback when CrossRef has no abstract
|
|
71
|
+
- JSON output for agent-readable routing
|
|
72
|
+
- Non-zero exit codes for `WARN`, `REJECT`, and `UNVERIFIABLE` results
|
|
73
|
+
|
|
74
|
+
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`.
|
|
75
|
+
|
|
76
|
+
The CLI has zero third-party Python runtime dependencies, but it is not an
|
|
77
|
+
offline verifier. Functional checks require outbound HTTPS access to public
|
|
78
|
+
academic APIs such as CrossRef, Semantic Scholar, and PubMed.
|
|
79
|
+
|
|
80
|
+
Install the CLI from a local checkout:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
git clone https://github.com/Moonweave-Research/ref-verify.git
|
|
84
|
+
cd ref-verify
|
|
85
|
+
python3 -m pip install -e .
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Check whether the CLI is available:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
ref-verify --help
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
If you are working from an uninstalled source checkout, use the module
|
|
95
|
+
entrypoint:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
PYTHONPATH=src python3 -m ref_verify.cli --help
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Run a DOI metadata check:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
ref-verify verify-doi 10.1126/science.287.5454.836 \
|
|
105
|
+
--title "High-Speed Electrically Actuated Elastomers with Strain Greater Than 100%" \
|
|
106
|
+
--first-author Pelrine \
|
|
107
|
+
--year 2000 \
|
|
108
|
+
--json
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Run a DOI-bound abstract claim check:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
ref-verify check-claim 10.1126/science.287.5454.836 \
|
|
115
|
+
--claim "actuation strain above 100%" \
|
|
116
|
+
--json
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
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.
|
|
120
|
+
|
|
121
|
+
Source-checkout equivalents:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
PYTHONPATH=src python3 -m ref_verify.cli verify-doi 10.1126/science.287.5454.836 \
|
|
125
|
+
--title "High-Speed Electrically Actuated Elastomers with Strain Greater Than 100%" \
|
|
126
|
+
--first-author Pelrine \
|
|
127
|
+
--year 2000 \
|
|
128
|
+
--json
|
|
129
|
+
|
|
130
|
+
PYTHONPATH=src python3 -m ref_verify.cli check-claim 10.1126/science.287.5454.836 \
|
|
131
|
+
--claim "actuation strain above 100%" \
|
|
132
|
+
--json
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
For local development, run:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
PYTHONPATH=src python3 -m unittest discover -s tests -v
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Release safety checks also build the Python package, validate metadata, and
|
|
142
|
+
install the built wheel in a fresh virtualenv before publishing. Live checks
|
|
143
|
+
against public academic APIs are kept in a manual GitHub Actions workflow so
|
|
144
|
+
normal CI does not fail because an upstream API is temporarily unavailable.
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## What it catches
|
|
149
|
+
|
|
150
|
+
| Problem | What happens without ref-verify |
|
|
151
|
+
|---|---|
|
|
152
|
+
| **Wrong DOI** | An agent lists a plausible DOI that resolves to a different paper |
|
|
153
|
+
| **Wrong authors** | A citation says "Smith et al. (2020)", but CrossRef shows one author |
|
|
154
|
+
| **Wrong year** | The paper was published in 2008, but the draft says 2011 |
|
|
155
|
+
| **Made-up content** | The draft says a paper shows a result that is not in the abstract |
|
|
156
|
+
| **Near-miss citation** | The right number appears, but in the wrong context |
|
|
157
|
+
| **Retracted paper** | The DOI is valid, but the paper was retracted |
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Modes
|
|
162
|
+
|
|
163
|
+
**Quick Screen** is for DOIs you already have. It uses CrossRef to compare the
|
|
164
|
+
provided DOI, title, first-author surname, and year.
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
ref-verify verify-doi <doi> --title "<title>" --first-author <last-name> --year <year> --json
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
`verify-doi` exits `0` only for `PASS`. `WARN` and `REJECT` return a non-zero
|
|
171
|
+
exit code, so weak or mismatched metadata cannot silently pass automation gates.
|
|
172
|
+
|
|
173
|
+
**Full Audit** is for literature search and final pre-submission review. The
|
|
174
|
+
skill fetches abstracts through CrossRef, Semantic Scholar, Unpaywall, arXiv,
|
|
175
|
+
and PubMed where needed, then checks whether the paper supports the specific
|
|
176
|
+
claim being cited.
|
|
177
|
+
|
|
178
|
+
For a single DOI-backed claim, the CLI can run the abstract check:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
ref-verify check-claim <doi> --claim "<specific claim>" --json
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
`check-claim` exits `0` only for `ACCEPT`. `WARN`, `PARTIAL`, and
|
|
185
|
+
`UNVERIFIABLE` return a non-zero exit code. JSON output includes
|
|
186
|
+
`abstract_source`, `source_attempts`, and `error_code` so agents can distinguish
|
|
187
|
+
missing abstracts, source failures, DOI mismatches, and ambiguous evidence.
|
|
188
|
+
|
|
189
|
+
Current `check-claim` error codes:
|
|
190
|
+
|
|
191
|
+
- `CLAIM_SUPPORTED`: explicit abstract support found.
|
|
192
|
+
- `CLAIM_NOT_EXPLICIT`: an abstract was available, but the claim was not explicitly supported.
|
|
193
|
+
- `CLAIM_AMBIGUOUS`: numeric evidence or context exists, but binding is ambiguous.
|
|
194
|
+
- `NO_ABSTRACT`: attempted DOI-bound sources did not provide abstract text.
|
|
195
|
+
- `DOI_NOT_FOUND`: selected source did not find a DOI-bound record.
|
|
196
|
+
- `DOI_MISMATCH`: the primary or explicitly selected DOI-bound record did not match the requested DOI.
|
|
197
|
+
- `SOURCE_API_ERROR`, `SOURCE_TIMEOUT`, `SOURCE_UNSUPPORTED`: source lookup failed or could not be used.
|
|
198
|
+
|
|
199
|
+
> Core rule: every content statement about a paper must come from a live-fetched
|
|
200
|
+
> abstract. If the abstract is inaccessible after fallback checks, say
|
|
201
|
+
> `UNVERIFIABLE`. Do not fill the gap from memory.
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Examples
|
|
206
|
+
|
|
207
|
+
**Checking citations you already have**
|
|
208
|
+
|
|
209
|
+
```text
|
|
210
|
+
User: "verify these 3 citations before I submit"
|
|
211
|
+
|
|
212
|
+
Shahinpoor & Kim (2001) 10.1088/0964-1726/10/4/327 - PASS
|
|
213
|
+
Bar-Cohen (2004) 10.1117/3.547465 - WARN (listed as author; CrossRef: editor)
|
|
214
|
+
Carpi et al. (2011) 10.1016/B978-0-08-047488-5.00001-0 - REJECT
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
**Checking a specific claim**
|
|
218
|
+
|
|
219
|
+
```text
|
|
220
|
+
User: "does the Pelrine 2000 paper actually say DEAs reach over 100% strain?"
|
|
221
|
+
|
|
222
|
+
CONTENT: Supported
|
|
223
|
+
"Actuated strains up to 117% were demonstrated with silicone elastomers,
|
|
224
|
+
and up to 215% with acrylic elastomers."
|
|
225
|
+
[Source: CrossRef raw JSON, not recalled from memory]
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
**Near-miss citation**
|
|
229
|
+
|
|
230
|
+
A candidate paper may contain "500% strain", but the abstract can show that the
|
|
231
|
+
number is a pre-strain condition, not an actuation result. `ref-verify` reports
|
|
232
|
+
that as `WARN (PARTIAL)` instead of accepting the citation.
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## Related
|
|
237
|
+
|
|
238
|
+
- [anneal-skill](https://github.com/Moonweave-Systems/anneal-skill) - measure-first decision discipline for AI agents
|
|
239
|
+
- [decide-skill](https://github.com/Moonweave-Systems/decide-skill) - decision automation for non-expert domains
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "ref-verify"
|
|
7
|
+
version = "1.1.2"
|
|
8
|
+
description = "Executable DOI and claim verification helpers for academic citations"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
authors = [
|
|
13
|
+
{name = "Moonweave Research"}
|
|
14
|
+
]
|
|
15
|
+
dependencies = []
|
|
16
|
+
|
|
17
|
+
[project.scripts]
|
|
18
|
+
ref-verify = "ref_verify.cli:main"
|
|
19
|
+
|
|
20
|
+
[tool.setuptools.packages.find]
|
|
21
|
+
where = ["src"]
|