cognitive-debt-guard
Cognitive Debt Guard - Prevent the 23.5% incident spike from AI-generated code. Comprehension gates, review frameworks, and AI-free zones. Based on 2026 research.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/aptratcn/xiaobai-cognitive-debt-guardCognitive Debt Guard ๐ง
Prevent the 23.5% incident spike from AI-generated code.
The Problem (2026 Research)
| Metric | Impact |
|---|---|
| Incident rate | +23.5% per PR with AI code |
| Code churn | 3.1% โ 5.7% (nearly doubled) |
| Developer speed | -19% slower with AI tools (experienced devs) |
| Trust in AI output | 33% (down from higher) |
Root cause: Teams ship code faster than they understand it.
Definition: Cognitive debt = the gap between what your codebase does and what your team comprehends about it.
Unlike technical debt (code you know is bad), cognitive debt is code you don't even know is bad โ because you never understood it.
The Solution: 5 Patterns
Pattern 1: Maintain MEMORY.md ๐
Living architecture context for humans and AI agents.
# MEMORY.md Template
## Architecture Decisions
- [Decision 1]: Why we chose X over Y
- [Decision 2]: Trade-offs we accepted
## AI-Free Zones (human must own completely)
- Authentication & authorization
- Payment processing
- Data deletion
- Database migrations
- Security-critical paths
## Conventions
- Naming: [rules]
- Error handling: [pattern]
- Testing: [requirements]
## Known Constraints
- [Performance requirement]
- [Compliance requirement]
- [Integration dependency]
Rule: MEMORY.md is open in editor at all times when working with AI.
Pattern 2: Comprehension Gate ๐
3 questions before accepting AI-generated code:
Before you click "Accept" on AI output:
1. Can I explain what this code does in plain language?
[ ] Yes โ Continue
[ ] No โ STOP. Read until you can.
2. Can I trace the data flow from input to output?
[ ] Yes โ Continue
[ ] No โ STOP. Add comments or simplify.
3. If this breaks in production, would I know where to look?
[ ] Yes โ Accept
[ ] No โ STOP. Add logging or documentation.
Rule: All 3 must be YES before merge.
Pattern 3: Pair with Agents, Don't Delegate ๐
| Active Use โ | Passive Use โ |
|---|---|
| Prompt โ Read โ Understand โ Modify โ Ship | Prompt โ Accept โ Ship โ Forget |
| You steer, AI fills | AI decides, you accept |
| Comprehension maintained | Cognitive debt accumulates |
Rule: Never accept >50 lines of AI code without reading and understanding every line.
Pattern 4: Shrink the Blast Radius ๐
AI-assisted PR limits:
| Constraint | Limit |
|---|---|
| Max lines per AI PR | 200 |
| Concerns per PR | 1 |
| Test coverage on AI paths | 100% |
| Files touched | โค5 |
Why: Smaller PRs = easier to comprehend = less cognitive debt.
Pattern 5: Quarterly Comprehension Audit ๐
90-minute sprint ceremony:
## Cognitive Debt Audit Agenda
Metadata
Not sure this is the right skill?
Describe what you want to build โ we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-aptratcn-xiaobai-cognitive-debt-guard": {
"enabled": true,
"auto_update": true
}
}
}Tags
Related Skills
undertow
Skill discovery engine for AI coding agents. Recommends and installs the right skill when you need it โ code review, test generation, debugging, commit messages, PR preparation, security scanning, dependency audits, Docker setup, CI/CD pipelines, API documentation, refactoring, performance optimization, bundle analysis, git recovery, README generation, license compliance, migration guides, dead code removal, and secret detection. One install gives your agent access to a curated library of 20+ developer workflow skills. Use when the user asks for help with any development workflow, code quality, DevOps, security, testing, documentation, or project setup task.
Li_python_sec_check
Python ๅฎๅ จ่ง่ๆฃๆฅๅทฅๅ ท - ๅบไบ CloudBase ่ง่ + ่ พ่ฎฏๅฎๅ จๆๅ + LLM ๆบ่ฝๅๆ๏ผLLM ๅ่ฝ้ป่ฎค็ฆ็จ๏ผๆฌๅฐๆง่กไผๅ ๏ผ
cognitive-debt-guard
Cognitive Debt Guard - Prevent the 23.5% incident spike from AI-generated code. Comprehension gates, review frameworks, and AI-free zones. Based on 2026 research.
react-best-practices
Audits React code for performance, bundle size, and best practices. Use when reviewing React code, auditing bundle size, finding performance issues, checking React 18+ patterns, or evaluating a React codebase. NOT for: non-React projects, backend Node.js code, or CSS-only reviews.
education
Generate study materials. Use when creating study plans, quizzes, flashcards, tracking progress, or scheduling review sessions.