AgentSkillsCN

wiki-doc-generator

利用并行代理调度,从品牌营销活动成果与业务资产中生成结构化的维基文档。

SKILL.md
--- frontmatter
name: wiki-doc-generator
description: Generate structured wiki documentation from brand campaign outputs and business artifacts using parallel agent dispatch.

Wiki Documentation Generator

Transform campaign outputs and business documents into structured, interconnected wiki documentation using parallel agent dispatch for maximum efficiency.

Workflow Overview

code
Phase 1: Inventory        → Scan input documents, classify by type
Phase 2: Dispatch Agents  → Parallel processing of document categories
Phase 3: Cross-link       → Build navigation and internal references
Phase 4: Output           → Generate wiki-ready markdown structure

Phase 1: Inventory Source Documents

Scan the input location for source documents. Classify each by type:

Document TypeSource SkillWiki Section
MDS (Messaging Direction Summary)mds-messaging-direction-summaryProduct Overview, Features
Buyer Personabuyer-personaUser Personas
Product Positioningproduct-positioning-summaryBrand Positioning
Voice & Tonevoice-and-toneBrand Guidelines
Competitor Analysiscompetitor-analysisMarket Context
Detailed Product Descriptiondetailed-product-descriptionProduct Specs
Campaign Page Copycampaign-page-copyMarketing Assets
Email Sequenceswelcome/pre-launch/launch-email-sequenceCommunications
Proposalthoughtseed-proposal-generator (planned)Technical Architecture, Timeline
Contractthoughtseed-contract-generator (planned)Project Scope, Deliverables

Run inventory script to classify:

bash
python3 scripts/inventory-sources.py /path/to/source/documents

Phase 2: Dispatch Parallel Agents

Each document category becomes an independent agent task. Process 3-5 categories in parallel using the dispatching-parallel-agents pattern.

Agent Categories

Agent 1: Foundation Docs

  • Sources: MDS, Product Positioning, Detailed Product Description
  • Outputs: product/overview.md, product/features.md, product/specifications.md

Agent 2: Brand Docs

  • Sources: Voice & Tone, Visual Identity (if present)
  • Outputs: brand/voice-tone.md, brand/visual-guidelines.md, brand/writing-principles.md

Agent 3: Persona Docs

  • Sources: Buyer Persona, Competitor Analysis
  • Outputs: audience/primary-persona.md, audience/secondary-personas.md, market/competitive-landscape.md

Agent 4: Marketing Assets

  • Sources: Campaign Copy, Email Sequences, Ad Copy
  • Outputs: marketing/campaign-copy.md, marketing/email-templates.md, marketing/ad-creative.md

Agent 5: Project Docs (if Proposal/Contract present)

  • Sources: Proposal, Contract
  • Outputs: project/architecture.md, project/timeline.md, project/team-roles.md

Agent Task Template

markdown
## Task: Generate {Category} Wiki Documentation

**Input Sources:**
{List of source files with paths}

**Output Requirements:**
1. Extract key information following the schema in references/doc-schemas.md
2. Generate markdown files with proper frontmatter
3. Include cross-references to related documents (use relative paths)
4. Maintain heading hierarchy (H1 = page title, H2 = sections)

**Output Location:** /home/claude/wiki-output/{category}/

**Quality Checklist:**
- [ ] Source content synthesized (no copy-paste dumps)
- [ ] Frontmatter includes: title, description, category, tags
- [ ] Internal links use relative paths
- [ ] Code/technical content in fenced blocks

Return: Summary of generated files and any content gaps found.

Phase 3: Cross-Link and Structure

After agents return, build navigation and cross-references.

Navigation Structure

Generate navigation.yaml:

yaml
- title: Getting Started
  items:
    - index.md
    - quickstart.md

- title: Product
  items:
    - product/overview.md
    - product/features.md
    - product/specifications.md

- title: Brand
  items:
    - brand/voice-tone.md
    - brand/visual-guidelines.md

- title: Audience
  items:
    - audience/primary-persona.md
    - audience/secondary-personas.md

- title: Marketing
  items:
    - marketing/campaign-copy.md
    - marketing/email-templates.md

- title: Project
  items:
    - project/architecture.md
    - project/timeline.md

Cross-Reference Rules

  1. Persona → Product: Link user needs to features that address them
  2. Voice → Marketing: Link tone guidelines to content examples
  3. Architecture → Timeline: Link technical components to delivery phases
  4. Positioning → Competitor: Link differentiators to competitive gaps

Phase 4: Output Structure

code
wiki-output/
├── index.md                    # Homepage with project overview
├── navigation.yaml             # Sidebar configuration
├── getting-started/
│   └── quickstart.md
├── product/
│   ├── overview.md
│   ├── features.md
│   └── specifications.md
├── brand/
│   ├── voice-tone.md
│   └── visual-guidelines.md
├── audience/
│   ├── primary-persona.md
│   └── secondary-personas.md
├── market/
│   └── competitive-landscape.md
├── marketing/
│   ├── campaign-copy.md
│   ├── email-templates.md
│   └── ad-creative.md
└── project/
    ├── architecture.md
    ├── timeline.md
    └── scope.md

Document Frontmatter Schema

Every generated markdown file includes:

yaml
---
title: "Page Title"
description: "One-line description for SEO and navigation"
category: "product|brand|audience|marketing|project"
tags: ["relevant", "keywords"]
sources: ["mds.md", "positioning.md"]
lastUpdated: "2025-01-24"
---

Scenario-Based Depth

Adapt output based on project context:

ScenarioPagesSections Included
Brand Genesis ($3K)5-8Foundation + Brand basics
Crowdfunding Lean12-15+ Personas + Marketing basics
Crowdfunding Full20-25+ Full marketing + Project
DTC Launch15-18All sections, moderate depth
Enterprise GTM25-30All sections, maximum depth

Integration with Astro

After generating wiki docs, build with markdown-to-astro-wiki:

bash
# Wiki output location
/home/claude/wiki-output/

# Initialize Astro project
./scripts/init-astro-wiki.sh project-wiki

# Process markdown
./scripts/process-markdown.sh /home/claude/wiki-output ./project-wiki/src/content/docs

# Build
cd project-wiki && bun run build

Error Handling

  • Missing sources: Generate placeholder with TODO markers
  • Conflicting info: Flag in output, cite both sources
  • Incomplete sources: Extract available content, note gaps

Resources

  • references/doc-schemas.md - Detailed schemas for each wiki page type
  • references/frontmatter-templates.md - Frontmatter examples by category
  • scripts/inventory-sources.py - Scan and classify input documents
  • scripts/validate-wiki.py - Check output structure and links