Documentation, decision records and publishing for FastAPI projects - ARCHITECTURE.md (one rule, layer table, migration map, startup and shutdown contracts), ADRs with rejected alternatives and "when to revisit", per-module/phase docs with end-to-end trace, ops commands, known limits and verified/not-verified, errors catalog, bilingual README (Arabic/English), CI, secret scanning and a pre-publish checklist for GitHub. Use whenever the user wants to publish a project, write a README or docs, ...
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Fastapi Docs Release?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/amralhorimy-fastapi-docs-release)
---
name: fastapi-docs-release
description: Documentation, decision records and publishing for FastAPI projects - ARCHITECTURE.md (one rule, layer table, migration map, startup and shutdown contracts), ADRs with rejected alternatives and "when to revisit", per-module/phase docs with end-to-end trace, ops commands, known limits and verified/not-verified, errors catalog, bilingual README (Arabic/English), CI, secret scanning and a pre-publish checklist for GitHub. Use whenever the user wants to publish a project, write a README or docs, record a decision, document a module or phase, prepare an open-source repo, add CI, share work with beginners, or write documentation in Arabic and English.
---
# Docs and Release
Docs are part of the code: written in the same step as the feature, honest about limits, and checkable.
## Document set
| File | Purpose |
|---|---|
| `ARCHITECTURE.md` | **the one rule** (imports point inward), layer table (what each layer contains/forbids), how modules cooperate (events, consumer-owned ports + bridges), migration map old->new, file layout inside a module, startup preconditions table, shutdown contract, error system diagram, what changed/fixed, known limits |
| `docs/adr/NNNN-title.md` | one decision each (template below) |
| `docs/modules/<module-or-phase>.md` | how a module/phase works (template below) |
| `docs/errors.md` | every error code: status, meaning, who sees what (generated or maintained; a test checks uniqueness) |
| `docs/ops-notes.txt` / runbook | commands operators need (redis-cli, recount, reset, restore) |
| `labs/README.md` | what each lab proves and how to run it |
| `README.md` (+ `README.ar.md`) | quick start, features, architecture summary, "add a feature" recipe, **what was verified and what was not** |
| `CHANGELOG.md`, `SECURITY.md`, `CONTRIBUTING.md` | releases, vulnerability reporting, contribution rules |
## ADR template (real format)
```
# ADR NNNN: <decision in one line>
- Status: accepted | superseded by NNNN
- Context: the pressure and the facts (what hurts today)
- Decision: numbered, concrete (names, mechanisms, limits)
- Rejected alternatives: each with the reason it lost *for now*
- Consequences: what becomes harder, what invariants other code must keep (e.g. "handlers MUST be idempotent")
- When to revisit: the observable trigger (e.g. "if losing events becomes unacceptable -> outbox")
```
Write one whenever you rejected a reasonable alternative: modular monolith vs microservices, central errors, startup preconditions,
dispatcher port, Redis Streams vs Celery, events + recount vs `$inc`, feed snapshots.
## Module / phase doc template
```
# <Module or phase>: <name>
## Map (files per layer, what talks to what, diagram)
## Data model (collections, fields, indexes, bounds)
## Events / jobs (types, producers, consumer groups, idempotency)
## End-to-end trace of one flow ("B likes a post": request -> use case -> write -> event -> counters -> notification -> client)
## Run and operate (commands, how to inspect lag/pending/dead, how to repair, how to reset)
## Decisions worth pausing on (the ones a learner should think about, with alternatives)
## Known limits (honest: what is not done, what breaks first)
## Verified and not verified (exact commands run + results; failing tests with cause or "not investigated"; what was not run)
## Exercises (optional, for learning projects)
```
## README (order)
Title + one line + badges -> what/why + diagram -> **quick start** (clone, `cp .env.example .env`, `make up`, one working `curl`) ->
features (shipped only) -> architecture summary -> **recipe for a new feature** (domain, use case, fake test, adapter + integration test,
route, `make check`) -> API overview + error format -> configuration table -> development (`make check`, labs) -> operations ->
verified/not verified -> roadmap/limits -> contributing -> license. Every command in it is run once before publishing.
## Bilingual (Arabic + English)
Two files linking to each other at the top, same section order so they can be diffed. Write Arabic natively, keep code, commands,
identifiers and file names LTR in code blocks/backticks. For deeper docs keep `docs/ar/` and `docs/en/` in parallel
(ARCHITECTURE, API, DECISIONS, LEARNING_PATH). Showcase projects add a **learning path** that walks a beginner through the code in
reading order and says *why* each layer exists.
## Quality gates
`make check` locally and in CI (ruff, pyright, import-linter, tests; integration job with Mongo/Redis services); pre-commit with
ruff + `gitleaks`; `pip-audit` weekly; Dependabot; branch protection; PR template containing the security and done checklists;
semver tags + changelog; image tagged with version and git sha (`APP_VERSION` appears in every log line).
## Pre-publish checklist
- [ ] No real secrets - scan **git history** with the supported Gitleaks Git subcommand for the pinned/documented tool version (for example, `gitleaks git .`); revoke and rotate anything that leaked; `.gitignore` is not a secrets control; verify enabled-feature placeholders are rejected by `production_problems`
- [ ] `.env.example` complete; `.gitignore` covers env, secrets, volumes, models, uploads, caches
- [ ] Clean-clone test: README quick start works untouched
- [ ] LICENSE chosen; third-party and **model-weight licences** compatible
- [ ] No internal URLs/IPs/personal data/scratch files (`*.patch`, notes) in the repo
- [ ] CI green; badges right; limitations and verified/not-verified stated
- [ ] Repo description + topics; release `v0.1.0` with notes
- [ ] Never execute reset/restore/Redis or other destructive commands against production as a README test; require an isolated target, verified backup, bounded operation and explicit authorization
## Showcase projects
Small scope, high polish: one clear idea with every professional practice visible and explained. The goal is to show how a team
thinks (why this layering, why a worker, why this error system), not size.