Repository navigation
feat: support rules in declarative sources - #2349
Merged
Merged
Conversation
Owner
Author
|
@dyoshikawa Thank you! |
superbiche
pushed a commit
to superbiche/rulesync
that referenced
this pull request
Nov 29, 2026
Declarative sources could only install skills and rules. Add `commands` / `commandsPath` and `subagents` / `subagentsPath` to source entries, following the rules precedent (dyoshikawa#2349): direct `.md` files of the path are fetched into `.rulesync/commands/.curated/` and `.rulesync/subagents/.curated/` over every transport (GitHub, git, npm), locked with optional fields in `rulesync.lock` / `rulesync-npm.lock.json` (no lockfile version bump), covered by `--frozen`, `rulesync add` flags, the MCP add tool and gitignore, and read by `generate` with local files taking precedence. The rule-only helpers are generalized to a per-file feature so rules, commands and subagents share one code path. Locked names are checked to stay inside the curated directory before anything is read, removed or restored under them. MCP servers, hooks and permissions stay out of sources: installing them from a remote source would run commands or widen permissions. Refs dyoshikawa#3423 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rulesandrulesPathsupport to declarative GitHub, git, and npm sources.rulesync/rules/.curated/with local-first and first-source precedence--mode ghCloses #1598
Test plan
pnpm cicheck(329 test files, 7,420 tests)