inkos-multi-agent-novel-writing by aradotso/trending-skills
npx skills add https://github.com/aradotso/trending-skills --skill inkos-multi-agent-novel-writingSkill by ara.so — Daily 2026 Skills collection
InkOS 是一个多智能体 CLI 系统,能够自主创作、审核和修订小说。智能体处理完整的流水线:写手 → 验证器 → 审核器 → 修订器,并在可配置的检查点设置人工审核关卡。
npm install -g @actalk/inkos
# 或直接运行
npx @actalk/inkos --version
要求: Node.js ≥ 20.0.0
# 创建一个新的小说项目
inkos book create --title "吞天魔帝" --genre xuanhuan
# 撰写下一章
inkos write next 吞天魔帝
# 审核特定章节
inkos audit 吞天魔帝 --chapter 3
# 运行完整守护进程(持续生产)
inkos daemon start
执行 inkos book create 后,项目目录包含:
story/
outline.md # 故事大纲(架构师智能体输入)
book_rules.md # 每本书的自定义规则和审核维度
chapter_summaries.md # 自动生成的每章摘要
subplot_board.md # 支线进度跟踪(A/B/C 线)
emotional_arcs.md # 角色情感弧线跟踪
character_matrix.md # 角色互动矩阵 + 信息边界
parent_canon.md # 仅限衍生作品:导入的正传约束
style_profile.json # 风格指纹(如果使用了风格导入)
style_guide.md # LLM 生成的定性风格指南
chapters/
ch001.md
ch002.md
...
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
inkos book create --title "Title" --genre xuanhuan # 流派:xuanhuan | xianxia | dushi | horror | general
inkos book list
inkos book status 吞天魔帝
inkos write next 吞天魔帝 # 撰写下一章(自动加载所有上下文)
inkos write chapter 吞天魔帝 5 # 撰写特定章节
inkos audit 吞天魔帝 --chapter 3 # 审核章节(33 个维度)
inkos revise 吞天魔帝 --chapter 3 # 根据审核结果进行修订
inkos revise 吞天魔帝 --chapter 3 --mode spot-fix # 仅定点修复(默认)
inkos revise 吞天魔帝 --chapter 3 --mode rewrite # 完全重写(谨慎使用)
inkos revise 吞天魔帝 --chapter 3 --mode polish # 润色(无结构更改)
inkos genre list # 列出所有内置流派
inkos genre show xuanhuan # 查看某个流派的完整规则
inkos genre copy xuanhuan # 复制流派规则到项目以进行自定义
inkos genre create wuxia --name 武侠 # 从头创建新流派
inkos style analyze reference.txt # 分析风格指纹
inkos style import reference.txt 吞天魔帝 # 将风格导入书籍
inkos style import reference.txt 吞天魔帝 --name "某作者"
inkos book create --title "烈焰前传" --genre xuanhuan
inkos import canon 烈焰前传 --from 吞天魔帝 # 导入正传约束
inkos write next 烈焰前传 # 写手自动读取正传约束
inkos detect 吞天魔帝 --chapter 3 # 检测章节中的 AIGC 标记
inkos detect 吞天魔帝 --all # 检测所有章节
inkos detect --stats # 查看检测历史统计
inkos daemon start # 启动调度器(默认:15 分钟/周期)
inkos daemon stop
inkos daemon status
~/.inkos/config.json){
"llm": {
"provider": "openai",
"model": "gpt-4o",
"apiKey": "sk-...",
"temperature": 0.8
},
"daemon": {
"intervalMinutes": 15,
"dailyChapterLimit": 10,
"parallelBooks": 2
},
"webhook": {
"url": "https://your-server.com/hooks/inkos",
"secret": "your-hmac-secret",
"events": ["chapter-complete", "audit-failed", "pipeline-error"]
},
"aigcDetection": {
"provider": "gptzero",
"apiKey": "...",
"endpoint": "https://api.gptzero.me/v2/predict/text"
}
}
story/book_rules.md)# Book Rules: 吞天魔帝
## 禁忌 (Forbidden)
- 主角不得主动求饶
- 不得出现「命运」「天意」等宿命论表述
## 高疲劳词
- 震撼, 惊骇, 恐惧, 颤抖
## additionalAuditDimensions
- 数值系统一致性: 战力数值不得前后矛盾
- 角色成长节奏: 主角突破间隔不少于3章
## 写手特别指令
- 战斗场面优先感官描写,禁止数值报告
InkOS 按顺序运行五个专门的智能体:
ArchitectAgent → outline.md, book_rules.md
↓
WriterAgent → ch00N.md (reads: outline, summaries, arcs, matrix, style_guide, canon)
↓
ValidatorAgent → 11 deterministic rules, zero LLM cost
↓ (error found → trigger spot-fix immediately)
AuditorAgent → 33 LLM dimensions, temperature=0 for consistency
↓
ReviserAgent → spot-fix | rewrite | polish | anti-detect
| 规则 | 条件 |
|---|---|
| 禁忌句式 | 不是……而是…… 结构 |
| 破折号禁令 | —— 字符 |
| 转折词密度 | 仿佛/忽然/竟然 ≤1 每 3000 字符 |
| 高疲劳词 | 每本书列表,每章 ≤1 |
| 元叙事 | 编剧式旁白 |
| 报告术语 | 分析性框架术语出现在散文中 |
| 作者说教 | 显然/不言而喻 等 |
| 集体反应 | 「全场震惊」陈词滥调 |
| 连续“了” | ≥4 个连续句子包含“了” |
| 段落长度 | ≥2 个段落超过 300 字符 |
| 书籍特定禁令 | book_rules.md 禁止列表 |
关键维度包括:
import { BookManager } from '@actalk/inkos'
import { WriterAgent } from '@actalk/inkos/agents'
import { ValidatorAgent } from '@actalk/inkos/agents'
// 创建并配置一本书
const manager = new BookManager()
const book = await manager.createBook({
title: '吞天魔帝',
genre: 'xuanhuan',
outlinePath: './my-outline.md'
})
// 为下一章运行写作流水线
const writer = new WriterAgent({ temperature: 0.8 })
const chapter = await writer.writeNext(book)
// 运行确定性验证(无 LLM 成本)
const validator = new ValidatorAgent()
const validationResult = await validator.validate(chapter, book)
if (validationResult.hasErrors) {
// 自动触发定点修复
const reviser = new ReviserAgent({ mode: 'spot-fix' })
const fixed = await reviser.revise(chapter, validationResult.errors, book)
console.log('已修复违规:', validationResult.errors.length)
}
import express from 'express'
import crypto from 'crypto'
const app = express()
app.use(express.raw({ type: 'application/json' }))
app.post('/hooks/inkos', (req, res) => {
const sig = req.headers['x-inkos-signature'] as string
const expected = crypto
.createHmac('sha256', process.env.INKOS_WEBHOOK_SECRET!)
.update(req.body)
.digest('hex')
if (sig !== `sha256=${expected}`) {
return res.status(401).send('Invalid signature')
}
const event = JSON.parse(req.body.toString())
switch (event.type) {
case 'chapter-complete':
console.log(`"${event.book}" 的第 ${event.chapter} 章已完成`)
// 触发人工审核关卡
notifyReviewer(event)
break
case 'audit-failed':
console.log(`审核失败:${event.criticalCount} 个关键问题`)
break
case 'pipeline-error':
console.error(`"${event.book}" 中的流水线错误:`, event.error)
break
}
res.status(200).json({ received: true })
})
// genres/wuxia.ts
import type { GenreConfig } from '@actalk/inkos/types'
export const wuxia: GenreConfig = {
id: 'wuxia',
name: '武侠',
chapterTypes: ['江湖相遇', '武功切磋', '恩怨纠葛', '门派争斗', '武林大会'],
forbiddenPatterns: [
'内力值', '战力', '等级提升', // 无数值化力量体系
'系统', '面板', '属性点'
],
fatiguedWords: ['震惊', '无敌', '碾压', '秒杀'],
languageRules: [
{
bad: '内力增加了100点',
good: '一股暖流沿经脉漫开,指尖的颤抖渐渐平息'
}
],
auditDimensions: [
'武功描写感官化',
'江湖规则内部一致性',
'恩怨情仇弧线完整性'
]
}
import { StyleAnalyzer } from '@actalk/inkos/style'
const analyzer = new StyleAnalyzer()
// 分析参考文本
const profile = await analyzer.analyze('./reference-novel.txt')
console.log(profile)
// {
// avgSentenceLength: 18.3,
// ttr: 0.42, // 类符-形符比
// rhetoricalDensity: 0.15,
// paragraphLengthDist: { p25: 45, p50: 89, p75: 156 },
// punctuationStyle: 'sparse'
// }
// 导入到书籍(生成 style_profile.json + style_guide.md)
await analyzer.importToBook('./reference-novel.txt', '吞天魔帝', {
authorName: '某作者'
})
v0.4 强化的审核-修订循环可防止修订引入更多 AI 标记:
AuditorAgent (temp=0)
↓ 发现关键问题
ReviserAgent spot-fix
↓
AI 标记数量比较
↓ 标记增加?
是 → 丢弃修订,保留原文
否 → 接受修订
↓
重新审核 (temp=0)
审核一致性的关键设置:
temperature: 0 运行 — 消除同一章节上 0–6 个关键问题的方差spot-fix(仅修改问题句子)rewrite 模式,但实测会引入 6 倍多的 AI 标记polish 模式有边界锁定:不增删段落,不改名,不添加新情节当检测到 parent_canon.md 时,会自动激活 4 个额外的审核维度:
# parent_canon.md (由 `inkos import canon` 自动生成)
## 正传世界规则
- 力量体系: 炼体→炼气→炼丹→炼神→炼虚
- 地理: 九州大陆,东海以东无人居住
- 阵营: 正道五宗 vs 魔道三门
## 关键事件时间线
- 第1章: 主角获得吞天诀
- 第45章: 正道五宗盟约成立 [分歧点]
## 角色快照 (分歧点时状态)
- 林天: 炼气期第三层,未知父母身世
- 剑宗宗主: 在世,尚未叛变
## 伏笔状态 (正传专属,番外禁止回收)
- 古剑残片: 未解
- 神秘老人身份: 未解
验证器对每一章都触发 检查 book_rules.md 中的疲劳词列表 — 列出的词每章强制执行 ≤1 次。移除不常用的词。
审核结果在不同运行间差异巨大 确认审核器温度在配置中锁定为 0。如果使用代理 LLM API,确保其尊重 temperature: 0。
修订比原文引入了更多 AI 标记 这是预期行为 — InkOS v0.4 会自动检测并丢弃修订。如果反复发生,请明确从 rewrite 模式切换到 spot-fix 模式。
衍生作品审核错误地标记事件 验证 parent_canon.md 具有准确的分歧点时间戳。分歧点之前的事件受正传锁定;之后的事件衍生作品可以自由发挥。
守护进程在多次失败后停止某本书 检查 daemon status 中暂停的书籍。修复根本问题(通常是大纲模糊或 book_rules.md 矛盾)后,运行 inkos daemon resume 书名。
写手未应用风格指南 再次运行 inkos style import — 如果 style_guide.md 缺失或为空,写手会静默跳过风格注入。检查参考文本是否 ≥5000 字符以确保可靠的指纹提取。
每周安装量
420
仓库
GitHub Stars
10
首次出现
8 天前
安全审计
安装于
cline414
gemini-cli414
cursor414
opencode414
codex414
github-copilot414
Skill by ara.so — Daily 2026 Skills collection
InkOS is a multi-agent CLI system that autonomously writes, audits, and revises novels. Agents handle the full pipeline: Writer → Validator → Auditor → Reviser, with human review gates at configurable checkpoints.
npm install -g @actalk/inkos
# or run directly
npx @actalk/inkos --version
Requirements: Node.js ≥ 20.0.0
# Create a new novel project
inkos book create --title "吞天魔帝" --genre xuanhuan
# Write the next chapter
inkos write next 吞天魔帝
# Audit a specific chapter
inkos audit 吞天魔帝 --chapter 3
# Run the full daemon (continuous production)
inkos daemon start
After inkos book create, the project directory contains:
story/
outline.md # Story outline (architect agent input)
book_rules.md # Per-book custom rules and audit dimensions
chapter_summaries.md # Auto-generated per-chapter summaries
subplot_board.md # Subplot progress tracking (A/B/C lines)
emotional_arcs.md # Per-character emotional arc tracking
character_matrix.md # Character interaction matrix + info boundaries
parent_canon.md # Spinoff only: imported canon constraints
style_profile.json # Style fingerprint (if style import used)
style_guide.md # LLM-generated qualitative style guide
chapters/
ch001.md
ch002.md
...
inkos book create --title "Title" --genre xuanhuan # genres: xuanhuan | xianxia | dushi | horror | general
inkos book list
inkos book status 吞天魔帝
inkos write next 吞天魔帝 # Write next chapter (auto-loads all context)
inkos write chapter 吞天魔帝 5 # Write specific chapter
inkos audit 吞天魔帝 --chapter 3 # Audit chapter (33 dimensions)
inkos revise 吞天魔帝 --chapter 3 # Revise based on audit results
inkos revise 吞天魔帝 --chapter 3 --mode spot-fix # Point fix only (default)
inkos revise 吞天魔帝 --chapter 3 --mode rewrite # Full rewrite (use cautiously)
inkos revise 吞天魔帝 --chapter 3 --mode polish # Polish (no structural changes)
inkos genre list # List all built-in genres
inkos genre show xuanhuan # View full rules for a genre
inkos genre copy xuanhuan # Copy genre rules to project for customization
inkos genre create wuxia --name 武侠 # Create new genre from scratch
inkos style analyze reference.txt # Analyze style fingerprint
inkos style import reference.txt 吞天魔帝 # Import style into book
inkos style import reference.txt 吞天魔帝 --name "某作者"
inkos book create --title "烈焰前传" --genre xuanhuan
inkos import canon 烈焰前传 --from 吞天魔帝 # Import parent canon constraints
inkos write next 烈焰前传 # Writer auto-reads canon constraints
inkos detect 吞天魔帝 --chapter 3 # Detect AIGC markers in chapter
inkos detect 吞天魔帝 --all # Detect all chapters
inkos detect --stats # View detection history statistics
inkos daemon start # Start scheduler (default: 15 min/cycle)
inkos daemon stop
inkos daemon status
~/.inkos/config.json){
"llm": {
"provider": "openai",
"model": "gpt-4o",
"apiKey": "sk-...",
"temperature": 0.8
},
"daemon": {
"intervalMinutes": 15,
"dailyChapterLimit": 10,
"parallelBooks": 2
},
"webhook": {
"url": "https://your-server.com/hooks/inkos",
"secret": "your-hmac-secret",
"events": ["chapter-complete", "audit-failed", "pipeline-error"]
},
"aigcDetection": {
"provider": "gptzero",
"apiKey": "...",
"endpoint": "https://api.gptzero.me/v2/predict/text"
}
}
story/book_rules.md)# Book Rules: 吞天魔帝
## 禁忌 (Forbidden)
- 主角不得主动求饶
- 不得出现「命运」「天意」等宿命论表述
## 高疲劳词
- 震撼, 惊骇, 恐惧, 颤抖
## additionalAuditDimensions
- 数值系统一致性: 战力数值不得前后矛盾
- 角色成长节奏: 主角突破间隔不少于3章
## 写手特别指令
- 战斗场面优先感官描写,禁止数值报告
InkOS runs five specialized agents in sequence:
ArchitectAgent → outline.md, book_rules.md
↓
WriterAgent → ch00N.md (reads: outline, summaries, arcs, matrix, style_guide, canon)
↓
ValidatorAgent → 11 deterministic rules, zero LLM cost
↓ (error found → trigger spot-fix immediately)
AuditorAgent → 33 LLM dimensions, temperature=0 for consistency
↓
ReviserAgent → spot-fix | rewrite | polish | anti-detect
| Rule | Condition |
|---|---|
| Forbidden patterns | 不是……而是…… constructs |
| Em-dash ban | —— character |
| Transition word density | 仿佛/忽然/竟然≤1 per 3000 chars |
| High-fatigue words | Per-book list, ≤1 per chapter |
| Meta-narrative | Screenwriter-style narration |
| Report terminology | Analytical framework terms in prose |
| Author moralizing | 显然/不言而喻 etc. |
| Collective reaction | 「全场震惊」clichés |
| Consecutive 了 | ≥4 consecutive sentences with 了 |
| Paragraph length | ≥2 paragraphs over 300 chars |
| Book-specific bans | forbidden list |
Key dimensions include:
import { BookManager } from '@actalk/inkos'
import { WriterAgent } from '@actalk/inkos/agents'
import { ValidatorAgent } from '@actalk/inkos/agents'
// Create and configure a book
const manager = new BookManager()
const book = await manager.createBook({
title: '吞天魔帝',
genre: 'xuanhuan',
outlinePath: './my-outline.md'
})
// Run the write pipeline for next chapter
const writer = new WriterAgent({ temperature: 0.8 })
const chapter = await writer.writeNext(book)
// Run deterministic validation (no LLM cost)
const validator = new ValidatorAgent()
const validationResult = await validator.validate(chapter, book)
if (validationResult.hasErrors) {
// Auto spot-fix triggered
const reviser = new ReviserAgent({ mode: 'spot-fix' })
const fixed = await reviser.revise(chapter, validationResult.errors, book)
console.log('Fixed violations:', validationResult.errors.length)
}
import express from 'express'
import crypto from 'crypto'
const app = express()
app.use(express.raw({ type: 'application/json' }))
app.post('/hooks/inkos', (req, res) => {
const sig = req.headers['x-inkos-signature'] as string
const expected = crypto
.createHmac('sha256', process.env.INKOS_WEBHOOK_SECRET!)
.update(req.body)
.digest('hex')
if (sig !== `sha256=${expected}`) {
return res.status(401).send('Invalid signature')
}
const event = JSON.parse(req.body.toString())
switch (event.type) {
case 'chapter-complete':
console.log(`Chapter ${event.chapter} of "${event.book}" complete`)
// Trigger human review gate
notifyReviewer(event)
break
case 'audit-failed':
console.log(`Audit failed: ${event.criticalCount} critical issues`)
break
case 'pipeline-error':
console.error(`Pipeline error in "${event.book}":`, event.error)
break
}
res.status(200).json({ received: true })
})
// genres/wuxia.ts
import type { GenreConfig } from '@actalk/inkos/types'
export const wuxia: GenreConfig = {
id: 'wuxia',
name: '武侠',
chapterTypes: ['江湖相遇', '武功切磋', '恩怨纠葛', '门派争斗', '武林大会'],
forbiddenPatterns: [
'内力值', '战力', '等级提升', // No numerical power system
'系统', '面板', '属性点'
],
fatiguedWords: ['震惊', '无敌', '碾压', '秒杀'],
languageRules: [
{
bad: '内力增加了100点',
good: '一股暖流沿经脉漫开,指尖的颤抖渐渐平息'
}
],
auditDimensions: [
'武功描写感官化',
'江湖规则内部一致性',
'恩怨情仇弧线完整性'
]
}
import { StyleAnalyzer } from '@actalk/inkos/style'
const analyzer = new StyleAnalyzer()
// Analyze reference text
const profile = await analyzer.analyze('./reference-novel.txt')
console.log(profile)
// {
// avgSentenceLength: 18.3,
// ttr: 0.42, // Type-Token Ratio
// rhetoricalDensity: 0.15,
// paragraphLengthDist: { p25: 45, p50: 89, p75: 156 },
// punctuationStyle: 'sparse'
// }
// Import into book (generates style_profile.json + style_guide.md)
await analyzer.importToBook('./reference-novel.txt', '吞天魔帝', {
authorName: '某作者'
})
The v0.4 hardened audit-revision loop prevents revision from introducing more AI markers:
AuditorAgent (temp=0)
↓ critical issues found
ReviserAgent spot-fix
↓
AI marker count comparison
↓ markers increased?
YES → discard revision, keep original
NO → accept revision
↓
Re-audit (temp=0)
Key settings for audit consistency:
temperature: 0 — eliminates 0–6 critical variance on same chapterspot-fix (only modify problem sentences)rewrite mode is available but measured to introduce 6× more AI markerspolish mode is boundary-locked: no paragraph add/delete, no name changes, no new plotWhen parent_canon.md is detected, 4 additional audit dimensions activate automatically:
# parent_canon.md (auto-generated by `inkos import canon`)
## 正传世界规则
- 力量体系: 炼体→炼气→炼丹→炼神→炼虚
- 地理: 九州大陆,东海以东无人居住
- 阵营: 正道五宗 vs 魔道三门
## 关键事件时间线
- 第1章: 主角获得吞天诀
- 第45章: 正道五宗盟约成立 [分歧点]
## 角色快照 (分歧点时状态)
- 林天: 炼气期第三层,未知父母身世
- 剑宗宗主: 在世,尚未叛变
## 伏笔状态 (正传专属,番外禁止回收)
- 古剑残片: 未解
- 神秘老人身份: 未解
Validator fires on every chapter Check book_rules.md fatigue word list — words listed there are enforced ≤1 per chapter. Remove infrequently used terms.
Audit results wildly inconsistent between runs Confirm auditor temperature is locked to 0 in config. If using a proxy LLM API, ensure it respects temperature: 0.
Revision introduces more AI markers than original This is expected behavior — InkOS v0.4 automatically detects this and discards the revision. If it happens repeatedly, switch from rewrite to spot-fix mode explicitly.
Spinoff audit incorrectly flags events Verify parent_canon.md has accurate divergence point timestamps. Events before the divergence point are canon-locked; events after are fair game for the spinoff.
Daemon stops a book after repeated failures Check daemon status for the suspended book. After fixing the underlying issue (usually outline ambiguity or book_rules.md contradiction), run inkos daemon resume 书名.
Style guide not being applied by writer Run inkos style import again — if style_guide.md is missing or empty, the writer skips style injection silently. Check that the reference text is ≥5000 characters for reliable fingerprinting.
Weekly Installs
420
Repository
GitHub Stars
10
First Seen
8 days ago
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
cline414
gemini-cli414
cursor414
opencode414
codex414
github-copilot414
AI 代码实施计划编写技能 | 自动化开发任务分解与 TDD 流程规划工具
41,400 周安装
book_rules.md