Files
small-scripts/context/claude-profile-modes.md
Paul O'Reilly 864960cbbb claude-profile modes: add deep-fable, orch pre-flight gate, ask-minimax re-point
deep-fable.md (new):
- driver: fable (claude-fable-5), same plan-first/spec-first discipline as deep
- escalates_to: opus — Opus named workflows remain available
- status line: [Fable→Opus] deep-fable · <project>: <task> | N% ctx
- on context wipe mentions "Deep Work (Fable)"

deep.md:
- Gnarly-bug consult: bg-model-call -> /ask-minimax skill with Opus fallback
- Async policy: replace bg-model-call bullet with /ask-minimax + Opus-subagent-fallback
- Workflow stance: add SSH key pre-flight check before git push

quick.md:
- Workflow stance: add SSH key pre-flight check before git push

hybrid.md:
- Async policy: replace bg-model-call reference with /ask-minimax + Opus-subagent-fallback

orch.md:
- New section "Pre-flight gate (before the autoloop)" placed before Auto-fire
- Auto-fire step 1 rewritten: run pre-flight gate first, then /loop 2m /orchestrate
- Escalation triggers: add stuck-queue row (5 iterations no change -> stop, report)
- Out of scope: add "Run the autoloop without the pre-flight gate"

context/claude-profile-modes.md:
- Status line: 47 assertions; driver table updated; 6 mode files noted
- Remaining follow-ups: bg-model-call replaced by /ask-minimax; deep-fable noted
2026-06-12 21:34:20 +12:00

3.8 KiB

claude-profile engagement modes

Status

Provider selection removed. Model config embedded in profiles via provider.env. 47 dryrun assertions passing.

What's done

Component State
Profile + mode picker (phases 1-2) Done, 41 dryrun assertions passing
6 mode files with escalates_to frontmatter Done (chat, quick, deep, deep-fable, hybrid, orch)
provider.env for non-Anthropic profiles Done (~/.claude-oreillyit-minimax/provider.env)
Driver→model_id hardcoded for Anthropic Done (haiku/sonnet/opus/opus-1m/fable); opus bumped to 4.8, fable added (claude-fable-5)
active-mode.env written on every launch Done (no longer includes CLAUDE_PROVIDER or CLAUDE_TIME_HORIZON)
statusline.sh — [Sonnet→Opus] deep · topic format Done (reads CLAUDE_CONFIG_DIR/active-mode.env)
Root CLAUDE.md — auto-select project from cwd or CLAUDE_PROJECT Done
Preset support (presets.yaml) Done (example at data/claude-profile/presets.yaml.example)
COLORTERM=truecolor exported before launch Done

Architecture change: providers → profiles

Previously, provider selection was a separate interactive phase (profile → mode → provider). Now:

  • Anthropic profiles need no extra config — the driver (from mode frontmatter) maps directly to an Anthropic model ID
  • Non-Anthropic profiles put a provider.env file in their profile directory with MODEL_ID, ANTHROPIC_BASE_URL, ANTHROPIC_API_KEY_FILE, and any extra env vars
  • Different providers = different profiles (e.g., oreillyit-anthropic vs oreillyit-minimax)
  1. Install the symlink (if not already done):
    ln -sf "$HOME/dev/claude/projects/small-scripts/scripts/claude-profile" "$HOME/sbin/claude-profile"
    
  2. Real-launch test — Anthropic: claude-profile oreillyit-anthropic --mode chat. Verify:
    • Mode body appears in system prompt
    • Status bar shows [Haiku] chat format
    • ~/.claude-oreillyit-anthropic/active-mode.env has no CLAUDE_PROVIDER or CLAUDE_TIME_HORIZON
  3. MiniMax launch test: claude-profile oreillyit-minimax --mode quick. Verify:
    • Claude starts and is responsive
    • ANTHROPIC_BASE_URL is set to MiniMax endpoint (check via a "what model are you?" prompt)
  4. If anything's off, tests/test-claude-profile.sh is the fast feedback loop

Remaining follow-ups (from FUTURE.md)

  1. bg-model-call wrapperdeep and hybrid modes previously referenced it; now replaced by the /ask-minimax skill with Opus-subagent fallback. A bg-model-call draft remains as an untracked script in small-scripts but is out of scope for the mode files.
  2. switch mode skill — mid-session re-pick writes new active-mode.env for the next /clear. Lower priority.
  3. deep-fable mode — new mode using claude-fable-5 driver; same plan-first/spec-first discipline as deep.

Key gotchas

  • statusline.sh is not in any git repo — lives at ~/.claude/status/statusline.sh. Changes are live immediately; no commit needed.
  • Root ~/dev/claude/CLAUDE.md is also not git-tracked — changes there are also immediately live.
  • CLAUDE_CONFIG_DIR must be exported by claude-profile before exec claude. The statusline hook inherits it from the claude process environment.
  • read -rp under set -e exits silently if stdin is not a TTY. The picker guards all interactive reads with [[ -t 0 ]]. See memory/gotchas-bash.md.
  • MiniMax token is in ~/.claude-secrets/ — gitignored, plaintext, 600 perms. The SOPS-encrypted version in agent-runtimes is for container agents only.
  • provider.env uses ANTHROPIC_API_KEY_FILE — the script reads the file and exports ANTHROPIC_API_KEY. The env var name is always ANTHROPIC_API_KEY (not configurable per-provider).