@@ -458,7 +458,10 @@ describe("buildAgentSystemPrompt", () => {
|
458 | 458 | expect(prompt).toContain("- Read: Read file contents"); |
459 | 459 | expect(prompt).toContain("- Exec: Run shell commands"); |
460 | 460 | expect(prompt).toContain( |
461 | | -"- If exactly one skill clearly applies: read its SKILL.md at <location> with `Read`, then follow it.", |
| 461 | +"- If exactly one skill clearly applies: read its SKILL.md at <location> with `Read`, then follow it. You MUST use the exact <location> value from <available_skills>; never guess, fabricate, or hard-code a skill file path.", |
| 462 | +); |
| 463 | +expect(prompt).toContain( |
| 464 | +"- If multiple could apply: choose the most specific one, read its SKILL.md at <location> with `Read`, then follow it. You MUST use the exact <location> value from <available_skills>; never guess, fabricate, or hard-code a skill file path.", |
462 | 465 | ); |
463 | 466 | expect(prompt).toContain("OpenClaw docs: /tmp/openclaw/docs"); |
464 | 467 | expect(prompt).toContain( |
@@ -644,7 +647,10 @@ describe("buildAgentSystemPrompt", () => {
|
644 | 647 | |
645 | 648 | expect(prompt).toContain("## Skills"); |
646 | 649 | expect(prompt).toContain( |
647 | | -"- If exactly one skill clearly applies: read its SKILL.md at <location> with `read`, then follow it.", |
| 650 | +"- If exactly one skill clearly applies: read its SKILL.md at <location> with `read`, then follow it. You MUST use the exact <location> value from <available_skills>; never guess, fabricate, or hard-code a skill file path.", |
| 651 | +); |
| 652 | +expect(prompt).toContain( |
| 653 | +"- If multiple could apply: choose the most specific one, read its SKILL.md at <location> with `read`, then follow it. You MUST use the exact <location> value from <available_skills>; never guess, fabricate, or hard-code a skill file path.", |
648 | 654 | ); |
649 | 655 | }); |
650 | 656 | |
|