Long-form Chinese Writing System
Main Entry: Only carries "routing + trigger boundaries + global meta-instructions + high-frequency iron rules." All stage-specific details must be lazy-loaded from the corresponding references. In the text below, bare xxx.md always refers to references/xxx.md (files under profile/corpus/authors/ and profile/ already have full paths).
🔴 Default = fully automatic all the way to the drafts folder, no mid-way questions: As long as this skill is asked to write an article (including ordinary "write an article / help me write…", without the "full process" command), the default is to follow autopilot.md to complete outline→content enhancement→body→title→layout→images→BGM→publish draft, never stop at layout stage, never pop up a "1/2/3" menu after outline/layout. On failure, self-correct according to suggestions, do not skip or bypass. Only three types of stops allowed: ① Hard block (cover image repeatedly fails / credentials invalid / self-check Error cannot be fixed); ② Beginning candidate blind selection (the only legally mandated creation pause point; if user not present, take defaults and continue); ③ User explicitly says "wait for my confirmation at each step / step by step."
🟢 Must Read Before Starting (Meta-Instructions, Before Any Stage)
Before entering any stage, first read the two shared contexts in order. After reading, do not ask for known information (theme color / account name / creator background). Only ask for parameters that change for this task (style / audience / word count):
- Brand Context
profile/context.md(brand identity / persona / style routing / conversation conventions); if profile is not configured, fall back toprofile.example/context.mdin the repo (neutral defaults, not an error on the normal path); if neither exists, fall back to the "Brand Identity Fallback" section of this file. - Brand Web (Optional)
profile/brand-net.md(territory map / foreshadowing pool / commitment ledger). If it exists, the three weaving questions in outline Step 7.5 must be answered (link to existing posts / push owned territories / foreshadow), with answers written toarticle-meta.yamlunderweave:(see outline.md Step 7.5 for details); archive the wishes made in this article into brand-net.md §4. If the file does not exist, skip the weaving phase without error (weaving is an optional feature).
The profile directory is specified by the environment variable
SANSHENG_WRITE_PROFILE_DIR(if not configured, falls back toprofile.example/in the repo). The entry point isscripts/profile_config.py. Multi-stage tasks: complete one stage before reading the next; do not read everything at once.
🔁 Recovery Protocol (Meta-Instruction)
Upon entering any {data directory}/{N}-{topic name}/ directory, first thing run python "$SKILL/scripts/pipeline.py" status to get stage status and next steps. After each stage is complete, update with verify <stage>/done <stage>. Recover with status after interruption. $SKILL = root of this skill repo (absolute path resolved automatically at runtime); data directory is specified by environment variable SANSHENG_WRITE_DATA_DIR (if not configured, <repo root>/data/).
Quick Route (🔴 = Must Read Before Entering This Stage)
| Intent (including necessary constraints for that line) | Read |
|---|---|
| New topic / Write an article / Discuss direction | outline.md |
Expand into body / Continue writing / Revise (before writing, run prep_writing.py to aggregate _prep-context.md then go through 7 preparation steps) | writing.md + corresponding chapter in style-routes.md + profile/corpus/authors/{X}.compact.md |
| Generate a few versions of beginning for blind selection / Choose a beginning / Change beginning (2-3 hook A/B/C blind selection without reasons, the only legally mandated pause point for autopilot) | writing.md §Beginning Candidate Blind Selection |
| Content enhancement / Material not sharp enough (4 strategies, after outline but before writing) | content-enhance.md |
| Generate titles (output 5 candidates inline + ranking) | title.md |
| Writing techniques / Opening and ending / Memorable quotes | craft-techniques.md |
| Genre-specific (tutorial/methodology checklist/technical analysis, only these three genres load; selection of genre from three options is in outline Step 3) | writing-genres.md |
| Remove AI flavor / Polish draft | anti-ai-filter.md |
Cold-read external review (after polishing but before layout, dispatch different model family subagents, produces _stutter-list.md, runs in parallel window with fact-check) | semantic-review.md |
Fact-check / Verify data version prices (after polishing but before layout, dispatch context-free subagent, produces _fact-check.md, preflight hard assertion exit 2) | fact-check.md |
| Layout / Convert to HTML / Table of contents bar | layout.md |
| Layout compatibility / Tables / Cards / Platform filtering | wechat-compat.md |
| Layout troubleshooting / Style anomalies (on demand, not for daily SOP) | layout-reference.md |
| 🔴 Must read before changing any color/radius (visual SSOT, change once globally effective) | design-tokens.md |
| 🔴 Must read before any image generation; for real people and real events, actively search for real news photos, crop to 16:9, AI generation of person portraits prohibited (news figures/major events same rule) | image-routing.md |
🔴 Generate cover image / Select style (locked to montage-evidence, automatically selects / avoid last 3 articles if already used; remaining 4 styles only activated by cover_style in meta) | cover-styles.md |
Generate music / BGM / Theme song (MiniMax music-2.6-free) | music.md |
| Publish / Send to drafts / After finalization | publish.md |
| Convert to graphic/text / Split into graphic/text | xhs-storyboard.md |
Full-process autopilot (orchestrator default on = fan-out parallel / off = serial, pipeline.py orchestrator on/off to toggle) | autopilot.md + orchestration.md + agent-contracts.md |
| 🔴 Check iron rules / Confirm constraints (must read before entering publish/layout/image generation) | iron-rules.md |
| Learn an article's layout (Agent fetches URL → analyzes → writes to layout reference library) | — |
| I made edits / Learn from my edits (extract pattern from draft vs final diff, write playbook.md) | learn-edits.md |
| Review skill / Skill introspection / Evolution | skill-review.md |
Sub-command shortcuts: write topic/write outline→outline | write body/write expand→writing | write beginning candidates/blind select beginning/choose beginning→writing §Beginning Candidate Blind Selection | write title→title | write music/write BGM→music | write layout→layout | write publish→publish | write graphic/text/convert to graphic/text→xhs-storyboard | write status/write progress→pipeline.py status | full process/go through process→autopilot | review skill/skill introspection/skill retrospective/skill evolution→skill-review
✍️ Six Core Writing Principles (Semantic Layer Positive Rules — Table of Contents for Six Chapter Pointers, Single Source of Truth only)
🔴 This section is just a table of contents pointer, not an independently executable "sufficient version" — the abstract is present and the model will skip the body (known failure mode). During the writing phase, truly internalize
_prep-context.md(rendered byprep_writing.py, §0 three principles at top). During the polishing phase, check each pointer by going into the corresponding chapter and ticking off one by one; don't just look at the table of contents. 🟡 Honest boundaries: The six principles are only "feed material before writing + self-aware inspection after writing"; no machine post-writing verification;exit 2hard gate only catches regex/count-detectable surface fingerprints (cliché blacklist, half-width punctuation, whole-sentence bold count). Semantic human touch cannot be forced by regex, same-model self-review cannot detect it, only by cross-model semantic differential (semantic-review.md). Don't assume it has been machine-implemented.
- So What Deliver (argument asks reader "so what?" and answers) → anti-ai-filter.md §8.1
- Analogy Grounding (abstract judgment paired with everyday analogy) → anti-ai-filter.md
- Anomalous Detail Anchor (in key scenes, give concrete details that are so unusual they don't seem fabricated) → anti-ai-filter.md §2.3.5
- Write Yourself Dumb (don't establish authority, trade self-deprecation for trust) → anti-ai-filter.md §6.1
- Concrete Paragraph Lead (BLOT) (first sentence of each paragraph gives a specific person/thing/scene/number) → writing.md §Density Rule 9
- Inter-sentence Gravity (last sentence leaves a hook, first sentence of next catches it; anadiplosis + old info first, new info after) → Single source writing.md §Inter-sentence Gravity
Special Conventions (Used for Every Dialog Turn in Conversation)
- 「」Annotations: Content inside 「」 is annotation, not body text—instruction-type is executed directly, reference-type is used as context. 「Material」 Mark: Assigned to material sorting table. 「Into Bag」 Mark: Automatically deposits into the corresponding category of profile's topic reserve files as topic reserve.
- Automatic Material Reading: At the start of conversation, check the working directory for
素材/(materials). If any content exists, read it all. Fact Verification: Search directly for facts/data that need verification; do not ask the creator. - 🔴 Em dashes uniformly
--: All dashes in text intended for readers use two English hyphens--. Full-width em dashes are prohibited. - 🔴 Iron Rules Outline iron-rules.md: Concentrates all hard constraints (layout→publish sequence/memorable quote card decorative quotation marks prohibited/opening strategy branching/image generation backend/component small images/data image anti-hallucination/information source format/AUDIO-CARD position/knowledge graph position/timeline H3/article guide/sensitive topic wording to avoid takedown/non-skippable stages/publish integrity). Must read before entering publish/layout/image generation.
🔄 Skill Introspection Mechanism
At runtime, contracts.py/format_layout.py/pipeline.py append the results of each verify gate to $SKILL/_skill-observations.jsonl (zero cost). When the user says "review skill" (recommended every 8-10 articles), go through skill-review.md to dispatch an observer agent to produce a report; the observer only diagnoses, changes are decided by the user.
Layout Template / Configuration / Publish Script
- HTML Component Templates (table of contents bar/H2-PART/H3 timeline/Case/Key Points/Memorable Quote Card/Link Card/Deep Read/Recommendation/Follow Card) in
templates/; layout goes to layout.md to see the workflow and component list, read code fromtemplates/. 🔴 Memorable quote card prohibits“(may render as garbled on some platforms), source line = hairline + faded right-aligned. article-meta.yaml: Persistent parameters per article directory (table of contents text/H2 style/cover keywords/weave/modifier_style, templatetemplates/article-meta.template.yaml), automatically read byformat_layout.py, CLI parameters take precedence.- Publish/Post-processing Scripts (
pipeline.py+archive/format_layout.pycontract gates /add_logo.js/compress_images.py/generate_article_bgm.py/generate_recommend_html.py) Usage goes to publish.md. Hard constraints: ① ⚠️--check≠ passing the publish contract gate; for verification useformat_layout.py --all --check; ②archivemust firstdone publish wechat_url=...or it will exit immediately due to missing link; ③ 🔴 Do not manually editarticles.md(it is an auto-generated rendering view from archive). The one-timemigrate_to_works.pyhas an overwrite prevention bar and is only migrated once manually.
Runtime Data Files (Corpus Pool, Do Not Copy Full Segments into Context)
- Unified SSOT
{data directory}/works.yaml: One entry per article + video. Before writing/illustration, first read the last 3 articles for dimension/closing/style deduplication; after publishing,archivewrites.articles.mdand作品库看板.html(works dashboard) are its rendering views (🔴 do not manually edit); oldhistory.yamlhas been replaced and is no longer written to. prep_writing.pyautomatically aggregates into_prep-context.mdbefore writing (no need to manually browse): Profile corpus pool's style example library / memorable quote library (by topic) / counterexample library / voice corpus (gate: >200 characters ≈ 2-3 paragraphs is injected) +profile/corpus/authors/{X}.compact.md(user-provided author style guide; when no user-provided guide exists, inject the in-repo originalprofile/corpus/voice-samples.mdas a basic human-touch fallback).- Manual Reading by Topic (Not Automatic): If the profile has a curated sample library
profile/corpus/samples/{author}/, before writing, based on the current style route, selectively read 2-3 articles (if no corresponding author, fall back toprofile/corpus/voice-samples.md). Check the brand specifications / topic reserve files in profile as needed.
Finished Output Directory
{data directory}/{N}-{topic name}/
├── outline.md ← outline ├── final draft.md ← writing ├── final draft.html ← layout └── materials/ ← all AI-generated images
Numbering increments sequentially from the largest existing number in {data directory}/.
Brand Identity (Fallback — Normally, Priority is to Read profile/context.md)
⚠️ Only when both
profile/context.mdand its fallbackprofile.example/context.mddo not exist, the following section takes precedence.
- Brand Name / Account Name: Provided by profile (see example in
profile.example/context.md) | Theme Color (primary):#2F6F8F(neutral slate; to change style see design-tokens.md; six built-in themes: slate/ink/sage/jade/amber/plum, seeprofile/brand.yaml) - Style Route: The main route is the user-provided author style guide (
profile/corpus/authors/*.compact.md) select exactly one; can be combined with 0-1 modifier guides (not used as main route); genre is one of three options (in-depth/article/tutorial/methodology checklist, details in outline Step 3). Full list and combination mechanism see style-routes.md (modifier is automatically combined into _prep-context byprep_writing.py). When no user-provided guide exists, fall back toprofile/corpus/voice-samples.md. - Brand Specifications / Creator Persona:
profile/context.md(neutral example inprofile.example/).
When NOT to Use (Reverse Routing: Delegate to Other Tools / Do Not Trigger)
| User Intent | Should Use | Do Not Use This Skill |
|---|---|---|
| First research/understand the topic, see what各方 say (then decide whether to write) | Your usual research tool (multi-source + cross-verification + summary) | Research goes to research tool; "whether the topic is worth writing" is done by this skill's "write topic" stage |
| Polish/forge a single title (no body) | This skill's "write title" (title.md) | Pure title polishing belongs to this skill's inline forging |
| Published article data review/follower growth/readership diagnosis | Your data analysis tool | This skill does not process published data |
| Convert written article to short video voiceover/storyboard | Your video skill | This skill outputs articles, not video scripts; after final draft, hand over video to video tool, do not overreach and write voiceover |
| General Chinese writing (no brand constraints needed) | Native writing is sufficient | Brand constraints will contaminate general writing |
| English content / Pure code / Git sync / Environment configuration | Default workflow | This skill is designed for long-form Chinese writing |
Handover Rules · Topic/Material Research Diversion: Light material (verify one fact/supplement one number/check one name/confirm time price) → directly search using WebSearch, do not trigger a research tool; Deep material (controversial/multi-platform reputation/cross-verification to eliminate falsehoods/international + domestic coverage/systematic background timeline, or user says "find out clearly/各方 say/whether it's true/cross-verify") → delegate to your usual research tool, when writing, manually cite its factual foundation and sources—do not automatically inject material, do not pre-fill meta. When in doubt, default to light material search yourself.
references Three-Level Hierarchy (Stratified by Loading Timing)
- L1 · Must Read on Startup (Cross-stage Invariants, 2 items): iron-rules (must expand before entering publish/layout/image generation), autopilot ("write article" main path cockpit). — The items that are truly unconditionally read every session are
profile/context.md+ optionalprofile/brand-net.md(not part of references, see above startup meta-instructions). - L2 · Stage On-Demand (Loaded on Route Trigger): Main flow references (i.e., those listed in the "Quick Route" table above) +
profile/corpus/authors/*.compact.md(user-provided, variable count, automatically aggregated by prep_writing.py). - L3 · Troubleshooting On-Demand (Low Frequency/Advanced/Historical, Not Read Daily): layout-reference / orchestration / agent-contracts / learn-edits / skill-review /
_archive/后备技法池.md(fallback technique pool, only read when the main craft-techniques pool is insufficient).