2025-12-14 11:38:33 +09:00
|
|
|
export const CODE_BLOCK_PATTERN = /```[\s\S]*?```/g
|
|
|
|
|
export const INLINE_CODE_PATTERN = /`[^`]+`/g
|
|
|
|
|
|
2026-03-23 18:10:44 +09:00
|
|
|
export { isPlannerAgent, isNonOmoAgent, getUltraworkMessage } from "./ultrawork"
|
2026-02-01 19:26:57 +09:00
|
|
|
export { SEARCH_PATTERN, SEARCH_MESSAGE } from "./search"
|
|
|
|
|
export { ANALYZE_PATTERN, ANALYZE_MESSAGE } from "./analyze"
|
|
|
|
|
|
|
|
|
|
import { getUltraworkMessage } from "./ultrawork"
|
|
|
|
|
import { SEARCH_PATTERN, SEARCH_MESSAGE } from "./search"
|
|
|
|
|
|
|
|
|
|
export type KeywordDetector = {
|
|
|
|
|
pattern: RegExp
|
|
|
|
|
message: string | ((agentName?: string, modelID?: string) => string)
|
2026-01-05 16:26:29 +09:00
|
|
|
}
|
|
|
|
|
|
2026-02-01 19:26:57 +09:00
|
|
|
export const KEYWORD_DETECTORS: KeywordDetector[] = [
|
2026-01-05 16:26:29 +09:00
|
|
|
{
|
2026-01-14 21:36:32 +09:00
|
|
|
pattern: /\b(ultrawork|ulw)\b/i,
|
2026-01-05 16:26:29 +09:00
|
|
|
message: getUltraworkMessage,
|
2025-12-14 11:38:33 +09:00
|
|
|
},
|
|
|
|
|
{
|
2026-02-01 19:26:57 +09:00
|
|
|
pattern: SEARCH_PATTERN,
|
|
|
|
|
message: SEARCH_MESSAGE,
|
2025-12-14 11:38:33 +09:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
pattern:
|
|
|
|
|
/\b(analyze|analyse|investigate|examine|research|study|deep[\s-]?dive|inspect|audit|evaluate|assess|review|diagnose|scrutinize|dissect|debug|comprehend|interpret|breakdown|understand)\b|why\s+is|how\s+does|how\s+to|분석|조사|파악|연구|검토|진단|이해|설명|원인|이유|뜯어봐|따져봐|평가|해석|디버깅|디버그|어떻게|왜|살펴|分析|調査|解析|検討|研究|診断|理解|説明|検証|精査|究明|デバッグ|なぜ|どう|仕組み|调查|检查|剖析|深入|诊断|解释|调试|为什么|原理|搞清楚|弄明白|phân tích|điều tra|nghiên cứu|kiểm tra|xem xét|chẩn đoán|giải thích|tìm hiểu|gỡ lỗi|tại sao/i,
|
|
|
|
|
message: `[analyze-mode]
|
2025-12-19 13:38:54 +09:00
|
|
|
ANALYSIS MODE. Gather context before diving deep:
|
|
|
|
|
CONTEXT GATHERING (parallel):
|
|
|
|
|
- 1-2 explore agents (codebase patterns, implementations)
|
|
|
|
|
- 1-2 librarian agents (if external library involved)
|
|
|
|
|
- Direct tools: Grep, AST-grep, LSP for targeted searches
|
2025-12-14 11:38:33 +09:00
|
|
|
|
2026-03-20 16:26:17 +09:00
|
|
|
IF COMPLEX - DO NOT STRUGGLE ALONE. Consult specialists:
|
|
|
|
|
- **Oracle**: Conventional problems (architecture, debugging, complex logic)
|
|
|
|
|
- **Artistry**: Non-conventional problems (different approach needed)
|
2025-12-14 11:38:33 +09:00
|
|
|
|
2026-03-20 16:26:17 +09:00
|
|
|
SYNTHESIZE findings before proceeding.
|
|
|
|
|
---
|
|
|
|
|
MANDATORY delegate_task params: ALWAYS include load_skills=[] and run_in_background when calling delegate_task.
|
|
|
|
|
Example: delegate_task(subagent_type="explore", prompt="...", run_in_background=true, load_skills=[])`,
|
2025-12-14 11:38:33 +09:00
|
|
|
},
|
|
|
|
|
]
|