|
| 1 | +--- |
| 2 | +title: "d.o. Ebook-Creator: AI-Powered Ebook Creation Toolkit" |
| 3 | +description: "Multi-agent AI toolkit for ebook creation using Roo Code" |
| 4 | +date: 2025-09-12T10:06:00.000Z |
| 5 | +tags: |
| 6 | + - Hugo |
| 7 | + - AI |
| 8 | + - Ebook |
| 9 | + - Automation |
| 10 | + - Roo Code |
| 11 | +author: d.o. |
| 12 | +layout: docs |
| 13 | +thumbnail: |
| 14 | + url: img/project-ebook-roo-code-creator.png |
| 15 | + origin: Gemini 2.5 Flash Image (Nano Banana) |
| 16 | + author: d.o. |
| 17 | +excludeToc: false |
| 18 | +lang: en-US |
| 19 | +slug: do-ebook-roo-code-creator |
| 20 | +categories: |
| 21 | + - Developer Tools |
| 22 | +--- |
| 23 | + |
| 24 | +{{< alert color="info" >}} |
| 25 | +**Repository:** [ebook-roo-code-creator @ Codeberg](https://codeberg.org/d-oit/ebook-roo-code-creator) |
| 26 | +**Wiki:** [Project Wiki & Docs](https://codeberg.org/d-oit/ebook-roo-code-creator/wiki) |
| 27 | +**License:** MIT |
| 28 | +**Demo Book:** "Der Lärm der Gier" – A 40,000-word German novel exploring corporate greed, hacking, and personal health struggles. |
| 29 | +{{< /alert >}} |
| 30 | + |
| 31 | +## Project Overview |
| 32 | + |
| 33 | +The d.o. Ebook-Creator with AI is a demonstration toolkit showcasing multi-agent AI for ebook development. It builds "Der Lärm der Gier" from original content by Dominik Oswald, expanded via LLM APIs into a full novel. Core tools: Roo Code (VS Code extension for agent modes) and OpenCode CLI (terminal automation). The system ensures narrative consistency, quality gates (error rate <5%), and traceability through logs. |
| 34 | + |
| 35 | +Feasibility: Ideal for authors with VS Code; setup costs low (API ~$0.01-0.05 per page - or use free models), benefits high (3-5x faster QA via automation). Limitations: LLM hallucinations require human review; scalable to non-fiction with custom modes. |
| 36 | + |
| 37 | +## Key Features |
| 38 | + |
| 39 | +- **Modular Agent Workflows**: Specialized modes for drafting (ebook-writer, max 2,000 words/session), rewriting (ebook-rewriter for flow/clarity), expansion (ebook-expander to 40,000 words), and review (ebook-reviewer with multi-pass checks). |
| 40 | +- **Quality Assurance**: ebook-spellchecker, ebook-grammar-checker, ebook-logic-checker; ebook-analysis-swarm uses RYAN/FLASH/SOCRATES personas for multi-perspective evaluation. Chapters pass 95% quality gates before finalization. |
| 41 | +- **Research Integration**: MCP tools (Tavily for web search, Context7 for docs) via /research commands; caches SDG/medical/technical data (e.g., 30-day retention for SDG queries). |
| 42 | +- **Logging & Metrics**: Detailed logs in subfolders (grammar/, logic/, workflow/); tracks word count, reading level, error rates. Auto-archive after 30 days. |
| 43 | +- **Automation Scripts**: Python utilities for batch processing, performance monitoring, and log consolidation (see Quickstart). |
| 44 | +- **Security**: Path sanitization, safe YAML loading, JSON schema validation in configs/scripts. |
| 45 | +- **Project Structure**: |
| 46 | + ``` |
| 47 | + book/ # Content stages |
| 48 | + ├── drafts/ # Initial chapters (kapitel-{N}.md) |
| 49 | + ├── rewritten/ # Improved versions |
| 50 | + ├── final/ # Publication-ready |
| 51 | + └── assets/ # Research, diagrams, SPARC specs |
| 52 | + logs/ # Agent outputs |
| 53 | + ├── grammar/ # Grammar fixes |
| 54 | + ├── spellcheck/ # Spelling logs |
| 55 | + ├── logic/ # Consistency checks |
| 56 | + ├── review/ # Quality assessments |
| 57 | + ├── analysis/ # Swarm reports |
| 58 | + └── workflow/ # Process tracking |
| 59 | + research/ # Sourced materials |
| 60 | + ├── sdg/ # Sustainable Development Goals |
| 61 | + ├── medical/ # Health research (e.g., myasthenia-like conditions) |
| 62 | + └── technical/ # AI/ethical docs |
| 63 | + scripts/ # Utilities (config-validator.py, workflow-automation.py) |
| 64 | + config/ # ebook-config.yaml (agents, metrics, MCP settings) |
| 65 | + .roo/ # Agent rules and modes |
| 66 | + ``` |
| 67 | + |
| 68 | +Sample from Kapitel 1 ("Der Lärm der Gier"): Lukas, a hacker with muscle weakness, battles construction noise from greedy developers, leading to cyber-revenge. Themes: Greed vs. resilience, AI ethics in health. |
| 69 | + |
| 70 | +## Quickstart |
| 71 | + |
| 72 | +### Prerequisites |
| 73 | +- VS Code (or Cursor/VSCodium) |
| 74 | +- LLM API key (Anthropic Claude recommended; OpenRouter for cost-free options) |
| 75 | +- Python 3.8+ (pip install PyYAML psutil for scripts) |
| 76 | + |
| 77 | +### Roo Code Setup (Primary) |
| 78 | +1. Install Roo Code: VS Code Extensions → Search "Roo Code" ([Marketplace](https://marketplace.visualstudio.com/items?itemName=RooVeterinaryInc.roo-cline)). |
| 79 | +2. Configure: Add API key/model in settings (OpenRouter or other). |
| 80 | +3. Load Project: Clone repo, open in VS Code; run /init for auto-analysis (generates AGENTS.md). |
| 81 | + |
| 82 | +### OpenCode CLI Install (Optional) |
| 83 | +``` |
| 84 | +curl -fsSL https://opencode.ai/install | bash |
| 85 | +opencode auth login |
| 86 | +cd /path/to/project |
| 87 | +opencode /init |
| 88 | +``` |
| 89 | + |
| 90 | +### Configuration & Validation |
| 91 | +Edit `config/ebook-config.yaml` for custom settings (e.g., target_word_count: 40000, quality.metrics.track_error_rate: true). |
| 92 | +``` |
| 93 | +python scripts/config-validator.py config/ebook-config.yaml --verbose |
| 94 | +python scripts/config-validator.py --save-schema config/schema.json |
| 95 | +``` |
| 96 | + |
| 97 | +### Sample Workflow |
| 98 | +Follow phases from HOW-TO-CREATE-BOOKS.md: |
| 99 | + |
| 100 | +1. **Planning/Research**: |
| 101 | + - Switch to ebook-architect mode: Create SPARC outline. |
| 102 | + - `/research type:medical query:"muscle weakness therapies" tools:tavily depth:advanced output:file` → Saves to research/medical/. |
| 103 | + |
| 104 | +2. **Drafting**: |
| 105 | + - ebook-writer mode: Generate single chapter (e.g., kapitel-1.md in book/drafts/). |
| 106 | + - `/log activity:draft agent:ebook-writer file:kapitel-1.md status:completed`. |
| 107 | + |
| 108 | +3. **Rewriting & Expansion**: |
| 109 | + - `/handoff from:ebook-writer to:ebook-rewriter chapter:kapitel-1.md notes:"Enhance engagement"`. |
| 110 | + - ebook-expander: Add depth/research; save to book/rewritten/. |
| 111 | + |
| 112 | +4. **QA**: |
| 113 | + - Automated: ebook-grammar-checker, ebook-logic-checker → Logs in respective folders. |
| 114 | + - Swarm: ebook-analysis-swarm for narrative review. |
| 115 | + - `/review type:logic file:book/rewritten/kapitel-1.md priority:high`. |
| 116 | + |
| 117 | +5. **Automation**: |
| 118 | + - Batch: `python scripts/workflow-automation.py --batch-rewrite` (processes multiple chapters). |
| 119 | + - Metrics: `python scripts/performance-monitor.py --report --days 7` (tracks execution time). |
| 120 | + - Logs: `python scripts/log-consolidator.py --consolidate --days 7 --format markdown`. |
| 121 | + |
| 122 | +6. **Publication**: |
| 123 | + - ebook-publication-formatter: Format finals, generate TOC. |
| 124 | + - Move to book/final/; validate with quality gates. |
| 125 | + |
| 126 | +Parallel agents limited to 10; use ebook-workflow-coordinator for handoffs. |
| 127 | + |
| 128 | +## Agent Workflows & Best Practices |
| 129 | + |
| 130 | +Agents per phase: |
| 131 | +- **Core**: ebook-writer (creative flow), ebook-rewriter (style improvements). |
| 132 | +- **QA**: Multi-pass (automated + swarm); holistic review before final/. |
| 133 | +- **Coordination**: /handoff, /log, /review commands; ebook-research-coordinator for MCP. |
| 134 | + |
| 135 | +Best Practices: |
| 136 | +- Single-chapter focus to maintain quality. |
| 137 | +- Integrate research with [SDG-Goal] placeholders. |
| 138 | +- Weekly log reviews; quarterly process improvements. |
| 139 | +- Custom modes via create-mode agent. |
| 140 | + |
| 141 | +## Troubleshooting |
| 142 | + |
| 143 | +- **Agent Mode Issues**: Verify .roomodes; reinstall Roo Code. |
| 144 | +- **MCP Failures**: Check API keys/rate limits; enable caching in config. |
| 145 | +- **Validation Errors**: Run config-validator.py; ensure directory permissions. |
| 146 | +- **Workflow Gaps**: Use workflow-automation.py --validate; resume from checkpoints. |
| 147 | +- **Quality Fails**: Revert to drafts/; swarm analysis for root causes. |
| 148 | + |
| 149 | +For recovery: Auto-resume enabled; checkpoint every 30 min. |
| 150 | + |
| 151 | +## Feasibility & Extensions |
| 152 | + |
| 153 | +High feasibility for solo creators: Automates 70% of editing/QA, reducing time from weeks to days. Cost-benefit: ROI via reusable workflows; extend to English/non-fiction by adjusting config.language. Future: Integrate more MCP tools for multimedia. |
| 154 | + |
| 155 | +*Article genesis: This post was created using .roomodes, rode-digitaler-co-autor, rode-blog-generator, and human copy-editing by Silke Buchta. AI assisted with research, codebase analysis, and structure; editorial fine-tuning was handled manually.* |
0 commit comments