opencode-empirical-plan 0.3.4 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/hooks/skill-reminder.ts +21 -5
package/package.json
CHANGED
|
@@ -14,8 +14,22 @@ if (!(globalThis as Record<symbol, unknown>)[KEY]) {
|
|
|
14
14
|
|
|
15
15
|
const store = (globalThis as Record<symbol, unknown>)[KEY] as SkillReminderStore;
|
|
16
16
|
|
|
17
|
-
const ENGLISH_KEYWORD_REGEX =
|
|
18
|
-
|
|
17
|
+
const ENGLISH_KEYWORD_REGEX =
|
|
18
|
+
/\b(plan|planning|roadmap|strategy|milestone|timeline|breakdown|research|investigate|proposal)\b/i;
|
|
19
|
+
const CHINESE_KEYWORDS = [
|
|
20
|
+
// 原有
|
|
21
|
+
"计划", "规划", "制定计划", "做计划",
|
|
22
|
+
// 方案类
|
|
23
|
+
"方案", "出方案", "测试方案", "设计方案", "技术方案", "实施方案",
|
|
24
|
+
// 研究调研类
|
|
25
|
+
"研究", "调研", "做研究", "做调研", "调查", "摸底",
|
|
26
|
+
// 拆解分析类
|
|
27
|
+
"拆解", "分步", "分解",
|
|
28
|
+
// 策略路线类
|
|
29
|
+
"策略", "路线图",
|
|
30
|
+
// 排期时间线类
|
|
31
|
+
"排期", "时间表", "里程碑",
|
|
32
|
+
];
|
|
19
33
|
const MAX_DEDUP_ENTRIES = 200;
|
|
20
34
|
|
|
21
35
|
const PLUGIN_VARIANT = "empirical-plan-reminder";
|
|
@@ -23,22 +37,24 @@ const REMINDER_PREFIX = "## [Empirical Plan Reminder]";
|
|
|
23
37
|
|
|
24
38
|
const REMINDER_TEXT = `## [Empirical Plan Reminder]
|
|
25
39
|
|
|
26
|
-
检测到规划类关键词(plan / 计划 / 规划)。
|
|
40
|
+
检测到规划类关键词(plan / 方案 / 研究 / 调研 / 拆解 / 策略 / 排期 / 计划 / 规划)。
|
|
27
41
|
|
|
28
42
|
**在回答前,请先执行:**
|
|
29
43
|
\`\`\`
|
|
30
44
|
skill(name="empirical-plan")
|
|
31
45
|
\`\`\`
|
|
32
46
|
|
|
33
|
-
|
|
47
|
+
**重要**:通过专职 Coordinator Sub-Session 运行生命周期,禁止在当前 session 内联执行:
|
|
34
48
|
\`\`\`
|
|
35
49
|
// 1. 初始化生命周期
|
|
36
50
|
lifecycle_start(run_dir="<绝对路径>/.opencode/plans/YYYYMMDD-<主题>")
|
|
37
51
|
|
|
38
|
-
// 2. 启动 Coordinator
|
|
52
|
+
// 2. 启动 Coordinator(Plan 完成后按需决定是否 Execute + Reflect)
|
|
39
53
|
task(subagent_type="coordinator-plan", load_skills=["empirical-plan"], run_in_background=false, prompt="run_dir: <绝对路径>\\n目标:<描述>")
|
|
40
54
|
\`\`\`
|
|
41
55
|
|
|
56
|
+
Coordinator 完成 Plan 后会判断:若 plan 本身即交付物(调研/方案/分析),可取消 Execute 和 Reflect 直接返回。
|
|
57
|
+
|
|
42
58
|
如果这只是一个澄清问题(非任务),或本 session 已加载过 empirical-plan,可跳过。`;
|
|
43
59
|
|
|
44
60
|
interface TextPartLike {
|