with one click
dasheng-stage-rewrite-v3
Stage 5 Rewrite v3 - 渠道改写(集成增强质量评分和锚点映射)
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Stage 5 Rewrite v3 - 渠道改写(集成增强质量评分和锚点映射)
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Use when Dasheng Publish needs to route Xiaohongshu publishing or content access through API-first CLI, MCP, or browser fallback bridges.
Use when Dasheng Publish needs to prepare, upload, or package Bilibili video submissions from completed transwrite video channel packs.
Use when running Stage 3 Draft from approved Brief topics and producing Reasoning Sheets, standard drafts, and draft quality gates.
Use when the workflow enters Postmortem after Publish and published content needs to be evaluated with performance data, Publish Guard status, accuracy checks, and knowledge-base writeback suggestions.
Use when Dasheng draft or transwrite needs HTML Anything templates, editable article HTML, social cards, posters, or visual HTML references.
Use when Dasheng transwrite needs no-human or human-material talking-head videos rendered through the local html-video project.
| name | dasheng-stage-rewrite-v3 |
| description | Stage 5 Rewrite v3 - 渠道改写(集成增强质量评分和锚点映射) |
| version | 3.0.0 |
| stage | rewrite |
| runner | node |
Stage 5 Rewrite v3 是大声自媒体创作工作台的渠道改写阶段,负责将标准基线初稿改写为4个平台/语气组合版本。
核心升级(相比v2):
EnhancedPromptBuilder - 带字数预算的增强Prompt构建QualityScorer - 自动质量评分(≥8.0才通过)AnchorMapper - 锚点保留率校验(≥80%)VersionGenerator - 并行生成4个版本draft_manifest.json - 初稿清单(来自Draft阶段)final_structure_snapshot.json - MANDATORY GATE - 最终结构快照(必须status=approved)--run-id - 自定义运行ID(默认从draft manifest读取)--output-dir - 自定义输出目录--versions - 自定义版本列表(默认:wechat_hot,wechat_normal,xiaohongshu_hot,xiaohongshu_normal)<topic>__rewrite_bundle.md - 所有版本打包文档<topic>__wechat_luxun_hot.md - 微信公众号热点版(鲁迅风格)<topic>__wechat_lemon_normal.md - 微信公众号常规版(柠檬风格)<topic>__xhs_video_luxun_hot.md - 小红书视频热点版(鲁迅风格)<topic>__xhs_video_lemon_normal.md - 小红书视频常规版(柠檬风格)rewrite_manifest.json - 改写清单(包含所有版本元数据、质量评分、锚点保留率)meta.json - 元数据(结构继承追踪)| 版本ID | 平台 | 语气 | 目标字数 | 特点 |
|---|---|---|---|---|
| wechat_hot | 微信公众号 | 热点版 | 1300字 | 鲁迅风格,犀利深刻 |
| wechat_normal | 微信公众号 | 常规版 | 1000字 | 柠檬风格,温和理性 |
| xiaohongshu_hot | 小红书 | 热点版 | 900字 | 鲁迅风格,短平快 |
| xiaohongshu_normal | 小红书 | 常规版 | 650字 | 柠檬风格,轻松易读 |
const { runRewrite } = require('./skills/dasheng-stage-rewrite-v3');
const result = runRewrite('/path/to/draft_manifest.json', {
runId: '2026-04-14_120000',
outputDir: '/custom/output/dir',
versions: ['wechat_hot', 'wechat_normal', 'xiaohongshu_hot', 'xiaohongshu_normal']
});
console.log(result);
// {
// success: true,
// run_id: '2026-04-14_120000',
// output_dir: '/Volumes/PSSD/Projects/公众号文章/产物/06_改写/2026-04-14_120000',
// manifest_file: '.../rewrite_manifest.json',
// completed_versions: 12, // 3个主题 × 4个版本
// failed_topics: 0,
// total_topics: 3,
// versions: ['wechat_hot', 'wechat_normal', 'xiaohongshu_hot', 'xiaohongshu_normal'],
// next_step: 'dasheng-stage-publish'
// }
python3 scripts/rewrite_execute_stage5.py \
--draft-manifest /path/to/draft_manifest.json \
--run-id 2026-04-14_120000 \
--versions wechat_hot,wechat_normal,xiaohongshu_hot,xiaohongshu_normal \
--json-output
final_structure_snapshot.jsonapproved / locked / finalizedfinal_primary_sections(最终一级结构)pending,Rewrite阶段将拒绝执行rewrite_manifest.jsonquality_score >= 8.0word_count 在目标±15%以内anchor_preserved_rate >= 80%{{image: ...}} - 配图占位{{link: ...}} - 链接占位{{ref: ...}} - 参考文献标注final_structure_snapshot.json 中的结构构建带字数预算的改写Prompt:
builder = EnhancedPromptBuilder()
prompt = builder.build_enhanced_prompt(
platform="微信公众号",
tone="热点版",
original_text=original_draft,
target_word_count=1300,
min_word_count=1105,
max_word_count=1495,
primary_audience="关注科技和金融的中产阶级"
)
自动质量评分:
scorer = QualityScorer(
platform="wechat",
tone="hot",
original_doc=original_draft,
final_snapshot={"sections": [...]}
)
quality_report = scorer.score(rewritten_text)
# quality_report.overall_score: 8.5
# quality_report.status: "excellent"
锚点保留率校验:
anchor_mapper = AnchorMapper(original_draft, rewritten_text)
anchor_report = anchor_mapper.generate_report()
# anchor_report.preserved_rate: 85.7
# anchor_report.preserved_anchors: [...]
# anchor_report.removed_anchors: [...]
并行生成4个版本:
generator = VersionGenerator()
schema = generator.get_version_schema("wechat_hot")
# schema["platform"]: "wechat"
# schema["tone"]: "hot"
# schema["word_count"]: {"target": 1300, "min": 1105, "max": 1495}
如果某个版本未通过质量门槛,should_regenerate() 会返回True,触发重新生成:
dasheng-stage-publish (Stage 6 Publish - 渠道分发)scripts/rewrite_execute_stage5.pyskills/dasheng-stage-rewrite-v3/index.js| 特性 | v2 | v3 |
|---|---|---|
| 质量评分 | 无 | 集成QualityScorer,≥8.0 |
| 字数控制 | ±30% | ±15%(更严格) |
| 锚点校验 | 无 | 集成AnchorMapper,≥80% |
| Prompt构建 | 基础 | EnhancedPromptBuilder |
| CLI参数 | 硬编码 | 完整argparse支持 |
| JSON输出 | 无 | --json-output标志 |
| 并行生成 | 串行 | VersionGenerator并行 |