20#include <unordered_map>
23namespace entropic::prompts {
93 std::optional<std::unordered_map<std::string, PhaseConfig>>
phases;
137 const std::filesystem::path& path,
153 const std::filesystem::path& path,
186ENTROPIC_EXPORT AppContextState classify_app_context(
188 const std::optional<std::string>& app_context_content,
202ENTROPIC_EXPORT
const char* app_context_state_message(AppContextState state);
214ENTROPIC_EXPORT std::string load_constitution(
217 const std::filesystem::path&
data_dir,
236ENTROPIC_EXPORT std::string load_app_context(
238 const std::optional<std::string>& app_context_content,
240 const std::filesystem::path&
data_dir,
263ENTROPIC_EXPORT
void load_shared_prompt_sources(
265 const std::filesystem::path&
data_dir,
266 std::string& constitution,
267 std::string& app_context);
285ENTROPIC_EXPORT std::string validate_configured_prompts(
287 const std::filesystem::path&
data_dir);
303ENTROPIC_EXPORT std::string resolve_tier_identity(
305 const std::string& tier_name,
306 const std::filesystem::path&
data_dir);
323ENTROPIC_EXPORT ParsedIdentity resolve_tier_identity_full(
325 const std::string& tier_name,
326 const std::filesystem::path&
data_dir);
339ENTROPIC_EXPORT std::string assemble(
341 const std::filesystem::path&
data_dir);
Configuration structs with defaults.
Symbol visibility macro for all exported symbols.
ENTROPIC_EXPORT const char * prompt_type_to_string(PromptType type)
Convert PromptType to string.
AppContextState
Which app_context spelling a config is using (gh#163).
@ DISABLED
app_context: false — an explicit opt-out.
@ FROM_PATH
app_context: <path>.
@ NOT_CONFIGURED
No app_context key at all.
@ INLINE
app_context: {content: ...} (gh#141).
ENTROPIC_EXPORT std::string load_identity(const std::filesystem::path &path, ParsedIdentity &identity)
Load an identity file: parse frontmatter + body.
PromptType
Prompt file type (frontmatter "type" field).
@ APP_CONTEXT
Application context prompt.
@ IDENTITY
Tier identity prompt.
@ CONSTITUTION
Constitution prompt.
ENTROPIC_EXPORT std::string parse_prompt_file(const std::filesystem::path &path, PromptType expected_type, ParsedPrompt &result)
Parse a prompt file: validate frontmatter, return body.
@ disabled
Named in disabled_mcpjson_servers — never connect.
@ optional
optional: every escape asks the host's path approver
Full parsed configuration.
Inference parameters for a single identity phase.
Tier-specific model configuration.
A single benchmark prompt with quality checks.
std::vector< std::string > checks_yaml
Check defs as YAML strings.
std::string prompt
Prompt text.
Benchmark definition for an identity.
std::vector< BenchmarkPrompt > prompts
Benchmark prompts.
Identity frontmatter — full tier identity metadata.
std::vector< std::string > validation_rules
Per-identity constitutional rules (v2.0.6)
std::optional< std::vector< std::string > > allowed_tools
Tool filter.
std::optional< float > top_p
Per-tier top_p (gh#85); nullopt = use param default.
std::optional< float > repeat_penalty
Per-tier repeat_penalty (gh#86); nullopt = use param default.
std::optional< std::string > auto_chain
Auto-chain target tier.
int max_iterations
Per-identity loop iteration cap; -1 = use global (E6)
std::optional< float > min_p
Per-tier min_p (gh#85); nullopt = use param default.
std::vector< std::string > focus
Focus areas (min 1)
std::optional< float > presence_penalty
Per-tier presence_penalty (gh#85); nullopt = use param default.
PromptType type
Always IDENTITY.
std::optional< bool > enable_thinking
Per-tier thinking mode (gh#86); nullopt = use param default.
std::optional< int > max_output_tokens
Per-tier max output tokens (gh#82); nullopt = use param default.
std::string name
Tier name (e.g., "lead")
bool routable
Visible to router.
int version
Schema version.
std::optional< int > top_k
Per-tier top_k (gh#85); nullopt = use param default.
bool relay_single_delegate
Skip re-synthesis when single delegate returns (v2.0.11)
std::optional< std::vector< std::string > > bash_commands
Allowed bash commands.
std::optional< float > frequency_penalty
Per-tier frequency_penalty (gh#85); nullopt = use param default.
int max_tool_calls_per_turn
Per-identity tool call cap; -1 = use global (E6)
bool interstitial
Interstitial role.
int max_consecutive_empty_turns
Per-identity empty-turn allowance; -1 = use global default (gh#123)
std::optional< std::unordered_map< std::string, PhaseConfig > > phases
Named phases.
std::vector< std::string > examples
Few-shot examples.
std::optional< BenchmarkSpec > benchmark
Benchmark definition.
std::optional< std::string > grammar
Grammar file reference.
std::optional< bool > explicit_completion
Requires explicit completion; nullopt = derive from auto_chain (gh#117)
std::optional< float > temperature
Per-tier sampling temperature (gh#82); nullopt = use param default.
Parsed identity file: frontmatter + body.
IdentityFrontmatter frontmatter
Full identity metadata.
std::string body
Markdown system prompt body.
Parsed prompt file result: type + version + body.
PromptType type
Prompt type.
std::string body
Markdown body after frontmatter.
int version
Schema version.