repo-preflight
Overview / 概述
EN: repo-preflight is an agent-executable workflow for the last mile of GitHub publishing. It scans a repository for publish-blocking hygiene issues, produces a structured remediation report, and applies the approved fixes. It covers three flows:
中: repo-preflight 是一套 agent 可执行的 GitHub 发布收尾工作流:扫描仓库中的发布阻断性问题,产出结构化整改报告,并在用户确认后执行整改。共三条流程:
- publish — pre-publish health check and cleanup before pushing to GitHub / 首次推送 GitHub 前的体检与清理. Read
references/sop-publish.md. - retrofit — bring an existing local project up to open-source standards / 把存量本地项目改造到开源标准. Read
references/sop-retrofit.md. - audit — periodic re-check of an already-published repo / 对已发布仓库的定期复查. Read
references/sop-audit.md.
Core discipline / 核心纪律
EN:
- Run
scripts/scan.shfirst — never guess what needs fixing. - Report findings against the checklist in
references/checklist.md; propose fixes, do not apply them silently. - Execute irreversible operations (deleting files, rewriting history, pushing) only after explicit user confirmation.
- Secret scanning is delegated to gitleaks — do not reinvent it.
中:
- 先跑
scripts/scan.sh,绝不靠猜来判断要改什么。 - 对照
references/checklist.md出结构化报告;只提出整改建议,不静默执行。 - 不可逆操作(删文件、改写历史、推送)必须经用户明确确认后再执行。
- 密钥扫描委托给 gitleaks,不重造轮子。
Layout / 目录
references/checklist.md— check item definitions and pass criteria / 体检项定义与通过标准references/sop-*.md— step-by-step SOPs for each flow / 各流程的分步 SOPscripts/scan.sh— mechanizable checks (paths, file sizes, structure) / 可机械化扫描项templates/— README, LICENSE, CONTRIBUTING and other boilerplate / 社区规范件模板