AI paper-writing style guard: scans manuscripts for revision-process residue, defensive writing, and AI-writing tells (em-dash abuse, not-X-but-Y, LLM overused words, rule of three); writing_audit + writing_rules tools with auto-audit on paper file writes.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:xmutfyh/dsh-plugin-writing-guard
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time. Only install sources you trust, and pin a commit (github:owner/repo#sha).
README
A deterministic academic-writing linter for DeepSeek Harness (DSH).
Keeps your academic writing clean: it scans manuscripts for revision-process residue, claim-calibration issues, rhetorical patterns, LLM-associated vocabulary, and formatting tells — with document-type awareness and density-based thresholds. Auto-audits every paper file you write. Zero network, zero LLM cost (pure local regex/statistics).
Not an "AI detector" — a linter that knows what document it is checking and can explain why it flags something.
Install
# from GitHub (lib/ is committed — no build step needed)
dsh plugin --profile web add github:xmutfyh/dsh-plugin-writing-guard
# or from the GitHub tarball directly
dsh plugin --profile web add https://github.com/xmutfyh/dsh-plugin-writing-guard/archive/refs/heads/master.tar.gz
# restart to load
dsh web
Repo: https://github.com/xmutfyh/dsh-plugin-writing-guard
Document profiles (v0.3)
The same phrase means different things in different documents. Rules are scoped by document type:
| profile | meaning | e.g. "as requested by the reviewer" |
|---|---|---|
manuscript |
paper body | 🔴 revision residue — flagged |
rebuttal |
response letter | ✅ normal — not flagged |
cover_letter |
submission letter | 🔴 residue — flagged |
review / notes / unknown |
other | conservative |
Pass profile to writing_audit, or it is auto-detected from the file path.
What it catches
| Category | Typical issues |
|---|---|
| Process residue | "revised model", "as requested", "we have updated", CN "本轮/投稿前" |
| Claim calibration | "we do not claim", CN "本文并非要证明", self-deprecation; legitimate limitations statements are NOT flagged (ICMJE requires them) |
| Rhetorical patterns | "not X but Y", "rather than" abuse, absolutist definitions, rule of three |
| LLM-associated words | delve / tapestry / testament / leverage / harness… (density rule — a single occurrence is fine) |
| Academic style | "we believe/think", hedges, abstract adverbs; "significantly" only prompts review of non-statistical uses |
| Formatting | em-dash density (range en-dashes excluded), colon-title abuse |
Density thresholds (v0.3.3)
Frequency rules use per-1,000 language units: English rules use the English
word count, Chinese rules use CJK char count (bilingual files do not dilute each
other), with a double gate: count >= minCount AND count/denominator*1000 >= perK.
E.g. rather than: ≥4 and ≥1.0/1k; em-dash: ≥5 and ≥0.5/1k; LLM words: ≥2 and
≥0.4/1k; Chinese connectives: ≥8 and ≥2.0/1k chars. A 500-word abstract and a
12,000-word full paper no longer share one absolute threshold.
Preprocessing (v0.3.3, on by default)
Before auditing, non-prose content is stripped: YAML frontmatter, code fences,
inline code, LaTeX inline/block math, Markdown links (anchor text kept), bare
URLs, LaTeX commands; the References/Bibliography section is cut (# References,
References:, \section{References}, \begin{thebibliography} all supported).
Rules scan prose only — references/code/math/URLs never enter hits or density
denominators.
Confidence & evidence (v0.3)
Every rule carries confidence (high/medium/low) and evidence
(literature/style-guide/heuristic/project-specific). Reports show
🔴 HIGH · conf high, so you know which flags are deterministic rules
(e.g. revision residue) and which are probabilistic signals (e.g. LLM-word density).
Tools
| Tool | Purpose |
|---|---|
writing_audit |
Scan text or file; args: text/filePath, profile, verbose; returns severity+confidence sorted issues and full-text statistics |
writing_rules |
Return the discipline quick-reference (profiles + density) before drafting |
Auto audit (on by default)
Listens on tools/post-execute: after write/edit touches a paper-like file
(.md/.tex/.txt under manuscript/paper/revision/response/论文/修订/返修… or KB dirs),
it runs the audit automatically (profile auto-detected) and injects high-severity
findings as additionalContexts for the model's next request.
Configure in cordis.patch.yml:
- id: dsh-plugin-writing-guard
config:
autoAuditOnWrite: true
autoAuditMinSeverity: high
maxAutoInjectPerTurn: 2
verboseByDefault: false
autoBrief: false
projectResidueTerms: [] # project-internal terms appended to defaults
Tests
npm test # builds first, then 50 TP/TN/edge cases, no framework needed
Development
pnpm install && pnpm build # TypeScript -> lib/
# rule engine: src/rules.ts (zero dependencies, regex + statistics)
License
MIT
Links
More in this category
liustack/modlens★ 1463
Vision bridge for text-only models: paste an image, get structured JSON evidence (OCR, layout, semantics).
Anionex/dsh-vision-toolkit★ 372
Vision tasks for text-only models: intent-aware image Q&A, long-screenshot OCR, UI reproduction, grounding, and pixel diff.
zhaoolee/notes★ 141
Export DSH conversations as Smartisan Notes-style PNGs, or create and update Markdown notes in a configured account-scoped workspace.
Lum1104/dsh-browser★ 107
Chrome sidebar extension that lets DSH operate your browser directly, no vision capabilities required.
liustack/modsearch★ 98
Web search bridge for text-only agents: ask the web or X, get structured JSON evidence (search, fetch, citations).
ysr666/dsh-vision-router★ 83
Free vision for text-only agents: built-in keyless vision chain plus pixel tools (Q&A, grounding, crop, pixel diff, colors, OCR, SVG trace, cutout, screenshots); paste an image to use it.