SystemPromptBuilder class

System prompt builder — assembles the full system prompt.

Constructors

SystemPromptBuilder({required String model, required PlatformBridge platform, DateTime? now})

Properties

estimatedTokens int
Estimated token count of the built prompt.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addCompactContext(String summary) → void
Add compact mode context.
addConventions({String? language, String? framework, List<String> rules = const []}) → void
Add coding conventions.
addEnvironment({required String workingDir, String? shell, String? gitBranch}) → void
Add environment context.
addIdentity({String? customName}) → void
Add the identity section.
addMcpServers(List<({String name, List<String> tools})> servers) → void
Add MCP server context.
addMemory(String memoryPrompt) → void
Add memory context.
addPlanMode() → void
Add plan mode instructions.
addSafetyGuidelines() → void
Add safety guidelines.
addSection(PromptSection section) → void
Add a section.
addSkills(List<({String description, String name})> skills) → void
Add skill definitions.
addTools(List<({String description, String name})> tools) → void
Add tool descriptions.
addUserInstructions(String instructions) → void
Add user instructions (.neomage/INSTRUCTIONS.md content).
build({int? maxTokens}) String
Build the final system prompt.
clear() → void
Clear all sections.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited