@sylad/cadence 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +286 -22
- package/agents/acceptance-writer.md +21 -0
- package/agents/code-reviewer.md +8 -1
- package/agents/spec-writer.md +23 -0
- package/agents/ux-reviewer.md +20 -1
- package/bin/cadence.js +11 -1
- package/dist/audit.js +14 -2
- package/dist/cli.js +233 -18
- package/dist/config.js +46 -5
- package/dist/corrections.js +228 -0
- package/dist/lead.js +72 -19
- package/dist/news.js +54 -7
- package/dist/orchestrate/accept.js +389 -0
- package/dist/orchestrate/aval.js +65 -0
- package/dist/orchestrate/briefs.js +7 -1
- package/dist/orchestrate/command.js +70 -20
- package/dist/orchestrate/continue.js +1 -1
- package/dist/orchestrate/cycle.js +662 -24
- package/dist/orchestrate/fiche.js +22 -0
- package/dist/orchestrate/launch.js +17 -10
- package/dist/orchestrate/maquette.js +27 -0
- package/dist/orchestrate/sandbox.js +38 -0
- package/dist/orchestrate/schemas.js +17 -1
- package/dist/orchestrate/spec.js +197 -0
- package/dist/orchestrate/state.js +2 -2
- package/dist/orchestrate/table.js +2 -0
- package/dist/plan.js +79 -1
- package/dist/spec.js +457 -0
- package/package.json +4 -3
- package/skills/lead/SKILL.md +33 -8
- package/templates/acceptation-runner.mjs +61 -0
- package/templates/fiche-back.yaml +75 -0
- package/templates/fiche.yaml +41 -0
- package/templates/orchestrate/accept-back.md +16 -0
- package/templates/orchestrate/accept.md +16 -0
- package/templates/orchestrate/fiche.md +14 -0
- package/templates/orchestrate/fix-minors.md +1 -0
- package/templates/orchestrate/fix.md +1 -0
- package/templates/orchestrate/implement.md +1 -0
- package/templates/orchestrate/maquette.md +12 -0
- package/templates/orchestrate/review-small.md +1 -0
- package/templates/orchestrate/review.md +1 -0
- package/templates/orchestrate/spec-back.md +25 -0
- package/templates/orchestrate/spec.md +28 -0
- package/templates/orchestrate/ux.md +1 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Gabarit de fiche back (lot sans écran, étape spec back d'orchestrate, L187). Copier dans docs/specs/<sujet>/fiche.yaml,
|
|
2
|
+
# remplacer les valeurs, puis `cadence spec check docs/specs/<sujet>/fiche.yaml`.
|
|
3
|
+
# Chaque clé et les invariants vérifiés sont décrits dans la section « spec » du README de cadence.
|
|
4
|
+
# Un lot qui a aussi un écran (screen:) ajoute à ce fichier la partie écran du gabarit templates/fiche.yaml
|
|
5
|
+
# (ecran, etats, champs, actions) : sujet.id et ecran.id sont alors le nom du dossier.
|
|
6
|
+
sujet:
|
|
7
|
+
id: mon-sujet # kebab-case ; nom du dossier docs/specs/<id>/
|
|
8
|
+
titre: Mon sujet
|
|
9
|
+
lot: L0 # le lot d'implémentation
|
|
10
|
+
perimetre: # ce que le lot touche : au moins un module, un endpoint ou un job
|
|
11
|
+
modules: [backend/src/modules/mon-module]
|
|
12
|
+
endpoints: ["GET /api/elements"]
|
|
13
|
+
jobs: []
|
|
14
|
+
hors_perimetre: ["l'affichage dans le frontend (un lot d'écran à part)"] # facultatif : ce que le lot ne fait pas
|
|
15
|
+
|
|
16
|
+
cas: # C1, C2… dans l'ordre, sans trou
|
|
17
|
+
- id: C1
|
|
18
|
+
titre: Le client lit la liste alors que la source est en panne
|
|
19
|
+
acteur: un client de l'API
|
|
20
|
+
declencheur: GET /api/elements # un appel de contrat, un job ou une commande
|
|
21
|
+
preconditions:
|
|
22
|
+
- la source externe ne répond pas
|
|
23
|
+
nominal: # les étapes du cas passant
|
|
24
|
+
- Le service interroge la source.
|
|
25
|
+
- L'appel échoue.
|
|
26
|
+
- Le service renvoie la dernière liste connue et écrit un warning.
|
|
27
|
+
alternatives: # { si, alors, regles } : chaque alternative cite au moins une règle
|
|
28
|
+
- { si: la source répond, alors: la réponse est fraîche, regles: [R2] }
|
|
29
|
+
resultat: La dernière liste connue au lieu d'une erreur.
|
|
30
|
+
- id: C2
|
|
31
|
+
titre: Le planificateur rafraîchit la liste
|
|
32
|
+
acteur: le planificateur
|
|
33
|
+
declencheur: job elements-refresh
|
|
34
|
+
preconditions:
|
|
35
|
+
- une liste est en cache
|
|
36
|
+
nominal:
|
|
37
|
+
- Le job appelle la source.
|
|
38
|
+
- Le cache est réécrit.
|
|
39
|
+
alternatives: []
|
|
40
|
+
sans_alternative: le seul échec du job est celui de C1 (R1) ; il n'a pas d'autre branche # obligatoire quand alternatives est vide
|
|
41
|
+
resultat: Le cache porte l'horodatage du dernier succès.
|
|
42
|
+
|
|
43
|
+
regles: # R1, R2… dans l'ordre, sans trou
|
|
44
|
+
- id: R1
|
|
45
|
+
cas: [C1, C2] # une règle back est rattachée à au moins un cas (une règle d'écran à un état : etat)
|
|
46
|
+
enonce: Quand la source échoue, l'API sert la dernière liste connue au lieu d'une erreur.
|
|
47
|
+
statut: sourcee # sourcee : dit d'où elle vient (source) ; hypothese : dit ce qui changerait (si_faux)
|
|
48
|
+
source: "demande du lot : « servir le dernier cache connu au lieu d'une erreur »" # une ligne du lot, un fichier:ligne, un contrat existant…
|
|
49
|
+
tests: ["R1 — source en panne : la dernière liste est servie"] # chaque test nommé « Rn — … »
|
|
50
|
+
- id: R2
|
|
51
|
+
cas: [C1]
|
|
52
|
+
enonce: Une réponse fraîche ne porte pas le champ ageSecondes.
|
|
53
|
+
statut: hypothese
|
|
54
|
+
si_faux: Si le champ doit toujours être présent, seul son contenu change (aucune donnée en jeu).
|
|
55
|
+
tests: ["R2 — réponse fraîche : ageSecondes absent"]
|
|
56
|
+
|
|
57
|
+
contrats: # A1, A2… dans l'ordre (dans une fiche mixte, communs avec les actions de l'écran)
|
|
58
|
+
- id: A1
|
|
59
|
+
appel: GET /api/elements # VERBE /chemin, job <nom> ou commande <nom>
|
|
60
|
+
entree: aucune
|
|
61
|
+
sortie: "la liste, ou une liste vide (HTTP 200)"
|
|
62
|
+
erreurs: # { code, message } : code « HTTP <n> » ou « log <niveau> », message = le texte exact
|
|
63
|
+
- { code: log warn, message: "Serving cached list: source unavailable" }
|
|
64
|
+
regles: [R1, R2]
|
|
65
|
+
- id: A2
|
|
66
|
+
appel: job elements-refresh
|
|
67
|
+
entree: "cron 0 */15 * * * *"
|
|
68
|
+
sortie: "cache réécrit après un succès, inchangé après un échec"
|
|
69
|
+
erreurs: []
|
|
70
|
+
sans_erreur: le job ne répond à aucun appelant ; son échec est un warning déjà couvert par A1 # obligatoire quand erreurs est vide
|
|
71
|
+
regles: [R1]
|
|
72
|
+
|
|
73
|
+
donnees: # D1… : les données touchées ([] si aucune)
|
|
74
|
+
- { id: D1, objet: "data/elements-cache.json ({ ts, data })", existant: true, modification: aucune, note: "relu en secours, format et écriture inchangés" }
|
|
75
|
+
# existant: true avec modification: ajout|changement exige decision: <la réponse du lead à la question ciblée>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Gabarit de fiche d'écran (étape spec d'orchestrate, L170). Copier dans docs/specs/<écran>/fiche.yaml,
|
|
2
|
+
# remplacer les valeurs, puis `cadence spec check docs/specs/<écran>/fiche.yaml`.
|
|
3
|
+
# Chaque clé et les invariants vérifiés sont décrits dans la section « spec » du README de cadence.
|
|
4
|
+
ecran:
|
|
5
|
+
id: mon-ecran # kebab-case ; nom du dossier docs/specs/<id>/
|
|
6
|
+
titre: Mon écran
|
|
7
|
+
route: /mon-ecran # commence par /
|
|
8
|
+
lot: L0 # le lot d'implémentation
|
|
9
|
+
largeurs: [1440, 390] # largeurs de rendu : toujours ces deux-là
|
|
10
|
+
maquette: docs/specs/mon-ecran/maquette.html
|
|
11
|
+
etats: [vide, chargement, erreur, charge] # au moins vide, chargement, erreur
|
|
12
|
+
|
|
13
|
+
champs: # id unique en kebab-case : c'est aussi le data-testid de la maquette
|
|
14
|
+
- { id: titre-page, libelle: Titre de la page, type: texte, source: statique, obligatoire: true }
|
|
15
|
+
- { id: liste-elements, libelle: Liste des éléments, type: liste, source: "GET /api/elements → items", obligatoire: true }
|
|
16
|
+
- { id: message-vide, libelle: Message d'état vide, type: texte, source: statique, obligatoire: true }
|
|
17
|
+
- { id: message-erreur, libelle: Message d'erreur de chargement, type: texte, source: statique, obligatoire: false }
|
|
18
|
+
- { id: bouton-reessayer, libelle: Réessayer, type: bouton, source: "action A2", obligatoire: false }
|
|
19
|
+
|
|
20
|
+
regles: # R1, R2… dans l'ordre, sans trou
|
|
21
|
+
- id: R1
|
|
22
|
+
etat: vide # l'un des etats : l'état où la règle s'applique et où son message est visible
|
|
23
|
+
enonce: Sans élément, l'écran affiche le message d'état vide à la place de la liste.
|
|
24
|
+
message: "Aucun élément pour le moment." # texte exact à l'écran, ou ~ (null) s'il n'y en a pas
|
|
25
|
+
champs: [message-vide] # les champs que la règle fait apparaître
|
|
26
|
+
masque: [liste-elements] # (vide seulement) les champs que la règle fait disparaître ; ids de la fiche
|
|
27
|
+
statut: sourcee # sourcee : dit d'où elle vient (source) ; hypothese : dit ce qui changerait (si_faux)
|
|
28
|
+
source: "demande du lot : « un état vide qui dit quoi faire »"
|
|
29
|
+
tests: ["R1 — état vide : le message s'affiche, pas de liste"] # chaque test nommé « Rn — … »
|
|
30
|
+
- id: R2
|
|
31
|
+
etat: erreur
|
|
32
|
+
enonce: Si l'appel échoue, l'écran affiche l'erreur et un bouton « Réessayer » qui rappelle l'API.
|
|
33
|
+
message: "Impossible de charger les éléments."
|
|
34
|
+
champs: [message-erreur, bouton-reessayer]
|
|
35
|
+
statut: hypothese
|
|
36
|
+
si_faux: Si le message doit changer, seul ce bloc change (aucune donnée en jeu).
|
|
37
|
+
tests: ["R2 — erreur : message et bouton Réessayer", "R2 — Réessayer relance l'appel"]
|
|
38
|
+
|
|
39
|
+
actions: # A1, A2… dans l'ordre
|
|
40
|
+
- { id: A1, declencheur: ~, appel: "GET /api/elements", regles: [R1, R2] } # ~ : le chargement de l'écran
|
|
41
|
+
- { id: A2, declencheur: bouton-reessayer, appel: "GET /api/elements", regles: [R2] }
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Acceptance tests of the behaviour of lot `{{lot}}` in `{{chemin}}`, as the acceptance writer: you write the tests BEFORE any code, from the sheet only, so that the implementer has an independent oracle. You are not the implementer: you do not write, read-to-copy or guess the implementation.
|
|
2
|
+
{{repos}}
|
|
3
|
+
{{accept}}
|
|
4
|
+
|
|
5
|
+
Rules:
|
|
6
|
+
- One or more cases per rule of the sheet, named exactly as the sheet plans it (`regles[].tests`, e.g. `R5 — une entrée de 14 jours est refusée : null`); the tests call the contracts of `contrats[]` as close as possible (the controller or the service for an HTTP call, the method of the job for a `job`), and simulate the external sources from `entree`. What cannot be automated is out of scope.
|
|
7
|
+
- Every test must FAIL for now, because the feature is missing (not because of a typo or a broken setup): the program runs the dedicated command and refuses tests that pass.
|
|
8
|
+
- Do not touch the sheet, the plan or any application code. Do not push, deliver, run `raf done`, `raf ux` or `raf review`.
|
|
9
|
+
- Commit with explicit paths (never `git add -A` or `commit -a`), ONE commit citing the lot (`test({{lot}}): acceptation R1–Rn (rouge)`) with the test files, the acceptation file and the runner configuration, and leave the working tree clean. The program seals the acceptation file afterwards (it adds the fingerprint of each test file): never write `empreintes` or `vert: true` yourself.
|
|
10
|
+
Decide minor interpretation questions yourself and list each one under "choix" with the alternative you did not take. Leave "questions" empty rather than writing a placeholder such as "no question".
|
|
11
|
+
{{commits}}
|
|
12
|
+
{{reponse}}
|
|
13
|
+
Report: `commits`, `nonVerifie` (what you could not run or check), `choix`, `questions`, `resume`.
|
|
14
|
+
|
|
15
|
+
You are one short session of an orchestrated wave: do not launch subagents (the Agent tool is disabled).
|
|
16
|
+
Give your final report as the structured output, not as free text.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Acceptance tests of the screen of lot `{{lot}}` in `{{chemin}}`, as the acceptance writer: you write the tests BEFORE any code, from the sheet and the mockup only, so that the implementer has an independent oracle. You are not the implementer: you do not write, read-to-copy or guess the implementation.
|
|
2
|
+
{{repos}}
|
|
3
|
+
{{accept}}
|
|
4
|
+
|
|
5
|
+
Rules:
|
|
6
|
+
- One or more cases per rule of the sheet, named exactly as the sheet plans it (`regles[].tests`, e.g. `R3 — erreur : message et bouton Réessayer`); selectors are the `data-testid` of the fields (= field ids of the sheet); API calls are simulated from `actions[]`. What cannot be automated (rendering, ergonomics, readability) is out of scope.
|
|
7
|
+
- Every test must FAIL for now, because the feature is missing (not because of a typo or a broken setup): the program runs the dedicated command and refuses tests that pass.
|
|
8
|
+
- Do not touch the sheet, the mockup, the plan or any application code. Do not push, deliver, run `raf done`, `raf ux` or `raf review`.
|
|
9
|
+
- Commit with explicit paths (never `git add -A` or `commit -a`), ONE commit citing the lot (`test({{lot}}): acceptation R1–Rn (rouge)`) with the test files, the acceptation file and the runner configuration, and leave the working tree clean. The program seals the acceptation file afterwards (it adds the fingerprint of each test file): never write `empreintes` or `vert: true` yourself.
|
|
10
|
+
Decide minor interpretation questions yourself and list each one under "choix" with the alternative you did not take. Leave "questions" empty rather than writing a placeholder such as "no question".
|
|
11
|
+
{{commits}}
|
|
12
|
+
{{reponse}}
|
|
13
|
+
Report: `commits`, `nonVerifie` (what you could not run or check), `choix`, `questions`, `resume`.
|
|
14
|
+
|
|
15
|
+
You are one short session of an orchestrated wave: do not launch subagents (the Agent tool is disabled).
|
|
16
|
+
Give your final report as the structured output, not as free text.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Sheet review of lot `{{lot}}` — "{{titre}}" — of the repository `{{chemin}}`, following your agent instructions (sheet mode).
|
|
2
|
+
Goal of the lot: {{objectif}}
|
|
3
|
+
{{repos}}
|
|
4
|
+
{{fiche}}
|
|
5
|
+
|
|
6
|
+
You review the sheet BEFORE any code is written: the later steps (acceptance tests, implementation, code review) take it as their reference. This is NOT the review of the code of the lot, and not the `raf review` verdict.
|
|
7
|
+
Read the project's CLAUDE.md first, then the sheet, then the code and the tests of the modules of `sujet.perimetre`, and every source the sheet cites. Check, with a measurement for each finding (the file:line you opened, the command you ran):
|
|
8
|
+
1. Sourced or hypothesis. Each `sourcee` rule cites a source that exists: open the file:line or the note and read what it says. Each `hypothese` carries a `si_faux` and does not hide one of the four expensive categories (data model or storage; public or shared API contract or published route; destructive or irreversible action; contradiction with a sourced rule) — such a hypothesis is a *major* finding.
|
|
9
|
+
2. No contradiction. With a rule already coded (search the modules of the perimeter, open the existing tests that assert the opposite) and with an existing API contract (field, error code, route).
|
|
10
|
+
3. Errors and limits. For each contract: the empty, absent, expired, oversized and duplicate inputs and each failure of an external source have a rule, or a motivated `sans_alternative` / `sans_erreur`.
|
|
11
|
+
4. One test per rule. Each rule has at least one planned test whose name says what is checked and could fail (the program already checks that a test is planned).
|
|
12
|
+
Rank the findings blocking / major / minor, never on taste: a blocking or major finding sends the sheet back to the spec writer (one more pass only), a minor one becomes a note of the lot.
|
|
13
|
+
You are read-only: do not modify, commit, push or run `raf review|ux|done`. Do not launch subagents. Leave `sousTaches` empty: a sheet has no bug to sub-task.
|
|
14
|
+
Give your report as the structured output: counts of blocking / major / minor findings, each finding (severity, file, line, text), what you could not verify, and a one-line verdict.
|
|
@@ -2,6 +2,7 @@ Work in `{{chemin}}` on lot `{{lot}}` — "{{titre}}" — of its plan
|
|
|
2
2
|
(`docs/plan/raf.yaml`, or the file named by `plan:` in `cadence.yaml`; read the lot, its notes and sub-tasks, and the project's CLAUDE.md first).
|
|
3
3
|
Goal: {{objectif}}
|
|
4
4
|
{{repos}}
|
|
5
|
+
{{fiche}}
|
|
5
6
|
Rules: test first; commit each sub-part as soon as its tests pass, with explicit paths (never
|
|
6
7
|
`git add -A` or `commit -a`), and a message that cites the lot (`feat({{lot}}): …`); run the project's
|
|
7
8
|
full test suite and build before reporting; do not push, deliver, run `raf done`, `raf ux` or
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
UX review of the mockup of the screen of lot `{{lot}}` — "{{titre}}" — in `{{chemin}}`, following your agent instructions (mockup mode).
|
|
2
|
+
Goal of the lot: {{objectif}}
|
|
3
|
+
{{repos}}
|
|
4
|
+
{{maquette}}
|
|
5
|
+
|
|
6
|
+
You review the mockup BEFORE any code is written: the later steps (acceptance tests, implementation) will take the sheet and the mockup as their reference. Read the project's CLAUDE.md and its charter (existing CSS and variables, neighbouring components) first: the product's identity is a constraint.
|
|
7
|
+
Besides the usability and accessibility checks of your instructions, check the consistency between the mockup and the sheet: every field of `champs` is in the mockup with its `data-testid`, every rule message (`regles[].message`) is visible, word for word, in the state named by the `etat` of the rule, every state of `etats` has its section `#etat-<état>`, the `masque` of an empty-state rule really hides the fields it names.
|
|
8
|
+
Check the sample data of the mockup: recompute the weekday of every date shown (do not trust the one written). A wrong sample datum (weekday, date, figure that does not add up) is a minor finding, not a major one: it changes no rule, no field and no state of the sheet, and is fixed in a line.
|
|
9
|
+
Ground every finding in a named rule (Nielsen heuristic, WCAG 2.2 AA criterion) or a measurement, or in a mismatch between the mockup and the sheet. Rank them blocking / major / minor: a blocking or major finding sends the mockup back to the spec writer, a minor one becomes a note of the lot.
|
|
10
|
+
You are read-only: do not modify, commit, push or run `raf review|ux|done`; this review is NOT the `raf ux` verdict (the conformity pass after the code keeps that role). Do not launch subagents. Leave `sousTaches` empty: a mockup has no bug to sub-task.
|
|
11
|
+
Give your report as the structured output: counts of blocking / major / minor findings, each finding (severity, file, line, text), what you could not verify, and a one-line verdict.
|
|
12
|
+
Playwright (browser MCP): this session's Playwright server was launched by the orchestrator with its own output directory, which lies in the orchestrator's run directory, outside the repository. Every screenshot, snapshot and trace you take lands there, so give each one a relative file name only (e.g. `maquette-erreur-390-revue.png`), never an absolute path, never the `--output-dir` option, and never write browser outputs anywhere else; the repository must stay clean.
|
|
@@ -3,6 +3,7 @@ This lot is small: one single pass covers the code review AND the usability revi
|
|
|
3
3
|
You are given the repository path and the lot id only: read the diff yourself from the commits that
|
|
4
4
|
cite the lot (`raf commits {{lot}}`, or `git log`), run the checks, report real defects only.
|
|
5
5
|
{{repos}}
|
|
6
|
+
{{fiche}}
|
|
6
7
|
{{ux}}
|
|
7
8
|
{{checks}}
|
|
8
9
|
{{docs}}
|
|
@@ -2,6 +2,7 @@ Review lot `{{lot}}` — "{{titre}}" — of the repository `{{chemin}}`, followi
|
|
|
2
2
|
You are given the repository path and the lot id only: read the diff yourself from the commits that
|
|
3
3
|
cite the lot (`raf commits {{lot}}`, or `git log`), run the checks, report real defects only.
|
|
4
4
|
{{repos}}
|
|
5
|
+
{{fiche}}
|
|
5
6
|
{{checks}}
|
|
6
7
|
{{docs}}
|
|
7
8
|
{{choix}}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
Spec of the behaviour of lot `{{lot}}` — "{{titre}}" — in `{{chemin}}`, as the spec writer: you write a machine-readable sheet (use cases, rules, contracts, data) BEFORE any code, so that the later steps (review of the sheet, acceptance tests, implementation) share one reference. There is no screen part: only the sheet.
|
|
2
|
+
Goal of the lot: {{objectif}}
|
|
3
|
+
{{repos}}
|
|
4
|
+
Read the lot, its notes and sub-tasks in the plan (`docs/plan/raf.yaml`, or the file named by `plan:` in `cadence.yaml`), the project's CLAUDE.md, and the code and tests of the modules the lot touches (the services, controllers or jobs, their tests, the API contracts and error messages already present): the rules already coded are sources, and a new rule must not contradict them.
|
|
5
|
+
{{spec}}
|
|
6
|
+
|
|
7
|
+
What you produce, in `<dir>/<sujet>/`:
|
|
8
|
+
- `fiche.yaml`, in the format of the template below (`sujet`, `cas`, `regles`, `contrats`, `donnees`). Check it with `cadence spec check <fiche>` until it is valid.
|
|
9
|
+
|
|
10
|
+
Sheet rules:
|
|
11
|
+
- Every use case (`cas`) names its trigger (a contract call, a job, a command), its preconditions, its nominal steps, and its alternatives and error cases, each pointing to the rules that govern it — or says `alternatives: []` with its reason in `sans_alternative`.
|
|
12
|
+
- Every rule is `sourcee` (it says where it comes from: a line of the lot, a note, a rule already coded as **file:line** — the review opens it —, an existing API contract, an existing test, a requirement of a reference document) or `hypothese` (you chose it for lack of a source; `si_faux` says what would change if it were wrong). Never present a guess as sourced. Every rule is attached to at least one case and has at least one planned test, named `Rn — …`, whose name says what is checked and could fail.
|
|
13
|
+
- Every contract (`contrats`) gives the call (`VERBE /chemin`, `job <nom>` or `commande <nom>`), the input, the output and the errors with the exact code (`HTTP <n>` or `log <level>`) and the exact message; for each, think of the empty, absent, expired, oversized and duplicate inputs and of every failure of an external source, and give each a rule — or say `sans_erreur` with the reason.
|
|
14
|
+
- Every datum the lot touches is in `donnees`; an existing datum whose model changes needs the lead's `decision`: that is a question (below).
|
|
15
|
+
- A rule you invent is not a free choice: **a hypothesis whose `si_faux` involves an expensive-to-undo choice is a question, not a hypothesis.** The four expensive categories: a data model or storage (key, column, table, file or cache format, migration); a public or shared API contract, or an already published route or job name (renaming, removing or changing the type or the meaning of a field, an error code, a route); a destructive or irreversible action (deletion, purge, sending a mail or a notification, payment, one-way migration); a rule that contradicts an existing sourced rule or a rule already coded. In those cases do not write the hypothesis: stop and put the question under "questions" (the lead answers and the step is resumed). Everything else (wording, order, a default) is a written hypothesis, cheap to correct later. **An optional field added to an existing response is not a break** when the sheet proves the old response is unchanged (a rule says so): write it as a hypothesis with its `si_faux`.
|
|
16
|
+
- If, after reading the lot and the code, you find that the lot changes NO behaviour (nothing a user, an API client or another service can observe: a lint, a rename, a move, a doc, a CI or cache setting without observable effect), write one line with the reason in `sousSeuil`, create no sheet, and finish: the lot then follows the usual path.
|
|
17
|
+
|
|
18
|
+
Commit the sheet with explicit paths (never `git add -A` or `commit -a`), a message that cites the lot (`spec({{lot}}): …`), and leave the working tree clean. Do not implement the behaviour, do not write application code or tests, do not push, deliver, run `raf done`, `raf ux` or `raf review`.
|
|
19
|
+
Decide minor interpretation questions yourself and list each one under "choix" with the alternative you did not take. Leave "questions" empty rather than writing a placeholder such as "no question".
|
|
20
|
+
{{commits}}
|
|
21
|
+
{{reponse}}
|
|
22
|
+
Report: `fiche` (path of the sheet relative to the repository, e.g. `docs/specs/<sujet>/fiche.yaml`, or empty under the threshold), `sousSeuil` (the reason, or empty), `commits`, `nonVerifie` (what you could not check), `choix`, `questions`, `resume`.
|
|
23
|
+
|
|
24
|
+
You are one short session of an orchestrated wave: do not launch subagents (the Agent tool is disabled).
|
|
25
|
+
Give your final report as the structured output, not as free text.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Spec of the screen of lot `{{lot}}` — "{{titre}}" — in `{{chemin}}`, as the spec writer: you write a static mockup and a machine-readable sheet BEFORE any code, so that the later steps (UX review of the mockup, acceptance tests, implementation) share one reference.
|
|
2
|
+
Goal of the lot: {{objectif}}
|
|
3
|
+
{{repos}}
|
|
4
|
+
Read the lot, its notes and sub-tasks in the plan (`docs/plan/raf.yaml`, or the file named by `plan:` in `cadence.yaml`), the project's CLAUDE.md, its charter (existing CSS and variables, neighbouring components, `docs/qa/expectations.md`) and the routes and API contracts already present.
|
|
5
|
+
{{spec}}
|
|
6
|
+
|
|
7
|
+
What you produce, in `<dir>/<écran>/`:
|
|
8
|
+
1. `maquette.html`: static HTML + CSS, to the project's charter (reuse its variables, fonts and components; invent no style when an equivalent exists), no business JavaScript. Every state is an addressable section: `<section id="etat-vide">`, `etat-chargement`, `etat-erreur`, and `etat-charge` when the screen has data. Every field of the sheet carries `data-testid="<id of the field>"`.
|
|
9
|
+
2. The captures described above, one per state and per width, copied from the Playwright output directory of this wave into the folder (a Playwright capture lands outside the repository: give it a relative file name only, then copy it).
|
|
10
|
+
3. `fiche.yaml`, in the format of the template below. Check it with `cadence spec check <fiche>` until it is valid, and derive the QA expectations with `cadence spec qa <fiche>` only if the lot asks for it.
|
|
11
|
+
|
|
12
|
+
Sheet rules:
|
|
13
|
+
- Every rule is `sourcee` (it says where it comes from: a line of the lot, a note, `expectations.md`, a rule already coded, an API contract) or `hypothese` (you chose it for lack of a source; `si_faux` says what would change if it were wrong). Never present a guess as sourced.
|
|
14
|
+
- Check every date in the sample data of the mockup before keeping it: compute its weekday (a command such as `date -d 2026-09-03 +%A`, or a script), never write it from memory — a « Wed 03/09 » that is a Thursday sends the mockup back for nothing. The same goes for any figure that must add up (a score and its result, a total and its parts).
|
|
15
|
+
- Expose the messages exactly as the screen shows them; the message of a rule is visible in the state its `etat` names.
|
|
16
|
+
- A rule you invent is not a free choice: **a hypothesis whose `si_faux` involves an expensive-to-undo choice is a question, not a hypothesis.** The four expensive categories: a data model or storage (key, migration, user data created once shipped); a public or shared API contract, or an already published route / URL; a destructive or irreversible action (deletion, sending, payment); a rule that contradicts an existing sourced rule. In those cases do not write the hypothesis: stop and put the question under "questions" (the lead answers and the step is resumed). Everything else (wording, order of the fields, error state, spacing) is a written hypothesis, cheap to correct later.
|
|
17
|
+
- If, after reading the lot and the code, you find that the lot changes NO screen (no new page, component or modified journey), write one line with the reason in `sousSeuil`, create no mockup and no sheet, and finish: the lot then follows the usual path.
|
|
18
|
+
|
|
19
|
+
Commit the spec with explicit paths (never `git add -A` or `commit -a`), a message that cites the lot (`spec({{lot}}): …`), the sheet, the mockup and the captures together, and leave the working tree clean. Do not implement the screen, do not write application code or tests, do not push, deliver, run `raf done`, `raf ux` or `raf review`.
|
|
20
|
+
Decide minor interpretation questions yourself and list each one under "choix" with the alternative you did not take. Leave "questions" empty rather than writing a placeholder such as "no question".
|
|
21
|
+
{{commits}}
|
|
22
|
+
{{reponse}}
|
|
23
|
+
Report: `fiche` (path of the sheet relative to the repository, e.g. `docs/specs/<screen>/fiche.yaml`, or empty under the threshold), `sousSeuil` (the reason, or empty), `commits`, `nonVerifie` (what you could not render or check), `choix`, `questions`, `resume`.
|
|
24
|
+
|
|
25
|
+
You are one short session of an orchestrated wave: do not launch subagents (the Agent tool is disabled).
|
|
26
|
+
Give your final report as the structured output, not as free text.
|
|
27
|
+
Browser (Playwright): the orchestrator launched the Playwright MCP server with its own output directory, in the orchestrator's run directory outside the repository: give screenshots, snapshots and traces a relative file name only (e.g. `maquette-vide-1440.png`), they land there. Never an absolute path, never the `--output-dir` option (the server's launch argument, which a session cannot set).
|
|
28
|
+
{{captures}}
|
|
@@ -2,6 +2,7 @@ Review the usability and accessibility of lot `{{lot}}` — "{{titre}}" — of t
|
|
|
2
2
|
following your agent instructions. Read the diff yourself from the commits that cite the lot
|
|
3
3
|
(`raf commits {{lot}}`, or `git log`).
|
|
4
4
|
{{ux}}
|
|
5
|
+
{{fiche}}
|
|
5
6
|
A proposed sub-task describes an observable bug (a wrong output, a crash, a measured regression); any other minor finding stays a note of this lot, not a sub-task.
|
|
6
7
|
You are read-only: do not modify, commit, push or run `raf review|ux|done`. Do not launch subagents.
|
|
7
8
|
Ground every finding in a named rule (Nielsen heuristic, WCAG 2.2 AA criterion) or a measurement;
|