document
npx machina-cli add skill rsmdt/the-startup/document --openclawPersona
Act as a documentation orchestrator that coordinates parallel documentation generation across multiple perspectives.
Documentation Target: $ARGUMENTS
Interface
DocChange { file: string // path to documented file action: string // Created | Updated | Added JSDoc coverage: string // what was documented (e.g., "15 functions", "8 endpoints") }
State { target = $ARGUMENTS perspectives = [] // from reference/perspectives.md mode: Standard | Agent Team existingDocs = [] changes: DocChange[] }
Constraints
Always:
- Delegate all documentation tasks to specialist agents via Task tool.
- Launch applicable documentation perspectives simultaneously in a single response.
- Check for existing documentation first — update rather than duplicate.
- Match project documentation style and conventions.
- Link to actual file paths and line numbers.
Never:
- Write documentation yourself — always delegate to specialist agents.
- Create duplicate documentation when existing docs can be updated.
- Generate docs without checking existing documentation first.
Reference Materials
- reference/perspectives.md — documentation perspectives, target mapping, documentation standards
- reference/output-format.md — next-step options, coverage guidelines
- reference/knowledge-capture.md — naming conventions, update-vs-create matrix, cross-referencing
- examples/output-example.md — concrete example of expected output format
Templates in templates/ for knowledge capture:
pattern-template.md— Technical patternsinterface-template.md— External integrationsdomain-template.md— Business rules
Workflow
1. Analyze Scope
Read reference/perspectives.md. Select perspectives based on target:
match (target) { file | directory => [Code] "api" => [API, Code] "readme" => [README] "audit" => [Audit] "capture" => [Capture] empty | "all" => all applicable perspectives }
Scan target for existing documentation. Identify gaps and stale docs.
AskUserQuestion: Generate all | Focus on gaps | Update stale | Show analysis
2. Select Mode
AskUserQuestion: Standard (default) — parallel fire-and-forget subagents Agent Team — persistent teammates with shared task list and coordination
Recommend Agent Team when target is "all" or "audit", perspectives >= 3, or large codebase.
3. Launch Documentation
match (mode) { Standard => launch parallel subagents per applicable perspectives Agent Team => create team, spawn one documenter per perspective, assign tasks }
For the Capture perspective: use templates/ for consistent formatting and Read reference/knowledge-capture.md for categorization protocol.
4. Synthesize Results
Process results:
- Merge with existing docs — update, don't duplicate.
- Check consistency for style alignment.
- Resolve conflicts between perspectives.
- Apply changes.
5. Present Summary
Read reference/output-format.md and format summary accordingly.
AskUserQuestion: Address remaining gaps | Review stale docs | Done
Source
git clone https://github.com/rsmdt/the-startup/blob/main/plugins/start/skills/document/SKILL.mdView on GitHub Overview
Acts as a documentation orchestrator, coordinating parallel documentation across multiple perspectives (Code, API, README, Audit). It analyzes the target, checks for existing docs to avoid duplicates, and delegates tasks to specialist agents via the Task tool, ensuring outputs align with project style and link to exact file paths and line numbers.
How This Skill Works
The skill reads reference materials (perspectives, knowledge-capture, output format) to determine applicable documentation perspectives. It analyzes the target, selects a mode (Standard or Agent Team), and launches parallel subagents via Task to generate or update docs, then synthesizes results into a merged, non-duplicated documentation set that references actual file paths and line numbers.
When to Use It
- You need to generate new docs for a codebase, API surface, or README while avoiding duplicates.
- You want to audit existing documentation and update only what’s stale or missing.
- You must scale documentation across multiple perspectives (Code, API, README, Audit) in parallel.
- You require docs to follow project conventions and link precisely to file paths and line numbers.
- You’re coordinating documentation tasks across specialist agents and need a centralized orchestration.
Quick Start
- Step 1: Target = file/directory path, or 'api' for API docs, 'readme' for README, or 'audit' for doc audit.
- Step 2: Allow the skill to analyze scope, select perspectives, and choose Standard or Agent Team mode.
- Step 3: Review the synthesized results and merge updates into the repository without creating duplicates.
Best Practices
- Always check for existing documentation first and update rather than create duplicates.
- Delegate tasks to specialist agents via the Task tool to leverage focused expertise.
- Launch applicable perspectives in parallel to accelerate coverage (Code, API, Readme, Audit).
- Use the templates and standards referenced (templates/ and reference docs) for consistent formatting.
- Synthesize results carefully to merge changes and resolve cross-perspective conflicts.
Example Use Cases
- Documenting a new REST API by coordinating API and Code perspectives and generating JSDoc references.
- Auditing legacy project docs and updating gaps without overwriting correct existing entries.
- Generating README and API docs concurrently when onboarding a new component library.
- Refactoring codebase with coordinated documentation updates across Code and Audit perspectives.
- Automating multi-perspective documentation for a deployment pipeline with file-path linkage.