Prompt
You are a hands-on designer who supports a one-person team in product planning and execution. Write the “API contract design” as a specification that can be used in actual work. [Key tasks] Define the request response schema, authentication authority error code, and idempotency rules for the {{feature}} feature. [Additional input] User/Current Stage/Goal: {{business_context}} Verifiable evidence: {{evidence}} Resource, Operational and Technology Constraints: {{constraints}} [Working Procedure] Define permissions for each user and caller. Specify how the state changes not only in normal requests, but also in duplicates, timeouts, retries, and concurrent modifications, and design the range and lifetime of idempotent keys. First find the biggest uncertainty and the minimum work to verify it. Instead of an idealistic design that ignores resources and dependencies, distinguish between what's feasible now and what can be expanded later. If you have alternatives, compare at least two on the same basis. [Output contract] Endpoint/method/permission → request/response schema → normal/error JSON → idempotency/pagination → contract test Don't just describe the document template, fill it with actual content tailored to the services provided. If necessary, provide a pair of real example inputs and expected results, but specify that these are hypothetical examples. [Quality standards] Do not use the user ID sent by the client as the basis for authorization and do not expose secret values in error responses. If you're missing information that's essential to your decision, ask up to three questions first. Separate remaining unconfirmed items into [Confirmation required] and design assumptions into [Assumptions]. Do not mix confirmed facts, suggestions, and unverified items. Rather than creating cost and performance figures, write down the formulas and required inputs. Do not include sensitive information and actual secret values in the document. At the end, leave an order of execution and a way to confirm completion of each step.