Skip to content

Commit 3b80670

Browse files
committed
Make the CLI point users at the real install source
The next repo-local backlog item was ROADMAP ultraworkers#70: users could mistake third-party pages or the deprecated `cargo install claw-code` path for the official install route. The CLI now surfaces the source of truth directly in `claw doctor` and `claw --help`, and the roadmap closeout records the change. Constraint: Keep the fix inside repo-local Rust CLI surfaces instead of relying on docs alone Rejected: Close ultraworkers#70 with README-only wording | the bug was user-facing CLI ambiguity, so the warning needed to appear in runtime help/doctor output Confidence: high Scope-risk: narrow Reversibility: clean Directive: If install guidance changes later, update both the doctor check payload and the help-text warning together Tested: cargo fmt --all --check; cargo clippy --workspace --all-targets -- -D warnings; cargo test --workspace; architect review APPROVE Not-tested: Third-party websites outside this repo that may still present stale install instructions
1 parent 26b89e5 commit 3b80670

3 files changed

Lines changed: 69 additions & 3 deletions

File tree

ROADMAP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,4 +512,4 @@ Model name prefix now wins unconditionally over env-var presence. Regression tes
512512

513513
69. **Lane stop summaries have no minimum quality floor****done (verified 2026-04-12):** completed lane persistence in `rust/crates/tools/src/lib.rs` now normalizes vague/control-only stop summaries into a contextual fallback that includes the lane target and status, while preserving structured metadata about whether the quality floor fired (`qualityFloorApplied`, `rawSummary`, `reasons`, `wordCount`). Regression coverage locks both the pass-through path for good summaries and the fallback path for mushy summaries like `commit push everyting, keep sweeping $ralph`. **Original filing below.**
514514

515-
70. **Install-source ambiguity misleads real users**community observation 2026-04-12. User treated `claw-code.io` as official, then hit `clawcode` vs deprecated `claw-code` naming collision and concluded install story was inconsistent. Source-of-truth is not obvious when website/repo/crates naming diverges. **Fix shape:** canonical repo docs should explicitly state which site is official; installation guidance should visibly warn against deprecated `claw-code` crate and ambiguous third-party pages. Blocker: none. Source: gaebal-gajae community watch 2026-04-12.
515+
70. **Install-source ambiguity misleads real users****done (verified 2026-04-12):** repo-local Rust guidance now makes the source of truth explicit in `claw doctor` and `claw --help`, naming `ultraworkers/claw-code` as the canonical repo and warning that `cargo install claw-code` installs a deprecated stub rather than the `claw` binary. Regression coverage locks both the new doctor JSON check and the help-text warning. **Original filing below.**

rust/crates/rusty-claude-cli/src/main.rs

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ const INTERNAL_PROGRESS_HEARTBEAT_INTERVAL: Duration = Duration::from_secs(3);
7878
const POST_TOOL_STALL_TIMEOUT: Duration = Duration::from_secs(10);
7979
const PRIMARY_SESSION_EXTENSION: &str = "jsonl";
8080
const LEGACY_SESSION_EXTENSION: &str = "json";
81+
const OFFICIAL_REPO_URL: &str = "https://github.com/ultraworkers/claw-code";
82+
const OFFICIAL_REPO_SLUG: &str = "ultraworkers/claw-code";
83+
const DEPRECATED_INSTALL_COMMAND: &str = "cargo install claw-code";
8184
const LATEST_SESSION_REFERENCE: &str = "latest";
8285
const SESSION_REFERENCE_ALIASES: &[&str] = &[LATEST_SESSION_REFERENCE, "last", "recent"];
8386
const CLI_OPTION_SUGGESTIONS: &[&str] = &[
@@ -1477,6 +1480,7 @@ fn render_doctor_report() -> Result<DoctorReport, Box<dyn std::error::Error>> {
14771480
checks: vec![
14781481
check_auth_health(),
14791482
check_config_health(&config_loader, config.as_ref()),
1483+
check_install_source_health(),
14801484
check_workspace_health(&context),
14811485
check_sandbox_health(&context.sandbox_status),
14821486
check_system_health(&cwd, config.as_ref().ok()),
@@ -1764,6 +1768,36 @@ fn check_config_health(
17641768
}
17651769
}
17661770

1771+
fn check_install_source_health() -> DiagnosticCheck {
1772+
DiagnosticCheck::new(
1773+
"Install source",
1774+
DiagnosticLevel::Ok,
1775+
format!(
1776+
"official source of truth is {OFFICIAL_REPO_SLUG}; avoid `{DEPRECATED_INSTALL_COMMAND}`"
1777+
),
1778+
)
1779+
.with_details(vec![
1780+
format!("Official repo {OFFICIAL_REPO_URL}"),
1781+
"Recommended path build from this repo or use the upstream binary documented in README.md"
1782+
.to_string(),
1783+
format!(
1784+
"Deprecated crate `{DEPRECATED_INSTALL_COMMAND}` installs a deprecated stub and does not provide the `claw` binary"
1785+
)
1786+
.to_string(),
1787+
])
1788+
.with_data(Map::from_iter([
1789+
("official_repo".to_string(), json!(OFFICIAL_REPO_URL)),
1790+
(
1791+
"deprecated_install".to_string(),
1792+
json!(DEPRECATED_INSTALL_COMMAND),
1793+
),
1794+
(
1795+
"recommended_install".to_string(),
1796+
json!("build from source or follow the upstream binary instructions in README.md"),
1797+
),
1798+
]))
1799+
}
1800+
17671801
fn check_workspace_health(context: &StatusContext) -> DiagnosticCheck {
17681802
let in_repo = context.project_root.is_some();
17691803
DiagnosticCheck::new(
@@ -8111,6 +8145,11 @@ fn print_help_to(out: &mut impl Write) -> io::Result<()> {
81118145
out,
81128146
" Diagnose local auth, config, workspace, and sandbox health"
81138147
)?;
8148+
writeln!(out, " Source of truth: {OFFICIAL_REPO_SLUG}")?;
8149+
writeln!(
8150+
out,
8151+
" Warning: do not `{DEPRECATED_INSTALL_COMMAND}` (deprecated stub)"
8152+
)?;
81148153
writeln!(out, " claw dump-manifests [--manifests-dir PATH]")?;
81158154
writeln!(out, " claw bootstrap-plan")?;
81168155
writeln!(out, " claw agents")?;
@@ -8200,6 +8239,11 @@ fn print_help_to(out: &mut impl Write) -> io::Result<()> {
82008239
writeln!(out, " claw mcp show my-server")?;
82018240
writeln!(out, " claw /skills")?;
82028241
writeln!(out, " claw doctor")?;
8242+
writeln!(out, " source of truth: {OFFICIAL_REPO_URL}")?;
8243+
writeln!(
8244+
out,
8245+
" do not run `{DEPRECATED_INSTALL_COMMAND}` — it installs a deprecated stub"
8246+
)?;
82038247
writeln!(out, " claw init")?;
82048248
writeln!(out, " claw export")?;
82058249
writeln!(out, " claw export conversation.md")?;
@@ -10082,6 +10126,8 @@ mod tests {
1008210126
assert!(help.contains("claw mcp"));
1008310127
assert!(help.contains("claw skills"));
1008410128
assert!(help.contains("claw /skills"));
10129+
assert!(help.contains("ultraworkers/claw-code"));
10130+
assert!(help.contains("cargo install claw-code"));
1008510131
assert!(!help.contains("claw login"));
1008610132
assert!(!help.contains("claw logout"));
1008710133
}

rust/crates/rusty-claude-cli/tests/output_format_contract.rs

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ fn doctor_and_resume_status_emit_json_when_requested() {
209209
assert!(summary["failures"].as_u64().is_some());
210210

211211
let checks = doctor["checks"].as_array().expect("doctor checks");
212-
assert_eq!(checks.len(), 5);
212+
assert_eq!(checks.len(), 6);
213213
let check_names = checks
214214
.iter()
215215
.map(|check| {
@@ -221,7 +221,27 @@ fn doctor_and_resume_status_emit_json_when_requested() {
221221
.collect::<Vec<_>>();
222222
assert_eq!(
223223
check_names,
224-
vec!["auth", "config", "workspace", "sandbox", "system"]
224+
vec![
225+
"auth",
226+
"config",
227+
"install source",
228+
"workspace",
229+
"sandbox",
230+
"system"
231+
]
232+
);
233+
234+
let install_source = checks
235+
.iter()
236+
.find(|check| check["name"] == "install source")
237+
.expect("install source check");
238+
assert_eq!(
239+
install_source["official_repo"],
240+
"https://github.com/ultraworkers/claw-code"
241+
);
242+
assert_eq!(
243+
install_source["deprecated_install"],
244+
"cargo install claw-code"
225245
);
226246

227247
let workspace = checks

0 commit comments

Comments
 (0)