20#include <unordered_map>
23namespace entropic::prompts {
87 std::optional<std::unordered_map<std::string, PhaseConfig>>
phases;
131 const std::filesystem::path& path,
147 const std::filesystem::path& path,
161 const std::optional<std::filesystem::path>& constitution_path,
163 const std::filesystem::path& data_dir,
183 const std::optional<std::filesystem::path>& app_context_path,
185 const std::filesystem::path& data_dir,
204 const std::string& tier_name,
205 const std::filesystem::path& data_dir);
224 const std::string& tier_name,
225 const std::filesystem::path& data_dir);
238ENTROPIC_EXPORT std::string
assemble(
240 const std::filesystem::path& data_dir);
Configuration structs with defaults.
Symbol visibility macro for all exported symbols.
ENTROPIC_EXPORT std::string load_app_context(const std::optional< std::filesystem::path > &app_context_path, bool disabled, const std::filesystem::path &data_dir, std::string &body)
Load app_context prompt with tri-state resolution.
ENTROPIC_EXPORT const char * prompt_type_to_string(PromptType type)
Convert PromptType to string.
ENTROPIC_EXPORT ParsedIdentity resolve_tier_identity_full(const entropic::TierConfig &tier_config, const std::string &tier_name, const std::filesystem::path &data_dir)
Resolve full parsed identity (body + frontmatter) for a tier.
ENTROPIC_EXPORT std::string load_constitution(const std::optional< std::filesystem::path > &constitution_path, bool disabled, const std::filesystem::path &data_dir, std::string &body)
Load constitution prompt with tri-state resolution.
ENTROPIC_EXPORT std::string load_identity(const std::filesystem::path &path, ParsedIdentity &identity)
Load an identity file: parse frontmatter + body.
ENTROPIC_EXPORT std::string resolve_tier_identity(const entropic::TierConfig &tier_config, const std::string &tier_name, const std::filesystem::path &data_dir)
Resolve the system prompt body for a named tier.
PromptType
Prompt file type (frontmatter "type" field).
@ APP_CONTEXT
Application context prompt.
@ IDENTITY
Tier identity prompt.
@ CONSTITUTION
Constitution prompt.
ENTROPIC_EXPORT std::string assemble(const entropic::ParsedConfig &config, const std::filesystem::path &data_dir)
Assemble the full system prompt from config.
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.
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< std::string > auto_chain
Auto-chain target tier.
int max_output_tokens
Default max output tokens.
int max_iterations
Per-identity loop iteration cap; -1 = use global (E6)
std::vector< std::string > focus
Focus areas (min 1)
PromptType type
Always IDENTITY.
bool explicit_completion
Requires explicit completion.
std::string name
Tier name (e.g., "lead")
bool routable
Visible to router.
int version
Schema version.
bool relay_single_delegate
Skip re-synthesis when single delegate returns (v2.0.11)
bool enable_thinking
Default thinking mode.
float repeat_penalty
Default repetition penalty.
std::optional< std::vector< std::string > > bash_commands
Allowed bash commands.
int max_tool_calls_per_turn
Per-identity tool call cap; -1 = use global (E6)
bool interstitial
Interstitial role.
float temperature
Default temperature.
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.
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.