oc-tweaks 0.7.0 → 0.7.1

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/README.md CHANGED
@@ -136,7 +136,7 @@ This plugin provides an intelligent memory workflow:
136
136
 
137
137
  ### `backgroundSubagent`
138
138
 
139
- This plugin injects a policy into the system prompt, reminding the AI agent to use `run_in_background=true` by default when dispatching sub-agents. It helps maintain a responsive main conversation. If a foreground task is dispatched, a friendly reminder is shown.
139
+ This plugin injects a policy into the system prompt, reminding the AI agent to use `run_in_background=true` by default when dispatching sub-agents. It also requires each `task()` description to expose a compact transparency summary: agent type, loaded skills, background/foreground mode, and resume session when present. If a foreground task is dispatched, or if required transparency tags are missing, a friendly reminder is shown.
140
140
 
141
141
  **Configuration Options:**
142
142
 
@@ -357,7 +357,7 @@ bunx oc-tweaks init
357
357
 
358
358
  ### `backgroundSubagent`
359
359
 
360
- 此插件向系统提示中注入一项策略,提醒 AI 代理在派发子代理时默认使用 `run_in_background=true`。这有助于保持主对话的响应性。如果派发了前台任务,则会显示一个友好的提醒。
360
+ 此插件向系统提示中注入一项策略,提醒 AI 代理在派发子代理时默认使用 `run_in_background=true`。它也要求每次 `task()` 调用在 `description` 里写出紧凑的透明度摘要:agent 类型、已加载 skills、background/foreground 模式,以及存在时的 resume session。若派发了前台任务,或缺少必需透明度标签,插件都会追加友好提醒。
361
361
 
362
362
  **配置选项:**
363
363
 
package/dist/index.js CHANGED
@@ -292,17 +292,21 @@ When in doubt → background. Use \`background_output()\` to collect results lat
292
292
 
293
293
  ## Description Transparency Rule
294
294
 
295
- Every \`task()\` call MUST include an agent label in the \`description\` field so the user can see which mode you used.
295
+ Every \`task()\` call MUST include a compact transparency summary in the \`description\` field so the user can see how the sub-agent was dispatched.
296
296
 
297
297
  Required formats:
298
298
  - \`[category:xxx]\` when using \`category\`
299
299
  - \`[subagent:xxx]\` when using \`subagent_type\`
300
+ - \`[skills:skill-a,skill-b]\` or \`[skills:none]\`
301
+ - \`[background]\` or \`[foreground]\`
302
+ - \`[resume:session-id]\` when using \`session_id\`
300
303
 
301
304
  Examples:
302
- - \`description="[category:quick] Fix typo in config"\`
303
- - \`description="[subagent:explore] Inspect auth flow"\`
305
+ - \`description="[category:quick] [skills:none] [background] Fix typo in config"\`
306
+ - \`description="[subagent:explore] [skills:none] [background] Inspect auth flow"\`
307
+ - \`description="[category:deep] [skills:refactor,test-driven-development] [foreground] [resume:ses_123] Continue auth refactor"\`
304
308
 
305
- Do NOT omit the tag.
309
+ Do NOT omit any required transparency tag.
306
310
  `;
307
311
  var VIOLATION_WARNING = `\uD83D\uDCA1 [Reminder] Consider using background mode for better responsiveness.
308
312
  You used foreground mode (run_in_background=false). Check the three conditions in the system prompt.
@@ -320,15 +324,29 @@ function getMissingTransparencyTags(args) {
320
324
  if (!description.includes(tag))
321
325
  missingTags.push(tag);
322
326
  }
327
+ const skillsTag = args?.load_skills && args.load_skills.length > 0 ? `[skills:${args.load_skills.join(",")}]` : `[skills:none]`;
328
+ if (!description.includes(skillsTag))
329
+ missingTags.push(skillsTag);
330
+ const modeTag = args?.run_in_background === false ? `[foreground]` : `[background]`;
331
+ if (!description.includes(modeTag))
332
+ missingTags.push(modeTag);
333
+ if (args?.session_id) {
334
+ const tag = `[resume:${args.session_id}]`;
335
+ if (!description.includes(tag))
336
+ missingTags.push(tag);
337
+ }
323
338
  return missingTags;
324
339
  }
325
340
  function buildTransparencyWarning(missingTags) {
326
341
  const plural = missingTags.length > 1 ? "s" : "";
327
342
  return `⚠️ [Transparency] Your task description is missing the required transparency tag${plural}: ${missingTags.join(", ")}
328
- Add the tag directly to \`description\` so the user can see which agent mode you used.
343
+ Add the tag directly to \`description\` so the user can see the dispatch mode, loaded skills, and resume status.
329
344
  Required formats:
330
345
  - \`[category:xxx]\`
331
- - \`[subagent:xxx]\``;
346
+ - \`[subagent:xxx]\`
347
+ - \`[skills:skill-a,skill-b]\` or \`[skills:none]\`
348
+ - \`[background]\` or \`[foreground]\`
349
+ - \`[resume:session-id]\` when applicable`;
332
350
  }
333
351
  var backgroundSubagentPlugin = async () => {
334
352
  const foregroundCalls = new Set;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oc-tweaks",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./dist/index.js"