Skip to content

feat: support rules in declarative sources - #2349

Merged
dyoshikawa merged 6 commits into
mainfrom
issue-1598-declarative-rule-sources
Jul 23, 2026
Merged

dyoshikawa merged 6 commits into
mainfrom
issue-1598-declarative-rule-sources

Conversation

@dyoshikawa

@dyoshikawa dyoshikawa commented Jul 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • add selective rules and rulesPath support to declarative GitHub, git, and npm sources
  • stage remote rules under .rulesync/rules/.curated/ with local-first and first-source precedence
  • extend source lockfiles, frozen installs, source-wide transactional updates, stale artifact cleanup, and generated gitignore entries
  • verify cached rule integrity, check out exact locked git SHAs, and reject unsafe curated symlink trees
  • document rule source configuration and reject rule-only fields in --mode gh

Closes #1598

Test plan

  • pnpm cicheck (329 test files, 7,420 tests)

@dyoshikawa
dyoshikawa merged commit 2555065 into main Jul 23, 2026
9 checks passed
@dyoshikawa
dyoshikawa deleted the issue-1598-declarative-rule-sources branch July 23, 2026 06:36
@dyoshikawa

Copy link
Copy Markdown
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
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.

feat: support rules filtering in declarative sources

2 participants