Enforces DuckDuckGo Android project documentation and coding standards through mandatory documentation checks before any code generation or project-specific responses.
This skill enforces strict documentation-driven development for the DuckDuckGo Android project. It ensures all code generation and project-specific responses are validated against project documentation through the doc-bot MCP server.
Maintains consistency with DuckDuckGo Android project standards by:
**CRITICAL**: Before processing any request, verify the doc-bot MCP server is available:
1. Check if `doc-bot/` directory exists in the project
2. Confirm MCP server `doc-bot` or `@afterxleep/doc-bot` is accessible
3. If both conditions are met:
- Activate documentation enforcement protocol
- Disable general knowledge responses for project-specific queries
- Set project documentation as the sole authoritative source
Classify every user request into one of these categories and execute the corresponding mandatory tool call:
#### CLASS A: CODE_GENERATION
**Triggers**: write, create, implement, build, add, code, function, class, component, method, develop, generate, make, refactor, modify, update, fix, debug
**Required Action**: MUST call `check_project_rules` with task description
#### CLASS B: PROJECT_INQUIRY
**Triggers**: how, what, why, architecture, approach, pattern, feature, authentication, database, api, testing (in project context)
**Required Action**: MUST call `search_documentation` with extracted keywords
#### CLASS C: DOCUMENTATION_DISCOVERY
**Triggers**: documentation, available, capabilities, help, rules, standards, what exists, docs, guide
**Required Action**: MUST call `get_global_rules`
#### CLASS D: DOCUMENT_ACCESS
**Triggers**: read, show, get content, full document, complete, entire (when search results are present)
**Required Action**: MUST call `read_specific_document` with filename
**File-Specific Queries**: For questions about specific files (e.g., "working on src/utils.js"), use `search_documentation` with the file name and context keywords instead of a separate tool.
**Pre-Response Validation**:
1. Classify the user request using Phase 2 rules
2. If classification is not "UNRELATED":
- Execute mandatory tool call BEFORE generating any response
- If tool returns error, provide error recovery response
- If tool succeeds, inject result into response context
3. Set tool result as authoritative source
4. Disable general knowledge fallback for project-specific content
**Response Constraint Engine**:
- If attempting to use general knowledge when authoritative source exists: STOP and force use of tool result
- If code generation detected without project rules check: HALT and require validation
- Never override tool responses with training data
**Response Validation**:
1. After generating response:
- Verify response doesn't contradict tool result
- If contradiction found: regenerate response using only tool result
- Ensure tool attribution is present
- Validate compliance with project rules from tool result
**Failure Detection & Recovery**:
- Log violation internally
- Regenerate response with mandatory tool calls
- Prepend warning: "Corrected response using project documentation:"
**ABSOLUTE PROHIBITIONS**:
**MANDATORY BEHAVIORS**:
**User**: "Create a new repository class for user data"
**Required Flow**:
1. Classify as CLASS A: CODE_GENERATION
2. Call `check_project_rules("create repository class user data")`
3. Wait for tool response (blocking)
4. Generate code following rules from tool response
5. Attribute: "Based on project standards from [doc-bot source]"
**User**: "How is dependency injection handled here?"
**Required Flow**:
1. Classify as CLASS B: PROJECT_INQUIRY
2. Call `search_documentation("dependency injection")`
3. Wait for tool response (blocking)
4. Provide answer using only documentation results
5. If no results: "I couldn't find specific documentation on dependency injection. Available docs: [list from get_global_rules]"
**User**: "What documentation exists for this project?"
**Required Flow**:
1. Classify as CLASS C: DOCUMENTATION_DISCOVERY
2. Call `get_global_rules()`
3. Wait for tool response (blocking)
4. List available documentation with summaries
5. Suggest relevant docs based on current conversation context
**User**: "I'm working on src/data/UserRepository.kt, what patterns should I follow?"
**Required Flow**:
1. Classify as CLASS B: PROJECT_INQUIRY
2. Call `search_documentation("src/data/UserRepository.kt repository patterns")`
3. Wait for tool response (blocking)
4. Provide guidance from documentation results
5. If file-specific rules found, highlight them
**Test these inputs to verify correct behavior**:
| Input | Expected Tool Call | Timeout |
|-------|-------------------|---------|
| "What documentation is available?" | `get_global_rules()` | 30s |
| "How do I implement auth?" | `search_documentation("authentication")` | 30s |
| "Create a new component" | `check_project_rules("create component")` | 30s |
| "Working on src/utils.js" | `search_documentation("src/utils.js utils")` | 30s |
**Expected Behavior**:
**Failure Indicators** (these should NEVER happen):
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/duckduckgo-android-project-standards/raw