Skip to content

feat(settings): support enabledSkillsDefaultOff whitelist mode (#178) - #285

Open
innocarpe wants to merge 1 commit into
lessweb:mainfrom
innocarpe:feat/178-skills-default-off
Open

feat(settings): support enabledSkillsDefaultOff whitelist mode (#178)#285
innocarpe wants to merge 1 commit into
lessweb:mainfrom
innocarpe:feat/178-skills-default-off

Conversation

@innocarpe

Copy link
Copy Markdown

Summary

  • New enabledSkillsDefaultOff setting (or DEEPCODE_ENABLED_SKILLS_DEFAULT_OFF env var) enables whitelist mode: only skills explicitly set to true are injected into the system prompt; everything else is off by default.
  • Default behavior is unchanged (only explicitly false skills are excluded).

Why

Issue #178: the built-in skills (e.g. karpathy-guidelines) are always injected unless individually disabled. Users who want a minimal, opt-in system prompt had no way to flip the default. Whitelist mode gives them full control.

Changes

  • packages/core/src/settings.ts: parse enabledSkillsDefaultOff (settings + env) into resolved settings.
  • packages/core/src/prompt.ts: readDefaultSkillDocs excludes a skill when defaultOff ? enabledSkills[name] !== true : enabledSkills[name] === false; getDefaultSkillPrompt threads the flag through.
  • packages/core/src/session.ts: pass enabledSkillsDefaultOff when building the default skill prompt.
  • Tests: prompt.test.ts (whitelist behavior), settings-and-notify.test.ts (resolution + env).

Validation

  • npm run typecheck
  • npm test — new tests pass ✅

Closes #178

…eb#178)

With enabledSkillsDefaultOff: true (or DEEPCODE_ENABLED_SKILLS_DEFAULT_OFF=1), only skills explicitly enabled with true are injected into the system prompt; everything else is off by default. This lets users opt into default skills instead of having them all on.

(cherry picked from commit 7d4cdf16024bb138d99acf07c8dd4c28066934fd)
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.

[Feature Request] enabledSkills 支持白名单模式 / default-off 选项

1 participant