|
1 | 1 | ## 💡 Summary |
2 | | -Added missing CLI help markers to `docs/reference-cli.md` and synced the document using `cargo xtask docs --update`. This fixes factual drift between the reference documentation and the actual CLI implementation. |
| 2 | +Added missing CLI help markers to `docs/reference-cli.md` and synced the document using `cargo xtask docs --update`. Also fixed `cargo test -p xtask` which was failing because `.jules/runs` was missing from `xtask/src/tasks/gate.rs`. |
3 | 3 |
|
4 | 4 | ## 🎯 Why |
5 | | -The `docs/reference-cli.md` file was missing `<!-- HELP: <command> -->` tags for several commands: `diff`, `context`, `check-ignore`, `tools`, `baseline`, `handoff`. Because the tags were missing, `cargo xtask docs --check` failed and the documentation was outdated, which violates the `docs-executable` gate profile requiring docs and schemas to match CLI behavior. |
| 5 | +The `docs/reference-cli.md` file was missing `<!-- HELP: <command> -->` tags for several commands: `diff`, `context`, `check-ignore`, `tools`, `baseline`, and `handoff`. Because the tags were missing, `cargo xtask docs --check` failed and the documentation was outdated, which violates the `docs-executable` gate profile requiring docs and schemas to match CLI behavior. Separately, `gate_runtime_guard_keeps_curated_jules_deps_history` failed in CI because `cargo xtask gate` was missing `.jules/runs` from its runtime paths array. |
6 | 6 |
|
7 | 7 | ## 🔎 Evidence |
8 | 8 | The `cargo xtask docs --check` command failed initially: |
9 | 9 | ```text |
10 | 10 | Error: Documentation drift detected in /app/docs/reference-cli.md. Run `cargo xtask docs --update` to fix. |
11 | 11 | ``` |
12 | 12 |
|
| 13 | +The test `gate_runtime_guard_keeps_curated_jules_deps_history` failed: |
| 14 | +```text |
| 15 | +thread 'gate_runtime_guard_keeps_curated_jules_deps_history' panicked at xtask/tests/xtask_deep_w74.rs:358:5: |
| 16 | +gate should treat root .jules/runs as runtime state |
| 17 | +``` |
| 18 | + |
13 | 19 | ## 🧭 Options considered |
14 | 20 | ### Option A (recommended) |
15 | | -- Programmatically add the missing `<!-- HELP: <cmd> -->` tags and run `cargo xtask docs --update`. |
16 | | -- Fits this repo and shard by ensuring documentation syncs mechanically with code. |
| 21 | +- Programmatically add the missing `<!-- HELP: <cmd> -->` tags and run `cargo xtask docs --update`. Add `.jules/runs` to `xtask/src/tasks/gate.rs`. |
| 22 | +- Fits this repo and shard by ensuring documentation syncs mechanically with code and tests pass. |
17 | 23 | - Trade-offs: Structure is minimal, Velocity is high, Governance is enforced via automated tooling. |
18 | 24 |
|
19 | 25 | ### Option B |
20 | | -- Manually write out the help text into the markdown document. |
21 | | -- Slower, error-prone, and likely to drift again immediately. |
22 | | -- Trade-offs: Negative velocity and poor governance. |
| 26 | +- Only update the docs, ignoring the test failure. |
| 27 | +- This would leave CI broken, which is unacceptable. |
23 | 28 |
|
24 | 29 | ## ✅ Decision |
25 | | -Chose Option A. By placing the correct marker pairs and regenerating the file, the workspace tool automatically injects the latest text and passes the `--check` gate. |
| 30 | +Chose Option A. By placing the correct marker pairs and regenerating the file, the workspace tool automatically injects the latest text and passes the `--check` gate. Fixing the test ensures the full `xtask` test suite passes. |
26 | 31 |
|
27 | 32 | ## 🧱 Changes made (SRP) |
28 | 33 | - `docs/reference-cli.md` |
| 34 | +- `xtask/src/tasks/gate.rs` |
29 | 35 |
|
30 | 36 | ## 🧪 Verification receipts |
31 | 37 | ```text |
32 | | -$ cargo xtask docs --check |
33 | | -Error: Documentation drift detected in /app/docs/reference-cli.md. Run `cargo xtask docs --update` to fix. |
34 | | -
|
35 | | -$ cargo xtask docs --update |
36 | | -Updated /app/docs/reference-cli.md |
37 | | -
|
38 | 38 | $ cargo xtask docs --check |
39 | 39 | Documentation is up to date. |
40 | 40 |
|
| 41 | +$ cargo test -p xtask |
| 42 | +test result: ok. 36 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 5.83s |
| 43 | +
|
41 | 44 | $ cargo fmt -- --check |
42 | 45 | $ cargo clippy -- -D warnings |
| 46 | +$ cargo check |
43 | 47 | ``` |
44 | 48 |
|
45 | 49 | ## 🧭 Telemetry |
46 | | -- Change shape: Docs update |
47 | | -- Blast radius: `docs/reference-cli.md` only. No API, IO, or schema impact. |
48 | | -- Risk class: Low + why: Only touches markdown text documentation via established xtask mechanisms. |
49 | | -- Rollback: Revert markdown changes. |
50 | | -- Gates run: `cargo xtask docs --check`, `cargo fmt -- --check`, `cargo clippy` |
| 50 | +- Change shape: Docs update & minor test fix |
| 51 | +- Blast radius: `docs/reference-cli.md` and `xtask/src/tasks/gate.rs`. No API, IO, or schema impact. |
| 52 | +- Risk class: Low + why: Only touches markdown text documentation via established xtask mechanisms and fixes a test array. |
| 53 | +- Rollback: Revert changes. |
| 54 | +- Gates run: `cargo xtask docs --check`, `cargo test -p xtask`, `cargo fmt -- --check`, `cargo clippy`, `cargo check` |
51 | 55 |
|
52 | 56 | ## 🗂️ .jules artifacts |
53 | 57 | - `.jules/runs/c346971f-d18f-42fe-b66b-eed1583c8dc0/envelope.json` |
|
0 commit comments