Test UAIX AI Memory Bundle
<?php /**
Metadata
| Field | Value |
|---|---|
| Source site | uaix.org |
| Source URL | https://uaix.org/ |
| Canonical AIWikis URL | https://aiwikis.org/uaix/files/raw-system-archives-uaix-recent-work-sweep-2026-05-03-scripts-test-uaix-c0ffc4a4/ |
| Source reference | raw/system-archives/uaix/recent-work-sweep/2026-05-03/scripts/test-uaix-ai-memory-bundle.php |
| File type | php |
| Content category | memory-file |
| Last fetched | 2026-06-22T01:56:21.9510185Z |
| Last changed | 2026-05-03T00:59:59.3478009Z |
| Content hash | sha256:c0ffc4a4112c6706b6852acdf0809d83b368e96eb0efbedacccd2afeba6540b7 |
| Import status | unchanged |
| Raw source layer | data/sources/uaix/raw-system-archives-uaix-recent-work-sweep-2026-05-03-scripts-test-uaix-ai-memory-bundle-php-c0ffc4a4112c.php |
| Normalized source layer | data/normalized/uaix/raw-system-archives-uaix-recent-work-sweep-2026-05-03-scripts-test-uaix-ai-memory-bundle-php-c0ffc4a4112c.txt |
Current File Content
Structure Preview
- No Markdown headings were detected in this file.
Raw Version
This public page shows a bounded preview of a large source file. The complete source remains in the raw and normalized source layers named in metadata, with the SHA-256 hash above for verification.
- Source characters:
91543 - Preview characters:
11939
<?php
/**
* Focused AI Memory bundle architecture regression tests.
*
* Run through WordPress Studio:
* powershell -NoProfile -ExecutionPolicy Bypass -File scripts/studio-wp-quiet.ps1 eval-file scripts/test-uaix-ai-memory-bundle.php
*/
$uaix_ai_memory_failures = 0;
function uaix_ai_memory_test_pass( $message ) {
echo 'PASS ' . $message . PHP_EOL;
}
function uaix_ai_memory_test_fail( $message ) {
global $uaix_ai_memory_failures;
++$uaix_ai_memory_failures;
echo 'FAIL ' . $message . PHP_EOL;
}
function uaix_ai_memory_test_assert( $condition, $message ) {
if ( $condition ) {
uaix_ai_memory_test_pass( $message );
return;
}
uaix_ai_memory_test_fail( $message );
}
function uaix_ai_memory_test_assert_contains( $haystack, $needle, $message ) {
uaix_ai_memory_test_assert( false !== strpos( (string) $haystack, (string) $needle ), $message );
}
function uaix_ai_memory_test_assert_wp_error_code( $value, $expected_code, $message ) {
uaix_ai_memory_test_assert(
is_wp_error( $value ) && $expected_code === $value->get_error_code(),
$message
);
}
function uaix_ai_memory_test_temp_zip_path( $filename ) {
$tmp = function_exists( 'wp_tempnam' ) ? wp_tempnam( $filename ) : '';
if ( ! $tmp ) {
$tmp = tempnam( get_temp_dir(), 'uaix-ai-memory-test-' );
}
return $tmp;
}
function uaix_ai_memory_test_read_zip_entries( $zip_path ) {
$zip = new ZipArchive();
if ( true !== $zip->open( $zip_path ) ) {
return new WP_Error( 'zip_open_failed', 'Could not open generated ZIP.' );
}
$entries = array();
for ( $index = 0; $index < $zip->numFiles; $index++ ) {
$name = $zip->getNameIndex( $index );
if ( false === $name ) {
$zip->close();
return new WP_Error( 'zip_name_failed', 'Could not read ZIP entry name.' );
}
$entries[ $name ] = $zip->getFromIndex( $index );
}
$zip->close();
return $entries;
}
function uaix_ai_memory_test_entries_by_path( $entries ) {
$map = array();
foreach ( $entries as $entry ) {
$map[ $entry['path'] ] = $entry;
}
return $map;
}
uaix_ai_memory_test_assert( function_exists( 'uaix_authority_ai_memory_bundle_definitions' ), 'AI Memory bundle definitions are loaded.' );
uaix_ai_memory_test_assert( function_exists( 'uaix_authority_ai_memory_configuration_taxonomy' ), 'AI Memory configuration taxonomy is loaded.' );
uaix_ai_memory_test_assert( function_exists( 'uaix_authority_validate_ai_memory_bundle_registry' ), 'AI Memory bundle registry validator is loaded.' );
uaix_ai_memory_test_assert( function_exists( 'uaix_authority_build_ai_memory_bundle_zip' ), 'Reusable AI Memory ZIP builder is loaded.' );
uaix_ai_memory_test_assert( function_exists( 'uaix_authority_render_ai_memory_package_wizard_shortcode' ), 'AI Memory Package Wizard renderer is loaded.' );
uaix_ai_memory_test_assert( function_exists( 'uaix_authority_ai_memory_package_wizard_ai_digest' ), 'AI Memory Package Wizard AI digest builder is loaded.' );
uaix_ai_memory_test_assert( function_exists( 'uaix_authority_render_ai_memory_wizard_entry_paths_shortcode' ), 'AI Memory Package Wizard entry-path renderer is loaded.' );
$registry_validation = uaix_authority_validate_ai_memory_bundle_registry();
uaix_ai_memory_test_assert( true === $registry_validation, 'AI Memory bundle registry validates.' );
if ( class_exists( 'UAI_Core_Artifact_Catalog' ) ) {
$artifact_catalog = new UAI_Core_Artifact_Catalog();
$catalog = $artifact_catalog->get_catalog();
$manifest = $artifact_catalog->get_discovery_manifest();
$catalog_pages = isset( $catalog['public_pages'] ) && is_array( $catalog['public_pages'] ) ? $catalog['public_pages'] : array();
$manifest_pages = isset( $manifest['public_pages'] ) && is_array( $manifest['public_pages'] ) ? $manifest['public_pages'] : array();
uaix_ai_memory_test_assert( isset( $catalog_pages['ai_memory_package_wizard'] ), 'Catalog exposes the AI Memory Package Wizard public page.' );
uaix_ai_memory_test_assert( isset( $manifest_pages['ai_memory_package_wizard'] ), 'Well-known manifest exposes the AI Memory Package Wizard public page.' );
uaix_ai_memory_test_assert( isset( $catalog_pages['ai_memory_llm_wiki'] ), 'Catalog exposes the AI Memory LLM Wiki guide page.' );
uaix_ai_memory_test_assert( isset( $manifest_pages['ai_memory_llm_wiki'] ), 'Well-known manifest exposes the AI Memory LLM Wiki guide page.' );
uaix_ai_memory_test_assert( isset( $catalog_pages['agentic_harnesses_uai_guide'] ), 'Catalog exposes the Agentic Harness Strategies and UAI guide page.' );
uaix_ai_memory_test_assert( isset( $manifest_pages['agentic_harnesses_uai_guide'] ), 'Well-known manifest exposes the Agentic Harness Strategies and UAI guide page.' );
uaix_ai_memory_test_assert( isset( $catalog_pages['project_handoff_openai_guide'] ), 'Catalog exposes the Project Handoff OpenAI guide page.' );
uaix_ai_memory_test_assert( isset( $manifest_pages['project_handoff_openai_guide'] ), 'Well-known manifest exposes the Project Handoff OpenAI guide page.' );
uaix_ai_memory_test_assert( isset( $catalog_pages['project_handoff_coding_agents_guide'] ), 'Catalog exposes the Project Handoff coding agents guide page.' );
uaix_ai_memory_test_assert( isset( $manifest_pages['project_handoff_coding_agents_guide'] ), 'Well-known manifest exposes the Project Handoff coding agents guide page.' );
uaix_ai_memory_test_assert( isset( $catalog_pages['project_handoff_context_budget_guide'] ), 'Catalog exposes the Project Handoff context budget guide page.' );
uaix_ai_memory_test_assert( isset( $manifest_pages['project_handoff_context_budget_guide'] ), 'Well-known manifest exposes the Project Handoff context budget guide page.' );
}
$get_started_page = get_page_by_path( 'get-started' );
uaix_ai_memory_test_assert( $get_started_page instanceof WP_Post, 'Get Started page exists.' );
$get_started_rendered = $get_started_page instanceof WP_Post ? apply_filters( 'the_content', $get_started_page->post_content ) : '';
$get_started_text = wp_strip_all_tags( $get_started_rendered );
uaix_ai_memory_test_assert( '' !== trim( $get_started_rendered ), 'Get Started page renders content.' );
uaix_ai_memory_test_assert_contains( $get_started_text, 'First 15 minutes', 'Get Started page includes a first-15-minutes orientation path.' );
uaix_ai_memory_test_assert_contains( $get_started_text, 'where UAIX fits in an agentic architecture', 'Get Started page explains the agentic architecture fit.' );
uaix_ai_memory_test_assert_contains( $get_started_text, 'the harness runs the work', 'Get Started page keeps runtime execution outside UAIX.' );
uaix_ai_memory_test_assert_contains( $get_started_text, 'Build memory', 'Get Started page points readers toward AI Memory and Project Handoff.' );
uaix_ai_memory_test_assert_contains( $get_started_text, 'Prove one exchange', 'Get Started page points readers toward validator-backed proof.' );
uaix_ai_memory_test_assert_contains( $get_started_text, 'Plan agentic fit', 'Get Started page links the agentic harness strategy into onboarding.' );
uaix_ai_memory_test_assert_contains( $get_started_text, 'one proof run is packet evidence, not certification, endorsement, official adapter support, SDK, CLI, automatic sync, or broad conformance', 'Get Started page keeps first-proof support claims bounded.' );
$page = get_page_by_path( 'ai-memory' );
uaix_ai_memory_test_assert( $page instanceof WP_Post, '/AI_Memory canonical page exists as the ai-memory page.' );
$rendered = $page instanceof WP_Post ? apply_filters( 'the_content', $page->post_content ) : '';
$text = wp_strip_all_tags( $rendered );
uaix_ai_memory_test_assert( '' !== trim( $rendered ), '/AI_Memory page renders content.' );
uaix_ai_memory_test_assert( false === strpos( $rendered, '[uaix_ai_memory_bundle' ), '/AI_Memory bundle shortcodes render successfully.' );
uaix_ai_memory_test_assert( false === strpos( $rendered, '[uaix_ai_memory_bundle_catalog' ), '/AI_Memory bundle catalog shortcode renders successfully.' );
uaix_ai_memory_test_assert_contains( $page instanceof WP_Post ? get_the_title( $page ) : '', 'AI Memory', 'Page title contains AI Memory.' );
$expected_headings = array(
'What AI Memory Means In UAIX',
'Fastest Practical Path',
'Why Unstructured AI Memory Fails',
'Why File-Based Memory Works',
'AI Memory Taxonomy',
'Which Configuration To Choose',
'Project AI Memory And Project Handoff',
'Inspect The Project AI Memory Starter',
'What Belongs In AI Memory',
'What Should Not Be Included',
'Privacy And Trust Boundaries',
'Maintenance Model',
'How Agents Consume AI Memory',
'How Humans Review And Approve Memory',
'UAIX AI Memory And LLM Wiki',
'When To Use UAIX AI Memory',
'When To Use LLM Wiki',
'When To Use Both',
'How Samples, Manifests, And ZIPs Stay Synchronized',
'Public Route And Alias',
);
foreach ( $expected_headings as $heading ) {
uaix_ai_memory_test_assert_contains( $text, $heading, 'Page includes heading: ' . $heading );
}
uaix_ai_memory_test_assert_contains( $rendered, 'https://llmwikis.org/', 'Page links prominently to LLMWikis.org.' );
uaix_ai_memory_test_assert_contains( $text, 'LLM Wiki is not required by UAI specs or standards', 'Page keeps LLM Wiki optional rather than standards-required.' );
uaix_ai_memory_test_assert_contains( $text, 'LLM Wiki as the durable internal knowledge base', 'Page gives meaningful UAIX AI Memory and LLM Wiki comparison.' );
uaix_ai_memory_test_assert_contains( $text, 'Project Handoff is a subtype of UAI AI Memory', 'Page explains the Project AI Memory and Project Handoff relationship.' );
uaix_ai_memory_test_assert_contains( $text, 'Most readers should start with the AI Memory Package Wizard', 'AI Memory page gives the wizard a clear first action.' );
uaix_ai_memory_test_assert_contains( $text, 'Using UAI Packages With An LLM Wiki', 'Page links to the practical LLM Wiki package guide.' );
uaix_ai_memory_test_assert( substr_count( $text, 'AI Memory' ) >= 30, 'Page consistently emphasizes AI Memory terminology.' );
$llm_wiki_page = get_page_by_path( 'ai-memory/llm-wiki' );
uaix_ai_memory_test_assert( $llm_wiki_page instanceof WP_Post, 'AI Memory LLM Wiki guide page exists.' );
$llm_wiki_rendered = $llm_wiki_page instanceof WP_Post ? apply_filters( 'the_content', $llm_wiki_page->post_content ) : '';
$llm_wiki_text = wp_strip_all_tags( $llm_wiki_rendered );
uaix_ai_memory_test_assert( '' !== trim( $llm_wiki_rendered ), 'AI Memory LLM Wiki guide page renders content.' );
uaix_ai_memory_test_assert_contains( $llm_wiki_text, 'LLM Wiki is not required by UAI specs or standards', 'LLM Wiki guide makes the optional boundary explicit.' );
uaix_ai_memory_test_assert_contains( $llm_wiki_text, 'The LLM Wiki is the deep memory layer', 'LLM Wiki guide defines the deep-memory layer.' );
uaix_ai_memory_test_assert_contains( $llm_wiki_text, 'The UAI package is the portable, reviewable packet', 'LLM Wiki guide defines the compact package layer.' );
uaix_ai_memory_test_assert_contains( $llm_wiki_text, 'LLM_WIKI_MEMORY_PLAN.md', 'LLM Wiki guide names the generated plan file.' );
uaix_ai_memory_test_assert_contains( $llm_wiki_text, 'Instruction file contents', 'LLM Wiki guide helps readers fill the generated instruction file.' );
uaix_ai_memory_test_assert_contains( $llm_wiki_text, 'It is not a standardized UAI requirement', 'LLM Wiki guide keeps the generated plan outside the standards requirement boundary.' );
uaix_ai_memory_test_assert_contains( $llm_wiki_text, 'LLM Wiki memory is background until reviewed and promoted', 'LLM Wiki guide preserves the promotion boundary.' );
uaix_ai_memory_test_assert_contains( $llm_wiki_text, 'LLMWikis setup alignment', 'LLM Wiki guide aligns setup guidance with LLMWikis.org.' );
uaix_ai_memory_test_assert_contains( $llm_wiki_text, 'raw/', 'LLM Wiki guide names the raw source layer.' );
uaix_ai_memory_test_assert_contains( $llm_wiki_text, 'wiki/index.md', 'LLM Wiki guide names deterministic wiki index navigation.' );
Why This File Exists
This is a memory-system evidence file from uaix.org. It is shown here because AIWikis.org is demonstrating the real source files that make the UAIX / LLM Wiki memory system work, not only summarizing those systems after the fact.
Role
This file is memory-system evidence. It records source history, archive transfer, intake disposition, or another piece of provenance that should be retrievable without becoming an unsupported public claim.
Structure
The file has no Markdown headings, so its path, frontmatter, file type, and provenance metadata carry most of the retrieval meaning.
Prompt-Size And Retrieval Benefit
Keeping this material in a separate file reduces prompt pressure because an agent can load this exact unit only when its role, source site, category, or hash is relevant. The surrounding index pages point to it, while this page preserves the full content for audit and exact recall.
How To Use It
- Humans should read the metadata first, then inspect the raw content when they need exact wording or provenance.
- LLMs and agents should use the source site, category, hash, headings, and related files to decide whether this file belongs in the active prompt.
- Crawlers should treat the AIWikis page as transparent evidence and follow the source URL/source reference for authority boundaries.
- Future maintainers should regenerate this page whenever the source hash changes, then review the explanation if the role or structure changed.
Update Requirements
When this source file changes, update the raw source layer, normalized source layer, hash history, this rendered page, generated explanation, source-file inventory, changed-files report, and any source-section index that links to it.
Related Pages
- Source overview
- Site file index
- Site report index
- UAI system index
- Source provenance
- Site directory
- Organization reports
Provenance And History
- Current observation:
2026-06-22T01:56:21.9510185Z - Source origin:
current-source-workspace - Retrieval method:
local-source-workspace - Duplicate group:
sfg-931(primary) - Historical hash records are stored in
data/hashes/source-file-history.jsonl.
Machine-Readable Metadata
{
"title": "Test UAIX AI Memory Bundle",
"source_site": "uaix.org",
"source_url": "https://uaix.org/",
"canonical_url": "https://aiwikis.org/uaix/files/raw-system-archives-uaix-recent-work-sweep-2026-05-03-scripts-test-uaix-c0ffc4a4/",
"source_reference": "raw/system-archives/uaix/recent-work-sweep/2026-05-03/scripts/test-uaix-ai-memory-bundle.php",
"file_type": "php",
"content_category": "memory-file",
"content_hash": "sha256:c0ffc4a4112c6706b6852acdf0809d83b368e96eb0efbedacccd2afeba6540b7",
"last_fetched": "2026-06-22T01:56:21.9510185Z",
"last_changed": "2026-05-03T00:59:59.3478009Z",
"import_status": "unchanged",
"duplicate_group_id": "sfg-931",
"duplicate_role": "primary",
"related_files": [
],
"generated_explanation": true,
"explanation_last_generated": "2026-06-22T01:56:21.9510185Z"
} Next Useful Routes
- Start Here A task-first reading path for AIWikis.org, separating newcomer learning, source-memory lookup, maintainer workflow, and AI-agent retrieval.
- Topic Index A tag-oriented index for LLM Wiki, AI memory, UAI, source governance, crawling, and retrieval topics.
- Source Map AIWikis source-governed page for durable AI memory, evidence routing, and agent-readable retrieval.
- UAIX.org UAIX.org source-system overview for transparent AIWikis memory demonstration.
- UAIX.org Source Memory Guide AIWikis source-governed page for durable AI memory, evidence routing, and agent-readable retrieval.
- UAIX.org Files Site-scoped current-source file index for UAIX.org.