smithery.ai

generate-verified-docs

Generates audit-grade, hallucination-free documentation from codebase features with full traceability. Use when documenting features, creating technical specs, or generating verified documentation with code references.

First seen Mar 29, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 7,080 B
  • docs SUMMARY.md 248 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Verified Documentation Generator

Generate audit-grade documentation from a codebase feature with full traceability and zero hallucination.

Arguments

$ARGUMENTS should be:

  • Feature name and description (e.g., "User Registration", "Bookmark System", "Reading Progress")

Prerequisites

  • Clear feature name and description from user
  • Access to the codebase root directory

Hard Rules

  • ❌ No assumptions or inferred behavior
  • ❌ No undocumented states or transitions
  • ✅ Every claim must link to file:line
  • ✅ Unknowns must be explicitly reported
  • ✅ Halt if verification fails

Stage 1: Scope Resolution

Goal: Define feature boundaries and reject ambiguous scopes.

  1. Parse the feature description to identify expected entry points (API routes, UI components, CLI

commands)

  1. Search codebase for matching routes, exported functions/classes, and test files
  2. Validate at least one concrete code location exists

Gate:

  • If no code locations found → HALT with failure report
  • If scope is ambiguous → Ask user to narrow scope
  • If confirmed → Proceed with entrypointcandidates list

Output: scopedefinition, entrypointcandidates, scopeconfidence


Stage 2: Codebase Discovery

Goal: Map all code artifacts related to the feature.

  1. Verify each entry point exists and classify as: API | UI | JOB | EVENT | CLI
  2. Trace dependencies (imports, injected dependencies, runtime-resolved modules)
  3. Build dependency graph (DAG)
  4. Classify artifacts: Controllers, Services, Repositories, Models, Utils, External
  5. Extract data models with types, relationships, and validation rules

Gate:

  • Every entry point must be verifiable (fileexists, lineexists, callable)
  • If no verifiable entry points → HALT

Output: entrypoints, dependencygraph, artifactsbytype, datamodels, externalintegrations, discovery_gaps


Stage 3: Execution Flow Tracing

Goal: Trace complete execution paths from entry to exit.

  1. Synchronous paths: Follow function call chains, record decision branches, track variable

transformations

  1. Async boundaries: Identify Promise/async-await, event emitters, message queues, webhooks
  2. Side effects: Catalog DATABASEWRITE, DATABASEREAD, EXTERNALCALL, FILESYSTEM, CACHE_OP,

EVENT_EMIT, LOGGING

  1. Flow enumeration: Build all paths, tag as HAPPYPATH | ERRORPATH | EDGE_CASE

Gate:

  • Every flow step must have a code reference
  • If coverage below threshold → Ask user to accept partial or HALT

Output: executionflows, asyncboundaries, sideeffects, flowcoverage, untraced_branches


Stage 4: State & Transition Extraction

Goal: Extract explicit state machines; reject inferred states.

  1. Search for status/state enums, FSM patterns, status columns in schemas
  2. Map transitions: STATEA --[condition]--> STATEB @ file:line
  3. Verify each state value exists in code (enum, constant, or literal)
  4. Identify orphan states (no inbound) and terminal states (no outbound)

Gate:

  • Every state must have a code reference
  • Every transition must link verified states
  • If undocumented states found → HALT with failure report

Output: states, transitions, statemachine, orphanstates, terminal_states


Stage 5: Failure & Edge Case Analysis

Goal: Identify error handling coverage and missing failure modes.

  1. Locate try/catch blocks, error callbacks, error boundaries, middleware handlers
  2. Trace exception propagation paths
  3. Detect edge cases: NULLINPUT, EMPTYARRAY, BOUNDARY_VALUES, PERMISSION, TIMEOUT, CONFLICT
  4. Score risk: LOW | MEDIUM | HIGH | CRITICAL

No hard gate – outputs are informational.

Output: handledfailures, unhandledfailures, silentfailures, edgecases, risk_areas


Stage 6: Diagram Generation

Goal: Produce diagrams strictly matching verified flows.

  1. Generate State Diagram (Mermaid stateDiagram-v2) from state_machine
  2. Generate Sequence Diagrams (Mermaid sequenceDiagram) from execution_flows
  3. Generate Dependency Diagram (Mermaid flowchart) from dependency_graph
  4. Cross-check every diagram element against source stage outputs

Gate:

  • Remove any unverified elements
  • Log warnings for removed elements

Output: statediagram, sequencediagrams, dependencydiagram, diagramverification_log


Stage 7: Documentation Assembly

Goal: Produce structured documentation.

Generate markdown with these sections:

# [Feature Name] Documentation

## Overview

## Entry Points

## Data Models

## Execution Flows

## State Machine

## Error Handling

## Known Gaps & Limitations

## Appendix: Code References
  1. Every claim gets [ref: file:line] annotation
  2. Build clickable traceability index
  3. Generate two views: Technical (full detail) and Non-Technical (simplified)

Output: documentationtechnical, documentationsummary, traceabilityindex, confidencereport


Stage 8: Verification & Validation

Goal: Cross-check all claims; fail if verification cannot pass.

  1. Extract all factual claims from documentation
  2. Verify each claim against traceability_index:

- File exists - Line content matches claim basis

  1. Check diagram-flow consistency
  2. Verify all gaps appear in Known Limitations
  3. Hallucination detection: Flag claims without code references or contradicting code

Gate:

  • If hallucination detected → HALT immediately
  • If too many unverifiable claims → HALT
  • If passed → Output final documentation

Output: verificationpassed, verifiedclaims, failedclaims, hallucinationreport, finaldocumentation or failurereport


Failure Behavior

When any stage encounters a blocking failure:

  1. STOP execution immediately
  2. PRESERVE all partial outputs
  3. Generate failure report:

``json { "stagefailed": "<stagename>", "failuretype": "<failureenum>", "failurereason": "<explanation>", "partialoutputs": { ... }, "recovery_suggestions": [...] } ``

  1. AWAIT user intervention

Example Usage

User: Generate documentation for the "User Registration" feature

Stage 1: Found POST /auth/register, /signup page
Stage 2: Traced AuthController → AuthService → UserRepository, EmailService
Stage 3: Mapped registration flow with email verification async boundary
Stage 4: Extracted UserStatus enum { PENDING, ACTIVE, SUSPENDED }
Stage 5: Identified missing timeout handling on EmailService
Stage 6: Generated state diagram and sequence diagram
Stage 7: Assembled full technical documentation
Stage 8: Verified 24/24 claims, no hallucinations → SUCCESS