# Prompts Development Guidelines
When modifying files under [src/prompts](file:///Users/whit3rabbit/Documents/GitHub/forge-rs/src/prompts), keep templates and parsers stable by adhering to the following rules:
## Gotchas & Rules
1. **Strict Prompt Parity**:
- The text blocks generated by [nudges.rs](file:///Users/whit3rabbit/Documents/GitHub/forge-rs/src/prompts/nudges.rs) are compared against Python test fixtures byte-for-byte in parity tests.
- Even minor changes to spacing, capitalization, or wording will break `cargo test --test parity_tests`.
- If prompt updates are required, you **MUST** update the Python reference generator first, recreate the JSON fixtures, and then match the exact output in Rust.
2. **Robust Multi-Strategy Parser**:
- [parse_strategies.rs](file:///Users/whit3rabbit/Documents/GitHub/forge-rs/src/prompts/parse_strategies.rs) must tolerate models wrapping tool arguments in markdown codeblocks (e.g., ` ```json ... ``` `), extra leading/trailing whitespace, and malformed trailing braces.
- Do not simplify parsing logic in a way that breaks recovery of dirty text blocks.
## Testing Target
When modifying prompts or parsers, run:
```bash
cargo test --package forge-guardrails --lib prompts
cargo test --test parity_tests
```