Communitygithub.com

conception-avant-construction

À utiliser avant de commencer une fonctionnalité, de corriger un bogue non trivial, ou d'écrire du code d'implémentation — avant que le code existe. Symptômes : « c'est simple, je code directement », atteindre l'éditeur avant qu'une conception soit approuvée, ou une idée qui n'a pas été transformée en spécification et plan.

Qu'est-ce que conception-avant-construction ?

Cette compétence impose une approche structurée pour tout développement logiciel, en s'assurant qu'aucune implémentation ne commence sans une conception clairement articulée et approuvée. Elle repose sur cinq étapes séquentielles : Brainstorm (exploration des objectifs et contraintes), Spec (rédaction du design approuvé), Plan (décomposition en tâches ordonnées), Execute (implémentation avec points de contrôle), et Record (documentation des décisions). Utile pour Claude Code, Cursor ou Codex, elle prévient les erreurs coûteuses cachées dans les tâches jugées simples et oblige à décomposer les efforts conséquents. La compétence identifie aussi les rationalisations courantes (comme « c'est trop simple pour nécessiter un design ») et signale les signaux d'alarme qui doivent immédiatement stopper le codage.

Compatible avec~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/lguidolin/agent-skills/tree/main/skills/designing-before-building

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

Conception avant construction

Vue d'ensemble

Le travail progresse à travers cinq étapes, dans l'ordre : Brainstorm → Spec → Plan → Execute → Record. Aucune implémentation ne commence avant qu'une conception ne soit articulée et approuvée. La tâche la plus simple est celle où les hypothèses non examinées coûtent le plus cher.

Violer la lettre de cette règle, c'est en violer l'esprit. « Je vais concevoir en codant » n'est pas de la conception.

Les cinq étapes

  1. Brainstorm. Explorer l'intention, les contraintes, les critères de succès. Poser une question à la fois. Proposer 2–3 approches avec leurs compromis et une recommandation. Converger vers une conception et obtenir une approbation explicite. Aucun code ici.
  2. Spec. Rédiger la conception approuvée dans un document daté. Le spec est le contrat de ce qui sera construit.
  3. Plan. Décomposer le spec en un plan d'implémentation ordonné et vérifiable avant de toucher au code.
  4. Execute. Implémenter selon le plan, avec des points de contrôle de révision.
  5. Record. Distiller ce qui a été construit et pourquoi dans un enregistrement de décision (voir recording-decisions).

Décomposer les efforts conséquents. Si une demande concerne plusieurs sous-systèmes indépendants, s'arrêter et décomposer avant d'affiner les détails. Chaque sous-projet exécute son propre cycle, construit dans l'ordre des dépendances.

Quand ne PAS l'utiliser

Les modifications véritablement triviales et réversibles (une faute de frappe, une ligne de log, une valeur de configuration) passent directement à l'étape Execute. Le test : une hypothèse erronée coûterait-elle plus que l'étape de conception ? Si oui, concevoir d'abord.

Rationalisations courantes

ExcuseRéalité
« C'est trop simple pour avoir besoin d'une conception »Les tâches simples cachent des hypothèses. Quelques phrases de conception coûtent peu ; une réécriture, non.
« Je vais concevoir en avançant »Le code écrit avant que la conception soit figée est du code à réécrire. La conception est un acte séparé.
« L'utilisateur m'a dit quoi construire, C'EST la conception »Une demande énonce quoi, pas comment. Le comment est la conception.
« Explorer la base de code d'abord me révélera l'approche »L'exploration informe la conception ; elle ne remplace pas l'approbation de celle-ci.
« On est pressés »La précipitation est exactement le moment où une conception sautée produit du travail jetable.

Signaux d'alarme — ARRÊT

  • Ouvrir l'éditeur avant qu'une conception approuvée existe
  • « Laisse-moi juste prototyper rapidement » (un prototype sans spec est un périmètre non vérifié)
  • Commencer une modification multi-fichiers sans plan
  • Considérer la demande en une ligne de l'utilisateur comme un spec fini

Tous ces signaux signifient : arrêter, concevoir, obtenir l'approbation, puis construire.

Raisonnement complet : Article I de la constitution, regroupé dans engineering-constitution/references/engineering-constitution.md.

Individual skills in this repo

This repo contains 18 individual skills — each has its own dedicated page.

lguidolin/change-hygiene-and-code-craft

Use when writing or refactoring code, structuring a commit or PR, or deciding whether to abstract duplication. Symptoms — mixing reorg with logic changes, a PR doing several things at once, a file growing large, the second copy of similar code, or unsure whether to DRY something up.

lguidolin/cloud-delivery-aks

Use when deploying to Kubernetes or Azure Kubernetes Service (AKS), configuring cloud secrets, setting up progressive rollout/canary, per-PR ephemeral environments, or k8s health probes. Keywords — Kubernetes, AKS, Key Vault, Argo Rollouts, Flagger, canary, blue-green, liveness, readiness, PodDisruptionBudget, HPA, rollback, GHCR.

lguidolin/commit-history-rewrite

Use when an existing repository has messy commit history that needs to conform to conventional commits before adopting release-please, or when intermediate WIP/fixup/merge commits need to be cleaned up.

lguidolin/conventional-commits-and-releases

Use when committing, writing a commit message, opening a PR that will be squash-merged, or configuring automated versioning/changelogs. Keywords — conventional commits, release-please, semver, feat/fix/chore, breaking change, changelog.

lguidolin/defense-in-depth-security

Use when handling untrusted input, secrets, authentication/authorization, or dependencies — or threat-modeling a new surface. Keywords — STRIDE, threat model, least privilege, secrets management, supply chain, dependency scanning, input validation, audit log, defense in depth.

lguidolin/engineering-constitution

Use when starting work in a project that follows the engineering constitution, orienting to its rules, or deciding which engineering practice applies to a task — spec writing, commits, testing, security, deploys, database, or UI work.

lguidolin/graphql-contract-testing

Use when writing a GraphQL query/mutation that the UI and a test will share, or building route/schema contract or smoke tests. Symptoms — copying a query into a test, a test asserting on query text, schema change that didn't break the UI build, or RLS/permission drift. Keywords — graphql-codegen, typed document, contract test, route smoke test.

lguidolin/init-repo-CI

Use when setting up a new repository with conventional commits, release-please, and CI automation, or when retrofitting an existing repository that lacks automated versioning and PR validation workflows.

lguidolin/interface-craft-and-accessibility

Use when building or styling UI — components, layouts, forms, design tokens — or making accessibility decisions. Keywords — a11y, WCAG, keyboard navigation, focus state, contrast, design system, minimalist UI, component reuse, ARIA, semantic HTML.

lguidolin/merge-gates-and-automation

Use when setting up or changing CI, pre-push hooks, or a task runner, or deciding what must pass before merge. Symptoms — tempted to put authoritative checks only in a local hook, skip CI, bypass with --no-verify, or unsure what gates a merge vs. runs locally.

lguidolin/observability-and-slos

Use when adding logging, metrics, tracing, health checks, SLOs, or alerting — or when building a service surface that needs to be operable and debuggable. Keywords — structured logs, OpenTelemetry, correlation id, RED metrics, liveness, readiness, SLI, SLO, error budget, alerting.

lguidolin/performance-and-scale

Use when working on hot paths, list endpoints, pagination, data-access in loops, or public interfaces/schemas. Symptoms — unbounded queries, N+1 access, no latency budget, optimizing without measuring, or changing an interface many consumers depend on. Keywords — pagination, N+1, Hyrum's Law, performance budget, bundle size.

lguidolin/postgres-postgraphile-rls-and-sql

Use when writing PostgreSQL, PostGraphile config, Row-Level Security policies, SQL schema files, or working on the Browser→App→PostGraphile→Postgres data path. Keywords — RLS, SECURITY DEFINER, search_path, pgSettings, grants, roles, GraphQL depth limit, query cost, statement_timeout, SQL file organization.

lguidolin/recording-decisions

Use when a design or architecture decision has been made and needs to be captured — writing a decision record or ADR, updating a decision index, noting a deferred idea, or superseding a past decision. Keywords — ADR, decision record, rationale, rejected alternatives, dependency index.

lguidolin/resilience-and-deploy-safety

Use when planning a deploy, designing a rollback, or responding to an incident or writing a postmortem. Keywords — deploy safety, rollback, immutable artifact, progressive delivery, canary, blast radius, incident response, blameless postmortem, error budget.

lguidolin/ship-it

Use when the user wants to ship work — push, PR, archive decision records, merge, and clean up. Handles the full lifecycle from committing final changes through post-merge cleanup including converting specs/plans to compact decision records.

lguidolin/tests-as-a-control

Use when writing or modifying tests, when a test breaks during a refactor, or when testing permission/role rules. Symptoms — tempted to edit a test to make it pass, testing only the happy path, a deny-test that started passing, flaky tests, or unsure what to assert.

lguidolin/zero-downtime-migrations

Use when changing a database schema where data must survive the change — adding/removing/renaming columns, constraints, indexes, or backfilling. Symptoms — a destructive migration bundled with a code deploy, a NOT NULL column with a backfill, a table-locking UPDATE, or a rename. Keywords — expand/contract, parallel change, backfill, NOT VALID, CREATE INDEX CONCURRENTLY, graphile-migrate.

Skills associés