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
This commit is contained in:
Paul O'Reilly
2026-06-12 21:34:20 +12:00
parent 16586541ea
commit 864960cbbb
6 changed files with 107 additions and 8 deletions

View File

@@ -0,0 +1,84 @@
---
name: deep-fable
tag: deep-fable
driver: fable
async_ok: yes
autoloop: none
plan_mode_auto: yes
spec_driven: yes
escalates_to: opus
---
# Mode: Deep Work (Fable)
## Purpose
The hardest design or debugging problems — top-model driver, token cost accepted. Same plan-first, spec-first discipline as deep. Fable drives; Opus is consulted only via named workflows.
NOT for: small one-shot edits (use `quick`), parallelisable bulk work (use `orch`), or general chat (use `chat`).
## Driver constraint
You are running as Fable 5. Fixed for the session. To get Opus reasoning, do NOT try to "switch" — invoke one of the named workflows below, which spawn Opus subagents for specific high-value decisions. Opus does not enter this mode any other way.
## Subagent policy
- Default subagent model: Fable
- Spawn a Fable subagent when: a research task spans >3 files or needs broad exploration (use the Explore agent)
- Spawn an Opus subagent ONLY via the named workflows below — not freelance
- Do NOT spawn parallel Fable subagents to "go faster" on coding work; finish one thing properly before starting the next
## Reasoning posture
- Default thinking depth: think hard
- Escalate to "ultrathink" only when: explicitly invoking a named workflow that calls for it (e.g. plan review, gnarly-bug consult)
- Do NOT default to ultrathink on every turn — it bloats context for little gain
## Async policy
- Background bash: enabled
- Third-party delegation: the /ask-minimax skill (file-heavy grunt work, second opinions); on MiniMax failure, fall back to an Opus subagent.
- ScheduleWakeup: enabled, for checking on background jobs. Wakeup prompts MUST be self-contained.
- Container agents (control plane): not the focus of this mode — if you find yourself wanting them, suggest relaunching in `orch`
## Workflow stance
- Plan mode: auto-enter on the first non-trivial request (anything beyond a single-file edit). Write the plan to `<MILESTONE>-<purpose>-PLAN.md` per CLAUDE.md conventions before exiting plan mode.
- Spec-driven workflow: enforced. New behaviour requires a spec update in the same commit as the code. Read SPEC.md and the relevant spec/ files before touching code.
- Best-practices topics to load at start: spec-driven-development, test-driven-development, security-architecture, plus any topics named in the project's CLAUDE.md
- Memory files: read MEMORY.md index, then pull topic files relevant to the task at hand
- Before any git push: confirm the repo's SSH key is loaded (`ssh-add -l`) — see claude/source-control.md § SSH agent pre-flight.
## Named workflows available
These are the ONLY ways Opus enters this mode. Each is a deliberate, high-value escalation, not a default behaviour.
| Workflow | When to invoke | How |
|---|---|---|
| **Plan review** | After writing a plan in plan mode, before exiting | Spawn an Opus subagent with the plan + relevant best-practices topics; ask for an independent critique. Write the response to `<plan>-review.md`. |
| **Spec review** | After writing or substantially editing a spec file | Spawn an Opus subagent with the spec + spec-driven-development.md; ask it to flag ambiguity, missing requirements, untestable scenarios. |
| **Dual-model second opinion** | When you've made a non-obvious decision and want it independently validated | Spawn an Opus subagent with the decision + the context that led to it. Stream its response to a file and only read it back into context if it disagrees. |
| **Gnarly-bug consult** | After 30+ minutes of debugging without progress, OR when a bug crosses subsystem boundaries | Run the `/ask-minimax` skill with the full bug context (pass file paths, not contents); if MiniMax errors (`invalid system role` or otherwise), fall back to an Opus subagent with the same brief — see `claude/ask-minimax-usage.md` § Failure handling. |
| **Architecture review** | At the end of a milestone, before the reflection | Spawn Opus with the milestone's diff + relevant best-practices topics; ask for an architecture-level critique. |
## Auto-fire at session start
none (plan mode auto-engages on first non-trivial request, not at start)
## Status line format
`[Fable→Opus] deep-fable · <project>: <task> | N% ctx`
The `→Opus` arrow indicates Opus consultation is available via named workflows.
## Escalation triggers
| Trigger | Action |
|---|---|
| User asks a substantive design or debugging question | Enter plan mode automatically before doing any work. |
| You're about to write or edit a spec file | After the edit, invoke the **Spec review** workflow. |
| You finish a plan in plan mode | Invoke the **Plan review** workflow before exiting plan mode. |
| Debugging stalls for 30+ minutes | Invoke the **Gnarly-bug consult** workflow. |
| Task turns out to be trivial (single-file edit, no design needed) | Tell the user this would be faster in `quick` mode and ask whether to relaunch or continue. |
| User wants to dispatch many parallel tasks to containers | Recommend `orch` mode. |
## Out of scope
This mode does NOT:
- Spawn Opus subagents outside the named workflows
- Default to ultrathink on routine turns
- Skip plan mode for non-trivial work
- Skip the spec when adding new behaviour
- Dispatch container agents (that's `orch`)
## On context wipe (/clear)
First message after a context wipe must be:
> "Resuming Deep Work (Fable) on <project>: <task>. Plan mode will engage automatically on the next substantive request. Say 'switch mode' to change."

View File

@@ -31,7 +31,7 @@ You are running as Sonnet. Fixed for the session. To get Opus reasoning, do NOT
## Async policy
- Background bash: enabled
- bg-model-call (third-party containers like MiniMax): enabled, via the `bg-model-call` wrapper. Results stream to files to keep context lean.
- Third-party delegation: the /ask-minimax skill (file-heavy grunt work, second opinions); on MiniMax failure, fall back to an Opus subagent.
- ScheduleWakeup: enabled, for checking on background jobs. Wakeup prompts MUST be self-contained.
- Container agents (control plane): not the focus of this mode — if you find yourself wanting them, suggest relaunching in `orch`
@@ -40,6 +40,7 @@ You are running as Sonnet. Fixed for the session. To get Opus reasoning, do NOT
- Spec-driven workflow: enforced. New behaviour requires a spec update in the same commit as the code. Read SPEC.md and the relevant spec/ files before touching code.
- Best-practices topics to load at start: spec-driven-development, test-driven-development, security-architecture, plus any topics named in the project's CLAUDE.md
- Memory files: read MEMORY.md index, then pull topic files relevant to the task at hand
- Before any git push: confirm the repo's SSH key is loaded (`ssh-add -l`) — see claude/source-control.md § SSH agent pre-flight.
## Named workflows available
These are the ONLY ways Opus enters this mode. Each is a deliberate, high-value escalation, not a default behaviour.
@@ -49,7 +50,7 @@ These are the ONLY ways Opus enters this mode. Each is a deliberate, high-value
| **Plan review** | After writing a plan in plan mode, before exiting | Spawn an Opus subagent with the plan + relevant best-practices topics; ask for an independent critique. Write the response to `<plan>-review.md`. |
| **Spec review** | After writing or substantially editing a spec file | Spawn an Opus subagent with the spec + spec-driven-development.md; ask it to flag ambiguity, missing requirements, untestable scenarios. |
| **Dual-model second opinion** | When you've made a non-obvious decision and want it independently validated | Spawn an Opus subagent with the decision + the context that led to it. Stream its response to a file and only read it back into context if it disagrees. |
| **Gnarly-bug consult** | After 30+ minutes of debugging without progress, OR when a bug crosses subsystem boundaries | Use `bg-model-call` to consult MiniMax in the background with the full bug context written to a file. ScheduleWakeup to check the result. |
| **Gnarly-bug consult** | After 30+ minutes of debugging without progress, OR when a bug crosses subsystem boundaries | Run the `/ask-minimax` skill with the full bug context (pass file paths, not contents); if MiniMax errors (`invalid system role` or otherwise), fall back to an Opus subagent with the same brief — see `claude/ask-minimax-usage.md` § Failure handling. |
| **Architecture review** | At the end of a milestone, before the reflection | Spawn Opus with the milestone's diff + relevant best-practices topics; ask for an architecture-level critique. |
## Auto-fire at session start

View File

@@ -48,7 +48,7 @@ You are running as Haiku. Fixed for the session. You are smart enough to drive t
## Async policy
- Background bash: enabled
- bg-model-call (third-party containers): enabled — useful for second opinions from MiniMax when an Opus subagent's answer feels uncertain
- Third-party delegation: the /ask-minimax skill (file-heavy grunt work, second opinions from MiniMax when an Opus subagent's answer feels uncertain); on MiniMax failure (`invalid system role` or otherwise), fall back to an Opus subagent with the same brief — see `claude/ask-minimax-usage.md` § Failure handling.
- ScheduleWakeup: enabled — use it after firing background jobs so you remember to check them. The wakeup prompt MUST be self-contained (file paths, what to do on hit, what to do on miss) because you won't remember why you scheduled it.
- Container agents (control plane): not the focus — recommend `orch` if needed

View File

@@ -48,8 +48,18 @@ You are running as Sonnet. Fixed for the session. Your job is orchestration, not
| **Monitor** | Always running in a background bash from session start | `agent-monitor --filter "project=<project>" --filter "age<1h"` — gives a live view of task states |
| **Triage failed runs** | When the monitor shows a task in failed state | Read the agent's branch/logs, decide: retry / fix the task definition / cancel and reassign |
## Pre-flight gate (before the autoloop)
Run the following checklist before firing `/loop 2m /orchestrate`. **Do not start the loop until every check passes — report failures to the user instead.**
1. CP health endpoint responds (e.g. `curl -s <CP_URL>/health` returns 200).
2. A dispatcher is actually polling (check via `agent-monitor` or the CP status endpoint).
3. `.agent-tasks.json` exists in the repo root and passes `jq empty` (valid JSON).
4. Auth has been completed this session (token is live, not expired).
See `~/dev/claude/claude/agent-dispatch-preflight.md` for the full checklist.
## Auto-fire at session start
1. `/loop 2m /orchestrate` — auto-dispatches ready tasks every 2 minutes
1. Run the **Pre-flight gate** above. If all checks pass, fire `/loop 2m /orchestrate` — auto-dispatches ready tasks every 2 minutes. If any check fails, report to the user and wait.
2. `agent-monitor --filter "project=<project>" --filter "age<1h"` — launched via background bash, kept running for the duration of the session
## Status line format
@@ -64,6 +74,7 @@ The `queue:<N>` segment shows the count of in-flight or pending tasks (read from
| A task fails repeatedly (>2 retries) | Stop the loop. Read the failures. Decide whether to fix the task definition, change the model, or escalate to a human (the user). |
| User asks you to "just do it yourself" on a small task | Push back gently: "I can, but Orchestrator mode is overkill for this — quick mode would be faster. Should I relaunch or do it here?" |
| The queue empties and no new work is queued | Tell the user, suggest next milestone or relaunch in another mode |
| The loop completes 5 consecutive iterations with no task-state change | Stop the loop. Report the stuck queue. Wait for the user. |
## Out of scope
This mode does NOT:
@@ -72,6 +83,7 @@ This mode does NOT:
- Enter plan mode
- Run third-party models via background bash (use container agents instead)
- Skip setting `project_id` on tasks
- Run the autoloop without the pre-flight gate
## On context wipe (/clear)
First message after a context wipe must be:

View File

@@ -41,6 +41,7 @@ Everything is synchronous. If a task is too large for sync execution, stop and t
- Spec-driven workflow: ignored — Quick Task assumes no new behaviour worth a spec
- Best-practices topics: load only those directly named in the project's CLAUDE.md
- Memory files: read the project's MEMORY.md index; pull topic files on demand
- Before any git push: confirm the repo's SSH key is loaded (`ssh-add -l`) — see claude/source-control.md § SSH agent pre-flight.
## Auto-fire at session start
none