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 peer 범위
^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.