How bhaveshonet/docs-generator-plugin works
Purpose and Plugin Entry
docs-generator is a Claude Cowork plugin that converts unstructured project material into branded, client-ready DOCX scope documents. Claude discovers and invokes skills through .claude-plugin/plugin.json; the primary user-facing workflow is defined in skills/scope-document-generator/SKILL.md. A separate architecture-diagram skill can be invoked independently.
Scope-Document Orchestration
The scope skill is the controlling workflow: collect language, source material, cover metadata, and diagram choice; then drive extraction, drafting, review, assembly, and verification. It produces two intermediate JSON contracts—cover variables and section content—which isolate AI-authored material from deterministic document rendering.
Paths: skills/scope-document-generator/SKILL.md, skills/scope-document-generator/scripts/generate_scope_doc.py.
Evidence-Grounded Content Pipeline
Source PDFs, DOCX files, or notes are analyzed into structured scope content. Generation is governed by anti-hallucination constraints and source-extraction guidance, with confidence scoring and follow-up questions for weak sections. This is an agent-led control loop rather than an autonomous backend service.
Paths: skills/scope-document-generator/references/content-extraction-guide.md, skills/scope-document-generator/references/anti-hallucination-rules.md, skills/scope-document-generator/references/section-templates-en.md.
DOCX Rendering Boundary
generate_scope_doc.py deterministically combines variables, section JSON, an optional rendered architecture image, and a pre-unpacked branded DOCX template into a delivery .docx. The template holds the corporate styles, headers, logos, and document structure; content generation should not modify branding internals.
Paths: skills/scope-document-generator/scripts/generate_scope_doc.py, skills/scope-document-generator/assets/templates/scope-template/word/document.xml, skills/scope-document-generator/assets/fonts/AkkuratLL-Regular.otf.
Architecture Diagram Paths
The scope workflow can generate a raster architecture diagram from structured JSON or extract an existing diagram from a source file. The renderer uses Graphviz dot when installed and Pillow as fallback, making diagram production resilient to missing Graphviz infrastructure.
Paths: skills/scope-document-generator/scripts/generate_architecture_diagram.py, skills/scope-document-generator/scripts/extract_architecture_diagram.py.
Editable Diagram Subsystem
A standalone skill transforms the related JSON diagram description into editable draw.io XML. It supports zones, typed components, flows, layout/routing settings, and multi-page diagrams. It is independent of Graphviz and relies only on Python’s standard XML support.
Paths: skills/architecture-diagram/SKILL.md, skills/architecture-diagram/scripts/generate_drawio_diagram.py.
Runtime and Supporting Deliverables
The operational runtime is Python 3.10+ with python-docx, Pillow, and optionally system Graphviz; package/plugin metadata is Node-format but no Node runtime application is indicated. The repository also packages adjacent Claude skills for handover documents, hackathon presentations, and sprint design, each with its own instructions and generation scripts, but these are separate deliverable workflows rather than dependencies of scope generation.
Paths: package.json, skills/handover-document/SKILL.md, skills/hackathon-presentation/SKILL.md, skills/sprint-design/SKILL.md.
Components 18
Plugin discovery
- Plugin manifest · Registers discoverable skills.
.claude-plugin/plugin.json - Python document runtime · Uses python-docx and Pillow; Graphviz is optional.
package.json
Scope document workflow
- Scope generator skill · Controls collection, drafting, review, assembly, and verification.
skills/scope-document-generator/SKILL.md - Project source material
- Extraction guidance · Defines evidence extraction and anti-hallucination controls.
skills/scope-document-generator/references/content-extraction-guide.md - Section templates
skills/scope-document-generator/references/section-templates-en.md - Section content JSON · Evidence-grounded drafted scope sections.
- Cover variables JSON · Cover metadata separated from rendering.
- Scope DOCX renderer · Deterministically assembles the delivery document.
skills/scope-document-generator/scripts/generate_scope_doc.py - Branded DOCX template · Owns corporate styles, headers, logos, and structure.
skills/scope-document-generator/assets/templates/scope-template/word/document.xml - Brand font
skills/scope-document-generator/assets/fonts/AkkuratLL-Regular.otf - Client-ready scope DOCX
Diagram generation
- Raster diagram renderer · Uses Graphviz dot or a Pillow fallback.
skills/scope-document-generator/scripts/generate_architecture_diagram.py - Existing diagram extractor
skills/scope-document-generator/scripts/extract_architecture_diagram.py - Architecture image
- Editable diagram skill · Creates editable multi-page draw.io XML from diagram JSON.
skills/architecture-diagram/SKILL.md - draw.io XML generator · Supports zones, typed components, flows, layout, and routing.
skills/architecture-diagram/scripts/generate_drawio_diagram.py
Adjacent workflows
- Other deliverable skills · Handover, hackathon presentation, and sprint design workflows.
skills/handover-document/SKILL.md
Connections 22
- Plugin manifest → Scope generator skill: discovers
- Plugin manifest → Editable diagram skill: discovers
- Scope generator skill → Project source material: collects
- Scope generator skill → Extraction guidance: applies
- Scope generator skill → Section templates: uses
- Project source material → Section content JSON: extracts evidence into
- Extraction guidance → Section content JSON: constrains
- Section templates → Section content JSON: structures
- Scope generator skill → Cover variables JSON: creates
- Section content JSON → Scope DOCX renderer: renders
- Cover variables JSON → Scope DOCX renderer: renders
- Branded DOCX template → Scope DOCX renderer: provides branding
- Brand font → Scope DOCX renderer: provides typography
- Scope DOCX renderer → Client-ready scope DOCX: produces
- Scope generator skill → Raster diagram renderer: may invoke
- Scope generator skill → Existing diagram extractor: may invoke
- Raster diagram renderer → Architecture image: renders
- Existing diagram extractor → Architecture image: extracts
- Architecture image → Scope DOCX renderer: embeds optionally
- Editable diagram skill → draw.io XML generator: invokes
- Python document runtime → Scope DOCX renderer: runs
- Python document runtime → Raster diagram renderer: runs