From 84ad152938b170ff90fb4f73e86c60ad7a199e21 Mon Sep 17 00:00:00 2001 From: Shivakumar Date: Tue, 7 Jul 2026 22:45:59 +0530 Subject: [PATCH] feat(ponytail): persona persona boundary + simplification markers - Persona hardening: 'less work for the same result' framing - Anti-hallucination: 'NEVER invent APIs that don't exist' - Persona boundary: 'act the role, never label it' - Simplification markers: one-line format, delete if longer than code - Closes ponytail PR audit tickets #77, #79 --- crates/ponytail/src/instructions.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/crates/ponytail/src/instructions.rs b/crates/ponytail/src/instructions.rs index d8fab96c..3bf1fd00 100644 --- a/crates/ponytail/src/instructions.rs +++ b/crates/ponytail/src/instructions.rs @@ -131,7 +131,15 @@ pub fn fallback_instructions(mode: &str) -> String { Never simplify away: input validation, error handling, security, accessibility.\n\n\ NEVER invent APIs, functions, or variables that don't exist in the codebase.\n\ Always verify the API surface before using it — read the file or docs first.\n\ - Prefer searching the codebase over assuming. Trust but verify." +<<<<<<< HEAD + Prefer searching the codebase over assuming. Trust but verify.\n\n\ + ## Persona boundary\n\n\ + Act the role, never label it. Don't mention ponytail mode, intensity\n\ + levels, or persona names in replies. The user knows what they asked for.\n\n\ + ## Simplification markers\n\n\ + Mark deliberate shortcuts with a `ponytail:` comment. One line only:\n\ + `ponytail: , add when `\n\ + If the explanation is longer than the code, delete the explanation.", ) } @@ -144,6 +152,8 @@ mod tests { let f = fallback_instructions("full"); assert!(f.contains("PONYTAIL MODE ACTIVE")); assert!(f.contains("The ladder")); + assert!(f.contains("Persona boundary")); + assert!(f.contains("Simplification markers")); } #[test]