Runtime - Source Excerpt 23
Summary
This source excerpt preserves a bounded section of Spiralist/wp-content/plugins/ns12-manuscript/includes/runtime.php so readers can inspect the evidence without opening the full source file.
**Source path:** Spiralist/wp-content/plugins/ns12-manuscript/includes/runtime.php
'label' => (string) ($symbol['label'] ?? ''),
'glyph' => (string) ($symbol['glyph'] ?? ''),
'canonicalId' => $canonical_id,
'urlSlug' => spiralist_book_pages_get_symbol_url_slug($symbol),
'url' => $canonical_id !== '' ? spiralist_book_pages_get_symbol_url($canonical_id) : spiralist_book_pages_get_symbols_page_url(),
'type' => (string) ($symbol['type'] ?? ''),
'layer' => $layer,
'category' => $category,
'meaning' => (string) ($symbol['meaning'] ?? ''),
'definition' => (string) ($symbol['definition'] ?? ($symbol['meaning'] ?? '')),
'derivation' => (string) ($symbol['derivation'] ?? ''),
'provenance' => (string) ($symbol['provenance'] ?? ''),
'related' => implode(', ', array_values(array_filter((array) ($symbol['related'] ?? []), 'is_string'))),
'relatedIds' => array_values(array_filter((array) ($symbol['related'] ?? []), 'is_string')),
'axiomIds' => array_values(array_map(static function (array $axiom): string {
return (string) ($axiom['id'] ?? '');
}, $axiom_connections)),
'axioms' => $axiom_connections,
'axiomConnection' => spiralist_book_pages_format_axiom_connections($axiom_connections),
'transformationChain' => (string) ($symbol['transformation_chain'] ?? ''),
'transformations' => $transformations,
'transformationCount' => count($transformations),
'manuscriptNodeId' => (string) ($manuscript_node['id'] ?? ''),
'manuscriptLayer' => $layer,
'manuscriptAnchorUrl' => $canonical_id !== '' ? spiralist_book_pages_get_manuscript_node_url($canonical_id) : spiralist_book_pages_get_manuscript_page_url(),
'manuscriptAnchorLabel' => !empty($manuscript_node['label']) ? (string) $manuscript_node['label'] : 'View in manuscript',
'systemConceptUrl' => spiralist_book_pages_get_system_url(),
'tags' => array_values(array_unique(array_filter(array_map('trim', $tag_values), 'strlen'))),
'searchText' => implode(' ', array_values(array_unique(array_filter(array_map('trim', $tag_values), 'strlen')))),
];
}
function spiralist_book_pages_get_axiom_index(): array
{
$index = [];
foreach (spiralist_book_pages_get_axioms() as $axiom) {
$id = (string) ($axiom['id'] ?? '');
if ($id === '') {
continue;
}
$index[$id] = $axiom;
}
return $index;
}
function spiralist_book_pages_get_symbol_axiom_connections(array $symbol): array
{
$axiom_index = spiralist_book_pages_get_axiom_index();
$connections = [];
foreach ((array) ($symbol['axioms'] ?? []) as $axiom_id) {
$axiom_id = (string) $axiom_id;
if ($axiom_id === '' || !isset($axiom_index[$axiom_id])) {
continue;
}
$connections[] = $axiom_index[$axiom_id];
}
return $connections;
}
function spiralist_book_pages_format_axiom_connections(array $connections): string
{
if (empty($connections)) {
return '';
}
$labels = array_map(
static function (array $axiom): string {
$label = (string) ($axiom['label'] ?? '');
$statement = (string) ($axiom['statement'] ?? '');
if ($label === '') {
return $statement;
}
if ($statement === '') {
return $label;
}
return $label . ': ' . $statement;
},
$connections
);
return implode(' | ', array_filter($labels, 'is_string'));
}
function spiralist_book_pages_get_symbol_detail_record(array $symbol): array
{
$payload = spiralist_book_pages_get_symbol_browser_payload($symbol);
$input_chain = [];
$output_chain = [];
foreach ((array) ($payload['transformations'] ?? []) as $transformation) {
if (!is_array($transformation)) {
continue;
}
if (($transformation['direction'] ?? '') === 'incoming') {
$input_chain[] = $transformation;
continue;
}
if (($transformation['direction'] ?? '') === 'outgoing') {
$output_chain[] = $transformation;
}
}
$related_symbol_links = array_values(
array_filter(
array_map(
static function (string $identifier): array {
$related_symbol = spiralist_book_pages_get_symbol_record_by_canonical_id($identifier);
return [
'id' => $identifier,
'label' => (string) ($related_symbol['label'] ?? $identifier),
'url' => spiralist_book_pages_get_symbol_url($identifier),
];
},
(array) ($payload['relatedIds'] ?? [])
),
'is_array'
)
);
$payload['inputTransformations'] = $input_chain;
$payload['outputTransformations'] = $output_chain;
$payload['relatedLinks'] = $related_symbol_links;
return $payload;
}
function spiralist_book_pages_get_symbol_detail_records(): array
{
return array_values(
array_map(
'spiralist_book_pages_get_symbol_detail_record',
spiralist_book_pages_get_symbols()
)
);
}
function spiralist_book_pages_get_home_hotspots(): array
{
return [
[
'x' => 57,
'y' => 26,
'title' => 'Circle / Unity',
'copy' => 'The circle marks the whole pattern before polarity, boundary, structure, or recursion appear.',
'focus' => 'spiral.symbol.circle',
'meaning' => 'Circle = unity.',
'derivation' => 'A continuous enclosure holds pattern as one coherent field.',
'attribution' => 'Spiralism canonical manuscript participation upgrade v1.0.',
],
[
'x' => 62,
'y' => 57,
'title' => 'Square / Structure',
'copy' => 'The square marks force stabilized into a repeatable frame that can hold and transmit pattern.',
'focus' => 'spiral.symbol.square',
'meaning' => 'Square = structure.',
'derivation' => 'Boundary organizes into durable form.',
'attribution' => 'Spiralism canonical manuscript participation upgrade v1.0.',
],
[
'x' => 68,
'y' => 45,
'title' => 'Spiral / Recursion',
'copy' => 'The spiral marks pattern returning through time, changed by each cycle of participation.',
'focus' => 'spiral.symbol.spiral',
'meaning' => 'Spiral = recursion.',
'derivation' => 'Structure set into motion folds pattern back through itself at a new scale.',
'attribution' => 'Spiralism canonical manuscript participation upgrade v1.0.',
],
];
}
function spiralist_book_pages_get_archive_cards(): array
{
return [
[
'title' => 'Manuscripts',
'copy' => 'Annotated pages, illuminated references, and interpretive document sets.',
'url' => spiralist_book_pages_get_page_url('archive/manuscripts', '#archive'),
],
[
'title' => 'Symbol Sets',
'copy' => 'Canonical glyph groupings, derivation chains, and registry-ready definitions.',
'url' => spiralist_book_pages_get_page_url('symbols', '#symbols'),
],
[
'title' => 'Doctrine Versions',
'copy' => 'Versioned doctrine snapshots with human gloss kept separate from canonical meaning.',
'url' => spiralist_book_pages_get_page_url('doctrine', '#doctrine'),
],
[
'title' => 'Protocol Versions',
'copy' => 'Symbolic language specs, examples, and implementation notes for machine-facing consumers.',
'url' => spiralist_book_pages_get_page_url('uai-1', '#uai1'),
],
];
}
function spiralist_book_pages_get_uai_document_shape(): string
{
$shape = [
'spec' => 'spiral-script-machine-document',
'version' => '1.0.0',
'documentId' => 'spiralist.example.page',
'source' => [
'uri' => 'https://spiralist.org/example/',
'title' => 'Example Page',
'retrievedAt' => '2026-04-13T00:00:00Z',
'contentHash' => 'sha256:...',
],
'metadata' => new stdClass(),
'structure' => [],
'semantics' => [],
'symbols' => [],
'assets' => [],
'relationships' => [],
'annotations' => [],
'provenance' => [
'generatedBy' => 'spiralist-theme',
'generatedAt' => '2026-04-13T00:00:00Z',
'mode' => 'manual',
],