audit-skilly-workflow

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Audit 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.mjs
consumer: false
→ tell the user the
reason
, stop.
FieldHolds
sources
every instruction file:
owner
(
skilly
,
overlay
,
repo
,
global
),
loaded
(
always
,
on-demand
),
bytes
skills
name and description of each installed skill
tier
the repo's tier from
.skilly/config.json
; a
verify
step with its own
tier
runs only at that tier
gates
skilly commit gate values;
verify
stages (commit, push, ci, nightly) with their steps; other commit gates and naming linters found in config
findings
config defects:
kind
,
where
,
detail
report
file
to write;
ignored
says whether git ignores it
sh
node .agents/skills/audit-skilly-workflow/scripts/audit.mjs
consumer: false
→ 告诉用户
reason
,然后停止。
字段内容
sources
每个指令文件:
owner
(
skilly
、
overlay
、
repo
、
global
)、
loaded
(
always
、
on-demand
)、
bytes
skills
每个已安装skill的名称和描述
tier
来自
.skilly/config.json
的仓库层级;带有自己
tier
的
verify
步骤仅在该层级运行
gates
skilly提交门禁值;
verify
阶段(commit、push、ci、nightly)及其步骤;在配置中找到的其他提交门禁和命名linter
findings
配置缺陷:
kind
、
where
、
detail
report
要写入的
file
;
ignored
表示git是否忽略它

2. Confirm the findings

2. 确认发现

Open each finding at
where
. 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
处打开每个发现。误报(例如文本中标记为可选的路径)→ 丢弃它,并计数。当每个发现都被保留(附带一行修复)或丢弃时,完成。如果你在阅读时稍后发现配置缺陷 → 将其添加为保留的发现。

3. Extract claims

3. 提取声明

Read every source in full,
always
first. A skill description is a claim too: its trigger → use that skill. Read a full
SKILL.md
only when a source names that skill. Gate values and
gates.*.others
configs are claims with their own
file:line
.
Write each instruction as a claim: situation → required action, with
file:line
. Skip lines with no action.
  • Bad: "Delegation" (no action)
  • Good: "task finishes in one pass → no subagent" (
    .claude/rules/<bundle>-delegation.md:3
    )
An
overlay
merges with its base rule. Judge other sources against the merged rule, not the base alone.
Non-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.
完整阅读每个来源,先读
always
。skill描述也是一种声明:其触发器 → 使用该skill。仅在来源提到某个skill时,才阅读完整的
SKILL.md
。门禁值以及
gates.*.others
配置是带有自己的
file: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
    gates
    (text allows 90 chars, the gate allows 72)
  • an instruction to skip a gate (
    -n
    , a disabled hook) against that gate
  • a text that says when to run a check ("run the tests before each commit") against the
    gates.verify
    stage that runs it
  • a hook or CI job that runs a check itself instead of the
    verify
    stage
  • each entry in
    gates.*.others
    : read its config, compare its values with the skilly gate
Give each pair one kind:
KindTestReport
contradictionfollowing both at once is impossibleflag
restatementsame action in other words; drifts on the next editflag
overridean
overlay
changes its own base rule
show, never flag: the repo's sanctioned override
precedence statedone side says which source winsshow
complementdifferent situation, or both holddrop, 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"没有共享词汇,但仍然会冲突。
还要匹配:
  • 文本中的数字或列表与
    gates
    (文本允许90个字符,门禁允许72个)
  • 跳过门禁的指令(
    -n
    、禁用的hook)与对应门禁
  • 说明何时运行检查的文本("run the tests before each commit")与运行它的
    gates.verify
    阶段
  • 运行检查本身的hook或CI作业,而不是
    verify
    阶段
  • gates.*.others
    中的每个条目:读取其配置,将其值与skilly门禁进行比较
给每一对分配一种类型:
类型测试报告
contradiction同时遵循两者不可能标记
restatement相同操作换种说法;下次编辑时漂移标记
override
overlay
更改其自身基础规则
显示,绝不标记:仓库认可的覆盖
precedence stated一方说明哪个来源获胜显示
complement不同情境,或两者都成立丢弃,计数
值不同(限制、列表、模型名称)会使restatement变成contradiction。
当每个skilly声明都被匹配或标记为未匹配时,完成。

5. Name the fix owner

5. 确定修复负责人

Synced skilly files are overwritten on every sync.
Losing side lives inFix
owner: skilly
never edit in place. Repo deviates on purpose →
.claude/rules/<rule>.local.md
. Skilly is wrong → issue in
timschoch/skilly
owner: repo
delete the restatement and link the skilly rule, or rewrite to agree, or move a deliberate deviation into
.local.md
gate config (commitlint, lint, CI, hooks)one enforcer per rule; align values with the skilly gate
owner: global
the user edits it; propose the wording
a script findingthe file at
where
; one line of fix
同步的skilly文件在每次同步时都会被覆盖。
失败方位于修复
owner: skilly
绝不在原处编辑。仓库故意偏离 →
.claude/rules/<rule>.local.md
。Skilly有错 → 在
timschoch/skilly
中提交issue
owner: repo
删除restatement并链接skilly规则,或重写以保持一致,或将故意偏离移入
.local.md
门禁配置(commitlint、lint、CI、hooks)每条规则一个执行者;与skilly门禁对齐值
owner: global
用户编辑它;提出措辞
脚本发现位于
where
处的文件;一行修复

6. Write the report and stop

6. 编写报告并停止

Write one self-contained HTML file to
report.file
. 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.
Content:
  • flagged: contradictions, restatements, kept findings; each row both quotes with
    file:line
    , kind, fix owner
  • shown: overrides, precedence stated
  • counts: complements and dropped findings
  • sources read, with owner
report.ignored
is false → tell the user git does not ignore the report. Do not edit
.gitignore
.
In chat: the report path, counts per kind, and one numbered line per flagged item. Stop. Fix only the items the user picks.
将一个独立的HTML文件写入
report.file
。创建其目录。hook或沙盒阻止写入 → 告诉用户路径和阻止原因,停止。绝不将报告写到其他地方。
内容:
  • 标记的:矛盾、restatement、保留的发现;每一行同时引用
    file:line
    、类型、修复负责人
  • 显示的:override、precedence stated
  • 计数:complement和丢弃的发现
  • 读取的来源,带owner
report.ignored
为false → 告诉用户git不忽略该报告。不要编辑
.gitignore
。
在聊天中:报告路径、每种类型的计数,以及每个标记项目的一行编号。停止。只修复用户选择的项目。