score-prompt
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese1. 输入解析
1. Input Parsing
1.1 必填参数
1.1 Required Parameters
target_file.md.yaml.yml.json.toml.txttarget_file.md.yaml.yml.json.toml.txt1.2 可选参数
1.2 Optional Parameters
- (默认 90)— 退出循环所需的最低 Overall 分数(百分制,0-100)。低于此分则继续迭代。
target_score=N - (默认 10)— 最大迭代轮次上限。达到上限未达标则停止(不抛错,输收口报告说明未达)。
max_rounds=N - (默认空)— 评审侧重说明。例
review_focus="..."或review_focus="schema instruction"。传空则 oracle 用通用 baseline。review_focus="OpenCode skill body"
- (default 90) — Minimum Overall score required to exit the loop (percentage, 0-100). If the score is lower than this value, the iteration continues.
target_score=N - (default 10) — Upper limit of maximum iteration rounds. If the target is not reached when the limit is hit, stop (no error thrown, output a closing report indicating the target is not met).
max_rounds=N - (default empty) — Focus of the review. Examples:
review_focus="..."orreview_focus="schema instruction". If left empty, the oracle uses a general baseline.review_focus="OpenCode skill body"
2. 全局规则
2. Global Rules
2.1 Fast Fail Rule
2.1 Fast Fail Rule
任何 / / 调用失败(超时、agent 不可用、返回错误等):
task()tool()skill()- 立即停止当前 round
- 报告「🔴 [round 名] 中断:[调用名] 调用失败。[错误信息]」
- 等待用户介入
禁止降级、禁止重试、禁止跳过、禁止自行替代执行。
If any / / call fails (timeout, agent unavailable, error returned, etc.):
task()tool()skill()- Immediately stop the current round
- Report "🔴 [Round Name] Interrupted: [Call Name] call failed. [Error Message]"
- Wait for user intervention
Downgrading, retrying, skipping, or executing alternative actions on your own is prohibited.
2.2 评分体系(百分制)
2.2 Scoring System (Percentage)
每个维度 1-5 分,乘以 20 得百分制分数。Overall = 5 维度平均分 × 20。
| 维度 | 含义 |
|---|---|
| Clarity | 意图对 LLM 是否无歧义?动词具体 vs 模糊?条件显式 vs 隐式? |
| Conciseness | 是否有可移除的重复?有没有增加 token 但不增加约束的措辞? |
| Actionability | LLM 能否端到端执行而无需问"等等,我该做什么"?失败模式是否处理? |
| Consistency | 内部术语、PHASE/Step 编号、格式约定是否一致? |
| Minimal-slop | 有没有 AI 生成的冗余 / 营销框架 / 魔数 token / 重述? |
Each dimension is scored 1-5 points, multiplied by 20 to get the percentage score. Overall = Average score of 5 dimensions × 20.
| Dimension | Meaning |
|---|---|
| Clarity | Is the intent unambiguous to the LLM? Are verbs specific vs vague? Are conditions explicit vs implicit? |
| Conciseness | Are there removable repetitions? Is there wording that adds tokens but no constraints? |
| Actionability | Can the LLM execute end-to-end without asking "Wait, what do I do?" Are failure modes addressed? |
| Consistency | Are internal terminology, PHASE/Step numbering, and format conventions consistent? |
| Minimal-slop | Is there AI-generated redundancy, marketing frameworks, magic number tokens, or restatements? |
2.3 target_score 模式
2.3 target_score Mode
默认值与取值范围见 §1.2(未传时默认 90,合法区间 0-100)。
- 视为"严格模式"(每次修复都需更高 ROI)
target_score >= 95 - 视为"宽松模式"(oracle 会更关注阻塞性问题)
target_score < 80 - 或
target_score < 0视为非法,停止并提示用户> 100
Default value and range are specified in §1.2 (default 90 if not passed, valid range 0-100).
- is considered "Strict Mode" (each refinement requires higher ROI)
target_score >= 95 - is considered "Lenient Mode" (oracle will focus more on blocking issues)
target_score < 80 - or
target_score < 0is considered invalid, stop and prompt the user> 100
3. R0:baseline 摸底
3. R0: Baseline Assessment
目的:拿到首份 oracle 报告,建立修复 backlog。
调用(单 oracle agent,run_in_background=false):
task(subagent_type="oracle", prompt="
你是 Oracle 评审 agent,负责对 <target_file> 跑 5 维度质量评分(baseline 摸底)。
**任务**:
1. 阅读本 skill body(§2.2 5 维度定义 + §5 输出格式 + §2.3 target_score 模式 — 全部以 skill body 为权威源)
2. 阅读 <target_file>(待评审文件)
3. 按 §5 输出格式输出 5 维度分数 + 3 类 findings + Quick wins
**目标分数**(百分制):<target_score>,< 80 表示宽松 / ≥95 表示严格 / 默认 90。
")
解析输出:提取 Overall 分数(如 "Overall: 4.5/5" → 90/100),记为 R0 baseline。
Purpose: Obtain the first oracle report and establish a refinement backlog.
Call (single oracle agent, run_in_background=false):
task(subagent_type="oracle", prompt="
You are the Oracle Review Agent, responsible for running a 5-dimensional quality assessment (baseline assessment) on <target_file>.
**Task**:
1. Read this skill body (§2.2 5-dimensional definitions + §5 Output Format + §2.3 target_score mode — all are authoritative sources from the skill body)
2. Read <target_file> (the file to be reviewed)
3. Output 5-dimensional scores + 3 types of findings + Quick wins according to §5 Output Format
**Target Score** (percentage): <target_score>, < 80 means lenient / ≥95 means strict / default 90.
")
Parse Output: Extract the Overall score (e.g., "Overall: 4.5/5" → 90/100), record it as R0 baseline.
4. R1+:修复-重审循环
4. R1+: Refinement-Review Loop
4.1 循环入口
4.1 Loop Entry
读取上一轮 oracle 输出,列出所有 🔴 / 🟡 / ⚪ findings。对每个 finding 决定"本轮修"或"延后"。
修复优先级:
- 🔴 必修(本轮)
- 🟡 视 ROI 修(本轮,如改动 ≤ 3 行)
- ⚪ 选最优 ROI 的 1-2 个修(本轮)
Read the oracle output from the previous round, list all 🔴 / 🟡 / ⚪ findings. Decide "fix in this round" or "postpone" for each finding.
Refinement Priority:
- 🔴 Must fix (this round)
- 🟡 Fix based on ROI (this round, e.g., changes ≤ 3 lines)
- ⚪ Select 1-2 items with the highest ROI to fix (this round)
4.2 应用修复
4.2 Apply Refinements
用 Read/Edit 工具直接改 (原文件):
target_file- 改动前先 Read 确认当前行号
- 用 Edit 替换(精确匹配,不模糊替换)
- 改完用 跑
bash/bun test等验证(如目标文件关联项目有这些测试)。若无任何可用测试套件(如审 README/独立 .md),跳过本步骤,仅依赖 oracle 重审作为质量门禁。openspec schema validate
严禁:批量改 3 处以上未经验证,一次改一处立即确认。
Use the Read/Edit tool to directly modify (original file):
target_file- Read to confirm the current line numbers before modification
- Use Edit to replace (exact match, no fuzzy replacement)
- After modification, run verification such as /
bun testviaopenspec schema validate(if the target file is associated with a project that has these tests). If no test suite is available (e.g., reviewing README/standalone .md), skip this step and only rely on oracle re-review as the quality gate.bash
Strictly Prohibited: Modify more than 3 places in batches without verification; modify one place at a time and confirm immediately.
4.3 重抽 + 重审
4.3 Re-extract + Re-review
每次改完后:
- (无需重新读取 target_file —— oracle 每轮自动重读;如有改动,直接进入下一轮审查)
- 重跑 oracle(同 §3 的 task() 调用,复用 session_id 保持跨轮上下文)。具体机制:从 R0 的 返回值中提取
task()字段(OpenCode 标准),后续session_id调用中作为参数传入。不要省略 session_id——省略会导致 oracle 每次重审时丢失跨轮已知 findings,导致 R(N) 评分震荡。task(subagent_type="oracle", session_id=<提取值>, prompt=...) - 解析新分数,记为 R(N)
After each modification:
- (No need to re-read target_file — the oracle automatically re-reads it every round; if there are changes, directly proceed to the next round of review)
- Re-run the oracle (same task() call as §3, reuse session_id to maintain cross-round context). Specific mechanism: Extract the field (OpenCode standard) from the return value of R0's
session_id, and pass it as a parameter in subsequenttask()calls. Do not omit session_id — omitting it will cause the oracle to lose known cross-round findings during each re-review, leading to R(N) score fluctuations.task(subagent_type="oracle", session_id=<extracted value>, prompt=...) - Parse the new score, record it as R(N)
4.4 循环退出条件(每轮修复前先检查)
4.4 Loop Exit Conditions (Check before each round of refinement)
读取最新 R(N) oracle 报告:
- Overall × 20 ≥ target_score → 退出循环,进入 §5 收口
- rounds 计数 ≥ max_rounds → 强制停止,进入 §5 收口(说明未达标 + 残留 findings)
- 否则 → 进入 §4.1 下一轮
Read the latest R(N) oracle report:
- Overall × 20 ≥ target_score → Exit the loop, proceed to §5 Closing
- Round count ≥ max_rounds → Force stop, proceed to §5 Closing (indicate target not met + remaining findings)
- Otherwise → Proceed to §4.1 for the next round
5. 收口报告
5. Closing Report
findings 等级符号定义:🔴 = 严重问题,必须修复;🟡 = 建议改进,视 ROI 修复;⚪ = 可选优化,择高 ROI 项处理。
无论循环是因达标退出还是 max_rounds 强制停止,都输出最终收口报告:
undefinedDefinition of Finding Level Symbols: 🔴 = Critical issue, must be fixed; 🟡 = Recommended improvement, fix based on ROI; ⚪ = Optional optimization, handle items with high ROI.
Whether the loop exits due to reaching the target or being forced to stop by max_rounds, output the final closing report:
undefinedscore-prompt 收口报告
score-prompt Closing Report
目标文件: <target_file>
目标分数: <target_score>
实际分数: <R(N) Overall × 20>/100
迭代轮数: R0 → R(N)
耗时: <估算分钟数>
Target File: <target_file>
Target Score: <target_score>
Actual Score: <R(N) Overall × 20>/100
Iteration Rounds: R0 → R(N)
Time Spent: <estimated minutes>
分数演进
Score Evolution
| Round | Overall | Δ | 修复内容摘要 |
|---|---|---|---|
| R0 | 80/100 | — | baseline 摸底 |
| R1 | 88/100 | +8 | 修 3 🟡 + 2 ⚪ |
| R2 | 92/100 | +4 | 修 1 🟡 残留 |
| ... |
| Round | Overall | Δ | Refinement Summary |
|---|---|---|---|
| R0 | 80/100 | — | Baseline assessment |
| R1 | 88/100 | +8 | Fixed 3 🟡 + 2 ⚪ |
| R2 | 92/100 | +4 | Fixed remaining 1 🟡 |
| ... |
达标状态
Target Status
✅ 已达 target_score(≥ 90)/ ❌ 未达(残留 N 个 findings)
✅ Target score reached (≥ 90) / ❌ Target not reached (N remaining findings)
残留 findings(如有)
Remaining Findings (if any)
- 🟡 L45: ...
- ⚪ L78: ...
- 🟡 L45: ...
- ⚪ L78: ...
建议后续
Follow-up Recommendations
- 如需更高分数,可传 target_score=95 重新跑此 skill
- 残留 findings 中标 [低 ROI] 的可在未来 review 时一并处理
收口报告输出后,**skill 任务完成**,返回控制权给用户。- To achieve a higher score, re-run this skill with target_score=95
- Items marked [Low ROI] in remaining findings can be handled in future reviews
After the closing report is output, **the skill task is completed**, and control is returned to the user.6. 错误处理
6. Error Handling
- 目标文件不存在 → 立即报告「🔴 target_file 不存在:<path>」,停止
- 目标文件不是支持类型 → 报告「🔴 不支持的文件类型:<ext>,本 skill 支持 .md/.yaml/.yml/.json/.toml/.txt」,停止
- oracle agent 不可用 → 报告「🔴 oracle agent 不可用,本 skill 强依赖 oracle 做质量评审」,停止
- max_rounds 内未达标 → 不抛错,输出收口报告(标 ❌ 未达),返回控制权
- target_score 非法 → 报告「🔴 target_score 必须在 0-100 之间」,停止
- Target file does not exist → Immediately report "🔴 target_file does not exist: <path>" and stop
- Unsupported file type → Report "🔴 Unsupported file type: <ext>, this skill supports .md/.yaml/.yml/.json/.toml/.txt" and stop
- Oracle agent unavailable → Report "🔴 Oracle agent is unavailable, this skill relies heavily on oracle for quality review" and stop
- Target not reached within max_rounds → No error thrown, output closing report (mark ❌ target not met), return control
- Invalid target_score → Report "🔴 target_score must be between 0 and 100" and stop ",