Avoid parsing skill metadata rejected by effective policy
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 重构
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- node.js, typescript
- 领域
- cli, performance
调研方向
从 packages/intent/src/core/source-policy.ts 中的 scanForPolicedIntents 以及 packages/intent/src/discovery/register.ts 的注册相关部分开始。复现 synthetic fixture 对 package 读取、skill 文件读取、输出和耗时的测量,然后跟踪 policy 解析和传递遍历。完成的标准是:被拒绝的 skill 文件不会被解析,允许的结果和 diagnostics 保持不变,并且通过 tests 或 fixtures 记录测得的减少量。
由索引模型根据 Issue 内容生成。
描述
Problem
Policy-controlled discovery scans skill metadata before applying permission and exclusion rules, doing work for content that will never be exposed.
Evidence
With intent.skills: [] and 100 installed skill packages, listIntentSkills returned zero skills but reported 101 package manifest reads. scanForPolicedIntents calls the raw scanner before policy resolution, and registration discovers skills before filtering.
Sources: scan ordering, registration.
Verified against main at 206e987 (@tanstack/intent 0.3.8), Node v24.12.0 on macOS arm64. Tests used installed dependencies and synthetic local fixtures.
Acceptance criteria
- Measure package reads, skill-file reads, output, and elapsed time before and after on the same fixtures.
- Resolve and validate policy before policy-controlled metadata parsing.
- Agent-visible discovery does not parse denied skill files.
- Preserve traversal needed to locate permitted transitive packages through unlisted parents.
- Preserve human review of hidden candidates and current policy diagnostics through an explicit appropriate discovery path.
- Show identical permitted results and a measured reduction in denied-content work, with no weakening of path or policy checks.
Scope and priority
Priority: Medium. Type: performance.
Follow-up optimization after policy correctness fixes. No persistent cache, broad scanner rewrite, or new dependency solely to optimize this path.
- 主要语言
- TypeScript
- 星标
- 331
- 派生
- 22
- 平均合并
- 12 小时 17 分钟
- 30 天内合并 PR
- 51
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TanStack/intent 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 5/5 一周以上 新手友好度 45/100
-
难度 5/5 一周以上 新手友好度 35/100
-
难度 5/5 一周以上 新手友好度 45/100
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
相似的 Issue
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 1/5 1 小时以内 新手友好度 85/100
-
Mend: dependency security vulnerability untriaged
难度 2/5 1-3 小时 新手友好度 70/100