coding-guidelines-verify
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCoding guidelines verifier
编码规范验证器
Goal
目标
Validate that changes follow the nearest nested :
AGENTS.md- default: changed files only
- default: auto-fix formatting before lint/tests
- monorepo-aware: each module’s is the source of truth for that scope
AGENTS.md
验证变更符合最近嵌套的要求:
AGENTS.md- 默认:仅检查变更文件
- 默认:在执行lint/测试前自动修复格式问题
- 支持monorepo:每个模块的是该作用域的唯一可信规则源
AGENTS.md
Workflow (checklist)
工作流(检查清单)
- Collect changed files (staged + unstaged + untracked).
- For each changed file, find the nearest parent .
AGENTS.md- If a file has no scoped , report it (suggest running
AGENTS.md).coding-guidelines-gen
- If a file has no scoped
- Parse the block (schema:
codex-guidelines).references/verifiable-block.md - Run, per scope:
- format (auto-fix) -> lint -> tests
- apply simple forbid rules (globs/regex) from the block
- Produce a short compliance report (template: ).
references/report-template.md
- 收集变更文件(暂存区 + 未暂存 + 未跟踪文件)。
- 为每个变更文件查找最近的父级。
AGENTS.md- 如果文件没有对应作用域的,上报该情况(建议运行
AGENTS.md)。coding-guidelines-gen
- 如果文件没有对应作用域的
- 解析块(模式参考:
codex-guidelines)。references/verifiable-block.md - 按每个作用域执行以下操作:
- 格式化(自动修复)-> lint -> 测试
- 应用规则块中定义的简单禁用规则(globs/正则表达式)
- 生成简洁的合规报告(模板:)。
references/report-template.md
Automation
自动化
Use to group scopes, run commands, and report results.
scripts/verify_guidelines.py- If is not available or the script fails, tell the user and ask whether to install Python or proceed with a manual per-scope verification.
python
使用完成作用域分组、命令执行和结果上报。
scripts/verify_guidelines.py- 如果不可用或者脚本运行失败,告知用户并询问是安装Python还是手动执行逐作用域验证。
python
Deliverable
交付产物
Provide:
- The per-scope compliance report (use ).
references/report-template.md - Any auto-fix formatting changes applied.
- Lint/test commands run and their results, plus any violations.
需提供:
- 按作用域划分的合规报告(使用模板)。
references/report-template.md - 所有已应用的自动格式修复变更。
- 执行过的lint/测试命令及其结果,以及所有违规情况。