ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

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.

skill-install โ€” Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/aptratcn/cognitive-debt-guard
Or

Cognitive Debt Guard ๐Ÿง 

Prevent the 23.5% incident spike from AI-generated code.

The Problem (2026 Research)

MetricImpact
Incident rate+23.5% per PR with AI code
Code churn3.1% โ†’ 5.7% (nearly doubled)
Developer speed-19% slower with AI tools (experienced devs)
Trust in AI output33% (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 โ†’ ShipPrompt โ†’ Accept โ†’ Ship โ†’ Forget
You steer, AI fillsAI decides, you accept
Comprehension maintainedCognitive 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:

ConstraintLimit
Max lines per AI PR200
Concerns per PR1
Test coverage on AI paths100%
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

Author@aptratcn
Stars4473
Views0
Updated2026-05-01
View Author Profile
AI Skill Finder

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 skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-aptratcn-cognitive-debt-guard": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags

#cognitive-debt#code-quality#ai-safety#review#comprehension
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.

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.

8co 4473

Li_python_sec_check

Python ๅฎ‰ๅ…จ่ง„่Œƒๆฃ€ๆŸฅๅทฅๅ…ท - ๅŸบไบŽ CloudBase ่ง„่Œƒ + ่…พ่ฎฏๅฎ‰ๅ…จๆŒ‡ๅ— + LLM ๆ™บ่ƒฝๅˆ†ๆž๏ผˆLLM ๅŠŸ่ƒฝ้ป˜่ฎค็ฆ็”จ๏ผŒๆœฌๅœฐๆ‰ง่กŒไผ˜ๅ…ˆ๏ผ‰

43622283 4473

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.

aptratcn 4473

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.

asimons81 4473

education

Generate study materials. Use when creating study plans, quizzes, flashcards, tracking progress, or scheduling review sessions.

bytesagain1 4097