Skip to content

Documentation standards

This page is for people and AI agents who maintain Sedra’s documentation, and for teams building other Foulad developer portals.

Any Foulad developer portal (for example a future Midad portal) should follow these so they feel like one family and can share tooling:

Topic Standard
Host developers.<product-domain>, static files on Cloudflare Workers static assets
Stack Astro + Starlight for guides, Scalar API Reference (self-hosted npm build, unmodified) for OpenAPI
Design Midad family: Figtree (Latin) and Tajawal (Arabic) from fonts.bunny.net, black and white, frosted sticky header, pill buttons, light and dark
Contracts OpenAPI 3.1 in specs/public, built from sources by scripts/sync-specs.mjs, gated by specs/allowlist.json
Extensions Product-specific metadata as x-<product>-*
Errors { ok: false, status: "error", error: { code, message, details } } with a shared code list
AI-readable /llms.txt, /llms-full.txt, /openapi/index.json, /mcp/tools.json when MCP exists
Security No proxy, strict CSP, no analytics, no third-party AI, no secrets in the repo, allowlist plus safety tests
Language English first, RTL-ready for Arabic
Status words Available, Preview, Sandbox only, Planned, Not implemented. Nothing planned is described as available.
specs/source/ sources: Medusa spec, hand-written Sedra specs, live agent snapshot
specs/allowlist.json reviewed list of public operations
specs/public/ generated public contracts (do not edit)
scripts/ sync-specs, generate, postbuild (CSP), check-links
src/content/docs/ guides (Markdown/MDX)
examples/ runnable examples, tested in CI
tests/ safety tests and live contract tests
  1. Backend changed? Run npm run sync:specs. Read specs/sync-report.json. New operations are held back until you add them to the allowlist.
  2. Run npm run lint:specs, npm test and npm run test:contracts.
  3. Update the guide that describes the behaviour, and add a changelog entry.
  4. Open a pull request. CI checks breaking changes, runs the examples and builds the site. Merging to main deploys.

Rules for agents: describe only what the backend does today; mark everything else Preview or Planned. Never add internal endpoints to the allowlist. Never put credentials in examples; read them from environment variables. Do not edit generated files.