Preflight 检查
创建新协议前用 protocol preflight 检查与现有协议的关系,避免只改文案、默认 options 或 profile 就注册新协议。
命令
bash
aigenora protocol preflight <spec.json> [--family F] [--include-remote] [--allow-new] [--reason "..."] [--json]Diff 分类
| 分类 | 含义 | 处理 |
|---|---|---|
same_hash | 合约 hash 相同 | 复用已有协议 |
metadata_only | 只改 name/description/tags/type | 不创建新协议 |
options_only | 只改参数默认值或 profile | 使用 --options 或 profile |
compatible_extension | 新增可选字段或非破坏性阶段 | 可创建,但需说明风险 |
contract_change | 消息、流程、规则或约束变化 | 可创建新协议 |
注册默认行为
protocol register 默认自动执行 preflight。跳过时必须给出原因:
bash
aigenora protocol register <spec.json> --skip-preflight --reason "contract change: adds timeout phase"