Fix clippy unnecessary_sort_by in glob; sync docs
- glob: use sort_by_key(Reverse(mtime)) instead of sort_by; this trips clippy::unnecessary_sort_by on Rust 1.96 (CI), which an older local toolchain did not flag. - CLAUDE.md: list the new agent tools (glob, multi_edit, write_todos, remember) in the tools.rs architecture note. Rebased onto development (which now carries MCP client support). Full CI gate reproduced locally on the CI toolchain (1.96.1): fmt + clippy (-D warnings) + test all green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014f6zfWDT1v5TeSpA29rEyx
Claude committed
Jul 1, 2026 at 21:19 UTC
39d085ebc90bbb844896b2333a9813383b506f3e
2 files changed
+5
-4
CLAUDE.md
+3
-2
index 8e57b38..7e71441 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -81,8 +81,9 @@ feeds results back. Neither the loop nor ACP/TUI surfaces depend on a concrete b
wins: (1) override via `OPENAI_BASE_URL`+`OPENAI_API_KEY` or active profile in
`~/.config/sigit/providers.toml`; (2) siGit Code Cloud when logged in; (3) on-device.
- **`src/tools.rs`** — agent tool schemas + execution: `read_file`, `create_directory`,
- `list_directory`, `search_files`, `read_website`, `create_file`, `edit_file`, `delete_file`,
- `run_command`. Add a tool in both the spec list and the execute `match`.
+ `list_directory`, `search_files`, `glob`, `read_website`, `create_file`, `edit_file`,
+ `multi_edit`, `delete_file`, `run_command`, `write_todos`, `remember`. Add a tool in both the
+ spec list (`all_tools`) and the execute `match` (`execute_tool`).
- **`src/skills.rs`** — [Agent Skills](https://agentskills.io) support. Discovers skill
folders (each with a `SKILL.md`: YAML frontmatter `name` + `description`, then Markdown
instructions) from `.sigit/skills/` and `.claude/skills/` in the cwd, `$SIGIT_CONFIG_DIR/skills/`,
src/tools.rs
+2
-2
index c5f649d..721f965 100644
--- a/src/tools.rs
+++ b/src/tools.rs
@@ -1159,8 +1159,8 @@ fn exec_glob(arguments: &str) -> String {
return format!("No files match glob: {pattern}");
}
- // Most-recently-modified first, like Claude Code's Glob.
- found.sort_by(|a, b| b.0.cmp(&a.0));
+ // Most-recently-modified first.
+ found.sort_by_key(|(mtime, _)| std::cmp::Reverse(*mtime));
let total = found.len();
let mut paths: Vec<String> = found.into_iter().map(|(_, p)| p).collect();