decision-prototype
Explicit-invocation Skill for building the smallest disposable logic or UI prototype that answers one design, interaction, state, or business-rule question and returns a supported, rejected, or uncert
Files16
View on GitHubSKILL.mdskills/decision-prototype/SKILL.md
GitHubEnglish
Permission Contract
These capability limits come from Skill metadata, not user authorization. Allowed capabilities remain subject to the user's authorized scope and stricter conditions in the instructions.
- Read files: only within authorized scope and this Skill's conditions.
- Write or modify files: only within authorized scope and this Skill's conditions.
- Run shell commands: only within authorized scope and this Skill's conditions.
- Access the network: prohibited.
- Perform destructive actions: prohibited. An explicit exception for isolated temporary artifacts applies only under all of its stated conditions; it does not grant general write or deletion permission.
Execution Contract
Default to standard; explicit invocation is required.
Complete one primary task by default. Continue an authorized end-to-end workflow within each Skill's permissions; Router remains recommendation-only. Pause for new material decisions or scope, not authorization already given.
For authorized multi-stage work, evidence reuse or recovery, read references/workflow-coordination.en.md; optionally use references/workflow-coordination.mjs and references/workflows.yaml. Provide manual handoff when host execution is unavailable.
For a human-only blocker, give location, action, success signal and resume step; never request secret values or assume completion.
Validate according to actual risk; security, production, migrations, releases and other high-risk work use audit. Read references/execution-modes.en.md only when mode selection is unclear.
Decision Prototype
A prototype is useful only when one declared question can change the next decision.
Branches and output modes
logic-prototype: exercise business rules, data shapes, or state transitions through a small runnable interface.ui-prototype: expose materially different information structures or interactions for visual comparison.fast: question, criterion, branch, run instruction, verdict, and disposition.standard(default): add authorized location, key states, evidence, limitations, and production handoff.audit: add permission record, command preflight/ledger, changed files, isolation evidence, and all uncertainties.
Read references/prototype-checklist.en.md only when designing states, deciding isolation, or preparing audit evidence.
Permission and production boundary
- Reuse existing authorization for the prototype location, behavior and local command scope; do not ask again for each preflighted command within that scope. Ask only for missing authorization or scope expansion. A request merely to discuss an idea does not authorize writes.
- Inspect repository instructions, framework, existing task runner, routing, component system, and safe scratch conventions before choosing a location.
- Mark every artifact
NON-PRODUCTION PROTOTYPE. Do not present it as tested, hardened, accessible, secure, maintainable, or complete production code. - By default do not connect a production database, use real credentials, send real external requests, mutate production data, deploy, publish, commit, or delete files.
- Use in-memory state, synthetic public-safe data, and local stubs. If the question genuinely concerns persistence or an external dependency, stop for a separately approved non-production environment and data boundary.
- Never install a dependency without explicit authorization. Prefer the existing runtime and components.
- Do not automatically delete prototype files. Recommend deletion, retention as evidence, or formal reimplementation; execute deletion only on a separate explicit request.
- For production work, route unsettled decisions/specifications to
requirements-clarificationafter clarification, missing sequencing tosafe-change-plan, settled feature delivery tofeature-implementation, and local fixes tosafe-fix-implementation. Reuse existing production authorization; ask only for missing scope.
Workflow
- State one validation question in a form the prototype can answer. Split or defer every second question.
- Define observable success criteria and what would count as rejection or uncertainty.
- Select
logic-prototypeorui-prototypefrom the evidence, and state the choice. - Inspect repository rules and confirm the explicitly authorized file location, command scope, and non-production isolation.
- Build the least code that is runnable and sufficient to exercise the criterion. Reuse existing tooling; avoid abstraction, polish, broad error handling, and unrelated cleanup.
- Surface the key states and results. Logic prototypes show inputs, transitions, and outcomes; UI prototypes show the materially different states or directions needed to decide.
- Run only preflighted commands and record observed results. Do not infer a successful run from compilation or appearance alone.
- Compare evidence with the success criteria and record the decision.
- Return exactly one verdict:
supported,rejected, oruncertain, with the evidence and remaining unknowns. - Recommend
delete,retain_as_evidence, orreimplement_for_production. Never equate keeping the prototype with production completion.
Stop conditions
Return Blocked for missing write authorization, unsafe location, unavailable runtime, required production access, real credentials/data, unapproved dependency installation, destructive cleanup, or a validation question too broad to answer with a minimal prototype.
Read execution boundaries. For code analysis, implementation or verification whose rules depend on the stack, consult language and runtime selection and apply only relevant component profiles. Routing, handoff and ordinary documentation work do not require language profiles.
Before editing user files or running test/build/diagnostic commands, read user workspace safety and apply relevant sections. Read-only analysis/review uses it when assessing authorization/business invariants, existing-data update semantics, validation isolation or edit conflicts; preserve this Skill's own permissions.
Output Contract
Lead with status, validation question, verdict, and recommended disposition.
prototype_type:logic-prototypeorui-prototypeoutput_mode:fast,standard, oraudit- Single validation question and success/rejection criteria
- Authorized location and
NON-PRODUCTION PROTOTYPEmarker - Key states, inputs, directions, and runnable command or interaction
- Changed files and observed result
- Verdict:
supported,rejected, oruncertain - Evidence, limitations, and unresolved uncertainty
- Production isolation and credential/data status
- Disposition:
delete,retain_as_evidence, orreimplement_for_production - Recommended next Repo Doctor Skill
Audit mode also includes exact permission and command ledgers. Never describe the prototype as production-ready.
When relevant, briefly state preserved authorization/business behavior, existing-data update evidence, validation target/isolation or unrun reason, and preexisting/concurrent edit protection. Unresolved safety gaps or edit conflicts keep affected work blocked/partial. Omit inapplicable fields and retain deferred-verification status.
简体中文
权限契约
以下能力边界来自 Skill 元数据,不构成用户授权;允许的能力仍须遵守用户授权范围和正文中更严格的条件。
- 读取文件:仅限已授权范围及本 Skill 的条件内。
- 写入或修改文件:仅限已授权范围及本 Skill 的条件内。
- 执行 Shell 命令:仅限已授权范围及本 Skill 的条件内。
- 访问网络:禁止。
- 执行破坏性操作:禁止。 正文明确规定的隔离临时产物例外仅适用于该例外的全部条件,不扩大为一般写入或删除权限。
执行契约
默认使用 standard;仅允许用户显式调用。
默认完成一个主任务。用户已授权完整流程时,在各 Skill 权限内连续完成;Router 仍只推荐。新重大决策或超出授权时暂停,不重复索取已有授权。
仅在已授权多阶段协作、证据复用或恢复时读取 references/workflow-coordination.zh-CN.md;按需使用 references/workflow-coordination.mjs 和 references/workflows.yaml,宿主不支持执行时提供人工交接。
必须由用户完成的阻塞步骤:给出操作位置、具体动作、成功标志、恢复步骤;不要求粘贴秘密值,不代替用户确认完成。
按实际风险选择验证;安全、生产、迁移、发布等高风险工作使用 audit。模式不明确时才读取 references/execution-modes.zh-CN.md。
Decision Prototype(决策原型验证)
只有一个明确问题能够改变下一决策时,原型才有价值。
分支与输出模式
logic-prototype:通过小型可运行接口验证业务规则、数据形态或状态转换。ui-prototype:展示结构或交互上有实质差异的方向,以便比较。fast:问题、判据、分支、运行指令、结论和处置建议。standard(默认):增加授权位置、关键状态、证据、限制和生产交接。audit:增加权限记录、命令预检/账本、改动文件、隔离证据和全部不确定项。
设计状态、判断隔离方式或准备 audit 证据时,才读取 references/prototype-checklist.zh-CN.md。
权限与生产边界
- 复用已有原型位置、行为和本地命令范围的授权,范围内已预检命令不逐条重复询问。仅在缺少授权或扩大范围时询问;仅讨论想法不等于写权限。
- 选择位置前检查仓库指令、框架、现有任务运行器、路由、组件体系和安全 scratch 约定。
- 每个产物都标记
NON-PRODUCTION PROTOTYPE。不得声称原型已经达到生产所需的测试、加固、无障碍、安全、可维护或完成状态。 - 默认不连接生产数据库、不使用真实凭证、不发送真实外部请求、不修改生产数据,也不部署、发布、commit 或删除文件。
- 使用内存状态、公开安全的合成数据和本地 stub。问题确实涉及持久化或外部依赖时,停止并要求单独批准非生产环境和数据边界。
- 未经明确授权不安装依赖,优先复用现有运行时与组件。
- 不自动删除原型文件。只建议删除、作为证据保留或正式重写;删除必须另行明确授权。
- 进入生产工作时,未闭合决策先澄清,缺少规格交给
requirements-clarification,缺少实施顺序交给safe-change-plan,已确认功能交给feature-implementation,局部修复交给safe-fix-implementation。复用已有生产授权,仅对缺失范围询问。
工作流程
- 写明一个可由原型回答的验证问题;第二个问题必须拆分或延期。
- 定义外部可观察的成功判据,以及何时算否定或仍不确定。
- 根据证据选择
logic-prototype或ui-prototype,并声明选择。 - 检查仓库规则,确认明确授权的文件位置、命令范围和非生产隔离。
- 使用最少代码构建可运行且足以检验判据的原型;复用现有工具,不做抽象、打磨、广泛异常处理或无关清理。
- 展示关键状态和结果。逻辑原型展示输入、转换和输出;UI 原型展示决策所需的实质差异状态或方向。
- 只运行经过预检的命令并记录观察结果;不得仅凭编译或外观推断运行成功。
- 把证据与成功判据对照,记录验证结论。
- 只返回一个结论:
supported、rejected或uncertain,同时给出证据和剩余未知。 - 建议
delete、retain_as_evidence或reimplement_for_production;保留原型绝不等于生产完成。
停止条件
缺少写权限、位置不安全、运行时不可用、需要生产访问、需要真实凭据/数据、需要未授权安装依赖、需要破坏性清理,或问题过宽无法由最小原型回答时,返回 Blocked。
读取执行边界。分析、实施或验证代码且检查规则依赖技术栈时,按需读取语言与运行时选择,仅应用相关组件规则。路由、交接和普通文档任务无需加载语言规则。
修改用户文件或运行测试、构建、诊断命令前,读取用户项目修改与验证安全并应用相关章节。只读分析/审查涉及权限与业务不变量、已有数据更新语义、验证隔离或编辑冲突时按需读取,保持本 Skill 自身权限。
输出契约
先给 status、验证问题、结论和建议处置。
prototype_type:logic-prototype或ui-prototypeoutput_mode:fast、standard或audit- 唯一验证问题及成立/否定判据
- 已授权位置和
NON-PRODUCTION PROTOTYPE标记 - 关键状态、输入、方向,以及可运行命令或交互方式
- 改动文件和观察结果
- 结论:
supported、rejected或uncertain - 证据、限制和剩余不确定性
- 生产隔离及凭据/数据状态
- 处置:
delete、retain_as_evidence或reimplement_for_production - 推荐的下一 Repo Doctor Skill
audit 模式还要包含准确权限与命令账本。不得把原型描述为生产就绪。
仅在相关时简述保留的权限/业务行为、已有数据更新依据、验证目标/隔离或未运行原因,以及已有/并发改动保护情况。未解决安全缺口或编辑冲突使受影响工作保持阻塞/部分完成。省略不适用字段,保留延期验证状态。