Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Avoid parsing skill metadata rejected by effective policy

未关闭
#237 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
活跃
领域
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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

TanStack/intent 的其他 Issue

查看 TanStack/intent 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。