audit-skilly-workflow
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAudit skilly workflow
审计 skilly 工作流
The harness loads every instruction file side by side. No file wins by default: on a conflict the agent follows either one. This audit finds those conflicts between skilly-installed files and everything else, and reports them. It edits nothing.
该harness会并排加载每个指令文件。默认情况下没有文件胜出:发生冲突时,agent会遵循其中任意一个。此审计找出skilly安装的文件与其他所有文件之间的冲突,并报告它们。它不会编辑任何内容。
1. Run the script
1. 运行脚本
sh
node .agents/skills/audit-skilly-workflow/scripts/audit.mjsconsumer: falsereason| Field | Holds |
|---|---|
| every instruction file: |
| name and description of each installed skill |
| the repo's tier from |
| skilly commit gate values; |
| config defects: |
| |
sh
node .agents/skills/audit-skilly-workflow/scripts/audit.mjsconsumer: falsereason| 字段 | 内容 |
|---|---|
| 每个指令文件: |
| 每个已安装skill的名称和描述 |
| 来自 |
| skilly提交门禁值; |
| 配置缺陷: |
| 要写入的 |
2. Confirm the findings
2. 确认发现
Open each finding at . A false positive (e.g. a path the text names as optional) → drop it, count it. Done when every finding is kept with a one-line fix or dropped. A config defect you spot later while reading → add it as a kept finding.
where在处打开每个发现。误报(例如文本中标记为可选的路径)→ 丢弃它,并计数。当每个发现都被保留(附带一行修复)或丢弃时,完成。如果你在阅读时稍后发现配置缺陷 → 将其添加为保留的发现。
where3. Extract claims
3. 提取声明
Read every source in full, first. A skill description is a claim too: its trigger → use that skill. Read a full only when a source names that skill. Gate values and configs are claims with their own .
alwaysSKILL.mdgates.*.othersfile:lineWrite each instruction as a claim: situation → required action, with . Skip lines with no action.
file:line- Bad: "Delegation" (no action)
- Good: "task finishes in one pass → no subagent" ()
.claude/rules/<bundle>-delegation.md:3
An merges with its base rule. Judge other sources against the merged rule, not the base alone.
overlayNon-skilly sources over 150 KB in total → split them into a few batches of similar size, one subagent per batch, model and effort per the repo's model rule. Pass each the skilly claim list; it returns matched pairs only.
Done when every source has its claims.
完整阅读每个来源,先读。skill描述也是一种声明:其触发器 → 使用该skill。仅在来源提到某个skill时,才阅读完整的。门禁值以及配置是带有自己的的声明。
alwaysSKILL.mdgates.*.othersfile:line将每条指令写成声明:情境 → 所需操作,附。跳过没有操作的代码行。
file:line- 错误:"Delegation"(无操作)
- 正确:"task finishes in one pass → no subagent"()
.claude/rules/<bundle>-delegation.md:3
overlay非skilly来源总计超过150 KB → 将它们分成几个大小相近的批次,每个批次一个子代理,模型和精力遵循仓库的模型规则。将skilly声明列表传递给每个子代理;它只返回匹配的对。
当每个来源都有其声明时,完成。
4. Match and judge
4. 匹配并判断
Match every skilly claim against every other claim by situation, never by shared words. "Stage the work and stop" and "push and open the PR once it is ready" share no word and still collide.
Also match:
- a number or list in text against (text allows 90 chars, the gate allows 72)
gates - an instruction to skip a gate (, a disabled hook) against that gate
-n - a text that says when to run a check ("run the tests before each commit") against the stage that runs it
gates.verify - a hook or CI job that runs a check itself instead of the stage
verify - each entry in : read its config, compare its values with the skilly gate
gates.*.others
Give each pair one kind:
| Kind | Test | Report |
|---|---|---|
| contradiction | following both at once is impossible | flag |
| restatement | same action in other words; drifts on the next edit | flag |
| override | an | show, never flag: the repo's sanctioned override |
| precedence stated | one side says which source wins | show |
| complement | different situation, or both hold | drop, count |
A value that differs (limit, list, model name) makes a restatement a contradiction.
Done when every skilly claim is matched or marked unmatched.
将每个skilly声明与其他每个声明按情境匹配,绝不按共享词汇匹配。"Stage the work and stop"和"push and open the PR once it is ready"没有共享词汇,但仍然会冲突。
还要匹配:
- 文本中的数字或列表与(文本允许90个字符,门禁允许72个)
gates - 跳过门禁的指令(、禁用的hook)与对应门禁
-n - 说明何时运行检查的文本("run the tests before each commit")与运行它的阶段
gates.verify - 运行检查本身的hook或CI作业,而不是阶段
verify - 中的每个条目:读取其配置,将其值与skilly门禁进行比较
gates.*.others
给每一对分配一种类型:
| 类型 | 测试 | 报告 |
|---|---|---|
| contradiction | 同时遵循两者不可能 | 标记 |
| restatement | 相同操作换种说法;下次编辑时漂移 | 标记 |
| override | | 显示,绝不标记:仓库认可的覆盖 |
| precedence stated | 一方说明哪个来源获胜 | 显示 |
| complement | 不同情境,或两者都成立 | 丢弃,计数 |
值不同(限制、列表、模型名称)会使restatement变成contradiction。
当每个skilly声明都被匹配或标记为未匹配时,完成。
5. Name the fix owner
5. 确定修复负责人
Synced skilly files are overwritten on every sync.
| Losing side lives in | Fix |
|---|---|
| never edit in place. Repo deviates on purpose → |
| delete the restatement and link the skilly rule, or rewrite to agree, or move a deliberate deviation into |
| gate config (commitlint, lint, CI, hooks) | one enforcer per rule; align values with the skilly gate |
| the user edits it; propose the wording |
| a script finding | the file at |
同步的skilly文件在每次同步时都会被覆盖。
| 失败方位于 | 修复 |
|---|---|
| 绝不在原处编辑。仓库故意偏离 → |
| 删除restatement并链接skilly规则,或重写以保持一致,或将故意偏离移入 |
| 门禁配置(commitlint、lint、CI、hooks) | 每条规则一个执行者;与skilly门禁对齐值 |
| 用户编辑它;提出措辞 |
| 脚本发现 | 位于 |
6. Write the report and stop
6. 编写报告并停止
Write one self-contained HTML file to . Create its directory. A hook or sandbox blocks the write → tell the user the path and the block, stop. Never write the report somewhere else.
report.fileContent:
- flagged: contradictions, restatements, kept findings; each row both quotes with , kind, fix owner
file:line - shown: overrides, precedence stated
- counts: complements and dropped findings
- sources read, with owner
report.ignored.gitignoreIn chat: the report path, counts per kind, and one numbered line per flagged item. Stop. Fix only the items the user picks.
将一个独立的HTML文件写入。创建其目录。hook或沙盒阻止写入 → 告诉用户路径和阻止原因,停止。绝不将报告写到其他地方。
report.file内容:
- 标记的:矛盾、restatement、保留的发现;每一行同时引用、类型、修复负责人
file:line - 显示的:override、precedence stated
- 计数:complement和丢弃的发现
- 读取的来源,带owner
report.ignored.gitignore在聊天中:报告路径、每种类型的计数,以及每个标记项目的一行编号。停止。只修复用户选择的项目。