feat(hooks): add ultrawork-mode hook for automatic agent orchestration guidance

When "ultrawork" or "ulw" keyword is detected in user prompt:
- Injects ULTRAWORK_CONTEXT with agent-agnostic guidance
- Executes AFTER CC hooks (UserPromptSubmit etc.)
- Follows existing hook pattern (think-mode style)

Key features:
- Agent orchestration principles (by capability, not name)
- Parallel execution rules
- TODO tracking enforcement
- Delegation guidance

Closes #31

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
YeonGyu-Kim
2025-12-13 13:37:37 +09:00
parent 41a318df66
commit f57aa39d53
7 changed files with 193 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ import {
createRulesInjectorHook,
createBackgroundNotificationHook,
createAutoUpdateCheckerHook,
createUltraworkModeHook,
} from "./hooks";
import { createGoogleAntigravityAuthPlugin } from "./auth/antigravity";
import {
@@ -203,6 +204,9 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
const autoUpdateChecker = isHookEnabled("auto-update-checker")
? createAutoUpdateCheckerHook(ctx)
: null;
const ultraworkMode = isHookEnabled("ultrawork-mode")
? createUltraworkModeHook()
: null;
updateTerminalTitle({ sessionId: "main" });
@@ -230,6 +234,7 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
"chat.message": async (input, output) => {
await claudeCodeHooks["chat.message"]?.(input, output);
await ultraworkMode?.["chat.message"]?.(input, output);
},
config: async (config) => {
@@ -304,6 +309,7 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
await rulesInjector?.event(input);
await thinkMode?.event(input);
await anthropicAutoCompact?.event(input);
await ultraworkMode?.event(input);
const { event } = input;
const props = event.properties as Record<string, unknown> | undefined;