create-lathe 0.0.0-stage → 0.4.1

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.
Files changed (89) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +168 -2
  3. package/bin/create-lathe.js +88 -0
  4. package/dist/framework.lock +115 -0
  5. package/dist/package/crates/instrument/Cargo.lock +415 -0
  6. package/dist/package/crates/instrument/Cargo.toml +27 -0
  7. package/dist/package/crates/instrument/examples/instrument.rs +73 -0
  8. package/dist/package/crates/instrument/src/client.rs +128 -0
  9. package/dist/package/crates/instrument/src/lib.rs +32 -0
  10. package/dist/package/crates/instrument/src/logging.rs +109 -0
  11. package/dist/package/crates/instrument/src/protocol.rs +49 -0
  12. package/dist/package/crates/instrument/src/registry.rs +166 -0
  13. package/dist/package/crates/instrument/src/selftest.rs +375 -0
  14. package/dist/package/crates/instrument/src/server.rs +363 -0
  15. package/dist/package/crates/instrument/tests/command_log.rs +60 -0
  16. package/dist/package/crates/instrument/tests/erreurs.rs +167 -0
  17. package/dist/package/crates/instrument/tests/round_trip.rs +230 -0
  18. package/dist/package/crates/instrument/tests/selftest_fail.rs +25 -0
  19. package/dist/package/crates/instrument/tests/selftest_pass.rs +24 -0
  20. package/dist/package/crates/instrument/tests/selftest_temps.rs +43 -0
  21. package/dist/package/crates/instrument/tests/support/mod.rs +58 -0
  22. package/dist/package/pi/context/journal-de-lot.md +24 -0
  23. package/dist/package/pi/context/tech-skill.md +19 -0
  24. package/dist/package/pi/context/ticket-closed.md +18 -0
  25. package/dist/package/scripts/framework.py +1384 -0
  26. package/dist/package/scripts/gates.py +1158 -0
  27. package/dist/package/scripts/setup.py +251 -0
  28. package/dist/package/skills/bootstrap/SKILL.md +110 -0
  29. package/dist/package/skills/documentation/SKILL.md +110 -0
  30. package/dist/package/skills/documentation/references/agents-md.md +70 -0
  31. package/dist/package/skills/documentation/references/corpus.md +112 -0
  32. package/dist/package/skills/journal/SKILL.md +81 -0
  33. package/dist/package/skills/journal/references/entry.md +172 -0
  34. package/dist/package/skills/lathe/SKILL.md +185 -0
  35. package/dist/package/skills/lathe/evals/routing.md +231 -0
  36. package/dist/package/skills/lathe/references/install.md +161 -0
  37. package/dist/package/skills/lathe/references/invariants.md +31 -0
  38. package/dist/package/skills/mutants/SKILL.md +88 -0
  39. package/dist/package/skills/mutants/references/cargo-mutants.md +176 -0
  40. package/dist/package/skills/mutants/references/triage.md +88 -0
  41. package/dist/package/skills/optimize/SKILL.md +87 -0
  42. package/dist/package/skills/optimize/references/codspeed.md +126 -0
  43. package/dist/package/skills/probe/SKILL.md +82 -0
  44. package/dist/package/skills/probe/references/wait-and-read.md +53 -0
  45. package/dist/package/skills/replicate-ui/SKILL.md +64 -0
  46. package/dist/package/skills/rust/SKILL.md +147 -0
  47. package/dist/package/skills/rust/references/errors.md +63 -0
  48. package/dist/package/skills/rust/references/unsafe.md +65 -0
  49. package/dist/package/skills/scaffold/SKILL.md +78 -0
  50. package/dist/package/skills/scaffold/profiles/rust-cli/.cargo/config.toml +2 -0
  51. package/dist/package/skills/scaffold/profiles/rust-cli/AGENTS.md +22 -0
  52. package/dist/package/skills/scaffold/profiles/rust-cli/Cargo.lock +7 -0
  53. package/dist/package/skills/scaffold/profiles/rust-cli/Cargo.toml +17 -0
  54. package/dist/package/skills/scaffold/profiles/rust-cli/README.md +15 -0
  55. package/dist/package/skills/scaffold/profiles/rust-cli/deny.toml +14 -0
  56. package/dist/package/skills/scaffold/profiles/rust-cli/rustfmt.toml +2 -0
  57. package/dist/package/skills/scaffold/profiles/rust-cli/src/main.rs +38 -0
  58. package/dist/package/skills/scaffold/profiles/rust-cli/tests/cli.rs +27 -0
  59. package/dist/package/skills/scaffold/profiles/rust-library/.cargo/config.toml +2 -0
  60. package/dist/package/skills/scaffold/profiles/rust-library/AGENTS.md +21 -0
  61. package/dist/package/skills/scaffold/profiles/rust-library/Cargo.lock +7 -0
  62. package/dist/package/skills/scaffold/profiles/rust-library/Cargo.toml +18 -0
  63. package/dist/package/skills/scaffold/profiles/rust-library/README.md +15 -0
  64. package/dist/package/skills/scaffold/profiles/rust-library/deny.toml +14 -0
  65. package/dist/package/skills/scaffold/profiles/rust-library/rustfmt.toml +2 -0
  66. package/dist/package/skills/scaffold/profiles/rust-library/src/lib.rs +25 -0
  67. package/dist/package/skills/scaffold/profiles/rust-native-desktop/.cargo/config.toml +2 -0
  68. package/dist/package/skills/scaffold/profiles/rust-native-desktop/AGENTS.md +23 -0
  69. package/dist/package/skills/scaffold/profiles/rust-native-desktop/Cargo.lock +9252 -0
  70. package/dist/package/skills/scaffold/profiles/rust-native-desktop/Cargo.toml +24 -0
  71. package/dist/package/skills/scaffold/profiles/rust-native-desktop/README.md +15 -0
  72. package/dist/package/skills/scaffold/profiles/rust-native-desktop/deny.toml +35 -0
  73. package/dist/package/skills/scaffold/profiles/rust-native-desktop/rustfmt.toml +2 -0
  74. package/dist/package/skills/scaffold/profiles/rust-native-desktop/src/main.rs +74 -0
  75. package/dist/package/skills/scaffold/references/gates.md +29 -0
  76. package/dist/package/skills/scaffold/references/profiles.md +36 -0
  77. package/dist/package/skills/update/SKILL.md +115 -0
  78. package/dist/package/skills/verify-visual/SKILL.md +82 -0
  79. package/dist/package/skills/verify-visual/references/baseline.md +46 -0
  80. package/dist/package/skills/visual-loop/SKILL.md +72 -0
  81. package/dist/package/workflows/batch-to-review.md +41 -0
  82. package/dist/package/workflows/framework-improvement.md +38 -0
  83. package/dist/package/workflows/hard-bug.md +37 -0
  84. package/dist/package/workflows/new-rust-cli.md +33 -0
  85. package/dist/package/workflows/new-rust-desktop-app.md +41 -0
  86. package/dist/package/workflows/new-rust-library.md +34 -0
  87. package/dist/package/workflows/performance-work.md +41 -0
  88. package/dist/package/workflows/ui-change.md +40 -0
  89. package/package.json +33 -4
@@ -0,0 +1,78 @@
1
+ ---
2
+ name: scaffold
3
+ description: Create a new Rust project from one of the profiles shipped with this skill. Use when the target has no Cargo.toml and no src/, or when the user asks to start a Rust project from scratch.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Scaffold
8
+
9
+ Turn an empty directory into a project that compiles and whose gates are already wired, by copying one profile from `profiles/<profile>/`, a directory that ships **inside this skill**. The profile carries the manifest, the lints, the gate configuration and the `Profile:` line; this step copies it, proves it, and names the next step. It generates no code, asks no interactive question, and chooses no stack beyond the profile.
10
+
11
+ ## Non-negotiables
12
+
13
+ - **Never scaffold before the spec** (R-031). This is lathe rung 4: `grill-with-docs`, `to-spec` and `to-tickets` come first.
14
+ - **Copy, never rewrite.** Files land byte for byte from `profiles/<profile>/`. A template that needs editing is a template bug, not a step in the copy.
15
+ - **No profile, no project.** Three profiles ship today — `rust-library`, `rust-cli` and
16
+ `rust-native-desktop`. A profile requested but absent stops the step; never simulate one.
17
+ - **No generator.** No `cargo new`, no placeholder substitution, no CLI of our own.
18
+ - **Never overwrite a project.** A `Cargo.toml` already present means this is not the step, whatever `src/` looks like. Copying over a manifest silently destroys the user's dependencies and versions.
19
+ - **Prove it, do not claim it.** `cargo check --all-targets` exits 0 in the destination before the handoff, and the exit code goes into the report.
20
+ - **A file the pinned toolchain rejects does not ship.** No manifest key that only nightly accepts, no unchecked placeholder, no TODO.
21
+
22
+ ## 1. Check the entry condition
23
+
24
+ ```bash
25
+ ls Cargo.toml src 2>/dev/null
26
+ head -5 AGENTS.md 2>/dev/null
27
+ ```
28
+
29
+ - `Cargo.toml` exists: **stop.** This is not the step, even when `src/` is missing — the project already made its choices and a copy would erase them. Name what you found.
30
+ - Neither `Cargo.toml` nor `src/` exists: continue.
31
+ - `src/` exists without `Cargo.toml`: the directory is malformed. List what is there and stop; do not guess a profile from stray files.
32
+
33
+ ## 2. Pick the profile
34
+
35
+ | The project is | Profile |
36
+ |---|---|
37
+ | a library: published API, no binary | `rust-library` |
38
+ | a command-line tool: one binary, exit codes | `rust-cli` |
39
+ | a native desktop window | `rust-native-desktop` |
40
+
41
+ `rust-native-desktop` ships with eight files: `Cargo.toml` on `gpui-kit = "0.11"`, the `Cargo.lock` that pins it, `src/main.rs` opening one window, `.cargo/config.toml`, `rustfmt.toml`, `deny.toml`, `AGENTS.md` carrying `Profile: rust-native-desktop`, and `README.md`. Its test opens the window headlessly, clicks the button and reads the counter back — an interaction, no pixel. Copy it whole, like the other two; `references/profiles.md` holds what each file carries.
42
+
43
+ One limitation stays, and it is not the profile: the official skill `gpui-kit-design-guides` is installed in no project here, so `gates.py deps` reports any project holding `gpui-kit` red until that skill lands in `.agents/skills/`. `bootstrap`, step 4, is where that red is named and quoted; this step copies the profile whole and proves it with `cargo check`.
44
+
45
+ One sentence to ask when the request fits none of the three rows. Never default silently: every gate from this rung on depends on the profile.
46
+
47
+ ## 3. Copy
48
+
49
+ The profiles live next to this file, under `profiles/`. Resolve that path from the location of this `SKILL.md`, never from the caller's working directory: the skill is installed away from the project, so `profiles/` is not a relative sibling of the project.
50
+
51
+ ```bash
52
+ src="$(dirname "$0")/profiles/<profile>" # adjust to how this skill was loaded
53
+ ls "$src" # list before copying: the agent sees the conflicts
54
+ cp -R "$src/." <destination>/
55
+ ```
56
+
57
+ The `/.` form is what carries `.cargo/config.toml`; a bare `cp -R <src>` into an existing directory nests it one level too deep. If any destination file already exists, stop and report the list instead of copying over it.
58
+
59
+ ## 4. Prove the copy
60
+
61
+ ```bash
62
+ cd <destination>
63
+ cargo check --all-targets # must exit 0
64
+ cargo test # unit test, doctest, integration test
65
+ head -5 AGENTS.md # must show Profile: <profile>
66
+ ```
67
+
68
+ The gates the profile already wires, and the exit code of each, are in `references/gates.md`. A non-zero exit is a defect in the profile: fix the profile, recopy, and say so in the report.
69
+
70
+ ## 5. Hand off
71
+
72
+ Report four facts and nothing more: the profile copied, the destination, the `cargo check` exit code, the `cargo test` exit code. The project's `AGENTS.md` already carries the `Profile:` line, so the next lathe run reads the profile from disk instead of guessing.
73
+
74
+ ## Done when
75
+
76
+ - The destination holds `Cargo.toml`, `Cargo.lock`, `src/`, `.cargo/config.toml`, `rustfmt.toml`, `deny.toml`, `AGENTS.md`, `README.md`.
77
+ - `cargo check --all-targets` exits 0 in the destination, and the exit code is quoted in the report.
78
+ - `head -5 <destination>/AGENTS.md` shows `Profile: <profile>`.
@@ -0,0 +1,2 @@
1
+ [build]
2
+ warnings = "deny"
@@ -0,0 +1,22 @@
1
+ # rust-cli
2
+
3
+ Profile: rust-cli
4
+
5
+ Template de crate binaire. Le scaffold copie ce dossier tel quel : le package s'appelle `rust-cli`, et le renommer touche `Cargo.toml` (`package.name`), puis `tests/cli.rs` (`CARGO_BIN_EXE_rust-cli`) et le message d'usage de `src/main.rs`.
6
+
7
+ ## Invariants
8
+
9
+ - Cible binaire seule : pas de `src/lib.rs`, pas de cible `lib` — le routeur lit cette absence comme le profil `rust-cli`.
10
+ - Toute sortie d'erreur passe par `ExitCode`, jamais par `std::process::exit`.
11
+ - Le message d'usage va sur `stderr` et sort avec le code `2` ; le succès sort avec `ExitCode::SUCCESS`.
12
+ - Toute API publique est documentée ; `.cargo/config.toml` refuse les warnings (`[build] warnings = "deny"`). Chaque cible a son `//!`, y compris les fichiers de `tests/`.
13
+ - Ne jamais ajouter `-- -D warnings` à une commande : la configuration du profil s'en charge sans invalider le cache.
14
+ - `rust-version = "1.97"` : `[build] warnings` n'existe pas dans un Cargo antérieur.
15
+ - Une dépendance ajoutée met à jour `deny.toml` (`[licenses] allow`).
16
+
17
+ ## Gates
18
+
19
+ Les commandes sont dans `README.md`. Avant une revue : `cargo fmt --check`, `cargo clippy --all-targets`, `cargo test`, `cargo deny check`.
20
+
21
+ Le corpus d'agent vit dans `documentation/llm/README.md`, créé par l'étape `documentation` ; le
22
+ journal du projet vit dans `documentation/changelog/`, créé par l'étape `journal`.
@@ -0,0 +1,7 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "rust-cli"
7
+ version = "0.1.0"
@@ -0,0 +1,17 @@
1
+ [package]
2
+ name = "rust-cli"
3
+ version = "0.1.0"
4
+ edition = "2024"
5
+ rust-version = "1.97"
6
+ description = "Minimal Rust command-line crate, ready for its gates."
7
+ license = "MIT OR Apache-2.0"
8
+
9
+ [lints.rust]
10
+ unsafe_code = "forbid"
11
+ missing_docs = "warn"
12
+
13
+ [lints.clippy]
14
+ pedantic = { level = "warn", priority = -1 }
15
+ module_name_repetitions = "allow"
16
+ missing_errors_doc = "allow"
17
+ missing_panics_doc = "allow"
@@ -0,0 +1,15 @@
1
+ # rust-cli
2
+
3
+ Crate binaire, edition 2024 : `src/main.rs` renvoie un `ExitCode`, `tests/cli.rs` lance le binaire via `CARGO_BIN_EXE_rust-cli`.
4
+
5
+ ```bash
6
+ cargo fmt --check # sort 1 en cas de dérive de format
7
+ cargo clippy --all-targets # warnings refusés par .cargo/config.toml
8
+ cargo test # test unitaire + test d'intégration
9
+ cargo run -- world # affiche hello, world
10
+ ```
11
+
12
+ Gate d'approvisionnement, à installer : `cargo deny check` (code de sortie en bitset : tester `!= 0`).
13
+
14
+ Dépendances inutilisées : `cargo machete`, à la demande. Le lint natif `unused_dependencies` exige nightly (`-Zcargo-lints`) et n'est pas utilisé ici.
15
+ N'installe rien : pas de cible bibliothèque, pas d'analyseur d'arguments, pas de `cargo-nextest`/`cargo-deny`, pas de GPUI Kit, pas de runtime asynchrone.
@@ -0,0 +1,14 @@
1
+ # `cargo deny check` exits with a bitmask: 1 advisories, 2 bans, 4 licenses, 8 sources.
2
+ # A gate tests `!= 0`, never `== 1`.
3
+ [advisories]
4
+ yanked = "deny"
5
+
6
+ [licenses]
7
+ allow = ["Apache-2.0", "MIT"]
8
+
9
+ [bans]
10
+ multiple-versions = "warn"
11
+
12
+ [sources]
13
+ unknown-registry = "deny"
14
+ unknown-git = "deny"
@@ -0,0 +1,2 @@
1
+ edition = "2024"
2
+ max_width = 100
@@ -0,0 +1,38 @@
1
+ //! Minimal CLI: greets one argument, exits with a usage code otherwise.
2
+
3
+ use std::process::ExitCode;
4
+
5
+ fn main() -> ExitCode {
6
+ match greeting(std::env::args().nth(1).as_deref()) {
7
+ Ok(line) => {
8
+ println!("{line}");
9
+ ExitCode::SUCCESS
10
+ }
11
+ Err(message) => {
12
+ eprintln!("{message}");
13
+ ExitCode::from(2)
14
+ }
15
+ }
16
+ }
17
+
18
+ fn greeting(name: Option<&str>) -> Result<String, &'static str> {
19
+ match name.map(str::trim) {
20
+ Some(name) if !name.is_empty() => Ok(format!("hello, {name}")),
21
+ _ => Err("usage: rust-cli <name>"),
22
+ }
23
+ }
24
+
25
+ #[cfg(test)]
26
+ mod tests {
27
+ use super::greeting;
28
+
29
+ #[test]
30
+ fn greets_a_name() {
31
+ assert_eq!(greeting(Some("world")), Ok(String::from("hello, world")));
32
+ }
33
+
34
+ #[test]
35
+ fn rejects_a_missing_name() {
36
+ assert_eq!(greeting(None), Err("usage: rust-cli <name>"));
37
+ }
38
+ }
@@ -0,0 +1,27 @@
1
+ //! Integration tests: run the built binary and check its exit codes.
2
+
3
+ use std::process::Command;
4
+
5
+ #[test]
6
+ fn prints_a_greeting() {
7
+ let output = Command::new(env!("CARGO_BIN_EXE_rust-cli"))
8
+ .arg("world")
9
+ .output()
10
+ .expect("the binary starts");
11
+
12
+ assert!(output.status.success());
13
+ assert_eq!(
14
+ String::from_utf8_lossy(&output.stdout).trim(),
15
+ "hello, world"
16
+ );
17
+ }
18
+
19
+ #[test]
20
+ fn exits_with_the_usage_code_without_an_argument() {
21
+ let output = Command::new(env!("CARGO_BIN_EXE_rust-cli"))
22
+ .output()
23
+ .expect("the binary starts");
24
+
25
+ assert_eq!(output.status.code(), Some(2));
26
+ assert!(String::from_utf8_lossy(&output.stderr).contains("usage: rust-cli"));
27
+ }
@@ -0,0 +1,2 @@
1
+ [build]
2
+ warnings = "deny"
@@ -0,0 +1,21 @@
1
+ # rust-library
2
+
3
+ Profile: rust-library
4
+
5
+ Template de crate bibliothèque. Le scaffold copie ce dossier tel quel : le package s'appelle `rust-library`, et le renommer touche `Cargo.toml` (`package.name`) puis le doctest de `src/lib.rs`.
6
+
7
+ ## Invariants
8
+
9
+ - Cible bibliothèque seule : pas de `src/main.rs`, pas de cible `bin`.
10
+ - Toute API publique est documentée ; `missing_docs = "warn"` remonte, et `.cargo/config.toml` refuse les warnings (`[build] warnings = "deny"`).
11
+ - `unsafe_code = "forbid"` : une dérogation se discute, elle ne s'écrit pas en `allow`.
12
+ - Ne jamais ajouter `-- -D warnings` à une commande : la configuration du profil s'en charge sans invalider le cache.
13
+ - `rust-version = "1.97"` : `[build] warnings` n'existe pas dans un Cargo antérieur.
14
+ - Une dépendance ajoutée met à jour `deny.toml` (`[licenses] allow`).
15
+
16
+ ## Gates
17
+
18
+ Les commandes sont dans `README.md`. Avant une revue : `cargo fmt --check`, `cargo clippy --all-targets`, `cargo test`, `cargo deny check`.
19
+
20
+ Le corpus d'agent vit dans `documentation/llm/README.md`, créé par l'étape `documentation` ; le
21
+ journal du projet vit dans `documentation/changelog/`, créé par l'étape `journal`.
@@ -0,0 +1,7 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "rust-library"
7
+ version = "0.1.0"
@@ -0,0 +1,18 @@
1
+ [package]
2
+ name = "rust-library"
3
+ version = "0.1.0"
4
+ edition = "2024"
5
+ rust-version = "1.97"
6
+ description = "Minimal Rust library crate, ready for its gates."
7
+ license = "MIT OR Apache-2.0"
8
+
9
+ [lints.rust]
10
+ unsafe_code = "forbid"
11
+ missing_docs = "warn"
12
+
13
+ [lints.clippy]
14
+ pedantic = { level = "warn", priority = -1 }
15
+ module_name_repetitions = "allow"
16
+ must_use_candidate = "allow"
17
+ missing_errors_doc = "allow"
18
+ missing_panics_doc = "allow"
@@ -0,0 +1,15 @@
1
+ # rust-library
2
+
3
+ Crate bibliothèque, edition 2024 : `src/lib.rs` avec un test unitaire et un doctest.
4
+
5
+ ```bash
6
+ cargo fmt --check # sort 1 en cas de dérive de format
7
+ cargo clippy --all-targets # warnings refusés par .cargo/config.toml
8
+ cargo test # test unitaire + doctest
9
+ RUSTDOCFLAGS="-D warnings" cargo doc --no-deps
10
+ ```
11
+
12
+ Gate d'approvisionnement, à installer : `cargo deny check` (code de sortie en bitset : tester `!= 0`) ; en bibliothèque, `cargo semver-checks` exige une version de référence publiée.
13
+
14
+ Dépendances inutilisées : `cargo machete`, à la demande. Le lint natif `unused_dependencies` exige nightly (`-Zcargo-lints`) et n'est pas utilisé ici.
15
+ N'installe rien : pas de cible binaire, pas de `cargo-nextest`/`cargo-deny`/`cargo-semver-checks`, pas de GPUI Kit, pas de runtime asynchrone.
@@ -0,0 +1,14 @@
1
+ # `cargo deny check` exits with a bitmask: 1 advisories, 2 bans, 4 licenses, 8 sources.
2
+ # A gate tests `!= 0`, never `== 1`.
3
+ [advisories]
4
+ yanked = "deny"
5
+
6
+ [licenses]
7
+ allow = ["Apache-2.0", "MIT"]
8
+
9
+ [bans]
10
+ multiple-versions = "warn"
11
+
12
+ [sources]
13
+ unknown-registry = "deny"
14
+ unknown-git = "deny"
@@ -0,0 +1,2 @@
1
+ edition = "2024"
2
+ max_width = 100
@@ -0,0 +1,25 @@
1
+ //! Minimal library crate: one function, one unit test, one doctest.
2
+
3
+ /// Returns the sum of its two arguments.
4
+ ///
5
+ /// # Examples
6
+ ///
7
+ /// ```
8
+ /// use rust_library::add;
9
+ ///
10
+ /// assert_eq!(add(2, 3), 5);
11
+ /// ```
12
+ #[must_use]
13
+ pub const fn add(left: u32, right: u32) -> u32 {
14
+ left + right
15
+ }
16
+
17
+ #[cfg(test)]
18
+ mod tests {
19
+ use super::add;
20
+
21
+ #[test]
22
+ fn adds_whole_numbers() {
23
+ assert_eq!(add(2, 3), 5);
24
+ }
25
+ }
@@ -0,0 +1,23 @@
1
+ # rust-native-desktop
2
+
3
+ Profile: rust-native-desktop
4
+
5
+ Template d'application de bureau GPUI Kit. Le scaffold copie ce dossier tel quel : le package s'appelle `rust-native-desktop`, et le renommer touche `Cargo.toml` (`package.name`).
6
+
7
+ ## Invariants
8
+
9
+ - Cible binaire seule : pas de `src/lib.rs`, pas de cible `lib`. Le routeur lit `gpui-kit` dans `Cargo.toml` comme le profil `rust-native-desktop`.
10
+ - Le rendu pixel existe sur macOS (Metal) et Linux (WGPU) seulement. Windows n'est jamais une cible de ce profil, jamais une variante plus faible (`E-17`).
11
+ - Aucune assertion sur le texte rendu : un test lit `role()`, `label()`, `bounds()` et l'état des entités. Une phrase affichée n'est pas une preuve (`E-19`).
12
+ - `test-support` reste en `dev-dependencies` : le binaire livré n'embarque pas le harnais headless.
13
+ - Un test headless ne sort aucun pixel : il déplace des événements et lit des propriétés. La preuve visuelle reste `verify-visual`, qui n'existe que sur macOS et Linux (`E-17`, `E-18`). Il n'a été exécuté que sur macOS.
14
+ - Toute API publique est documentée ; `.cargo/config.toml` refuse les warnings (`[build] warnings = "deny"`). Ne jamais ajouter `-- -D warnings` à une commande.
15
+ - `rust-version = "1.97"` : `[build] warnings` n'existe pas dans un Cargo antérieur.
16
+ - Une dépendance ajoutée met à jour `deny.toml` (`[licenses] allow`) : l'arbre GPUI Kit tire des licences qui ne sont pas MIT ni Apache-2.0.
17
+
18
+ ## Gates
19
+
20
+ Les commandes sont dans `README.md`. Avant une revue : `cargo fmt --check`, `cargo clippy --all-targets`, `cargo test`, `cargo deny check`.
21
+
22
+ Le corpus d'agent vit dans `documentation/llm/README.md`, créé par l'étape `documentation` ; le
23
+ journal du projet vit dans `documentation/changelog/`, créé par l'étape `journal`.