civaapple-alt/pi-cordis--packages-plugins-rules-injector ↗★ 0

@pi-cordis/plugin-rules-injector

自动发现并注入项目规则文件,如 .claude/rules 与 .cursorrules。 适合需让模型遵循项目规则的用户;默认不重复 Pi 已加载的上下文文件。

套件
@pi-cordis/plugin-rules-injector
相容性
待驗證
Cordis 依賴範圍
^4.0.1
版本
0.1.0
最近更新
2026年8月21日

安裝

此插件尚未提供可驗證的 bundle,或相容性檢查未通過。請先閱讀倉庫說明。 閱讀完整 README ↗

@pi-cordis/plugin-rules-injector

English | 中文

Adds supplemental project rule formats to the Cordis prompt-transform pipeline. By default it reads root .clauderules and .cursorrules, plus Markdown files under .claude/rules/ and .agents/rules/.

Pi already discovers AGENTS.override.md, AGENTS.md, and CLAUDE.md; this plugin therefore does not duplicate them by default. Set includePiContextFiles: true, or provide an explicit ruleFiles list, only when upstream Pi context-file loading has been disabled intentionally.

Directory traversal is deterministic, unreadable files fail visibly, and maxTotalBytes defaults to 128 KiB. A SHA-256 content hash reuses the already formatted block when content is unchanged; it does not eliminate the filesystem reads needed to detect changes or guarantee provider-side KV-cache behavior.

After the prompt pipeline has evaluated a working directory, /rules reports the exact files, byte count, and content hash that were applied, then opens the complete supplemental rule block in Pi's editor when available. With no evaluated or matching rules it reports that state explicitly. The command is registered as a reversible Cordis effect.