cli-forge-validate

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

cli-forge Validate

cli-forge 验证

Use this stage when you need a compliance report for an existing Rust CLI Skill project, or when you have just scaffolded or extended one and need to verify the result.
当你需要为现有Rust CLI Skill项目生成合规报告,或者刚完成项目脚手架搭建、功能扩展后需要验证结果时,可使用该阶段。

When To Use This Stage

使用时机

  • The user explicitly asked for validation or compliance checking.
  • Scaffold work just finished and needs a verification pass.
  • Extension work just finished and needs a verification pass.
  • Description-stage work just finished and needs the downstream surfaces checked for alignment.
  • Publish-oriented work is requested, but validation is stale or missing.
  • 用户明确要求执行验证或合规检查时。
  • 脚手架搭建工作刚完成,需要执行验证环节时。
  • 功能扩展工作刚完成,需要执行验证环节时。
  • 描述阶段工作刚完成,需要检查下游输出是否对齐要求时。
  • 收到发布相关的工作需求,但验证结果已过期或缺失时。

Stage Goal

阶段目标

Produce a validation report that reflects the project's current state and makes the next action obvious.
生成可反映项目当前状态的验证报告,明确后续应执行的操作。

Canonical References

权威参考

  • ./instructions/validate.md
  • ./planning-brief.md
Read
instructions/validate.md
as the exact source of truth for the ruleset, the output table format, build checks, and runtime-convention checks.
  • ./instructions/validate.md
  • ./planning-brief.md
instructions/validate.md
是规则集、输出表格格式、构建检查、运行时约定检查的唯一事实来源,请优先阅读该文件。

Required Inputs

所需输入

  • project_path
  • project_path

Workflow

工作流程

  1. Run the pre-checks from
    ./instructions/validate.md
    : resolve the path, confirm it is a directory, and confirm
    Cargo.toml
    exists.
  2. Execute the documented validation rules in order, including:
    • structure
    • naming
    • dependencies and metadata
    • SKILL.md
      contract checks
    • build checks
    • runtime convention checks
    • repo-native release/install checks when the target repository adopts the publish asset pack
    • generated package boundary checks so package-local support assets are allowed only when enabled and repository-owned CI automation is not misclassified as generated output
  3. Return the report in the required markdown table shape with the requested summary.
  4. Classify the outcome:
    • compliant when all required checks pass
    • usable with warnings when only warning-level gaps fail
    • non-compliant when any error-level check fails
  5. Prepare the handoff:
    • compliant or reviewable-with-warnings results continue into
      publish
      so the workflow ends with final release-readiness or no-publish closure
    • non-compliant results route back to the earliest failing phase before later work resumes
  1. 运行
    ./instructions/validate.md
    中记录的前置检查:解析路径,确认路径对应目录,且目录下存在
    Cargo.toml
    文件。
  2. 按顺序执行已记录的验证规则,包括:
    • 项目结构
    • 命名规范
    • 依赖与元数据
    • SKILL.md
      契约检查
    • 构建检查
    • 运行时约定检查
    • 若目标仓库采用了发布资产包,还要执行仓库原生的发布/安装检查
    • 生成的包边界检查,确保仅在启用相关配置时才允许包本地支持资产,且仓库自有CI自动化脚本不会被误分类为生成输出
  3. 按照要求的markdown表格格式返回报告,并附上要求的摘要信息。
  4. 对结果进行分类:
    • 所有必填检查通过则为「合规」
    • 仅警告级别的检查未通过则为「可带警告使用」
    • 任意错误级别的检查未通过则为「不合规」
  5. 准备工作交接:
    • 合规或可带警告审阅的结果可进入
      publish
      阶段,工作流最终将确认是否已做好发布准备,或得出无需发布的结论
    • 不合规的结果将返回至最早出现失败的阶段,修复问题后再恢复后续工作

Guardrails

约束规则

  • Do not skip checks just because an earlier rule failed unless the instruction file explicitly says the remaining check would be impossible or misleading.
  • Preserve the exact reporting contract from the instruction file.
  • If failures point to broken scaffold fundamentals, route back to the earlier phase that owns those surfaces before claiming the workflow is done.
  • 除非说明文件明确指出剩余检查无法执行或会产生误导,否则不得因前面的规则执行失败就跳过后续检查。
  • 严格遵守说明文件中定义的报告契约格式。
  • 若失败原因是脚手架基础配置错误,需先返回负责该部分工作的前置阶段修复问题,再宣告工作流完成。

Done Condition

完成条件

This stage is complete only when the full validation report and summary have been produced for the current project state.
仅当针对项目当前状态生成了完整的验证报告和摘要后,该阶段才算完成。

Next Step

后续步骤

  • Continue with
    ../cli-forge-publish/SKILL.md
    after every successful validation pass. If no explicit release action was requested, enter
    publish
    in
    report_only
    mode.
  • Otherwise, route back to the earliest failing phase, fix the gaps there, and re-run validation.
  • 每次验证通过后,继续执行
    ../cli-forge-publish/SKILL.md
    对应的阶段。如果没有明确要求执行发布操作,则以
    report_only
    (仅报告)模式进入
    publish
    阶段。
  • 否则返回至最早出现失败的阶段,修复问题后重新运行验证。