Individual skill
release-preflight
Run the release hard-precondition gate before any tag/OTA — apc release preflight runs the real tier gate (run.ts), version alignment, and prisma regen check, all read-only. green(0) releasable · staged(3) fixable preconditions · blocked(1) tier red/env_blocked. No push, no write.
sdk/apc/skills/release-preflight/SKILL.md
Source commit f83b859a173802a73d978197e92328ab2bf57a6e
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Network or broad shell
- Last checked
- Nov 9, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 1,364
- Repository last updated
- Oct 22, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- agent-communication Repository topic
- agent-memory Repository topic
- ai-agents Repository topic
- claude Repository topic
- cursor Repository topic
- docker Repository topic
- knowledge-base Repository topic
- llm-tools Repository topic
- mcp Repository topic
- mcp-server Repository topic
- engineering Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 13,060 bytesSKILL.mdcore · 13,060 bytesSKILL.mdcore · 13,060 bytesskill.jsonasset · 8,498 bytes
Read excerpt
# release-preflight
发版最前面的**只读硬前置门**(`apc/01` §2 release-preflight,收口步 1/2/5)。它跑三道检查——**tier 门**(真跑 `run.ts`,读真退出码)、**版本对齐**(`/VERSION` ⇄ 承载文件)、**prisma regen**(源 schema ⇄ generated client 逐字节)——收敛成一个 `decision`。**全程只读 / 本地,不 push、不写库、不发版。**
**什么时候用**:任何 `release-tag` / `ota-promote` 之前的第一步。没跑过 preflight 拿到 green 就去 tag,是在拿没验过的栈发版。
## 承重纪律(发版 skill 的命根子,先记死)
- **`--tier` 必须显式传,没有默认值**。`TD`(桌面冒烟)在 `apps/desktop/e2e/smoke/` 无真跑 spec(`RUN_ELECTRON_SMOKE!=1` 时自动 `exit 77` skip)时会占位 `passed:0/failed:0`——单独拿它当发版硬前置是一道**不可能红**的空门(`apc/12` §0.12:之前 SKILL 范例全不带 `--tier` 让 agent 照抄默认值正是这么踩的坑)。**选一个会真执行断言的层**,例如 `--tier=T0,T1`。
- **tier 绿是发版的硬前置,"绿"必须是真跑过用例**。tier 红 / `env_blocked` / **空跑**(该轮所有 tier 的 `passed+failed` 合计为 0,一个用例都没真执行,即便 `exitCode` 是 0)⇒ `blocked`——发版根本不该起步,preflight 直接拦在这里。**别把 tier 红当成"发版流程的问题"绕过去**:那是被测栈的红,先修栈;也别挑一个恰好全 skip 的层去骗过门。
- **preflight 只诊断,不修**。版本失配 / prisma 待重生是 `staged`(可修前置),它给你 fix-hint(`sdk/build/version.sh` / `npm run prisma:generate:all`),**由你或人去修**,preflight 不代跑。
- **这是只读门**:它不碰 prod、不碰远端、不 push。prod 红线由 `release-tag` / `ota-promote` 的人闸把守,preflight 不涉及。
## Anti-pattern(这些做法直接判红)