Skip to content
AIWikis.org

{$Template['Title']}

Publication Warning This page is marked noindex and should not be treated as canonical public authority.

<?php /**

Metadata

FieldValue
Source sitellmwikis.org
Source URLhttps://llmwikis.org/
Canonical AIWikis URLhttps://aiwikis.org/llmwikis/files/raw-system-archives-llmwikis-recent-work-sweep-2026-05-03-wp-content-the-f04abe34/
Source referenceraw/system-archives/llmwikis/recent-work-sweep/2026-05-03/wp-content/themes/llmwikis-knowledge-theme/inc/starter-bundle.php
File typephp
Content categorymemory-file
Last fetched2026-06-22T01:56:21.9510185Z
Last changed2026-05-03T02:23:13.4185387Z
Content hashsha256:f04abe349e1f63304795296851bbea1041818f2e62a4b1458ffbb7b32da2bcab
Import statusunchanged
Raw source layerdata/sources/llmwikis/raw-system-archives-llmwikis-recent-work-sweep-2026-05-03-wp-content-themes-llmwikis-knowledge-t-f04abe349e1f.php
Normalized source layerdata/normalized/llmwikis/raw-system-archives-llmwikis-recent-work-sweep-2026-05-03-wp-content-themes-llmwikis-knowledge-t-f04abe349e1f.txt

Current File Content

Structure Preview

  • {$template['title']}
  • Purpose
  • What To Write
  • Owner And Review Cadence
  • How An LLM Should Use This File
  • Update Prompt
  • 2026-04-28
  • Ledger Event
  • Task Boundary
  • Required Reading
  • Permissions
  • Context Packet
  • Evidence Destinations
  • Completion Report
  • Escalation Triggers
  • First Response
  • Support Packet
  • Resolution Paths
  • Completion Note

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: 48345
  • Preview characters: 11930
<?php
/**
 * Canonical starter templates, bundle manifests, and dynamic ZIP helpers.
 *
 * @package LlmWikis_Knowledge_Theme
 */

if ( ! defined( 'LLMWIKIS_STARTER_BUNDLE_VERSION' ) ) {
	define( 'LLMWIKIS_STARTER_BUNDLE_VERSION', '2026.04.28.1' );
}

if ( ! defined( 'LLMWIKIS_STARTER_BUNDLE_ZIP_MTIME' ) ) {
	define( 'LLMWIKIS_STARTER_BUNDLE_ZIP_MTIME', 1777334400 );
}

/**
 * Escapes trusted starter copy for HTML display without requiring WordPress.
 *
 * @param string $value Raw value.
 * @return string
 */
function llmwikis_starter_html( $value ) {
	return htmlspecialchars( (string) $value, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8' );
}

/**
 * Normalizes markdown line endings for deterministic downloads and tests.
 *
 * @param string $content Markdown content.
 * @return string
 */
function llmwikis_normalize_starter_content( $content ) {
	$content = str_replace( array( "\r\n", "\r" ), "\n", trim( (string) $content ) );
	return $content . "\n";
}

/**
 * Required template metadata fields.
 *
 * @return array<int,string>
 */
function llmwikis_required_starter_template_metadata() {
	return array(
		'id',
		'path',
		'title',
		'purpose',
		'intended_audience',
		'owner_role',
		'update_frequency',
		'trust_level',
		'llm_usage_guidance',
		'human_review_required',
		'display_order',
		'starter_body',
	);
}

/**
 * Renders a markdown template from canonical metadata.
 *
 * @param array<string,mixed> $template Template definition.
 * @return string
 */
function llmwikis_render_starter_template_markdown( $template ) {
	$review_required = ! empty( $template['human_review_required'] ) ? 'true' : 'false';
	$owner           = (string) $template['owner_role'];
	$frequency       = (string) $template['update_frequency'];
	$llm_guidance    = (string) $template['llm_usage_guidance'];
	$body            = trim( (string) $template['starter_body'] );

	$content = <<<MD
---
title: "{$template['title']}"
owner: "{$owner}"
status: "working-draft"
trust_level: "{$template['trust_level']}"
last_reviewed: "YYYY-MM-DD"
review_cycle: "{$frequency}"
audience: "{$template['intended_audience']}"
sensitivity: "internal"
agent_use: "allowed-with-citation"
human_review_required_for_updates: {$review_required}
---

# {$template['title']}

## Purpose
{$template['purpose']}

## What To Write
{$body}

## Owner And Review Cadence
- Owner role: {$owner}
- Review frequency: {$frequency}
- Human review required for updates: {$review_required}
- Mark this file `needs-review` if the owner is unknown, the review date is stale, or the content conflicts with a more authoritative page.

## How An LLM Should Use This File
{$llm_guidance}

## Update Prompt
When updating this file, preserve sources, note uncertainty, update the review date only after human review, and add related pages that a reader or agent should inspect next.
MD;

	return llmwikis_normalize_starter_content( $content );
}

/**
 * Canonical template registry for the starter bundle and visible examples.
 *
 * @return array<string,array<string,mixed>>
 */
function llmwikis_starter_template_definitions() {
	$templates = array(
		'readme'                  => array(
			'id'                    => 'readme',
			'path'                  => 'llm-wiki/README.md',
			'title'                 => 'LLM Wiki README',
			'purpose'               => 'Act as the front door for humans and AI agents by defining the wiki scope, reading order, ownership, and safe starting workflow.',
			'intended_audience'     => 'humans and AI agents',
			'owner_role'            => 'Knowledge steward',
			'update_frequency'      => 'monthly or when the wiki scope changes',
			'trust_level'           => 'authoritative',
			'llm_usage_guidance'    => 'Read this first. Use it to decide whether the wiki is in scope for the current task, then follow the linked index, governance, and agent rules before making edits.',
			'human_review_required' => true,
			'display_order'         => 10,
			'starter_body'          => <<<'MD'
- Name the domain this LLM Wiki covers and the domains it does not cover.
- Link the first five pages a new maintainer should read.
- State where authoritative decisions, policies, runbooks, and open questions live.
- Include a one-paragraph quick start for humans and a one-paragraph quick start for AI agents.

Example:

This wiki covers the Acme Billing Platform: product context, system architecture, release operations, support procedures, decisions, policies, and approved agent instructions. It does not contain secrets, customer records, raw incident chat logs, legal advice, or unreviewed strategy drafts.
MD,
		),
		'index'                   => array(
			'id'                    => 'index',
			'path'                  => 'llm-wiki/INDEX.md',
			'title'                 => 'LLM Wiki Index',
			'purpose'               => 'Provide deterministic navigation so humans and agents can route through the wiki without scanning every file.',
			'intended_audience'     => 'humans, AI agents, search systems',
			'owner_role'            => 'Documentation lead',
			'update_frequency'      => 'every approved content change',
			'trust_level'           => 'authoritative',
			'llm_usage_guidance'    => 'Use this as the routing table. Select the smallest useful page set before opening deeper files, and update it whenever durable pages are added, renamed, archived, or reclassified.',
			'human_review_required' => true,
			'display_order'         => 20,
			'starter_body'          => <<<'MD'
Create sections for organization, products, architecture, operations, decisions, policies, agent rules, and onboarding. Each entry should include path, summary, owner, status, sensitivity, last reviewed date, and related pages.

Example row:

| Path | Summary | Owner | Status | Sensitivity | Last reviewed | Related |
|---|---|---|---|---|---|---|
| architecture/SYSTEM_OVERVIEW.md | Current system boundaries and service map. | Platform Team | authoritative | internal | 2026-04-28 | architecture/SERVICES.md, decisions/DECISION_LOG.md |
MD,
		),
		'governance'              => array(
			'id'                    => 'governance',
			'path'                  => 'llm-wiki/GOVERNANCE.md',
			'title'                 => 'LLM Wiki Governance',
			'purpose'               => 'Define ownership, review, approval, archival, and escalation rules for the wiki.',
			'intended_audience'     => 'maintainers, reviewers, contributors, AI agents',
			'owner_role'            => 'Knowledge governance owner',
			'update_frequency'      => 'quarterly and after governance changes',
			'trust_level'           => 'authoritative',
			'llm_usage_guidance'    => 'Use this to decide whether an edit can be made directly, proposed as a draft, or blocked until a human approves it.',
			'human_review_required' => true,
			'display_order'         => 30,
			'starter_body'          => <<<'MD'
Document page ownership, required reviewers, approval thresholds, review cycles, archival rules, and what counts as a high-impact change. Name who can approve policy, security, privacy, architecture, production, and public-facing changes.

Recommended sections:
- Ownership model
- Review cycles by page type
- Approval matrix
- AI-generated edit policy
- Deprecation and archive process
- Escalation path
MD,
		),
		'trust-model'             => array(
			'id'                    => 'trust-model',
			'path'                  => 'llm-wiki/TRUST_MODEL.md',
			'title'                 => 'LLM Wiki Trust Model',
			'purpose'               => 'Explain the trust labels, sensitivity labels, source-of-truth rules, and agent permissions used across the wiki.',
			'intended_audience'     => 'humans, AI agents, auditors',
			'owner_role'            => 'Governance and security reviewers',
			'update_frequency'      => 'quarterly or when labels change',
			'trust_level'           => 'authoritative',
			'llm_usage_guidance'    => 'Use labels exactly. Never treat a draft, proposal, historical note, deprecated page, or external reference as approved policy.',
			'human_review_required' => true,
			'display_order'         => 40,
			'starter_body'          => <<<'MD'
Define these labels and how agents should interpret them:
- authoritative: current source of truth inside this wiki.
- working-draft: useful but not approved.
- proposal: candidate future state.
- needs-review: stale, incomplete, conflicting, or ownerless.
- historical: context only.
- deprecated: superseded and unsafe to follow for current work.
- external-reference: useful outside source, not owned by this wiki.

Also define sensitivity labels such as public, internal, confidential, restricted, and never-store.
MD,
		),
		'contributing'            => array(
			'id'                    => 'contributing',
			'path'                  => 'llm-wiki/CONTRIBUTING.md',
			'title'                 => 'LLM Wiki Contributing Guide',
			'purpose'               => 'Tell humans and AI agents how to propose useful changes without turning the wiki into an unreviewed dump.',
			'intended_audience'     => 'contributors, maintainers, AI agents',
			'owner_role'            => 'Documentation lead',
			'update_frequency'      => 'quarterly or when workflow changes',
			'trust_level'           => 'authoritative',
			'llm_usage_guidance'    => 'Use this before changing files. Prefer narrow edits, preserve citations, add review notes, and avoid mixing unrelated fixes.',
			'human_review_required' => true,
			'display_order'         => 50,
			'starter_body'          => <<<'MD'
Describe the contribution path:
1. Read README, INDEX, GOVERNANCE, TRUST_MODEL, and relevant page owners.
2. Classify the change as correction, update, new page, archive, policy change, or sensitive change.
3. Preserve citations and provenance.
4. Add or update related links.
5. Request the correct reviewer.

State what is not accepted: secrets, customer records, unapproved policy rewrites, uncited claims, and vague bulk rewrites.
MD,
		),
		'changelog'               => array(
			'id'                    => 'changelog',
			'path'                  => 'llm-wiki/CHANGELOG.md',
			'title'                 => 'LLM Wiki Changelog',
			'purpose'               => 'Record durable wiki changes so future maintainers can understand what changed, why, and who reviewed it.',
			'intended_audience'     => 'maintainers, auditors, AI agents',
			'owner_role'            => 'Knowledge steward',
			'update_frequency'      => 'every release or approved change batch',
			'trust_level'           => 'authoritative',
			'llm_usage_guidance'    => 'Append entries. Do not rewrite history except to correct factual mistakes with a note.',
			'human_review_required' => true,
			'display_order'         => 60,
			'starter_body'          => <<<'MD'
Use dated entries with changed pages, reason, reviewer, source references, and follow-up tasks.

Example:

## 2026-04-28
- Updated architecture/SYSTEM_OVERVIEW.md to reflect the new billing-worker boundary.
- Added decision DEC-004 on asynchronous invoice retries.
- Reviewer: Platform Team lead.
- Follow-up: update operations/RUNBOOKS.md before the next release.
MD,
		),
		'glossary'                => array(
			'id'                    => 'glossary',
			'path'                  => 'llm-wiki/organization/GLOSSARY.md',
			'title'                 => 'LLM Wiki Glossary',
			'purpose'               => 'Define organizational terms, acronyms, product names, service names, roles, and domain concepts in a way agents can cite.',
			'intended_audience'     => 'new humans, AI agents, reviewers',
			'owner_role'            => 'Domain owner or documentation lead',
			'update_frequency'      => 'monthly and when terminology changes',
			'trust_level'           => 'reviewed',
			'llm_usage_guidance'    => 'Use glossary definitions when interpreting ambiguous names. Flag unknown or conflicting terms instead of guessing.',
			'human_review_required' => true,
			'display_order'         => 70,
			'starter_body'          => <<<'MD'

Why This File Exists

This is a memory-system evidence file from llmwikis.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 is structured around these visible headings: {$template['title']}; Purpose; What To Write; Owner And Review Cadence; How An LLM Should Use This File; Update Prompt; 2026-04-28; Ledger Event. Those headings are retrieval anchors: a crawler or LLM can decide whether the file is relevant before reading every line.

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

Provenance And History

  • Current observation: 2026-06-22T01:56:21.9510185Z
  • Source origin: current-source-workspace
  • Retrieval method: local-source-workspace
  • Duplicate group: sfg-1155 (primary)
  • Historical hash records are stored in data/hashes/source-file-history.jsonl.

Machine-Readable Metadata

{
    "title":  "{$Template[\u0027Title\u0027]}",
    "source_site":  "llmwikis.org",
    "source_url":  "https://llmwikis.org/",
    "canonical_url":  "https://aiwikis.org/llmwikis/files/raw-system-archives-llmwikis-recent-work-sweep-2026-05-03-wp-content-the-f04abe34/",
    "source_reference":  "raw/system-archives/llmwikis/recent-work-sweep/2026-05-03/wp-content/themes/llmwikis-knowledge-theme/inc/starter-bundle.php",
    "file_type":  "php",
    "content_category":  "memory-file",
    "content_hash":  "sha256:f04abe349e1f63304795296851bbea1041818f2e62a4b1458ffbb7b32da2bcab",
    "last_fetched":  "2026-06-22T01:56:21.9510185Z",
    "last_changed":  "2026-05-03T02:23:13.4185387Z",
    "import_status":  "unchanged",
    "duplicate_group_id":  "sfg-1155",
    "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.
  • LLMWikis.org LLMWikis.org source-system overview for transparent AIWikis memory demonstration.
  • LLMWikis.org Source Memory Guide AIWikis source-governed page for durable AI memory, evidence routing, and agent-readable retrieval.
  • LLMWikis.org Files Site-scoped current-source file index for LLMWikis.org.