Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .claude/commands/bootstrap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
description: POSEIDON /bootstrap — see poseidon/commands/bootstrap.md
---

Read `poseidon/commands/bootstrap.md` and follow it exactly, with
$ARGUMENTS as its arguments. If the file is missing, say so and stop.
6 changes: 6 additions & 0 deletions .claude/commands/check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
description: POSEIDON /check — see poseidon/commands/check.md
---

Read `poseidon/commands/check.md` and follow it exactly, with
$ARGUMENTS as its arguments. If the file is missing, say so and stop.
6 changes: 6 additions & 0 deletions .claude/commands/close.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
description: POSEIDON /close — see poseidon/commands/close.md
---

Read `poseidon/commands/close.md` and follow it exactly, with
$ARGUMENTS as its arguments. If the file is missing, say so and stop.
6 changes: 6 additions & 0 deletions .claude/commands/handoff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
description: POSEIDON /handoff — see poseidon/commands/handoff.md
---

Read `poseidon/commands/handoff.md` and follow it exactly, with
$ARGUMENTS as its arguments. If the file is missing, say so and stop.
6 changes: 6 additions & 0 deletions .claude/commands/locate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
description: POSEIDON /locate — see poseidon/commands/locate.md
---

Read `poseidon/commands/locate.md` and follow it exactly, with
$ARGUMENTS as its arguments. If the file is missing, say so and stop.
6 changes: 6 additions & 0 deletions .claude/commands/milestone.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
description: POSEIDON /milestone — see poseidon/commands/milestone.md
---

Read `poseidon/commands/milestone.md` and follow it exactly, with
$ARGUMENTS as its arguments. If the file is missing, say so and stop.
6 changes: 6 additions & 0 deletions .claude/commands/poseidon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
description: Launch POSEIDON — locate the current state and route to the one action that applies.
---

Read `poseidon/POSEIDON.md` and follow it exactly. If the file is missing, say
so and stop; do not improvise a method in its place.
6 changes: 6 additions & 0 deletions .claude/commands/review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
description: POSEIDON /review — see poseidon/commands/review.md
---

Read `poseidon/commands/review.md` and follow it exactly, with
$ARGUMENTS as its arguments. If the file is missing, say so and stop.
6 changes: 6 additions & 0 deletions .claude/commands/unit-new.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
description: POSEIDON /unit-new — see poseidon/commands/unit-new.md
---

Read `poseidon/commands/unit-new.md` and follow it exactly, with
$ARGUMENTS as its arguments. If the file is missing, say so and stop.
6 changes: 6 additions & 0 deletions .claude/commands/unit-ready.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
description: POSEIDON /unit-ready — see poseidon/commands/unit-ready.md
---

Read `poseidon/commands/unit-ready.md` and follow it exactly, with
$ARGUMENTS as its arguments. If the file is missing, say so and stop.
6 changes: 6 additions & 0 deletions .claude/commands/verify.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
description: POSEIDON /verify — see poseidon/commands/verify.md
---

Read `poseidon/commands/verify.md` and follow it exactly, with
$ARGUMENTS as its arguments. If the file is missing, say so and stop.
9 changes: 9 additions & 0 deletions .claude/skills/poseidon/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: poseidon
description: POSEIDON — the engineering method for this repository. Use when the user says "lance poseidon", "launch poseidon", "poseidon", "start poseidon", or asks what to work on, where things stand, or what to do next. Also use at the start of any session that will change code in this repo.
---

Read `poseidon/POSEIDON.md` at the repository root and follow it exactly.

If that file does not exist, say so and stop. Do not improvise a method in its
place — an invented process that looks like POSEIDON is worse than none.
230 changes: 125 additions & 105 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,117 +1,137 @@
# AGENTS.md — Loi du dépôt Thrustline

Ce fichier s'applique à tout le dépôt. Toute instruction plus locale doit être
compatible avec ces règles.

## Mission

Thrustline est une application Windows distribuable de gestion de compagnie
aérienne virtuelle pour Microsoft Flight Simulator. La refonte vise en priorité :

1. stabilité et récupération après erreur ;
2. sécurité d'un client distribué et modifiable ;
3. intégrité de l'économie et des données ;
4. compatibilité MSFS/SimConnect ;
5. maintenabilité, testabilité et mises à jour sûres.

## Sources de vérité

Lire avant tout travail :

1. `docs/CURRENT_STATE.md` — ce qui existe réellement ;
2. `docs/ROADMAP.md` — ordre des phases ;
3. le ticket concerné dans `docs/tickets/` ;
4. les documents spécialisés indiqués par le ticket.

Références permanentes :

- `docs/PRODUCT.md` — périmètre et règles produit ;
- `docs/ARCHITECTURE.md` — architecture cible et frontières ;
- `docs/SECURITY.md` — règles de sécurité ;
- `docs/QUALITY.md` — stratégie de tests et critères de qualité ;
- `docs/WORKFLOW.md` — cycle complet d'un ticket.

Le code et les migrations appliquées priment sur une documentation périmée.
Signaler et corriger les divergences dans le même ticket si elles sont directement
liées au changement.

## Règles de travail

- Implémenter un seul ticket à la fois.
- Ne pas anticiper les tickets futurs.
- Ne pas refactorer un système sans rapport.
- Respecter strictement `Allowed areas` et `Do not touch`.
- Préserver les modifications utilisateur non liées.
- Ne pas changer l'architecture sans ADR accepté.
- Éviter toute dépendance nouvelle si une solution simple existe déjà.
- Arrêter et demander une décision si une ambiguïté change le produit, la
sécurité, les données ou l'architecture.
- Un problème découvert hors périmètre devient un follow-up dans
`docs/KNOWN_ISSUES.md`, pas une modification opportuniste.

## Frontières techniques

- `app/` : Tauri v2, React, TypeScript, Vite, UI et orchestration cliente.
- `sim-bridge/` : .NET 8, SimConnect, télémétrie locale, REST/SignalR.
- `supabase/` : Auth, PostgreSQL, RLS, Realtime, RPC et Edge Functions.
- `legacy/` : lecture seule jusqu'à son archivage explicite.

Le desktop, le sidecar et MSFS sont des clients non fiables. Le serveur est
autoritaire pour l'argent, la propriété, la réputation, la progression et les
transitions sensibles. Aucun secret backend ne doit être livré au client.

## Qualité d'implémentation

- TypeScript strict, C# nullable et Rust sans avertissement introduit.
- Pages React minces ; règles métier et accès données hors des composants.
- Mutations sensibles via commande serveur transactionnelle et idempotente.
- Migrations Supabase append-only.
- Contrats partagés versionnés et consommateurs mis à jour ensemble.
- Erreurs actionnables pour l'utilisateur, détails techniques dans des logs
redigés.
- Aucun secret, JWT, donnée personnelle ou header d'authentification dans Git ou
les logs.
# AGENTS.md — Thrustline

Short on purpose. It carries the invariants; detail lives in the documents it
cites, opened only when the task concerns them.

Thrustline is a distributable Windows 11 desktop application for managing a
virtual airline in Microsoft Flight Simulator 2024, for a solo owner-operator.
Priorities, in order: stability and recovery after error; security of a
distributed, modifiable client; economy and data integrity; MSFS and SimConnect
compatibility; maintainability. Never sacrifice a higher priority to speed up a
lower one. Given two equally correct options, the one serving the higher
priority wins, even if it costs more.

## Start here — every session

Say "lance poseidon", or run `/locate`. It tells you which state you are in and
which single command applies. Do not begin work without it: that is how a
session ends up touching four unrelated things.

## What to read, and when

1. this file;
2. `<zone>/AGENTS.md` for the zone being worked, if it exists;
3. `docs/CURRENT_STATE.md` — the proven state, held under 200 lines;
4. the unit: in full at its first milestone; afterwards the header, the open
milestone, `Allowed areas`, `Do not touch`.

That is all. `RULES.md` is read **one section** at a time, for the boundary the
milestone touches. `VALIDATION.md` is read **one row** at a time. Never open a
document "for context".

Precedence when sources disagree: code, migrations and lockfiles on the branch >
active unit and accepted decisions > `CURRENT_STATE.md` > specialised docs >
roadmap and README. A branch or an unmerged Pull Request is never a delivered
capability — always distinguish local, pushed, in review, merged. On a
contradiction, stop, quote both passages, and have the stale source fixed.

On demand under `docs/`: `RULES.md` (invariants by boundary), `VALIDATION.md`
(commands), `ARCHITECTURE.md` (where trust changes), `WORKFLOW.md` (the cycle),
`SETUP.md` (getting it running), `PRODUCT.md` (what it is and is not),
`KNOWN_ISSUES.md`, `LEARNINGS.md`, `decisions/` (accepted ADRs).
`docs/archive/` is historical: read it for context, never as law.

## Non-negotiable invariants

- **Authority.** The server is authoritative for money, ownership, reputation,
progression and every sensitive transition. The desktop app, the sidecar and
MSFS are untrusted clients. Never accept an identity, a role, an amount, an
outcome or the current time from a client. Never ship a backend secret to a
client, and never return a privileged Supabase credential to the sidecar.
- **Data.** Migrations are append-only; never edit or delete an applied one.
Every sensitive mutation is transactional and idempotent. No schema change
merges without proving isolation for owner A, owner B and anonymous.
- **Secrets.** Never commit or log a secret, token, JWT, authentication header,
personal datum, or environment file. Never execute a remote script.
- **Boundaries.** Validate every input at every boundary before any side effect:
data and persistence, authoritative service, bridge local API, SimConnect and
MSFS, third-party egress, desktop shell, distribution.
- **Code.** TypeScript strict, C# nullable, no new Rust warning. Business rules
and data access stay out of React components. Shared contracts are versioned
and their consumers updated in the same change. Exact versions and committed
lockfiles. Never add a dependency where the pinned toolchain suffices.
- **Decisions.** No architecture or trust-boundary change without a written ADR
accepted by `PacoRCS`; an accepted ADR changes only via one that supersedes
it.
- **Versions.** Semver, currently resetting to `0.0.1-alpha`. Never an opaque
version, a reused number, or a moved tag. The single source among the four
manifests is **not yet decided** — see `PRODUCT.md`, open questions.
- **Legacy.** `legacy/` is read-only until explicitly archived.

This file stays under two pages: a new global rule **replaces or condenses** an
existing one. It never stacks.

## Scope

One unit = one user capability = one branch = one worktree. At most **two** units
`In progress`. Cycle in `docs/WORKFLOW.md`.

- Implement the unit only; respect `Allowed areas` and `Do not touch`. Do not
anticipate future units, and do not refactor an unrelated system.
- Record any out-of-scope discovery in `docs/KNOWN_ISSUES.md` with evidence and
severity, **without fixing it**.
- Never include, overwrite or publish a pre-existing user change unrelated to
the unit.
- **Decide alone by default.** Facing an ambiguity, choose the safest option —
then, among equally safe ones, the fastest — implement it, and record the
assumption in the report. `PacoRCS` is asked only when no option satisfies the
invariants, when the act is irreversible or leaves the repo, or when it is a
product, security, data or architecture call no evidence settles. A question
that can wait for the report does not interrupt the work.
- The unit file's `Status` field is authoritative; its index is generated from
that field and is never hand-edited.

## Validation

Exécuter les contrôles proportionnés au ticket, puis consigner les résultats :

```powershell
# Frontend
Set-Location app
npm test
npm run build
`docs/VALIDATION.md` gives the commands per area touched: targeted tests first,
then boundary checks. Never report a check you did not run as passed: `passed`,
`not run`, `blocked by environment`, and `failed` are four distinct outcomes,
and a tool exiting `0` without discovering any test proves nothing — `dotnet
test` does exactly that in this repository.

# Sidecar
Set-Location ..\sim-bridge
dotnet build --configuration Release
dotnet test --configuration Release
SQL changes require a local or staging isolation test between two users.
SimConnect changes require a replayed trace or a documented manual MSFS test.

# Tauri
Set-Location ..\app\src-tauri
cargo check --locked
`python3` is absent here, so POSEIDON's checks run in **agent mode**: every
report must say `checks: agent mode — not deterministic, no CI gate`.

# Invariants du dépôt
Set-Location ..\..
.\scripts\security-check.ps1
```
Three failed attempts at the same fix: revert to the last green commit, record
the failure with its evidence, halt. A fourth attempt is forbidden.

Les changements SQL exigent des tests locaux/staging d'isolation entre deux
utilisateurs. Les changements SimConnect exigent un replay de trace ou un test
manuel MSFS documenté. Ne jamais annoncer comme réussi un contrôle non exécuté.
## Git

## Fin de ticket
- Read the current branch immediately before every commit — a shared worktree's
`HEAD` may have moved. Never invent a branch, a base, or a CI result: read
them.
- Stage by explicit path list; never `git add .` or `git add -A`; re-read
`git diff --cached` and run `git diff --cached --check` before committing.
- Conventional Commits. Branch, commit, push and open or update the Pull Request
autonomously — no intermediate confirmation is needed for those.
- Never force-push, never modify a protected branch directly, never bypass a
protection. The Pull Request stays draft until validations and dependencies
are ready.
- Git for Windows and PowerShell for this repository, never Git under WSL on
`/mnt/c`. Never ask for a GitHub password; recommend `gh auth login`.
- **Final review and merge belong exclusively to `PacoRCS`**, and require his
explicit confirmation.

Un ticket n'est `Done` que si :
## Ending a task

- ses critères d'acceptation sont satisfaits ;
- les tests automatisés pertinents passent ;
- sa vérification manuelle a été effectuée ou clairement déléguée ;
- les risques et limites sont consignés ;
- `docs/CURRENT_STATE.md` est mis à jour si l'état réel change ;
- le ticket contient son Completion Report ;
- aucun changement hors périmètre n'est inclus.
The report gives: status, files changed, commands and real results, risks and
limits, branch, commit, Pull Request.

Le rapport final doit donner : résumé, fichiers modifiés, commandes exécutées,
résultats, vérification manuelle, risques, follow-ups et documentation mise à jour.
**Every report ends with `Next`** — the next concrete action, who owns it, what
unblocks it — **then a resume prompt** copyable into a fresh session, giving
pointers and state, never document contents. Format in `/handoff`.

A report without both is not finished.
3 changes: 3 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@AGENTS.md

When the user says "lance poseidon", "launch poseidon", or "/poseidon", read `poseidon/POSEIDON.md` and follow it.
Loading
Loading