Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/enhance/skill-patterns.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ const skillPatterns = {
(content && p.test(content));
});

if (hasSideEffects && frontmatter['disable-model-invocation'] !== true) {
// Accept both the YAML boolean `true` and the quoted string "true" -
// users commonly write `disable-model-invocation: "true"`, which YAML
// parses as a string; a strict `!== true` would wrongly re-flag it.
const dmi = frontmatter['disable-model-invocation'];
if (hasSideEffects && dmi !== true && dmi !== 'true') {
return {
issue: 'Skill with side effects should have disable-model-invocation: true',
fix: 'Add "disable-model-invocation: true" to frontmatter for manual-only invocation'
Expand Down
2 changes: 2 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const customHandler = require('./sources/custom-handler');
const policyQuestions = require('./sources/policy-questions');
const crossPlatform = require('./cross-platform');
const enhance = require('./enhance');
const repoIntel = require('./repo-intel');
const repoMap = require('./repo-map');
const perf = require('./perf');
const collectors = require('./collectors');
Expand Down Expand Up @@ -250,6 +251,7 @@ module.exports = {
sources,
xplat,
enhance,
repoIntel,
repoMap,
perf,
collectors,
Expand Down
Loading