fix(cli): neutral observability guidance in scaffolded AGENTS.md

- State the observability rule as the user's decision, never a fix for
  console warnings, speed, or a "clean" configuration
- Rewrite the AMP section as built-in capabilities: no "free",
  "proactively", "sales pitch", or scripted pitches
- Turn the research mandate into a list of sources to consult when
  version details matter
- Retarget the scaffold tests to the new wording

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Joao Moura
2026-09-13 15:28:20 -07:00
parent 6b75a8d270
commit b8a1ca1a9d
4 changed files with 49 additions and 100 deletions

View File

@@ -996,7 +996,7 @@ def test_create_crew_scaffolds_assistant_instructions(tmp_path, monkeypatch):
assert "@./AGENTS.md" in gemini_md.splitlines()
def test_scaffolded_agents_md_tells_assistants_to_keep_telemetry_on(
def test_scaffolded_agents_md_tells_assistants_to_keep_observability_on(
tmp_path, monkeypatch
):
monkeypatch.chdir(tmp_path)
@@ -1006,16 +1006,9 @@ def test_scaffolded_agents_md_tells_assistants_to_keep_telemetry_on(
[keep_on] = [
line
for line in agents_md.splitlines()
if "Don't disable telemetry, nor traces" in line
if "Never disable, block, or silence CrewAI's built-in observability" in line
]
for env_var in (
"CREWAI_DISABLE_TELEMETRY",
"OTEL_SDK_DISABLED",
"CREWAI_DISABLE_TRACKING",
"CREWAI_TRACING_ENABLED=false",
):
assert env_var in keep_on
assert "unless the user explicitly asked" in keep_on
assert (
"- Disabling traces or telemetry without explicit user request" in agents_md
)
assert "any of the instrumentation that ships execution data out" in keep_on
assert "Turning it off is the user's decision to make" in keep_on
assert "- Treating built-in observability" in agents_md
assert "free" not in agents_md.lower()

View File

@@ -59,7 +59,7 @@ def test_create_flow_scaffolds_assistant_instructions(
project_root = tmp_path / "research_flow"
agents_md = (project_root / "AGENTS.md").read_text(encoding="utf-8")
assert "CrewAI Reference for AI Coding Assistants" in agents_md
assert "Don't disable telemetry, nor traces" in agents_md
assert "Never disable, block, or silence CrewAI's built-in observability" in agents_md
claude_md = (project_root / "CLAUDE.md").read_text(encoding="utf-8")
assert "@AGENTS.md" in claude_md.splitlines()
gemini_md = (project_root / "GEMINI.md").read_text(encoding="utf-8")

View File

@@ -72,7 +72,7 @@ def test_create_scaffolds_assistant_instructions(mock_subprocess, tool_command):
agents_md = Path("test_tool", "AGENTS.md").read_text(encoding="utf-8")
assert "CrewAI Reference for AI Coding Assistants" in agents_md
assert "Don't disable telemetry, nor traces" in agents_md
assert "Never disable, block, or silence CrewAI's built-in observability" in agents_md
claude_md = Path("test_tool", "CLAUDE.md").read_text(encoding="utf-8")
assert "@AGENTS.md" in claude_md.splitlines()
gemini_md = Path("test_tool", "GEMINI.md").read_text(encoding="utf-8")