可视化 Contract 交互设计
contract-designer
设计可视化 Contract 集中的交互部分。
- License 许可
- MIT
- 所属仓库
- microsoft/Tandem
- 最近更新
- 2026-11-02
- Stars
- ★ 9
- Forks
- 1
01 前言 Front Matter
- name
- contract-designer
- description
- Design the interaction portion of the visual Contract set.
- user-invocable
- false
02 资源文件 3
- 参考文档references/setup.md2.7 KB
- 脚本scripts/convert_excel_to_md.py13.8 KB
- 脚本scripts/requirements.txt24 B
03 SKILL.md 正文
Contract Designer
Explain how the major use cases are implemented between components or external actors. The Contract page is a set of related contracts, not one protocol and not one skill per tab.
Emit exactly contract-set/v1; do not add, remove, rename, or improvise fields:
contract
├─ schemaVersion: "contract-set/v1"
├─ title
├─ context
├─ participants[]: { id, name, responsibility }
├─ interactions[]
│ ├─ id
│ ├─ name
│ ├─ kind: command | query | event | stream
│ ├─ fromParticipantId
│ ├─ toParticipantId
│ ├─ input: { name, description }
│ ├─ output: { name, description }
│ ├─ errors[]: { code, meaning }
│ └─ guarantees[]: { id, statement }
├─ storageContracts[]
│ └─ output from `storage-contract-designer`, or [] when no stored state exists
└─ lifecycleRules[]: { id, statement }
Define two to six participants and one to seven important interactions. IDs and error codes are
stable lowercase kebab-case identifiers; labels and descriptions are user-facing. Participant
references use IDs, never names. Use the interaction kind by semantics: command changes state,
query reads state, event announces a fact, and stream carries an ongoing sequence.
Each interaction has exactly one input and output object, zero to three important errors, and one
to three guarantees. Add no more than four material ordering, state, or lifecycle rules. Every Use
case step references an interaction ID. Use compact phrases suitable for a visual protocol map. Do
not hide unresolved choices inside a seemingly final contract. Do not improvise storage fields;
use storage-contract-designer when memory, database, file, object-store, or cache state matters.
Although IDs remain technical and stable, every visible participant name, interaction name, description, error meaning, and guarantee must be understandable to a non-experienced reviewer. Name components by their product role, explain what crosses each boundary in everyday language, and avoid unexplained acronyms or transport-specific jargon.
For a CLI entry interaction, use a compact representative invocation such as
todo-scan <path> [options] as input.name, and a concise visible result such as
report + exit status as output.name. Keep individual flags and parser details in the
description only when they affect a consequential default; do not turn the contract into command
reference documentation.
Attach zero to three Attention items directly to exact visible Contract entities, only for
consequential ambiguity in an external interface, schema, protocol, lifecycle rule, or guarantee.
Each item has id, impact, question, whyItMatters, and two or three
{ option, implication } alternatives.
Technology-engine choices belong to the System submission instead.
After incorporating any storage-contract method output, persist
{ contract } through submit_contract_block. On revision, use the inherited block, including
its embedded Attention, as the baseline and submit only when this perspective changes.
04 同仓库更多 Skills
brainstorm-whiteboard
An Excalidraw-powered, two-way brainstorming whiteboard that both the agent and the human can edit, annotate and seal as peers. Use it when a user can show an idea or feedback more easily than type it, or when a sketch helps the agent explain, explore or compare ideas. Read and interpret human sketches as well as creating your own; proactively use shapes, diagrams and annotations without waiting for a drawing request. Keep chat self-contained so viewing the board is never required to understand the response.
Tandem 设计与开发协作
tandem
可选的问答与原型探索,或直接进行原生开发,以完成设计、实现与评审。
产品用例与用户旅程设计
use-case-designer
设计产品经理(PM)级别的“用例”(Use case)选项卡和可选的用户旅程。
存储契约设计
storage-contract-designer
在“契约”(Contract)中设计内存、数据库、文件、对象存储或缓存契约。
分层技术栈设计
stack-designer
设计“系统”(System)选项卡中展示的分层技术栈。
系统模块职责设计
module-designer
在分层 System 技术栈中细化职责。