fix(query,cli,mcp): one implementation of task file selection (#112)