1. Detect changes in the marketplace (plugin add/update/remove).
2. Load `marketplace.json` and validate its structure.
3. Scan plugin files to extract agent/command/skill metadata.
4. Prepare template context with organized data and statistics.
5. Render Jinja2 templates to generate documentation files.
6. Write generated files to the `docs/` directory.
7. Verify the generated documentation for correctness and consistency.