//! Verify that capabilities.md stays in sync with actual commands.

const CAPABILITIES_MD: &str = include_str!("../src/capabilities.md");

const EXPECTED_COMMANDS: &[&str] = &[
    "/help",
    "/agent",
    "/compact",
    "/cost",
    "/diff",
    "/mcp",
    "/memory",
    "/model",
    "/provider",
    "/sessions",
    "/trust",
    "/exit",
];

#[test]
fn test_all_commands_documented_in_capabilities() {
    for cmd in EXPECTED_COMMANDS {
        assert!(
            CAPABILITIES_MD.contains(cmd),
            "Command '{cmd}' is missing from capabilities.md"
        );
    }
}

#[test]
fn test_capabilities_mentions_key_features() {
    // Tool names (TodoRead, TodoWrite, etc.) are auto-generated from
    // ToolRegistry definitions — no need to check them in capabilities.md.
    let must_mention = ["MCP", "Memory", "@file", ".mcp.json", "MEMORY.md"];
    for feature in must_mention {
        assert!(
            CAPABILITIES_MD.contains(feature),
            "Feature '{feature}' is missing from capabilities.md"
        );
    }
}
