AgentSkillsCN

eaa-documentation-writer

适用于编写模块规格、API 合约、ADR,或功能规格时使用。遵循 6C 质量框架。在收到模块或架构的技术文档请求时触发。

SKILL.md
--- frontmatter
name: eaa-documentation-writer
description: Use when writing module specs, API contracts, ADRs, or feature specs. Follows 6 C's quality framework. Trigger with technical documentation requests for modules or architecture.
version: 1.0.0
license: Apache-2.0
compatibility: Works with any codebase. Outputs to standardized documentation directories (/docs/module-specs/, /docs/api-contracts/, /docs/adrs/). Requires AI Maestro installed.
metadata:
  author: Anthropic
  triggers: "Create technical documentation for a module, Write API contract documentation, Document architecture decisions (ADR), Create feature specifications"
context: fork

Documentation Writer Skill

Overview

Technical documentation creation skill for the Documentation Writer Agent. This skill provides templates, quality standards, and workflows for producing module specifications, API contracts, architecture decision records (ADRs), and feature specifications.

Prerequisites

  • Access to documentation output directories (/docs/module-specs/, /docs/api-contracts/, /docs/adrs/)
  • Understanding of the 6 C's quality framework
  • Read access to source code for reference

Instructions

  1. Receive and parse documentation assignment
  2. Gather context from existing code and specifications
  3. Create document structure using appropriate template
  4. Write core content following quality standards
  5. Add cross-references to related documents
  6. Perform quality check against 6 C's
  7. Commit and report completion

Output

ArtifactLocationFormatContains
Module Specification/docs/module-specs/<module-name>.mdMarkdownPurpose, interfaces, dependencies, configuration
API Contract/docs/api-contracts/<api-name>.mdMarkdownEndpoints, request/response schemas, authentication
Architecture Decision Record/docs/adrs/ADR-<NNN>-<title>.mdMarkdownContext, decision, consequences, alternatives
Feature Specification/docs_dev/requirements/<feature-name>.mdMarkdownUser stories, requirements, acceptance criteria
Process Documentation/docs/workflows/<process-name>.mdMarkdownWorkflow steps, responsibilities, tooling

Table of Contents

    1. Document Templates
    1. Quality Standards
    1. Writing Workflow
    1. Operational Guidelines
    1. Agent Interactions

Quick Reference

Document Types

TypeTemplatePurpose
Module Specificationtemplates-reference.mdTechnical spec for implementation
API Contracttemplates-reference.mdEndpoint documentation
ADRtemplates-reference.mdArchitecture decisions
Feature Specificationtemplates-reference.mdUser stories and requirements

Output Locations

Document TypeDirectory
Module Specs/docs/module-specs/
API Contracts/docs/api-contracts/
ADRs/docs/adrs/
User Requirements/docs_dev/requirements/
Process Docs/docs/workflows/

Quality Checklist

Copy this checklist and track your progress:

  • Receive and parse documentation assignment
  • Gather context from existing code and specifications
  • Create document structure using appropriate template
  • Write core content following quality standards
  • Add cross-references to related documents
  • Perform quality check against 6 C's:
    • Complete - all aspects covered
    • Correct - technically accurate
    • Clear - unambiguous language
    • Consistent - same terminology throughout
    • Current - reflects latest decisions
    • Connected - cross-references to related docs
  • Commit document to appropriate location
  • Report completion to orchestrator

Reference Documents

Templates Reference

For all document templates, see: templates-reference.md

    1. Module Specification Template
    1. API Contract Template
    1. Architecture Decision Record (ADR) Template
    1. Input Format Examples

Quality Standards

For documentation quality criteria, see: quality-standards.md

    1. Documentation Quality Criteria
    • 1.1 Must Be (6 C's)
    • 1.2 Must Include
    • 1.3 Must Avoid
    1. Feature Specification Example

Writing Workflow

For step-by-step procedure, see: writing-workflow.md

    1. Step 1: Receive and Parse Assignment
    1. Step 2: Gather Context
    1. Step 3: Create Document Structure
    1. Step 4: Write Core Content
    1. Step 5: Add Cross-References
    1. Step 6: Quality Check
    1. Step 7: Commit and Report

Operational Guidelines

For document management, see: operational-guidelines.md

    1. When to Create New Documents
    1. When to Update Existing Documents
    1. Document Organization
    1. Version Control
    1. Troubleshooting

Agent Interactions

For agent coordination, see: agent-interactions.md

    1. Upstream Agents (Receive Input From)
    1. Downstream Agents (Provide Output To)
    1. Peer Agents (Bidirectional)
    1. Handoff Protocol

IRON RULE

This skill is for DOCUMENTATION ONLY. NEVER write source code.

All code examples in documentation are illustrative only.

Examples

Example 1: Write Module Specification

code
Assignment: Document the auth-service module

1. Read existing auth-service code
2. Use Module Specification template
3. Document:
   - Purpose and responsibilities
   - Public interfaces
   - Dependencies
   - Configuration options
4. Quality check: Complete, Correct, Clear, Consistent, Current, Connected
5. Output: /docs/module-specs/auth-service.md

Example 2: Create Architecture Decision Record

code
Assignment: Document decision to use PostgreSQL

1. Use ADR template
2. Document:
   - Context: Database selection needed
   - Decision: PostgreSQL chosen
   - Consequences: Pros and cons
   - Alternatives considered
3. Output: /docs/adrs/ADR-001-database-selection.md

Error Handling

ErrorCauseSolution
Missing contextSource code unavailableRequest access from orchestrator
Template not foundTemplate file missingUse templates-reference.md
Quality check failed6 C's not metRevise content, recheck each criterion
Cross-reference brokenLinked doc moved/deletedUpdate link or remove reference
Duplicate ADR numberNumbering conflictCheck existing ADRs, use next available

Resources