Imported from fluid-commerce/mintlify-starter (
AGENTS.md). Install upstream withnpx skills add fluid-commerce/mintlify-starter. Copyright stays with the author.
Documentation project instructions
Guide truth gate (read before editing api/guides/ or api-reference/)
The task guides in api/guides/*.mdx are bound to a claims registry
(eval/guide-claims.json) enforced by a deterministic checker in CI
(eval/check-guide-claims.mjs). Editing a guide without updating the registry — or
vice versa — fails CI. Read eval/guide-truth.md first: it defines the claim
schema, the checker's semantics, the durable verification decisions (accepted
omissions, low-confidence claims, upstream spec gaps), and the adoption procedure
for new guides. Generated API references are synced hourly from GCS mirrors
(.github/synced-api-references.json controls which artifacts); endpoint and SDK
reference pages are auto-generated from them. Do not store run reports or logs in the repo — post run
records on the relevant Linear issue and record durable decisions in
eval/guide-truth.md.
Before changing the spec sync configuration or investigating a sync failure,
read eval/guide-truth.md → CI wiring and Resolving a conflict.
About this project
- This is a documentation site built on Mintlify
- Pages are MDX files with YAML frontmatter
- Configuration lives in
docs.json - Use the Mintlify MCP server,
https://mcp.mintlify.com, to edit content and settings via MCP - Use the Mintlify docs MCP server,
https://www.mintlify.com/docs/mcp, to query information about using Mintlify via MCP
Terminology
-
The version label in prose and page titles is
v2026-04; the URL path segment is the non-hyphenated/api/v202604/.... Never mix the two forms. -
Two surfaces, named consistently:
- Public storefront —
/api/v202604/<resource>, slug-addressed, no authentication. - Company —
/api/v202604/company/<resource>,:id-addressed, requires a Bearer token.
Public vs. company is expressed per operation, not by splitting the docs.
- Public storefront —
-
Resources are plural kebab-case nouns (
enrollment-packs). Actions are HTTP methods — never verbs in paths. -
Canonical storefront field vocabulary — use these exact names in prose and examples:
id,slug,title,description,image_url,canonical_url,images,active,status,publish_at,seo,metafields,countries,languages. -
Pagination is cursor pagination: request with
page[cursor]/page[limit]; responses returnmeta.pagination.next_cursor/meta.pagination.prev_cursor. Cursors are opaque strings. The termspage,per_page,offset, and any totals-based pagination language are banned. Three exceptions, all narrow and verified against the implementation rather than the spec:- The
webhooks-v0surface — see the legacy-reference exception below. - Seven
checkout-v2026-04list operations are genuinely offset-paginated in the Rails implementation, and their generated reference correctly says so:list_customer_addresses,list_customer_payment_methods,list_customer_points,list_reps,get_store_drop_zones,list_subscriptions, andlist_users. Cursor pagination was available on the same base class these actions inherit and was deliberately not used, so this is the API's design, not drift — do not "fix" the spec, and do not describe these seven as cursor-paginated. Everything else oncheckout-v2026-04, includinglist_customer_orders, remains cursor and is held to the rule above. - The Public SDK Drop Zones operation
public_v2025_06_index_public_drop_zones, generated only at/api-reference/public-drop-zones/an-array-of-available-checkout-and-order-confirmation-drop-zones-public, genuinely uses offsetpage/per_pagepagination. This exception applies only to that generated page. It does not sanction another Public SDK page or hand-written prose.
Three details to preserve when documenting the seven:
- Passing
page[cursor]to any of them returns 422 witherrors: {page: ["must be an integer"]}, not page 1. Request params are validated by a Dry schema before the query runs, so the cursor form fails loudly rather than being silently ignored. This is safe behaviour and worth stating so the question is not re-litigated. - Default page sizes differ per operation — 25 for subscriptions, 50 for users, 10 for customer payment methods. State the default per operation; there is no surface-wide default.
list_customer_ordersis cursor-paginated but its response meta also emitsper_page,current_page, andtotal_pagesnext to the cursors, andcurrent_pageis hardcoded to1upstream. Never present those three as working offset controls on that endpoint.
- The
-
Auth wording: "Bearer token" (
Authorization: Bearer <token>). Integrator token types are company API tokens, partner tokens, and public (pub-) tokens. -
Banned legacy references in docs content:
company/v1,/api/v1/,v2025-06/v202506. Four exceptions, each tied to a named surface or an exact generated boundary, each scoped explicitly — an exception to one is not an exception to another:-
/api/v2025-06/tokens/*— partner/public token-management endpoints genuinely live there and may be documented as such until a newer surface ships. Scoped to that path prefix on the admin/partnerapi/v2025-06surface (owned byadmin-v2025-06.yaml, unsynced) and to nothing else. It says nothing about the unrelatedpublic/v2025-06surface below. -
webhooks-v0— a genuinev0API (not legacyv1) whose list endpoints use offsetpage/per_pagepagination; its auto-generated reference reflects the spec. This covers the synced reference only — hand-written prose must still use cursor-pagination language and must not introducepage/per_page/offsetterms. -
public-v2025-06(api-reference/public-v2025-06.yaml,info.title: Fluid Public SDK API) — the REST surface behind the@fluid-appFairShare SDK. It genuinely lives at/api/public/v2025-06/*and may be documented as such until a successor ships: nopublic-v2026-04exists or is in flight, and the surface carries no sunset or deprecation middleware. The rule was wrong here, not the API. The ban read everyv2025-06string as legacy drift, but this is the only spec the SDK registers — 49 files reference it onfluid-fairshareorigin/main, a tree that contains zerov2026-04references in any form — and it is covered by 54 dedicated Rails integration tests. Document it as SDK-internal: for a direct REST integration usecheckout-v2026-04, so publishing it never reads as an endorsement to build a new integration againstv2025-06.Two scoping points, both load-bearing:
- This exception extends to hand-written prose, not only to the synced reference. Unlike the
webhooks-v0exception above, prose pages may name this surface, its version label, and its paths. An SDK page has to tell a reader which surface its cart methods call, and it cannot do that without sayingpublic-v2025-06. Prefer a link to the generated reference over a hand-typed path — hand-typing invites the form being mistaken for a banned version — and keep per-endpoint contracts on the generated pages per Content boundaries below. - The version label names the spec, not a path prefix. 18 of its 67 paths sit outside
/api/public/v2025-06: 12/api/v202506/carts/*payment-gateway callbacks, three/api/public/health*, plus/api/carts/{cart_token}/update_cart_items_prices,/api/public/drop_zones, and/api/public/leaderboards/countries. So the exception covers this spec's operations, and coversv202506as well asv2025-06; scoping it to one literal prefix would be wrong.
Do not conflate this with the tokens exception.
api/v2025-06(admin/partner) andpublic/v2025-06(SDK) are different surfaces owned by different specs that happen to share a version label. This exception covers only the latter and widens nothing about the former. - This exception extends to hand-written prose, not only to the synced reference. Unlike the
-
Checkout's reciprocal generated-reference boundary —
checkout-v2026-04'sinfo.descriptioncorrectly says that the FairShare SDK calls the Fluid Public SDK API (public-v2025-06). Permit only that exact sentence when the same generated operation page carries a contract line proving it comes fromapi-reference/checkout-v2026-04.yamlat an/api/checkout/v2026-04/*path. This is an occurrence-level exception, not a page or tag sanction: anotherv2025-06/v202506marker on the same Checkout page must still fail.
-
Style preferences
- Use active voice and second person ("you")
- Keep sentences concise — one idea per sentence
- Use sentence case for headings
- Bold for UI elements: Click Settings
- Code formatting for file names, commands, paths, and code references
Content boundaries
- The OpenAPI files under
api-reference/and TypeDoc files undersdk-artifacts/are generated, synced artifacts —.github/synced-api-references.jsonis the control surface listing which references sync hourly from their source-of-truth mirrors. Never hand-edit them. - Endpoint-level details (params, schemas, status codes) belong to the auto-generated Endpoints pages driven by the synced spec. Hand-written prose pages must not duplicate or restate per-endpoint contracts — that duplication is the drift problem this repo eliminated.
- No internal implementation names in published content: Rails class/module/gem names, internal service names, and code file paths stay out of docs. Evidence and audit-trail references belong in PRs and issues, not published pages.
- Every factual claim in a guide must be registered in
eval/guide-claims.jsonand passeval/check-guide-claims.mjs(see the Guide truth gate section). - Examples must be realistic — real-looking slugs, names, and values. Never
"string", placeholder names, or auto-generated filler. - No hand-written prose page in the nav may document legacy v1 endpoints or use offset-pagination language, except where it describes one of the operations named in the pagination exceptions above and says so explicitly. (The auto-generated
webhooks-v0reference reflects that surface's genuine offsetpage/per_pagepagination — see the webhooks exception above; this is not a legacyv1reference. The seven offsetcheckout-v2026-04list operations and the exact Public SDK Drop Zones generated page are likewise genuine, not legacy.)