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
- 脚本adapter.py7.8 KB
- 其他pyproject.toml230 B
- 参考文档references/debt-categories.md26.1 KB
- 参考文档references/judgment-guidelines.md8.1 KB
- 参考文档references/shared-heuristics.md1.6 KB
- 脚本run.sh489 B
- 脚本sanity.sh1.9 KB
- 参考文档templates/COGNITIVE_DEBT.md8.3 KB
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 heuristicsreferences/judgment-guidelines.md— when NOT to flagreferences/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:
.cursor/COGNITIVE_DEBT.mddocs/COGNITIVE_DEBT.mdCOGNITIVE_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
fixture-skill
Fixture skill used to prove trust inventory coverage.
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.
test-crypto-interoperability
Record reproducible cryptographic interoperability cases, including negotiation, fallback, sizes, latency, fragmentation, and negative tests.
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.
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.
run-agent-attack-replay
Aggregate isolated agent attack trials with deterministic side-effect assertions, Wilson intervals, and preserved trace evidence.