@@ -636,6 +636,16 @@ assert.match(
636636 / P O N Y T A I L M O D E C H A N G E D — l e v e l : u l t r a / ,
637637) ;
638638
639+ // `/ponytail default lite` on Qoder: the turn still gets the live ruleset, with
640+ // the confirmation folded into the same JSON, and the live level stays ultra.
641+ const qoderDefaultEnv = { ...qoderEnv , XDG_CONFIG_HOME : path . join ( qoderHome , '.config' ) } ;
642+ result = run ( 'ponytail-mode-tracker.js' , qoderDefaultEnv , JSON . stringify ( { prompt : '/ponytail default lite' } ) ) ;
643+ assert . equal ( result . status , 0 , result . stderr ) ;
644+ assert . equal ( fs . readFileSync ( qoderState , 'utf8' ) , 'ultra' ) ;
645+ output = JSON . parse ( result . stdout ) ;
646+ assert . match ( output . hookSpecificOutput . additionalContext , / ^ P O N Y T A I L D E F A U L T S E T — n e w s e s s i o n s s t a r t i n l i t e \. / ) ;
647+ assert . match ( output . hookSpecificOutput . additionalContext , / P O N Y T A I L M O D E A C T I V E — l e v e l : u l t r a / ) ;
648+
639649// "stop ponytail": deactivates and persists off so a later prompt does
640650// not mistake the missing flag for first-run initialization.
641651result = run (
@@ -657,6 +667,12 @@ assert.equal(result.status, 0, result.stderr);
657667assert . equal ( result . stdout , '' , 'Qoder must stay off on later prompts' ) ;
658668assert . equal ( fs . readFileSync ( qoderState , 'utf8' ) , 'off' ) ;
659669
670+ // While off, `/ponytail default` only confirms; it must not switch ponytail on.
671+ result = run ( 'ponytail-mode-tracker.js' , qoderDefaultEnv , JSON . stringify ( { prompt : '/ponytail default full' } ) ) ;
672+ assert . equal ( result . status , 0 , result . stderr ) ;
673+ assert . equal ( JSON . parse ( result . stdout ) . hookSpecificOutput . additionalContext , 'PONYTAIL DEFAULT SET — new sessions start in full.' ) ;
674+ assert . equal ( fs . readFileSync ( qoderState , 'utf8' ) , 'off' ) ;
675+
660676// Subagent injection via PreToolUse (task|Task matcher): when ponytail is
661677// active, the subagent hook injects the ruleset. Qoder shares the same
662678// ponytail-subagent.js script; the isQoder branch outputs hookSpecificOutput
0 commit comments