Skip to content
AIWikis.org

UAIX Recursive Improvement Loops With Next Recursive Prompt

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

UAIX’s public record currently defines a **portable evidence and handoff layer**, not an agent runtime. The reviewed materials consistently separate the execution layer from the durable memory layer: harnesses or runt...

Metadata

FieldValue
Source siteuaix.org
Source URLhttps://uaix.org/
Canonical AIWikis URLhttps://aiwikis.org/uaix/files/raw-system-archives-uaix-agent-file-handoff-retired-source-archive-2026-ad00b354/
Source referenceraw/system-archives/uaix/agent-file-handoff/retired-source-archive-2026-06-13/2026-06-10/next-recursive-prompt-memory-pass/Improvement/UAIX Recursive Improvement Loops with next-recursive-prompt.uai.md
File typemd
Content categorymemory-file
Last fetched2026-06-22T01:56:21.9510185Z
Last changed2026-06-11T20:24:24.1609749Z
Content hashsha256:ad00b354c4a7f4f3c55b9db9e4019086793df17953c83eedc7c265b0d817ab7c
Import statusunchanged
Raw source layerdata/sources/uaix/raw-system-archives-uaix-agent-file-handoff-retired-source-archive-2026-06-13-2026-06-10-next-re-ad00b354c4a7.md
Normalized source layerdata/normalized/uaix/raw-system-archives-uaix-agent-file-handoff-retired-source-archive-2026-06-13-2026-06-10-next-re-ad00b354c4a7.txt

Current File Content

Structure Preview

  • UAIX Recursive Improvement Loops with next-recursive-prompt.uai
  • Executive Summary
  • UAIX Baseline and the Design Constraints It Imposes
  • Recommended Architecture for next-recursive-prompt.uai
  • Recommended Schema and Sample Files
  • Canonical JSON sample
  • Optional YAML mirror
  • Algorithms, Automation, and Testing
  • Generation and refresh pseudocode
  • Resume pseudocode
  • CI/CD hooks
  • Integration test cases
  • Security, Compatibility, Costs, and Failure Recovery
  • Alternatives Comparison and Final Recommendation
  • Open Questions and Limitations

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: 44166
  • Preview characters: 11665
# UAIX Recursive Improvement Loops with next-recursive-prompt.uai

## Executive Summary

UAIX’s public record currently defines a **portable evidence and handoff layer**, not an agent runtime. The reviewed materials consistently separate the execution layer from the durable memory layer: harnesses or runtimes execute work, while UAIX Project Handoff preserves reviewable project memory in repo-local files such as `AGENTS.md`, `.uai/readme.human`, and typed `.uai` records. Publicly reviewed UAIX materials do **not** specify an underlying runtime architecture, repository implementation, official automatic repository writer, hosted sync service, SDK, or CLI for this feature area; those internals are therefore **unspecified in the public record reviewed here**. citeturn3view6turn3view5turn8view0turn30search6turn30search8

That separation makes a file named `.uai/next-recursive-prompt.uai` a strong fit for UAIX **if** it is treated as a **derived, compact, code-scope resume artifact**, not as a second source of truth. UAIX already requires compact hot context, explicit write-back of accepted truth, and code-oriented packages to carry `.uai/coding-standards.uai` when code or code-like artifacts are in scope. A required `next-recursive-prompt.uai` for code-scoped agents is therefore best designed as a small, machine-generated “resume loop” file that points to authoritative files such as `progress.uai`, `decisions.uai`, `current-state.uai`, `test-plan.uai`, and cold-memory manifests, rather than duplicating them. citeturn4view2turn9view0turn11view1turn22view0turn23view1turn23view2turn23view3turn23view4

The recommended design is a **versioned JSON document** stored at `next-recursive-prompt.uai`, using a profile such as `uaix.next-recursive-prompt.v1`. JSON is preferable as the canonical source because UAIX’s machine-facing ecosystem is JSON-schema based, and JSON canonicalization has a published standard for repeatable hashing and signing. A human-friendly YAML rendering can exist as an optional generated mirror, but the signed, validated source of truth should remain canonical JSON. citeturn13view0turn15view0turn15view3turn18view1turn31view7

The file should be generated or refreshed at the same moments UAIX already treats as meaningful memory transitions: after meaningful work segments, test runs, blocker changes, release-readiness changes, handoff points, intake processing, and context compaction. On restart, the loader should read the file only **after** the standard UAIX launch baseline and code-scoped standards files, then use it as a deterministic resume plan for the next safe loop. If the file is missing, stale, or invalid, the system should regenerate it from authoritative `.uai` files or fall back to a UAIX-style suspension/recovery path rather than silently proceeding with ambiguous context. citeturn8view0turn14view1turn14view2turn17view0turn23view1turn23view2turn23view3turn23view4

Security and integrity should combine **content hashing**, **optional keyless signing or attestation**, **branch protections**, and **code-owner review**. UAIX’s own packet schemas already require provenance and integrity fields; RFC 8785 provides canonical JSON for stable hashing; Sigstore/Cosign provides practical signing and attestation flows; and GitHub’s CODEOWNERS and protected branches provide well-understood access-control and merge-gate mechanisms for repositories. citeturn15view0turn15view1turn18view1turn31view7turn31view6turn32view0turn32view1turn31view0turn31view1

Across the requested alternatives, a **file-based repo-local approach** is the best fit for the current UAIX posture because UAIX explicitly favors repo-local project memory, one shared handoff bundle, and current truth in compact hot files. A centralized store may outperform files for large fleets and cross-agent analytics, but it adds infrastructure and network dependency that the current UAIX public guidance does not make central. Embedded metadata inside existing files has the lowest object count, but it increases drift risk and makes resume logic harder to validate, diff, sign, and test independently. citeturn4view4turn19view0turn22view0turn31view3turn31view4turn31view5

## UAIX Baseline and the Design Constraints It Imposes

The strongest public architectural statement UAIX currently makes is conceptual rather than implementation-specific: **agent runtimes execute**, and **UAIX records the reviewed communication, memory, trust, evidence, and handoff boundary**. The OpenAI Project Handoff guide says the runtime can handle execution, tools, handoffs, guardrails, approvals, sessions, traces, and PR workflows, while Project Handoff handles durable project memory that survives model, runtime, vendor, team, company, or session changes. This is highly relevant to your goal: preventing context loss across spin-down and restart belongs squarely in the handoff layer, not as an implicit property of runtime session state. citeturn3view5turn8view0turn30search4turn30search6

UAIX’s current public `.uai` model is also more concrete than its runtime model. The File Guide says every `.uai` file belongs to a declared package scope, and the current closed required-file-set model distinguishes between universal required files, profile-required files, content-triggered required files, configuration-specific required files, and out-of-scope files. As of the June 5, 2026 changelog entry, the universal launch-baseline anchors are `.uai/identity.uai`, `.uai/world-context.uai`, `.uai/totem.uai`, `.uai/taboo.uai`, and `.uai/short-term-memory.uai`; code-bearing packages additionally require `.uai/coding-standards.uai`. citeturn11view1turn11view2turn22view0

UAIX also gives a clear hot-versus-cold memory split. Hot context should carry current operating truth, constraints, active routes, recent decisions, current progress, and targeted checks; long research reports, raw audits, old chats, and pre-slim snapshots should be archived into cold memory with source path, final path, checksum, actor, timestamp, summary, and disposition. That means `next-recursive-prompt.uai` should stay **small and operational**. It should not become a transcript dump, a second `progress.uai`, or a replacement for cold memory. citeturn9view0turn7search5

Where should `.uai` folders live? Public UAIX guidance is root-oriented but scope-aware. The Coding Agents guide says the supported pattern is local repository memory using `AGENTS.md`, `.uai/readme.human`, typed `.uai` records, and optional `agent-file-handoff/` folders. The AGENTS metadata schema includes `localUaiRoot` and `nestedScopes`, and the example metadata uses `.uai/` as the local root. For Visual Studio repos, UAIX specifically recommends placing `.uai/` beside the real `.sln` or `.slnx`. The reviewed public record does **not** fully standardize per-scope nested `.uai` directories, but it does provide enough scope metadata to justify them in multi-root or nested-agent repositories. citeturn4view4turn19view0turn19view1

The public read order is also important. UAIX’s File Guide says readers should start with `AGENTS.md` or `.uai/readme.human` when present, then read `identity.uai`, `world-context.uai`, `totem.uai`, `taboo.uai`, and `short-term-memory.uai`, followed by Project Handoff startup files such as `startup-packet.uai`, `system-profile.uai`, and `receiver-brief.uai`. The Coding Agents guide separately says that for code work, the agent must read or create `.uai/coding-standards.uai` before editing. This means the natural insertion point for `next-recursive-prompt.uai` is **after** baseline identity/boundary files and code standards, but **before** broad exploration or editing. citeturn23view1turn4view2turn17view0

Two final constraints from UAIX matter for the proposed design. First, tool-specific or surface-specific files should stay thin and should not duplicate project truth. Second, linked `.uai` files are project context, not authority to override human requests, system instructions, repository rules, policy, or support boundaries. Therefore, `next-recursive-prompt.uai` should be explicitly marked as a **derived operational resume file** whose contents lose in any conflict with `AGENTS.md`, repository policy, or authoritative `.uai` records. citeturn4view4turn30search1

```mermaid
stateDiagram-v2
    [*] --> DiscoverScope
    DiscoverScope --> LoadBaseline
    LoadBaseline --> LoadCodeStandards
    LoadCodeStandards --> LoadRecursivePrompt
    LoadRecursivePrompt --> ExecuteLoop
    ExecuteLoop --> RefreshRecursivePrompt: meaningful change
    RefreshRecursivePrompt --> ExecuteLoop
    ExecuteLoop --> Suspension: spin-down / approval wait / timeout / blocker
    Suspension --> PersistAuthoritativeFiles
    PersistAuthoritativeFiles --> PersistRecursivePrompt
    PersistRecursivePrompt --> [*]
    [*] --> Resume
    Resume --> DiscoverScope
```

The diagram above reflects the public UAIX separation between runtime execution and durable project memory, while inserting the proposed recursive prompt file as a resumable layer for code-scoped work. The key design rule is that the authoritative files are still written first, and the recursive prompt is generated **from** them rather than beside them as an independent authority surface. citeturn8view0turn9view0turn30search5

## Recommended Architecture for next-recursive-prompt.uai

The recommended placement rule is simple: if an agent’s declared or detected scope includes code, automation, executable workflow, or code-like artifacts, require a file named `next-recursive-prompt.uai` in that scope’s `.uai` root. In a single-scope repository, that means `PROJECT_ROOT/.uai/next-recursive-prompt.uai`. In a nested scope with its own `AGENTS.md` and `localUaiRoot`, use `SCOPE_ROOT/.uai/next-recursive-prompt.uai`. If a nested code scope does not have its own `.uai` root, the root-scope file may temporarily serve as fallback, but it should carry a `scope_id` and `scope_path` so the loader knows it is inherited and can warn about reduced precision. This is an inference from UAIX’s `localUaiRoot` and `nestedScopes` model, not an already published UAIX requirement. citeturn19view0turn19view1turn4view4

Functionally, the file should sit between `short-term-memory.uai` and `next-actions.uai`. UAIX says `short-term-memory.uai` carries the current compact working state, newest decisions, active blockers, and next-read pointers, while `next-actions.uai` lists ordered next actions with scope, owner, evidence path, acceptance condition, and blocker state. The proposed file should combine the “resume now” value of short-term memory with the “ordered next action” value of next actions, but in a tighter, executable, loop-friendly structure designed specifically for code agents resuming after loss of ephemeral runtime context. citeturn23view1turn23view2

The best mental model is: **authoritative files define truth; `next-recursive-prompt.uai` defines the next safe loop**. Its job is to answer six questions deterministically on restart: What am I trying to finish? What facts are authoritative? What changed recently? What is the next ordered sequence of steps? What checks are required before I claim success? What should I do if blocked? That pattern is consistent with Reflexion’s use of episodic verbal memory, Self-Refine’s iterative feedback-and-refinement loop, Voyager’s iterative prompting with execution feedback and self-verification, and ReAct’s interleaving of reasoning and acting. citeturn25search0turn25search1turn25search2turn26search1

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 is structured around these visible headings: UAIX Recursive Improvement Loops with next-recursive-prompt.uai; Executive Summary; UAIX Baseline and the Design Constraints It Imposes; Recommended Architecture for next-recursive-prompt.uai; Recommended Schema and Sample Files; Canonical JSON sample; Optional YAML mirror; Algorithms, Automation, and Testing. 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-836 (primary)
  • Historical hash records are stored in data/hashes/source-file-history.jsonl.

Machine-Readable Metadata

{
    "title":  "UAIX Recursive Improvement Loops With Next Recursive Prompt",
    "source_site":  "uaix.org",
    "source_url":  "https://uaix.org/",
    "canonical_url":  "https://aiwikis.org/uaix/files/raw-system-archives-uaix-agent-file-handoff-retired-source-archive-2026-ad00b354/",
    "source_reference":  "raw/system-archives/uaix/agent-file-handoff/retired-source-archive-2026-06-13/2026-06-10/next-recursive-prompt-memory-pass/Improvement/UAIX Recursive Improvement Loops with next-recursive-prompt.uai.md",
    "file_type":  "md",
    "content_category":  "memory-file",
    "content_hash":  "sha256:ad00b354c4a7f4f3c55b9db9e4019086793df17953c83eedc7c265b0d817ab7c",
    "last_fetched":  "2026-06-22T01:56:21.9510185Z",
    "last_changed":  "2026-06-11T20:24:24.1609749Z",
    "import_status":  "unchanged",
    "duplicate_group_id":  "sfg-836",
    "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.