[Feature]: Skill resources for presets (copy-mode aware composition and preset-owned resources)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start with presets/_resolver.py at PresetResolver.resolve_content and compare its path rewriting with the copy-mode handling from #5366. Then read extensions/_skill_resources.py and the extension resource lifecycle tests to trace validation, copying, registry ownership, and removal. Done means the acceptance criteria define stacked resource ownership and preset removal behavior, with matching tests for composition and resource lifecycle.
由索引模型根据 Issue 内容生成。
描述
Problem Statement
#5366 lets extension commands declare resources that are copied into their generated agent skills ("copy mode"; skill bodies are not path-rewritten). Presets are not covered:
- Composition: when a preset overrides a copy-mode extension command with
append/prepend/wrap,PresetResolver.resolve_content(presets/_resolver.py~l.789) still appliesrewrite_extension_pathsto the extension base layer. The composed skill therefore references.specify/extensions/<id>/...instead of the copied skill-relative resources. It still resolves, but is inconsistent with copy mode. - Preset-owned resources: presets that override or provide skills cannot bundle their own resources (references, templates, scripts) into the skill directory.
Proposed Solution
- Make preset composition copy-mode aware for skill outputs: when the winning base layer is a copy-mode extension command and the output is a skill, do not rewrite its paths. Command/template consumers keep today's rewriting.
- Add an optional
resourceslist to preset command/template entries inpreset.yml(same pattern dialect as extensionresources), copied into the preset's skill output with hash-tracked ownership in the preset registry, reusing the extension resource helper (extensions/_skill_resources.py).
Alternatives Considered
- Keep presets on extension-local paths only (today's behaviour): works, but preset authors cannot ship skill-relative files.
- Only fix composition (item 1) and defer preset-owned resources.
Component
Presets / skills rendering
AI Agent (if applicable)
All SKILL.md-based integrations
Use Cases
- A team preset appends review rules to an extension skill and ships its own
references/team-rules.md. - A preset wraps a copy-mode extension command and the composed skill should keep skill-relative references.
Acceptance Criteria
- Composed skill bodies over a copy-mode extension base are not path-rewritten; non-skill outputs unchanged.
- Preset
resourcesare validated like extension resources and copied as regular files. - Ownership defined for path conflicts between an extension and one or more presets writing the same skill directory (who wins, who owns, what happens on preset removal and priority changes).
- Defined behaviour for stacked layers (
append/prepend/wrap): whose resources are copied. - On
preset remove, preset-owned resources are removed and the extension's resources/skill are restored. - Tests mirror the extension resource lifecycle tests.
Additional Context
Deferred out of #5366 by design; that change only restores extension copy-mode skills (with resources) after preset remove.
AI Disclosure
Drafted with the pi coding agent (orchestrator model: Claude Opus 5.5 via GitHub Copilot; implementation/review subagents: GPT-6.1-terra, GPT-6-astra), human-supervised by the filer. Reproductions were run locally by the agent and reviewed by the filer before filing.
- 主要语言
- Python
- 星标
- 149k
- 派生
- 13.4k
- 平均合并
- 1 天 5 小时
- 30 天内合并 PR
- 223
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/spec-kit 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
triage-must-have
难度 1/5 1 小时以内 新手友好度 78/100
维护者通常 1 天内回复
-
Workflow-step verifier test fixture breaks when the checkout path contains whitespace (4 failures on macOS)可能已有人在做 @mehdikarimi55 于 3 天前认领。 未关闭triage-can-wait
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复
-
Parity tests fail under the documented direct pytest invocation when the ambient python3 lacks PyYAML (11 failures)可能已有人在做 @mehdikarimi55 于 3 天前认领。 未关闭triage-must-have
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
bug triage-out-of-scope
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 80/100
glossyio/traffic-monitor#312 ·
维护者通常 1 天内回复
-
documentation enhancement
难度 2/5 1-3 小时 新手友好度 76/100
es-ude/elastic-ai.creator#1046 ·
维护者通常 3 天内回复
-
feature request
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
confident-ai/deepteam#306 ·
维护者通常 1 天内回复
-
SslLibrary crashes with unhandled OSError: port/proto not found on non-standard SSL ports可能已有人在做 @himanchalkaushale 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
OWASP/Nettacker#1884 · 1 条评论 ·
维护者通常 1 天内回复