debug-my-harness
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDiagnose harness misbehavior from the flight recorder — the local, append-only ledger
at that vigiles writes as your harness runs. It records what actually
happened, so you debug from evidence instead of guessing.
.vigiles/runs.jsonl从flight recorder(即vigiles在harness运行时写入的本地追加式账本)中诊断harness的运行异常问题。该账本记录了实际发生的事件,让你能够基于证据而非猜测进行调试。
.vigiles/runs.jsonlWhat's in the ledger
账本包含的内容
One JSON record per line, each with a :
kind- — a compiled-hook gate decision:
hook.{event, decision: allow|deny|ask, mode: enforce|observe, rule, cmd, reason} - — a subagent tool-contract decision:
agent(a{name, tool, allowed, reason}= the agent went outside its lane).false - — a skill activation:
skill.{name, fired} - — a measured metric:
eval(e.g. trigger-rate recall/precision).{name, metric, value} - — a blast-radius change:
capability-diff.{pr, added, removed, widened}
每行一条JSON记录,每条记录包含字段:
kind- — 编译后的Hook网关决策:
hook。{event, decision: allow|deny|ask, mode: enforce|observe, rule, cmd, reason} - — 子Agent工具合约决策:
agent({name, tool, allowed, reason}表示Agent超出了其权限范围)。false - — Skill激活记录:
skill。{name, fired} - — 度量指标记录:
eval(例如触发率的召回率/精确率)。{name, metric, value} - — 影响范围变化记录:
capability-diff。{pr, added, removed, widened}
Instructions
操作步骤
Step 1: Read the ledger
步骤1:读取账本
Read (JSONL — one record per line; tolerate a torn last line). If it's
absent or empty, say so — there's nothing recorded yet; suggest running the harness (or
) first. Do NOT fabricate records.
.vigiles/runs.jsonlvigiles audit读取文件(JSONL格式——每行一条记录;允许最后一行不完整)。如果文件不存在或为空,请告知用户目前没有任何记录,并建议先运行harness(或)。请勿编造记录。
.vigiles/runs.jsonlvigiles auditStep 2: Answer the specific question, evidence-first
步骤2:以证据为优先,回答具体问题
Match the user's question to the ledger:
- "Why did skill X stop firing / why does the wrong one run?" — count fires by name over time. If X's fire-rate dropped, look for a sibling that fired on the same kinds of prompts (a selection collision) and check their descriptions for overlap. Recommend differentiating or merging the descriptions.
skill - "Why didn't my hook block that?" — find records for the event. A
hookon something that should be denied, ordecision: allow(shadow, never blocks), or the absence of any record, tells you which. Recommend flippingmode: observe→observeor fixing the gate logic.enforce - "Did a subagent misbehave?" — list records with
agent: the agent reached for a tool outside its declared contract. Point at the contract to tighten or widen.allowed: false - "Is it getting worse?" — compare metric values (recall/precision) across runs; a downward trend is drift (often after a harness/model upgrade).
eval
将用户的问题与账本记录匹配:
- “为什么Skill X停止触发/为什么运行的是错误的Skill?” — 按名称统计不同时间点的触发次数。如果X的触发率下降,查找在同类提示下触发的其他Skill(即选择冲突),并检查它们的描述是否存在重叠。建议区分或合并这些描述。
skill - “为什么我的Hook没有拦截该操作?” — 查找对应事件的记录。如果记录中
hook(本应拒绝的操作被放行)、decision: allow(影子模式,从不拦截),或者没有任何相关记录,即可确定原因。建议将mode: observe模式切换为observe模式,或修复网关逻辑。enforce - “子Agent是否运行异常?” — 列出所有的
allowed: false记录:这些记录表示Agent试图使用其声明合约之外的工具。建议调整合约以收紧或放宽权限。agent - “情况是否在恶化?” — 对比不同运行周期的指标值(召回率/精确率);指标下降趋势表示出现漂移(通常发生在harness/模型升级后)。
eval
Step 3: Recommend a fix, tied to the evidence
步骤3:基于证据提出修复建议
Prefer promoting an ignored-but-decidable rule from prose to a deterministic gate: a
repeated violation or a rule the agent keeps breaking → a compiled hook or a tighter
tool-contract (the skill can help). A description collision → differentiate the
skill descriptions. Always cite the specific records you based the diagnosis on.
agentstrengthen优先建议将被忽略但可明确执行的规则从文本描述转换为确定性网关:如果出现重复的违规或Agent持续违反某条规则→建议添加编译后的Hook或收紧工具合约( Skill可提供帮助)。如果存在描述冲突→建议区分Skill的描述。务必引用诊断所依据的具体记录。
agentstrengthenStep 4: Offer the next step
步骤4:提供下一步操作建议
If the fix is a spec change, hand off to . If it's promoting guidance to a linter
rule, hand off to . If a behavioral claim needs measuring (does the skill fire
now?), hand off to ().
edit-specstrengthentest-harnessmeasureTriggerRate如果修复需要修改规范,请转至。如果需要将指导规则升级为检查器规则,请转至。如果需要验证行为变化(例如Skill现在是否触发?),请转至(使用)。
edit-specstrengthentest-harnessmeasureTriggerRate