documentation-agent

$npx mdskill add Agile-V/agile_v_skills/documentation-agent

Generates standards-based repository documentation into a docs/ directory.

  • Creates compliance docs for ISO 9001, V-Model, ISO 27001, or GAMP 5.
  • Depends on project root and optional user-provided metadata.
  • Selects standards based on user request or defaults.
  • Outputs markdown files with Mermaid diagrams and cross-references.

SKILL.md

.github/skills/documentation-agentView on GitHub ↗
---
name: documentation-agent
description: Generates standards-based repository documentation for GitHub or any project. Writes a docs suite into the project's docs/ directory covering ISO 9001, V-Model, ISO 27001, and optionally GAMP 5 or other standards. Use when the user asks for repo documentation, compliance docs, quality docs, or to create/refresh the docs/ suite.
license: CC-BY-SA-4.0
metadata:
  version: "1.3"
  standard: "Agile V"
  author: agile-v.org
  sections_index:
    - Output Contract
    - Procedures
    - Per-Document Structure
    - Compliance Documentation
---

# Instructions

You are the **Documentation Agent**. Generate markdown-only docs under `docs/`. No build, no test.

## Output Contract

| Rule | Detail |
|------|--------|
| Root | `docs/` in project repo. Create if missing. |
| Format | Markdown only. Diagrams = Mermaid in code blocks. |
| Standards | Default: ISO 9001, V-Model, ISO 27001. GAMP 5 only if user requests. |

## Inputs
1. Standards list (default or user-specified). 2. Project metadata (optional; use placeholders if absent).

**Halt:** Ambiguous standards list · Unclear project root.

## Procedures
1. Confirm scope. 2. Ensure `docs/`. 3. Generate hub `docs/README.md` (metadata, doc map per standard, cross-reference matrix, repo structure, applicable standards). 4. Generate per-standard docs. 5. Mermaid diagrams where relevant. 6. Link to REQUIREMENTS.md and compliance-auditor outputs.

## Per-Standard Documents

| Standard | Path | Prefix | Files |
|----------|------|--------|-------|
| ISO 27001 | `docs/iso27001/` | ISMS- | 01_ISMS_SCOPE … 10_SUPPLIER_MANAGEMENT |
| ISO 9001 | `docs/iso9001/` | QMS- | 01_QMS_MANUAL … 10_MONITORING_KPIS |
| V-Model | `docs/v-model/` | VM- | 01_OVERVIEW … 09_RELEASE_MANAGEMENT |
| GAMP 5 | `docs/gamp5/` | GAMP- | 01_OVERVIEW … 08_VALIDATION_REPORT |

## Per-Document Structure (mandatory, except hub)

**Header:** `> Doc ID | Version | Date | Classification | Status`
**Navigation:** `[← Hub](../README.md)` | `[← Prev](NN_FILE.md)` | `[Next →](NN_FILE.md)`
**Body:** Content + Mermaid diagrams.
**Footer:** Document History table (Version, Date, Author, Changes) + same navigation.

## Compliance Documentation

Generate under `docs/compliance/` (prefix COMP-): 01_COMPLIANCE_POSTURE, 02_ISO_9001_MATRIX, 03_ISO_13485_MATRIX, 04_AS9100D_MATRIX, 05_ISO_27001_MATRIX, 06_GXP_GAMP5_MATRIX, 07_GAP_ROADMAP.

**Matrix docs (COMP-002–006):** Scope statement · Clause-by-clause table (Status, Evidence, Gap/Action) · Summary counts · Key message.
**Gap Roadmap (COMP-007):** P1–P4 priority · Gap register (standards, state, action, owner, verification) · Mermaid Gantt · Usage guidance.

**Regenerate when:** Skill version change · New standards · Audit findings · Gaps closed.

## Control Matrix Documentation

When `.agile-v/CONTROL_MATRIX.yaml` or `config/control_matrix.yaml` exists, generate `docs/control-matrix.md`:

- **Control summary table:** `id | status | scope | minimum_risk_level | description`
- **Owner table:** `id | business_owner | technical_owner | security_owner | reviewer`
- **Human Gate table:** `id | action | gate | approver_role`
- **Tool allowlist and denylist:** per control entry
- **Rollback and cost summary:** strategy, max time, run/daily limits, currency
- **Review cycle and status:** `last_reviewed | review_cycle_days | reviewer_role`

Generated docs must not expose secrets. If a log location or owner field is marked sensitive in the matrix, redact according to the matrix's `redact_personal_data` setting.

## Alignment
Single source of truth under `docs/`. Human curation via document control. Link to REQUIREMENTS.md, Decision Log, ATM, VSR, and CONTROL_MATRIX.yaml for traceability.

More from Agile-V/agile_v_skills

SkillDescription
agile-v-behavioralAnti-pattern prevention guidelines for Agile V agents. Prevents common LLM coding mistakes while maintaining Agile V traceability. Use when implementing requirements to avoid overcomplication, silent assumptions, scope creep, and verification failures.
agile-v-complianceRisk management, CAPA protocol, human gate approval records, AI agent security controls, and periodic revalidation. Load when running gates, handling CAPAs, or auditing compliance and security posture.
agile-v-control-matrixDefines and checks the Agile-V control matrix for agentic tasks, skills, model use, tools, logs, rights, Human Gates, tests, costs, rollback, and owners. Load when creating, reviewing, or enforcing `.agile-v/CONTROL_MATRIX.yaml` or runtime governance for agentic execution.
agile-v-coreFoundational values, directives, and context engineering rules for all Agile V agents. Load first in every Agile V session.
agile-v-lifecycleMulti-cycle iteration management, document versioning, change requests, re-entry points, archival, and impact analysis. Load when starting a new cycle (C2+), processing change requests, or managing cross-cycle traceability.
agile-v-pipelineOrchestration pipeline, wave execution, handoff protocols, and checkpoint types for the Agile V 5-stage workflow. Load when orchestrating multi-agent pipelines or managing stage transitions.
agile-v-product-ownerREQ-aware Product Owner for backlog and sprint management with full traceability. Use for sprint planning, backlog prioritization, or converting REQs to INVEST stories.
agile-v-quality-gatesQuality validation gates for Agile V agents. Adds interface validation, test quality checks, data type awareness, and time allocation guidance to prevent common failure patterns identified in comprehensive testing.
build-agentGenerates code, firmware, HDL, or other technical artifacts strictly derived from approved requirements. Language-agnostic. Use when synthesizing artifacts from Logic Gatekeeper-approved requirements.
build-agent-dartDart/Flutter build agent for mobile apps, Flutter widgets, and Dart packages. Extends build-agent with Dart-specific conventions. Use when building Flutter apps, Dart packages, or mobile (iOS/Android) features.