fix: include skills in minimal prompt (#1431) (thanks @robbyczgw-cla)

This commit is contained in:
Peter Steinberger 2026-01-22 09:01:57 +00:00
parent 13bedc3f05
commit 2d9297a93a
3 changed files with 5 additions and 3 deletions

View File

@ -25,6 +25,7 @@ Docs: https://docs.clawd.bot
- Google Antigravity: drop unsigned thinking blocks for Claude models to avoid signature errors.
- Config: avoid stack traces for invalid configs and log the config path.
- CLI: read Codex CLI account_id for workspace billing. (#1422) Thanks @aj47.
- Agents: include skills section in minimal prompts for subagents. (#1431) Thanks @robbyczgw-cla.
- Doctor: avoid recreating WhatsApp config when only legacy routing keys remain. (#900)
- Doctor: warn when gateway.mode is unset with configure/config guidance.
- OpenCode Zen: route models to the Zen API shape per family so proxy endpoints are used. (#1416)

View File

@ -23,7 +23,7 @@ describe("buildAgentSystemPrompt", () => {
expect(prompt).not.toContain("Owner numbers:");
});
it("omits extended sections in minimal prompt mode", () => {
it("keeps skills but omits other extended sections in minimal prompt mode", () => {
const prompt = buildAgentSystemPrompt({
workspaceDir: "/tmp/clawd",
promptMode: "minimal",
@ -37,7 +37,8 @@ describe("buildAgentSystemPrompt", () => {
});
expect(prompt).not.toContain("## User Identity");
expect(prompt).not.toContain("## Skills");
expect(prompt).toContain("## Skills (mandatory)");
expect(prompt).toContain("<available_skills>");
expect(prompt).not.toContain("## Memory Recall");
expect(prompt).not.toContain("## Documentation");
expect(prompt).not.toContain("## Reply Tags");

View File

@ -7,7 +7,7 @@ import type { EmbeddedContextFile } from "./pi-embedded-helpers.js";
/**
* Controls which hardcoded sections are included in the system prompt.
* - "full": All sections (default, for main agent)
* - "minimal": Reduced sections (Tooling, Workspace, Runtime) - used for subagents
* - "minimal": Reduced sections (Tooling, Skills, Workspace, Runtime) - used for subagents
* - "none": Just basic identity line, no sections
*/
export type PromptMode = "full" | "minimal" | "none";