The output产物

What a distilled skill looks like.蒸出来的 skill 长什么样。

A whetstone skill is a portable, runtime-neutral package: a SKILL.md the runtime selects on, platform values fenced into params/<platform>.md, and pitfalls split out. Every example on this page is a generic placeholder — real skills carry your own platform values and stay in a private repo. whetstone 的 skill 是一个可移植、跟 runtime 无关的包:一份 runtime 据以挑选的 SKILL.md,隔离到 params/<platform>.md 的平台值,以及单独拆出来的坑库。本页所有例子都是通用占位 —— 真实 skill 带着你自己的平台值,放在私有仓里。

3files per package个文件 / 包
L1–L4layers, by how far knowledge carries按知识能走多远分层
1params file per platform个平台一份 params
0runtime dependencies运行时依赖
Anatomy结构

Three files. One of them is the only thing you swap.三个文件,换平台只换其中一个。

verified-boot/ a generic example package一个通用示例包

SKILL.md

selection + the reusable body供挑选的入口 + 可复用的正文
L1 · principle原理

OTP writes are irreversible; dump the bytes before you burn.OTP 烧入不可逆,烧之前先 dump 字节。

L2 · method做法

Signature check fails? Compare both hashes byte by byte.验签不过?两端 hash 逐字节比。

body loads only when the skill is picked正文只在被选中时加载

params/

L3 values — the swap pointL3 平台值 —— 换平台就换这里
soc-a.md

OTP[ADDR] · RSA-N · sign-x

soc-b.md

OTP[ADDR'] · RSA-M · sign-y

+ soc-c.md ← a new platform is one new file← 新平台就是新加一个文件

pitfalls.md

every pitfall split in two每个坑都拆成两半
!symptom: verify passes on one board, fails on the next现象:一块板验签通过,下一块失败
L2lesson: size buffers from the key, not from the last key教训:缓冲区按当前密钥定长,别按上一把
L3fact → params/soc-b.md事实 → params/soc-b.md
provenance on every entry每条都带溯源

来源 · 日期 · 复现记录 · 验证方式 · 置信度

Layer层What it is是什么When you change platform换平台时
L1principle / invariant — holds on any platform原理 / 不变量 —— 任何平台成立unchanged不动
L2method / procedure / transferable lesson做法 / 流程 / 可迁移的教训unchanged不动
L3platform values: addresses, sizes, branch names平台值:地址、尺寸、分支名add one params file加一份 params
L4session state — changes next run会话状态 —— 下次就变never stored in the package不进包
Archetypes类型

The kinds of skills people distill.能蒸出哪几类 skill。

Generic capability types. Your distilled versions keep the real values in params/.通用的能力类型。你蒸出来的版本把真实值放在 params/ 里。

Verification验证

Trust-chain verification信任链验签

Secure-boot first stage, AVB, download and OTA verification — who verifies whom, why each parameter has its value, and caution around irreversible fuses.安全启动一级验签、AVB、下载验签、OTA 验签 —— 谁验谁、每个参数为什么是这个值、不可逆熔丝要多小心。

L3 · OTP[ADDR] · RSA-N · SoC-X
Diagnosis诊断

Boot-chain observability启动链可观测性

Stage-tagged logs, dump before a decision, read back after a write, byte snapshots before and after — find where a boot hangs over UART, without a debugger.统一的阶段标记、决策前先 dump、写完立刻读回、前后字节快照 —— 没有调试器时,靠 UART 定位卡在哪一级。

L3 · stage prefixes · field addresses
Migration迁移

Vendor SDK migration厂商 SDK 迁移

Three-way compare, conflict classes (bulk / manual / redesign), a reusable library of conflict patterns, and a compile-then-correct loop that carries across versions.三方对比、冲突分类(批量 / 人工 / 重新设计)、可复用的冲突模式库、编译后逐轮自纠 —— 跨版本复用。

L3 · SDK vN → vN+1 · branch names
Layout布局

Partition / GPT layout分区 / GPT 布局

Grow, add or remove partitions: recompute offsets, both A/B slots, the dynamic-partition container, and the OTA-incompatible “change it all once, before ship”.扩、增、删分区:重算 offset、A/B 两个槽、动态分区容器,以及跟 OTA 不兼容所以「出货前一次改完」。

L3 · partition table · sizes · SoC-X
Usage用法

How to use one.怎么用一个 skill。

  1. 1

    Trigger it触发

    Say what you're doing in words its description covers; the runtime matches the description and loads the body.用它 description 里覆盖到的说法描述你在做的事,runtime 按 description 匹配后加载正文。

  2. 2

    Swap platform换平台

    New chip or SDK version → add one params/<platform>.md. The L1/L2 body stays put.换芯片或 SDK 版本 → 加一份 params/<platform>.md,L1/L2 正文不动。

  3. 3

    Keep it honest and findable保持可信、好找

    After adding or editing a skill: whetstone verify (evidence), whetstone lint (menu overlaps) and whetstone index (grouped catalog).新增或修改 skill 后跑:whetstone verify(证据)、whetstone lint(菜单重叠)、whetstone index(分组目录)。

  4. 4

    Move machines换机器

    Keep real skills in a private repo; clone and deploy into the runtime's skills folder. How the layering works →真实 skill 放私有仓,clone 后 deploy 进 runtime 的 skills 目录。分层是怎么设计的 →

Distill your next feature into one.把你下一个功能蒸成一个 skill。