Template AI Engine - Source Excerpt 01
Summary
This source excerpt preserves a bounded section of Anti-Christ.org/wp-content/themes/antichrist-engine/template-ai-engine.php so readers can inspect the evidence without opening the full source file.
**Source path:** Anti-Christ.org/wp-content/themes/antichrist-engine/template-ai-engine.php
<?php
/**
* Template Name: AI Engine
* Template Post Type: page
*
* @package Antichrist_Engine
*/
get_header();
the_post();
$identity = antichrist_engine_foundation_identity();
$document_profile = antichrist_engine_foundation_document_profile('ai_engine');
$notice = antichrist_engine_foundation_ai_get_notice();
$ai_copy = antichrist_engine_foundation_ai_interface_copy();
$personas = antichrist_engine_foundation_ai_personas();
$default_persona = antichrist_engine_foundation_ai_get_default_persona_key();
$protocols = antichrist_engine_foundation_ai_protocols();
$prompt_paths = antichrist_engine_foundation_ai_prompt_paths();
$route_map = antichrist_engine_foundation_ai_route_map();
$response_contract = antichrist_engine_foundation_ai_response_contract();
$next_routes = antichrist_engine_foundation_ai_next_routes();
$default_protocol = antichrist_engine_foundation_ai_get_default_protocol_key();
$model = antichrist_engine_foundation_ai_get_model();
$page_url = antichrist_engine_foundation_get_page_url('ai_engine');
$is_logged_in = is_user_logged_in();
$user_id = get_current_user_id();
$user_key_status = antichrist_engine_foundation_ai_get_user_key_status($user_id);
$has_site_key = '' !== antichrist_engine_foundation_ai_get_api_key();
$login_url = function_exists('antichrist_engine_membership_get_portal_url')
? antichrist_engine_membership_get_portal_url('login', array('redirect_to' => $page_url))
: wp_login_url($page_url);
$register_url = function_exists('antichrist_engine_membership_get_portal_url')
? antichrist_engine_membership_get_portal_url('register', array('redirect_to' => $page_url))
: wp_registration_url();
$storage_key = 'antichristEngineAiConversation-' . (string) $user_id;
$site_prompt_limit = antichrist_engine_foundation_ai_get_site_key_prompt_limit();
$user_prompt_limit = antichrist_engine_foundation_ai_get_user_key_prompt_limit();
$site_context_limit = antichrist_engine_foundation_ai_get_site_key_context_limit();
$user_context_limit = antichrist_engine_foundation_ai_get_user_key_context_limit();
?>
<section class="hero hero--foundation hero--ai-console">
<div class="container hero__grid hero__grid--foundation">
<div class="hero__content">
<p class="eyebrow"><?php esc_html_e('AI Engine', 'antichrist-engine'); ?></p>
<h1><?php echo esc_html($ai_copy['console_title']); ?></h1>
<p class="hero__lead"><?php echo esc_html($ai_copy['hero_lead']); ?></p>
<p><?php echo esc_html($has_site_key || $user_key_status['has_key'] ? $ai_copy['status_live'] : $ai_copy['status_waiting']); ?></p>
<ul class="hero__meta" aria-label="<?php esc_attr_e('AI engine status', 'antichrist-engine'); ?>">
<li>
<span><?php esc_html_e('Access', 'antichrist-engine'); ?></span>
<strong><?php esc_html_e('Signed-in only', 'antichrist-engine'); ?></strong>
</li>
<li>
<span><?php esc_html_e('Model', 'antichrist-engine'); ?></span>
<strong><?php echo esc_html($model); ?></strong>
</li>
<li>
<span><?php esc_html_e('Foundation Key', 'antichrist-engine'); ?></span>
<strong><?php echo esc_html($has_site_key ? __('Limited short prompts', 'antichrist-engine') : __('Not configured', 'antichrist-engine')); ?></strong>
</li>
<li>
<span><?php esc_html_e('Personal Key', 'antichrist-engine'); ?></span>
<strong><?php echo esc_html($user_key_status['has_key'] ? sprintf(__('Saved ending in %s', 'antichrist-engine'), $user_key_status['hint']) : __('Not saved', 'antichrist-engine')); ?></strong>
</li>
</ul>
</div>
<div class="hero__visual card foundation-panel foundation-panel--official ai-identity-panel">
<p class="eyebrow"><?php esc_html_e('System Boundary', 'antichrist-engine'); ?></p>
<h2><?php echo esc_html($document_profile['record_id']); ?></h2>
<p><?php echo esc_html($ai_copy['console_summary']); ?></p>
<div class="foundation-kv">
<div class="foundation-kv__item">
<span><?php esc_html_e('Site Limit', 'antichrist-engine'); ?></span>
<strong><?php echo esc_html(sprintf(__('%s characters', 'antichrist-engine'), number_format_i18n($site_prompt_limit))); ?></strong>
</div>
<div class="foundation-kv__item">
<span><?php esc_html_e('Personal Limit', 'antichrist-engine'); ?></span>
<strong><?php echo esc_html(sprintf(__('%s characters', 'antichrist-engine'), number_format_i18n($user_prompt_limit))); ?></strong>
</div>
</div>
<p class="foundation-panel__subline"><?php echo esc_html($identity['disclaimer']); ?></p>
</div>
</div>
</section>
<section id="ask-the-adversary" class="section section--ai-console">
<div class="container">
<?php if ($notice) : ?>
<div class="membership-notice membership-notice--<?php echo esc_attr($notice['type']); ?>" role="<?php echo esc_attr('error' === $notice['type'] ? 'alert' : 'status'); ?>">
<p><?php echo esc_html($notice['message']); ?></p>
</div>
<?php endif; ?>
<?php if (!$is_logged_in) : ?>
<article class="card foundation-panel ai-access-gate">
<p class="eyebrow"><?php esc_html_e('Account Required', 'antichrist-engine'); ?></p>
<h2><?php echo esc_html($ai_copy['gate_title']); ?></h2>
<p><?php echo esc_html($ai_copy['gate_summary']); ?></p>
<div class="hero__actions">
<a class="button" href="<?php echo esc_url($login_url); ?>"><?php esc_html_e('Sign In', 'antichrist-engine'); ?></a>
<a class="button button--ghost" href="<?php echo esc_url($register_url); ?>"><?php esc_html_e('Create Account', 'antichrist-engine'); ?></a>
</div>
</article>
<?php else : ?>
<div
class="ai-console"
data-ai-console
data-storage-key="<?php echo esc_attr($storage_key); ?>"
data-empty-message="<?php echo esc_attr($ai_copy['empty_chat']); ?>"
data-has-user-key="<?php echo esc_attr($user_key_status['has_key'] ? 'true' : 'false'); ?>"
data-site-prompt-limit="<?php echo esc_attr((string) $site_prompt_limit); ?>"
data-user-prompt-limit="<?php echo esc_attr((string) $user_prompt_limit); ?>"
data-site-context-limit="<?php echo esc_attr((string) $site_context_limit); ?>"
data-user-context-limit="<?php echo esc_attr((string) $user_context_limit); ?>"
>
<aside class="ai-console__rail" aria-label="<?php esc_attr_e('AI controls', 'antichrist-engine'); ?>">
<article class="card foundation-panel ai-control-card ai-control-card--persona">
<p class="eyebrow"><?php esc_html_e('Response Flavor', 'antichrist-engine'); ?></p>
<h2><?php echo esc_html($ai_copy['flavor_title']); ?></h2>
<p><?php echo esc_html($ai_copy['flavor_summary']); ?></p>
<label class="ai-control-field" for="ai-persona">
<span><?php esc_html_e('Choose a flavor', 'antichrist-engine'); ?></span>
<select id="ai-persona" name="persona" data-ai-persona>
<?php foreach ($personas as $persona_key => $persona) : ?>
<option value="<?php echo esc_attr($persona_key); ?>" data-summary="<?php echo esc_attr($persona['summary']); ?>" data-mode="<?php echo esc_attr($persona['mode'] ?? ''); ?>" data-output-shape="<?php echo esc_attr($persona['output_shape'] ?? ''); ?>" <?php selected($persona_key, $default_persona); ?>>
<?php echo esc_html($persona['label']); ?>
</option>
<?php endforeach; ?>
</select>
</label>
<p class="foundation-panel__subline" data-ai-persona-summary><?php echo esc_html($personas[$default_persona]['summary'] ?? ''); ?></p>
<div class="ai-flavor-grid" aria-label="<?php esc_attr_e('AI flavor details', 'antichrist-engine'); ?>">