loop-contract-from-idea

loop-contract-from-idea is a skill for Claude Code, Codex from FirenzeClaw/kimi-session-orchestrator. It costs 41 tokens per session (2,099 once invoked), scanned A, original, MIT.

A guided process that turns a one-line product or engineering idea into a confirmed Loop Contract, a written set of goals, constraints, and acceptance checks for later automated work.

In plain words
What is it for?
Use it to clarify who the product is for, what it must do, its platform and technology constraints, and what it must not change before running a loop-based workflow.
Why use it?
It prevents unconfirmed assumptions from being treated as requirements. It also makes the intended scope and success conditions explicit before execution begins.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: names the AskUserQuestion tool.

Good fit Use it to clarify who the product is for, what it must do, its platform and technology constraints, and what it must not change before running a loop-based workflow.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/firenzeclaw/kimi-session-orchestrator/loop-contract-from-idea
Install

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.

Any agent
npx skills add FirenzeClaw/kimi-session-orchestrator --skill loop-contract-from-idea
Clone the repo
git clone --depth 1 https://github.com/FirenzeClaw/kimi-session-orchestrator

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for loop-contract-from-idea

README.md
[![agentmods](https://agentmods.dev/badge/skills/firenzeclaw/kimi-session-orchestrator/loop-contract-from-idea/github.svg)](https://agentmods.dev/skills/firenzeclaw/kimi-session-orchestrator/loop-contract-from-idea)
Your own site
<a href="https://agentmods.dev/skills/firenzeclaw/kimi-session-orchestrator/loop-contract-from-idea"><img src="https://agentmods.dev/badge/skills/firenzeclaw/kimi-session-orchestrator/loop-contract-from-idea/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.

agentmods 80×15 button for loop-contract-from-idea

Your own site · 80×15
<a href="https://agentmods.dev/skills/firenzeclaw/kimi-session-orchestrator/loop-contract-from-idea"><img src="https://agentmods.dev/badge/skills/firenzeclaw/kimi-session-orchestrator/loop-contract-from-idea.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,099 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00041 $0.02099
Opus 5 $0.00020 $0.01050
Sonnet 5 $0.00008 $0.00420
Haiku 4.5 $0.00004 $0.00210

Measured 8d ago against content hash 3a01bcd75fe8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

loop-contract-from-idea 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 8d 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.

skills/loop-contract-from-idea/SKILL.md · 194 lines

How it starts

The opening of the file, as written. The whole thing — 194 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Loop Contract From Idea — 一句话需求到严格循环契约

概述

此 skill 将一句话需求转换为 .kimi-tunnel/loop-contract.yaml。核心原则:先追问,再锁定基线,再生成 Contract;未确认的推断不得伪装成事实。

共享模板只引用,不复制:skills/loop-contract-from-docs/templates/loop-contract.yaml

何时使用

  • 用户调用 /loop-contract-new
  • PM 只有一句话需求,尚无可直接执行的 Loop Contract
  • 需要先从目标、约束、技术栈、方向边界推断 AC,并让用户确认后再进入循环编排

不用于用户已给出 SPEC/PLAN/PRD/TASK 文档集的场景。此时升级到 loop-contract-from-docs 路径。

加载即执行

Auto 检测

若系统提示含 Auto permission mode is active,用纯文本逐轮追问,不调用 AskUserQuestion。非 auto 模式可用结构化问题,但仍必须逐轮完成。

Phase 1 — 5 轮追问

加载 skills/loop-contract-from-idea/guide-clarify-chain.md,按顺序完成 Q1-Q5:

  1. Q1 最终目标:谁用、做什么、为什么重要。
  2. Q2 平台/环境约束:OS、浏览器、嵌入式、性能基线等。
  3. Q3 技术栈:语言、框架、数据库;用户明确“不限”时可跳过细化。
  4. Q4 方向约束:明确不做什么、不碰什么模块、不可降级边界。
  5. Q5 是否已有相关文档:若有文档,立即升级为 loop-contract-from-docs 路径继续,不再走 from-idea 推断。

硬门:Phase 1 不可跳过。即使用户回答不充分,也必须按 guide 的追问策略继续追问,直到达到每轮退出标准或明确记录“不足但已追问”。

完成标准:Q1-Q5 均有记录;Q5 已判定继续 from-idea 或升级 from-docs。

Phase 2 — 基线锁定

加载 skills/loop-contract-from-idea/guide-baseline-lock.md

  1. 从 Q1-Q4 推断 AC 草案,每条必须可验证。
  2. 从 Q4 和 Q1-Q3 的边界信息推断 direction_baseline
  3. 向用户展示“PM 推断的 AC 草案 + 方向基线草案”。
  4. 用户确认“是”后写入 Contract 草案,此后 PM 不得自行修改。
  5. 用户要求修改时,走变更流程:改草案 → 重新展示 → 重新确认 → 再锁定。

完成标准:AC 与 direction_baseline 均已锁定,且锁定依据能追溯到用户确认。

Phase 3 — 复杂度评估

基于 Q2-Q4 评估 complexity.levelcomplexity.factors

Level 判定线索 Loop 参数
low 单模块、无协议/DB/跨平台约束,AC 少于 4 条 min_cycles: 2, max_cycles: 4, consecutive_pass_required: 2
medium 2-3 个模块、存在接口/状态/兼容性约束 min_cycles: 3, max_cycles: 5, consecutive_pass_required: 2
high 跨系统/协议/DB schema/安全/性能基线,或方向约束严格 min_cycles: 4, max_cycles: 6, consecutive_pass_required: 3

完成标准:complexity.factors 至少 2 条;循环参数不得低于 low 的保障线。

Phase 4 — 生成 Contract

使用共享模板路径 skills/loop-contract-from-docs/templates/loop-contract.yaml 填充同格式 Contract,输出到 .kimi-tunnel/loop-contract.yaml

必须保持与 from-docs 格式一致:

meta:
  generated_by: loop-contract-from-idea
  generated_at: <ISO timestamp>
  source_docs:
    - user-input

goal:
  statement: "<一句话目标>"
  acceptance_criteria:
    - "<可验证条件>"
  direction_baseline:
    - "<范围边界>"
    - "<不做什么或不可降级边界>"

complexity:
  level: low | medium | high
  factors:
    - "<因素>"

loop_config:
  min_cycles: 2
  max_cycles: 5
  degradation_detection: true
  consecutive_pass_required: 2
  verify:
    primary: grade_step
    cross_model: <must-differ-from-pm-model>
    self_audit_rounds: 1

operational_brakes:
  max_repeated_actions: 1
  max_wall_time_minutes: 60
  context_tokens_threshold: 36000
  no_progress_escalation: "暂停当前轮 → 记录状态 → PM 诊断或退役接班"

harness:
  required_tools:
    - "kimi-session-orchestrator MCP"
    - "loop-orchestrator"
    - "grade_step"
  allowed_paths:
    - "<project-scope>"
  forbidden_paths:
    - "<out-of-scope>"
  state_namespace: "session/<loop-id>"
  kill_switch: "PM says stop, repeated no-progress, or delivery_gate cannot be made verifiable"

blockage_recovery:
  max_retries: 3
  strategies:
    - "xmind-orchestrated → 多视角分析"
    - "create_session(research) → 网络搜索或文档检索"
  escalation: "3 次仍阻塞 → 暂停并报告"

pm_duties:
  per_cycle:
    - "对照 direction_baseline 核查方向一致性"
    - "检测降级倾向:缩减范围/跳过验证/省略检查"
    - "检查 operational_brakes 是否触发"
  on_blockage:
    - "先诊断后决策"

delivery_gate:
  - min_cycles 满足
  - consecutive_pass_required 满足
  - direction_baseline 全部通过
  - operational_brakes 未触发或已完成 PM 处置
  - harness.allowed_paths / forbidden_paths 未被违反
  - PM 确认:方向一致且未发现降级

Read the full file on GitHub · 194 lines

Files

What ships with it

3 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.

Changes

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.

  1. 8d ago First seen · 194 lines · 41 tokens per session scan A 3a01bcd75fe8

Subscribe to this mod's changes

loop-contract-from-idea is a skill published in the GitHub repository FirenzeClaw/kimi-session-orchestrator (0 stars, last pushed 12d ago), licensed MIT. It adds 41 tokens to every session and 2,099 once invoked, about $0.0002 per session on Opus 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.

Related

Other skills, from other repositories

mp-implement

Use when the user provides any kind of feature spec (rough notes / system design / partial spec / canonical PRD) and wants it implemented end-to-end autonomously on Claude Code alone — no external execution engine — or invokes /mp-implement.

skywalkercyt/mp-implement · 54 tokens

recipe-create-meet-space

Create a Google Meet meeting space and share the join link.

googleworkspace/cli · 18 tokens

workthreads

SpecStory Workthreads - a weekly work-thread rollup across a team's repos from SpecStory coding histories (any agent - Claude Code, Codex, Cursor, Gemini, and more). It groups the window's sessions into threads of work per project and labels each new / open / recently closed, so a lead sees what shipped, what is still…

specstoryai/getspecstory · 126 tokens

atmos-config

Atmos root configuration: atmos.yaml discovery, precedence, deep merging, basepath, imports, minimal bootstrap, and routing to narrower Atmos skills.

cloudposse/atmos · 31 tokens

story-readiness

Validate that a story file is implementation-ready. Checks for embedded GDD requirements, ADR references, engine notes, clear acceptance criteria, and no open design questions. Produces READY / NEEDS WORK / BLOCKED verdict with specific gaps. Use when user says 'is this story ready', 'can I start on this story', 'is…

Donchitos/Claude-Code-Game-Studios · 77 tokens

autotask-creator

Rules for automation CRUD from the group-chat commander. The commander does not call mutation tools and does not edit cloud/autotasks files directly. It emits one or more top-level ... containers in its final text; the bus parses and applies them after the turn.

Orkas-AI/Orkas · 5 tokens