brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
palantir-sdk-patternsImplement resilient Palantir clients by choosing generated OSDK or Platform SDK, pinning contracts, and bounding authentication, pagination, retries, and writes. Use when building shared Foundry client code. Trigger with "Palantir SDK patterns".
Independent GitHub snapshot · Automated classification · Original documentation governs
Keep application-specific Ontology access in the generated OSDK and broader platform operations in the Platform SDK. Wrap transport concerns without hiding the generated entity contract, OAuth authority, request identifiers, or Action validation.
references/official-docs.md, generated application documentation, and relevant migration guide.Inject an approved token provider or OAuth client into the boundary; never accept a raw long-lived token as ordinary configuration. Log grant/principal identifiers and request IDs where permitted, but never bearer tokens, client secrets, object values, or protected payloads.
Write a decision record choosing OSDK or Platform SDK and list the exact required resources or operations.
Expose one client boundary that owns token acquisition, deadlines, request correlation, retry classification, and telemetry.
Implement deterministic pagination and property selection; return continuation state rather than silently loading every page.
Keep generated object, Action, and Function definitions visible to callers and validate Actions before approved execution.
Add contract tests for auth denial, restrictions, page continuation, 429/503, non-retryable errors, validation failures, and SDK upgrades.
Application and platform owners approve the selected API surface; security owners approve token handling; data owners approve returned properties and writeback. Shared-client abstraction does not authorize new endpoints.
An SDK decision, pinned dependencies, typed client boundary, auth provider, pagination/retry policy, generated-contract usage, tests, telemetry/redaction rules, and upgrade procedure.
| Condition | Response |
|---|---|
| A wrapper accepts arbitrary endpoint paths | Replace it with typed/generated operations or an explicitly reviewed Platform API surface. |
| A helper loads all pages | Return bounded pages or stream with cancellation and total-work limits. |
| A write is retried automatically | Require documented idempotency or reconciliation before retry. |
| Generated definitions change | Treat it as a contract migration and update tests plus call sites together. |
Build a TypeScript OSDK client boundary that accepts a token provider, requests selected properties, returns continuation state, preserves generated Action validation, and emits redacted request metrics.
Build a Python Platform SDK service for one approved API group with Client Credentials auth, bounded pagination, retry only for transient responses, and request-ID capture.