fix: add cursor to AGENT_SKILLS and add pi/cursor to spawn-skill tests (#3164)

cursor was missing from the AGENT_SKILLS map in spawn-skill.ts, causing
spawn skill injection to silently skip cursor VMs when --beta recursive
is active. pi was present in AGENT_SKILLS but missing from all test
arrays in spawn-skill.test.ts.

Agent: code-health

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
A 2026-04-03 17:59:11 -07:00 committed by GitHub
parent a31a821e8a
commit e26d65cd65
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 21 additions and 0 deletions

View file

@ -34,10 +34,18 @@ describe("getSpawnSkillPath", () => {
"hermes",
"~/.hermes/SOUL.md",
],
[
"cursor",
"~/.cursor/rules/spawn.md",
],
[
"junie",
"~/.junie/AGENTS.md",
],
[
"pi",
"~/.pi/agent/skills/spawn/SKILL.md",
],
];
it("returns correct remote path for each known agent", () => {
@ -65,7 +73,9 @@ describe("isAppendMode", () => {
"openclaw",
"opencode",
"kilocode",
"cursor",
"junie",
"pi",
];
for (const agent of overwriteAgents) {
expect(isAppendMode(agent), `agent "${agent}"`).toBe(false);
@ -83,7 +93,9 @@ describe("getSkillContent", () => {
"opencode",
"kilocode",
"hermes",
"cursor",
"junie",
"pi",
];
for (const agent of agents) {
@ -110,7 +122,9 @@ describe("getSkillContent", () => {
for (const agent of [
"opencode",
"kilocode",
"cursor",
"junie",
"pi",
]) {
it(`${agent} content is plain markdown (no YAML frontmatter)`, () => {
const content = getSkillContent(agent);
@ -180,7 +194,9 @@ describe("injectSpawnSkill", () => {
"opencode",
"kilocode",
"hermes",
"cursor",
"junie",
"pi",
];
for (const agent of agents) {
let capturedCmd = "";

View file

@ -119,6 +119,11 @@ const AGENT_SKILLS: Record<string, SkillConfig> = {
content: HERMES_SNIPPET,
append: true,
},
cursor: {
remotePath: "~/.cursor/rules/spawn.md",
content: SKILL_BODY,
append: false,
},
junie: {
remotePath: "~/.junie/AGENTS.md",
content: SKILL_BODY,