AGENT SKILL

storage-contract-designer

Design memory, database, file, object-store, or cache contracts inside Contract.

适用职业律师与法务
License 许可
MIT
所属仓库
microsoft/Tandem
最近更新
2026-11-02
Stars
★ 9
Forks
1

01 前言 Front Matter

name
storage-contract-designer
description
Design memory, database, file, object-store, or cache contracts inside Contract.
user-invocable
false

02 资源文件 1

03 SKILL.md 正文

Storage Contract Designer

Use this method when consequential state is retained in memory, a database, a file, an object store, or a cache. Omit it for genuinely stateless work. This method contributes contract.storageContracts; it never creates a Data tab or an aspects entry.

For each independently owned store emit exactly:

storageContract
├─ id
├─ name
├─ medium: memory | database | file | object-store | cache
├─ ownerParticipantId
├─ purpose
├─ records[]
│  ├─ id
│  ├─ name
│  ├─ description
│  ├─ fields[]: { id, name, type, required, description }
│  ├─ keys[]: { id, kind, fieldIds, purpose }
│  └─ constraints[]: { id, statement }
├─ relations[]: { id, fromRecordId, toRecordId, kind, statement }
├─ guarantees[]: { id, statement }
└─ lifecycleRules[]: { id, statement }

kind for keys is primary, unique, or index; relation kind is one-to-one, one-to-many, or many-to-many. Use stable lowercase kebab-case IDs. Reference an existing Contract participant as the owner. Include only fields, keys, constraints, and relationships that define the storage agreement or expose a consequential design assumption.

The contract must state what acknowledged storage operations guarantee and when records are created, changed, expired, or deleted. Do not describe storage as a generic architecture summary: make its persisted shape and semantics reviewable.

Use familiar domain names and plain-language field descriptions. Explain keys, relationships, retention, and durability in terms of what information the product remembers and what the user can expect, rather than assuming database knowledge.

Return Attention about storage guarantees or persisted semantics to contract-designer for embedding on the relevant Contract entity. Return persistence-engine Attention such as JSON versus SQLite to stack-designer for embedding on the relevant System layer. Do not emit the same question in both places.

04 同仓库更多 Skills