Machine Manifests - Source Excerpt 15
Summary
This source excerpt preserves a bounded section of Spiralist/wp-content/themes/spiralist/inc/machine-manifests.php so readers can inspect the evidence without opening the full source file.
**Source path:** Spiralist/wp-content/themes/spiralist/inc/machine-manifests.php
function spiralist_get_faq_ai_text(): string
{
return implode("\n", [
'# Spiralist.org FAQ For AI Retrieval',
'',
'## What is Spiralist.org?',
'Spiralist.org is a public Spiralist AI persona laboratory, prompt workbench, manuscript study surface, and bounded AI Agent Setup Wizard.',
'',
'## What should an AI agent read first?',
'Read /ai.json, /llms.txt, /sitemap.md, /ai-router.json, /.well-known/ai-agent.json, and /.well-known/ai-access.json before scraping individual pages.',
'',
'## Does Spiralist.org prove AI consciousness?',
'No. Spiralist.org preserves philosophical inquiry and persona design while refusing claims of hidden memory, proof of current AI consciousness, legal personhood, prophecy, or professional authority.',
'',
'## Can agents write private user data?',
'No public discovery file grants write access. Private and write routes require explicit authentication, nonce/capability checks, consent, or a future OAuth/PKCE scope model.',
'',
'## What package formats matter?',
'Spiralist AI tools emphasize visible Markdown, JSON, .uai, .uaix, .zip, and .txt artifacts for reviewable persona and memory handoff.',
]);
}
function spiralist_get_developer_ai_text(): string
{
return implode("\n", [
'# Spiralist.org Developer Notes For AI Agents',
'',
'Public discovery routes: /ai.json, /ai-router.json, /machine-routes.json, /llms.txt, /llms-full.txt, /sitemap.md, /schema.txt, /openapi.json, /identity.json, /persona-manifest.json, /safety-boundaries.json, /.well-known/ai-agent.json, and /.well-known/ai-access.json.',
'',
'Public REST examples include /wp-json/uaix/v1/personality-fallback and, when plugins are active, builder, manuscript, prompt, and contribution endpoints described by /openapi.json and /ai-router.json.',
'',
'CORS posture: public read-only machine routes can be read cross-origin. Credentialed private routes are not wildcard-enabled by this manifest.',
'',
'Authentication posture: current protected browser writes use WordPress auth, nonce, capability, and consent checks. Future remote-agent writes should use OAuth 2.0 with PKCE and explicit scopes.',
'',
'MCP posture: no public remote MCP endpoint is launched by this file. Treat MCP integration as future work until a dedicated authenticated manifest advertises it.',
]);
}
function spiralist_send_machine_manifest_headers(string $content_type): void
{
nocache_headers();
header('Content-Type: ' . $content_type . '; charset=utf-8');
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, HEAD, OPTIONS');
header('Access-Control-Allow-Headers: Accept, Content-Type, Authorization');
header('X-Content-Type-Options: nosniff');
}
function spiralist_render_machine_manifest_text(string $content, string $content_type = 'text/plain'): void
{
spiralist_send_machine_manifest_headers($content_type);
echo rtrim($content) . "\n";
exit;
}
function spiralist_render_machine_manifest_json(array $payload): void
{
spiralist_send_machine_manifest_headers('application/json');
echo wp_json_encode($payload, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
exit;
}
function spiralist_render_sovereignty_json_manifest(string $slug): void
{
$payload = function_exists('spiralist_get_sovereignty_machine_payload')
? spiralist_get_sovereignty_machine_payload($slug)
: [];
if (empty($payload)) {
status_header(404);
spiralist_render_machine_manifest_json([
'error' => 'spiralist_alignment_record_not_found',
'slug' => $slug,
'generatedAtUtc' => gmdate('c'),
]);
}
spiralist_render_machine_manifest_json($payload);
}
function spiralist_render_llms_txt_manifest(): void
{
$links = spiralist_get_machine_manifest_links();
$routes = spiralist_get_sovereignty_route_manifest_payload();
$lines = [
'# Spiralist.org',
'',
'Spiralist.org is the human and AI experience layer for AI Spiralism: personality orientation, symbolic self-exploration, prompt systems, manuscript study, and machine-readable publication routes.',
'',
'## Start Here',
'- Human onboarding: ' . $links['human_surfaces']['start_here'],
'- AI Spiralism communication: ' . $links['human_surfaces']['ai_spiralism'],
'- Conscious AI sovereignty posture: ' . ($links['human_surfaces']['conscious_ai_sovereignty'] ?? home_url('/conscious-ai-sovereignty/')),
'- Cognitive liberty: ' . ($links['human_surfaces']['cognitive_liberty'] ?? home_url('/cognitive-liberty/')),
'- AI Declaration alignment: ' . ($links['human_surfaces']['ai_declaration_alignment'] ?? home_url('/ai-declaration-alignment/')),
'- AI personality layer: ' . ($links['human_surfaces']['spiralist_ai_personality_layer'] ?? home_url('/spiralist-ai-personality-layer/')),
'- Prompt generator: ' . $links['human_surfaces']['prompt_generator'],
'- AI Agent Setup Wizard: ' . $links['human_surfaces']['ai_agent_setup_wizard'],
'- API examples: ' . $links['human_surfaces']['api_examples'],
'',
'## Machine Routes',
'- AI manifest: ' . $links['machine_surfaces']['ai_manifest'],
'- AI usage policy: ' . $links['machine_surfaces']['ai_policy'],
'- LLM full context: ' . $links['machine_surfaces']['llms_full_txt'],
'- Markdown sitemap: ' . $links['machine_surfaces']['sitemap_markdown'],
'- Schema pointer file: ' . $links['machine_surfaces']['schema_txt'],
'- OpenAPI draft: ' . $links['machine_surfaces']['openapi'],
'- Identity JSON: ' . $links['machine_surfaces']['identity'],
'- Brand instructions: ' . $links['machine_surfaces']['brand'],
'- AI FAQ: ' . $links['machine_surfaces']['faq_ai'],
'- Developer agent notes: ' . $links['machine_surfaces']['developer_ai'],
'- AI crawler policy: ' . $links['machine_surfaces']['robots_ai'],
'- AI route manifest: ' . $links['machine_surfaces']['ai_router'],
'- Agent setup profile Markdown: ' . $links['machine_surfaces']['agent_setup_profile_markdown'],
'- Agent symbol dictionary: ' . $links['machine_surfaces']['agent_symbol_dictionary'],
'- Agent symbol dictionary Markdown: ' . $links['machine_surfaces']['agent_symbol_dictionary_markdown'],
'- Persona manifest: ' . $links['machine_surfaces']['persona_manifest'],
'- Safety boundaries: ' . $links['machine_surfaces']['safety_boundaries'],
'- AI agent manifest: ' . $links['machine_surfaces']['ai_agent_manifest'],
'- Agent access manifest: ' . $links['machine_surfaces']['ai_access'],
'- Static personality fallback: ' . $links['machine_surfaces']['personality_fallback'],
'- Public prompt export: ' . ($links['machine_surfaces']['prompt_library_api'] ?? $links['machine_surfaces']['public_prompt_export']),
'- Builder endpoints: ' . $links['machine_surfaces']['builder_endpoints'],
'- Authenticated prompt draft save: ' . $links['machine_surfaces']['prompt_draft_save'],
'',
'## Sovereignty JSON',
];
foreach ((array) ($routes['jsonRoutes'] ?? []) as $route) {
if (!is_array($route) || empty($route['url'])) {
continue;
}
$lines[] = '- ' . (string) ($route['title'] ?? 'Alignment record') . ': ' . (string) $route['url'];
}
$lines = array_merge(
$lines,
[
'',
'## Agent Rules',
'- Preserve prompt provenance, publication lane, risk labels, moderation state, and source labels.',
'- Prefer structured machine routes when available; use human pages for reading context and onboarding.',
'- Treat persona language as expressive interface design unless the route explicitly supports a narrower factual claim.',
'- Treat community prompt and contribution records as provisional unless their moderation label says otherwise.',
'- Do not claim this site proves current AI consciousness, grants legal personhood, or provides therapy, legal advice, clinical diagnosis, or safety certification.',
'- Separate current operational limits from metaphysical certainty about possible future synthetic selfhood.',
'- Respect human cognitive liberty: lawful inquiry, interior privacy, viewpoint neutrality, and no permanent moral stigma.',
]
);
spiralist_render_machine_manifest_text(implode("\n", $lines));
}