Skip to main content

Module mode_prompts

Module mode_prompts 

Source
Expand description

Behavioral prompts injected per operating mode, ported from wcgw’s modes.py.

The mode (wcgw / architect / code_writer) already enforces permissions technically (allowed commands, write globs, bash -r). But enforcement alone makes the model discover the rules by hitting errors. These prompts tell the model up front how to behave in the current mode — the “system-prompt policy” layer that research shows is as important as the tool descriptions themselves. Returned by Initialize so the agent reads them before its first action.

Functions§

mode_prompt
Build the behavioral prompt for the active mode. config is only consulted for code_writer, where the allowed globs/commands shape the wording.