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

@pi-cordis/plugin-rules-injector

Project rules (AGENTS.md, .claude/rules, .cursorrules) auto-discovery and injection plugin for Pi-Cordis 适合需让模型遵循项目规则的用户;默认不重复 Pi 已加载的上下文文件。

パッケージ
@pi-cordis/plugin-rules-injector
互換性
未検証
Cordis ピア範囲
^4.0.1
バージョン
0.1.0
最終更新
2026/08/21

インストール

検証済み bundle がないか、互換性チェックに失敗しています。先にリポジトリの説明を読んでください。 README 全文を読む ↗

ドキュメント

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.