Skip to content

Commit 0498e41

Browse files
librarian: sync missing CLI help blocks in reference docs 📚
1 parent b15e908 commit 0498e41

5 files changed

Lines changed: 33 additions & 31 deletions

File tree

.jules/runs/c346971f-d18f-42fe-b66b-eed1583c8dc0/decision.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,13 @@
22

33
## Options considered
44
### Option A (recommended)
5-
Update the documentation to match the current CLI schema using `cargo xtask docs --update`.
6-
- Fits the `tooling-governance` shard by updating the documentation to reflect reality.
5+
Update the documentation to match the current CLI schema using `cargo xtask docs --update`, and fix the `cargo xtask gate` failure by updating the excluded run directories.
6+
- Fits the `tooling-governance` shard by updating the documentation and governance tooling.
77
- Aligned with the Builder style and Librarian persona, which focuses on factual doc quality and executable examples.
8-
- Trade-offs:
9-
- Structure: Minimal impact.
10-
- Velocity: Immediate fix.
11-
- Governance: Ensures CLI help text is consistently represented in the docs.
128

139
### Option B
14-
Manually patch the Markdown to add the missing tags and text.
15-
- Overkill when a tooling command already exists to do this programmatically and guarantee sync.
16-
- More prone to drift or formatting errors.
17-
- Slower velocity compared to the automated tool.
10+
Only update the documentation, but leave the `cargo xtask gate` failure alone.
11+
- Since this shard covers workspace tooling (`xtask/**`), failing tests in `xtask` should be fixed along with the docs.
1812

1913
## Decision
20-
Proceed with **Option A**. The `docs/reference-cli.md` had drifted because it lacked `<!-- HELP: -->` blocks for several new commands (diff, context, check-ignore, tools, baseline, handoff). Adding these and running `cargo xtask docs --update` restores synchronization and fixes the factual drift.
14+
Proceed with **Option A**. The `docs/reference-cli.md` drifted because it lacked `<!-- HELP: -->` blocks. Adding these and running `cargo xtask docs --update` restores synchronization. The `cargo xtask gate` check was also failing due to missing `".jules/runs"` in its list of runtime states, which we fixed to satisfy `cargo test -p xtask`.

.jules/runs/c346971f-d18f-42fe-b66b-eed1583c8dc0/pr_body.md

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,57 @@
11
## 💡 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`.
33

44
## 🎯 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.
66

77
## 🔎 Evidence
88
The `cargo xtask docs --check` command failed initially:
99
```text
1010
Error: Documentation drift detected in /app/docs/reference-cli.md. Run `cargo xtask docs --update` to fix.
1111
```
1212

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+
1319
## 🧭 Options considered
1420
### 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.
1723
- Trade-offs: Structure is minimal, Velocity is high, Governance is enforced via automated tooling.
1824

1925
### 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.
2328

2429
## ✅ 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.
2631

2732
## 🧱 Changes made (SRP)
2833
- `docs/reference-cli.md`
34+
- `xtask/src/tasks/gate.rs`
2935

3036
## 🧪 Verification receipts
3137
```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-
3838
$ cargo xtask docs --check
3939
Documentation is up to date.
4040
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+
4144
$ cargo fmt -- --check
4245
$ cargo clippy -- -D warnings
46+
$ cargo check
4347
```
4448

4549
## 🧭 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`
5155

5256
## 🗂️ .jules artifacts
5357
- `.jules/runs/c346971f-d18f-42fe-b66b-eed1583c8dc0/envelope.json`
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
{"command": "cargo xtask docs --check", "status": "failed", "output_fragment": "Error: Documentation drift detected in /app/docs/reference-cli.md"}
22
{"command": "cargo xtask docs --update", "status": "success", "output_fragment": "Updated /app/docs/reference-cli.md"}
33
{"command": "cargo xtask docs --check", "status": "success", "output_fragment": "Documentation is up to date."}
4+
{"command": "cargo test -p xtask --test xtask_deep_w74", "status": "failed", "output_fragment": "gate_runtime_guard_keeps_curated_jules_deps_history ... FAILED"}
5+
{"command": "cargo test -p xtask --test xtask_deep_w74", "status": "success", "output_fragment": "gate_runtime_guard_keeps_curated_jules_deps_history ... ok"}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"outcome": "success",
33
"files_changed": [
4-
"docs/reference-cli.md"
4+
"docs/reference-cli.md",
5+
"xtask/src/tasks/gate.rs"
56
]
67
}

xtask/src/tasks/gate.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ const TRACKED_AGENT_RUNTIME_PATHS: &[&str] = &[
7878
".jules/transcripts",
7979
".jules/runtime",
8080
".jules/tmp",
81+
".jules/runs",
8182
];
8283

8384
fn ensure_no_tracked_agent_runtime_state() -> Result<()> {

0 commit comments

Comments
 (0)