Skip to content

fix(capabilities): require explicit intent for named groups - #357

Open
seekskyworld wants to merge 1 commit into
openpi-dev:mainfrom
seekskyworld:fix/issue-303-capability-intent
Open

fix(capabilities): require explicit intent for named groups#357
seekskyworld wants to merge 1 commit into
openpi-dev:mainfrom
seekskyworld:fix/issue-303-capability-intent

Conversation

@seekskyworld

Copy link
Copy Markdown

Problem

Closes #303. Bare subagent/workflow references in identifiers, discussion, or comparisons were treated as authorization under explicit discovery, causing optional tool groups to load unexpectedly.

Value

Prevents accidental capability activation from pasted prompts and ordinary development vocabulary while preserving explicit delegation/workflow requests.

Approach

Require imperative English request forms for named capabilities, retain existing Chinese request forms, and add regressions for branch/file references and comparisons. Negated and conditional clauses continue to fail closed.

Validation

  • node --test --experimental-strip-types tests/extensions/shared/capability-intent.test.ts (5 passed)
  • git diff --check (passed)

Impact

  • User-visible behavior: fewer false-positive capability highlights/loads.
  • Model-visible tools: explicit requests unchanged; bare references no longer load groups.
  • Runtime/lifecycle: no changes beyond intent classification.
  • Persisted config/data: none.
  • Compatibility/risk: prompts that relied on bare capability names must use an explicit request.

Signed-off-by: seekskyworld <djh1813553759@gmail.com>

@tt-a1i tt-a1i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要改:祈使语境仍然太宽

去掉光秃的 subagent / workflow 保留字是对的。但 delegate 仍是:

\b(?:use|spawn|start)\s+(?:a\s+)?subagents?

「I use subagents in this repo」这种讨论句仍会授权。请再收紧到明确的委派/启动请求,并补这条负例。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

explicit 能力发现把 subagent / workflow 的出现当成授权,dogfood 和粘贴都会误开

2 participants