Docs manager

From SkillPanel/maister · View interactive version

Docs manager is an AI agent skill from the GitHub repository SkillPanel/maister. Internal engine for managing project documentation and technical standards in .maister/docs/. Handles file operations, INDEX.md generation, and .github/copilot-instructions.md integration. Invoked by maister-init, standards-update, and standards-discover skills.

How to use this skill

Skill file

Documentation Manager (Internal Engine)

Internal skill that manages documentation file operations in .maister/docs/. Not directly user-invocable — called by maister-init, standards-update, and standards-discover skills.

Core Principles

Documentation Structure

.maister/docs/
├── INDEX.md                      # Master index - READ THIS FIRST
├── project/                      # Project-level documentation (generated by maister-init, not copied from templates)
│   ├── vision.md                # Project vision and goals
│   ├── roadmap.md               # Development roadmap
│   ├── tech-stack.md            # Technology choices and rationale
│   └── architecture.md          # System architecture (optional)
└── standards/                    # Technical standards and conventions
    ├── global/                  # Language-agnostic standards
    │   ├── error-handling.md
    │   ├── validation.md
    │   ├── conventions.md
    │   ├── coding-style.md
    │   └── commenting.md
    ├── frontend/                # Frontend-specific standards
    │   ├── css.md
    │   ├── components.md
    │   ├── accessibility.md
    │   └── responsive.md
    ├── backend/                 # Backend-specific standards
    │   ├── api.md
    │   ├── models.md
    │   ├── queries.md
    │   └── migrations.md
    └── testing/                 # Testing standards
        └── test-writing.md

Standard File Conventions

Standard files follow the structure standards/[category]/[topic].md:

Format: Each file uses ## Topic as the file heading, with ### Standard Name for each individual standard. Each standard has a 1-10 line description (excluding code snippets) and an optional brief code example (under 10 lines).

Conciseness: Standards are quick-reference conventions, not tutorials. If a file grows unwieldy, split into focused sub-topic files.

Why ### per standard: Each standard as a discrete section makes it easier for agents to find, update, and reference individually — no need to parse bullet lists.


Bundled Resources

This skill bundles the following resources within the plugin:

Location Reference

Capabilities

1. Initialize Documentation in Project

Use this when a project doesn't have .maister/docs/ or needs documentation for the first time. This is a one-time baseline setup that gives the project a starting point.

IMPORTANT: This operation accepts an optional standards_selection parameter (array of standard categories) to control which standards to initialize. If not provided, all standards are copied (backward compatible). It also accepts an optional standards_source_path parameter to copy standards from an external project instead of the bundled defaults.

What to do:

  1. Check if .maister/docs/ exists in the project root
  2. If it exists, warn the user that initialization will overwrite existing documentation and ask for confirmation
  3. Create the directory structure based on standards_selection:

```

.maister/docs/

├── project/

└── standards/

├── global/ (if 'global' in standards_selection or no selection provided)

├── frontend/ (if 'frontend' in standards_selection or no selection provided)

├── backend/ (if 'backend' in standards_selection or no selection provided)

└── testing/ (if 'testing' in standards_selection or no selection provided)

```

  1. Copy standards to the project's .maister/docs/standards/ directory. Source selection: If standards_source_path is provided, copy from that external path. Otherwise, copy from this skill's bundled docs/standards/ directory:
  1. Generate INDEX.md with entries for all copied documentation (see "Manage INDEX.md" operation):

```markdown

### Frontend Standards

Not initialized for this project. If you need frontend standards, you can:

```

  1. MANDATORY - Update .github/copilot-instructions.md:
  1. Inform the caller about the documentation structure created

Parameters:

Result: The project now has baseline documentation in .maister/docs/, a comprehensive INDEX.md, and .github/copilot-instructions.md integration that ensures AI assistance is documentation-aware. Only selected standard categories are initialized.

Important: After this initial setup, the project's documentation becomes the source of truth. Teams should customize it for their specific needs.

Note on Skipped Standards: If standard categories are skipped during initialization, teams can add them later using:


2. Manage INDEX.md

Use this to create or update the INDEX.md file that serves as the master documentation map.

What to do:

  1. Scan the .maister/docs/ directory structure
  2. For each documentation file found:
  1. Read references/index-md-template.md for the INDEX.md structure template
  2. Generate INDEX.md by populating the template with discovered files and descriptions
  3. Write the generated INDEX.md to .maister/docs/INDEX.md
  4. Verify that .github/copilot-instructions.md references this index (see "Manage .github/copilot-instructions.md Integration" operation)

Result: A comprehensive, up-to-date INDEX.md that provides a clear map of all project documentation.


3. Add Documentation File

Use this to add new documentation to the project, either from plugin baseline or custom.

What to do:

  1. Determine the type of documentation to add:
  1. If adding from plugin baseline:
  1. If creating custom documentation:
  1. Update INDEX.md to include the new documentation (see "Manage INDEX.md" operation)
  2. If this is a technical standard and corresponds to a Claude Code Skill, ensure consistency

Result: New documentation is added to the project and indexed in INDEX.md.


4. Update Documentation

Use this to help the user update or modify existing project documentation.

What to do:

  1. Accept the documentation identifier from the user (e.g., "project/vision", "standards/global/error-handling")
  2. Check if the documentation exists in .maister/docs/
  3. If the documentation exists:
  1. If the documentation doesn't exist:
  1. After updating:
  1. For technical standards:

Result: Documentation is updated to reflect current project state and team decisions.


5. Use Plugin Documentation as Reference

Use this when a team wants to see the plugin's baseline documentation for reference, or reset specific docs to plugin defaults.

What to do:

  1. Compare the documentation in this skill's bundled docs/ directory with the project's .maister/docs/ directory to identify differences
  2. Show the user which documents differ and how they differ
  3. Explain that plugin documentation is baseline/reference only, and project documentation is superior
  4. WARNING: Copying plugin documentation to the project will overwrite any project-specific customizations
  5. Ask the user if they want to:
  1. If the user chooses to copy any documentation:

Important: This operation should be used rarely, mainly when a team wants to reset to baseline. Project documentation is the source of truth and should be maintained by the team.

Result: User can reference plugin baseline documentation and optionally reset specific docs to plugin versions.


6. List Available Documentation

Use this to show what documentation is bundled with this plugin and their installation status in the project.

What to do:

  1. List all documentation in this skill's bundled docs/ directory, organized by category
  2. For each bundled document:
  1. Show whether INDEX.md exists and is up-to-date
  2. Show whether .github/copilot-instructions.md has documentation integration
  3. Remind the user that plugin documentation is baseline/reference only, and project documentation (if installed) is the source of truth

Result: The user sees a complete inventory of available baseline documentation and their installation status in the current project.


7. Manage .github/copilot-instructions.md Integration

Use this to ensure the project's .github/copilot-instructions.md properly integrates with the documentation system, encouraging AI to read and use the documentation.

What to do:

  1. Check if .github/copilot-instructions.md exists in the project root
  2. If it doesn't exist, ask the user if they want to create it
  3. Look for a documentation reference section in .github/copilot-instructions.md
  4. If the section doesn't exist or is incomplete:
  1. Ensure the documentation section is placed prominently in .github/copilot-instructions.md (near the top)
  2. Verify that the INDEX.md path is correct and the file exists
  3. If .maister/docs/ doesn't exist, suggest running the initialization operation first

Result: .github/copilot-instructions.md properly integrates with the documentation system, ensuring AI assistance is documentation-aware and follows team conventions.


8. Validate Documentation Consistency

Use this to check that documentation is consistent, up-to-date, and properly integrated.

What to do:

  1. Check structure:
  1. Check INDEX.md:
  1. Check .github/copilot-instructions.md integration:
  1. Check project documentation:
  1. Check standards consistency:
  1. Generate validation report:
  1. Offer to fix issues:

Result: A comprehensive validation report with optional automatic fixes for common issues.


Usage Examples

Initialize documentation in a new project:

User: "Set up documentation for this project"
Claude: [Executes Initialize Documentation - creates structure, copies baseline docs, generates INDEX.md, updates .github/copilot-instructions.md, gathers project info]

Update project vision:

User: "I want to update our project vision to include AI-first approach"
Claude: [Executes Update Documentation - reads current vision.md, helps user edit it, updates INDEX.md if needed]

Add custom documentation:

User: "Add documentation for our deployment process"
Claude: [Executes Add Documentation File - creates custom project/deployment.md, updates INDEX.md]

Reference plugin baseline:

User: "Show me the plugin's baseline error handling standard"
Claude: [Executes Use Plugin Documentation as Reference - shows plugin baseline, compares with project version, no changes unless user requests]

Validate documentation:

User: "Check if our documentation is complete and consistent"
Claude: [Executes Validate Documentation Consistency - checks structure, INDEX.md, .github/copilot-instructions.md integration, generates report]

Manage INDEX.md:

User: "Rebuild the documentation index"
Claude: [Executes Manage INDEX.md - scans .maister/docs/, regenerates comprehensive INDEX.md]

Important Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.