sub-checker 0.1.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.
- sub_checker-0.1.0/LICENSE +21 -0
- sub_checker-0.1.0/PKG-INFO +193 -0
- sub_checker-0.1.0/README.md +152 -0
- sub_checker-0.1.0/pyproject.toml +107 -0
- sub_checker-0.1.0/setup.cfg +4 -0
- sub_checker-0.1.0/src/sub_checker/__init__.py +3 -0
- sub_checker-0.1.0/src/sub_checker/agents/__init__.py +0 -0
- sub_checker-0.1.0/src/sub_checker/agents/base.py +448 -0
- sub_checker-0.1.0/src/sub_checker/agents/citation_claim.py +142 -0
- sub_checker-0.1.0/src/sub_checker/agents/citation_exist.py +100 -0
- sub_checker-0.1.0/src/sub_checker/agents/citation_format.py +94 -0
- sub_checker-0.1.0/src/sub_checker/agents/figure_table.py +62 -0
- sub_checker-0.1.0/src/sub_checker/agents/journal_guidelines.py +110 -0
- sub_checker-0.1.0/src/sub_checker/agents/logic.py +45 -0
- sub_checker-0.1.0/src/sub_checker/agents/typo_grammar.py +58 -0
- sub_checker-0.1.0/src/sub_checker/api.py +239 -0
- sub_checker-0.1.0/src/sub_checker/cli.py +195 -0
- sub_checker-0.1.0/src/sub_checker/config.py +113 -0
- sub_checker-0.1.0/src/sub_checker/env.py +23 -0
- sub_checker-0.1.0/src/sub_checker/eval_runner.py +319 -0
- sub_checker-0.1.0/src/sub_checker/harness/__init__.py +0 -0
- sub_checker-0.1.0/src/sub_checker/harness/dedup.py +86 -0
- sub_checker-0.1.0/src/sub_checker/harness/deterministic.py +284 -0
- sub_checker-0.1.0/src/sub_checker/harness/reviewer.py +409 -0
- sub_checker-0.1.0/src/sub_checker/i18n.py +98 -0
- sub_checker-0.1.0/src/sub_checker/logging_config.py +175 -0
- sub_checker-0.1.0/src/sub_checker/models.py +98 -0
- sub_checker-0.1.0/src/sub_checker/orchestrator.py +278 -0
- sub_checker-0.1.0/src/sub_checker/parsers/__init__.py +0 -0
- sub_checker-0.1.0/src/sub_checker/parsers/docx_parser.py +185 -0
- sub_checker-0.1.0/src/sub_checker/pipeline.py +73 -0
- sub_checker-0.1.0/src/sub_checker/reporters/__init__.py +0 -0
- sub_checker-0.1.0/src/sub_checker/reporters/html_reporter.py +531 -0
- sub_checker-0.1.0/src/sub_checker/reporters/json_reporter.py +55 -0
- sub_checker-0.1.0/src/sub_checker/reporters/markdown_reporter.py +60 -0
- sub_checker-0.1.0/src/sub_checker/reporters/terminal.py +71 -0
- sub_checker-0.1.0/src/sub_checker/services/__init__.py +0 -0
- sub_checker-0.1.0/src/sub_checker/services/citation_verifier.py +331 -0
- sub_checker-0.1.0/src/sub_checker/services/crossref.py +106 -0
- sub_checker-0.1.0/src/sub_checker/services/http_client.py +159 -0
- sub_checker-0.1.0/src/sub_checker/services/pubmed.py +106 -0
- sub_checker-0.1.0/src/sub_checker/services/semantic_scholar.py +87 -0
- sub_checker-0.1.0/src/sub_checker/services/web.py +124 -0
- sub_checker-0.1.0/src/sub_checker/tools/__init__.py +0 -0
- sub_checker-0.1.0/src/sub_checker/tools/filesystem_tools.py +63 -0
- sub_checker-0.1.0/src/sub_checker/tools/manuscript_tools.py +239 -0
- sub_checker-0.1.0/src/sub_checker/tools/pubmed_tools.py +132 -0
- sub_checker-0.1.0/src/sub_checker/tools/web_tools.py +59 -0
- sub_checker-0.1.0/src/sub_checker.egg-info/PKG-INFO +193 -0
- sub_checker-0.1.0/src/sub_checker.egg-info/SOURCES.txt +58 -0
- sub_checker-0.1.0/src/sub_checker.egg-info/dependency_links.txt +1 -0
- sub_checker-0.1.0/src/sub_checker.egg-info/entry_points.txt +3 -0
- sub_checker-0.1.0/src/sub_checker.egg-info/requires.txt +20 -0
- sub_checker-0.1.0/src/sub_checker.egg-info/top_level.txt +1 -0
- sub_checker-0.1.0/tests/test_citation_parsing.py +47 -0
- sub_checker-0.1.0/tests/test_docx_parser.py +148 -0
- sub_checker-0.1.0/tests/test_eval_runner.py +100 -0
- sub_checker-0.1.0/tests/test_harness.py +268 -0
- sub_checker-0.1.0/tests/test_services.py +175 -0
- sub_checker-0.1.0/tests/test_tools.py +90 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 odafeng
|
|
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,193 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sub-checker
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Pre-submission manuscript checker powered by Claude agents
|
|
5
|
+
Author: odafeng
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/odafeng/sub-checker
|
|
8
|
+
Project-URL: Repository, https://github.com/odafeng/sub-checker
|
|
9
|
+
Project-URL: Issues, https://github.com/odafeng/sub-checker/issues
|
|
10
|
+
Keywords: academic,manuscript,submission,checker,agent,claude,proofreading,citation,journal
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering
|
|
18
|
+
Classifier: Topic :: Text Processing :: Linguistic
|
|
19
|
+
Requires-Python: >=3.11
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: click>=8.0
|
|
23
|
+
Requires-Dist: python-docx>=1.0
|
|
24
|
+
Requires-Dist: anthropic>=0.106
|
|
25
|
+
Requires-Dist: httpx>=0.27
|
|
26
|
+
Requires-Dist: pydantic>=2.0
|
|
27
|
+
Requires-Dist: pyyaml>=6.0
|
|
28
|
+
Requires-Dist: rich>=13.0
|
|
29
|
+
Provides-Extra: web
|
|
30
|
+
Requires-Dist: fastapi>=0.115; extra == "web"
|
|
31
|
+
Requires-Dist: uvicorn[standard]>=0.32; extra == "web"
|
|
32
|
+
Requires-Dist: python-multipart>=0.0.12; extra == "web"
|
|
33
|
+
Provides-Extra: dev
|
|
34
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
35
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
|
|
36
|
+
Requires-Dist: pytest-httpx>=0.30; extra == "dev"
|
|
37
|
+
Requires-Dist: ruff>=0.8; extra == "dev"
|
|
38
|
+
Requires-Dist: pyright>=1.1; extra == "dev"
|
|
39
|
+
Requires-Dist: pre-commit>=4.0; extra == "dev"
|
|
40
|
+
Dynamic: license-file
|
|
41
|
+
|
|
42
|
+
# sub-checker
|
|
43
|
+
|
|
44
|
+
[繁體中文](README.zh-TW.md) | English
|
|
45
|
+
|
|
46
|
+
Pre-submission manuscript checker powered by Claude agents with a Plan-Execute-Verify harness. Each check is performed by a specialized AI agent, then validated by deterministic checks and a reviewer agent to eliminate false positives.
|
|
47
|
+
|
|
48
|
+
## What it checks
|
|
49
|
+
|
|
50
|
+
| Agent | What it does |
|
|
51
|
+
|-------|-------------|
|
|
52
|
+
| **typo_grammar** | Spelling, grammar, awkward phrasing (skips reference list) |
|
|
53
|
+
| **figure_table** | Figure/table references exist, numbering is sequential, files present |
|
|
54
|
+
| **citation_exist** | In-text citations match the reference list (deterministic pre-scan + agent) |
|
|
55
|
+
| **citation_format** | Reference list follows target journal's citation style (APA, Vancouver, AMA, etc.) |
|
|
56
|
+
| **journal_guidelines** | Word count, required sections, abstract format, required statements (COI, ethics, data availability) |
|
|
57
|
+
| **logic** | Contradictions, unsupported claims, methods-results mismatches |
|
|
58
|
+
| **citation_claim** | Multi-source verification (PubMed + Semantic Scholar + Crossref), then verifies claims against abstracts |
|
|
59
|
+
|
|
60
|
+
## Install
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
pip install sub-checker
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Setup
|
|
67
|
+
|
|
68
|
+
You need an Anthropic API key:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Or create a `.env` file in your working directory:
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
ANTHROPIC_API_KEY=sk-ant-...
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Usage
|
|
81
|
+
|
|
82
|
+
### CLI
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
# Full check with target journal
|
|
86
|
+
sub-check paper.docx -j "The Lancet"
|
|
87
|
+
|
|
88
|
+
# Chinese report output
|
|
89
|
+
sub-check paper.docx -j "Nature Medicine" --lang zh-TW
|
|
90
|
+
|
|
91
|
+
# Only run specific checkers (cheaper & faster)
|
|
92
|
+
sub-check paper.docx --only figure,citation
|
|
93
|
+
|
|
94
|
+
# Skip expensive checkers
|
|
95
|
+
sub-check paper.docx --skip claim,logic
|
|
96
|
+
|
|
97
|
+
# Output as styled HTML report (includes COT viewer + confidence scores)
|
|
98
|
+
sub-check paper.docx -o html --output-file report.html
|
|
99
|
+
|
|
100
|
+
# Output as JSON (for programmatic use)
|
|
101
|
+
sub-check paper.docx -o json --output-file report.json
|
|
102
|
+
|
|
103
|
+
# Dry run (just parse, no agents)
|
|
104
|
+
sub-check paper.docx --dry-run
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Web GUI
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
# Start backend
|
|
111
|
+
uvicorn sub_checker.api:app --reload
|
|
112
|
+
|
|
113
|
+
# Start frontend (in another terminal)
|
|
114
|
+
cd frontend && npm run dev
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Open `http://localhost:5173` — upload a `.docx`, pick a journal, run, and view the report with confidence badges and filtered false positives.
|
|
118
|
+
|
|
119
|
+
### CLI options
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
sub-check [OPTIONS] MANUSCRIPT_PATH
|
|
123
|
+
|
|
124
|
+
Arguments:
|
|
125
|
+
MANUSCRIPT_PATH Path to .docx file or directory containing one
|
|
126
|
+
|
|
127
|
+
Options:
|
|
128
|
+
-j, --journal Target journal name (e.g. "The Lancet")
|
|
129
|
+
-o, --output terminal | json | markdown | html (default: terminal)
|
|
130
|
+
--output-file Write report to file
|
|
131
|
+
--lang Report language: en (default) or zh-TW
|
|
132
|
+
--only Comma-separated: typo,logic,figure,citation,format,guidelines,claim
|
|
133
|
+
--skip Comma-separated checkers to skip
|
|
134
|
+
-v, --verbose Show agent tool calls in real-time
|
|
135
|
+
--dry-run Only parse .docx, don't run agents
|
|
136
|
+
--init Generate default .sub-checker.yaml
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Pipeline (5 phases)
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
Phase 1-3 │ 7 checker agents (parallel within each phase)
|
|
143
|
+
Phase 4 │ Deterministic post-validation (date math, citation cross-check)
|
|
144
|
+
Phase 5 │ Reviewer agent validates all findings → confidence scores
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
- **Pre-execution**: deterministic citation pre-scan + multi-source reference verification
|
|
148
|
+
- **Post-validation**: false positives filtered, remaining findings get confidence scores (0-100%)
|
|
149
|
+
- See [harness-architecture.md](docs/harness-architecture.md) for full technical details
|
|
150
|
+
|
|
151
|
+
## HTML report features
|
|
152
|
+
|
|
153
|
+
- Dark-themed styled report with severity badges
|
|
154
|
+
- **Confidence scores** — each finding shows reviewer-assigned confidence (%)
|
|
155
|
+
- **False positive filtering** — deterministic + reviewer agent removes incorrect findings
|
|
156
|
+
- **Chain of Thought viewer** — expand to see every API call, tool use, and reasoning step
|
|
157
|
+
- **Model display** — shows which Claude model generated the report
|
|
158
|
+
- i18n support (English / Traditional Chinese)
|
|
159
|
+
|
|
160
|
+
## Cost estimate
|
|
161
|
+
|
|
162
|
+
Uses Claude Opus 4.8 by default. Approximate cost per manuscript (~4000 words):
|
|
163
|
+
|
|
164
|
+
| Scope | Agents | Time | Cost |
|
|
165
|
+
|-------|--------|------|------|
|
|
166
|
+
| Quick check | `--only figure,citation` | ~4 min | ~$3 |
|
|
167
|
+
| Standard | `--skip claim` | ~8 min | ~$7 |
|
|
168
|
+
| Full check | all 7 agents + harness | ~12 min | ~$12–16 |
|
|
169
|
+
|
|
170
|
+
You can change the model in `.sub-checker.yaml` (e.g. use `claude-sonnet-4-6` for cheaper runs).
|
|
171
|
+
|
|
172
|
+
## Logging
|
|
173
|
+
|
|
174
|
+
All logs are stored in `~/.sub-checker/`:
|
|
175
|
+
|
|
176
|
+
- `logs/sub-checker.log` — application log (auto-rotated, 10MB x 5)
|
|
177
|
+
- `logs/sub-checker.error.log` — errors only
|
|
178
|
+
- `cot/` — agent chain-of-thought JSON logs (every tool call, every response)
|
|
179
|
+
|
|
180
|
+
Set `cot_dir: "disabled"` in `.sub-checker.yaml` to turn off COT file logging (entries still appear in HTML reports).
|
|
181
|
+
|
|
182
|
+
## Architecture
|
|
183
|
+
|
|
184
|
+
- **5-phase pipeline**: Plan-Execute-Verify harness ([ADR-0010](docs/adr/0010-plan-execute-verify-harness.md))
|
|
185
|
+
- 7 agents + reviewer agent, each with system prompt + curated tools + agentic loop ([ADR-0002](docs/adr/0002-agent-per-checker-architecture.md))
|
|
186
|
+
- Parser provides raw data; agents judge document structure ([ADR-0009](docs/adr/0009-agent-over-deterministic-parsing.md))
|
|
187
|
+
- Multi-source citation verification: PubMed + Semantic Scholar + Crossref ([ADR-0005](docs/adr/0005-semantic-scholar-fallback.md))
|
|
188
|
+
- FastAPI + React + TypeScript GUI ([ADR-0006](docs/adr/0006-fastapi-react-gui.md))
|
|
189
|
+
- [Benchmark comparison](docs/benchmark-comparison.md) | [Harness architecture](docs/harness-architecture.md)
|
|
190
|
+
|
|
191
|
+
## License
|
|
192
|
+
|
|
193
|
+
MIT
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# sub-checker
|
|
2
|
+
|
|
3
|
+
[繁體中文](README.zh-TW.md) | English
|
|
4
|
+
|
|
5
|
+
Pre-submission manuscript checker powered by Claude agents with a Plan-Execute-Verify harness. Each check is performed by a specialized AI agent, then validated by deterministic checks and a reviewer agent to eliminate false positives.
|
|
6
|
+
|
|
7
|
+
## What it checks
|
|
8
|
+
|
|
9
|
+
| Agent | What it does |
|
|
10
|
+
|-------|-------------|
|
|
11
|
+
| **typo_grammar** | Spelling, grammar, awkward phrasing (skips reference list) |
|
|
12
|
+
| **figure_table** | Figure/table references exist, numbering is sequential, files present |
|
|
13
|
+
| **citation_exist** | In-text citations match the reference list (deterministic pre-scan + agent) |
|
|
14
|
+
| **citation_format** | Reference list follows target journal's citation style (APA, Vancouver, AMA, etc.) |
|
|
15
|
+
| **journal_guidelines** | Word count, required sections, abstract format, required statements (COI, ethics, data availability) |
|
|
16
|
+
| **logic** | Contradictions, unsupported claims, methods-results mismatches |
|
|
17
|
+
| **citation_claim** | Multi-source verification (PubMed + Semantic Scholar + Crossref), then verifies claims against abstracts |
|
|
18
|
+
|
|
19
|
+
## Install
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pip install sub-checker
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Setup
|
|
26
|
+
|
|
27
|
+
You need an Anthropic API key:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Or create a `.env` file in your working directory:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
ANTHROPIC_API_KEY=sk-ant-...
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Usage
|
|
40
|
+
|
|
41
|
+
### CLI
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Full check with target journal
|
|
45
|
+
sub-check paper.docx -j "The Lancet"
|
|
46
|
+
|
|
47
|
+
# Chinese report output
|
|
48
|
+
sub-check paper.docx -j "Nature Medicine" --lang zh-TW
|
|
49
|
+
|
|
50
|
+
# Only run specific checkers (cheaper & faster)
|
|
51
|
+
sub-check paper.docx --only figure,citation
|
|
52
|
+
|
|
53
|
+
# Skip expensive checkers
|
|
54
|
+
sub-check paper.docx --skip claim,logic
|
|
55
|
+
|
|
56
|
+
# Output as styled HTML report (includes COT viewer + confidence scores)
|
|
57
|
+
sub-check paper.docx -o html --output-file report.html
|
|
58
|
+
|
|
59
|
+
# Output as JSON (for programmatic use)
|
|
60
|
+
sub-check paper.docx -o json --output-file report.json
|
|
61
|
+
|
|
62
|
+
# Dry run (just parse, no agents)
|
|
63
|
+
sub-check paper.docx --dry-run
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Web GUI
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# Start backend
|
|
70
|
+
uvicorn sub_checker.api:app --reload
|
|
71
|
+
|
|
72
|
+
# Start frontend (in another terminal)
|
|
73
|
+
cd frontend && npm run dev
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Open `http://localhost:5173` — upload a `.docx`, pick a journal, run, and view the report with confidence badges and filtered false positives.
|
|
77
|
+
|
|
78
|
+
### CLI options
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
sub-check [OPTIONS] MANUSCRIPT_PATH
|
|
82
|
+
|
|
83
|
+
Arguments:
|
|
84
|
+
MANUSCRIPT_PATH Path to .docx file or directory containing one
|
|
85
|
+
|
|
86
|
+
Options:
|
|
87
|
+
-j, --journal Target journal name (e.g. "The Lancet")
|
|
88
|
+
-o, --output terminal | json | markdown | html (default: terminal)
|
|
89
|
+
--output-file Write report to file
|
|
90
|
+
--lang Report language: en (default) or zh-TW
|
|
91
|
+
--only Comma-separated: typo,logic,figure,citation,format,guidelines,claim
|
|
92
|
+
--skip Comma-separated checkers to skip
|
|
93
|
+
-v, --verbose Show agent tool calls in real-time
|
|
94
|
+
--dry-run Only parse .docx, don't run agents
|
|
95
|
+
--init Generate default .sub-checker.yaml
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Pipeline (5 phases)
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
Phase 1-3 │ 7 checker agents (parallel within each phase)
|
|
102
|
+
Phase 4 │ Deterministic post-validation (date math, citation cross-check)
|
|
103
|
+
Phase 5 │ Reviewer agent validates all findings → confidence scores
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
- **Pre-execution**: deterministic citation pre-scan + multi-source reference verification
|
|
107
|
+
- **Post-validation**: false positives filtered, remaining findings get confidence scores (0-100%)
|
|
108
|
+
- See [harness-architecture.md](docs/harness-architecture.md) for full technical details
|
|
109
|
+
|
|
110
|
+
## HTML report features
|
|
111
|
+
|
|
112
|
+
- Dark-themed styled report with severity badges
|
|
113
|
+
- **Confidence scores** — each finding shows reviewer-assigned confidence (%)
|
|
114
|
+
- **False positive filtering** — deterministic + reviewer agent removes incorrect findings
|
|
115
|
+
- **Chain of Thought viewer** — expand to see every API call, tool use, and reasoning step
|
|
116
|
+
- **Model display** — shows which Claude model generated the report
|
|
117
|
+
- i18n support (English / Traditional Chinese)
|
|
118
|
+
|
|
119
|
+
## Cost estimate
|
|
120
|
+
|
|
121
|
+
Uses Claude Opus 4.8 by default. Approximate cost per manuscript (~4000 words):
|
|
122
|
+
|
|
123
|
+
| Scope | Agents | Time | Cost |
|
|
124
|
+
|-------|--------|------|------|
|
|
125
|
+
| Quick check | `--only figure,citation` | ~4 min | ~$3 |
|
|
126
|
+
| Standard | `--skip claim` | ~8 min | ~$7 |
|
|
127
|
+
| Full check | all 7 agents + harness | ~12 min | ~$12–16 |
|
|
128
|
+
|
|
129
|
+
You can change the model in `.sub-checker.yaml` (e.g. use `claude-sonnet-4-6` for cheaper runs).
|
|
130
|
+
|
|
131
|
+
## Logging
|
|
132
|
+
|
|
133
|
+
All logs are stored in `~/.sub-checker/`:
|
|
134
|
+
|
|
135
|
+
- `logs/sub-checker.log` — application log (auto-rotated, 10MB x 5)
|
|
136
|
+
- `logs/sub-checker.error.log` — errors only
|
|
137
|
+
- `cot/` — agent chain-of-thought JSON logs (every tool call, every response)
|
|
138
|
+
|
|
139
|
+
Set `cot_dir: "disabled"` in `.sub-checker.yaml` to turn off COT file logging (entries still appear in HTML reports).
|
|
140
|
+
|
|
141
|
+
## Architecture
|
|
142
|
+
|
|
143
|
+
- **5-phase pipeline**: Plan-Execute-Verify harness ([ADR-0010](docs/adr/0010-plan-execute-verify-harness.md))
|
|
144
|
+
- 7 agents + reviewer agent, each with system prompt + curated tools + agentic loop ([ADR-0002](docs/adr/0002-agent-per-checker-architecture.md))
|
|
145
|
+
- Parser provides raw data; agents judge document structure ([ADR-0009](docs/adr/0009-agent-over-deterministic-parsing.md))
|
|
146
|
+
- Multi-source citation verification: PubMed + Semantic Scholar + Crossref ([ADR-0005](docs/adr/0005-semantic-scholar-fallback.md))
|
|
147
|
+
- FastAPI + React + TypeScript GUI ([ADR-0006](docs/adr/0006-fastapi-react-gui.md))
|
|
148
|
+
- [Benchmark comparison](docs/benchmark-comparison.md) | [Harness architecture](docs/harness-architecture.md)
|
|
149
|
+
|
|
150
|
+
## License
|
|
151
|
+
|
|
152
|
+
MIT
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "sub-checker"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Pre-submission manuscript checker powered by Claude agents"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
requires-python = ">=3.11"
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "odafeng" },
|
|
14
|
+
]
|
|
15
|
+
keywords = [
|
|
16
|
+
"academic",
|
|
17
|
+
"manuscript",
|
|
18
|
+
"submission",
|
|
19
|
+
"checker",
|
|
20
|
+
"agent",
|
|
21
|
+
"claude",
|
|
22
|
+
"proofreading",
|
|
23
|
+
"citation",
|
|
24
|
+
"journal",
|
|
25
|
+
]
|
|
26
|
+
classifiers = [
|
|
27
|
+
"Development Status :: 3 - Alpha",
|
|
28
|
+
"Intended Audience :: Science/Research",
|
|
29
|
+
"Programming Language :: Python :: 3",
|
|
30
|
+
"Programming Language :: Python :: 3.11",
|
|
31
|
+
"Programming Language :: Python :: 3.12",
|
|
32
|
+
"Programming Language :: Python :: 3.13",
|
|
33
|
+
"Topic :: Scientific/Engineering",
|
|
34
|
+
"Topic :: Text Processing :: Linguistic",
|
|
35
|
+
]
|
|
36
|
+
dependencies = [
|
|
37
|
+
"click>=8.0",
|
|
38
|
+
"python-docx>=1.0",
|
|
39
|
+
"anthropic>=0.106",
|
|
40
|
+
"httpx>=0.27",
|
|
41
|
+
"pydantic>=2.0",
|
|
42
|
+
"pyyaml>=6.0",
|
|
43
|
+
"rich>=13.0",
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
[project.optional-dependencies]
|
|
47
|
+
web = [
|
|
48
|
+
"fastapi>=0.115",
|
|
49
|
+
"uvicorn[standard]>=0.32",
|
|
50
|
+
"python-multipart>=0.0.12",
|
|
51
|
+
]
|
|
52
|
+
dev = [
|
|
53
|
+
"pytest>=8.0",
|
|
54
|
+
"pytest-asyncio>=0.23",
|
|
55
|
+
"pytest-httpx>=0.30",
|
|
56
|
+
"ruff>=0.8",
|
|
57
|
+
"pyright>=1.1",
|
|
58
|
+
"pre-commit>=4.0",
|
|
59
|
+
]
|
|
60
|
+
|
|
61
|
+
[project.urls]
|
|
62
|
+
Homepage = "https://github.com/odafeng/sub-checker"
|
|
63
|
+
Repository = "https://github.com/odafeng/sub-checker"
|
|
64
|
+
Issues = "https://github.com/odafeng/sub-checker/issues"
|
|
65
|
+
|
|
66
|
+
[project.scripts]
|
|
67
|
+
sub-check = "sub_checker.cli:main"
|
|
68
|
+
sub-check-eval = "sub_checker.eval_runner:main"
|
|
69
|
+
|
|
70
|
+
# ── Ruff ──────────────────────────────────────────────
|
|
71
|
+
[tool.ruff]
|
|
72
|
+
target-version = "py311"
|
|
73
|
+
line-length = 100
|
|
74
|
+
src = ["src", "tests"]
|
|
75
|
+
|
|
76
|
+
[tool.ruff.lint]
|
|
77
|
+
select = [
|
|
78
|
+
"E", # pycodestyle errors
|
|
79
|
+
"W", # pycodestyle warnings
|
|
80
|
+
"F", # pyflakes
|
|
81
|
+
"I", # isort
|
|
82
|
+
"N", # pep8-naming
|
|
83
|
+
"UP", # pyupgrade
|
|
84
|
+
"B", # flake8-bugbear
|
|
85
|
+
"SIM", # flake8-simplify
|
|
86
|
+
"RUF", # ruff-specific
|
|
87
|
+
]
|
|
88
|
+
ignore = [
|
|
89
|
+
"E501", # line too long (handled by formatter)
|
|
90
|
+
]
|
|
91
|
+
|
|
92
|
+
[tool.ruff.lint.isort]
|
|
93
|
+
known-first-party = ["sub_checker"]
|
|
94
|
+
|
|
95
|
+
# ── Pyright ───────────────────────────────────────────
|
|
96
|
+
[tool.pyright]
|
|
97
|
+
pythonVersion = "3.11"
|
|
98
|
+
pythonPlatform = "All"
|
|
99
|
+
typeCheckingMode = "basic"
|
|
100
|
+
venvPath = "."
|
|
101
|
+
venv = ".venv"
|
|
102
|
+
reportMissingImports = false
|
|
103
|
+
|
|
104
|
+
# ── Pytest ────────────────────────────────────────────
|
|
105
|
+
[tool.pytest.ini_options]
|
|
106
|
+
asyncio_mode = "auto"
|
|
107
|
+
testpaths = ["tests"]
|
|
File without changes
|