Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add FirenzeClaw/kimi-session-orchestrator --skill loop-contract-from-docsgit clone --depth 1 https://github.com/FirenzeClaw/kimi-session-orchestratorWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/firenzeclaw/kimi-session-orchestrator/loop-contract-from-docs)<a href="https://agentmods.dev/skills/firenzeclaw/kimi-session-orchestrator/loop-contract-from-docs"><img src="https://agentmods.dev/badge/skills/firenzeclaw/kimi-session-orchestrator/loop-contract-from-docs/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/firenzeclaw/kimi-session-orchestrator/loop-contract-from-docs"><img src="https://agentmods.dev/badge/skills/firenzeclaw/kimi-session-orchestrator/loop-contract-from-docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00035 | $0.01663 |
| Opus 5.5 | $0.00014 | $0.00665 |
| Sonnet 5.5 | $0.00007 | $0.00333 |
| Haiku 4.5 | $0.00003 | $0.00166 |
Grade A, and why
loop-contract-from-docs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 128 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Loop Contract From Docs
概述
从已存在的项目文档生成严格循环编排用的 loop-contract.yaml。文档是事实来源;PM 不补写需求、不降低循环深度、不跳过生成后审计。
触发
- 用户调用
/loop-contract - PM 指定项目路径和文档集,要求从 SPEC/PRD/PLAN/TASK/设计文档生成 Loop Contract
- cron、复盘或验收流程需要把已有文档转换为 loop-orchestrator 的执行契约
先决条件
| 条件 | 门控 |
|---|---|
| 已给出项目路径或当前工作目录可作为项目根 | 否则先定位项目根 |
| 至少一份 SPEC/PRD/PLAN/TASK/设计文档可读 | 否则停止并要求补充文档 |
| 需要输出 Contract,而不是直接执行 loop-orchestrator | 否则切换到 loop-orchestrator |
硬门
| 硬门 | 处理 |
|---|---|
输出前必须 Read guide-contract-qa.md 并逐项审计 |
不通过则拒绝输出,修正后重新生成 |
loop_config.min_cycles >= 2 |
发现为 1 或缺失时立即修正 |
loop_config.degradation_detection: true |
缺失或 false 时立即修正 |
loop_config.verify.cross_model 必须不同于 PM session 当前模型 |
相同或未知时标记为需 PM 替换,不得伪造已验证 |
Contract 格式必须与 templates/loop-contract.yaml 保持一致 |
字段缺失时回到 Phase 4 |
operational_brakes 必须包含 no-progress、wall-time、context 阈值 |
缺失时回到 Phase 4 |
harness 必须声明 required_tools、allowed_paths、forbidden_paths、state_namespace、kill_switch |
缺失时回到 Phase 4 |
循环保障说明
Contract 必须内建以下保障,防止 Loop 退化为浅层执行:
min_cycles >= 2:至少完成两轮执行/验证循环,不能一轮就交付。consecutive_pass_required >= 2:修复后需要连续通过,不能单次 pass 即收尾。degradation_detection: true:每轮检测范围缩减、验证跳过、AC 省略等降级倾向。direction_baseline:每轮对照范围边界和不做事项,防止方向漂移。verify.cross_model:使用不同于 PM session 模型的交叉验证,降低同模型自我确认风险。operational_brakes:记录 no-progress、wall-time 和 context 阈值,触发后必须暂停处置。harness:声明工具、允许/禁止路径、状态命名空间和 kill switch,防止执行边界只靠自然语言。
Phase 1 — 文档侦察
Read guide-doc-analysis.md。
- 读取全部指定文档,记录文档类型和路径。
- 按
SPEC 接口定义 ↔ PLAN 实现步骤 ↔ TASK 粒度做交叉对照。 - 输出一致性报告:已覆盖、遗漏、矛盾点。
完成标准:已覆盖/遗漏/矛盾点三列均有结论;无文档时停止,不生成 Contract。
Phase 2 — 基准提取
- 提取 acceptance criteria,优先级为
SPEC AC章节 > PRD 验收条件 > PLAN 成功标准。 - 提取方向约束:范围边界、不做事项、接口契约、兼容性要求。
- Read
guide-complexity.md,按复杂度矩阵计算 level 和 factors。
完成标准:goal.acceptance_criteria、goal.direction_baseline、complexity.level、complexity.factors 均可填入模板。
Phase 3 — 循环深度判定
按 guide-complexity.md 的映射写入循环参数:
| complexity.level | loop_config |
|---|---|
low |
min_cycles: 2, consecutive_pass_required: 2, max_cycles: 4 |
medium |
min_cycles: 3, consecutive_pass_required: 2, max_cycles: 5 |
high |
min_cycles: 4, consecutive_pass_required: 3, max_cycles: 6 |
What ships with it
4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 128 lines · 35 tokens per session scan A 5f0f8afd6e26
loop-contract-from-docs is a skill published in the GitHub repository FirenzeClaw/kimi-session-orchestrator (0 stars, last pushed 3mo ago), licensed MIT. It adds 35 tokens to every session and 1,663 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
loop-contract-from-docs compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| loop-contract-from-docsFirenzeClaw/kimi-session-orchestrator | Skill | 0 | 3mo ago | MIT | A | 35 | Claude Code, Codex |
| migrating-world-v4-to-v5vercel/workflow | Skill | 2.6k | today | Apache-2.0 | A | 229 | Claude Code, Codex |
| workflowvercel/workflow | Skill | 2.6k | today | Apache-2.0 | A | 84 | Claude Code, Codex |
| migrating-workflow-v4-to-v5vercel/workflow | Skill | 2.6k | today | Apache-2.0 | A | 178 | Claude Code, Codex |
| migrating-to-workflow-sdkvercel/workflow | Skill | 2.6k | today | Apache-2.0 | A | 107 | Claude Code, Codex |
| workflow-initvercel/workflow | Skill | 2.6k | today | Apache-2.0 | A | 78 | Claude Code, Codex |
| internal-dev-workbenchvercel/workflow | Skill | 2.6k | today | Apache-2.0 | B | 122 | Claude Code, Codex |