repo-standard
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineserepo-standard
repo-standard
The verify side of . The canonical list lives in
STANDARD.md; every verdict traces to it. Do not grade from memory.
startup这是的验证环节。标准清单位于STANDARD.md;所有判定均需以此为依据,不得凭记忆评分。
startupWorkflow
工作流程
-
Find the profile. Readfor the
docs/repo-standard.mdline. If the file is missing, generate it (see "Generate the checklist") and pick the profile with the user: web-app, service, cli-tool, bot, or content.Profile: -
Run the audit. From the repo root:bash
bash <path-to-this-skill>/scripts/audit.sh "<repo-root>"It prints PASS, FAIL, NA, JUDGE, DRIFT, and INFO lines for the deterministic checks. -
Resolve the JUDGE items yourself against STANDARD.md: C9 (is the domain non-trivial enough to need a glossary?), CI2 (is the integration mode declared in AGENTS.md and followed?), S1 (is external input handled safely?). These need reading, not a grep.
-
Reconcile drift. If the audit prints DRIFT, the repo stamp is behind the current standard version. Re-evaluate the new items, update, and bump its
docs/repo-standard.mdandStandard: vN.Last reconciled -
Report. Always end with a single results table so the repo's state is readable at a glance, whether or not it passed. One row per check the audit emitted (fold each resolved JUDGE into its row with the verdict). Columns:
Status ID Check Notes ✅ pass C1 AGENTS.md with Commands ❌ fail C7 .env.example present code reads env vars but no .env.example; fix: add it listing required keys ➖ N/A E5 docs/adr pure tool, no non-trivial decisions yet Rules for the table:- Status glyphs: ✅ pass, ❌ fail, ➖ N/A, 🔶 drift. Resolve every JUDGE to ✅ or ❌ first (step 3) so no row is left as "judge".
- Every ❌ must say why it failed and the one-line fix from STANDARD.md.
- N/A rows must carry their one-line reason.
- Order: failures and drift first, then the rest. Above the table, give a one-line verdict (e.g. "12/12 applicable green" or "2 gaps"). Below it, offer to fix the mechanical failures now; do not edit unless asked.
-
确定配置文件:读取中的
docs/repo-standard.md行。若该文件缺失,则生成它(参见“生成检查清单”),并与用户确认配置文件类型:web-app(Web应用)、service(服务)、cli-tool(命令行工具)、bot(机器人)或content(内容)。Profile: -
执行审核:从仓库根目录执行以下命令:bash
bash <path-to-this-skill>/scripts/audit.sh "<repo-root>"该脚本会针对确定性检查输出PASS(通过)、FAIL(失败)、NA(不适用)、JUDGE(需人工判定)、DRIFT(偏离)和INFO(信息)行。 -
自行判定JUDGE项:对照STANDARD.md处理JUDGE项:C9(领域是否足够复杂,需要术语表?)、CI2(集成模式是否在AGENTS.md中声明并遵循?)、S1(外部输入是否得到安全处理?)。这些项需要人工阅读,而非通过 grep 检查。
-
协调偏离问题:若审核输出DRIFT,说明仓库标记落后于当前标准版本。重新评估新增项,更新,并升级其
docs/repo-standard.md版本号和Standard: vN(最后协调时间)。Last reconciled -
生成报告:最终必须输出一个汇总结果表格,让仓库状态一目了然,无论是否通过审核。审核输出的每一项对应表格中的一行(将已判定的JUDGE项归入对应行并标注结果)。表格列如下:
状态 ID 检查项 备注 ✅ 通过 C1 包含Commands的AGENTS.md ❌ 失败 C7 存在.env.example 代码读取环境变量但未提供.env.example;修复方案:添加该文件并列出所需的密钥 ➖ 不适用 E5 docs/adr 纯工具类仓库,暂无重大决策需记录 表格规则:- 状态图标:✅ 通过,❌ 失败,➖ 不适用,🔶 偏离。需先完成步骤3,将所有JUDGE项判定为✅或❌,表格中不得保留“judge”状态。
- 所有❌项必须说明失败原因及STANDARD.md中的单行修复方案。
- 不适用项需附带单行原因说明。
- 排序:先显示失败和偏离项,再显示其他项。 在表格上方给出单行结论(例如“12/12适用项全部通过”或“存在2个缺口”)。表格下方可主动提出修复机械性失败项,但需等待用户请求后再进行编辑。
Generate the checklist
生成检查清单
When is missing, copy
checklist-template.md to ,
substitute (repo dir name), , (from
STANDARD.md), and (today), and keep only the profile block that
matches. Mark items already satisfied as done. This is what calls.
docs/repo-standard.mddocs/repo-standard.md{{REPO}}{{PROFILE}}{{VERSION}}{{DATE}}startup当缺失时,将checklist-template.md复制到,替换(仓库目录名)、、(取自STANDARD.md)和(当前日期),并仅保留匹配的配置文件区块。将已满足的项标记为已完成。这正是调用的流程。
docs/repo-standard.mddocs/repo-standard.md{{REPO}}{{PROFILE}}{{VERSION}}{{DATE}}startupRules
规则
- Every verdict traces to STANDARD.md, never memory.
- The audit is presence-and-config only. Never run the validation pipeline (typecheck, lint, test, build) or any heavy command to verify it is "green"; that is CI's job. Check that the repo is wired up to run it, not that it passes.
- Report gaps, do not auto-fix unless the user asks.
- Counts toward "complete" only when every applicable item is done; N/A needs a one-line reason.
- Precision over coverage: a check you cannot run reliably is JUDGE, not a wrong confident verdict.
- 所有判定必须以STANDARD.md为依据,不得凭记忆。
- 审核仅检查存在性和配置情况。不得运行验证流水线(类型检查、代码扫描、测试、构建)或任何重型命令来验证其是否“正常运行”;这是CI的职责。只需检查仓库是否已配置好运行这些流程,无需确认其是否通过。
- 仅报告缺口,除非用户要求,否则不得自动修复。
- 只有当所有适用项均已完成时,才算“完成”;不适用项需附带单行原因说明。
- 优先保证准确性而非覆盖率:若无法可靠执行某项检查,则标记为JUDGE,不得给出错误的确定性判定。