Mastering `cm-content-factory`: The Complete Guide
Hướng dẫn chi tiết về Mastering `cm-content-factory`: The Complete Guide trong Vibe Coding dành cho None.
cm-content-factory Mastering cm-content-factory: The Complete Guide
In the era of Vibe Coding, speed is the ultimate currency. You can scaffold a full-stack application in minutes, iterate on complex UI components in seconds, and deploy to the cloud with a single command. But there is a silent bottleneck that eventually kills the momentum of every high-velocity project: Content.
Whether it is technical documentation, SEO-driven landing pages, or deep-dive blog posts, the process of creating high-quality, high-signal written material remains stubbornly manual. Traditional AI tools often produce “AI-flavored” fluff—generic, hallucination-prone text that lacks the specific architectural nuance of your project. This is where cm-content-factory comes in. It is not just another “blog generator”; it is a stateful, research-driven autonomous engine designed to bridge the gap between building features and telling the world about them.
This guide explores how to master cm-content-factory to automate your content pipeline while maintaining the “Senior Engineer” level of quality your brand requires.
The Core Problem: The Content-Velocity Gap
Vibe Coding allows a single developer to operate like a ten-person engineering team. However, marketing and documentation teams usually cannot keep up. When you ship five new features in a week, you need five documentation updates, three comparison articles, and a dozen social media posts.
The traditional approach is to either:
- Write it yourself: Wasting hours of high-value coding time on prose.
- Paste into ChatGPT: Getting 1,500 words of generic “In the rapidly evolving landscape…” nonsense that no one wants to read.
cm-content-factory solves this by treating content like code. It uses a Research-Generate-Audit-Deploy lifecycle that ensures every word is grounded in real-time data and project-specific context.
Core Concepts: How the Factory Thinks
Unlike a standard LLM prompt, cm-content-factory operates as a stateful agent. It doesn’t just “write”; it manages a project.
1. Stateful Generation (.content-factory-state.json)
The factory tracks its progress in a state file. This allows it to handle massive, multi-step tasks (like writing a 50-article knowledge base) without losing context or repeating itself. If the process is interrupted, it resumes exactly where it left off, knowing which research steps were completed and which sections still need auditing.
2. Multi-Agent Research Pipeline
Before a single word is written, the factory activates its research agents. It uses tools like Tavily or Exa to crawl the live web, GitHub repositories, and your local codebase. It identifies:
- The Technical Truth: Actual API signatures, file paths, and logic flows.
- Market Context: What competitors are saying and what users are actually searching for.
- Knowledge Gaps: Identifying what information is missing from current documentation.
3. The 9-Point Audit Gate
This is the “Quality Assurance” layer. Every piece of content must pass an automated audit that checks for:
- Hallucination Detection: Cross-referencing claims against research data.
- Brand Voice Alignment: Ensuring the tone matches your defined “Persona.”
- SEO Integrity: Verifying keyword density, header hierarchy, and meta-data.
- Actionability: Ensuring code snippets actually work and steps are logical.
Practical Example: Scaling a Technical Blog
Let’s walk through a real-world scenario. Suppose you have built a new Vibe Coding tool called “Cody Master” and you need to generate a series of “VS” pages (e.g., Cody Master vs. Bolt.new) to capture search traffic.
Step 1: Configuration
First, you define your target in content-factory.config.json. This acts as the “Source of Truth” for the factory.
{
"project": "Cody_Master_Web",
"persona": "Senior_Tech_Lead",
"difficulty": "Advanced",
"workflow": {
"research": "deep",
"audit_level": "strict",
"auto_deploy": false
},
"topics": [
{
"title": "Cody Master vs Bolt.new: The Truth About Vibe Coding",
"keywords": ["vibe coding", "bolt.new alternative", "autonomous agents"],
"jtbd": "Show developers why local-first agents beat browser-only IDEs"
}
]
}
Step 2: The Research Phase
Run the command: gemini run cm-content-factory --phase research.
The agent will not start writing. Instead, it will:
- Search for the latest Bolt.new updates (March 2026).
- Analyze your local
src/directory to see how your tool handles local file systems. - Synthesize a “Competitive Matrix” in your
docs/analysis/folder.
Step 3: Narrative Engineering
Now, trigger the generation: gemini run cm-content-factory --phase generate.
The factory uses the “Content Mastery” framework. It starts with a Hook based on a common pain point (e.g., “Tired of your AI IDE crashing when you lose internet connection?”). It then moves into the JTBD (Jobs-to-be-Done), explaining how the user can solve their problem using your tool.
Step 4: The Audit & Refinement
The factory now runs its internal audit. If it finds that it claimed your tool supports “Windows 95” (a hallucination), the Audit Gate will flag it, and the agent will automatically rewrite that section before you ever see it.
Interactive Walkthrough: Refining Your Output
One of the most powerful features of cm-content-factory is its interactive mode. You aren’t just a spectator; you are the Editor-in-Chief.
If the generated draft is too “marketing-heavy,” you can issue a corrective directive:
“The tone is too salesy. Rewrite the ‘Architecture’ section to focus on the technical implementation of our tmux-based agent management. Mention the specific logic in
scripts/dashboard.py.”
The factory doesn’t just rewrite the text; it re-runs the research on that specific file to ensure the new prose is technically accurate. This “loop” is what separates Vibe Coding content from generic AI output.
Best Practices & Tips
1. The “Persona” is Everything
The quality of the output is directly proportional to how well you define your persona.md. Do not just say “a technical writer.” Say: “A cynical Senior Architect who values performance over features, hates buzzwords, and writes in short, punchy sentences.” The factory will adopt this “voice” across all articles, creating a cohesive brand identity.
2. Use “Stateful Feed” for Continuity
When generating a series of articles, enable the continuity flag. This allows Article #5 to reference concepts explained in Article #1, creating a professional “Internal Linking” structure that boosts both SEO and user experience.
3. Token Management
For very long articles (like this guide), the factory might hit token limits. Use the split_tasks: true setting. This instructs the agent to write the article section-by-section, saving each to a temporary buffer before merging and auditing the final piece.
4. Grounding with pencil Integration
If your content needs screenshots or diagrams, cm-content-factory can coordinate with the pencil MCP server. It can describe a UI state, have pencil generate the visual, and then reference that visual in the text. This is “Multi-Modal Vibe Coding” at its peak.
Real-World Impact: The “10x Content” Strategy
In the old world, a 1500-word high-quality technical article took 6-8 hours to write, 2 hours to research, and 1 hour to edit. Total: ~10 hours.
With cm-content-factory, the breakdown looks like this:
- Config & Goal Setting: 5 minutes.
- Autonomous Research & Draft: 3 minutes (running in background).
- Human Review & Final Polish: 15 minutes.
- Total: ~23 minutes.
This is a 25x increase in productivity. More importantly, it allows you to maintain the “Vibe” of your project—that feeling of constant movement and expert execution—without being slowed down by the friction of writing.
Troubleshooting Common Issues
”The output sounds like AI”
Fix: Your style-guide.md or persona.md is too vague. Add “Negative Constraints.” Tell the agent: “Never use the words ‘harness,’ ‘unlock,’ ‘delve,’ or ‘testament.’ Avoid exclamation points. Never use more than two adjectives per sentence."
"The code snippets are wrong”
Fix: Ensure the agent has read access to your tsconfig.json or package.json. Use the --context codebase flag to force the agent to prioritize local files over its internal training data.
”It keeps repeating the same intro”
Fix: Check your .content-factory-state.json. If it’s corrupted, the agent “forgets” what it wrote previously. Clear the state and re-run with a fresh batch-id.
Conclusion: The Future of Autonomous Narrative
We are moving toward a world where the “Product” and the “Story of the Product” are developed simultaneously. cm-content-factory is the engine that makes this possible. It turns your codebase into a library of insights and your technical decisions into marketing assets.
By mastering this skill, you aren’t just automating “writing”; you are ensuring that your high-velocity engineering is matched by high-impact communication. Don’t let your project die in silence because you were too busy coding to write about it. Turn on the factory, set your persona, and let the narrative keep pace with the vibe.
Next Steps:
- Initialize your
content-factory.config.json. - Run your first research batch on your core features.
- Audit the results and push to your
/docsor/blogfolder.
The factory is open. Start shipping your story.