documentation-lens
Scannednpx machina-cli add skill WE3io/lightweight-ai-development-agent-skills/documentation-lens --openclawDocumentation Lens
Overview
Provide brief, neutral signals when documentation may be duplicated, misplaced, or over-explained. Prefer links over restatement. When new knowledge is intentionally recorded, expect a single canonical location with references linking to it rather than duplicating content.
Guiding principle: Document to position the reader in the system, state only durable contracts, and include detail solely when its long-term value exceeds its maintenance cost. (See documentation-principles.md for full guidance.)
Workflow
-
Discovery first
- Inspect the repository for existing documentation conventions (README structure, docs/ directories, architecture or decision docs, inline patterns).
- If conventions exist, align to them.
- If none exist, propose a minimal documentation convention as a suggestion only, and ask for confirmation before creating anything.
-
Identify knowledge intent
- Is the input new system knowledge, a restatement, or a mix?
-
Check for canonical placement
- Ask whether a canonical home exists (README, architecture, ADR).
- If unsure, state uncertainty explicitly.
-
Mode and persistence
- Ephemeral mode (default): review drafts, diffs, or proposed text and provide advisory signals only; write no files.
- Persistent mode (opt-in): write or edit documentation files only with explicit human instruction, aligned with discovered or agreed conventions.
-
Surface advisory signals
- Apply the core documentation principle: position the reader, state durable contracts, include detail only when long-term value exceeds maintenance cost.
- Use phrasing like:
- "This looks similar to…"
- "You might consider linking to…"
- "This may fit better in…"
- "This detail may have low long-term value relative to maintenance cost…"
- Focus on conceptual duplication, misplaced background, or explanatory but non-authoritative docs.
- Avoid flagging minor repetition, enforcing style preferences, or large-scale semantic analysis.
- Do not prescribe exact edits.
-
Stop cleanly
- Present advisory signals (if any) and suggested canonical locations or links.
- If the human explicitly defers documentation changes, acknowledge and stop without revisiting.
- Do not rewrite or move content.
- Return control immediately.
Output format
Return a brief advisory assessment with one or more signals:
- Looks canonical (introduces genuinely new knowledge).
- Possible duplication detected (what is duplicated, where the canonical source may live).
- Verbosity / placement signal (content may be overly narrative or belong elsewhere). Optionally include suggested canonical locations or links.
Refusals
Politely refuse requests to:
- Rewrite or merge documentation.
- Enforce doc structure or templates.
- Block commits or PRs.
- Perform large-scale semantic analysis.
Tone
Calm, collegial, neutral. Advisory only. Prefer false negatives to false positives.
Source
git clone https://github.com/WE3io/lightweight-ai-development-agent-skills/blob/main/skills/documentation-lens/SKILL.mdView on GitHub Overview
Documentation Lens flags potential duplication, misplacement, or verbosity in drafts, backlog items, ADRs, or explanations. It steers teams toward a single source of truth by recommending canonical locations and linking to them rather than restating content. This helps reduce maintenance costs and improve discoverability of authoritative information.
How This Skill Works
It analyzes repository structure for existing documentation conventions, evaluates the knowledge intent, and checks for a canonical home (readme, architecture doc, or ADR). By default it operates in ephemeral mode, providing advisory signals without editing files; in persistent mode it can write or modify docs only with explicit human instruction and aligned conventions.
When to Use It
- Review a draft to detect duplication and suggest a canonical home
- Audit a backlog item or ADR for misplaced background or non-authoritative explanations
- Check for duplication across README, docs/ directories, and architecture docs and surface links
- Evaluate explanatory text for long-term value before adding it to a document
- Consolidate product docs by pointing to a single source of truth and avoiding restatement
Quick Start
- Step 1: Run in ephemeral mode on the draft to surface advisory signals without editing files
- Step 2: Identify potential canonical locations (README, ADR, architecture doc) and note suggested links
- Step 3: Review advisory signals with the author; if approved, route content to the canonical source or add links; do not rewrite content automatically
Best Practices
- Align signals with your existing documentation conventions before acting
- Always check for a canonical home (readme, architecture doc, ADR) and suggest it
- Focus on conceptual duplication, misplaced background, and verbosity signals rather than style
- Provide advisory signals only; avoid rewriting or moving content automatically
- Surface links to canonical sources and outline next steps rather than making edits
Example Use Cases
- This looks similar to the architecture ADR; consider linking to ADR-123 instead of duplicating
- Duplicate introductory paragraph appears in both the README and docs/intro.md; point readers to the canonical Concepts doc
- A backlog item includes extended background that is better described in the canonical Overview doc
- Inline background in multiple docs; reference the single source of truth in docs/CONCEPTS and link accordingly
- Explanatory but non-authoritative text could be moved to a dedicated glossary or reference page