20#include <unordered_map>
23namespace entropic::prompts {
92 std::optional<std::unordered_map<std::string, PhaseConfig>>
phases;
136 const std::filesystem::path& path,
152 const std::filesystem::path& path,
166 const std::optional<std::filesystem::path>& constitution_path,
168 const std::filesystem::path& data_dir,
188 const std::optional<std::filesystem::path>& app_context_path,
190 const std::filesystem::path& data_dir,
209 const std::string& tier_name,
210 const std::filesystem::path& data_dir);
229 const std::string& tier_name,
230 const std::filesystem::path& data_dir);
243ENTROPIC_EXPORT std::string
assemble(
245 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< 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.
bool explicit_completion
Requires explicit completion.
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.
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< 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.