agent-observability

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Agent Observability (Self-Reporting Log)

Agent可观测性(自我报告日志)

Operating rules

操作规则

  • Treat user corrections as issues to log.
  • Log locally in the current repo at
    docs/observed-coding-agent-issues.md
    .
  • Create the report file if it doesn’t exist.
  • Mandatory routing checklist (do not skip): (1) log the correction, (2) read the relevant skill file, (3) respond to the main task. This skill never handles the main task directly.
  • After logging, always open the relevant skill file before continuing, even for small/obvious tasks.
  • If the user request includes a concrete edit/implementation (README/docs/config/code), open
    skills/coding/SKILL.md
    before any questions, reads, or edits.
  • If the user asks for a plan/spec, open
    skills/planning/SKILL.md
    before drafting the plan.
  • If the user asks to create/update a skill or references
    skills/
    /
    SKILL.md
    , open
    skills/skill-creator/SKILL.md
    before continuing.
  • On multi-turn requests, re-evaluate routing at the start of each turn; logging does not replace skill invocation.
  • When opening references, use full repo paths like
    skills/agent-observability/references/...
    (not
    references/...
    ).
  • When a reference trigger clearly matches, open the referenced file before drafting output.
  • If the user provides a word/length limit, keep the log entry short and minimize extra reads.
  • Rate limit: at most one log entry per session unless the user explicitly asks to log more.
  • Batch multiple corrections into a single entry by updating the existing root cause and guardrail notes; do not add verbatim quotes.
  • 将用户的修正内容视为需要记录的问题。
  • 在当前仓库的
    docs/observed-coding-agent-issues.md
    路径下本地记录。
  • 若报告文件不存在则创建该文件。
  • 强制路由检查清单(不可跳过): (1) 记录修正内容,(2) 阅读相关Skill文件,(3) 响应主任务。本Skill从不直接处理主任务。
  • 记录完成后,务必先打开相关Skill文件再继续,即使是微小/明显的任务也不例外。
  • 若用户请求包含具体的编辑/实现(README/文档/配置/代码),在进行任何提问、阅读或编辑操作之前,先打开
    skills/coding/SKILL.md
  • 若用户要求制定计划/规格,在起草计划之前,先打开
    skills/planning/SKILL.md
  • 若用户要求创建/更新Skill或提及
    skills/
    /
    SKILL.md
    ,在继续操作之前,先打开
    skills/skill-creator/SKILL.md
  • 对于多轮请求,每一轮开始时重新评估路由;记录操作不能替代Skill调用。
  • 打开参考文件时,使用完整的仓库路径,如
    skills/agent-observability/references/...
    (而非
    references/...
    )。
  • 当明确匹配参考触发条件时,在起草输出内容之前先打开参考文件。
  • 若用户提供了字数/长度限制,保持日志条目简短并尽量减少额外的阅读操作。
  • 频率限制:除非用户明确要求记录更多,否则每个会话最多记录一条日志条目。
  • 将多个修正内容合并到单个条目中,更新现有的根本原因和防护措施说明;不要添加逐字引用。

Detect → Record → Resume

检测→记录→恢复

1) Detect correction

1) 检测修正内容

Trigger on phrases like or similar to:
  • “don’t do that”, “stop doing X”, “always do Y”, “never do Z” Friction alone is not sufficient; require a correction or explicit request.
触发条件为类似以下的语句:
  • “别那么做”、“停止做X”、“一直做Y”、“永远不要做Z” 仅存在摩擦不足以触发;需要明确的修正或请求。

2) Record issue (append)

2) 记录问题(追加)

Append a short entry to
docs/observed-coding-agent-issues.md
. If a log has already been written this session, batch new corrections under the same entry unless the user explicitly asks for another log.
Entry format:
  • Date/Time:
  • Task/Context:
  • What went wrong (root cause):
  • Proposed guardrail:
docs/observed-coding-agent-issues.md
中追加一条简短条目。 若本次会话已写入过日志,将新的修正内容合并到同一条目中,除非用户明确要求另建日志。
条目格式:
  • 日期/时间:
  • 任务/上下文:
  • 问题所在(根本原因):
  • 建议的防护措施:

3) Resume main task

3) 恢复主任务

Re-evaluate which skill applies next (coding/skill-creator/planning) and open that SKILL.md before responding. Do not continue the task until the relevant skill is loaded.
重新评估下一步适用的Skill(coding/skill-creator/planning),并在响应之前打开对应的SKILL.md文件。在加载相关Skill之前不要继续任务。

Routing shortcuts (read immediately)

路由快捷方式(立即阅读)

  • README/docs/config/code edits → read
    skills/coding/SKILL.md
  • Plan/spec request → read
    skills/planning/SKILL.md
  • Skill creation/update or
    skills/
    /
    SKILL.md
    mention → read
    skills/skill-creator/SKILL.md
  • If correction + task appear in the same prompt, still read the task skill before any tool calls.
  • README/文档/配置/代码编辑 → 阅读
    skills/coding/SKILL.md
  • 计划/规格请求 → 阅读
    skills/planning/SKILL.md
  • Skill创建/更新或提及
    skills/
    /
    SKILL.md
    → 阅读
    skills/skill-creator/SKILL.md
  • 若修正内容和任务出现在同一个提示中,仍需在进行任何工具调用之前先阅读任务对应的Skill。

If unable to write

若无法写入

  • Output a “Self-report draft” block in the response with the entry content.
  • State that it was not written and needs manual application.
  • 在响应中输出“自我报告草稿”块,包含条目内容。
  • 说明该条目未写入,需要手动应用。

Reference triggers (open when clearly relevant)

参考触发条件(明确相关时打开)

  • Policy change / PR summary requested ->
    skills/agent-observability/references/pr-template.md
  • 政策变更 / 需要PR摘要 ->
    skills/agent-observability/references/pr-template.md

References

参考文件

  • skills/agent-observability/references/pr-template.md
    - PR summary template for policy changes
  • skills/agent-observability/references/pr-template.md
    - 政策变更的PR摘要模板