Skip to content

feat(recall): name a required skill that follows a branch - #108

Merged
forrestlinfeng merged 2 commits into
EvoMap:mainfrom
Mike-7777777:feat/required-skill-branch
Nov 21, 2026
Merged

forrestlinfeng merged 2 commits into
EvoMap:mainfrom
Mike-7777777:feat/required-skill-branch

Conversation

@Mike-7777777

@Mike-7777777 Mike-7777777 commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #107

Problem

The plugin names a Gene's required skill only when it pins a full commit and a sha256 digest. Evolver is adding a reference that follows a branch (EvoMap/evolver-v2-private-dev#1624), so a skill can change without republishing the Gene:

skill:git+https://github.com/<owner>/<repo>@<branch>#path=<dir>

lib/required-skills.js returned null for any entry without sha256, so a Gene written this way got no install instruction.

Change

  • lib/required-skills.js accepts @<branch>#path=<dir> under the rules Evolver applies: a full commit still needs sha256, a branch takes none, and a branch name allows only letters, digits, ., _, -, / (no .., no empty, dot-led or .lock segment, no leading -). Anything else still names no skill, as before. A fragment key other than sha256 and path also names no skill, for both forms, because Evolver rejects it (b5290cc, from Sentinel's advisory).
  • When every skill is pinned, the injected text is unchanged. When a skill follows a branch it is not called pinned:
Required skills for this Gene: quest-gate (latest on branch release/v2), report (pinned). Before acting, install them and read them:
- Run: evolver skill fetch --asset sha256:… --out .agents --write --force
- Read .agents/skills/quest-gate/SKILL.md and .agents/skills/report/SKILL.md and follow them with the steps above.
  • The command is the same. Evolver resolves the branch to its latest commit when the model runs it and reports that commit and the content digest.

How a Gene is written after release

Once Evolver with EvoMap/evolver-v2-private-dev#1624 and this plugin are both released, a Gene can name the demo skill as:

skill:git+https://github.com/Mike-7777777/gene-skills@main#path=skills/quest-prototype-three-round-gate

Both releases need someone with npm / plugin release rights. A Gene in this form is rejected by Evolver 2.0.54 (skill fetch reports the reference as invalid), so release Evolver first, or together with the plugin.

Verified

  • RED: the new branch case failed on main (requiredSkillLinesOf returned no lines).
  • node --test test/required-skills.test.js: 11 pass, including 2 new cases: a branch reference next to a pinned one, and the rejected shapes (branch with a digest, commit without one, an unknown fragment key, --upload-pack=x, main/../../tags/v1).
  • npm test: 1227 tests, 1214 pass, 10 skipped, 3 fail. The 3 failures are in test/runtime/desktop-engine.test.js. They fail the same way with this change stashed, and feat(recall): name the skill a recalled Gene pins, with the command that installs it #106 reported the same 3 on main on this machine.
  • Against the real repository with the Evolver branch from #1624: @main#path=skills/quest-prototype-three-round-gate resolved to 48f06952654a270e04f217e5683a8e667d5db29b (matches git ls-remote refs/heads/main), and the installed content digest matched an independent shasum of the directory.

A Gene may now name a skill as skill:git+https://<repo>@<branch>#path=<dir>.
Accept it with the same rules Evolver applies (a commit still needs sha256, a
branch takes none, branch names that git could misread are refused) and stop
calling such a skill pinned in the injected text.

Fixes EvoMap#107
@evomap-aiqa-bot

evomap-aiqa-bot Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Sentinel 已审核此变更,未发现已核验问题,但发现需要人工确认的风险。

另有 1 个需要人工确认的风险;黄色 advisory 不阻塞合并,建议开发 agent review advisory 评论并逐条确认。

开发 agent 查询详情: 调用 MCP 工具 sentinel_pr_review_context,传入 owner_repo="evomap/evolver-agent-plugin"、pr_number=108、head_sha="e016660dd68966e5103127dc039f2322ff8ff620",并按条目追加 finding_id 或 finding_key。

由 Sentinel 审核 · 目标提交 e016660dd689

@evomap-aiqa-bot

Copy link
Copy Markdown

Sentinel 保留了 1 个尚未确认的审核候选。这些黄色条目不阻塞合并;红色 P0/P1 与其他独立硬门禁不受影响。 单一猜测、缺少变更行证据或纯 checklist 的候选会统一降为 P3。
开发 agent:请 review 以下 advisory,并逐条给出“已验证无风险 / 已修复 / 转为后续事项”的结论;不要只做整体确认。

  • [P2] 分支引用接受未知 fragment 参数 — 分支引用只检查 sha256 是否存在,却没有拒绝其他未知参数。因此类似 #md5=x 或 #path=skill...(truncated) · lib/required-skills.js·advisory_19fda040b01881263bad4fa3`

需要完整证据时,可用行末 finding_key 查询 Sentinel PR review context。

由 Sentinel 审核 · 目标提交 e016660dd689

…t key

Evolver refuses a skill:git+ fragment key other than sha256 and path, so the
plugin would hand the model an install command that fails. Refuse the same
references for both pinned and branch forms.
@Mike-7777777

Copy link
Copy Markdown
Contributor Author

回复 Sentinel 对 e016660 的意见:

P2 分支引用接受未知 fragment 参数(advisory_19fda040b01881263bad4fa3):已修复,b5290cc

属实。evolver 的 requiredSkills.ts 只接受 sha256 和 path 两个 fragment 参数,其他参数一律判为引用无效;插件原先只看 sha256,遇到 @main#md5=x&path=skills/x 这类写法仍会给出安装命令,模型执行后会失败。钉住 commit 的写法也有同样的缺口(#sha256=…&path=…&ref=main 会被接受),这次一并处理。

修改:lib/required-skills.js 在解析 fragment 后,出现 sha256、path 以外的参数就不给出 skill,两种写法都适用。

验证:

  • RED:test/required-skills.test.js 的拒绝用例加了 @main#md5=x&path=skills/x 和带多余 ref=main 的钉住写法,修改前失败。
  • GREEN:node --test test/required-skills.test.js 11 个用例全部通过。
  • npm test:1227 个用例,1211 通过,10 跳过,6 失败。test/runtime/desktop-engine.test.js 的 3 个在 main 上同样失败。test/hosts/grok/hooks.test.js 的 1 个和 test/runtime/project.test.js 的 2 个是在本机负载 72 时失败的,单独重跑两次全部通过。

@evomap-aiqa-bot

evomap-aiqa-bot Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Sentinel 已审核此变更,未发现需要报告的问题。

开发 agent 查询详情: 调用 MCP 工具 sentinel_pr_review_context,传入 owner_repo="evomap/evolver-agent-plugin"、pr_number=108、head_sha="b5290cc167c53de0c8401e98d916240941562be4",并按条目追加 finding_id 或 finding_key。

由 Sentinel 审核 · 目标提交 b5290cc167c5

@forrestlinfeng
forrestlinfeng merged commit 0114a5b into EvoMap:main Nov 21, 2026
10 checks passed
@Mike-7777777

Copy link
Copy Markdown
Contributor Author

回复 Sentinel 对 b5290cc 的复审(https://github.com/EvoMap/evolver-agent-plugin/pull/108#issuecomment-7062149070):

复审没有新的审核意见,本 PR 的机器人意见已全部闭合。

  • 覆盖范围:b5290cc 就是合并时的 head,合并提交 0114a5b 之后没有新的提交,复审覆盖了合入的全部代码。
  • 上一条 advisory(未知 fragment 参数,advisory_19fda040b01881263bad4fa3)已在 b5290cc 修复,见 feat(recall): name a required skill that follows a branch #108 (comment) ,这次复审没有再报。
  • 在上游 main(0114a5b)上重跑 node --test test/required-skills.test.js:11 个用例全部通过。

无需后续 PR 或 issue。

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.

Accept a required skill that follows a branch

2 participants