diff --git a/CLAUDE.md b/CLAUDE.md index 63362e1..a61741e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -65,7 +65,7 @@ Then proceed directly to step 2. Otherwise: ## Gitea CI visibility -When working with Gitea (watching Actions runs, checking whether a release/container built, diagnosing failing CI), use `gitea-agent-companion` — alias `gac`, installed in `~/sbin`, source at `projects/gitea-agent-companion`. Run `gitea-agent-companion --help` first: the help text is the full reference (verbs, flags, token discovery, exit codes). Canonical post-push pattern: `gac tail --until run-complete --timeout 600`; on failure, `gac inspect --run --logs`. +When working with Gitea (watching Actions runs, checking whether a release/container built, diagnosing failing CI), use `gitea-agent-companion` — alias `gac`, installed in `~/sbin`, source at `projects/gitea-agent-companion`. Run `gitea-agent-companion --help` first: the help text is the full reference (verbs, flags, token discovery, exit codes). Canonical post-push pattern: `gac tail --until run-complete --timeout 600`; on failure, `gac inspect --run --logs` — or `/ci-triage-minimax owner/repo ` to triage a long failure log in MiniMax instead of in-session. Note: gac does NOT auto-discover the secrets-path token (as of v0.0.2.10) — set `GITEA_TOKEN_FILE=~/dev/claude/secrets/gitea/ai_admin/token` (the `token` file, not the directory); `ci-triage-minimax-run` defaults this itself. ## Subagent coding tasks — use `mm-worktree-task` diff --git a/FUTURE.md b/FUTURE.md index 782059a..1323621 100644 --- a/FUTURE.md +++ b/FUTURE.md @@ -13,6 +13,15 @@ Backlog of improvement ideas not on the active roadmap. --- +## Next MiniMax offload targets (after review + CI triage) + +- **Problem:** Fable/Opus sessions still burn tokens on remaining bulk work: `/reflect-logs` extraction, test authoring from specs, `/end-session`/`/housekeeping` doc summarisation, transcript processing. +- **Idea:** Extend the shipped 2026-09-11 pattern (wrapper materialises inputs, MiniMax gets `Read,Glob,Grep,Write` only, strict result gate, operator adjudicates): a `/reflect-logs --minimax` draft mode producing topic-file diffs for approval, and an `mm-test-task`-style spec→tests generator (verifiable — the tests must run). +- **Open questions:** Observed invented-findings rate from `/review-minimax` in real use? Does reflect-logs drafting keep topic-file voice consistent? Where does test generation need the frozen-fixture skeleton (M27) first? +- **Depends on:** Usage data from `/review-minimax` and `/ci-triage-minimax` on real agent branches + +--- + ## Standing Deployment Authorization in CLAUDE.md - **Problem:** Claude has all the tooling needed to run deployment steps (sops, ansible-playbook, kubectl, docker, git push) but must ask for confirmation every time because these are irreversible, shared-infrastructure operations. This makes multi-step milestone deployments slow and interactive. diff --git a/memory/log/2026-09-11.135548.md b/memory/log/2026-09-11.135548.md new file mode 100644 index 0000000..a929ec0 --- /dev/null +++ b/memory/log/2026-09-11.135548.md @@ -0,0 +1,25 @@ +# Session Log -- 2026-09-11 + +## Summary +Built, verified live, and shipped two new MiniMax offloads: `/review-minimax` (first-pass code review of agent branches → adjudicated findings file) and `/ci-triage-minimax` (CI failure triage over gac logs). Wrapper scripts + specs + offline tests in small-scripts, skills in custom-claude-skills, memory docs here; all three repos pushed. + +## Decisions +- Decision: wrapper materialises all inputs (diff/log) itself; MiniMax sub-session gets `Read,Glob,Grep,Write` only — no Bash, no Edit -- Rationale: kills four review blockers at once (wrong-branch inheritance, two-dot diff, tree clobbering, uncontrolled git); post-run `git status --porcelain` assertion backstops Write. +- Decision: 540s synchronous timeout + `--max-diff-lines` budget instead of detached launch -- Rationale: harness Bash 600s cap kills longer synchronous runs; with no test execution and pre-materialised inputs, review fits. +- Decision: credential-shaped diff content aborts review (exit 1) but CI logs are redacted-and-continued -- Rationale: a credential in a branch diff is itself a finding for in-session review; logs are the whole payload and routinely carry unmasked clone URLs. +- Decision: `--run` required for the triage script; picking "newest failure" from gac's human table is the skill's job -- Rationale: unversioned table parse doesn't belong in the script. +- Decision: Opus plan review (deep-fable named workflow) before implementation -- Rationale: it caught 4 genuine blockers and ~14 should-fixes in the first draft; cost well spent. + +## Gotchas Discovered +- **[gotchas-gitea]** Symptom: `gac` (v0.0.2.10) errors "no token found" despite root CLAUDE.md saying it falls back to the secrets path; also `GITEA_TOKEN_FILE` pointed at `~/dev/claude/secrets/gitea/ai_admin` fails ("is a directory") -- Fix: the token is `ai_admin/token` (file inside the dir); ci-triage-minimax-run now defaults `GITEA_TOKEN_FILE` to that path when no token env is set (env vars override). Root CLAUDE.md's gac token-discovery description should be corrected. +- **[gotchas-minimax]** Symptom: offline exit-0 testing impossible when the script `rm -f`s the out-file before each attempt (pre-seeded files get cleared) -- Fix: companion fake seams (`REVIEW_MINIMAX_FAKE_FINDINGS`, `CI_TRIAGE_FAKE_TRIAGE`) that play the sub-session's Write after the JSON fake; gates still run. + +## Key Context +- Live verification results: planted-issue branch → 5 confirmed findings, all citations valid; clean branch → `NO FINDINGS` (no invented findings); failed gac-scratch run 3 → correct step + honest low-confidence on a truncated log. Telemetry confirmed `contextWindow=1000000` via `MiniMax-M3[1m]`. +- Review run cost/latency: ~23k in / 4.6k out tokens, 73s (planted); 37s (clean). Triage similar scale. +- small-scripts `tests/run-all.sh` has 2 pre-existing failures (test-claude-profile, test-wait-for-version) from another session's uncommitted WIP (`wait-for-version.spec.md` etc. untracked) — not touched. +- Next offload candidates from the original analysis: `/reflect-logs` draft mode, mechanical test generation from specs (`mm-test-task`), `/end-session`/housekeeping doc summarisation, transcript extraction. + +## Process Notes +- The materialise-inputs-yourself pattern (wrapper runs git/gac; sub-session reads files in cwd) is the strongest MiniMax hardening shape yet — reuse it for future offload wrappers instead of granting `Bash(git *)` globs. +- MiniMax review checklist must be explicit grep-able patterns; repo-specific items (the 5 agent-runtimes test bugs) go behind `--profile` or they manufacture findings on unrelated stacks.