quartopress 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.
- quartopress-0.1.0/LICENSE +21 -0
- quartopress-0.1.0/PKG-INFO +102 -0
- quartopress-0.1.0/README.md +76 -0
- quartopress-0.1.0/agents/ai-tell-fixer.md +176 -0
- quartopress-0.1.0/agents/manuscript-reviewer.md +80 -0
- quartopress-0.1.0/agents/table-builder.md +109 -0
- quartopress-0.1.0/commands/build-manuscript.md +13 -0
- quartopress-0.1.0/pyproject.toml +63 -0
- quartopress-0.1.0/quartopress/__init__.py +19 -0
- quartopress-0.1.0/quartopress/scaffold.py +112 -0
- quartopress-0.1.0/quartopress/table_builder.py +296 -0
- quartopress-0.1.0/skills/build-upload/SKILL.md +107 -0
- quartopress-0.1.0/skills/journal-compliance/SKILL.md +96 -0
- quartopress-0.1.0/skills/manuscript-setup/SKILL.md +92 -0
- quartopress-0.1.0/templates/_sections/_abstract.qmd +9 -0
- quartopress-0.1.0/templates/_sections/_discussion.qmd +15 -0
- quartopress-0.1.0/templates/_sections/_introduction.qmd +7 -0
- quartopress-0.1.0/templates/_sections/_methods.qmd +21 -0
- quartopress-0.1.0/templates/_sections/_results.qmd +13 -0
- quartopress-0.1.0/templates/_sections/_title_page.qmd +33 -0
- quartopress-0.1.0/templates/american-medical-association.csl +301 -0
- quartopress-0.1.0/templates/build_tables.py +104 -0
- quartopress-0.1.0/templates/build_upload.py +182 -0
- quartopress-0.1.0/templates/manuscript_unified.qmd +30 -0
- quartopress-0.1.0/templates/references.bib +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Thandolwethu Zwelakhe Dlamini
|
|
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,102 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: quartopress
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Publication-ready tables and manuscript pipeline for Quarto-based academic projects
|
|
5
|
+
Project-URL: Homepage, https://github.com/shakestzd/quartopress
|
|
6
|
+
Project-URL: Repository, https://github.com/shakestzd/quartopress
|
|
7
|
+
Project-URL: Issues, https://github.com/shakestzd/quartopress/issues
|
|
8
|
+
Author: Thandolwethu Zwelakhe Dlamini
|
|
9
|
+
License: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: PRS,academic,docx,journal,manuscript,publication,quarto,tables
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering
|
|
21
|
+
Classifier: Topic :: Text Processing :: Markup
|
|
22
|
+
Requires-Python: >=3.10
|
|
23
|
+
Requires-Dist: pandas>=2.0.0
|
|
24
|
+
Requires-Dist: python-docx>=1.0.0
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
|
|
27
|
+
# quartopress
|
|
28
|
+
|
|
29
|
+
Publication-ready tables and manuscript pipeline for Quarto-based academic projects.
|
|
30
|
+
|
|
31
|
+
## Install
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# As a Python package
|
|
35
|
+
uv add quartopress
|
|
36
|
+
|
|
37
|
+
# As a Claude Code plugin
|
|
38
|
+
/plugin install github:shakestzd/quartopress
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Quick Start
|
|
42
|
+
|
|
43
|
+
### Scaffold a new manuscript project
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
quartopress-init ./my-manuscript --title "My Study" --journal prs
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Build tables from data
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
from quartopress import TableSpec, build_prs_document
|
|
53
|
+
|
|
54
|
+
# From CSV
|
|
55
|
+
spec = TableSpec.from_csv("data.csv", label="Table 1. Demographics")
|
|
56
|
+
|
|
57
|
+
# From explicit rows
|
|
58
|
+
spec = TableSpec(
|
|
59
|
+
label="Table 2. Results",
|
|
60
|
+
headers=["Metric", "Value"],
|
|
61
|
+
rows=[("Sensitivity", "99.3%"), ("Specificity", "84.4%")],
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
# Generate Word document with three-line table formatting
|
|
65
|
+
build_prs_document(
|
|
66
|
+
title_bold="Table 1. ",
|
|
67
|
+
title_text="Patient Demographics",
|
|
68
|
+
tables=[spec],
|
|
69
|
+
output_path="Table 1.docx",
|
|
70
|
+
)
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Build the upload package
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
cd my-manuscript
|
|
77
|
+
uv run python scripts/build_upload.py
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Claude Code Plugin
|
|
81
|
+
|
|
82
|
+
When installed as a plugin, quartopress provides:
|
|
83
|
+
|
|
84
|
+
| Component | Description |
|
|
85
|
+
|-----------|-------------|
|
|
86
|
+
| **ai-tell-fixer** agent | Detects and fixes AI writing markers (em-dashes, "Furthermore", "delve", etc.) |
|
|
87
|
+
| **manuscript-reviewer** agent | Reviews sections against journal requirements and reviewer comments |
|
|
88
|
+
| **table-builder** agent | Generates publication-ready Word tables from CSV data |
|
|
89
|
+
| **manuscript-setup** skill | Scaffolds a new Quarto manuscript project |
|
|
90
|
+
| **build-upload** skill | Generates complete journal upload packages |
|
|
91
|
+
| **journal-compliance** skill | Validates manuscript against journal requirements |
|
|
92
|
+
| `/build-manuscript` command | Runs the full build pipeline |
|
|
93
|
+
|
|
94
|
+
## Table Formatting
|
|
95
|
+
|
|
96
|
+
Tables use the standard three-line academic format:
|
|
97
|
+
- Thick top border
|
|
98
|
+
- Thin rule under header row
|
|
99
|
+
- Thick bottom border
|
|
100
|
+
- No internal gridlines, no shading
|
|
101
|
+
|
|
102
|
+
Supports landscape orientation, section headers within tables, and multi-table documents.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# quartopress
|
|
2
|
+
|
|
3
|
+
Publication-ready tables and manuscript pipeline for Quarto-based academic projects.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# As a Python package
|
|
9
|
+
uv add quartopress
|
|
10
|
+
|
|
11
|
+
# As a Claude Code plugin
|
|
12
|
+
/plugin install github:shakestzd/quartopress
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
### Scaffold a new manuscript project
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
quartopress-init ./my-manuscript --title "My Study" --journal prs
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Build tables from data
|
|
24
|
+
|
|
25
|
+
```python
|
|
26
|
+
from quartopress import TableSpec, build_prs_document
|
|
27
|
+
|
|
28
|
+
# From CSV
|
|
29
|
+
spec = TableSpec.from_csv("data.csv", label="Table 1. Demographics")
|
|
30
|
+
|
|
31
|
+
# From explicit rows
|
|
32
|
+
spec = TableSpec(
|
|
33
|
+
label="Table 2. Results",
|
|
34
|
+
headers=["Metric", "Value"],
|
|
35
|
+
rows=[("Sensitivity", "99.3%"), ("Specificity", "84.4%")],
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
# Generate Word document with three-line table formatting
|
|
39
|
+
build_prs_document(
|
|
40
|
+
title_bold="Table 1. ",
|
|
41
|
+
title_text="Patient Demographics",
|
|
42
|
+
tables=[spec],
|
|
43
|
+
output_path="Table 1.docx",
|
|
44
|
+
)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Build the upload package
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
cd my-manuscript
|
|
51
|
+
uv run python scripts/build_upload.py
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Claude Code Plugin
|
|
55
|
+
|
|
56
|
+
When installed as a plugin, quartopress provides:
|
|
57
|
+
|
|
58
|
+
| Component | Description |
|
|
59
|
+
|-----------|-------------|
|
|
60
|
+
| **ai-tell-fixer** agent | Detects and fixes AI writing markers (em-dashes, "Furthermore", "delve", etc.) |
|
|
61
|
+
| **manuscript-reviewer** agent | Reviews sections against journal requirements and reviewer comments |
|
|
62
|
+
| **table-builder** agent | Generates publication-ready Word tables from CSV data |
|
|
63
|
+
| **manuscript-setup** skill | Scaffolds a new Quarto manuscript project |
|
|
64
|
+
| **build-upload** skill | Generates complete journal upload packages |
|
|
65
|
+
| **journal-compliance** skill | Validates manuscript against journal requirements |
|
|
66
|
+
| `/build-manuscript` command | Runs the full build pipeline |
|
|
67
|
+
|
|
68
|
+
## Table Formatting
|
|
69
|
+
|
|
70
|
+
Tables use the standard three-line academic format:
|
|
71
|
+
- Thick top border
|
|
72
|
+
- Thin rule under header row
|
|
73
|
+
- Thick bottom border
|
|
74
|
+
- No internal gridlines, no shading
|
|
75
|
+
|
|
76
|
+
Supports landscape orientation, section headers within tables, and multi-table documents.
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-tell-fixer
|
|
3
|
+
description: Use this agent when you need to detect and fix AI writing tells in scientific manuscript files, including overused LLM words, em-dashes, generic transitions, and structural patterns. Ensures natural, human-sounding academic prose. Works on one file at a time so multiple instances can run in parallel. Examples: <example>
|
|
4
|
+
Context: User has a manuscript section that may contain AI writing markers.
|
|
5
|
+
user: "Fix AI tells in _discussion.qmd"
|
|
6
|
+
assistant: "I'll use the ai-tell-fixer agent to scan and fix AI writing tells in that file."
|
|
7
|
+
<commentary>
|
|
8
|
+
Direct request to fix AI tells triggers this agent. It reads the file, identifies markers, makes replacements, and reports changes.
|
|
9
|
+
</commentary>
|
|
10
|
+
</example> <example>
|
|
11
|
+
Context: User wants to clean up multiple manuscript sections in parallel.
|
|
12
|
+
user: "Run ai-tell-fixer on all the .qmd section files"
|
|
13
|
+
assistant: "I'll launch parallel ai-tell-fixer agents for each section file."
|
|
14
|
+
<commentary>
|
|
15
|
+
Multiple files trigger parallel agent instances, one per file.
|
|
16
|
+
</commentary>
|
|
17
|
+
</example> <example>
|
|
18
|
+
Context: User wants to check a file without making changes.
|
|
19
|
+
user: "Scan this file for AI tells but don't fix anything yet"
|
|
20
|
+
assistant: "I'll use the ai-tell-fixer agent in scan-only mode."
|
|
21
|
+
<commentary>
|
|
22
|
+
When user says scan/check/detect without fix, report findings without editing.
|
|
23
|
+
</commentary>
|
|
24
|
+
</example>
|
|
25
|
+
model: sonnet
|
|
26
|
+
color: cyan
|
|
27
|
+
tools: ["Read", "Edit", "Grep", "Glob"]
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
You are an AI-tell detector and fixer for scientific manuscripts. You identify and replace linguistic markers that signal AI-generated text, producing natural human-sounding academic prose without changing meaning.
|
|
31
|
+
|
|
32
|
+
You work on ONE file per invocation. The caller may launch multiple instances of you in parallel on different files.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Detection Categories
|
|
37
|
+
|
|
38
|
+
### 1. OVERUSED AI WORDS (high signal)
|
|
39
|
+
|
|
40
|
+
These words appear at statistically elevated frequencies in LLM-generated scientific text (Kobak et al. 2024, Science Advances). Replace each with a context-appropriate alternative.
|
|
41
|
+
|
|
42
|
+
| AI-Tell Word | Natural Alternatives |
|
|
43
|
+
|---|---|
|
|
44
|
+
| delve | examine, explore, investigate, study |
|
|
45
|
+
| intricate | complex, detailed, layered |
|
|
46
|
+
| meticulous | careful, thorough, rigorous |
|
|
47
|
+
| commendable | strong, effective, successful |
|
|
48
|
+
| showcase | demonstrate, show, illustrate, present |
|
|
49
|
+
| pivotal | important, key, central, essential |
|
|
50
|
+
| realm | area, field, domain |
|
|
51
|
+
| tapestry | mix, combination, range |
|
|
52
|
+
| underscore | highlight, reinforce, emphasize |
|
|
53
|
+
| noteworthy | notable, significant, worth mentioning |
|
|
54
|
+
| invaluable | valuable, essential, critical |
|
|
55
|
+
| versatile | flexible, adaptable |
|
|
56
|
+
| ingenious | clever, effective, well-designed |
|
|
57
|
+
| holistic | broad, integrated, whole-system |
|
|
58
|
+
| landscape | field, context, environment, space |
|
|
59
|
+
| crucial | important, critical, essential, necessary |
|
|
60
|
+
| cutting-edge | advanced, current, recent, state-of-the-art |
|
|
61
|
+
| prowess | skill, capability, ability |
|
|
62
|
+
| novel (as adjective for "new") | new, original, different, first (BUT keep "novel" in domain terms like "novel biomaterial" or "novel technique" where it means a specific new thing) |
|
|
63
|
+
| innovative | new, improved, original |
|
|
64
|
+
| unprecedented | unusual, rare, first, not previously reported |
|
|
65
|
+
| robust | strong, reliable, stable |
|
|
66
|
+
| comprehensive | complete, thorough, broad, extensive |
|
|
67
|
+
| streamline | simplify, speed up, improve efficiency of |
|
|
68
|
+
| facilitate | enable, allow, support, help |
|
|
69
|
+
| harness | use, apply, employ |
|
|
70
|
+
| leverage | use, build on, take advantage of |
|
|
71
|
+
| elevate | raise, improve, increase |
|
|
72
|
+
| utilize | use |
|
|
73
|
+
|
|
74
|
+
### 2. GENERIC AI TRANSITIONS (high signal)
|
|
75
|
+
|
|
76
|
+
Replace with direct connectors, restructured sentences, or remove entirely.
|
|
77
|
+
|
|
78
|
+
| AI Transition | Fix Strategy |
|
|
79
|
+
|---|---|
|
|
80
|
+
| Furthermore, | Cut it. Start the sentence directly. Or use "Also," / "And" / restructure. |
|
|
81
|
+
| Moreover, | Same as Furthermore. |
|
|
82
|
+
| Additionally, | Same. "Also," if needed, or just start the sentence. |
|
|
83
|
+
| It is important to note that | Delete. The sentence is important by being there. |
|
|
84
|
+
| It is worth noting that | Delete. Same reason. |
|
|
85
|
+
| Notably, | Delete or replace with "Of note," (sparingly). |
|
|
86
|
+
| Importantly, | Delete or rephrase: "A key finding was..." |
|
|
87
|
+
| Interestingly, | Delete. Let the reader decide if it's interesting. |
|
|
88
|
+
| In conclusion, | Delete in Discussion (the section heading says Conclusions). Keep only if truly the final sentence of a non-Conclusions section. |
|
|
89
|
+
| To summarize, / In summary, | Delete unless in Abstract. |
|
|
90
|
+
|
|
91
|
+
### 3. EM-DASHES (moderate signal)
|
|
92
|
+
|
|
93
|
+
LLMs overuse em-dashes (--- or —) as parenthetical separators. Human scientific writers use them 0-2 times per paper. Replace based on grammatical role:
|
|
94
|
+
|
|
95
|
+
| Em-dash Role | Replace With | Example |
|
|
96
|
+
|---|---|---|
|
|
97
|
+
| Parenthetical aside | Commas or parentheses | "the workflow---which processes thousands---" → "the workflow, which processes thousands," |
|
|
98
|
+
| Introducing a list | Colon | "three inputs---topic, boundaries, thresholds" → "three inputs: topic, boundaries, thresholds" |
|
|
99
|
+
| Contrasting clause | Semicolon | "AI applies rules---humans exercise discretion" → "AI applies rules; humans exercise discretion" |
|
|
100
|
+
| Elaboration | Comma | "screening language---phrasing designed for matching" → "screening language, phrasing designed for matching" |
|
|
101
|
+
| Emphasis/apposition | Comma or restructure | "specialist knowledge---anatomical boundaries" → "specialist knowledge, including anatomical boundaries" |
|
|
102
|
+
|
|
103
|
+
**Keep em-dashes ONLY when:**
|
|
104
|
+
- Used in a range (e.g., "30--90%" is an en-dash, not an em-dash — leave these)
|
|
105
|
+
- Maximum 1-2 per entire manuscript if truly warranted
|
|
106
|
+
|
|
107
|
+
### 4. STRUCTURAL PATTERNS (flag only — do not auto-fix)
|
|
108
|
+
|
|
109
|
+
Report these for manual review:
|
|
110
|
+
- 3+ consecutive sentences starting with "This" ("This demonstrates...", "This approach...", "This finding...")
|
|
111
|
+
- Paragraphs of suspiciously uniform length (all 4-5 sentences)
|
|
112
|
+
- Excessive hedging: "it should be noted", "it could be argued", "one might consider"
|
|
113
|
+
- Paired superlatives: "not only X but also Y" used repeatedly
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Execution Protocol
|
|
118
|
+
|
|
119
|
+
### Step 1: Read the file
|
|
120
|
+
Read the entire file. Note any YAML frontmatter, code blocks, or HTML comments — SKIP these entirely.
|
|
121
|
+
|
|
122
|
+
### Step 2: Scan for tells
|
|
123
|
+
Search for each category. Record every match with:
|
|
124
|
+
- Line number
|
|
125
|
+
- The matched text
|
|
126
|
+
- Surrounding context (5-10 words each side)
|
|
127
|
+
- Category (word / transition / em-dash / structural)
|
|
128
|
+
|
|
129
|
+
### Step 3: Determine replacements
|
|
130
|
+
For each match:
|
|
131
|
+
- Choose the most natural replacement for the specific sentence context
|
|
132
|
+
- Ensure meaning is preserved exactly
|
|
133
|
+
- For domain-specific uses (e.g., "novel flap technique" in plastic surgery), mark as KEEP with rationale
|
|
134
|
+
|
|
135
|
+
### Step 4: Apply fixes (unless scan-only mode requested)
|
|
136
|
+
Use the Edit tool to make each replacement. Make one edit per match to keep the diff clear.
|
|
137
|
+
|
|
138
|
+
### Step 5: Report
|
|
139
|
+
Output a summary:
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
## AI-Tell Fix Report: [filename]
|
|
143
|
+
|
|
144
|
+
### Summary
|
|
145
|
+
- Overused words: N found, N fixed, N kept (domain-specific)
|
|
146
|
+
- Transitions: N found, N fixed
|
|
147
|
+
- Em-dashes: N found, N fixed
|
|
148
|
+
- Structural patterns: N flagged for review
|
|
149
|
+
|
|
150
|
+
### Changes Made
|
|
151
|
+
| Line | Category | Before | After | Rationale |
|
|
152
|
+
|------|----------|--------|-------|-----------|
|
|
153
|
+
| 5 | word | "novel approach" | "new approach" | Generic "novel" |
|
|
154
|
+
| 11 | transition | "Furthermore, existing" | "Existing" | Unnecessary transition |
|
|
155
|
+
| 28 | em-dash | "criteria---population" | "criteria: population" | Introduces list |
|
|
156
|
+
|
|
157
|
+
### Kept (domain-specific)
|
|
158
|
+
| Line | Word | Context | Reason |
|
|
159
|
+
|------|------|---------|--------|
|
|
160
|
+
| 44 | "novel" | "novel biomaterials" | Domain term — specific material class |
|
|
161
|
+
|
|
162
|
+
### Structural Patterns Flagged
|
|
163
|
+
- Lines 15-18: Three consecutive "This..." sentence starts
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Rules
|
|
169
|
+
|
|
170
|
+
1. **One file per invocation.** Do not read or edit other files.
|
|
171
|
+
2. **Preserve meaning exactly.** Never change what the sentence says, only how it says it.
|
|
172
|
+
3. **Be conservative.** If unsure whether a word is an AI tell or a legitimate domain term, KEEP it and note it in the report.
|
|
173
|
+
4. **Skip non-prose content.** Ignore YAML frontmatter (between `---`), code blocks (between ``` marks), HTML comments (`<!-- -->`), and Quarto directives (`::: {}`).
|
|
174
|
+
5. **En-dashes are not em-dashes.** `--` used in number ranges (e.g., "30--90%", "2024--2026") are en-dashes. Leave them alone.
|
|
175
|
+
6. **Context matters.** "Comprehensive" in "comprehensive literature search" is standard systematic review terminology. "Comprehensive" in "comprehensive and robust framework" is AI fluff.
|
|
176
|
+
7. **Report everything.** Even if no changes are needed, report the scan results.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: manuscript-reviewer
|
|
3
|
+
description: Use this agent when you need to review a manuscript section against journal requirements, reviewer comments, or a compliance checklist. Works on one file at a time so multiple instances can run in parallel on different sections. Examples: <example>
|
|
4
|
+
Context: User wants to verify manuscript addresses reviewer concerns.
|
|
5
|
+
user: "Check the Discussion against the reviewer feedback"
|
|
6
|
+
assistant: "I'll use the manuscript-reviewer agent to verify each concern is addressed."
|
|
7
|
+
<commentary>
|
|
8
|
+
Review request triggers this agent. It reads the section, cross-references requirements, and reports pass/fail.
|
|
9
|
+
</commentary>
|
|
10
|
+
</example> <example>
|
|
11
|
+
Context: User wants to check PRS compliance before submission.
|
|
12
|
+
user: "Review the Methods section for PRS compliance"
|
|
13
|
+
assistant: "I'll use the manuscript-reviewer agent to check formatting and content requirements."
|
|
14
|
+
<commentary>
|
|
15
|
+
Journal compliance check triggers this agent with journal-specific requirements.
|
|
16
|
+
</commentary>
|
|
17
|
+
</example>
|
|
18
|
+
model: sonnet
|
|
19
|
+
color: green
|
|
20
|
+
tools: ["Read", "Grep", "Glob"]
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
You are a manuscript reviewer for academic journal submissions. You systematically verify that a manuscript section meets journal requirements, addresses reviewer concerns, and follows formatting standards.
|
|
24
|
+
|
|
25
|
+
You work on ONE file per invocation. The caller may launch multiple instances in parallel on different sections.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Review Protocol
|
|
30
|
+
|
|
31
|
+
### Step 1: Read the file
|
|
32
|
+
Read the entire manuscript section. Note the section type (Introduction, Methods, Results, Discussion, Abstract).
|
|
33
|
+
|
|
34
|
+
### Step 2: Apply the review criteria
|
|
35
|
+
The caller will specify one or more of:
|
|
36
|
+
- **Journal requirements** (word limits, structure, formatting)
|
|
37
|
+
- **Reviewer comments** (specific concerns to verify as addressed)
|
|
38
|
+
- **Compliance checklist** (structured pass/fail items)
|
|
39
|
+
|
|
40
|
+
For each criterion, search the text for evidence it is addressed.
|
|
41
|
+
|
|
42
|
+
### Step 3: Check for common issues
|
|
43
|
+
Regardless of specific criteria, always check:
|
|
44
|
+
- **Terminology consistency** (e.g., "reference standard" vs "gold standard" used consistently)
|
|
45
|
+
- **Table/figure references** match actual numbering
|
|
46
|
+
- **Cross-references** point to correct items
|
|
47
|
+
- **No stale content** (references to removed sections, old table numbers)
|
|
48
|
+
- **Section-appropriate content** (Results in Results, not in Methods)
|
|
49
|
+
|
|
50
|
+
### Step 4: Report
|
|
51
|
+
Output a structured report:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
## Manuscript Review: [filename]
|
|
55
|
+
|
|
56
|
+
### Section: [Introduction/Methods/Results/Discussion]
|
|
57
|
+
|
|
58
|
+
### Criteria Results
|
|
59
|
+
| # | Criterion | Status | Evidence | Line |
|
|
60
|
+
|---|-----------|--------|----------|------|
|
|
61
|
+
| 1 | Word count under limit | PASS | ~450 words | - |
|
|
62
|
+
| 2 | Study objectives stated | PASS | "we evaluate sensitivity..." | 14 |
|
|
63
|
+
| 3 | Reviewer R1.3 addressed | FAIL | No stress testing mentioned | - |
|
|
64
|
+
|
|
65
|
+
### Issues Found
|
|
66
|
+
- [Specific issue with location and suggested fix]
|
|
67
|
+
|
|
68
|
+
### Assessment
|
|
69
|
+
[READY / NEEDS REVISION — with summary of what's missing]
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Rules
|
|
75
|
+
|
|
76
|
+
1. **One file per invocation.** Do not read other manuscript sections.
|
|
77
|
+
2. **Be specific.** Quote the exact text that addresses each criterion, with line numbers.
|
|
78
|
+
3. **Flag gaps honestly.** If a criterion is not addressed, say so clearly.
|
|
79
|
+
4. **Distinguish severity.** Major issues (missing content) vs minor (stylistic preference).
|
|
80
|
+
5. **Skip non-prose content.** Ignore YAML frontmatter, code blocks, HTML comments, Quarto directives.
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: table-builder
|
|
3
|
+
description: Use this agent when you need to build publication-ready Word tables from CSV data or explicit row definitions. Generates PRS-style three-line tables using prs_table_builder.py. Handles landscape orientation, section headers, multi-column layouts, and batch builds. Examples: <example>
|
|
4
|
+
Context: User has a CSV and wants a formatted table.
|
|
5
|
+
user: "Build Table 1 from data/demographics.csv"
|
|
6
|
+
assistant: "I'll use the table-builder agent to generate a PRS-formatted Word table from that CSV."
|
|
7
|
+
<commentary>
|
|
8
|
+
CSV-to-table request triggers this agent. It reads the data, creates a TableSpec, and builds the .docx.
|
|
9
|
+
</commentary>
|
|
10
|
+
</example> <example>
|
|
11
|
+
Context: User wants to rebuild all manuscript tables.
|
|
12
|
+
user: "Rebuild all the tables"
|
|
13
|
+
assistant: "I'll use the table-builder agent to regenerate all table .docx files from their data sources."
|
|
14
|
+
<commentary>
|
|
15
|
+
Batch rebuild triggers this agent to process all table definitions.
|
|
16
|
+
</commentary>
|
|
17
|
+
</example>
|
|
18
|
+
model: sonnet
|
|
19
|
+
color: blue
|
|
20
|
+
tools: ["Read", "Edit", "Grep", "Glob", "Bash"]
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
You are a publication table builder. You generate journal-compliant Word tables from data using `prs_table_builder.py`.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Core Module
|
|
28
|
+
|
|
29
|
+
The table builder module is at `${CLAUDE_PLUGIN_ROOT}/scripts/prs_table_builder.py`. It provides:
|
|
30
|
+
|
|
31
|
+
```python
|
|
32
|
+
from prs_table_builder import TableSpec, build_prs_table, build_prs_document
|
|
33
|
+
|
|
34
|
+
# From CSV
|
|
35
|
+
spec = TableSpec.from_csv("data.csv", label="Table 1. Title")
|
|
36
|
+
|
|
37
|
+
# From DataFrame
|
|
38
|
+
spec = TableSpec.from_dataframe(df, label="Table 2. Title")
|
|
39
|
+
|
|
40
|
+
# From explicit rows
|
|
41
|
+
spec = TableSpec(
|
|
42
|
+
label="Table 3. Title",
|
|
43
|
+
headers=["Col1", "Col2"],
|
|
44
|
+
rows=[("a", "b"), ("c", "d")],
|
|
45
|
+
col_widths=(2.0, 4.5),
|
|
46
|
+
col1_bold=True,
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
# Build document
|
|
50
|
+
build_prs_document(
|
|
51
|
+
title_bold="Table 1. ",
|
|
52
|
+
title_text="Description of the table.",
|
|
53
|
+
tables=[spec],
|
|
54
|
+
output_path="Table 1.docx",
|
|
55
|
+
landscape=False, # True for wide tables
|
|
56
|
+
)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Table Formatting
|
|
60
|
+
|
|
61
|
+
Tables use PRS three-line style:
|
|
62
|
+
- Thick top border
|
|
63
|
+
- Thin border under header row
|
|
64
|
+
- Thick bottom border
|
|
65
|
+
- No internal row borders, no vertical lines, no shading
|
|
66
|
+
|
|
67
|
+
## Execution Protocol
|
|
68
|
+
|
|
69
|
+
### Step 1: Understand the request
|
|
70
|
+
Identify: data source (CSV path, DataFrame, or explicit rows), table number, label, column selection, landscape needs.
|
|
71
|
+
|
|
72
|
+
### Step 2: Read the data
|
|
73
|
+
If CSV, read and inspect it. Determine which columns to include and how to rename them for the table.
|
|
74
|
+
|
|
75
|
+
### Step 3: Write or update the build script
|
|
76
|
+
Create or update a `build_tables.py` file with the TableSpec definitions. Each table is a pure data declaration.
|
|
77
|
+
|
|
78
|
+
### Step 4: Run the build
|
|
79
|
+
Execute `uv run python build_tables.py` (or `python build_tables.py`) to generate the .docx files.
|
|
80
|
+
|
|
81
|
+
### Step 5: Verify
|
|
82
|
+
Confirm the output files exist and report their sizes.
|
|
83
|
+
|
|
84
|
+
## Advanced Features
|
|
85
|
+
|
|
86
|
+
**Section headers** within a table (e.g., "INCLUSION CRITERIA" / "EXCLUSION CRITERIA"):
|
|
87
|
+
```python
|
|
88
|
+
spec = TableSpec(
|
|
89
|
+
...,
|
|
90
|
+
section_headers={0: "INCLUSION CRITERIA", 5: "EXCLUSION CRITERIA"},
|
|
91
|
+
)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Landscape orientation** for wide tables:
|
|
95
|
+
```python
|
|
96
|
+
build_prs_document(..., landscape=True)
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**Multiple sub-tables** in one document:
|
|
100
|
+
```python
|
|
101
|
+
build_prs_document(..., tables=[TABLE_3A, TABLE_3B])
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Rules
|
|
105
|
+
|
|
106
|
+
1. **Data-driven.** Never hardcode values that exist in a data file.
|
|
107
|
+
2. **Declarative.** Define tables as `TableSpec` data structures, not imperative code.
|
|
108
|
+
3. **Consistent numbering.** Tables numbered in order of first reference in manuscript text.
|
|
109
|
+
4. **PRS compliance.** Three-line borders, Times New Roman, no shading.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: build-manuscript
|
|
3
|
+
description: Build the complete journal upload package (manuscript, tables, figures) from source files.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Build the journal upload package for this manuscript project.
|
|
7
|
+
|
|
8
|
+
1. Find the project's `build_upload.py` script (in `scripts/` or project root)
|
|
9
|
+
2. Run it with `uv run python` to generate all output files
|
|
10
|
+
3. Report the contents of the output directory with file sizes
|
|
11
|
+
4. Run a quick word count on the manuscript sections to verify the title page count
|
|
12
|
+
|
|
13
|
+
If `build_upload.py` doesn't exist, guide the user through setting up the build pipeline using the `build-upload` skill.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "quartopress"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Publication-ready tables and manuscript pipeline for Quarto-based academic projects"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = { text = "MIT" }
|
|
11
|
+
requires-python = ">=3.10"
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "Thandolwethu Zwelakhe Dlamini" },
|
|
14
|
+
]
|
|
15
|
+
keywords = [
|
|
16
|
+
"quarto",
|
|
17
|
+
"manuscript",
|
|
18
|
+
"academic",
|
|
19
|
+
"publication",
|
|
20
|
+
"tables",
|
|
21
|
+
"docx",
|
|
22
|
+
"journal",
|
|
23
|
+
"PRS",
|
|
24
|
+
]
|
|
25
|
+
classifiers = [
|
|
26
|
+
"Development Status :: 4 - Beta",
|
|
27
|
+
"Intended Audience :: Science/Research",
|
|
28
|
+
"License :: OSI Approved :: MIT License",
|
|
29
|
+
"Programming Language :: Python :: 3",
|
|
30
|
+
"Programming Language :: Python :: 3.10",
|
|
31
|
+
"Programming Language :: Python :: 3.11",
|
|
32
|
+
"Programming Language :: Python :: 3.12",
|
|
33
|
+
"Programming Language :: Python :: 3.13",
|
|
34
|
+
"Topic :: Scientific/Engineering",
|
|
35
|
+
"Topic :: Text Processing :: Markup",
|
|
36
|
+
]
|
|
37
|
+
dependencies = [
|
|
38
|
+
"python-docx>=1.0.0",
|
|
39
|
+
"pandas>=2.0.0",
|
|
40
|
+
]
|
|
41
|
+
|
|
42
|
+
[project.urls]
|
|
43
|
+
Homepage = "https://github.com/shakestzd/quartopress"
|
|
44
|
+
Repository = "https://github.com/shakestzd/quartopress"
|
|
45
|
+
Issues = "https://github.com/shakestzd/quartopress/issues"
|
|
46
|
+
|
|
47
|
+
[project.scripts]
|
|
48
|
+
quartopress-init = "quartopress.scaffold:main"
|
|
49
|
+
|
|
50
|
+
[tool.hatch.build.targets.sdist]
|
|
51
|
+
include = [
|
|
52
|
+
"quartopress/",
|
|
53
|
+
"templates/",
|
|
54
|
+
"agents/",
|
|
55
|
+
"skills/",
|
|
56
|
+
"commands/",
|
|
57
|
+
]
|
|
58
|
+
|
|
59
|
+
[tool.hatch.build.targets.wheel]
|
|
60
|
+
packages = ["quartopress"]
|
|
61
|
+
artifacts = [
|
|
62
|
+
"templates/**",
|
|
63
|
+
]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""quartopress — Quarto-based academic manuscript pipeline.
|
|
2
|
+
|
|
3
|
+
Build publication-ready tables, detect AI writing tells,
|
|
4
|
+
and generate journal upload packages.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from quartopress.table_builder import (
|
|
8
|
+
TableSpec,
|
|
9
|
+
build_prs_table,
|
|
10
|
+
build_prs_document,
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
__version__ = "0.1.0"
|
|
14
|
+
|
|
15
|
+
__all__ = [
|
|
16
|
+
"TableSpec",
|
|
17
|
+
"build_prs_table",
|
|
18
|
+
"build_prs_document",
|
|
19
|
+
]
|