feat(default-mode): auto-activate ultrawork and ralph loop without commands
Add new `default_mode` config section with two boolean fields:
- `ultrawork`: Auto-inject ultrawork mode prompt on main session start
without requiring the "ultrawork"/"ulw" keyword. Wired through the
keyword-detector hook — injects once per session, respects existing
guards (non-OMO agents, planner agents, subagent sessions).
- `ralph_loop`: Auto-start ralph loop on first main session message
without requiring /ralph-loop or /ulw-loop commands. When ultrawork
is also enabled, the loop starts in ultrawork mode.
Usage:
```jsonc
{
"default_mode": {
"ultrawork": true, // Always get ultrawork prompt on start
"ralph_loop": true // Auto-start ralph loop
}
}
```
Files: 7 modified/added, ~65 LOC added.
This commit is contained in:
@@ -13,6 +13,7 @@ export type {
|
||||
SisyphusAgentConfig,
|
||||
ExperimentalConfig,
|
||||
DynamicContextPruningConfig,
|
||||
DefaultModeConfig,
|
||||
RalphLoopConfig,
|
||||
TmuxConfig,
|
||||
TmuxLayout,
|
||||
|
||||
@@ -7,6 +7,7 @@ export * from "./schema/categories"
|
||||
export * from "./schema/claude-code"
|
||||
export * from "./schema/comment-checker"
|
||||
export * from "./schema/commands"
|
||||
export * from "./schema/default-mode"
|
||||
export * from "./schema/dynamic-context-pruning"
|
||||
export * from "./schema/experimental"
|
||||
export * from "./schema/fallback-models"
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
import { z } from "zod"
|
||||
|
||||
export const DefaultModeConfigSchema = z.object({
|
||||
/**
|
||||
* Automatically inject ultrawork mode prompt on main session start
|
||||
* without requiring "ultrawork"/"ulw" keyword in the message.
|
||||
* The ultrawork mode system prompt is injected once per session.
|
||||
*/
|
||||
ultrawork: z.boolean().default(false),
|
||||
/**
|
||||
* Automatically start ralph loop on main session start
|
||||
* without requiring /ralph-loop or /ulw-loop commands.
|
||||
* When ultrawork is also enabled, the loop starts in ultrawork mode.
|
||||
*/
|
||||
ralph_loop: z.boolean().default(false),
|
||||
})
|
||||
|
||||
export type DefaultModeConfig = z.infer<typeof DefaultModeConfigSchema>
|
||||
@@ -10,6 +10,7 @@ import { CategoriesConfigSchema } from "./categories"
|
||||
import { ClaudeCodeConfigSchema } from "./claude-code"
|
||||
import { CommentCheckerConfigSchema } from "./comment-checker"
|
||||
import { BuiltinCommandNameSchema } from "./commands"
|
||||
import { DefaultModeConfigSchema } from "./default-mode"
|
||||
import { ExperimentalConfigSchema } from "./experimental"
|
||||
import { GitMasterConfigSchema } from "./git-master"
|
||||
import { KeywordDetectorConfigSchema } from "./keyword-detector"
|
||||
@@ -81,6 +82,8 @@ export const OhMyOpenCodeConfigSchema = z.object({
|
||||
tmux: TmuxConfigSchema.optional(),
|
||||
sisyphus: SisyphusConfigSchema.optional(),
|
||||
start_work: StartWorkConfigSchema.optional(),
|
||||
/** Default mode auto-activation settings (ultrawork, ralph loop) */
|
||||
default_mode: DefaultModeConfigSchema.optional(),
|
||||
/** Migration history to prevent re-applying migrations (e.g., model version upgrades) */
|
||||
_migrations: z.array(z.string()).optional(),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user