agentsclimarketplace

Ledger contract

Skill Hypho/ledger-protocol/skills/ledger-contract

Use when phase=pid and PID Card exists. Generates behavior contract from PID Card with FC/NF entries, scope boundaries, and test coverage mapping.From its SKILL.md

Install
npx -y skills add Hypho/ledger-protocol --skill ledger-contract

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

1.9 KB, as published. Nobody here has run it

Ledger Contract — 行为契约生成

Overview

根据 PID Card 生成行为契约文件。

Entry Gate

bash .ledger/bin/ledger.sh guard contract

guard 失败则停止。

Pre-checks

PID Card 存在性: .ledger/specs/[功能名]-pid.md 必须存在。

PAD 占位符警告: 若 PAD.md 存在未填写字段,提示选择:继续 / 先完善 PAD。

PID 主流程映射完整性: PID 必须包含 PAD 业务主流程 Step、功能类型、成功后用户去向、架构影响、设计附件判断。缺失时提示补齐。

设计附件读取: 若 PID 声明需要设计附件,读取附件中的验收映射,转为 FC/NF 候选。

契约生成

参照 .ledger/templates/contract.md,根据 PID Card 生成:

  • FC 条目:核心路径 + 边界条件
  • NF 条目:性能、错误提示、交互反馈等
  • 流程约束:PAD 业务主流程 Step、成功后用户去向、状态变化
  • 体验一致性约束:继承 PAD 中相关的空状态、错误提示、权限不足等规则
  • 设计附件约束:吸收设计附件中的验收映射
  • 明确不做:PID Card 标注的范围外功能

粒度检查

按 constitution.md §12a 快速判定 + §12b 复杂度评分评估功能粒度。

若任一核心 FC 无法独立验证,必须补充验证方式或拆分功能。

输出路径:.ledger/contracts/[功能名].md

更新状态

bash .ledger/bin/ledger.sh state set-phase contract

完成输出

✅ Contract 生成:[功能名]
  FC 条目:[N] 个(正常路径 [N] / 边界 [N] / 次要 [N])
  NF 条目:[N] 个
  复杂度评分:[N] 分
  明确不做:[N] 项
→ 下一步:/ledger.build 或加载 ledger:ledger-build skill

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.