一键导入
bookstrap-write-path
Execute writing workflow orchestration - writes sections sequentially from outline
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Execute writing workflow orchestration - writes sections sequentially from outline
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Outline creation patterns for fiction and nonfiction book structures, including chapter breakdowns, scene planning, and narrative arc mapping.
Grounded prose composition workflow including pre-write queries, consistency checks, and post-write entity extraction for database-backed writing.
Run editing passes over completed sections for voice consistency, timeline verification, contradiction flagging, and citation coverage
Load research corpus into the database by processing files, directories, or URLs through semantic chunking, embedding generation, entity extraction, and relationship building
Analyze BRD and existing corpus to identify knowledge gaps, then generate prioritized research tasks for filling those gaps
Generate writing tasks from BRD structure and corpus, creating chapter/section tasks with dependencies, pre-write queries, and consistency checks
| name | bookstrap-write-path |
| description | Execute writing workflow orchestration - writes sections sequentially from outline |
| invoke | skill |
| category | orchestration |
Execute the writing workflow end-to-end, writing sections sequentially from the outline.
This orchestrator command:
/bookstrap-write-path
/bookstrap-write-path --chapter 3
/bookstrap-write-path --max-sections 5
/bookstrap-write-path --start-sequence 12
SELECT * FROM task
WHERE type = 'write'
AND status = 'pending'
ORDER BY sequence ASC
LIMIT $max_sections;
TaskUpdate: {taskId: "[task-id]", status: "in_progress"}
Skill: {skill: "writer", args: "--task-id [task-id]"}
The writer agent will:
If writer flagged a knowledge gap:
SELECT * FROM knowledge_gap
WHERE section_ref = $section_id
AND resolved = false
ORDER BY created_at DESC
LIMIT 1;
If gap found:
Check that section was properly stored:
from scripts.writer_methods import WriterMethods
# Verify section exists in database
section = db.query(f"SELECT * FROM section WHERE id = $section_id")
# Verify embedding generated
has_embedding = section[0].get('embedding') is not None
# Verify entities extracted
entity_count = db.query(f"SELECT count() FROM [character, location] WHERE ->appears_in<-section.id = $section_id")
# Verify citations created
citation_count = db.query(f"SELECT count() FROM section->cites->source WHERE section.id = $section_id")
If verification passes:
TaskUpdate: {taskId: "[task-id]", status: "completed"}
If blocked on knowledge gap:
TaskUpdate: {
taskId: "[task-id]",
status: "blocked",
metadata: {gap_id: "[gap-id]", gap_question: "[question]"}
}
When a knowledge gap blocks writing:
KNOWLEDGE GAP DETECTED
======================
Gap: "Need details about wireless operator training protocols in 1943"
Context: Required for Chapter 3, Section 2
Triggering research path...
Run /bookstrap-research-path to resolve this gap
Or continue with /bookstrap-write-path --skip-blocked
After processing all tasks (or hitting a gap), report:
WRITE PATH PROGRESS
===================
Sections processed: [count]
Sections completed: [count]
Sections blocked: [count]
Total words written: [count]
Citations created: [count]
Entities extracted: [count]
MANUSCRIPT STATUS
-----------------
Chapter 1: [completed/in-progress/pending]
Chapter 2: [completed/in-progress/pending]
Chapter 3: [in-progress] (blocked on section 3.2)
NEXT STEPS
----------
- Resolve knowledge gap to continue Chapter 3
- Run /bookstrap-research-path
- Or run /bookstrap-edit to review completed sections
When writer discovers missing knowledge:
/bookstrap-research-path to proceedIf pre-write consistency check fails:
If embedding cannot be generated:
Respects settings from bookstrap.config.json:
{
"orchestration": {
"write_path": {
"max_sections_per_run": 10,
"pause_on_gap": true,
"auto_trigger_research": false,
"require_verification": true,
"commit_after_each": true
}
}
}
Starting write path orchestration...
Processing section 1 of 5: Chapter 3, Section 1 - "Arrival"
├─ Running pre-write queries...
├─ Consistency checks... PASSED
├─ Knowledge coverage... SUFFICIENT
├─ Writing section... 1,247 words
├─ Generating embedding... Done
├─ Extracting entities... 3 characters, 2 locations
├─ Creating citations... 4 sources cited
├─ Saving to manuscript/chapter-03-rising-action/section-01-arrival.md
└─ Section completed ✓
Processing section 2 of 5: Chapter 3, Section 2 - "Confrontation"
├─ Running pre-write queries...
├─ Consistency checks... PASSED
├─ Knowledge coverage... INSUFFICIENT
├─ Gap detected: "Wireless operator training protocols 1943"
└─ Section BLOCKED (gap flagged)
WRITE PATH PAUSED
=================
Reason: Knowledge gap detected
Gap: "Need details about wireless operator training protocols in 1943"
Context: Required for Chapter 3, Section 2 confrontation scene
Created research task: task_789
Created knowledge gap: gap_456
NEXT STEPS
----------
1. Run /bookstrap-research-path to resolve the gap
2. Once resolved, resume with /bookstrap-write-path --start-sequence 13
PROGRESS SO FAR
---------------
Sections completed: 1
Total words: 1,247
Next section: 3.2 (blocked)
/bookstrap-plan-write - Generate write tasks from outline/bookstrap-research-path - Ensure knowledge coverage/bookstrap-research-path if gaps discovered/bookstrap-status - Check manuscript progress/bookstrap-edit - Review completed sections/bookstrap-export-chapter - Export completed chaptersIf orchestrator is interrupted:
# Resume from last completed section
/bookstrap-write-path --start-sequence [next-sequence]
# Or skip blocked sections temporarily
/bookstrap-write-path --skip-blocked
The orchestrator remembers progress via task status in database.
This orchestrator is implemented as a skill that:
TaskList to find pending write taskswriter agent skill for each sectionwriter_methods.py for verificationTaskUpdateThe orchestrator does NOT write content itself - it coordinates the writer agent.