Conversation
Engine half of a coordinated pair with trustabl/agent-reliability-rules#90, on a branch of the same name so the rules-sync job resolves the matching pack rather than main. Neither half should merge alone — check-rules-sync.sh fails if they do. Mirrors claude_sdk/tool_definition.yaml into testdata/rules-fixture and adds cases to policyRuleCases, as TestPolicyRules_AllRulesCovered requires. CSDK-017/018 cover Python; the TypeScript half was missing. Five cases rather than four. CSDK-022 pairs description_length_lt with has_docstring so an empty description stays CSDK-014's finding instead of double-reporting, and the fifth case pins that guard.
|
Thanks @bradAGI. This is the engine half I want to see alongside a rules PR: the fixture copy of The five cases hold up when I walk them. One thing to note rather than change: the CSDK-021 fire snippet is 25 characters, so that tool also trips CSDK-022. CSDK-017 and CSDK-018 already overlap the same way in Python, so I would rather keep the pair consistent than special-case it here. The blank-line removal in |
What the pair adds
CSDK-017/018 cover the Python side of description quality; the TypeScript half was missing. CSDK-014 only checks that a description exists, so
"TODO: describe this tool."and"Gets data."pass today — leaving the tool in exactly the state CSDK-014 exists to prevent.CSDK-014's own explanation says why this costs more on the TS side: there's no docstring fallback, so the
descriptionargument is the entire prompt-side account of the tool. CSDK-022 also names the mitigation that isn't one — the Zod input schema constrains the shape of the arguments once the model has decided to call this tool, and says nothing about whether calling it was the right move.What this PR does
claude_sdk/tool_definition.yamlintotestdata/rules-fixture/.policyRuleCases, asTestPolicyRules_AllRulesCoveredrequires."TODO: describe this tool.""Gets data."Five cases rather than four. CSDK-022 pairs
description_length_lt: 40withhas_docstring: trueso an empty description stays CSDK-014's finding rather than double-reporting — length 0 is also under the threshold. The fifth case pins that guard.Verification