tk-skill-diagnose

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Agent Skill Diagnosis

Agent Skill 诊断

Use only for exactly one Agent Skill target and one observed or measured anomaly. Direct selection is allowed. Automatic selection requires a target and incident evidence; generic terms such as
skill
,
debug
, or
performance
are insufficient.
This skill performs diagnosis only. It does not write the canonical skill, optimize the catalog, or own the final patch. Route a verified skill objective through
tk-learn
as the sole
create | improve | merge
writer. Do not semantically modify the canonical source skill.
仅适用于单个Agent Skill目标和单个已观测或测量到的异常场景。 允许直接指定目标。自动选择目标时需提供目标对象和事件证据;
skill
debug
performance
这类通用表述不足以作为依据。
本技能仅执行诊断操作,不负责编写标准skill、优化skill目录或最终补丁。需将经过验证的skill目标通过
tk-learn
路由,由其作为唯一的
create | improve | merge
编写者。不得对标准源skill进行语义修改。

Input Gate

输入校验门

Record:
  • exact target package/path, installed ref, origin, host, and invocation;
  • incident prompt, expected behavior or metric anchor, and observed result;
  • available transcript/event, file, Git, eval, or resource evidence;
  • known consumer override or host configuration.
Mark missing values as
unverified
. A missing incident or metric anchor does not mean
NotApplicable
. If fresh execution is unavailable or required evidence is inaccessible, the result is
Unverifiable | Blocked
, not permission to infer a cause.
Accept a
learn-ready
handoff only once when it specifies the incident, exact target, host/invocation, prompt, expected and observed result, and evidence. Do not repeat the same target + incident + blocker cycle.
记录以下信息:
  • 精确的目标包/路径、已安装版本、来源、主机环境及调用方式;
  • 事件提示、预期行为或指标基准、实际观测结果;
  • 可用的会话记录/事件、文件、Git记录、评估或资源证据;
  • 已知的消费者覆盖配置或主机环境配置。
缺失值标记为
unverified
。缺少事件或指标基准并不意味着
NotApplicable
。若无法执行全新测试或无法获取必要证据,结果标记为
Unverifiable | Blocked
,不得推断原因。
仅当交接内容明确指定事件、精确目标、主机/调用方式、提示、预期与观测结果及证据时,才接受
learn-ready
交接。不得重复执行同一目标+事件+阻塞因素的循环。

Evidence

证据验证

Before reproduction, check target provenance, description/body consistency, deterministic assertions, repository state, and adapter/host evidence. Then follow the workflow order for reproduction, the adjacent control, and any minimum experiment.
Classify reproduction as
Reproduced | Not reproduced | Inconclusive
. Self-report may suggest a hypothesis but does not prove root cause. Repeat a fresh run only when the first result is unstable or the boundary with the control is unclear. Do not require a fixed trial count, generic holdout suite, or rubric scoring when narrow evidence can determine the cause.
Read the following references only when applicable:
  • failure planes and evidence
  • empirical diagnostic method
  • upstream issue anonymization
在重现异常前,检查目标来源、描述/内容一致性、确定性断言、仓库状态及适配器/主机环境证据。然后按照工作流顺序执行重现、对照测试及必要的最小化实验。
将重现结果分类为
Reproduced | Not reproduced | Inconclusive
。自我报告可作为假设依据,但无法证明根本原因。仅当首次结果不稳定或与对照测试的边界不清晰时,才重新执行全新测试。若已有明确证据可确定原因,无需固定测试次数、通用保留套件或评分规则。
仅在适用时参考以下文档:
  • 故障层面与证据
  • 实证诊断方法
  • 上游问题匿名化

Efficiency Gate

效率校验门

A resource claim requires a matched baseline, historical run, repository threshold, or explicit budget. Otherwise, record the observed value only as a profile and leave the direction
Unverifiable
. Lower token, time, call, retry, or fan-out usage does not offset a correctness or safety regression.
资源占用声明需匹配基线数据、历史运行记录、仓库阈值或明确预算。否则,仅将观测值记录为性能概览,方向标记为
Unverifiable
。降低token消耗、时间、调用次数、重试次数或扇出量不能抵消正确性或安全性的退化。

Workflow

工作流程

  1. Freeze: Fix the exact incident, target ref, must-preserve behavior, affected host, and reliable evidence/metric.
  2. Reproduce: Reproduce once in a clean context and classify the result as
    Reproduced | Not reproduced | Inconclusive
    .
  3. Control: Compare the nearest alternative. Distinguish loader from body, parent from child, candidate from grader, one host from another, and correctness from resource cost.
  4. Isolate: Select one verified failure plane from:
    selection | loading | instruction | planning | execution | formatting | evaluation | compatibility | efficiency | local override
    .
  5. Experiment only when needed: Run only in one run-owned isolated checkout. Change one root-cause theme and confirm or reject the cause. Do not treat the experiment as the canonical fix.
  6. Route: Choose one owner based on verified evidence.
Stop at a conclusive cause or disposition. Allow a second experiment only if the first reveals a new concrete cause. Clean up only run-owned isolation.
  1. 冻结环境:固定精确的事件、目标版本、必须保留的行为、受影响的主机环境及可靠证据/指标。
  2. 重现异常:在干净环境中重现一次,将结果分类为
    Reproduced | Not reproduced | Inconclusive
  3. 对照测试:与最接近的替代方案进行对比。区分加载器与主体、父级与子级、候选者与评分器、不同主机环境,以及正确性与资源成本。
  4. 隔离原因:从以下已验证的故障层面中选择一个:
    selection | loading | instruction | planning | execution | formatting | evaluation | compatibility | efficiency | local override
  5. 按需实验:仅在独立隔离的代码检出环境中运行实验。针对一个根本原因主题进行修改,确认或排除该原因。不得将实验作为标准修复方案。
  6. 路由分配:基于已验证的证据选择一个负责方。
在得出明确原因或处置结果后终止流程。仅当首次实验揭示新的具体原因时,才允许进行第二次实验。仅清理实验专属的隔离环境。

🔴 CHECKPOINT / STOP · Next-Step Gate

🔴 检查点/终止 · 下一步校验门

Do not begin the next step, experiment, or handoff until each checkpoint passes.
  • Input checkpoint: An exact target, eligible Agent Skill incident, and incident evidence exist. If there is no eligible Agent Skill incident, such as an ordinary code bug, stop with
    NotApplicable
    . If a required incident or metric anchor is missing or unverified, stop with
    Blocked | Unverifiable
    , not
    NotApplicable
    .
  • Reproduction checkpoint: Record the fresh result as
    Reproduced | Not reproduced | Inconclusive
    . If
    Inconclusive
    , do not finalize the cause or route; stop with
    Unverifiable
    .
  • Isolation checkpoint: Evidence confirms one failure plane and an adjacent control that distinguishes it. Otherwise, make no root-cause claim and stop with
    Unverifiable
    .
  • Routing checkpoint: One concrete, testable objective and must-preserve boundary are verified. Otherwise, do not emit a
    learn-ready
    handoff.
  • 🛑 STOP: After emitting
    learn-ready
    , wait for a separate explicit invocation of
    tk-learn
    .
每个检查点通过前,不得开始下一步、实验或交接操作。
  • 输入检查点:存在精确目标、符合条件的Agent Skill事件及事件证据。若不存在符合条件的Agent Skill事件(如普通代码bug),则终止并标记为
    NotApplicable
    。若缺少必要的事件或指标基准,或信息未验证,则终止并标记为
    Blocked | Unverifiable
    ,而非
    NotApplicable
  • 重现检查点:记录全新测试结果为
    Reproduced | Not reproduced | Inconclusive
    。若结果为
    Inconclusive
    ,不得确定原因或进行路由,终止并标记为
    Unverifiable
  • 隔离检查点:证据确认一个故障层面及可区分该层面的对照测试。否则,不得断言根本原因,终止并标记为
    Unverifiable
  • 路由检查点:已验证一个具体、可测试的目标及必须保留的边界。否则,不得发起
    learn-ready
    交接。
  • 🛑 终止:发起
    learn-ready
    交接后,等待
    tk-learn
    的单独显式调用。

Routing

路由规则

Verified Skill Objective:
learn-ready

已验证Skill目标:
learn-ready

Use only when one existing package and one concrete, testable objective have been verified. Emit:
text
Target package: skills/<name>/
Objective: <one observable correction or cost reduction>
Evidence: <incident, control, code, event, or metric references>
Must preserve: <behavior, safety, routing, authority, and host boundaries>
Affected execution: <smallest fresh scenario that decides the objective>
Metric: <actual measurement, labeled proxy, or unavailable>
Incident: <stable ID or source reference>
이는 이후 명시적으로 실행하는
tk-learn
의 input이다.
仅当已验证一个现有包和一个具体、可测试的目标时使用。输出格式如下:
text
Target package: skills/<name>/
Objective: <one observable correction or cost reduction>
Evidence: <incident, control, code, event, or metric references>
Must preserve: <behavior, safety, routing, authority, and host boundaries>
Affected execution: <smallest fresh scenario that decides the objective>
Metric: <actual measurement, labeled proxy, or unavailable>
Incident: <stable ID or source reference>
这是后续显式执行的
tk-learn
的输入。

Other Dispositions

其他处置结果

  • learn-candidate
    : A new independently useful skill is needed.
  • eval-owner
    : The grader, fixture, harness, or assertion is the verified cause.
  • host-owner
    : The loader, metadata, adapter, or host runtime is the verified cause.
  • local-only
    : A consumer override/configuration causes the incident.
  • no-change
    : Target behavior is correct or the incident is not reproduced.
  • unverifiable
    : Evidence cannot safely determine the result.
In an external consumer repository, verify the upstream origin/ref and current upstream behavior before proposing an anonymized issue. Classify only a redacted proposal that has passed duplicate checking as
upstream-draft-ready
; do not automatically create, comment, label, or publish it.
  • learn-candidate
    :需要一个新的独立可用skill。
  • eval-owner
    :评分器、测试夹具、测试工具或断言已被验证为故障原因。
  • host-owner
    :加载器、元数据、适配器或主机运行时已被验证为故障原因。
  • local-only
    :消费者覆盖配置导致事件发生。
  • no-change
    :目标行为正确或事件未重现。
  • unverifiable
    :证据无法可靠确定结果。
在外部消费者仓库中,提出匿名化问题前需验证上游来源/版本及当前上游行为。仅将通过重复检查的编辑后提案分类为
upstream-draft-ready
;不得自动创建、评论、标记或发布该提案。

Results

输出结果

## Diagnosis
로 시작하고 이어서
## Action
을 출력한다. 필요할 때만
## Remaining uncertainty
를 추가한다.
하나의 incident에는 짧은 설명을 사용한다. 여러 symptom이 하나의 cause를 공유하면
ID | Incident | Root cause
형식으로 cause마다 안정적인
SD-##
row 하나를 유지한다. reproduction verdict, verified failure plane, evidence, route 및 정확한 next handoff를 보고한다. raw log, transcript, screenshot, secret 또는 반복된 run narration을 복사하지 않는다.
experiment evidence가 다섯 row를 넘거나 이후 resume에 정확한 reference가 필요하면
.tigerkit/skill-diagnosis.md
를 bounded incident IDs, candidate/control/holdout evidence refs, measurements 및 route와 함께 atomically replace한다. 채팅에는
## Diagnosis
,
## Action
및 필요한 uncertainty만 남긴다. archive, lifecycle state 또는 중복된 raw output은 만들지 않는다.
다음 terminal status 중 하나를 사용한다:
  • Pass
    : diagnosis와 routing이 완료되었다.
  • Fail
    : deterministic diagnosis/experiment claim이 gate를 위반했다.
  • Blocked
    : 필요한 permission, decision 또는 environment를 사용할 수 없다.
  • Unverifiable
    : provenance, reproduction, cause 또는 metric을 검증할 수 없다.
  • NotApplicable
    : 적격한 Agent Skill incident가 없다.
## Diagnosis
开头,随后输出
## Action
。仅在必要时添加
## Remaining uncertainty
单个事件使用简短描述。若多个症状共享同一原因,按
ID | Incident | Root cause
格式为每个原因保留一条稳定的
SD-##
记录。 报告重现结论、已验证的故障层面、证据、路由分配及精确的下一步交接信息。不得复制原始日志、会话记录、截图、机密信息或重复的运行叙述。
若实验证据超过5行,或后续恢复需要精确参考,则将
.tigerkit/skill-diagnosis.md
与绑定的事件ID、候选/对照/保留证据引用、测量数据及路由信息进行原子替换。聊天中仅保留
## Diagnosis
## Action
及必要的不确定性说明。不得创建归档、生命周期状态或重复的原始输出。
使用以下终端状态之一:
  • Pass
    :诊断与路由已完成。
  • Fail
    :确定性诊断/实验声明违反校验规则。
  • Blocked
    :无法获取必要的权限、决策或环境。
  • Unverifiable
    :无法验证来源、重现结果、原因或指标。
  • NotApplicable
    :不存在符合条件的Agent Skill事件。

Precautions

注意事项

  • Do not assume the skill body is the cause.
  • Do not patch an unreproduced incident based only on wording intuition.
  • Do not change correctness, safety, or holdout behavior to reduce resource usage.
  • Do not use fixed repeated runs or judge majority to manufacture confidence.
  • Do not expose expected answers, secrets, or private evidence in prompts.
  • 不要假设skill主体是故障原因。
  • 不要仅基于文字直觉修复未重现的事件。
  • 不要为了降低资源消耗而修改正确性、安全性或保留行为。
  • 不要使用固定重复测试次数或基于多数结果制造可信度。
  • 不要在提示中暴露预期答案、机密信息或私有证据。