From 1af1a5b86f642ae7b053037bc472913cfbc1e206 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Fri, 14 Aug 2026 04:22:48 +0300 Subject: feat(cli): guide agents to Herdr resources --- tests/cli/surface.rs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'tests/cli') diff --git a/tests/cli/surface.rs b/tests/cli/surface.rs index 2507804e..b48baf57 100644 --- a/tests/cli/surface.rs +++ b/tests/cli/surface.rs @@ -273,6 +273,33 @@ fn help_commands_exit_successfully() { } } +#[test] +fn root_and_command_group_help_point_agents_to_plain_text_docs() { + for args in [&["--help"][..], &["agent", "--help"][..]] { + let output = Command::new(env!("CARGO_BIN_EXE_herdr")) + .args(args) + .env_remove("HERDR_SOCKET_PATH") + .env_remove("HERDR_CLIENT_SOCKET_PATH") + .env_remove("HERDR_ENV") + .output() + .unwrap(); + assert!(output.status.success(), "herdr {} failed", args.join(" ")); + let stdout = String::from_utf8_lossy(&output.stdout); + for expected in [ + "Are you an AI? Use these resources ONLY IF your task specifically asks you to:", + "https://herdr.dev/agent-guide.md", + "https://herdr.dev/llms.txt", + "herdr --skill", + ] { + assert!( + stdout.contains(expected), + "herdr {} help did not contain {expected:?}: {stdout}", + args.join(" ") + ); + } + } +} + #[test] fn subcommand_help_explains_automation_semantics_without_a_server() { let cases: &[(&[&str], &str)] = &[ -- cgit v1.2.3