Doc Smith
Overview
Stop letting docs rot. Doc Smith generates a README draft from your code and a CHANGELOG draft from your git history, so the agent can propose updates instead of hand-waving.
When to Use
- The user says "生成文档", "更新 README", "docsmith", "同步文档", "generate docs", "生成 CHANGELOG".
- After a batch of changes, to refresh the changelog.
Procedures
- Decide scope: ask the user whether they want a README, a CHANGELOG, or both.
- Generate:
- README:
python scripts/gen_readme.py <project_dir>->README.draft.md - CHANGELOG:
python scripts/gen_changelog.py <project_dir>->CHANGELOG.draft.md
- README:
- Review, don't overwrite: show the draft and let the user confirm before writing the real
README.md/CHANGELOG.md. Never silently clobber existing docs. - Fill placeholders: the README draft contains
TODO:markers — ask the user for the one-line description and a usage example, then write the final file.
Bundled Resources
scripts/gen_readme.py— stdlibast-based README skeleton (modules / functions / classes).scripts/gen_changelog.py— groupsgit logby Conventional Commits type.references/doc-conventions.md— README structure and CHANGELOG format.
Guardrails
- Drafts only: always confirm before writing over
README.md/CHANGELOG.md. - If a project isn't a git repo,
gen_changelog.pytells the user instead of failing silently. - Keep generated docs honest: don't invent features the code doesn't have.