بنقرة واحدة
agent-introspection-debugging
针对AI代理故障的结构化自调试工作流程,包括捕获、诊断、受限恢复和内省报告。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
针对AI代理故障的结构化自调试工作流程,包括捕获、诊断、受限恢复和内省报告。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | agent-introspection-debugging |
| description | 针对AI代理故障的结构化自调试工作流程,包括捕获、诊断、受限恢复和内省报告。 |
| origin | ECC |
当智能体运行反复失败、消耗令牌却无进展、在相同工具上循环或偏离预期任务时,使用此技能。
这是一个工作流技能,而非隐藏运行时。它教会智能体在升级给人类之前,系统性地自我调试。
激活此技能用于:
请勿将此技能作为以下情况的主要来源:
verification-loop在尝试恢复之前,精确记录失败信息。
捕获内容:
最小捕获模板:
## 失败捕获
- 会话/任务:
- 进行中的目标:
- 错误:
- 最后成功的步骤:
- 最后失败的工具/命令:
- 观察到的重复模式:
- 需验证的环境假设:
在更改任何内容之前,将失败与已知模式匹配。
| 模式 | 可能原因 | 检查 |
|---|---|---|
| 最大工具调用/重复相同命令 | 循环或无退出观察路径 | 检查最后 N 次工具调用是否存在重复 |
| 上下文溢出/推理能力下降 | 无界笔记、重复计划、过大日志 | 检查近期上下文是否存在重复和低信号批量内容 |
ECONNREFUSED / 超时 | 服务不可用或端口错误 | 验证服务健康状态、URL 和端口假设 |
429 / 配额耗尽 | 重试风暴或缺少退避 | 统计重复调用次数并检查重试间隔 |
| 写入后文件缺失/差异过时 | 竞态、工作目录错误或分支漂移 | 重新检查路径、工作目录、git 状态和实际文件是否存在 |
| “修复”后测试仍然失败 | 假设错误 | 隔离确切失败的测试并重新推导错误 |
诊断问题:
使用改变诊断面的最小操作进行恢复。
安全恢复操作:
不要声称不支持的自动修复操作,如“重置智能体状态”或“更新框架配置”,除非你正在当前环境中通过真实工具实际执行这些操作。
受限恢复检查清单:
## 恢复操作
- 选择的诊断方式:
- 采取的最小操作:
- 为何此操作安全:
- 哪些证据能证明修复生效:
以一份使恢复过程对下一个智能体或人类清晰可读的报告结束。
## 代理自调试报告
- 会话/任务:
- 失败原因:
- 根本原因:
- 恢复措施:
- 结果:成功 | 部分成功 | 受阻
- Token/时间消耗风险:
- 是否需要后续跟进:
- 后续需编码的预防性变更:
按顺序优先选择以下干预措施:
错误模式:
正确模式:
verification-loop。continuous-learning-v2。council。workspace-surface-audit。当此技能激活时,不要仅以“我已修复”结束。
始终提供:
Use after a complex task, failure, or when reviewing what was learned. Teaches how to write growth logs that extract reusable patterns — not diary entries.
Design a goal-oriented agent loop, and review it for the ways loops go wrong — spinning and burning tokens, Goodhart-gaming the verifier, or running a wrong answer to completion. Two actions: (1) WRITE a loop — gate whether to build it, define a machine-decidable goal, pick the loop type, pick a skeleton; (2) REVIEW a loop — run it past five failure modes plus decidability, boundaries, fallback, judge independence, and keep-judgment-with-the-human red lines. Use when designing an autonomous agent loop, or when you already have one and worry it will spin, cheat, or run a wrong answer to the end. Complements the mechanism-layer loop skills (autonomous-loops, continuous-agent-loop) by covering the judgment layer they don't. 中文触发:写 loop、设计 loop、做一个 loop、检查 loop 对不对、loop 体检、loop 会不会跑飞、可判定目标、五个崩法、plan build judge。English triggers: design an agent loop, write a loop, check a loop, loop review, prevent a runaway loop, goal-oriented loop, decidable goal, plan/build/judge.
Stop hook that blocks Claude from finishing until quality checks pass. Detects rationalization patterns (surface text heuristics), stale learning logs (filesystem mtime), and low disk space. Complements self-audit by mechanically enforcing learning capture habits.
React Native and Expo app patterns — Expo Router navigation, state separation (server/client/route/form), TanStack Query data fetching with Zod, performant lists, NativeWind/StyleSheet styling, native APIs, and secure storage. Use when building or editing React Native / Expo screens, components, navigation, or data layers.
Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents. v2.1 adds project-scoped instincts to prevent cross-project contamination.
Use this skill when writing new features, fixing bugs, or refactoring code. Enforces test-driven development with 80%+ coverage including unit, integration, and E2E tests.