Files
oh-my-opencode/src/hooks/keyword-detector/team/default.ts
T

12 lines
867 B
TypeScript
Raw Normal View History

/**
* Team mode keyword detector.
*
* Triggers when the user explicitly invokes team-mode work:
* team mode, team-mode, team_mode, teammode (case-insensitive)
*/
export const TEAM_PATTERN = /\bteam[\s_-]?mode\b/i
export const TEAM_MESSAGE = `[team-mode]
Team-mode reference detected. Orchestrate via team_* tools (team_create -> team_task_create + team_send_message); NEVER substitute with delegate_task — it is not equivalent. After every team_task_update that completes or fails a task, re-check team_task_list: if every task is terminal, run the closure sequence (team_shutdown_request + team_approve_shutdown per active member, then team_delete) in the same turn. Closing the team is the lead's responsibility, not the user's. If the team_* tools are absent, team_mode is disabled — tell the user to set team_mode.enabled=true and restart opencode.`