Skip to content

fix(skills): make factorydroid disable-model-invocation consistent with other tools - #1948

Merged
dyoshikawa merged 1 commit into
mainfrom
resolve-scrap-issue-1931-factorydroid-dmi
Jun 19, 2026
Merged

fix(skills): make factorydroid disable-model-invocation consistent with other tools#1948
dyoshikawa merged 1 commit into
mainfrom
resolve-scrap-issue-1931-factorydroid-dmi

Conversation

@dyoshikawa

Copy link
Copy Markdown
Owner

Summary

Closes #1931
Ref: #1928
Issue: #1931

PR #1928 added a root-level disable-model-invocation default to the rulesync skill frontmatter and wired it into six tools (claudecode, cursor, zed, pi, qwencode, factorydroid), where each tool's own section value overrides the shared default. Five of those tools have a per-target section schema and round-trip the value, but factorydroid did not: it had no factorydroid: section in the rulesync skill schema, only read the root value, and dropped the value on import. This contradicted the documented "any tool section can override" claim.

Changes

  • factorydroid consistency
    • Added a factorydroid section (with the disable-model-invocation key) to RulesyncSkillFrontmatterSchemaInternal and its input type in src/features/skills/rulesync-skill.ts.
    • FactorydroidSkill.fromRulesyncSkill now resolves the value via the shared helper (root default + per-target override).
    • FactorydroidSkill.toRulesyncSkill now round-trips disable-model-invocation back into the factorydroid section, matching the other five tools. The documented per-target override claim is now true for factorydroid too.
  • DRY helper
    • Extracted resolveDisableModelInvocation({ rootFrontmatter, section }) into src/features/skills/skills-utils.ts and replaced the copy-pasted section?.["disable-model-invocation"] ?? rootFrontmatter["disable-model-invocation"] expression in all six tool skill files. For pi/zed (which spread the section then re-apply the resolved value), behavior is identical and a clarifying comment now makes the spread-then-reapply intent explicit. No observable output change for the five already-correct tools.
  • Docs
    • Documented the factorydroid: skill section in docs/reference/file-formats.md and re-synced skills/rulesync/file-formats.md via scripts/sync-skill-docs.ts.
  • Tests
    • Added a direct unit test for resolveDisableModelInvocation.
    • Added factorydroid tests for the per-target override (including the false-overrides-true edge case) and the import round-trip.

Verification

pnpm cicheck (code + content) passes: format, oxlint, typecheck, 6738 tests, skill-doc-sync, cspell, secretlint all green.

🤖 Generated with Claude Code

PR #1928 wired a root-level `disable-model-invocation` default into six
tools, but factorydroid lacked a per-target section schema, so it could not
honor a per-tool override and dropped the value on import — contradicting the
documented "any tool section can override" claim.

- Add a `factorydroid` section (with `disable-model-invocation`) to the
  rulesync skill frontmatter schema and input type.
- Resolve the value in FactorydroidSkill.fromRulesyncSkill via the shared
  helper (root default + per-target override) and round-trip it back into the
  `factorydroid` section in toRulesyncSkill, matching the other five tools.
- Extract a shared `resolveDisableModelInvocation` helper and replace the
  copy-pasted resolution expression in all six tool skill files
  (claudecode, cursor, zed, pi, qwencode, factorydroid).
- Document the `factorydroid` skill section and re-sync skills/rulesync/.
- Add unit tests for the helper and for factorydroid per-target override
  (including the `false`-over-`true` edge case) and import round-trip.

Ref: #1928

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dyoshikawa
dyoshikawa merged commit 35b9c54 into main Jun 19, 2026
9 checks passed
@dyoshikawa

Copy link
Copy Markdown
Owner Author

@dyoshikawa Thank you!

@dyoshikawa
dyoshikawa deleted the resolve-scrap-issue-1931-factorydroid-dmi branch June 19, 2026 07:43
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.

Follow-ups from PR #1928: factorydroid disable-model-invocation override gap and skills resolve-helper DRY

2 participants