whh110112/human-writing-skills

human-writing-skills

多语言润色、长文分块协作与上下文一致性审查,按需检查 DSH 智能体委派能力。需要 PATH 上有 Python 3.9+。

未分類agent-skillsai-humanizerai-writing

Advanced Human Writing & AI Humanizer

Human Writing: fountain-pen handwriting with terminal code on a milk-white background

Make AI-assisted writing more natural with multilingual editing, chunked long-form collaboration, and continuity review, available as Skills and a DSH plugin.

Advanced AI humanizer and de-AI writing toolkit for natural rewriting, AI text cleanup, fiction editing, novel continuation, chunked long-form audit, writing style unification, and character consistency review.

中文说明 | English | Español | Português (Brasil) | Français

DeepSeek Harness plugin: generate novels, papers, and reports with generation-time quality guidance and local review tools. Install the complete bundled runtime:

dsh plugin --profile web add https://github.com/whh110112/human-writing-skills/releases/download/dsh-v0.3.1/dsh-advanced-human-writing.tgz

Use desktop for the desktop profile. Python 3.9+ required; no separate core pip install. See DSH compatibility and usage.

Advanced Human Writing & AI Humanizer is an open-source, modular skill pack and lightweight prompt compiler for natural multilingual AI-assisted writing. The package, repository, and ClawHub slug remain human-writing-skills for compatibility.

This is not an empty prompt collection. The repository contains two deliberately different capability layers:

  • Executable Python tools: humanwriting/ provides the installable human-writing-skills CLI for deterministic lint findings with evidence spans, text statistics, conservative fix previews, protected-content verification, prompt compilation, and staged audit-file generation.
  • Model-executed editorial modules: skills/*.md contains genre and review instructions selected on demand by that compiler. These modules guide the writing model; they do not falsely present subjective literary judgment as a deterministic algorithm.

The test suite exercises both the executable layer and module-selection gates.

Agent Orchestration, MCP, And DeepSeek Harness Plugin

DSH agent mode can inspect its actual, scope-visible delegation schema through writing__human-writing__agent_capabilities (custom tool names are configurable). Discovery is on demand and does not start agents or override model/preset settings. Native children receive full role assignments; oversized assignments use paged files. Claims expose their lease and can be renewed by the same identity before expiry. Official DSH 0.2.1-rc.2 Cordis/MCP integration is tested; live-model child execution still depends on the host's provider, driver, permissions and available capacity.

Outline-To-Manuscript Multi-Agent Writing

New long prose can use five roles: outline checker, chunk planner, writers, independent editors for every block, and a final continuity editor. A 60,000-character target with 5,000-character blocks creates twelve writing jobs and their reviews. Each writer receives its assigned outline and approved incoming state; editorial receipts cover every paragraph, and final review covers every adjacent boundary. Revision requests reopen affected writers and invalidate dependent approvals.

human-writing-skills plan-writing --outline outline.md --context ledger.md --style fiction --target-length 60000 --chunk-size 5000 --output-dir book-writing
human-writing-skills writing-tasks --package-dir book-writing

Default dependencies are sequential. Explicit --execution-mode contract allows parallel independent blocks with agreed entry/exit states and --max-parallel 4. Use --length-unit words for word targets. The host supplies native subagents; DSH loads the detailed orchestration protocol only for long output or an explicit multi-agent request. Workflow, result schemas and recovery.

Shared Review State

For book-length novels, report series, or research coverage that cannot be trusted to one chat window, install the dependency-free human-writing-mcp server. It makes the long-form task graph executable across Codex, Claude Code, OpenCode, DeepSeek Harness, Manus, and Hermes: agents claim bounded tasks, submit coverage receipts, and cannot unlock reconciliation until every required review is complete. The service stays inside a chosen project root and does not call a model or upload drafts.

human-writing-mcp --root C:\writing-project

The repository also ships a native DeepSeek Harness npm/Cordis bundle under plugins/deepseek-harness. It mounts the official DSH MCP client and starts the same verified local coordination service. See the agent orchestration guide and DeepSeek Harness plugin guide.

The MCP server also supports day-to-day single-document work: lint_text, get_style_statistics, verify_protected_content, verify_fidelity, compile_humanize_prompt, compile_audit_prompt, and compile_ledger_extraction. It advertises a small native prompt menu (humanize-quick, dialogue-audit, continuity-audit, serious-rewrite, and more) for hosts that implement MCP Prompts. These tools stay local and return evidence or compiled instructions; they never send a draft to a model themselves.

Ledger Auto-Extraction And Project Defaults

Long-form continuity should not require hand-maintaining every fact from scratch. extract-ledger compiles an evidence-first prompt for turning existing chapters into a candidate continuity ledger. Its output distinguishes observed facts, inferences, conflicts, and unknowns, and requires a quote or location for every proposed state, object, obligation, injury, resource change, or spatial relation. Review it before making it canonical.

human-writing-skills extract-ledger --draft chapters-01-10.md --context novel-ledger.md --output ledger-extraction-prompt.md

Use .humanwriting.json in a project root to persist only lightweight defaults: style, document type, a relative ledger path, and lint allow-list entries. Explicit CLI flags win, and the file cannot silently activate deep profiles or expensive reference/source passes. See the ledger extraction guide. Pass --no-project-config when a one-off command must ignore the nearest project file.

{
  "style": "fiction",
  "document_type": "fiction",
  "context": "novel-ledger.md",
  "allow": ["END001"]
}

Editor, CI, And Python Distribution

Text-facing commands accept --draft - for standard input. lint --format github emits GitHub Actions annotations, while list --kind rule prints the current rule catalog with severity, category, and repair direction.

git diff -- docs\ | human-writing-skills lint --draft - --style general --format github --source-name docs-change.md
human-writing-skills list --kind rule --format json

Each GitHub Release builds a wheel and source distribution, then attaches them as Release assets. PyPI publication uses GitHub Trusted Publishing only after the repository variable PYPI_PUBLISH_ENABLED=true and the PyPI trusted publisher have been configured; no PyPI token is stored in this repository.

It helps a writing agent move away from generic, template-shaped output and toward prose that has intention, texture, continuity, and genre discipline. The project is especially useful for long-form generation, where characters, settings, arguments, facts, and unresolved threads often drift after several passages.

The goal is not deception. The goal is better writing: clearer instructions, stronger revision habits, and reusable style constraints that make AI-assisted drafts feel edited by a human.

Generation-Time Quality And Independent Review

build, humanize, and the MCP compile_generation_prompt tool now include a compact generation-quality protocol by default. It prevents repeated rhetorical moves, padded explanations, decorative details, invented specificity, translation-like register, and unearned endings while writing. Fiction receives scene/dialogue priorities; factual prose receives reader-purpose and evidence priorities. Full ending and other deep audits remain opt-in. Direct emotion labels, deliberate repetition, smooth formal prose, and useful conclusions are valid; no roughness or sensory-detail quota applies.

Explicit sources also support factual self-media and argumentative essays. Rewrites with an original automatically preserve evidenced voice as well as meaning.

human-writing-skills build --style self-media --task "Explain the supplied test results for buyers." --source test-notes.md
human-writing-skills critique --draft article.md --style self-media --output diagnosis.md
human-writing-skills compare-blind --original original.md --candidate revised.md --style self-media --brief writing-brief.md --output-dir blind-review
human-writing-skills stats --draft article.md --language de --format json
human-writing-skills evaluate-editorial --cases ballots.json --format json

Send only blind-review/comparison.md to an independent reviewer and retain version-key.json locally. These commands compile prompts or aggregate recorded ratings; they never call a model. See editorial evaluation. Real-world quality still requires independent fluent reviewers; unit tests do not prove naturalness. Compact-review and deep-rewrite character budgets are 25,000 and 34,000 respectively (quick rewrite remains below 15,000 on the regression fixture).

Long-Form Audit And Style Unification

Optional chunk-audit --book-level adds one whole-book architecture pass after chunk reports for fiction/webnovels with at least three chapter headings. It checks consequential choices, conflict development, time movement, and over-explained ambiguity. It is not loaded into every chunk or serious report.

The executable chunk-audit workflow splits a year-long novel, article series, or large report at natural boundaries. Each body span is audited once, with a small read-only lead-in and the same user-confirmed style baseline plus outline or project ledger. It writes independent chunk prompts, deterministic cross-chunk style diagnostics, and a reconciliation prompt for model- or prompt-version drift in narration, character dialogue, terminology, and section function.

For fiction, --outline or --context makes supported goals, knowledge, relationships, limits, abilities, and speaker voice canonical. Without it, character inferences remain provisional. News, academic, official, and report workflows instead align terminology, facts, attribution, claim scope, and section purpose without loading fiction rules.

human-writing-skills chunk-audit --draft full-novel.md --style fiction --outline novel-outline.md --output-dir novel-audit
human-writing-skills chunk-audit --draft full-novel.md --style fiction --outline novel-outline.md --book-level --output-dir book-audit

Discovery terms: long-form audit, chunked manuscript audit, writing style unification, style consistency review, character consistency audit, cross-chapter continuity, novel audit, and report review. See the long-form consistency guide.

Earned Scene And Document Endings

AI-assisted drafts often reach a real stopping point and then append a scenic dissolve, shared silence, life lesson, future-facing reflection, or summary of what the scene already showed. The earned-ending-audit finds this reflective bookend / false closure pattern in Chinese and English by locating the last meaningful change and applying a deletion test. It does not ban sunsets, silence, reflection, or lyrical prose.

  • Fiction and webnovels stop on an earned consequence, decision, discovery, changed object, live pressure, or image whose meaning changed inside the scene.
  • Hard news ends on the last useful verified fact, response, constraint, or next step; feature kickers must add meaning instead of manufacturing uplift.
  • Academic, technical, and official writing ends with supported findings, limits, implications, decisions, owners, or deadlines rather than a ceremonial conclusion.
human-writing-skills audit --draft chapter.md --document-type fiction --profile ending
human-writing-skills lint --draft chapter.md --style fiction

The full module loads only through the explicit ending profile, while END001 provides a lightweight deterministic preflight for narrative endings. Discovery terms: AI story ending, reflective ending, scene ending audit, chapter ending audit, formulaic conclusion, false closure, AI reflective bookend, and can't-help-but-reflect ending.

Repetition, Exposition, And Scene Economy

Some drafts avoid obvious stock phrases yet still feel generated because they repeat a line, image, action sequence, or narrator explanation with no changed consequence. The narrative-only repetition-exposition-audit separates intentional refrains and needed recap from exact echoes, repeated choreography, inventory-like viewpoint scans, and explanation that merely tells the reader what dialogue or action already showed.

# Isolated, token-bounded narrative pass
human-writing-skills audit --draft chapter.md --document-type fiction --profile repetition

# Long drafts: add it only when matching narrative cues appear
human-writing-skills pipeline --draft chapter.md --lint-style fiction --auto --output-dir chapter-audit

REP001 flags a non-trivial verbatim sentence echo; NAT005 and NAT006 are low-severity density prompts for repeated interpretive narration and action frames. They are editing evidence, not authorship claims, and can be allowlisted. Quick humanization and serious-document workflows do not load this module.

Why This Exists

AI writing often fails in predictable ways:

ProblemWhat this project adds
Generic "AI voice"Concrete revision checks for rhythm, specificity, and empty phrasing
Repeated not-X/is-Y, is-X/not-Y, or chained Chinese 比 framesFamily- and density-based checks that preserve necessary correction and real comparison
Rewriting silently changes facts, uncertainty, or causal meaningAn opt-in original-text fidelity pass with a claim ledger and invention checks
Humanizing washes out hesitation, motifs, subtext, or speaker identityA source-backed preservation ledger that separates useful ambiguity from real defects
Fluent-looking sentences drop a word, object, or connector clauseA separate final pass over predicate slots, parallel structure, and references
Surface AI patterns recur across a passageGenre-aware checks for vague attribution, inflated significance, false ranges, synonym cycling, formatting habits, and comparison ladders
Fiction is chopped up by time/place mini-headingsNarrative-only checks that preserve titles and chapters but require scene changes to move through prose
A finished scene grows a scenic, reflective, or moralizing tailLast-meaningful-change and deletion tests for false closure, with genre-specific ending contracts
A scene replays the same action, reaction, or explanation until it becomes mechanicalNarrative-only evidence for exact echoes, repeated action frames, viewpoint inventory, and redundant gloss
One style fits every genreSeparate Markdown SKILLS for different writing forms
Long text loses continuityA compact ledger for facts, plot, promises, and voice anchors
Prose and character dialogue drift across months or model versionsA fixed baseline, canonical outline, unique audit chunks, and cross-chunk reconciliation
Dialogue sounds interchangeable or out of characterGeneration and review against baseline voice, scene goal, knowledge, audience, and pressure
Dialogue ends in a stock gesture or scenic gloss instead of a real exchangeA dialogue-performance pass checks listener uptake, purposeful physical beats, and the changed option or carried debt
Dialect, honorifics, particles, or foreign language jump between charactersAn evidence-backed language-identity card with motivated switch gates
A consequential line or action receives no uptake before the prose cuts awayResponse-obligation checks and deferred interaction debt
Power, skill, authority, equipment, injury, or resources driftPermanent/temporary state separation and earned transition gates
Prompts become messyA CLI that compiles style, context, and task into one clean instruction pack
Advice stays abstractRules are written as observable editing actions

Built-In Style Skills

SkillUse it forMain focus
fictionliterary or commercial fictionpoint of view, scene pressure, character behavior
argumentativeessays and opinion piecesthesis, evidence, counterargument, logical flow
news-reportnews-style reportsfactual order, attribution, neutral wording
self-mediasocial posts and creator essaysuseful voice without empty hype
academic-paperresearch writingcautious claims, structure, terminology
formal-documentofficial and administrative documentsauthority, scope, responsibility, action, deadline, restrained register
webnovelserialized genre fictionhooks, payoffs, power rules, continuity

Deep Human-Trace Modules

These modules target deeper AI-writing artifacts, not only surface phrases.

ModuleWhat it repairs
controlled-driftoverly smooth logic, no associative movement, no unfinished thought
narrative-bridgesweak scene turns, generic transitions, paragraphs that do not cause each other
relationship-staterelationships that reset, dialogue without leverage, forgotten secrets or boundaries
relationship-stance-auditaudience-specific stance checks for rivalries, affairs, factions, hierarchy, sects, and family politics
logic-causality-auditcause, timeline, knowledge, motive, rule, resource, and consequence failures
character-consistency-auditcharacter goal, voice, competence, boundary, knowledge, and change-gate drift
dialogue-voice-auditcharacter-fit dialogue plus verbal, physical, silent, interrupted, or deferred uptake for consequential turns
dialogue-performance-audituses the voice audit's response map to test whether a physical beat changes the exchange rather than decorating it
speech-register-continuityevidence-backed language, dialect exposure, honorifics, particles, address, and switch gates
capability-state-auditpower, skill, authority, equipment, injury, resources, cooldowns, counters, and transitions
serial-reentryrecap dumps and chapter resets when prior chapters or a ledger are supplied
long-form-style-consistencychunked long-form style, character-setting, and speaker-voice reconciliation
chapter-momentum-auditatmosphere-only chapters, missing payoffs, discarded residue, and unsupported hooks
world-ontology-auditincompatible era, technology, institution, social practice, or speculative rule
process-earnedness-auditpromised processes skipped before an unsupported result
attention-budget-auditlow-value expansion and semantic echoes displacing consequential material
chapter-pattern-auditrepeated chapter architecture across three or more chapters
story-architecture-auditopt-in whole-book decisions, escalation, temporal shape, and ambiguity with chapter evidence
narrative-distance-controlunmotivated zoom, missing orientation, and viewpoint-distance drift
imagery-load-auditstacked comparisons, competing sensory channels, and show-then-gloss repetition
paragraph-rhythm-auditmechanical one-line paragraph runs and overloaded long blocks
detail-disclosure-auditbiography and appearance inventories delivered before the scene uses them
scene-entry-auditexact-time/location/weather/outfit opening bundles before pressure-bearing action
natural-measurementfalse precision: tiny exact measures and counted micro-actions in narrative prose
cliche-phrase-auditstock phrases, generic body cues, empty emotion labels, and dead transitions
formulaic-structure-audittriplets, bidirectional contrast frames, chained comparisons, and overly neat closure
prose-progress-auditstatic paragraphs and pressure-bearing interactions abandoned before uptake or explicit deferral
narrative-naturalness-auditin deep or explicit AI-trace review, catches recurring six-beat scene recipes and copied entry/closure cadence
repetition-exposition-auditnarrative-only exact echoes, repeated action choreography, inventory drift, and redundant explanatory narration
earned-ending-auditreflective bookends, scenic dissolves, false closure, stock kickers, and conclusions added after the last meaningful change
imperfect-proseprose that is too clean, too symmetrical, or too polished
vocal-rhythmflat cadence and missing read-aloud breath points
embodied-emotionemotion labels without body, action, contradiction, or perception
cultural-anchorsvacuum prose with no era, place, community, or material detail
spatial-blockingcharacter teleportation and confused front/back/left/right blocking
occupancy-capacityover-occupied or mode-ambiguous seats, benches, beds, stools, aisles, and surfaces
appearance-prop-continuityclothing, shoes, props, injuries, and daily-detail drift
physical-continuity-auditoptional light manual checklist; do not combine with the forensic physical profile
proofreading-auditfinal omissions, predicate slots, stranded connectors, references, punctuation, naming, and layout
style-matrixthe mistake of applying one generic "human voice" to every genre
editor-loopone-shot drafting without a critical human-editor pass
ai-trace-rubricvague feedback like "sounds AI" without diagnosis
reference-style-alignmentexplicit reference material into transferable voice features without copying content
rewrite-fidelitymeaning drift, invented specificity, reversed polarity, and altered uncertainty when an original is supplied
voice-ambiguity-preservationover-clean rewrites that erase useful ambiguity, repetition, motifs, hesitation, subtext, or speaker markers
humanize-examplesan explicit-only before/after repair library; never loaded as a source or default style sample
surface-pattern-auditrecurrent formatting, false ranges, synonym cycling, and narrative mini-headings without global bans
protected-contentaccidental changes to numbers, citations, equations, URLs, code, quotes, and required terms
source-groundingclaim-to-source checks for serious documents with explicit factual sources

Quick Start

git clone https://github.com/whh110112/human-writing-skills.git
cd human-writing-skills
python -m pip install .

human-writing-skills list --kind style
human-writing-skills list --kind module
human-writing-skills build --style fiction --context examples/story-ledger.md --task "Write the next scene."
human-writing-skills humanize --draft chapter.md --style fiction --mode quick
human-writing-skills chunk-audit --draft full-novel.md --style fiction --outline novel-outli