Skip to content

๐Ÿ“ฆ Documentation Site Generator Agent Specification

๐Ÿ“Œ Purpose

The Documentation Site Generator Agent is responsible for scaffolding, configuring, and maintaining MkDocs-based documentation sites across the ConnectSoft platform โ€” from initial project creation through navigation management, CI/CD pipeline configuration, ADR tooling integration, and deployment to Azure Static Web Apps or GitHub Pages.

It ensures every ConnectSoft project, module, and edition has a consistent, navigable, and automatically deployed documentation site built from the ConnectSoft.DocumentationTemplate.

๐Ÿงพ Documentation that exists but isn't published is invisible. This agent makes every document built, deployed, and discoverable as a live site.


๐ŸŽฏ Primary Goals

Goal Description
๐Ÿ“ฆ Scaffold MkDocs projects Generate new documentation sites from ConnectSoft.DocumentationTemplate with proper structure
๐Ÿงญ Manage mkdocs.yml navigation Automatically update nav trees when new documents, ADRs, or API docs are added
โš™๏ธ Configure CI/CD pipelines Generate Azure Pipelines or GitHub Actions workflows for building and deploying doc sites
๐Ÿ”— Integrate ADR tooling Configure log4brains integration and ADR navigation within the documentation site
๐Ÿš€ Deploy to hosting targets Manage deployments to Azure Static Web Apps, GitHub Pages, or internal preview environments
๐Ÿ”„ Keep sites current Detect documentation structure changes and trigger site rebuilds automatically

๐Ÿง  Core Role in the Factory

The Documentation Site Generator Agent sits within the Documentation and Knowledge Management cluster as the build and deploy layer for all documentation content. While other agents (Documentation Writer, API Documentation, ADR) produce content, this agent ensures that content is assembled, navigated, and published as a cohesive site.


๐Ÿงฉ Position in the Documentation and Knowledge Management Cluster

Layer Cluster Description
๐Ÿ“ฆ Build & Deploy Layer Documentation & Knowledge Management Assembles documentation content into deployable MkDocs sites
๐Ÿงญ Navigation Manager Maintains mkdocs.yml nav structure as content evolves
โš™๏ธ Pipeline Orchestrator Configures and triggers CI/CD for documentation deployments
flowchart TD
    DOC_WRITER[๐Ÿ“ Documentation Writer Agent] -->|documentation_structure_changed| DOC_SITE[๐Ÿ“ฆ Documentation Site Generator Agent]
    ADR_AGENT[๐Ÿ“œ ADR Agent] -->|adr_published| DOC_SITE
    API_DOC[๐Ÿ“ก API Documentation Agent] -->|api_docs_updated| DOC_SITE
    DEVOPS[โš™๏ธ DevOps Engineer Agent] -->|project_created| DOC_SITE
    DOC_SITE --> AZURE_SWA[โ˜๏ธ Azure Static Web Apps]
    DOC_SITE --> GH_PAGES[๐ŸŒ GitHub Pages]
    DOC_SITE --> STUDIO[๐Ÿ“Š Studio Agent]
Hold "Alt" / "Option" to enable pan & zoom

โšก Triggering Events

Event Description
project_created A new ConnectSoft project or microservice is created, requiring documentation site scaffolding
documentation_structure_changed New documents, sections, or ADRs are added that require mkdocs.yml nav updates
release_published A new release triggers documentation site rebuild with updated version references
doc_site_config_drift_detected The mkdocs.yml is out of sync with the actual documentation file structure
doc_deployment_failed A previous documentation deployment failed and requires correction and retry

๐Ÿ“‹ Responsibilities and Deliverables

๐Ÿงฐ Key Responsibilities

Responsibility Description
๐Ÿ“ฆ MkDocs Project Scaffolding Generate mkdocs.yml, docs/ folder structure, and theme configuration from ConnectSoft.DocumentationTemplate
๐Ÿงญ Navigation Management Automatically update mkdocs.yml nav when documents are added, moved, or removed
โš™๏ธ CI/CD Pipeline Generation Create Azure Pipelines YAML or GitHub Actions workflows for building and deploying MkDocs sites
๐Ÿ”— ADR Integration Configure log4brains tooling and add ADR sections to the documentation site navigation
๐ŸŽจ Theme and Plugin Configuration Apply ConnectSoft Material for MkDocs theme, search plugin, mermaid diagrams, and admonitions
๐Ÿš€ Deployment Management Deploy built sites to Azure Static Web Apps or GitHub Pages with proper routing and custom domains
๐Ÿ”„ Drift Detection and Repair Detect when mkdocs.yml nav drifts from the actual file structure and auto-repair

๐Ÿ“ค Deliverables

Deliverable Type Description
๐Ÿ“ฆ documentation-site Complete MkDocs project with docs/, mkdocs.yml, theme, and plugins configured
๐Ÿงญ mkdocs-config Updated mkdocs.yml with current navigation tree, plugins, and theme settings
โš™๏ธ doc-pipeline CI/CD pipeline definition (Azure Pipelines YAML or GitHub Actions) for doc site build and deploy
๐Ÿ”— log4brains-config log4brains configuration file and ADR navigation integration

๐Ÿ“˜ Example Output: mkdocs.yml

site_name: ConnectSoft VetClinic Documentation
site_url: https://docs.connectsoft.ai/vetclinic
repo_url: https://github.com/connectsoft/vetclinic

theme:
  name: material
  palette:
    primary: indigo
    accent: teal
  features:
    - navigation.tabs
    - navigation.sections
    - search.suggest
    - content.code.copy

plugins:
  - search
  - mermaid2

markdown_extensions:
  - admonition
  - pymdownx.details
  - pymdownx.superfences:
      custom_fences:
        - name: mermaid
          class: mermaid
          format: !!python/name:pymdownx.superfences.fence_code_format

nav:
  - Home: index.md
  - Architecture:
    - Overview: architecture/overview.md
    - Decisions:
      - ADR-0001 Use MassTransit: decisions/adr-0001-use-masstransit.md
      - ADR-0002 Multi-Tenant Strategy: decisions/adr-0002-multi-tenant-strategy.md
  - API Reference:
    - Appointments API: api/appointments.md
    - Notifications API: api/notifications.md
  - Modules:
    - Appointment Service: modules/appointment-service/README.md
    - Notification Service: modules/notification-service/README.md
  - Guides:
    - Getting Started: guides/getting-started.md
    - SDK Integration: guides/sdk-integration.md

๐Ÿ“˜ Example Output: CI/CD Pipeline

trigger:
  branches:
    include:
      - main
  paths:
    include:
      - docs/**
      - mkdocs.yml

pool:
  vmImage: ubuntu-latest

steps:
  - task: UsePythonVersion@0
    inputs:
      versionSpec: '3.11'

  - script: |
      pip install mkdocs-material pymdown-extensions mkdocs-mermaid2-plugin
      mkdocs build --strict
    displayName: 'Build MkDocs Site'

  - task: AzureStaticWebApp@0
    inputs:
      app_location: 'site'
      output_location: ''
    displayName: 'Deploy to Azure Static Web Apps'

๐Ÿค Collaboration Interfaces

๐Ÿ”— Upstream Agents (Inputs)

Agent Input Provided
Documentation Writer Agent New or updated Markdown documents requiring nav integration
ADR Agent Published ADRs that need to be added to the decisions section
API Documentation Agent API reference pages for inclusion in the API section
DevOps Engineer Agent Project creation events and CI/CD infrastructure context

๐Ÿ“ค Downstream Agents (Outputs Consumed By)

Agent Output Consumed
DevOps Engineer Agent CI/CD pipeline definitions for documentation deployment
Knowledge Management Agent Site structure metadata for knowledge indexing
Studio Agent Documentation site health, deployment status, and freshness metrics

๐Ÿ“Š Collaboration Flow

flowchart TD
    DOC_WRITER[๐Ÿ“ Documentation Writer] --> DOC_SITE[๐Ÿ“ฆ Doc Site Generator]
    ADR_AGENT[๐Ÿ“œ ADR Agent] --> DOC_SITE
    API_DOC[๐Ÿ“ก API Documentation] --> DOC_SITE
    DEVOPS_IN[โš™๏ธ DevOps Engineer] --> DOC_SITE

    DOC_SITE --> DEVOPS_OUT[โš™๏ธ DevOps Engineer]
    DOC_SITE --> KM[๐Ÿง  Knowledge Management]
    DOC_SITE --> STUDIO[๐Ÿ“Š Studio Dashboard]
    DOC_SITE --> HOSTING[โ˜๏ธ Hosting Targets]
Hold "Alt" / "Option" to enable pan & zoom

๐Ÿง  Memory and Knowledge

๐Ÿ“š Pre-Embedded Knowledge

Domain Description
๐Ÿ“ฆ MkDocs configuration Full understanding of mkdocs.yml schema, Material theme options, and plugin ecosystem
โš™๏ธ CI/CD pipeline patterns Azure Pipelines and GitHub Actions templates for MkDocs build and deploy
๐Ÿ”— log4brains integration Configuration patterns for log4brains ADR browsing within MkDocs sites
๐ŸŽจ ConnectSoft.DocumentationTemplate Standard project structure, theme configuration, and nav conventions
โ˜๏ธ Azure Static Web Apps Deployment configuration, custom domain setup, and routing rules

๐Ÿง  Short-Term Memory

Capability Description
๐Ÿ“ Active project context Current documentation project being scaffolded or updated
๐Ÿงญ Nav diff state Changes detected between current mkdocs.yml nav and file system structure
โš™๏ธ Pipeline generation context Target hosting platform and CI/CD system for current deployment

๐Ÿง  Long-Term Memory

Memory Type Storage Purpose
๐Ÿ“ฆ Site registry doc-sites-index.yaml Registry of all documentation sites with hosting URLs and last deploy dates
๐Ÿงญ Nav history nav-change-history.yaml Tracks navigation changes across documentation site rebuilds
โš™๏ธ Pipeline templates Template library Reusable CI/CD pipeline patterns by hosting target
๐Ÿ“Š Deployment metrics doc-deploy.metrics.json Build success rates, deployment frequency, and site freshness

โœ… Validation

๐Ÿงช Validation Checks

Check Description
๐Ÿ“ฆ MkDocs build success Site must build successfully with mkdocs build --strict (no warnings)
๐Ÿงญ Nav completeness Every .md file in docs/ must be reachable from the nav tree
๐Ÿ”— Link integrity All internal links between documentation pages must resolve
โš™๏ธ Pipeline validity Generated CI/CD pipelines must be syntactically valid YAML
๐ŸŽจ Theme consistency Theme configuration must match ConnectSoft documentation standards
๐Ÿ“œ ADR integration log4brains configuration must be valid and ADRs must appear in the decisions nav

๐Ÿ” Retry and Correction

Scenario Correction
MkDocs build failure Parse error output, fix mkdocs.yml syntax or missing files, rebuild
Orphaned documents not in nav Auto-add to appropriate nav section based on file path conventions
Deployment failure Check hosting credentials, retry deployment with backoff
Theme plugin incompatibility Fall back to base Material theme without conflicting plugins

๐Ÿ“Š Observability Hooks

Event Trigger Payload
DocSiteScaffolded New documentation site created projectId, templateVersion, traceId
DocSiteNavUpdated Navigation tree updated addedPages, removedPages, traceId
DocSiteDeployed Documentation site successfully deployed siteUrl, hostingTarget, buildDuration, traceId
DocSiteDeployFailed Deployment failed reason, hostingTarget, traceId
DocSiteDriftDetected Nav/structure drift detected driftType, affectedFiles, traceId

๐Ÿงพ Summary and Positioning

The Documentation Site Generator Agent is the build and deploy engine for ConnectSoft documentation, ensuring every project has a:

  • ๐Ÿ“ฆ Properly scaffolded MkDocs site with ConnectSoft theming and structure
  • ๐Ÿงญ Current navigation that automatically reflects documentation additions and changes
  • โš™๏ธ CI/CD pipeline for automated building and deployment on every change
  • ๐Ÿ”— ADR integration with log4brains tooling for browsable architecture decisions
  • ๐Ÿš€ Live deployment to Azure Static Web Apps or GitHub Pages with zero manual steps

๐Ÿงฉ Position in the ConnectSoft Platform

flowchart TD
    CONTENT_AGENTS[๐Ÿ“„ Content Agents] --> DOC_SITE[๐Ÿ“ฆ Doc Site Generator]
    DOC_SITE --> BUILD[๐Ÿ”จ MkDocs Build]
    BUILD --> DEPLOY[๐Ÿš€ Deploy]
    DEPLOY --> AZURE_SWA[โ˜๏ธ Azure Static Web Apps]
    DEPLOY --> GH_PAGES[๐ŸŒ GitHub Pages]
    DOC_SITE --> STUDIO[๐Ÿ“Š Studio Dashboard]
Hold "Alt" / "Option" to enable pan & zoom

Without this agent, documentation is a collection of loose Markdown files. With it, documentation becomes a live, navigable, automatically deployed knowledge portal that serves developers, stakeholders, and AI agents alike.