DeepSHPlugins
dsh-plugin-writing-guard 專案預覽
GITHUB / COMMUNITY PROJECT

dsh-plugin-writing-guard

工具與整合JavaScriptMIT

論文寫作守衛(中英雙語):去掉 AI 式防禦性寫作,潤色時守住科學證據(數字/引用/主張強度/零結果/scope),並按目標期刊校準寫作風格(Journal Profile + Journal Fit)。純本地正則/統計,零網路零 LLM;提供 writing_rules / writing_audit / writing_style_profile / writing_journal_profile,論文寫入後自動審計。

35 Starsxmutfyh 更新時間 2026-09-04
訪問 GitHub 倉庫
dsh-plugin-writing-guard 專案預覽

專案介紹

中文

論文寫作守衛(中英雙語):去掉 AI 式防禦性寫作,潤色時守住科學證據(數字/引用/主張強度/零結果/scope),並按目標期刊校準寫作風格(Journal Profile + Journal Fit)。純本地正則/統計,零網路零 LLM;提供 writing_rules / writing_audit / writing_style_profile / writing_journal_profile,論文寫入後自動審計。

English

Academic writing guard (EN/ZH bilingual): removes AI-style defensive writing, protects scientific evidence (numbers, citations, claim strength, null findings, scope) during polishing, and calibrates writing toward a target journal (Journal Profile + Journal Fit). Deterministic local regex/statistics, zero network/LLM; writing_rules / writing_audit / writing_style_profile / writing_journal_profile with auto-audit on paper writes.

專案資訊與收錄訊號

快照 2026-09-11
作者 / 組織
xmutfyh
倉庫
xmutfyh/dsh-plugin-writing-guard
GitHub Stars
35
Forks
0
開發語言
JavaScript
許可證
MIT
最近推送
2026-09-04
Manifest
資料中檢測到宣告

公開倉庫不自動等於可商用;許可證與當前相容性以原專案文件為準。Manifest 和資料評分不構成安裝安全認證。

資料評分

81/ 100
維護活躍
96
文件與實用資訊
85
生態關注度
45
安裝便捷訊號
100
專案宣告訊號
100

近 7 天仍在更新;README 含完整安裝與使用說明;標準命令一鍵安裝。

評分來自已有資料快照的五維模型,僅作瀏覽參考,不是實際使用評測或安全檢測結論。

安裝與使用

所有專案資料與許可均以對應 GitHub 倉庫為準。

dsh plugin --profile web add dsh-plugin-writing-guard

複製命令不會自動執行。請先閱讀倉庫文件,確認環境要求與許可證。

專案截圖

倉庫 README

GitHub 原文

已儲存的倉庫文件快照;文件抓取時間未記錄,可能與上方目錄介紹處於不同版本。安裝前請核對當前倉庫說明。

儲存庫檔案保留原文,指令與授權文字不作自動改寫。

Writing Guard

CI npm License: MIT

Scientific Writing & Document Integrity Guard for AI-assisted research

Less explanation. More argument. Preserve the science.

Writing Guard combines prompt-guided scientific prose discipline with deterministic integrity checks for AI-assisted research. It protects your manuscript across five layers:

GuardProtects againstRisk
STYLEArgument economy防御性写作、过度解释、语义重复、模板腔
EVIDENCEScientific drift数值、单位、引用、结论被改
JOURNALJournal mismatchscope/style/convention 不匹配
DELIVERYContext leakageprompt、notes、workflow metadata 泄漏
DOCUMENT 🆕Document corruptionWord 格式、公式、表格、OOXML 被破坏

Prompt-guided writing · Deterministic integrity core · 394 Tests

npm install dsh-plugin-writing-guard
Writing Guard does not write your paper for you.
It makes AI-assisted writing safer to ship.

New in 2.0 — Argument Economy & Control-Plane Separation

Writing Guard 2.0 moves semantic style decisions before generation and keeps deterministic code focused on integrity.

  • Critique is not content — reviewer/user/guard wording is control context, not manuscript evidence.
  • Prefer CUT over REWRITE — if a sentence only prevents criticism, reassures reviewers, advertises importance, or repeats an obvious implication, delete it.
  • Do not close every semantic loop — stop after evidence + necessary interpretation; keep non-obvious statistical interpretation and reproducibility detail.
  • Style-only revisions default to same length or shorter — no explanatory inflation without new supported content.
  • Auto-audit no longer reinjects snippets or rewrite suggestions — only structured rule/action metadata is sent back to the agent.
  • New English/Chinese cues for defensive-purpose framing, semantic-closure markers, and content-free evaluation.

Example:

Avoid:  To prevent data leakage, normalization was carefully performed using only the training data.
Prefer: Normalization parameters were estimated from the training data.

The second sentence states the method fact without importing the defensive reason for mentioning it.


🛡️ Word Document Guard (introduced in 1.8)

Change what was requested. Verify what wasn't.

AI-assisted document editing introduces a subtle risk: the requested text may improve while unrelated parts of the manuscript silently change.

When you ask an AI agent to "rewrite paragraph 3 only," it may inadvertently modify:

  • equation structures
  • table borders
  • numbering
  • styles
  • section geometry
  • relationships
  • embedded media
  • OOXML package parts

Writing Guard 1.8 introduces a document-integrity layer for Word manuscripts:

FeatureWhat it does
Safe scoped editingOnly the specified range can change
Package validationVerifies DOCX/OOXML package integrity after editing
Structural fingerprintingCompares document structure before and after
Equation integrityChecks equation structure, numbering continuity, math-font drift
Scholarly table awarenessDistinguishes data tables from layout/figure containers
Pre/post integrity verificationDeterministic verification, not "I think it's fine"

Before / After

Without Writing Guard:

"Please improve the wording in paragraph 3."
→ AI agent modifies DOCX.
→ Result: paragraph looks better.
→ Unknown: what else changed?

With Writing Guard:

"Please improve the wording in paragraph 3."
→ Writing Guard:
   ✓ scope validated
   ✓ package valid
   ✓ equations preserved
   ✓ protected structures unchanged
   ✓ document fingerprint checked
→ Result: paragraph changed — and unintended document drift is detected.

Quick Start

# Install
dsh plugin add dsh-plugin-writing-guard

# Restart
dsh web

Natural Language Usage

Once installed, you can use natural language:

Say thisWriting Guard does this
"帮我检查论文写作质量"writing_word_audit
"把表格改成三线表"writing_word_format_tables
"扫描DOCX结构"writing_word_scan
"修改第三章的XXX"writing_word_edit
"编辑后验证范围"writing_word_scope_check
"检查有没有AI味"writing_audit

Five Guards — Detailed

STYLE — Argument Economy & Prose Discipline

Guides the host model before writing, then uses deterministic cues to audit mechanical, defensive, and over-explained prose:

  • Revision residue: revised, as requested, 本轮, 审稿人要求
  • Defensive writing: concession stacking, limitation pre-emption
  • Mechanical rhetoric: 不是X而是Y, rather than abuse, triple parallelism
  • LLM high-frequency words: delve / tapestry / testament (density-based)
  • Chinese patterns and average sentence length anomalies

EVIDENCE — Scholarship + Epistemic Lock

Protects scientific facts during AI editing:

  • Numbers, percentages, p-values, confidence intervals, units
  • Citations, Figure/Table numbers, DOI
  • Causal strength: associated with cannot become caused
  • Null findings: no significant difference cannot disappear
  • Scope boundaries and evidence status

JOURNAL — Target Journal Fit

Calibrates manuscript against target journal conventions:

  • Syntax structure (sentence length, paragraph length)
  • Voice and person (passive voice, first-person usage)
  • Citations (bibliographic, figure/table references)
  • Scientific claims (claim density, causal/evidential strength)
  • Rhetorical moves (coverage, canonical order)

DELIVERY — Context Leakage Detection

Stops workflow context from leaking into final artifacts:

  • Rejected alternatives
  • Revision process residue
  • Provenance leakage
  • Defensive hedge leakage

DOCUMENT — Word Document Integrity 🆕

Safely edit Word manuscripts without breaking structure:

writing_word_scan → writing_word_edit → writing_word_scope_check

13 tools for complete document integrity:

ToolPurpose
writing_word_scanStructural scan
writing_word_editSafe scoped editing
writing_word_auditWriting audit for .docx
writing_word_scope_checkScope integrity verification
writing_word_format_tablesThree-line table formatting
writing_word_audit_equationsOMML equation audit
writing_word_package_validateOOXML package validation
writing_word_fingerprintBaseline formatting fingerprint
writing_auditText writing audit
writing_rulesWriting guidelines
writing_style_profileAuthor style profile
writing_journal_profileJournal profile
writing_delivery_auditDelivery integrity audit

Installation

# From npm (recommended)
dsh plugin add dsh-plugin-writing-guard

# From GitHub
dsh plugin add github:xmutfyh/dsh-plugin-writing-guard

# From local source
dsh plugin add ./path/to/dsh-plugin-writing-guard

Prerequisites:

  • Node.js ≥ 18
  • Python 3.10+ with python-docx (pip install python-docx)

Architecture

Writing Guard
├── STYLE (writing_audit)
│   ├── Revision residue detection
│   ├── AI style patterns
│   └── Density-based thresholds
├── EVIDENCE (Scholarship/Epistemic Lock)
│   ├── Number/unit preservation
│   ├── Citation integrity
│   └── Claim strength conservation
├── JOURNAL (Journal Profile)
│   ├── Corpus-aware analysis
│   ├── Section-level comparison
│   └── Rhetorical move matching
├── DELIVERY (CAL Detection)
│   ├── Rejected alternative leakage
│   ├── Process residue
│   └── Baseline reality check
└── DOCUMENT (Word Guard) 🆕
    ├── Structural scanning
    ├── Safe editing
    ├── Package validation
    ├── Fingerprinting
    └── Equation audit

Design principle: Baseline manuscript > journal/template > plugin defaults.

The LLM/agent decides *what* should change. Deterministic Word code decides *how* to make that change without silently altering unrelated formatting.


Tests

npm test

394 deterministic tests covering:

  • STYLE, Scholarship Lock, Epistemic Lock
  • Claim alignment, local citation integrity
  • Journal Profile, Journal Fit
  • DELIVERY (CAL detection)
  • Word Guard (v1.8.2): OOXML validation, fingerprinting, equation audit

Security & Privacy

  • Deterministic integrity checks run locally; semantic writing decisions are handled by the host model under the Writing Guard policy.
  • The plugin only reads files being edited.
  • The plugin itself does not upload or collect manuscript content.
  • See SECURITY.md

Why Writing Guard?

Writing GuardHumanizerAI Detector
Pre-writing rules✅❌❌
During-writing checks✅Usually ❌❌
Auto-monitor manuscript✅❌❌
Full rewrite❌✅❌
Explainable issues✅PartialPartial
Deterministic integrity checks✅Usually noDepends
Humanizer rewrites after writing. Writing Guard prevents during writing.

Brand

                  WRITING GUARD
                       │
       Scientific Writing & Document Integrity
                       │
 ┌─────────┬──────────┬─────────┬──────────┬──────────┐
 STYLE   EVIDENCE   JOURNAL   DELIVERY   DOCUMENT
                                            │
                               Change what was requested.
                               Verify what wasn't.

Classic slogan: Less AI. More Evidence. Better Journal Fit. Clean Delivery.

Document slogan: Change what was requested. Verify what wasn't.


CHANGELOG

See CHANGELOG.md.

License

MIT

使用前核對

安裝步驟、相容版本與授權範圍以原專案當前文件為準。Stars 和評分是快照中的導航訊號。

安裝與排錯 · 專案問題反饋

同類專案