repo-standard

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

repo-standard

repo-standard

The verify side of
startup
. The canonical list lives in STANDARD.md; every verdict traces to it. Do not grade from memory.
这是
startup
的验证环节。标准清单位于STANDARD.md;所有判定均需以此为依据,不得凭记忆评分。

Workflow

工作流程

  1. Find the profile. Read
    docs/repo-standard.md
    for the
    Profile:
    line. 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.
  2. 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.
  3. 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.
  4. Reconcile drift. If the audit prints DRIFT, the repo stamp is behind the current standard version. Re-evaluate the new items, update
    docs/repo-standard.md
    , and bump its
    Standard: vN
    and
    Last reconciled
    .
  5. 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:
    StatusIDCheckNotes
    ✅ passC1AGENTS.md with Commands
    ❌ failC7.env.example presentcode reads env vars but no .env.example; fix: add it listing required keys
    ➖ N/AE5docs/adrpure 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.
  1. 确定配置文件:读取
    docs/repo-standard.md
    中的
    Profile:
    行。若该文件缺失,则生成它(参见“生成检查清单”),并与用户确认配置文件类型:web-app(Web应用)、service(服务)、cli-tool(命令行工具)、bot(机器人)或content(内容)。
  2. 执行审核:从仓库根目录执行以下命令:
    bash
    bash <path-to-this-skill>/scripts/audit.sh "<repo-root>"
    该脚本会针对确定性检查输出PASS(通过)、FAIL(失败)、NA(不适用)、JUDGE(需人工判定)、DRIFT(偏离)和INFO(信息)行。
  3. 自行判定JUDGE项:对照STANDARD.md处理JUDGE项:C9(领域是否足够复杂,需要术语表?)、CI2(集成模式是否在AGENTS.md中声明并遵循?)、S1(外部输入是否得到安全处理?)。这些项需要人工阅读,而非通过 grep 检查。
  4. 协调偏离问题:若审核输出DRIFT,说明仓库标记落后于当前标准版本。重新评估新增项,更新
    docs/repo-standard.md
    ,并升级其
    Standard: vN
    版本号和
    Last reconciled
    (最后协调时间)。
  5. 生成报告:最终必须输出一个汇总结果表格,让仓库状态一目了然,无论是否通过审核。审核输出的每一项对应表格中的一行(将已判定的JUDGE项归入对应行并标注结果)。表格列如下:
    状态ID检查项备注
    ✅ 通过C1包含Commands的AGENTS.md
    ❌ 失败C7存在.env.example代码读取环境变量但未提供.env.example;修复方案:添加该文件并列出所需的密钥
    ➖ 不适用E5docs/adr纯工具类仓库,暂无重大决策需记录
    表格规则:
    • 状态图标:✅ 通过,❌ 失败,➖ 不适用,🔶 偏离。需先完成步骤3,将所有JUDGE项判定为✅或❌,表格中不得保留“judge”状态。
    • 所有❌项必须说明失败原因及STANDARD.md中的单行修复方案
    • 不适用项需附带单行原因说明。
    • 排序:先显示失败和偏离项,再显示其他项。 在表格上方给出单行结论(例如“12/12适用项全部通过”或“存在2个缺口”)。表格下方可主动提出修复机械性失败项,但需等待用户请求后再进行编辑。

Generate the checklist

生成检查清单

When
docs/repo-standard.md
is missing, copy checklist-template.md to
docs/repo-standard.md
, substitute
{{REPO}}
(repo dir name),
{{PROFILE}}
,
{{VERSION}}
(from STANDARD.md), and
{{DATE}}
(today), and keep only the profile block that matches. Mark items already satisfied as done. This is what
startup
calls.
docs/repo-standard.md
缺失时,将checklist-template.md复制到
docs/repo-standard.md
,替换
{{REPO}}
(仓库目录名)、
{{PROFILE}}
{{VERSION}}
(取自STANDARD.md)和
{{DATE}}
(当前日期),并仅保留匹配的配置文件区块。将已满足的项标记为已完成。这正是
startup
调用的流程。

Rules

规则

  • 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,不得给出错误的确定性判定。