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.
69
83%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Generate audit-grade documentation from a codebase feature with full traceability and zero hallucination.
$ARGUMENTS should be:
Goal: Define feature boundaries and reject ambiguous scopes.
Gate:
entry_point_candidates listOutput: scope_definition, entry_point_candidates, scope_confidence
Goal: Map all code artifacts related to the feature.
API | UI | JOB | EVENT | CLIGate:
file_exists, line_exists, callable)Output: entry_points, dependency_graph, artifacts_by_type, data_models,
external_integrations, discovery_gaps
Goal: Trace complete execution paths from entry to exit.
HAPPY_PATH | ERROR_PATH | EDGE_CASEGate:
Output: execution_flows, async_boundaries, side_effects, flow_coverage,
untraced_branches
Goal: Extract explicit state machines; reject inferred states.
STATE_A --[condition]--> STATE_B @ file:lineGate:
Output: states, transitions, state_machine, orphan_states, terminal_states
Goal: Identify error handling coverage and missing failure modes.
LOW | MEDIUM | HIGH | CRITICALNo hard gate – outputs are informational.
Output: handled_failures, unhandled_failures, silent_failures, edge_cases, risk_areas
Goal: Produce diagrams strictly matching verified flows.
state_machineexecution_flowsdependency_graphGate:
Output: state_diagram, sequence_diagrams, dependency_diagram, diagram_verification_log
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[ref: file:line] annotationOutput: documentation_technical, documentation_summary, traceability_index,
confidence_report
Goal: Cross-check all claims; fail if verification cannot pass.
traceability_index:
Gate:
Output: verification_passed, verified_claims, failed_claims, hallucination_report,
final_documentation or failure_report
When any stage encounters a blocking failure:
{
"stage_failed": "<stage_name>",
"failure_type": "<failure_enum>",
"failure_reason": "<explanation>",
"partial_outputs": { ... },
"recovery_suggestions": [...]
}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 → SUCCESSaff1a03
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.