Use when you need to walk through the full database documentation pipeline from extraction to reference doc generation — orchestrates skills with human gates between stages
Walk through the complete database schema documentation process: extraction script generation, schema extraction (user-executed), validation, and reference doc generation.
Check if a hints file path was provided in arguments (e.g., /schema-docs path/to/database-hints.json). If a path is present, record it for use in Stage 2.
Gather database details from the user if not already provided:
These values will be passed to the extraction skill.
Use the Skill tool to invoke the generate-extraction-script skill. This will:
If a hints file path was recorded in Stage 1, pass it as the argument when invoking the skill:
ARGUMENTS: [hints file path]
If no hints path was provided, invoke the skill with no arguments.
The skill handles all interaction with the user for this stage.
After the extraction script is presented, inform the user:
"The extraction script has been generated. Please:
I'll validate the extraction files once you confirm."
Use AskUserQuestion:
If the user cancels: Acknowledge and stop. The target directory and placeholder files remain (they're harmless). The user can resume later by running /generate-docs directly after completing extraction manually.
After the user confirms extraction is complete, validate the extraction files at references/databases/{DB_NAME}/:
For each of the 17 expected files:
Present a validation summary:
"Extraction validation for {DB_NAME}:
If critical files are missing (01_database_metadata, 02_schemas, 03_tables_columns, 16_row_counts), warn the user and ask if they want to proceed anyway.
Use the Skill tool to invoke the generate-reference-docs skill. This will:
docs/database_reference/{DB_NAME}/The skill handles all interaction and reporting for this stage.
After generation completes, provide a final summary:
07_annotations_needed.md file: "The following questions require human review to complete the documentation:"
docs/database_reference/{DB_NAME}/07_annotations_needed.md07_annotations_needed.md and fill in answers based on your domain knowledge"If docs/database_reference/ already contains documentation for other databases, note any cross-database references found during generation (e.g., linked server references, cross-database queries in views or procedures). Suggest documenting these in a top-level docs/database_reference/databases.md index if one does not already exist.