doc-driven-development
Original:🇨🇳 Chinese
Translated
Documentation-driven development specification that requires Agent to consult official documentation and examples before generating code or fixing bugs, including API verification processes, search strategies and MCP invocation rules. It is applicable to scenarios such as accessing third-party libraries, troubleshooting API errors, and version changes.
8installs
Sourceqiao-925/qiao-skills
Added on
NPX Install
npx skill4agent add qiao-925/qiao-skills doc-driven-developmentTags
Translated version includes tags in frontmatterSKILL.md Content (Chinese)
View Translation Comparison →Documentation-Driven Development Specification
When generating code or fixing bugs, consult official documentation and examples first before starting implementation.
⚠️ Core Mandatory Requirements
Scenarios Where Documentation Must Be Consulted
- When implementing new features, connecting to third-party library APIs, or troubleshooting API errors, consult official documentation first
- When encountering /
AttributeError/ uncertain version changes, must verify API definitions and examplesTypeError - For internal APIs encapsulated by the project itself, you can skip as appropriate
Agent Execution Steps
- Stop guessing: Clarify the name and version of the API/module to be queried
- Consult documentation: Prioritize using to obtain official documentation; if unavailable, use
Context7to search for official sources and conduct secondary verificationDuckDuckGo - Implement based on documentation: Implement or fix code according to the parameters, return values and examples in the documentation
MCP Invocation Baseline (Documentation Query Scenarios)
- For documentation/API issues, prioritize using , and use
Context7for latest announcements or entry informationDuckDuckGo - Call at most one external service per round; if multiple tools are really needed, call them serially and explain the reasons
- Keep queries as minimal and necessary as possible (keywords, number of results, time window, tokens)
- When 429/rate limiting occurs, back off for 20 seconds and narrow the scope before retrying
- Attach "Tool Call Briefing" in the output (tool, input summary, parameters, time, source, retry)
- Offline first by default, do not upload sensitive information, comply with robots/ToS and privacy constraints
AI Agent Behavior Requirements
Problem Identification
| Problem Type | Feature | Handling Method |
|---|---|---|
| API does not exist | | Find the correct API |
| Parameter error | | Find the correct parameters |
| Abnormal behavior | Results do not meet expectations | Find the correct usage |
| Version issue | API changed after a certain version | Find version differences |
Collect Error Information
Must collect:
- Complete error stack
- Relevant code snippets
- Version of the library/framework used
Implement Based on Documentation (Guessing is Prohibited)
python
# 错误:基于猜测实现
index.query(question, top_k=10) # 可能参数名不对
# 正确:基于文档实现
# 查阅文档后确认正确的参数名
index.query(question, similarity_top_k=10)Verification After Fix
- Run tests to confirm the fix
- Check if new problems are introduced
- Verify performance in different scenarios
References
- - Detailed description of API verification process (problem identification, documentation consultation, implementation of fixes)
references/api-verification.md - - Documentation search strategy and question guidance
references/search-strategy.md - - MCP invocation rules (tool selection, rate limiting, security boundary, failure degradation and traceable output)
references/mcp-usage-rules.md