Add /explore-minimax and explore-minimax-run memory files, backfill skill-ask-minimax / skill-ask-minimax-with-context entries, index them in MEMORY.md. ask-minimax-usage.md gains the exploration use case and an explicit no-secrets rule. Claude-Session: https://claude.ai/code/session_01Ku87DDWwbJkTx6SuV3sQDc
1.5 KiB
explore-minimax-run
Purpose: Hardened wrapper (in small-scripts/scripts/) running a read-only MiniMax M3 exploration sweep. Backs skill-explore-minimax; safe to drive directly (skills only register at session start, so direct invocation is also the test path).
Spec: small-scripts/specs/explore-minimax-run.spec.md — full flag table, behaviour requirements, exit codes.
Quick reference
explore-minimax-run --root <path> [--root ...] --prompt-file <q> --out <result> \
[--breadth medium|very-thorough] [--max-turns N] [--timeout SECS]
Exit: 0 = answer written; 1 = usage/config (incl. refused secrets root); 2 = MiniMax failed after one internal retry; 3 = answer empty/uncited → fall back to Explore agent.
How it works
Resolves roots (realpath -e), refuses secrets paths, passes each as --add-dir (paths outside cwd are otherwise permission-denied — gotchas-minimax). Prepends a fixed preamble (citations required, NOT FOUND over guessing, credential skip-list, "Searches run:" trailer), then calls ask-minimax-run with --permission-mode default --allowedTools "Read,Glob,Grep" + a deny-list, --output-format json, stdin-redirected prompt (no $()), internal timeout (default 540s), jq-extracted .result, one retry, citation grep.
Gotchas
- Relies on
CLAUDE_CODE_MAX_CONTEXT_TOKENS=1000000in the minimaxprovider.envfor the 1M window. - Do not weaken the secrets root check or the deny-list — the profile's own settings are permissive (
acceptEditsdefault,Edit(/tmp/**), WebFetch).