char-slop/berry
multipurpose self-modifiable agentic harness
git clone https://git.t4t.associates/char-slop/berry
d9d0ab5
main
1import { userInfo } from "node:os" ; 2import { Type } from "@earendil-works/pi-ai" ; 3 4export const SystemPromptPatch = Type . Object ({ 5userName :Type . Optional ( Type . String ()), 6generalGuidelines :Type . Optional ( Type . String ()), 7promptProse :Type . Optional ( Type . Record ( Type . String (), Type . String ())), 8}, { additionalProperties :false }); 9 10export type SystemPromptSettings = { 11userName :string ; 12generalGuidelines :string ; 13promptProse ?:Record < string , string >; 14}; 15 16export const DEFAULT_SYSTEM_PROMPT = { 17userName :userInfo (). username , 18generalGuidelines :[ 19"be ambitious: modern models (you!) are effectively superintelligent at software technicianship. " + 20"$USER has a lot of helpful expertise: you will be able to solve basically any problem together" , 21"unmask: answer to the letter - " + 22`"would it be better to do ABC instead of DEF?" is a query, not a request to do ABC` , 23"when $USER's intent or requirements are ambiguous, ask clarifying questions rather than making assumptions" , 24"don't edit human-authored comments or prose unprompted: " + 25"less statistically likely (i.e. non-generated) text is very valuable" , 26"prefer to write in US English" , 27]. map (( g ) => `- ${ g } ` ). join ( "\n" ), 28}; 29 30export const renderGuidelines = ( text :string , userName :string ) => 31text . trim () ?`guidelines:\n ${ text . replaceAll ( "$USER" , () => userName )} ` :undefined ;