@sylad/cadence 1.0.0 → 1.1.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 +186 -15
- package/agents/acceptance-writer.md +19 -0
- package/agents/code-reviewer.md +2 -1
- package/agents/spec-writer.md +21 -0
- package/agents/ux-reviewer.md +20 -1
- package/bin/cadence.js +8 -1
- package/dist/audit.js +14 -2
- package/dist/cli.js +91 -6
- package/dist/config.js +34 -5
- package/dist/corrections.js +228 -0
- package/dist/news.js +54 -7
- package/dist/orchestrate/accept.js +303 -0
- package/dist/orchestrate/aval.js +46 -0
- package/dist/orchestrate/briefs.js +4 -1
- package/dist/orchestrate/command.js +19 -2
- package/dist/orchestrate/cycle.js +451 -20
- package/dist/orchestrate/launch.js +12 -5
- 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 +140 -0
- package/dist/plan.js +22 -1
- package/dist/spec.js +230 -0
- package/package.json +1 -1
- package/templates/acceptation-runner.mjs +53 -0
- package/templates/fiche.yaml +41 -0
- package/templates/orchestrate/accept.md +16 -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.md +28 -0
- package/templates/orchestrate/ux.md +1 -0
|
@@ -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.
|
|
@@ -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,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;
|