Explainability
Skill Profile
(Select at least one profile to enable specific modules)
Overview
This skill provides comprehensive guidance and best practices for implementation. It enables teams to achieve reliable, maintainable, and scalable solutions.
When to use / When NOT to use
- ✅ Use when: Implementing this capability in your project
- ✅ Use when: Need to follow established patterns and conventions
- ❌ Avoid when: The requirements don't match this skill's scope
- ❌ Avoid when: Simpler alternatives would suffice
Why This Matters
- Reduces Technical Debt: Following established patterns prevents costly rework
- Increases System Stability: Proper implementation reduces bugs and downtime
- Improves Team Velocity: Clear guidance helps teams work more efficiently
- Reduces Maintenance Costs: Well-structured code is easier to maintain
- Ensures Investment Confidence: Following standards gives confidence in technical decisions
Core Concepts & Rules
1. Core Principles
- Follow established patterns and conventions
- Maintain consistency across codebase
- Document decisions and trade-offs
2. Implementation Guidelines
- Start with the simplest viable solution
- Iterate based on feedback and requirements
- Test thoroughly before deployment
Inputs / Outputs / Contracts
- Inputs:
- Requirements and specifications
- Existing codebase and architecture
- Team context and constraints
- Entry Conditions:
- Project repository initialized
- Development environment set up
- Required dependencies installed
- Outputs:
- Implementation code and documentation
- Test cases and test results
- Deployment artifacts
- Artifacts Required (Deliverables):
- Source code changes
- Updated documentation
- Test coverage reports
- Acceptance Evidence:
- All tests passing
- Code review approved
- Documentation updated
- Success Criteria:
- Meets all functional requirements
- Follows established patterns
- Test coverage ≥ 80%
Skill Composition
- Depends on: None
- Compatible with: None
- Conflicts with: None
- Related Skills: None
Skill Profile Checkboxes
Explainability
⚠️ DEPRECATED - This skill has been consolidated
This skill is covered in detail in the main Model Explainability skill.
Please refer to: 44-ai-governance/model-explainability/SKILL.md
Quick Start / Implementation Example
- Review requirements and constraints
- Set up development environment
- Implement core functionality following patterns
- Write tests for critical paths
- Run tests and fix issues
- Document any deviations or decisions
# Example implementation following best practices
def example_function():
# Your implementation here
pass
Assumptions / Constraints / Non-goals
- Assumptions:
- Development environment is properly configured
- Required dependencies are available
- Team has basic understanding of domain
- Constraints:
- Must follow existing codebase conventions
- Time and resource limitations
- Compatibility requirements
- Non-goals:
- This skill does not cover edge cases outside scope
- Not a replacement for formal training
Compatibility & Prerequisites
- Supported Versions:
- Python 3.8+
- Node.js 16+
- Modern browsers (Chrome, Firefox, Safari, Edge)
- Required AI Tools:
- Code editor (VS Code recommended)
- Testing framework appropriate for language
- Version control (Git)
- Dependencies:
- Language-specific package manager
- Build tools
- Testing libraries
- Environment Setup:
.env.example keys: API_KEY, DATABASE_URL (no values)
Test Scenario Matrix (QA Strategy)
| Type |
Focus Area |
Required Scenarios / Mocks |
| Unit |
Core Logic |
Must cover primary logic and at least 3 edge/error cases. Target minimum 80% coverage |
| Integration |
DB / API |
All external API calls or database connections must be mocked during unit tests |
| E2E |
User Journey |
Critical user flows to test |
| Performance |
Latency / Load |
Benchmark requirements |
| Security |
Vuln / Auth |
SAST/DAST or dependency audit |
| Frontend |
UX / A11y |
Accessibility checklist (WCAG), Performance Budget (Lighthouse score) |
Technical Guardrails & Security Threat Model
1. Security & Privacy (Threat Model)
- Top Threats: Injection attacks, authentication bypass, data exposure
2. Performance & Resources
3. Architecture & Scalability
4. Observability & Reliability
Agent Directives & Error Recovery
(ข้อกำหนดสำหรับ AI Agent ในการคิดและแก้ปัญหาเมื่อเกิดข้อผิดพลาด)
- Thinking Process: Analyze root cause before fixing. Do not brute-force.
- Fallback Strategy: Stop after 3 failed test attempts. Output root cause and ask for human intervention/clarification.
- Self-Review: Check against Guardrails & Anti-patterns before finalizing.
- Output Constraints: Output ONLY the modified code block. Do not explain unless asked.
Definition of Done (DoD) Checklist
Anti-patterns / Pitfalls
- ⛔ Don't: Log PII, catch-all exception, N+1 queries
- ⚠️ Watch out for: Common symptoms and quick fixes
- 💡 Instead: Use proper error handling, pagination, and logging
Reference Links & Examples
- Internal documentation and examples
- Official documentation and best practices
- Community resources and discussions
Versioning & Changelog
- Version: 1.0.0
- Changelog:
- 2026-02-22: Initial version with complete template structure
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: amnadtaowsoam-cerebraskills-explainability3description: Explainability4---56# Explainability78## Skill Profile9*(Select at least one profile to enable specific modules)*10- [ ] **DevOps**11- [x] **Backend**12- [ ] **Frontend**13- [ ] **AI-RAG**14- [ ] **Security Critical**1516## Overview17This skill provides comprehensive guidance and best practices for implementation. It enables teams to achieve reliable, maintainable, and scalable solutions.1819### When to use / When NOT to use20* ✅ **Use when**: Implementing this capability in your project21* ✅ **Use when**: Need to follow established patterns and conventions22* ❌ **Avoid when**: The requirements don't match this skill's scope23* ❌ **Avoid when**: Simpler alternatives would suffice242526## Why This Matters27- **Reduces Technical Debt**: Following established patterns prevents costly rework28- **Increases System Stability**: Proper implementation reduces bugs and downtime29- **Improves Team Velocity**: Clear guidance helps teams work more efficiently30- **Reduces Maintenance Costs**: Well-structured code is easier to maintain31- **Ensures Investment Confidence**: Following standards gives confidence in technical decisions323334## Core Concepts & Rules3536### 1. Core Principles37- Follow established patterns and conventions38- Maintain consistency across codebase39- Document decisions and trade-offs4041### 2. Implementation Guidelines42- Start with the simplest viable solution43- Iterate based on feedback and requirements44- Test thoroughly before deployment454647## Inputs / Outputs / Contracts4849* **Inputs**:50 - Requirements and specifications51 - Existing codebase and architecture52 - Team context and constraints53* **Entry Conditions**:54 - Project repository initialized55 - Development environment set up56 - Required dependencies installed57* **Outputs**:58 - Implementation code and documentation59 - Test cases and test results60 - Deployment artifacts61* **Artifacts Required (Deliverables)**:62 - Source code changes63 - Updated documentation64 - Test coverage reports65* **Acceptance Evidence**:66 - All tests passing67 - Code review approved68 - Documentation updated69* **Success Criteria**:70 - Meets all functional requirements71 - Follows established patterns72 - Test coverage ≥ 80%737475## Skill Composition76* **Depends on**: None77* **Compatible with**: None78* **Conflicts with**: None79* **Related Skills**: None8081# Skill Profile Checkboxes8283- [ ] DevOps84- [ ] Backend85- [ ] Frontend86- [x] AI-RAG87- [ ] Security Critical8889---9091# Explainability9293> **⚠️ DEPRECATED - This skill has been consolidated**94>95> This skill is covered in detail in the main **Model Explainability** skill.96>97> Please refer to: `44-ai-governance/model-explainability/SKILL.md`9899## Quick Start / Implementation Example1001011. Review requirements and constraints1022. Set up development environment1033. Implement core functionality following patterns1044. Write tests for critical paths1055. Run tests and fix issues1066. Document any deviations or decisions107108```python109# Example implementation following best practices110def example_function():111 # Your implementation here112 pass113```114115116## Assumptions / Constraints / Non-goals117118* **Assumptions**:119 - Development environment is properly configured120 - Required dependencies are available121 - Team has basic understanding of domain122* **Constraints**:123 - Must follow existing codebase conventions124 - Time and resource limitations125 - Compatibility requirements126* **Non-goals**:127 - This skill does not cover edge cases outside scope128 - Not a replacement for formal training129130131## Compatibility & Prerequisites132133* **Supported Versions**:134 - Python 3.8+135 - Node.js 16+136 - Modern browsers (Chrome, Firefox, Safari, Edge)137* **Required AI Tools**:138 - Code editor (VS Code recommended)139 - Testing framework appropriate for language140 - Version control (Git)141* **Dependencies**:142 - Language-specific package manager143 - Build tools144 - Testing libraries145* **Environment Setup**:146 - `.env.example` keys: `API_KEY`, `DATABASE_URL` (no values)147148149## Test Scenario Matrix (QA Strategy)150151| Type | Focus Area | Required Scenarios / Mocks |152| :--- | :--- | :--- |153| **Unit** | Core Logic | Must cover primary logic and at least 3 edge/error cases. Target minimum 80% coverage |154| **Integration** | DB / API | All external API calls or database connections must be mocked during unit tests |155| **E2E** | User Journey | Critical user flows to test |156| **Performance** | Latency / Load | Benchmark requirements |157| **Security** | Vuln / Auth | SAST/DAST or dependency audit |158| **Frontend** | UX / A11y | Accessibility checklist (WCAG), Performance Budget (Lighthouse score) |159160161## Technical Guardrails & Security Threat Model162163### 1. Security & Privacy (Threat Model)164* **Top Threats**: Injection attacks, authentication bypass, data exposure165- [ ] **Data Handling**: Sanitize all user inputs to prevent Injection attacks. Never log raw PII166- [ ] **Secrets Management**: No hardcoded API keys. Use Env Vars/Secrets Manager167- [ ] **Authorization**: Validate user permissions before state changes168169### 2. Performance & Resources170- [ ] **Execution Efficiency**: Consider time complexity for algorithms171- [ ] **Memory Management**: Use streams/pagination for large data172- [ ] **Resource Cleanup**: Close DB connections/file handlers in finally blocks173174### 3. Architecture & Scalability175- [ ] **Design Pattern**: Follow SOLID principles, use Dependency Injection176- [ ] **Modularity**: Decouple logic from UI/Frameworks177178### 4. Observability & Reliability179- [ ] **Logging Standards**: Structured JSON, include trace IDs `request_id`180- [ ] **Metrics**: Track `error_rate`, `latency`, `queue_depth`181- [ ] **Error Handling**: Standardized error codes, no bare except182- [ ] **Observability Artifacts**:183 - **Log Fields**: timestamp, level, message, request_id184 - **Metrics**: request_count, error_count, response_time185 - **Dashboards/Alerts**: High Error Rate > 5%186187188## Agent Directives & Error Recovery189*(ข้อกำหนดสำหรับ AI Agent ในการคิดและแก้ปัญหาเมื่อเกิดข้อผิดพลาด)*190191- **Thinking Process**: Analyze root cause before fixing. Do not brute-force.192- **Fallback Strategy**: Stop after 3 failed test attempts. Output root cause and ask for human intervention/clarification.193- **Self-Review**: Check against Guardrails & Anti-patterns before finalizing.194- **Output Constraints**: Output ONLY the modified code block. Do not explain unless asked.195196197## Definition of Done (DoD) Checklist198199- [ ] Tests passed + coverage met200- [ ] Lint/Typecheck passed201- [ ] Logging/Metrics/Trace implemented202- [ ] Security checks passed203- [ ] Documentation/Changelog updated204- [ ] Accessibility/Performance requirements met (if frontend)205206207## Anti-patterns / Pitfalls208209* ⛔ **Don't**: Log PII, catch-all exception, N+1 queries210* ⚠️ **Watch out for**: Common symptoms and quick fixes211* 💡 **Instead**: Use proper error handling, pagination, and logging212213214## Reference Links & Examples215216* Internal documentation and examples217* Official documentation and best practices218* Community resources and discussions219220221## Versioning & Changelog222223* **Version**: 1.0.0224* **Changelog**:225 - 2026-02-22: Initial version with complete template structure226227---228> Converted and distributed by [TomeVault](https://tomevault.io/claim/amnadtaowsoam) — claim your Tome and manage your conversions.229<!-- tomevault:4.0:skill_md:2026-04-13 -->