AGENT SKILL

audit-cognitive-debt

Audits cognitive load across seven debt categories: dead code, over-engineering, duplication, abstraction quality, control flow, naming, and test debt. Writes COGNITIVE_DEBT.md. Complements review-quality. Part of Codecraft plugin. Use when asked to audit cognitive load, find dead code, or analyze complexity.

License 许可
MIT
所属仓库
dasobral/skills
最近更新
2026-08-15
Stars
★ 0
Forks
0

01 前言 Front Matter

name
audit-cognitive-debt
description
Audits cognitive load across seven debt categories: dead code, over-engineering, duplication, abstraction quality, control flow, naming, and test debt. Writes COGNITIVE_DEBT.md. Complements review-quality. Part of Codecraft plugin. Use when asked to audit cognitive load, find dead code, or analyze complexity.

02 资源文件 8

03 SKILL.md 正文

Audit Cognitive Debt

Analyze cognitive friction — mental overhead when reading/modifying code. Distinct from functional correctness (tests) and security (review-quality P4).

Primary output: COGNITIVE_DEBT.md. Conversation gets a brief digest only.

Step 1 — Resolve Scope

Path argument → attached files → full project.

Step 2 — Load References

  • references/debt-categories.md — seven categories + per-language heuristics
  • references/judgment-guidelines.md — when NOT to flag
  • references/shared-heuristics.md — dedup with review-quality

Step 3 — Scale Analysis

LOC Mode
<500 Exhaustive — read every file
500–5000 Structural + 20% deep sample
>5000 Sampled — 3–5 files per top-level module

Step 4 — Seven Categories

# Category
D1 Dead code
D2 Over-engineering (defer to review-quality P2 for severity)
D3 Duplication
D4 Abstraction quality
D5 Control flow complexity
D6 Naming (defer to review-quality P1)
D7 Test debt (defer to review-quality P3)

Per finding: category, severity (HIGH/MEDIUM/LOW), file:line, evidence, cognitive cost, recommendation, confidence (CERTAIN/LIKELY/UNCERTAIN).

Step 5 — Write Report

Use templates/COGNITIVE_DEBT.md. Output priority:

  1. .cursor/COGNITIVE_DEBT.md
  2. docs/COGNITIVE_DEBT.md
  3. COGNITIVE_DEBT.md (root)

Step 6 — Digest

✓ Cognitive debt analysis complete.
Report: <path>
HIGH: N | MEDIUM: N | LOW: N
Top 3 priorities: ...

Rules

  • Never modify source files
  • Apply judgment guidelines — don't pathologize intentional design
  • Flag uncertainty with [UNCERTAIN]
  • Note "What's Working Well" patterns

04 同仓库更多 Skills

dasobral
dasobral/skills

fixture-skill

Fixture skill used to prove trust inventory coverage.

Skill与智能体开发
★ 0
dasobral
dasobral/skills

write-conformant-code

Write code in any language that matches project conventions exactly. Reads CODING_REQUIREMENTS.md, prior review output, or built-in defaults before writing. Part of Codecraft pipeline: analyze → write → review → audit. Use when implementing features, functions, or any code that should fit seamlessly into an existing codebase.

开发工程师内容创作者写作与文案
★ 0
dasobral
dasobral/skills

test-crypto-interoperability

Record reproducible cryptographic interoperability cases, including negotiation, fallback, sizes, latency, fragmentation, and negative tests.

测试与质量
★ 0
dasobral
dasobral/skills

scientific-platform-architect

Design scientific computing platforms combining HPC kernels with modern infrastructure. Enforces compute-layer separation (Rust/PyTorch/Python), emulator-first thinking, and right-sized infrastructure. Use for MCMC pipelines, neural emulators, platform design, or scientific code review.

设计师代码审查视觉设计
★ 0
dasobral
dasobral/skills

rust-systems

Rust systems engineering for daemons, HTTP APIs, and AOS components. Enforces Tokio/Axum async-first, LiteLLM-compatible OpenAI APIs, workspace layouts, tracing, and systemd-compatible daemon design. Part of AOS Stack plugin. Use for .rs files, Cargo.toml, daemons, or Rust orchestrator services.

视觉设计
★ 0
dasobral
dasobral/skills

run-agent-attack-replay

Aggregate isolated agent attack trials with deterministic side-effect assertions, Wilson intervals, and preserved trace evidence.

Skill与智能体开发
★ 0