improve

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Improve

改进

Paths:
${CLAUDE_SKILL_DIR}
means the folder containing this SKILL.md, and
${CLAUDE_PLUGIN_ROOT}
the plugin folder two levels above it.
Every question to the user goes in the question box: call the AskUserQuestion tool (2-4 options, the recommended one first). Only in an agent without that tool, ask numbered questions in text.
This runs in a checkout of the repo, for the person who maintains it. A fix here reaches every user on their next plugin update.
S="${CLAUDE_SKILL_DIR}/scripts"
. Run the scripts with
python3
on Mac and Linux,
py
on Windows.
路径:
${CLAUDE_SKILL_DIR}
表示包含此 SKILL.md 的文件夹,
${CLAUDE_PLUGIN_ROOT}
表示其上两级的 plugin 文件夹。
所有向用户提出的问题都要放在问题框中:调用 AskUserQuestion 工具(2-4 个选项,推荐项放在首位)。只有在不具备该工具的 Agent 中,才以文本形式提出编号问题。
此流程在仓库的 git checkout 中运行,供仓库维护者使用。在此处的修复会随用户下次 plugin 更新传递给每位用户。
S="${CLAUDE_SKILL_DIR}/scripts"
。在 Mac 和 Linux 上使用
python3
运行脚本,在 Windows 上使用
py
运行。

0. Who is running this

0. 谁在运行此流程

bash
python3 "$S/improve.py" mode
maintainer
only in a git checkout of the repo with
AI_EDITOR_MAINTAINER=1
: go on to step 1.
user
: the plugin's own files are replaced on every update, so never edit them (no SKILL.md, reference, script or PRINCIPLES.md). Collect and pick as below, then save each accepted item in the user's own layer, which updates never touch (
docs/customise.md
in the repo): a setting with
taste.py add ... --set
; a word rule with
python3 "${CLAUDE_PLUGIN_ROOT}/lib/ai_editor/custom.py" rule "<rule>"
; a caption look as
custom/captions/<name>.json
plus
taste.py set captions.preset <name>
; template defaults as
custom/templates/<type>.json
. Then offer
taste.py suggest
so the maintainers can fix it for everyone. Stop there.
bash
python3 "$S/improve.py" mode
只有在仓库的 git checkout 中且设置了
AI_EDITOR_MAINTAINER=1
时,才会进入
maintainer
模式:继续执行第 1 步。
user
:plugin 自身的文件会在每次更新时被替换,因此绝不要编辑这些文件(SKILL.md、reference、脚本或 PRINCIPLES.md 均不可编辑)。按下文方式收集和选择反馈,然后将每个接受的条目保存到用户自己的层中;更新永远不会触及该层(仓库中的
docs/customise.md
):使用
taste.py add ... --set
保存设置;使用
python3 "${CLAUDE_PLUGIN_ROOT}/lib/ai_editor/custom.py" rule "<rule>"
保存词语规则;使用
custom/captions/<name>.json
并配合
taste.py set captions.preset <name>
保存字幕外观;使用
custom/templates/<type>.json
保存模板默认值。然后提供
taste.py suggest
,以便维护者能够为所有用户修复该问题。到此停止。

1. Collect

1. 收集

bash
python3 "$S/improve.py" collect [--edits D] [--no-gh]
One line a rule, most repeated first: times it came in, from where (suggestion, taste regression, preview correction, review note, GitHub issue), the owner named, and up to three examples. A rule said by several users, or said again after it was applied, comes first.
bash
python3 "$S/improve.py" collect [--edits D] [--no-gh]
每条规则占一行,出现次数最多的排在最前:出现次数、来源(建议、taste 回归、预览纠正、审阅备注、GitHub issue)、标明的归属方,以及最多三个示例。
由多个用户提出的规则,或应用后再次被提出的规则,排在最前。

2. Pick

2. 选择

Show the top of the queue and ask in the question box which to fix now (multi-select, the most repeated first, recommended). For each one, also ask when it is unclear: Every user (Recommended) / Only some creators' styles (it belongs in a style.json field, not a rule) / Not a fix (close it).
显示队列顶部的内容,并通过问题框询问现在要修复哪些项(多选,出现次数最多的排在首位并作为推荐项)。对于每一项,如果其适用范围不明确,还要询问:所有用户(推荐)/ 仅适用于部分创作者的风格(它应放入 style.json 字段,而不是规则)/ 无需修复(关闭该项)。

3. Fix each one, in this order

3. 按以下顺序修复每一项

  1. The rule. One line in
    ${CLAUDE_PLUGIN_ROOT}/PRINCIPLES.md
    under the right heading, naming where it is enforced, and the same rule in the owning SKILL.md or reference. General, never about one video: "Zooms ease over at least 0.5 s", not "the zoom at 0:12 snapped".
  2. The enforcement. The smallest code that makes the rule hold without anyone remembering it: a FAIL in a check (
    check.py
    ,
    quality.py
    ,
    product.py check
    ,
    ai_tells.py
    ), a refusal in the script that would break it (
    gates.py
    ), a default that cannot produce it, or a line in
    tests/check_plugins.py
    for a repo rule. Prefer tightening an existing check to adding one.
  3. The test. An assert in that script's
    demo()
    (or
    tests/
    ), built from a small synthetic example of the failure. Run it before the fix and see it fail, then after and see it pass. A rule only an agent can follow (asking, explaining) gets an eval case in
    evals/
    instead:
    prompt.md
    plus a
    tool_used
    or
    llm
    grader.
  4. The record.
    docs/feedback-matrix.md
    : the rule, where it is written, what enforces it, what tests it. Then the changelog line:
bash
AI_EDITOR_MAINTAINER=1 python3 "$S/improve.py" log "quality.py: a zoom faster than 0.5 s is a FAIL (quality.py demo)"
  1. 规则。 在
    ${CLAUDE_PLUGIN_ROOT}/PRINCIPLES.md
    的相应标题下写一行规则,说明它在哪里被强制执行,并在负责该规则的 SKILL.md 或 reference 中写入同一规则。规则必须具有通用性,绝不能针对单个视频,例如应写“缩放的缓动时长至少为 0.5 s”,而不是“0:12 处的缩放很突兀”。
  2. 强制执行。 用尽可能少的代码让规则成立,而不必依赖任何人记住它:可以在检查(
    check.py
    、
    quality.py
    、
    product.py check
    、
    ai_tells.py
    )中加入一个 FAIL,在可能破坏规则的脚本(
    gates.py
    )中加入拒绝执行,设置一个无法产生该问题的默认值,或针对仓库规则在
    tests/check_plugins.py
    中添加一行。优先收紧现有检查,而不是新增检查。
  3. 测试。 在该脚本的
    demo()
    (或
    tests/
    )中添加一个 assert,使用一个能够复现问题的小型合成示例构建。修复前运行并确认其失败,修复后再运行并确认其通过。对于只有 Agent 才能遵循的规则(例如询问、解释),改为在
    evals/
    中添加一个 eval 用例:包含
    prompt.md
    ,以及
    tool_used
    或
    llm
    grader。
  4. 记录。 在
    docs/feedback-matrix.md
    中记录:规则、规则写在哪里、什么负责强制执行它、什么负责测试它。然后添加 changelog 行:
bash
AI_EDITOR_MAINTAINER=1 python3 "$S/improve.py" log "quality.py: a zoom faster than 0.5 s is a FAIL (quality.py demo)"

4. Run everything

4. 运行全部检查

bash
python3 tests/check_plugins.py
for p in . plugins/ai-editor plugins/creator-teardown; do claude plugin validate --strict "$p"; done
Then every demo in
.github/workflows/check.yml
,
node tests/test_record.mjs
, and when the renderer is set up
tests/smoke.py
and
tests/golden.py
. All green before handing over. Do not commit; the maintainer reviews the diff and the CHANGELOG.md entry and commits.
On a GitHub issue that is now fixed, offer to comment the changelog line and close it (
gh issue close <n> --comment "..."
), only after asking.
bash
python3 tests/check_plugins.py
for p in . plugins/ai-editor plugins/creator-teardown; do claude plugin validate --strict "$p"; done
然后运行
.github/workflows/check.yml
中的每个 demo、
node tests/test_record.mjs
,并在 renderer 设置好后运行
tests/smoke.py
和
tests/golden.py
。移交前所有检查都必须通过。不要提交;由维护者审查 diff 和
CHANGELOG.md
条目后提交。
对于现已修复的 GitHub issue,应主动提出用 changelog 行发表评论并关闭该 issue(
gh issue close <n> --comment "..."
),但必须先询问。

Never

禁止事项

  • Never edit a user's taste.md, taste.json, rules.json or suggestions.jsonl: they are theirs.
  • Never put personal data in the repo: no names, handles, emails, file names or footage from the feedback. Write the general rule and a synthetic example.
    tests/check_plugins.py
    fails on known private names; read every example before it goes in.
  • Never close the loop with a note alone. A rule with no enforcement and no test is not done.
  • 绝不编辑用户的 taste.md、taste.json、rules.json 或 suggestions.jsonl:这些文件属于用户。
  • 绝不将个人数据放入仓库:不得包含反馈中的姓名、账号名、邮箱、文件名或视频素材。写入通用规则和合成示例。
    tests/check_plugins.py
    会因已知的私密姓名而失败;每个示例加入前都要仔细阅读。
  • 绝不只靠一条备注来闭环。没有强制执行机制和测试的规则不算完成。

Files

文件

  • scripts/improve.py
    :
    mode
    ,
    collect
    ,
    log
    (maintainer mode only),
    demo
    . Reads only, except CHANGELOG.md.
  • ${CLAUDE_PLUGIN_ROOT}/lib/ai_editor/custom.py
    : the user's
    <library>/custom/
    folder (user mode writes there).
  • ${CLAUDE_PLUGIN_ROOT}/skills/taste/scripts/taste.py
    : where
    suggest
    and
    issue
    write the user side.
  • scripts/improve.py
    :提供
    mode
    、
    collect
    、
    log
    (仅限 maintainer 模式)和
    demo
    。除
    CHANGELOG.md
    外均为只读。
  • ${CLAUDE_PLUGIN_ROOT}/lib/ai_editor/custom.py
    :用户的
    <library>/custom/
    文件夹(user 模式会写入此处)。
  • ${CLAUDE_PLUGIN_ROOT}/skills/taste/scripts/taste.py
    :
    suggest
    和
    issue
    写入用户端内容的位置。