Commit Graph

79 Commits

Author SHA1 Message Date
Paul O'Reilly
b51d192a95 MiniMax: the model is MiniMax-M3.1-Flash (out of preview)
The API now answers MiniMax-M3.1-Flash-Preview as MiniMax-M3.1-Flash, and
accepts the new name directly. Verified 2026-11-03: a live call returns
"ok" with a 1M context window. Claude Code 2.1.317 prints an
unrecognized_model warning for either name; the session still runs.

Claude-Session: https://claude.ai/code/session_01CLUCNYsiEaER1CMqw5WqfY
2026-11-03 21:15:16 +13:00
Paul O'Reilly
d8abe45ea5 end-session: log agent-subscriptions fix, add README row
Claude-Session: https://claude.ai/code/session_01Gz3N3q53Bx9pbjB9tZT9dt
2026-10-14 16:56:28 +13:00
Paul O'Reilly
8935d58bd2 agent-subscriptions: use /api/oauth/usage and profile for Anthropic usage and plan info
Response rate-limit headers are no longer returned. Read the access token
from the Claude Code profile credentials (user:profile scope), report
5h/7d usage and resets, and add plan info with an inferred monthly renewal.

Claude-Session: https://claude.ai/code/session_01Gz3N3q53Bx9pbjB9tZT9dt
2026-10-14 16:41:22 +13:00
Paul O'Reilly
6c69456261 tests: update claude-profile expectations for 5.x drivers; read MiniMax MODEL_ID from provider.env
Haiku/sonnet drivers moved to claude-haiku-5-5/claude-sonnet-5-5; the MiniMax
check now asserts against the profile's provider.env instead of a hardcoded id.
2026-10-13 11:35:30 +13:00
Paul O'Reilly
840d7509e1 mm scripts: default to MiniMax-M3.1-Flash-Preview with per-script effort
Flash is the default model; --m3 falls back to M3, --effort overrides.
Defaults: max (review-minimax, review-loop, mm-worktree-task), medium
(explore), low (ci-triage). ask-minimax-run applies MINIMAX_EFFORT to
Flash models when --effort is not passed. Bump stale fixture date.
2026-10-13 10:23:53 +13:00
Paul O'Reilly
d6e0220bf5 Update model IDs to 5.x: claude-profile drivers, agent-subscriptions probe
Claude-Session: https://claude.ai/code/session_01SCd4vYV3ig6CpcPV9PCsC6
2026-10-13 10:17:01 +13:00
Paul O'Reilly
3461453c5f claude-profile: sonnet driver -> claude-sonnet-5-5
Claude-Session: https://claude.ai/code/session_01SCd4vYV3ig6CpcPV9PCsC6
2026-10-13 10:01:35 +13:00
Paul O'Reilly
d775399a96 feat: register sessions with claude-sessions on spawn
After tmux new-session, call claude-sessions register with the
project_dir, profile, mode, and session name. Non-fatal — if
claude-sessions is not installed the spawn still proceeds.
2026-10-12 15:47:06 +13:00
Paul O'Reilly
b4bc663a10 FUTURE: mm-worktree-task should enforce the worktree boundary 2026-09-24 14:21:47 +12:00
Paul O'Reilly
10019269fd Merge spec-revocation-check: generic spec-amendment revocation gate
Checks that every sentence removed since --base is still present or quoted
verbatim in a 'Revokes prior text (<TAG>): "..."' marker, and that every such
quote really existed at --base. --tag scopes the check to one amendment;
older markers of other tags are ignored. Verified on hugo-accelerator's M33
amendment (clean) and on a planted deletion + fabricated quote (both caught).
2026-09-24 14:21:22 +12:00
Paul O'Reilly
c706e8ddcd fix(spec-revocation-check): --tag scopes marker parsing; free-prose ignored by default (brief) 2026-09-24 14:19:48 +12:00
Paul O'Reilly
e0462e7e38 context: round-2 brief for spec-revocation-check 2026-09-24 14:10:36 +12:00
Paul O'Reilly
2715162e73 feat(spec-revocation-check): generic spec-amendment revocation gate (brief)
Catches two failure modes that each felled a previous spec-amendment
attempt: a fabricated Revokes-prior-text quote (text not in the file at
--base) and a normative line silently deleted with no quote at all.

Generic: any --glob x --base <sha> against any repo, with optional --tag
filter. Reuses the collapse() / quote_line_re() shape from the M33
reference, adds a Check D for deleted/renamed files (-M30 rename
threshold), and four violation categories: unquoted deletions,
fabricated quotes, malformed markers, deleted since base. Stdlib Python
only, --json output, --dryrun prints resolved config and still runs the
checks (read-only by nature).
2026-09-24 13:54:27 +12:00
Paul O'Reilly
4262e2b008 context: brief for spec-revocation-check 2026-09-24 13:39:40 +12:00
Paul O'Reilly
03ccbfe4ee Merge U-H1: mm-worktree-task re-runs the gate itself
Across ~12 delegated units, more than half reported a green suite the
supervisor's own re-run contradicted. --gate removes the trust step: after the
sub-session exits, mm-worktree-task re-runs the gate against the agent's LAST
commit and appends the real verdict, flagging a MISMATCH when the agent's own
report claimed a pass.

Supervisor-verified: 45 pass / 1 fail on the branch vs 28 pass / 1 fail on main
— the single failure is pre-existing (a date-window flake in the --docs recent
fixture), confirmed by running main myself rather than accepting the claim.
Forcing the verdict to PASSED unconditionally drives failures 1 -> 6, so the
new assertions bite.

The unit found a real defect en route: 'timeout -k 5 n bash -c' only signals the
immediate wrapper, so any grandchildren the gate forks are reparented and run
unbounded. Fixed with setsid + signalling the whole process group.

Claude-Session: https://claude.ai/code/session_014KNyfHmHpMbdMrHZXDRkAp
2026-09-23 19:42:20 +12:00
Paul O'Reilly
3734978d56 mm-worktree-task: --gate re-runs the test suite itself, never trusts the agent's claim
Across ~12 supervised MiniMax units, more than half reported a green suite
where a manual re-run found red (see memory/gotchas-minimax.md). Add
--gate "<command>" (with --gate-timeout, default 900s): after the detached
sub-session exits, mm-worktree-task itself re-runs the command in the
worktree against the sub-session's LAST commit, in its own reapable process
group (setsid + group kill, so a hung gate and everything it forked are
bounded and cleaned up), and appends an unambiguous PASSED/FAILED verdict —
plus an explicit MISMATCH callout when the agent's own report claimed
success — to the result file. A missing command, non-zero exit, timeout, or
dirty worktree are all failures, never a silent skip. mm-worktree-task's own
exit code is unchanged: the launch already returns before the sub-session
(and gate) run, detached.

Claude-Session: https://claude.ai/code/session_014KNyfHmHpMbdMrHZXDRkAp
2026-09-23 19:40:44 +12:00
Paul O'Reilly
cbab812917 mm-worktree-task: --base flag + set -e safe returns (uncommitted WIP)
Committing work found uncommitted in the checkout: --base lets a unit be based
on a branch other than main (used throughout the M32 cut-over session for
u6-tests and hatchmate-migration bases), and the bare 'return' statements
become 'return 0' so they cannot abort under set -e when the preceding test is
false.

Per the project agent-safety rule: untracked/uncommitted work that matters gets
committed the day it is found, so local loss cannot take it.

Claude-Session: https://claude.ai/code/session_014KNyfHmHpMbdMrHZXDRkAp
2026-09-23 19:26:52 +12:00
Paul O'Reilly
070090e751 fix: h2-terminates-scope fixture had count-by-severity in prose (supervisor)
The description line 'This section is outside the count-by-severity scope'
matched the grep pattern /count.*severity/, making grep tail-1 pick line 14
(prose) instead of line 3 (the actual ## heading). This caused hdr_level=0
(no leading #), scope never terminated, and HIGH=99 leaked through.

Replace with neutral text that does not contain the grep trigger phrase.

Claude-Session: https://claude.ai/code/session_01G3SkMRBRWXyiGuMGs8WVas
2026-09-17 00:11:11 +12:00
Paul O'Reilly
7800503348 fix(review-loop-run): CR-10 — scope exits only on headings shallower-or-equal to start depth (8c865eb4-7fd1-4a8d-b51d-04d020ba41c0) 2026-09-17 00:06:00 +12:00
Paul O'Reilly
b915dcc753 test(review-loop-run): ungate CR-7/8/9 tests — implementation merged (bug 5352fe72)
Claude-Session: https://claude.ai/code/session_01G3SkMRBRWXyiGuMGs8WVas
2026-09-16 15:25:18 +12:00
Paul O'Reilly
e291f25880 Merge branch 'main' into mm/cr789 2026-09-16 15:23:51 +12:00
Paul O'Reilly
7d43d29da1 fix(review-loop-run): review r1 — drop vestigial nocasematch pair; document CR-8 label exception
Claude-Session: https://claude.ai/code/session_01G3SkMRBRWXyiGuMGs8WVas
2026-09-16 15:23:51 +12:00
Paul O'Reilly
8127cd3b46 spec(review-loop-run): CR-8 label-parenthetical exception ((C1)-style) — reconciles pre-existing list-style test
Claude-Session: https://claude.ai/code/session_01G3SkMRBRWXyiGuMGs8WVas
2026-09-16 15:23:51 +12:00
Paul O'Reilly
61e4c53b9f fix(review-loop-run): counts parses annotated cells, declaration-only lines, suspect derived zero (5352fe72-242f-4fef-85a0-b7851a1110e5) 2026-09-16 15:13:25 +12:00
Paul O'Reilly
131486e0ff test(review-loop-run): CR-7/8/9 handles + fixtures, gated behind CR789_IMPL_READY (bug 5352fe72)
Default run: 40 passed + SKIP. CR789_IMPL_READY=1: 10 red until implementation.

Claude-Session: https://claude.ai/code/session_01G3SkMRBRWXyiGuMGs8WVas
2026-09-16 14:51:04 +12:00
Paul O'Reilly
01ae924292 spec(review-loop-run): CR-7/8/9 — annotated table cells, declaration-only prose lines, suspect derived zero (bug 5352fe72)
Claude-Session: https://claude.ai/code/session_01G3SkMRBRWXyiGuMGs8WVas
2026-09-16 14:35:03 +12:00
Paul O'Reilly
b340e2cd5c fix(review-loop-run): counts parses count-by-severity block with scope + format branches (2026-09-13 fix, 40/40 tests)
Was live via ~/sbin symlink but never committed. Baseline for bug 5352fe72.

Claude-Session: https://claude.ai/code/session_01G3SkMRBRWXyiGuMGs8WVas
2026-09-16 14:27:52 +12:00
Paul O'Reilly
636b8b2401 feat: review-loop-run — detached MiniMax review launcher for /review-loop artefacts
launch (per-kind prompt templates: verify/plan/spec/tests/code; best-practice +
gotcha reading sets; setsid nohup launcher; round N+1 feeds back round N),
status, counts (exit 4 on CRITICAL/HIGH). Spec + 29 dryrun tests.

Claude-Session: https://claude.ai/code/session_018LRh1S2bHJYhEgrMu3UJx8
2026-09-13 17:20:36 +12:00
Paul O'Reilly
f50561ea78 feat(mm-worktree-task): run from any planner-backed repo — cp_cli dir + context resolution (--context, MM_WORKTREE_TASK_CP_*), empty-docs guard, tests + spec
cp_cli lives in agent-runtimes; previously every planner call ran 'python3 -m lib.cp_cli' from the current repo with no --context, so the script only worked inside agent-runtimes. The context now resolves from ~/.cpconfig by matching project_id to the repo directory name. Verified live from hatchmate (item + parent + documents fetched via the hatchmate context).

Claude-Session: https://claude.ai/code/session_01JgJbWzVJioVznVTFyQFEfx
2026-09-11 16:27:08 +12:00
Paul O'Reilly
9488335713 feat: review-minimax-run + ci-triage-minimax-run MiniMax offload wrappers
First-pass branch review and CI failure triage in MiniMax M3 sub-sessions.
Both materialise inputs themselves (no Bash in the sub-session), gate
results strictly, retry once, and follow the explore-minimax 0/1/2/3 exit
contract. Specs with RM-n/CT-n IDs; offline tests via fake seams (36
assertions). Verified live: planted-issue branch -> 5 confirmed findings,
clean branch -> NO FINDINGS, failed gac-scratch run -> correct step +
honest low confidence.

Claude-Session: https://claude.ai/code/session_01Ku87DDWwbJkTx6SuV3sQDc
2026-09-11 13:48:09 +12:00
Paul O'Reilly
abed9e7c25 feat: explore-minimax-run — read-only MiniMax exploration wrapper + mode guidance
Hardened wrapper for delegating broad codebase exploration to MiniMax M3:
per-root --add-dir scoping, secrets-root refusal, enforced read-only via
--disallowedTools (profile defaults to acceptEdits), JSON .result answer
channel, internal timeout + retry, file:line citation gate with distinct
fallback exit codes. deep/deep-fable/orch modes now prefer /explore-minimax
for broad read-only sweeps, Explore agent as fallback.

Claude-Session: https://claude.ai/code/session_01Ku87DDWwbJkTx6SuV3sQDc
2026-09-11 11:33:38 +12:00
Paul O'Reilly
0ceb49044a chore: track ask-minimax-run, bg-model-call, wait-for-version, auto-draft (+spec/data) — were untracked
Claude-Session: https://claude.ai/code/session_015nXvGNNNixJPFwZKZHNyha
2026-09-11 06:15:14 +12:00
Paul O'Reilly
9a6d7135c5 feat: add mm-worktree-task — launch MiniMax worktree implementation sub-sessions
Wraps ask-minimax-run to run a MiniMax M3 implementation sub-session in an
isolated git worktree, with the prompt assembled from a planner work item
(cp_cli item + documents + parent/siblings). Supports --dryrun, --collect,
and --upload, per the pattern used for the 2026-09-10 seven-worktree batch
(see agent-runtimes memory/gotchas-minimax.md).

Claude-Session: https://claude.ai/code/session_015nXvGNNNixJPFwZKZHNyha
2026-09-10 22:57:55 +12:00
Paul O'Reilly
aa8883dbc5 future: mm-worktree-task (MiniMax implementation subagent in worktrees) 2026-09-10 14:46:39 +12:00
Paul O'Reilly
f21506af19 Add git-identity: switch git author identity from a saved menu
Identities live in ~/.git-identities (alias|Name|email). Interactive
menu to select, add, or remove identities; direct mode via alias
argument; --global/-g scope flag (defaults to local inside a repo,
global fallback outside); --list/--current helpers. Full --dryrun
support and a 27-assertion test suite driven through dryrun.
GIT_IDENTITIES_FILE env override for testability.
2026-08-18 20:20:45 +12:00
Paul O'Reilly
56c621713d idle-draft: fill all free worker slots, not one per completion
try_submit() returned after a single submission and was only called at
startup and once per completion, capping real concurrency at 1 task
regardless of the parallel setting — the ThreadPoolExecutor pool was
sized but never filled. Loop until every free slot is filled or no
eligible candidate remains, per spec §10 (wording sharpened to make the
whole-pool semantics explicit). No stub-claude harness exists yet to
test dispatch concurrency end-to-end; verified live against the real
queue (36 candidates, parallel=20).

Claude-Session: https://claude.ai/code/session_01Lgv4Qn82boNFC1jn8QXSNw
2026-08-03 07:29:52 +12:00
Paul O'Reilly
bdd10cbbc1 idle-draft: add sample_override config flag to bypass cold-start throttle
Optional config key (default false). When true, research candidates are
offered even at max_unreviewed_research_per_dossier; research_sampled
bookkeeping, mark sampled, and status flags are unchanged so unsampled
items stay visible for later human verification.

Claude-Session: https://claude.ai/code/session_01Lgv4Qn82boNFC1jn8QXSNw
2026-08-03 07:26:41 +12:00
Paul O'Reilly
29618f4319 idle-draft: stop committing state file with machine commits
idle-draft.state.json is now gitignored in the target repo; explicitly
git add-ing an ignored path errors, which broke every success commit.
The state file is still written atomically — just no longer tracked.

Claude-Session: https://claude.ai/code/session_01Lgv4Qn82boNFC1jn8QXSNw
2026-08-02 23:38:29 +12:00
Paul O'Reilly
18b25191a3 Session log: idle-draft pipeline tooling build
Claude-Session: https://claude.ai/code/session_01YQDoWNM7XPPii28khFWoMc
2026-08-02 22:32:34 +12:00
Paul O'Reilly
ca8b538d34 idle-draft: per-work-type and per-provider model/effort settings
--effort/--model on child argv; provider entries accept object form
{provider, model, effort}; precedence entry > work-type > profile.
Effort levels validated against the CLI's enumerated set.

Claude-Session: https://claude.ai/code/session_01YQDoWNM7XPPii28khFWoMc
2026-08-02 22:16:34 +12:00
Paul O'Reilly
ec25f02f01 idle-draft: clear attempts on success so forced redos start fresh
Claude-Session: https://claude.ai/code/session_01YQDoWNM7XPPii28khFWoMc
2026-08-02 21:54:53 +12:00
Paul O'Reilly
1f008eebcb idle-draft: process-group child termination, unique tmp paths, stale sweep
Lock-contention test added; children die with the dispatcher (SIGTERM/
SIGINT handlers + atexit); tmp files are per-invocation (.tmp.<pid>) so
a SIGKILL-orphaned child can never collide with a new instance.

Claude-Session: https://claude.ai/code/session_01YQDoWNM7XPPii28khFWoMc
2026-08-02 21:52:17 +12:00
Paul O'Reilly
75add58246 idle-draft: per-work-type allowed_tools; research must web-search for stories
Research and topic_ideas runs get --allowedTools WebSearch,WebFetch;
research template mandates >=1 web search for related stories with
full-URL + access-date citations under the dossier's status labels.

Claude-Session: https://claude.ai/code/session_01YQDoWNM7XPPii28khFWoMc
2026-08-02 21:32:35 +12:00
Paul O'Reilly
cd5be1cf92 idle-draft: strip :line-range suffixes before citation existence check
First pilot rejected valid citations like SPEC.md:1-80 — the form the
research template itself mandates. 5 new test cases (83 total).

Claude-Session: https://claude.ai/code/session_01YQDoWNM7XPPii28khFWoMc
2026-08-02 21:27:53 +12:00
Paul O'Reilly
6c4bf449aa idle-draft: idle-subscription dispatcher for the writing pipeline
Elapsed-paced gates, bounded-parallel event-driven dispatch, filesystem-
derived stages with thin human-gate state, citation validation with
quarantine, credential parity check, prompt templates as data.
Per IDLE-DRAFT-PLAN.md in writing/oreillyconsulting.

Claude-Session: https://claude.ai/code/session_01YQDoWNM7XPPii28khFWoMc
2026-08-02 21:18:02 +12:00
Paul O'Reilly
f78d292f05 score-paragraphs: port GOES paragraph scorer as general-purpose script
Required --style, --json machine-readable output, mandatory --dryrun.
Engine unchanged; known limitation documented: already-scored paragraphs
are never re-examined (present in the original).

Claude-Session: https://claude.ai/code/session_01YQDoWNM7XPPii28khFWoMc
2026-08-02 21:18:02 +12:00
Paul O'Reilly
52eb484ef7 agent-subscriptions: add window_seconds and elapsed_pct to JSON output
Elapsed is null when a window has no reset timestamp (MiniMax v1 fallback)
so pacing consumers fail closed; negative reset_in_seconds clamps to 0.

Claude-Session: https://claude.ai/code/session_01YQDoWNM7XPPii28khFWoMc
2026-08-02 21:18:02 +12:00
Paul O'Reilly
448091ecf4 feat(claude-tmux): spawn detached tmux Claude Code session with Remote Control
New script that launches Claude Code (via claude-profile) inside a detached
tmux session with --remote-control enabled, in a project's directory, named
after the project (Title-cased, auto-incrementing #N on collision). Lets a
session be started for later attach over VPN or control from the Claude app.

Spec-first per repo conventions: specs/claude-tmux.spec.md, script, and
tests/test-claude-tmux.sh (18 dryrun assertions, all passing).

Claude-Session: https://claude.ai/code/session_014oa7T7z1h5n34vu8vX9zGT
2026-07-25 16:29:46 +12:00
Paul O'Reilly
0476c00e81 fix: update MiniMax Anthropic-compat base URL to api.minimaxi.chat
MiniMax moved their Anthropic-compatible API from api.minimax.io to
api.minimaxi.chat. The old endpoint returns 404; the new one returns 200.
Key is unchanged and still valid. Native api.minimax.io endpoints (e.g.
subscription check) are unaffected.

Claude-Session: https://claude.ai/code/session_01XtWRazqRbMnMRa4iV3zbVx
2026-07-17 19:25:08 +12:00
Paul O'Reilly
a63f5a0f80 reflect-logs: distill session logs into topic memory (2026-07 sweep) 2026-07-02 16:05:43 +12:00