Commit Graph

23 Commits

Author SHA1 Message Date
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
16586541ea claude-profile: bump opus to 4.8, add fable driver
- driver_model_id(): opus -> claude-opus-4-8, opus-1m -> claude-opus-4-8[1m]
- driver_model_id(): add fable -> claude-fable-5
- error message updated: Valid: haiku sonnet opus opus-1m fable
- spec: driver->model table updated (opus 4.8, fable added); frontmatter
  driver enum includes fable; note that opus-1m retained for [1m] convention
- tests: add Test 13 (deep-fable dryrun asserting claude-fable-5);
  add Test 14 (unknown driver exits 1) — 47 assertions total
  Note: deep-fable mode file lands in the next commit
2026-06-12 21:33:58 +12:00
Paul O'Reilly
9e13b7f096 claude-profile: remove provider-yaml system, embed model config in profiles
Provider selection phase removed; Anthropic driver→model_id is now
hardcoded in the script and non-Anthropic profiles supply provider.env
(MODEL_ID, ANTHROPIC_BASE_URL, ANTHROPIC_API_KEY_FILE).

Test suite baseline changes 58 → 41 assertions: the 17 dropped
assertions covered the removed provider-yaml selection phase, not
retained behaviour.

Includes refactor-derived memory: decisions (provider architecture,
driver enforcement via --model), bash gotchas (read -rp under set -e,
never eval user config), process lessons.
2026-06-12 21:26:07 +12:00
Paul O'Reilly
b0130bf06b feat(agent-subscriptions): add script to show AI provider subscription usage
Probes Anthropic OAuth and MiniMax subscription usage and displays
percentage consumed for 5-hour and 7-day windows with colour-coded output.
Ported probe logic from agent-runtimes/scripts/ralph_code.
2026-06-03 20:43:24 +12:00
Paul O'Reilly
4cd9757abc feat(claude-profile): warn when non-Anthropic provider used with OAuth profile
Add a warning when ANTHROPIC_BASE_URL would be set but the active profile's
.credentials.json would override ANTHROPIC_API_KEY with subscription OAuth,
routing requests to Anthropic instead of the intended provider.

Fixes the MiniMax routing issue: use --profile minimax (~/.claude-minimax/,
no stored credentials) for non-Anthropic providers.

Update presets example to use profile: minimax for quick-minimax preset.
63 tests passing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 18:33:39 +12:00
Paul O'Reilly
ff6228e7ad fix(minimax-provider): correct model name, auth var, and tier overrides
- model_id: MiniMax-M2.7 (was claude-sonnet-4-20250514)
- api_key_env: ANTHROPIC_API_KEY (was ANTHROPIC_AUTH_TOKEN — wrong for interactive CC)
- Add ANTHROPIC_MODEL + all four tier vars (SMALL_FAST, SONNET, OPUS, HAIKU) pointing to
  MiniMax-M2.7 to prevent fallback to Anthropic models on sub-agent calls
- Add API_TIMEOUT_MS=3000000 (50 min) for long-running operations

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 18:28:48 +12:00
Paul O'Reilly
a11051e0a8 feat(claude-profile): add provider selection (model + endpoint + credentials)
Introduces provider files (`data/claude-profile/providers/*.yaml`) that
bundle model ID, API base URL, API key source, and extra env vars. Phase 2.5
(provider selection) added between mode selection and launch, with a default
derived from the mode's driver field so existing Anthropic usage is unchanged.

Ships 5 providers: anthropic-haiku/sonnet/opus/opus-1m and minimax-sonnet.
MiniMax token decrypted from agent-runtimes SOPS env, stored at
~/.claude-secrets/minimax-auth-token. Adding new providers = one YAML file,
no script changes.

58 dryrun tests passing (up from 37).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 18:16:22 +12:00
Paul O'Reilly
5a1b4b14bc Add wait-for-release: poll a Gitea repo's releases until a glob matches
Polls /api/v1/repos/<owner>/<repo>/releases and matches each tag_name
against a shell-style glob (e.g. v1.2.3.*). Default 600s timeout, 5s
interval, both overridable. Exits 0 with the matched tag on stdout,
1 on timeout, 2 on usage error, 3 on terminal API error (401/403/404).
Intended to run in the background of a Claude Code session while CI
produces the release.

Includes spec and 42-assertion test using a PATH-shadowed mock curl.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 20:06:24 +12:00
Paul O'Reilly
cde811fa0e Add semver-ci: commit-driven semantic versioning for Gitea Actions
Computes MAJOR.MINOR.PATCH.BUILD from NEW_MAJOR/NEW_MINOR/NEW_PATCH
whole-line tokens in commit messages since the last release tag.
Non-main branches get a BRANCH-SHORTSHA suffix and never release.
Maintains VERSION.md, writes $GITHUB_OUTPUT, and optionally creates
a Gitea release via API.

Includes spec, 67-assertion test, usage guide (docs/semver-ci.md),
and a drop-in Gitea Actions workflow template.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 19:30:44 +12:00
Paul O'Reilly
143b32597e Add claude-profile engagement mode picker with statusline and session-start integration
- claude-profile: phase 1-3 picker (profile, mode, launch) with preset support,
  dryrun, WezTerm theming, and --append-system-prompt mode body injection
- 5 mode files (chat/quick/deep/hybrid/orch) with YAML frontmatter + prose body;
  new escalates_to field drives statusline →Opus arrow for deep and hybrid
- statusline.sh reads CLAUDE_CONFIG_DIR/active-mode.env to show
  [Sonnet→Opus] deep · topic format when launched via claude-profile
- Root CLAUDE.md session-start: auto-selects project from cwd or CLAUDE_PROJECT
  in active-mode.env, skipping the interactive picker when context is clear
- Spec, tests (37 assertions, 9 test files, all passing), context docs, and
  preset example included

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 00:36:38 +12:00
Paul O'Reilly
765f32b4fa Add mp3-to-mp4: convert MP3 to MP4 with static title card
Uses ffmpeg to generate an H.264/AAC video from an MP3 file with a
centred title overlay. Supports optional background image (title at
bottom) or solid colour (title centred). Includes spec, dryrun support,
and 10 tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 18:34:50 +12:00
Paul O'Reilly
c470867039 Remove URL-unsafe characters from gen-secret charset
Remove ^, +, ~, :, @ from the allowed charset. The ^ character breaks
SQLAlchemy DATABASE_URL parsing, + becomes space in URL query strings,
: and @ are URL delimiters. The remaining charset (A-Za-z0-9._-) is
safe in URLs, database connection strings, YAML, JSON, and shell
without any encoding.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 21:29:08 +13:00
Paul O'Reilly
8bd4c7253b Add gen-secret: generate bash/YAML/JSON-safe random strings
Outputs cryptographically random strings using only characters safe
for unquoted use in bash, YAML, and JSON: [A-Za-z0-9._+\-:@^~]

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 11:32:55 +13:00
Paul O'Reilly
161c633b42 Add split-wezterm: split WezTerm pane into a rows x cols grid
Splits the current pane into evenly-sized grid using wezterm cli
split-pane. Supports optional command per pane, dryrun mode, and
auto-detects native or Flatpak WezTerm CLI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 12:33:04 +13:00
Paul O'Reilly
57b4c0a2bb Add unreflected-logs: find session logs pending reflection
Scans all projects for session logs not yet processed by /reflect-logs,
using .reflection-state.json to track reflected status.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 11:14:34 +13:00
Paul O'Reilly
77af82c88c Add md-to-docx: markdown to DOCX converter using pandoc
Converts markdown files to DOCX with optional reference doc styling.
Supports front matter stripping and custom output paths.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 11:14:30 +13:00
Paul O'Reilly
cbde292dd7 Add check-skills: verify skill symlinks match source repo
Compares installed skill symlinks against the source directory,
reporting missing, stale, and orphan entries.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 11:14:25 +13:00
Paul O'Reilly
a9d54dcf7f Add validate-skill: SKILL.md linter for Claude Code skills
Checks for common issues that silently break skills — non-ASCII
frontmatter, $VAR in paths, uncovered binaries in allowed-tools, etc.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 11:14:20 +13:00
Paul O'Reilly
5230e54236 Add git-status-report: recursive git repo scanner with status reporting
Scans a directory tree for git repos and produces a concise report
showing uncommitted changes (with +/- character counts) and
ahead/behind status per remote. Supports --dryrun to preview
discovered repos without running checks.

Includes OpenSpec, implementation, and 26-assertion test suite.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 11:13:59 +13:00
Paul O'Reilly
d7c8814a5a Initial project setup for small-scripts
Spec-driven utility script collection with dryrun support and
automated testing. Includes project docs, test runner, and
directory structure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 10:14:53 +13:00