claw-code-parity/rust/crates/runtime/src
Yeachan-Heo 32981ffa28 Keep project instructions informative without flooding the prompt
This improves Rust prompt-building by deduplicating repeated CLAUDE instruction content, surfacing clearer project-context metadata, and truncating oversized instruction payloads so local rules stay useful without overwhelming the runtime prompt.

The change preserves ancestor-chain discovery while making the rendered context more stable, compact, and readable for downstream compaction and CLI flows.

Constraint: Keep existing CLAUDE.md discovery semantics while reducing prompt bloat

Constraint: Avoid adding a new parser or changing user-authored instruction file formats

Rejected: Introduce a structured CLAUDE schema now | too large a shift for this parity slice

Confidence: high

Scope-risk: narrow

Reversibility: clean

Directive: If richer instruction precedence is added later, keep duplicate suppression conservative so distinct local rules are not silently lost

Tested: cargo fmt; cargo clippy --all-targets --all-features -- -D warnings; cargo test -q

Not-tested: Live end-to-end behavior with very large real-world CLAUDE.md trees
2026-03-31 19:32:42 +00:00
..
bash.rs feat: Rust port of Claude Code CLI 2026-03-31 17:43:09 +00:00
bootstrap.rs feat: Rust port of Claude Code CLI 2026-03-31 17:43:09 +00:00
compact.rs Improve CLI visibility into runtime usage and compaction 2026-03-31 19:18:56 +00:00
config.rs feat: merge 2nd round from all rcc/* sessions 2026-03-31 17:43:25 +00:00
conversation.rs feat: merge 2nd round from all rcc/* sessions 2026-03-31 17:43:25 +00:00
file_ops.rs Improve CLI visibility into runtime usage and compaction 2026-03-31 19:18:56 +00:00
json.rs feat: Rust port of Claude Code CLI 2026-03-31 17:43:09 +00:00
lib.rs Improve CLI visibility into runtime usage and compaction 2026-03-31 19:18:56 +00:00
permissions.rs feat: Rust port of Claude Code CLI 2026-03-31 17:43:09 +00:00
prompt.rs Keep project instructions informative without flooding the prompt 2026-03-31 19:32:42 +00:00
session.rs feat: merge 2nd round from all rcc/* sessions 2026-03-31 17:43:25 +00:00
sse.rs feat: Rust port of Claude Code CLI 2026-03-31 17:43:09 +00:00
usage.rs Improve CLI visibility into runtime usage and compaction 2026-03-31 19:18:56 +00:00