docs%3Aupdate-docs by neolabhq/context-engineering-kit
npx skills add https://github.com/neolabhq/context-engineering-kit --skill docs:update-docs用户可以指定关注领域或文档类型:
$ARGUMENTS
如果未提供任何参数,则关注所有未提交变更的文档需求。如果所有变更都已提交,则覆盖最新的提交。
在实现新功能或重构现有代码后,必须更新文档以反映变更。此命令使用专业的技术写作代理和并行分析来协调自动化的文档更新。
确保所有代码变更都得到适当的文档记录,提供清晰、可维护的文档,帮助用户完成实际任务。
读取 SADD 技能(如果可用)
发现文档基础设施
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
清点现有文档
# 查找所有文档文件
find . -name "*.md" -o -name "*.rst" | grep -E "(README|CHANGELOG|CONTRIBUTING|docs/)"
# 检查生成的文档
find . -name "openapi.*" -o -name "*.graphql" -o -name "swagger.*"
使用 haiku 代理并行执行步骤 4-5:
分析文档结构
分析本地变更
git status -u 以识别所有变更文件(包括未跟踪的文件)
git show --name-status 以获取最新提交README.md - 如果新模块/功能影响项目概述,很可能需要更新。README.md - 如果模块的目的、导出或用法发生变化docs/ 索引文件 - 如果文档结构发生变化如果变更简单,请遵循以下指南自行编写文档:
确保文档:
如果有多个变更文件或重大的文档需求,请使用专业代理:
启动 doc-analysis 代理(并行)(Haiku 模型)
启动 sdd:tech-writer 代理进行文档编写(并行)(Sonnet 或 Opus 模型)
启动质量审查代理(并行)(Sonnet 或 Opus 模型)
sdd:tech-writer 代理进行质量审查根据需要迭代
* 如果任何文档领域存在质量问题:返回步骤 8
* 仅针对存在空白的领域启动新的技术写作代理
* 提供关于需要修复内容的特定说明
* 继续直到所有文档通过质量审查
11. 最终验证
* 整体审查所有文档变更
* 验证文档间的交叉引用是否有效
* 确保没有冲突的信息
* 确认文档结构易于导航
Analyze documentation needs for changes in {DOCUMENTATION_AREA}.
Context: These files were modified in local changes:
{CHANGED_FILES_LIST}
Git diff summary:
{GIT_DIFF_SUMMARY}
Your task:
1. Review the changes and understand their documentation impact
2. Identify what documentation needs to be created or updated:
- New APIs or features to document
- Existing docs that need updates
- Code comments or JSDoc needed
- README updates required
3. Identify index documents requiring updates:
- Module README.md files affected by changes
- Root README.md if features or modules changed
- docs/ index files (index.md, SUMMARY.md, guides.md, getting-started.md, references, resources, etc.)
- Navigation files (_sidebar.md, mkdocs.yml nav section)
4. Check existing documentation to avoid duplication
5. Create prioritized list of documentation tasks:
- CRITICAL: Breaking changes, new public APIs
- IMPORTANT: New features, configuration changes, index updates
- NICE_TO_HAVE: Code comments, minor clarifications
Output format:
- List of documentation tasks with descriptions
- Priority level for each
- Suggested documentation file locations
- Index documents requiring updates
- Existing docs to reference for style
Create/update documentation for {DOCUMENTATION_AREA}.
Documentation requirements identified:
{DOCUMENTATION_TASKS_LIST}
Your task:
1. Read Tech Writer Agent guidelines @/plugins/sdd/agents/tech-writer.md
2. Read @README.md for project context and conventions
3. Review existing documentation for style and patterns
4. Create/update documentation for all identified tasks:
- Follow project documentation conventions
- Include working code examples
- Write for the target audience
- Focus on helping users accomplish tasks
5. Ensure documentation:
- Is clear and concise
- Avoids duplication with existing docs
- Has valid links and references
- Includes necessary context and examples
Target files: {TARGET_DOCUMENTATION_FILES}
Review documentation quality for {DOCUMENTATION_AREA}.
Context: Documentation was created/updated for local code changes.
Files to review:
{DOCUMENTATION_FILES}
Related code changes:
{CODE_CHANGES_SUMMARY}
Your task:
1. Read the documentation created/updated
2. Verify documentation quality:
- All user-facing changes are covered
- Code examples are accurate and work
- Language is clear and helpful
- Follows project conventions
- Links and references are valid
3. Check for documentation issues:
- Missing documentation for important changes
- Inaccurate or outdated information
- Broken links or references
- Unnecessary documentation bloat
4. Verify no conflicts with existing documentation
Output:
- PASS: Documentation is complete and high quality ✅
- ISSUES: List specific problems that need to be fixed
CRITICAL: Documentation must justify its existence
├── Does it help users accomplish real tasks? → Keep
├── Is it discoverable when needed? → Improve or remove
├── Will it be maintained? → Keep simple or automate
└── Does it duplicate existing docs? → Remove or consolidate
面向用户的文档:
开发者文档:
文档债务生成器:
危险信号 - 停下来重新考虑:
<mcp_usage> 使用 Context7 MCP 收集有关以下内容的准确信息:
清点现有文档:
# Find all documentation files
find . -name "*.md" -o -name "*.rst" -o -name "*.txt" | grep -E "(README|CHANGELOG|CONTRIBUTING|docs/)"
# Find index documents specifically
find . -name "index.md" -o -name "SUMMARY.md" -o -name "_sidebar.md" -o -name "getting-started.md"
find . -name "mkdocs.yml" -o -name "docusaurus.config.js"
# Check for generated docs
find . -name "openapi.*" -o -name "*.graphql" -o -name "swagger.*"
# Look for JSDoc/similar
grep -r "@param\|@returns\|@example" --include="*.js" --include="*.ts"
识别关键用户路径:
高影响差距(优先处理):
低影响差距(通常跳过):
使用自动生成用于:
手动编写文档用于:
OpenAPI/Swagger:
GraphQL 内省:
Prisma 模式:
JSDoc/TSDoc:
对于每个现有文档,询问:
高影响、低投入的更新:
尽可能自动化:
项目根目录 README:
# Project Name
Brief description (1-2 sentences max).
## Quick Start
[Fastest path to success - must work in <5 minutes]
## Documentation
- [API Reference](./docs/api/) - if complex APIs
- [Guides](./docs/guides/) - if complex workflows
- [Contributing](./CONTRIBUTING.md) - if accepting contributions
## Status
[Current state, known limitations]
模块 README 模式:
# Module Name
**Purpose**: One sentence describing why this module exists.
**Key exports**: Primary functions/classes users need.
**Usage**: One minimal example.
See: [Main documentation](../docs/) for detailed guides.
索引文档作为文档的导航辅助和入口点。更新文档时,始终检查相关的索引文档是否需要更新。
需要更新的常见索引文档:
| 文档 | 位置 | 更新时机 |
|---|---|---|
README.md | 项目根目录 | 新功能、模块或重大变更 |
README.md | 模块目录 | 模块 API、导出或目的变更 |
index.md | docs/ 根目录 | 新文档页面或结构变更 |
getting-started.md | docs/ | 设置步骤、先决条件或快速入门变更 |
guides.md | docs/ | 新增指南或指南类别变更 |
reference.md | docs/ | 新增 API 参考或参考结构变更 |
resources.md | docs/ | 新增工具、链接或资源 |
SUMMARY.md | docs/ (GitBook) | 任何文档结构变更 |
_sidebar.md | docs/ (Docsify) | 导航结构变更 |
mkdocs.yml | 项目根目录 (MkDocs) | 文档导航变更 |
索引文档更新清单:
当文档变更影响模块或功能时:
模块级索引 - 更新模块的 README.md:
章节级索引 - 更新相关的 docs/ 索引文件:
docs/guides.md - 如果添加新指南docs/reference.md - 如果添加新 API 文档docs/tutorials.md - 如果添加新教程项目级索引 - 更新根目录 README.md:
导航索引 - 如果存在,更新站点导航:
SUMMARY.md_sidebar.mdmkdocs.yml 导航部分示例:添加新功能
当向报告模块添加新的“导出”功能时:
Files to update:
├── src/reporting/README.md → Add export to key exports
├── docs/guides/index.md → Link to new export guide
├── docs/guides/exporting.md → Create new guide (main content)
├── docs/reference/index.md → Link to export API reference
├── README.md → Mention export in features list
└── SUMMARY.md → Add navigation entries
记录这些:
/**
* Processes payment with retry logic and fraud detection.
*
* @param payment - Payment details including amount and method
* @param options - Configuration for retries and validation
* @returns Promise resolving to transaction result with ID
* @throws PaymentError when payment fails after retries
*
* @example
* ```typescript
* const result = await processPayment({
* amount: 100,
* currency: 'USD',
* method: 'card'
* });
* ```
*/
async function processPayment(payment: PaymentRequest, options?: PaymentOptions): Promise<PaymentResult>
不要记录这些:
// ❌ Obvious functionality
getName(): string
// ❌ Simple CRUD
save(user: User): Promise<void>
// ❌ Self-explanatory utilities
toLowerCase(str: string): string
发布前:
文档债务预防:
## Documentation Updates Completed
### Files Updated
- [ ] README.md (root)
- [ ] Module README.md files
- [ ] docs/ directory organization
- [ ] API documentation (generated/manual)
- [ ] JSDoc comments for complex logic
### Index Documents Updated
- [ ] Root README.md - features list, quick start
- [ ] Module README.md files - exports, usage
- [ ] docs/index.md or SUMMARY.md - navigation
- [ ] docs/tutorials.md or getting-started.md - tutorials
- [ ] docs/guides.md - guides
- [ ] docs/reference.md - API reference
- [ ] Other index files: [list any others]
### Changes Documented
- [List code changes that were documented]
- [New documentation created]
- [Existing documentation updated]
### Quality Review
- [ ] All examples tested and working
- [ ] Links verified
- [ ] Index documents link to new content
- [ ] Follows project conventions
### Next Steps
- [Any follow-up documentation tasks]
- [Maintenance notes]
每周安装次数
243
仓库
GitHub 星标数
699
首次出现
2026年2月19日
安装在
opencode237
codex235
github-copilot235
gemini-cli234
kimi-cli232
amp232
User can provide specific focus areas or documentation types:
$ARGUMENTS
If nothing is provided, focus on all documentation needs for uncommitted changes. If everything is committed, cover the latest commit.
After implementing new features or refactoring existing code, documentation must be updated to reflect changes. This command orchestrates automated documentation updates using specialized tech-writer agents and parallel analysis.
Ensure all code changes are properly documented with clear, maintainable documentation that helps users accomplish real tasks.
Read SADD skill if available
Discover documentation infrastructure
Inventory existing documentation
# Find all documentation files
find . -name "*.md" -o -name "*.rst" | grep -E "(README|CHANGELOG|CONTRIBUTING|docs/)"
# Check for generated docs
find . -name "openapi.*" -o -name "*.graphql" -o -name "swagger.*"
Do steps 4-5 in parallel using haiku agents:
Analyze documentation structure
Analyze local changes
git status -u to identify all changed files (including untracked)
git show --name-status for latest commitREADME.md - if new modules/features affect project overview, High probability of needing update.README.md - if module's purpose, exports, or usage changeddocs/ index files - if documentation structure changedIf changes are simple, write documentation yourself following this guideline:
Ensure documentation:
If there are multiple changed files or significant documentation needs, use specialized agents:
Launchdoc-analysis agents (parallel) (Haiku models)
Launchsdd:tech-writer agents for documentation (parallel) (Sonnet or Opus models)
* If any documentation areas have quality issues: Return to step 8
* Launch new tech-writer agents only for areas with gaps
* Provide specific instructions on what needs fixing
* Continue until all documentation passes quality review
11. Final verification
* Review all documentation changes holistically
* Verify cross-references between documents work
* Ensure no conflicting information
* Confirm documentation structure is navigable
Analyze documentation needs for changes in {DOCUMENTATION_AREA}.
Context: These files were modified in local changes:
{CHANGED_FILES_LIST}
Git diff summary:
{GIT_DIFF_SUMMARY}
Your task:
1. Review the changes and understand their documentation impact
2. Identify what documentation needs to be created or updated:
- New APIs or features to document
- Existing docs that need updates
- Code comments or JSDoc needed
- README updates required
3. Identify index documents requiring updates:
- Module README.md files affected by changes
- Root README.md if features or modules changed
- docs/ index files (index.md, SUMMARY.md, guides.md, getting-started.md, references, resources, etc.)
- Navigation files (_sidebar.md, mkdocs.yml nav section)
4. Check existing documentation to avoid duplication
5. Create prioritized list of documentation tasks:
- CRITICAL: Breaking changes, new public APIs
- IMPORTANT: New features, configuration changes, index updates
- NICE_TO_HAVE: Code comments, minor clarifications
Output format:
- List of documentation tasks with descriptions
- Priority level for each
- Suggested documentation file locations
- Index documents requiring updates
- Existing docs to reference for style
Create/update documentation for {DOCUMENTATION_AREA}.
Documentation requirements identified:
{DOCUMENTATION_TASKS_LIST}
Your task:
1. Read Tech Writer Agent guidelines @/plugins/sdd/agents/tech-writer.md
2. Read @README.md for project context and conventions
3. Review existing documentation for style and patterns
4. Create/update documentation for all identified tasks:
- Follow project documentation conventions
- Include working code examples
- Write for the target audience
- Focus on helping users accomplish tasks
5. Ensure documentation:
- Is clear and concise
- Avoids duplication with existing docs
- Has valid links and references
- Includes necessary context and examples
Target files: {TARGET_DOCUMENTATION_FILES}
Review documentation quality for {DOCUMENTATION_AREA}.
Context: Documentation was created/updated for local code changes.
Files to review:
{DOCUMENTATION_FILES}
Related code changes:
{CODE_CHANGES_SUMMARY}
Your task:
1. Read the documentation created/updated
2. Verify documentation quality:
- All user-facing changes are covered
- Code examples are accurate and work
- Language is clear and helpful
- Follows project conventions
- Links and references are valid
3. Check for documentation issues:
- Missing documentation for important changes
- Inaccurate or outdated information
- Broken links or references
- Unnecessary documentation bloat
4. Verify no conflicts with existing documentation
Output:
- PASS: Documentation is complete and high quality ✅
- ISSUES: List specific problems that need to be fixed
CRITICAL: Documentation must justify its existence
├── Does it help users accomplish real tasks? → Keep
├── Is it discoverable when needed? → Improve or remove
├── Will it be maintained? → Keep simple or automate
└── Does it duplicate existing docs? → Remove or consolidate
User-Facing Documentation:
Developer Documentation:
Documentation Debt Generators:
Red Flags - Stop and Reconsider:
<mcp_usage> Use Context7 MCP to gather accurate information about:
Inventory Existing Documentation:
# Find all documentation files
find . -name "*.md" -o -name "*.rst" -o -name "*.txt" | grep -E "(README|CHANGELOG|CONTRIBUTING|docs/)"
# Find index documents specifically
find . -name "index.md" -o -name "SUMMARY.md" -o -name "_sidebar.md" -o -name "getting-started.md"
find . -name "mkdocs.yml" -o -name "docusaurus.config.js"
# Check for generated docs
find . -name "openapi.*" -o -name "*.graphql" -o -name "swagger.*"
# Look for JSDoc/similar
grep -r "@param\|@returns\|@example" --include="*.js" --include="*.ts"
Identify critical user paths:
High-Impact Gaps (address first):
Low-Impact Gaps (often skip):
Use Automated Generation For:
Write Manual Documentation For:
OpenAPI/Swagger:
GraphQL Introspection:
Prisma Schema:
JSDoc/TSDoc:
For each existing document, ask:
High-Impact, Low-Effort Updates:
Automate Where Possible:
Project Root README:
# Project Name
Brief description (1-2 sentences max).
## Quick Start
[Fastest path to success - must work in <5 minutes]
## Documentation
- [API Reference](./docs/api/) - if complex APIs
- [Guides](./docs/guides/) - if complex workflows
- [Contributing](./CONTRIBUTING.md) - if accepting contributions
## Status
[Current state, known limitations]
Module README Pattern:
# Module Name
**Purpose**: One sentence describing why this module exists.
**Key exports**: Primary functions/classes users need.
**Usage**: One minimal example.
See: [Main documentation](../docs/) for detailed guides.
Index documents serve as navigation aids and entry points for documentation. When updating documentation, always check if related index documents need updates.
Common Index Documents to Update:
| Document | Location | Update When |
|---|---|---|
README.md | Project root | New features, modules, or significant changes |
README.md | Module directories | Module API, exports, or purpose changes |
index.md | docs/ root | New documentation pages or structure changes |
getting-started.md | docs/ |
Index Document Update Checklist:
When documentation changes affect a module or feature:
Module-level index - Update the module's README.md:
Section-level index - Update relevant docs/ index files:
docs/guides.md - if adding new guidesdocs/reference.md - if adding new API docsdocs/tutorials.md - if adding new tutorialsProject-level index - Update root README.md:
Example: Adding a New Feature
When adding a new "export" feature to a reporting module:
Files to update:
├── src/reporting/README.md → Add export to key exports
├── docs/guides/index.md → Link to new export guide
├── docs/guides/exporting.md → Create new guide (main content)
├── docs/reference/index.md → Link to export API reference
├── README.md → Mention export in features list
└── SUMMARY.md → Add navigation entries
Document These:
/**
* Processes payment with retry logic and fraud detection.
*
* @param payment - Payment details including amount and method
* @param options - Configuration for retries and validation
* @returns Promise resolving to transaction result with ID
* @throws PaymentError when payment fails after retries
*
* @example
* ```typescript
* const result = await processPayment({
* amount: 100,
* currency: 'USD',
* method: 'card'
* });
* ```
*/
async function processPayment(payment: PaymentRequest, options?: PaymentOptions): Promise<PaymentResult>
Don't Document These:
// ❌ Obvious functionality
getName(): string
// ❌ Simple CRUD
save(user: User): Promise<void>
// ❌ Self-explanatory utilities
toLowerCase(str: string): string
Before Publishing:
Documentation Debt Prevention:
## Documentation Updates Completed
### Files Updated
- [ ] README.md (root)
- [ ] Module README.md files
- [ ] docs/ directory organization
- [ ] API documentation (generated/manual)
- [ ] JSDoc comments for complex logic
### Index Documents Updated
- [ ] Root README.md - features list, quick start
- [ ] Module README.md files - exports, usage
- [ ] docs/index.md or SUMMARY.md - navigation
- [ ] docs/tutorials.md or getting-started.md - tutorials
- [ ] docs/guides.md - guides
- [ ] docs/reference.md - API reference
- [ ] Other index files: [list any others]
### Changes Documented
- [List code changes that were documented]
- [New documentation created]
- [Existing documentation updated]
### Quality Review
- [ ] All examples tested and working
- [ ] Links verified
- [ ] Index documents link to new content
- [ ] Follows project conventions
### Next Steps
- [Any follow-up documentation tasks]
- [Maintenance notes]
Weekly Installs
243
Repository
GitHub Stars
699
First Seen
Feb 19, 2026
Installed on
opencode237
codex235
github-copilot235
gemini-cli234
kimi-cli232
amp232
AI Elements:基于shadcn/ui的AI原生应用组件库,快速构建对话界面
56,200 周安装
Launch quality review agents (parallel) (Sonnet or Opus models)
sdd:tech-writer agents again for quality reviewIterate if needed
| Setup steps, prerequisites, or quickstart changes |
guides.md | docs/ | New guides added or guide categories change |
reference.md | docs/ | New API references or reference structure |
resources.md | docs/ | New tools, links, or resources added |
SUMMARY.md | docs/ (GitBook) | Any documentation structure changes |
_sidebar.md | docs/ (Docsify) | Navigation structure changes |
mkdocs.yml | Project root (MkDocs) | Documentation navigation changes |
Navigation index - Update site navigation if present:
SUMMARY.md for GitBook projects_sidebar.md for Docsify projectsmkdocs.yml nav section for MkDocs projects