协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
attio-sdk-patterns【开发与工程】Build a typed Attio REST client with tenant-aware tokens, endpoint-specific pagination, structured errors, bounded retries, and contract tests while distinguishing it from the Attio App SDK. Use when creating or refactoring Attio integration code. Trigger with "Attio SDK", "Attio client wrapper", or "typed Attio API".
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
name: attio-sdk-patterns description: >- Build a typed Attio REST client with tenant-aware tokens, endpoint-specific pagination, structured errors, bounded retries, and contract tests while distinguishing it from the Attio App SDK. Use when creating or refactoring Attio integration code. Trigger with "Attio SDK", "Attio client wrapper", or "typed Attio API". argument-hint: "[repository-path] [language-or-runtime]" allowed-tools: Read, Glob, Grep, WebFetch, Write, Edit version: 1.8.0 author: Jeremy Longshore jeremy@intentsolutions.io license: MIT tags:
This skill designs a small REST client around the endpoints an application actually uses. It does not conflate a server-side REST wrapper with Attio's attio App SDK for in-product apps.
Use Read, Glob, and Grep to inspect clients, types, dependency policy, and tests. Use WebFetch only for official Attio REST, OpenAPI, and App SDK documentation. Use Write or Edit after the target abstraction and endpoint contracts are confirmed.
https://api.attio.com/v2 base URL and endpoint-specific scopes.pagination.next_cursor.attio serves apps running inside Attio and is not a universal REST client replacement.Inject a token provider that resolves the authorized workspace at request time. Do not place a global production token in source, client constructors, snapshots, fixtures, or logs.
Do not replace an established client, add a generated dependency, or migrate production call sites without owner approval and compatibility evidence.
Return the endpoint inventory, client interface, pagination mapping, error taxonomy, auth boundary, test evidence, migration plan, and rollback point.
| Condition | Response |
|---|---|
| Endpoint contract is ambiguous | Stop and recheck the official endpoint reference. |
| Runtime payload fails validation | Return a typed contract error and preserve redacted evidence. |
| Pagination repeats a page | Abort at the loop guard and record the endpoint strategy. |
| Tenant token does not match context | Reject before sending the request. |
Input:
runtime=TypeScript; endpoints=record query and task create; tenancy=multi-workspace
Expected handoff:
client=typed REST wrapper; pagination=endpoint mapped; tenant-tests=pass