feat(task-system): add experimental task system with Claude Code spec alignment (#1415)
* feat(hooks): add tasks-todowrite-disabler hook to block TodoRead/TodoWrite Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * feat(task-tools): add parallel execution guidance to descriptions Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * refactor(index): migrate task system to experimental.task_system flag Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * docs: update AGENTS.md for experimental task system Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * fix(task-tests): align test field names with Claude Code spec (subject, blockedBy, addBlockedBy) * fix: address Cubic review feedback Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * fix: add optional chaining for tasksTodowriteDisabler null check --------- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
+11
-3
@@ -36,6 +36,7 @@ import {
|
||||
createCompactionContextInjector,
|
||||
createUnstableAgentBabysitterHook,
|
||||
createPreemptiveCompactionHook,
|
||||
createTasksTodowriteDisablerHook,
|
||||
} from "./hooks";
|
||||
import {
|
||||
contextCollector,
|
||||
@@ -269,6 +270,12 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
|
||||
? createSisyphusJuniorNotepadHook(ctx)
|
||||
: null;
|
||||
|
||||
const tasksTodowriteDisabler = isHookEnabled("tasks-todowrite-disabler")
|
||||
? createTasksTodowriteDisablerHook({
|
||||
experimental: pluginConfig.experimental,
|
||||
})
|
||||
: null;
|
||||
|
||||
const questionLabelTruncator = createQuestionLabelTruncatorHook();
|
||||
const subagentQuestionBlocker = createSubagentQuestionBlockerHook();
|
||||
|
||||
@@ -464,8 +471,8 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
|
||||
modelCacheState,
|
||||
});
|
||||
|
||||
const newTaskSystemEnabled = pluginConfig.new_task_system_enabled ?? false;
|
||||
const taskToolsRecord: Record<string, ToolDefinition> = newTaskSystemEnabled
|
||||
const taskSystemEnabled = pluginConfig.experimental?.task_system ?? false;
|
||||
const taskToolsRecord: Record<string, ToolDefinition> = taskSystemEnabled
|
||||
? {
|
||||
task_create: createTaskCreateTool(pluginConfig, ctx),
|
||||
task_get: createTaskGetTool(pluginConfig),
|
||||
@@ -714,10 +721,11 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
|
||||
await questionLabelTruncator["tool.execute.before"]?.(input, output);
|
||||
await claudeCodeHooks["tool.execute.before"](input, output);
|
||||
await nonInteractiveEnv?.["tool.execute.before"](input, output);
|
||||
await commentChecker?.["tool.execute.before"](input, output);
|
||||
await commentChecker?.["tool.execute.before"]?.(input, output);
|
||||
await directoryAgentsInjector?.["tool.execute.before"]?.(input, output);
|
||||
await directoryReadmeInjector?.["tool.execute.before"]?.(input, output);
|
||||
await rulesInjector?.["tool.execute.before"]?.(input, output);
|
||||
await tasksTodowriteDisabler?.["tool.execute.before"]?.(input, output);
|
||||
await prometheusMdOnly?.["tool.execute.before"]?.(input, output);
|
||||
await sisyphusJuniorNotepad?.["tool.execute.before"]?.(input, output);
|
||||
await atlasHook?.["tool.execute.before"]?.(input, output);
|
||||
|
||||
Reference in New Issue
Block a user