Class SystemMessageSections

java.lang.Object
com.github.copilot.rpc.SystemMessageSections
Direct Known Subclasses:
SystemPromptSections

public abstract sealed class SystemMessageSections extends Object permits SystemPromptSections
Well-known system message section identifiers for use with
invalid reference
SystemMessageMode#CUSTOMIZE
mode.

Each constant names a section of the default Copilot system message. Pass these as keys in the sections map of SystemMessageConfig to override individual sections.

Example

var config = new SystemMessageConfig().setMode(SystemMessageMode.CUSTOMIZE).setSections(Map.of(
		SystemMessageSections.TONE,
		new SectionOverride().setAction(SectionOverrideAction.REPLACE).setContent("Always be concise."),
		SystemMessageSections.CODE_CHANGE_RULES, new SectionOverride().setAction(SectionOverrideAction.REMOVE)));
Since:
1.0.2
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Coding rules, linting/testing, ecosystem tools, style.
    static final String
    Repository and organization custom instructions.
    static final String
    CWD, OS, git root, directory listing, available tools.
    static final String
    Tips, behavioral best practices, behavioral guidelines.
    static final String
    Section group covering the identity preamble and its sibling sub-sections (tone, tool efficiency, etc.).
    static final String
    End-of-prompt instructions: parallel tool calling, persistence, task completion, and configured subagent-model guidance when the task tool is available.
    static final String
    Agent identity preamble and mode statement.
    static final String
    Runtime-provided system-prompt context and instructions, such as system notifications, memories, workspace context, and content-exclusion policy.
    static final String
    Environment limitations, prohibited actions, security policies.
    static final String
    Response style, conciseness rules, output formatting preferences.
    static final String
    Tool usage patterns, parallel calling, batching guidelines.
    static final String
    Per-tool usage instructions.
  • Method Summary

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • PREAMBLE

      public static final String PREAMBLE
      Agent identity preamble and mode statement.
      See Also:
    • IDENTITY

      public static final String IDENTITY
      Section group covering the identity preamble and its sibling sub-sections (tone, tool efficiency, etc.).
      See Also:
    • TONE

      public static final String TONE
      Response style, conciseness rules, output formatting preferences.
      See Also:
    • TOOL_EFFICIENCY

      public static final String TOOL_EFFICIENCY
      Tool usage patterns, parallel calling, batching guidelines.
      See Also:
    • ENVIRONMENT_CONTEXT

      public static final String ENVIRONMENT_CONTEXT
      CWD, OS, git root, directory listing, available tools.
      See Also:
    • CODE_CHANGE_RULES

      public static final String CODE_CHANGE_RULES
      Coding rules, linting/testing, ecosystem tools, style.
      See Also:
    • GUIDELINES

      public static final String GUIDELINES
      Tips, behavioral best practices, behavioral guidelines.
      See Also:
    • SAFETY

      public static final String SAFETY
      Environment limitations, prohibited actions, security policies.
      See Also:
    • TOOL_INSTRUCTIONS

      public static final String TOOL_INSTRUCTIONS
      Per-tool usage instructions.
      See Also:
    • CUSTOM_INSTRUCTIONS

      public static final String CUSTOM_INSTRUCTIONS
      Repository and organization custom instructions.
      See Also:
    • RUNTIME_INSTRUCTIONS

      public static final String RUNTIME_INSTRUCTIONS
      Runtime-provided system-prompt context and instructions, such as system notifications, memories, workspace context, and content-exclusion policy. Mode-specific instructions can travel in transition messages instead.
      Since:
      1.3.0
      See Also:
    • LAST_INSTRUCTIONS

      public static final String LAST_INSTRUCTIONS
      End-of-prompt instructions: parallel tool calling, persistence, task completion, and configured subagent-model guidance when the task tool is available.
      See Also: