From 06b8f43d7b3fcbeeba8ac300666cf186facb3bfb Mon Sep 17 00:00:00 2001 From: BlackAngelTVdev Date: Wed, 26 Aug 2026 22:59:19 +0200 Subject: [PATCH] docs: add FWS organization conventions (2026-08-26) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Version du jour — 26.08.2026 — rédigée par BlackAngelTV. Conventions de l'organisation : commits, nommage, code, tests, versionnage, workflow git, Kanban et .gitignore obligatoire. Generated with Codebuff 🤖 Co-Authored-By: Codebuff --- .gitignore | 34 ++++++++ README.en.md | 229 ++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 230 ++++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 492 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 README.en.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..040b857 --- /dev/null +++ b/.gitignore @@ -0,0 +1,34 @@ +# ── Development assistant (Freebuff) ──────────────────── +.freebuff/ + +# ── Environment & secrets ─────────────────────────────── +.env +.env.* +!.env.example + +# ── Dependencies ──────────────────────────────────────── +node_modules/ +vendor/ + +# ── Compiled artifacts & caches ───────────────────────── +dist/ +build/ +target/ +*.pyc +__pycache__/ +*.o +*.obj +*.so +*.dll +*.exe +.cache/ + +# ── AI assistants / editors ───────────────────────────── +.cursor/ +.vscode/ +.idea/ + +# ── Logs & generated files ────────────────────────────── +*.log +coverage/ +.DS_Store diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000..9f7d3e1 --- /dev/null +++ b/README.en.md @@ -0,0 +1,229 @@ +# FWS + +FWS is an open-source organization made up of several projects. Each project is free to choose its own tech stack (no language restrictions), but must follow the common conventions described in this document. + +The main project is **FWS Arch**, a fork of Arch Linux: we keep the Arch base and add a user-friendly layer on top to simplify day-to-day installation and usage. + +> This document defines the conventions that apply to **all** repositories in the organization. + +## Effective date + +The rules in this document **take effect on August 26, 2026**. + +- Anything done **before that date** — commits, branches, repositories, code, history — **is not affected**: no retroactive renaming or history rewriting. +- From that date on, **all new commits, branches, repositories and projects** must follow these conventions. + +## Table of contents + +- [Effective date](#effective-date) +- [Commit conventions](#commit-conventions) +- [Naming](#naming) +- [Code conventions](#code-conventions) +- [Tests](#tests) +- [Versioning & releases](#versioning--releases) +- [Development organization (Kanban)](#development-organization-kanban) +- [Git workflow / Pull requests](#git-workflow--pull-requests) +- [Documentation](#documentation) + +--- + +## Commit conventions + +### Language + +All commit messages are written in **English**. + +### Format: Conventional Commits + +Every commit follows the [Conventional Commits](https://www.conventionalcommits.org/) format: + +``` +(): +``` + +**Allowed types:** + +| Type | Usage | +|-------------|-------------------------------------------------------------| +| `feat:` | New feature | +| `fix:` | Bug fix | +| `docs:` | Documentation only | +| `style:` | Formatting, whitespace, semicolons… (no code impact) | +| `refactor:` | Refactoring without behavior change | +| `perf:` | Performance improvement | +| `test:` | Adding or updating tests | +| `build:` | Build system or dependencies | +| `ci:` | CI configuration | +| `chore:` | Miscellaneous tasks (cleanup, configuration…) | +| `revert:` | Reverting a previous commit | + +**Examples:** + +``` +feat(auth): add password reset flow +fix(installer): resolve partition detection on UEFI +docs(readme): clarify setup steps +``` + +### Message body + +The title should be short and imperative. A **body is added when needed** to explain the *why* (context, decision, trade-offs), not the *how*. + +``` +fix(installer): resolve partition detection on UEFI + +The previous heuristics failed on disks with an ESP not mounted at +/boot. Fall back to reading the EFI system partition UUID directly +from the firmware tables. +``` + +--- + +## Naming + +### Repositories + +All repositories in the organization follow the **kebab-case with `fws-` prefix** format: + +``` +fws-arch # the Arch Linux fork (main project) +fws-web # website or web app +fws-api # API / backend +fws-docs # documentation +``` + +### Branches + +Branches follow the `type/description` format, in English, kebab-case: + +``` +feat/login +fix/typo-accueil +docs/api +refactor/installer +``` + +### Files + +Files are named in **kebab-case**, regardless of the language: + +``` +my-component.ts +user-service.py +network-manager.c +install-script.sh +``` + +--- + +## Code conventions + +### Identifiers + +Identifiers (variables, functions, classes, modules) are in **English**: + +```python +def get_user_by_id(user_id): ... +``` + +### Comments + +- Comments are written in **English**. +- Comment the *why*, not the how. If the code is self-explanatory, no comment is needed. +- Document the non-obvious: implementation choices, trade-offs, edge cases, references to a bug or decision. + +```python +# We cache the result because resolving DNS can take up to 2s on +# misconfigured resolvers. +``` + +### Stack freedom + +Each project is free to choose its own tech stack (language, framework). Only the naming and code conventions above are shared. + +### Formatting & linting + +No tool is imposed at the organization level. Recommended best practices: + +- Use the language's standard formatter / linter when one exists (`rustfmt`, `gofmt`, `Prettier`, `ruff`…). +- Shared configuration within each project, committed to the repo. +- Formatting on save is encouraged. + +### Mandatory .gitignore + +Every repository must contain a **`.gitignore`** at its root. It must at least ignore: + +- **environment files**: `.env`, `.env.*` — never commit secrets in plain text; +- **AI / development-assistant data**: `.freebuff/`, `.cursor/`, `.vscode/`… depending on the tool; +- **compiled artifacts and dependencies**: `node_modules/`, `dist/`, `build/`, `target/`, `__pycache__/`, `*.pyc`, `*.o`, `*.so`, `*.exe`…; +- **generated files**: logs, caches, coverage reports. + +> A file tracked by mistake can be removed from tracking (without being deleted) with `git rm --cached `. + +--- + +## Tests + +- Test files are named `*.test.*`: + + ``` + auth.test.ts + network-manager.test.c + ``` + +- Test names use `describe` / `it` (or the framework equivalent) in **English**: + + ```ts + describe('login', () => { + it('rejects an invalid password', () => { ... }); + }); + ``` + +- **All tests must pass before merging** a pull request. + +--- + +## Versioning & releases + +### SemVer + +Each project publishes its versions using [SemVer](https://semver.org/): `MAJOR.MINOR.PATCH`. + +- `MAJOR`: incompatible changes (breaking changes) +- `MINOR`: backward-compatible new features +- `PATCH`: backward-compatible bug fixes + +### CHANGELOG + +The CHANGELOG is **generated automatically** from Conventional Commits (e.g. with an automated release tool). `feat:` and `fix:` commits feed the Features / Bug Fixes sections. + +--- + +## Development organization (Kanban) + +Development in each project is organized on a **Kanban board**. + +- Each project maintains its own board (e.g. GitHub Projects) to track tasks. +- Reference columns: **Backlog / To do**, **In progress**, **In review**, **Done**. +- A **card = one unit of work** (feature, bug, task). Each card gives birth to a `type/description` branch and a linked pull request. +- A card is moved to **Done** only once its pull request is merged. + +--- + +## Git workflow / Pull requests + +1. Create a `type/description` branch from `main`. +2. Commit following the conventions (see above). +3. Open a pull request with a clear title and description. +4. **At least one reviewer** must approve the PR. +5. **Tests must pass** before merging. +6. Merge with **squash**: 1 PR = 1 clean commit on `main`. + +--- + +## Documentation + +- Documentation is **bilingual French / English**. +- `README.md`: French version. +- `README.en.md`: English version (full translation). +- Both versions must stay in sync after every change. diff --git a/README.md b/README.md index 99bd164..8191275 100644 --- a/README.md +++ b/README.md @@ -1 +1,229 @@ -# FWS \ No newline at end of file +# FWS + +FWS est une organisation open source composée de plusieurs projets. Chaque projet est libre de choisir sa stack technique (pas de restriction de langage), mais suit les conventions communes décrites dans ce document. + +Le projet principal est **FWS Arch**, un fork d'Arch Linux : on conserve la base d'Arch et on ajoute une surcouche conviviale (« user friendly ») pour simplifier l'installation et l'utilisation au quotidien. + +> Ce document définit les conventions applicables à **tous** les repos de l'organisation. + +## Entrée en vigueur + +Les règles de ce document **entrent en vigueur le 26 août 2026**. + +- Tout ce qui a été fait **avant cette date** — commits, branches, repos, code, historique — **n'est pas concerné** : pas de renommage rétroactif ni de réécriture d'historique. +- À partir de cette date, **tous les nouveaux commits, branches, repos et projets** doivent suivre ces conventions. + +## Sommaire + +- [Entrée en vigueur](#entrée-en-vigueur) +- [Conventions de commits](#conventions-de-commits) +- [Nommage](#nommage) +- [Conventions de code](#conventions-de-code) +- [Tests](#tests) +- [Versionnage & releases](#versionnage--releases) +- [Organisation du développement (Kanban)](#organisation-du-développement-kanban) +- [Workflow Git / Pull Requests](#workflow-git--pull-requests) +- [Documentation](#documentation) + +--- + +## Conventions de commits + +### Langue + +Tous les messages de commit sont rédigés en **anglais**. + +### Format : Conventional Commits + +Chaque commit suit le format [Conventional Commits](https://www.conventionalcommits.org/) : + +``` +(): +``` + +**Types autorisés :** + +| Type | Usage | +|-------------|------------------------------------------------------------------| +| `feat:` | Nouvelle fonctionnalité | +| `fix:` | Correction de bug | +| `docs:` | Documentation uniquement | +| `style:` | Formatage, espaces, points-virgules… (aucun impact sur le code) | +| `refactor:` | Refactorisation sans changement de comportement | +| `perf:` | Amélioration de performance | +| `test:` | Ajout ou modification de tests | +| `build:` | Système de build ou dépendances | +| `ci:` | Configuration CI | +| `chore:` | Tâches diverses (ménage, configuration…) | +| `revert:` | Annulation d'un commit | + +**Exemples :** + +``` +feat(auth): add password reset flow +fix(installer): resolve partition detection on UEFI +docs(readme): clarify setup steps +``` + +### Corps du message + +Le titre doit être court et impératif. Un **corps est ajouté si nécessaire** pour expliquer le *pourquoi* (contexte, décision, trade-off), pas le *comment*. + +``` +fix(installer): resolve partition detection on UEFI + +The previous heuristics failed on disks with an ESP not mounted at +/boot. Fall back to reading the EFI system partition UUID directly +from the firmware tables. +``` + +--- + +## Nommage + +### Repos + +Tous les repos de l'organisation suivent le format **kebab-case avec préfixe `fws-`** : + +``` +fws-arch # le fork d'Arch Linux (projet principal) +fws-web # site ou application web +fws-api # API / backend +fws-docs # documentation +``` + +### Branches + +Les branches suivent le format `type/description`, en anglais, en kebab-case : + +``` +feat/login +fix/typo-accueil +docs/api +refactor/installer +``` + +### Fichiers + +Les fichiers sont nommés en **kebab-case**, quel que soit le langage : + +``` +my-component.ts +user-service.py +network-manager.c +install-script.sh +``` + +--- + +## Conventions de code + +### Identifiants + +Les identifiants (variables, fonctions, classes, modules) sont en **anglais** : + +```python +def get_user_by_id(user_id): ... +``` + +### Commentaires + +- Les commentaires sont rédigés en **anglais**. +- On commente le **pourquoi**, pas le comment. Si le code est explicite, pas de commentaire. +- On documente le non-évident : choix d'implémentation, trade-offs, cas limites, références à un bug ou une décision. + +```python +# We cache the result because resolving DNS can take up to 2s on +# misconfigured resolvers. +``` + +### Liberté de stack + +Chaque projet choisit librement sa stack technique (langage, framework). Seules les conventions de nommage et de code ci-dessus sont communes. + +### Formatage & lint + +Pas d'outil imposé au niveau de l'organisation. Bonnes pratiques recommandées : + +- Utiliser le formateur / linter standard du langage quand il existe (`rustfmt`, `gofmt`, `Prettier`, `ruff`…). +- Une configuration partagée au sein de chaque projet, versionnée dans le repo. +- Le formatage automatique à l'enregistrement est encouragé. + +### .gitignore obligatoire + +Chaque repo doit contenir un **`.gitignore`** à la racine. Il doit au minimum ignorer : + +- les **fichiers d'environnement** : `.env`, `.env.*` — jamais de secrets en clair dans git ; +- les **données des outils IA / assistants de développement** : `.freebuff/`, `.cursor/`, `.vscode/`… selon l'outil ; +- les **artefacts compilés et dépendances** : `node_modules/`, `dist/`, `build/`, `target/`, `__pycache__/`, `*.pyc`, `*.o`, `*.so`, `*.exe`… ; +- les **fichiers générés** : logs, caches, rapports de couverture. + +> Un fichier suivi par erreur peut être retiré du suivi (sans être supprimé) avec `git rm --cached `. + +--- + +## Tests + +- Les fichiers de test sont nommés `*.test.*` : + + ``` + auth.test.ts + network-manager.test.c + ``` + +- Les noms de tests utilisent `describe` / `it` (ou l'équivalent du framework) en **anglais** : + + ```ts + describe('login', () => { + it('rejects an invalid password', () => { ... }); + }); + ``` + +- **Tous les tests doivent passer avant de merger** une pull request. + +--- + +## Versionnage & releases + +### SemVer + +Chaque projet publie ses versions en [SemVer](https://semver.org/) : `MAJEUR.MINEUR.PATCH`. + +- `MAJEUR` : changement incompatible (breaking change) +- `MINEUR` : nouvelle fonctionnalité rétrocompatible +- `PATCH` : correction de bug rétrocompatible + +### CHANGELOG + +Le CHANGELOG est **généré automatiquement** depuis les commits Conventional Commits (par exemple avec un outil de release automatisée). Les commits `feat:` et `fix:` alimentent les sections Features / Bug Fixes. + +--- + +## Organisation du développement (Kanban) + +Le développement de chaque projet est organisé sur un **tableau Kanban**. + +- Chaque projet maintient son propre tableau (ex. GitHub Projects) pour suivre les tâches. +- Colonnes de référence : **Backlog / À faire**, **En cours**, **En revue**, **Terminé**. +- Une **carte = une unité de travail** (fonctionnalité, bug, tâche). Chaque carte donne naissance à une branche `type/description` et à une pull request qui lui est liée. +- Une carte n'est déplacée vers **Terminé** qu'une fois sa pull request mergée. + +--- + +## Workflow Git / Pull Requests + +1. Créer une branche `type/description` depuis `main`. +2. Commiter en suivant les conventions (voir plus haut). +3. Ouvrir une pull request avec un titre et une description clairs. +4. **Au moins un reviewer** doit valider la PR. +5. Les **tests doivent passer** avant le merge. +6. Merger en **squash** : 1 PR = 1 commit propre sur `main`. + +--- + +## Documentation + +- La documentation est **bilingue français / anglais**. +- `README.md` : version française. +- `README.en.md` : version anglaise (traduction intégrale). +- Les deux versions doivent rester synchronisées à chaque modification.