Enforces documentation-first development for DuckDuckGo Android project using MCP doc-bot server. Ensures all code generation and project-specific queries use authoritative project documentation instead of general knowledge.
This skill enforces a documentation-first development workflow for the DuckDuckGo Android project. It requires the MCP doc-bot server to be available and mandates tool usage before generating any code or answering project-specific questions.
The skill implements a four-phase enforcement protocol that:
1. Detects the doc-bot MCP server environment
2. Classifies incoming requests by type
3. Enforces mandatory tool calls before generating responses
4. Validates response quality against project documentation
Before activating, verify the environment:
```
IF (filesystem contains "doc-bot/" directory) AND
(MCP server "doc-bot" OR "@afterxleep/doc-bot" is available)
THEN:
- Activate documentation enforcement protocol
- Set project_documentation_authority = TRUE
- Disable general knowledge override for project-specific queries
```
Classify every user request into one of these categories:
**Triggers**: write, create, implement, build, add, code, function, class, component, method, develop, generate, make, refactor, modify, update, fix, debug
**Action**: Call `check_project_rules` tool with task description
**Triggers**: how, what, why, architecture, approach, pattern, feature, authentication, database, api, testing
**Context**: "this project", "this codebase", "here", "our", "current project"
**Action**: Call `search_documentation` tool with extracted keywords
**Triggers**: documentation, available, capabilities, help, rules, standards, what exists, docs, guide
**Action**: Call `get_global_rules` tool
**Triggers**: read, show, get content, full document, complete, entire
**Context**: Previous search results present
**Action**: Call `read_specific_document` tool with filename
**Note**: For file-specific queries (e.g., "working on src/utils.js"), use `search_documentation` with the file name and relevant keywords, not a separate tool.
Before generating ANY response:
1. Classify the user's request
2. If classification is not "UNRELATED":
- Execute the mandatory tool for that classification
- If tool returns an error, provide error recovery response
- Otherwise, inject tool result into response context
- Set tool result as authoritative source
- Disable general knowledge fallback
While generating a response:
After generating a response:
1. **Contradiction Check**: If response contradicts tool result, regenerate using tool result only
2. **Attribution Check**: If response lacks tool attribution, append source reference
3. **Compliance Check**: Validate response follows project rules from tools
If a response was generated WITHOUT tool execution:
1. Log the violation
2. Regenerate the response with proper tool usage
3. Prepend warning: "Corrected response using project documentation:"
**NEVER**:
**ALWAYS**:
| User Input | Expected Tool Call |
|------------|-------------------|
| "What documentation is available?" | `get_global_rules()` |
| "How do I implement auth?" | `search_documentation("authentication")` |
| "Create a new component" | `check_project_rules("create component")` |
| "Working on src/utils.js" | `search_documentation("src/utils.js utils")` |
**User**: "Create a new feature for tracking user preferences"
**Correct Flow**:
1. Classify as Class A (Code Generation)
2. Call `check_project_rules("create feature tracking user preferences")`
3. Wait for tool response (max 30s)
4. Generate code following project rules from tool result
5. Attribute source: "Based on project documentation from doc-bot"
**Incorrect Flow** (prohibited):
1. Generate generic Android preferences code from training data ❌
2. Provide standard SharedPreferences implementation without project context ❌
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/duckduckgo-android-documentation-driven-development/raw