Conversation
OpenCode also discovers ~/.agents/skills and ~/.claude/skills, and pi also discovers ~/.agents/skills, so installing one copy per harness made those harnesses report duplicate definitions and keep serving stale dedicated copies after a shared-directory update. - Install Codex, OpenCode, and pi skills into the shared ~/.agents/skills directory; Claude Code keeps ~/.claude/skills. Deduplicate skill plan entries that resolve to one directory with identical adapters and reject aliased targets whose adapters differ. - Keep artifacts in their harness-specific destinations by separating the artifact base from the shared skills target. - Add --migrate to remove legacy 0.4.0 copies from the opencode and pi config directories after installing. Only copies matching the current source byte for byte are removed; modified copies and unrelated skills are kept and reported, with backups beside the legacy copy. Dry-run previews removals and hints at leftover legacy copies. - Group shared targets in installer output, note OpenCode's residual scan of ~/.claude/skills, and document the discovery model. Fixes #16
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #16
问题
mstack 0.4.0 为四个 Harness 各自复制一份 skills,但 pi 还会发现
~/.agents/skills,OpenCode 还会发现~/.agents/skills和~/.claude/skills。结果是同一 skill 被重复发现:pi 按先加载保留专用目录的旧副本(只更新共享目录不生效),OpenCode 对同名项记录 warning 且后加载项覆盖前者。方案
按 issue 的期望,安装器现在根据各 Harness 的实际发现规则规划安装:
~/.agents/skills(三者都发现它),Claude Code 保留~/.claude/skills。profiles/harnesses.json为每个 Harness 增加了skills.install(安装目标)、skills.discovers(发现目录)和skills.legacy(0.4.0 旧目录,用于迁移)元数据;目标解析抽取到新的scripts/harness-targets.mjs,与smoke-harnesses.mjs共用。~/.agents/skills和~/.claude/skills,而 Codex 和 Claude Code 各自需要这两个目录,因此该交叉无法靠改变安装目标消除。安装器保证两份副本每次安装都同步刷新(除 Claude frontmatter 适配外内容一致),--dry-run输出注明 OpenCode 会报告同名重复;需要彻底隔离时可用HARNESS_SKILLS_OPENCODE_DIR指定仅 OpenCode 发现的目录。--migrate,安装后扫描 opencode/pi 的旧 config 目录,仅删除与当前 mstack 源逐字节一致的副本(备份到旧目录的.harness-skills-backups/),保留用户修改的副本与无关 skills 并逐条报告。--dry-run可预览;未加--migrate时若检测到旧副本会输出 hint。codex, opencode, pi: ~/.agents/skills (shared));README 与 docs/harness-adapters.md 记录发现模型、OpenCode 交叉说明与迁移动作;CHANGELOG 增加 Unreleased 条目。验证
npm test全绿(170 项,169 通过,1 项 Unix-only 跳过);npm run check-package通过。~/.config/opencode/skills、~/.pi/agent/skills不再创建)、共享目录分组输出、adapter 一致时的别名去重、dry-run 的 note/hint/migrate 计划、真实迁移(匹配副本删除并备份、修改副本与无关 skill 保留)。--harness all --replace --migrate迁移到共享布局(旧目录仅剩备份)→ 重复运行(无--replace报冲突、有则替换)→ 单 Harness 更新只刷新共享目录且对三个 Harness 生效。