aboutsummaryrefslogtreecommitdiff
path: root/tests/cli/surface.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-08-14 04:22:48 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-08-14 04:22:48 +0300
commit1af1a5b86f642ae7b053037bc472913cfbc1e206 (patch)
tree9b2826f592bcaa5420149d9e9752a79ec9ed9d30 /tests/cli/surface.rs
parent1ac5e9805784e14a5322a0e60e435348149721ee (diff)
feat(cli): guide agents to Herdr resources
Diffstat (limited to 'tests/cli/surface.rs')
-rw-r--r--tests/cli/surface.rs27
1 files changed, 27 insertions, 0 deletions
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
@@ -274,6 +274,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)] = &[
(&["agent", "wait", "--help"], "Without --until"),