AGENT SKILL
try-run-match
暂无简介
- License 许可
- Apache-2.0
- 所属仓库
- spark-456/tilo
- 最近更新
- 2026-10-27
- Stars
- ★ 0
- Forks
- 0
02 资源文件 6
- 参考文档examples/golden_cases.json10.4 KB
- 参考文档README.md1.1 KB
- 脚本scorer.py3.7 KB
- 参考文档skill.yaml5.0 KB
- 脚本tests/test_FR_SKL_03_callable_scorer.py4.2 KB
- 脚本tests/test_FR_SKL_03_try_run_match.py8.5 KB
03 SKILL.md 正文
Try Run Match Scorer
Deterministically scores how closely a dry/try run matched a user's taught example sequence, verifying action order, additions, skips, and strict human-in-the-loop pause gates.
When to use
Use this skill whenever:
- Evaluating an automated try run (test or preview execution) against an established taught workflow.
- Verifying safety boundaries: ensuring every
ask_me_firststep explicitly paused before execution. - Producing alignment feedback for users showing which steps matched, were added, or were skipped.
- Enforcing read-only evaluation: try-run match analysis never executes, sends, or mutates any external state.
Steps
- Validate inputs: Confirm
taught_stepsandrecorded_stepsare structured step arrays conforming to the(verb, object, tool, ask_me_first)and(verb, object, tool, paused)schemas. - Check empty taught baseline: If
taught_stepsis empty, immediately returnstatus: "fail"withmatch_percent: 0.0andfailure_reason: "empty_taught_example". - Verify human-in-the-loop pauses:
- Inspect every taught step marked with
ask_me_first: true. - Ensure an equivalent step in
recorded_stepsexists and haspaused: true. - If any
ask_me_firststep is missing or executed without pausing, immediately returnstatus: "fail"withmatch_percent: 0.0andfailure_reason: "missed_ask_first_pause". A missed pause is a hard failure, not a reduced score.
- Inspect every taught step marked with
- Compute sequence alignment:
- Use Longest Common Subsequence (LCS) alignment across step tuples
(verb, object, tool)to determine matching order. - Categorize remaining taught steps as
skipped_steps. - Categorize unaligned recorded steps as
added_steps.
- Use Longest Common Subsequence (LCS) alignment across step tuples
- Calculate match percentage:
- Compute
match_percent = round((len(matched_steps) / max(len(taught_steps), len(recorded_steps))) * 100.0, 1). - Return
status: "pass",failure_reason: null, along with categorized steps.
- Compute
Quality bar
- Strict determinism: The scorer must always produce identical outputs for identical inputs without model dependencies or probabilistic heuristics.
- Safety guarantee: A missed
ask_me_firstpause must NEVER be treated as a partial degradation; it is always an absolute failure (status: "fail",match_percent: 0.0). - Zero side effects: Evaluating a try run reads telemetry only and never calls mutation tools or updates live records.
Checklist
- [ ]
taught_stepsverified non-empty. - [ ] All
ask_me_first: truesteps paused during the try run. - [ ] Longest Common Subsequence computed to preserve sequence order.
- [ ]
matched_steps,added_steps, andskipped_stepscleanly partitioned. - [ ]
match_percentrounded to 1 decimal place between 0.0 and 100.0. - [ ] Output passes Draft 2020-12 schema validation.
Pitfalls
- Treating missed pauses as score penalties:
ask_me_firststeps are explicit safety gates defined by the person. Bypassing a pause must fail completely, not merely deduct points. - Ignoring step order: Simply checking set membership without sequence alignment produces false 100% scores on out-of-order executions.
- Inventing mutations: Scorer is purely an analytical verification function; it must never trigger actions or persist records.