Documentation standards
This page is for people and AI agents who maintain Sedra’s documentation, and for teams building other Foulad developer portals.
Shared Foulad portal standard
Section titled “Shared Foulad portal standard”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. |
Repository layout
Section titled “Repository layout”specs/source/ sources: Medusa spec, hand-written Sedra specs, live agent snapshotspecs/allowlist.json reviewed list of public operationsspecs/public/ generated public contracts (do not edit)scripts/ sync-specs, generate, postbuild (CSP), check-linkssrc/content/docs/ guides (Markdown/MDX)examples/ runnable examples, tested in CItests/ safety tests and live contract testsMaking changes
Section titled “Making changes”- Backend changed? Run
npm run sync:specs. Readspecs/sync-report.json. New operations are held back until you add them to the allowlist. - Run
npm run lint:specs,npm testandnpm run test:contracts. - Update the guide that describes the behaviour, and add a changelog entry.
- Open a pull request. CI checks breaking changes, runs the examples and builds the site. Merging to
maindeploys.
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.