| 1 | package evidence |
| 2 | |
| 3 | import "strings" |
| 4 | |
| 5 | // Non-mutating meta tools spawn or inspect work without themselves changing |
| 6 | // workspace state. Real mutations are recorded from child evidence or the |
| 7 | // underlying target tool after resolution (use_capability call). |
| 8 | var nonMutationMetaTools = map[string]bool{ |
| 9 | "run_skill": true, |
| 10 | "read_skill": true, |
| 11 | "read_only_skill": true, |
| 12 | "task": true, |
| 13 | "read_only_task": true, |
| 14 | "parallel_tasks": true, |
| 15 | "explore": true, |
| 16 | "research": true, |
| 17 | "review": true, |
| 18 | "security_review": true, |
| 19 | "use_capability": true, |
| 20 | "connect_tool_source": true, |
| 21 | "review_report": true, |
| 22 | } |
| 23 | |
| 24 | // IsNonMutationMetaTool reports whether toolName is a host meta tool that must |
| 25 | // not count as a mutation receipt by itself. |
| 26 | func IsNonMutationMetaTool(toolName string) bool { |
| 27 | return nonMutationMetaTools[strings.TrimSpace(toolName)] |
| 28 | } |
| 29 | |
| 30 | // IsReviewSkillTool reports whether toolName is a structured review subagent. |
| 31 | func IsReviewSkillTool(toolName string) bool { |
| 32 | switch strings.TrimSpace(toolName) { |
| 33 | case "review", "security_review": |
| 34 | return true |
| 35 | default: |
| 36 | return false |
| 37 | } |
| 38 | } |
| 39 |