Skip to content
aiWikis.org

AGENTS.md

This repository implements arbitrary-precision math in variable bases, with a Blazor WebAssembly calculator UI on top, and publishes Protocol5.com as the parent public brand for Mathematics and the official UAI-1 for...

Metadata

FieldValue
Source siteprotocol5.com
Source URLhttps://protocol5.com/
Canonical AIWikis URLhttps://aiwikis.org/protocol5/uai-system/files/agents-md-c8256474/
Source referenceAGENTS.md
File typemd
Content categoryuai-system
Last fetched2026-05-06T17:58:24.5168382Z
Last changed2026-05-06T01:08:07.8337949Z
Content hashsha256:c8256474a0d61d6c03e93aaca0b3210d02fcc44c515a4b00fb7a278e9d251c9c
Import statusunchanged
Raw source layerdata/sources/protocol5/agents-md-c8256474a0d6.md
Normalized source layerdata/normalized/protocol5/agents-md-c8256474a0d6.txt

Current File Content

Structure Preview

  • AGENTS.md
  • Purpose
  • UAI AI Memory Startup
  • File Intake
  • Solution Layout
  • Core Architecture
  • Build, Test, Run
  • Known Issues / Constraints
  • Frozen Generated Route Rules
  • Editing Guidance
  • High-Value Test Areas When Changing Math Logic

Raw Version

# AGENTS.md

## Purpose
This repository implements arbitrary-precision math in variable bases, with a Blazor WebAssembly calculator UI on top, and publishes Protocol5.com as the parent public brand for Mathematics and the official UAI-1 for .NET implementation hub.

## UAI AI Memory Startup
Before broad Protocol5.com, UAI, publishing, or architecture work:

1. Read this file.
2. Read `readme.human`.
3. Read the root AI Memory starter files:
   - `UAI_MEMORY_SYSTEM_PROFILE.md`
   - `UAI_MEMORY_RECEIVER_BRIEF.md`
   - `UAI_MEMORY_STARTUP_PACKET.md`
   - `LLM_WIKI_MEMORY_PLAN.md`
4. Load the `.uai/` handoff files:
   - `.uai/context.uai`
   - `.uai/stack.uai`
   - `.uai/architecture.uai`
   - `.uai/public-surface.uai`
   - `.uai/constraints.uai`
   - `.uai/decisions.uai`
   - `.uai/progress.uai`
   - `.uai/operations.uai`
   - `.uai/test-plan.uai`
   - `.uai/style.uai`
   - `.uai/llm-wiki.uai`
   - `.uai/justaniota.uai`
   - `.uai/file-handoff.uai`
   - `.uai/intake-index.uai`
5. Check file intake before broad work:
   - Inspect `agent-file-handoff/Content/` and `agent-file-handoff/Improvement/`.
   - Ignore `agent-file-handoff/Archive/` unless a human explicitly names an archived file or moves it back into an active bucket.
   - Refresh `.uai/intake-index.uai` with `scripts/Invoke-UaiFileIntake.ps1` when available.
   - If the newest prompt names `agent-file-handoff/`, `Content/`, `Improvement/`, a dropped file, missed processing, or work likely related to active drops, refresh live intake again even if startup intake already ran.
   - Summarize every `needs-agent-review` file, state a disposition, and explain its relationship to the current task before unrelated planning or edits.
6. Treat AIWikis.org as the optional long-memory LLM Wiki for already digested Protocol5 decisions and source notes. AIWikis does not become the Protocol5 source of truth, does not override this repo, and does not become the UAI standards authority.

If a memory file conflicts with the human's current request, system instructions, repository code, or the hard constraints below, stop and report the conflict before editing.

## File Intake

At the start of every broad AI work session, and whenever the newest prompt names or depends on active intake:
1. Inspect `agent-file-handoff/Content/` and `agent-file-handoff/Improvement/`.
2. Ignore `agent-file-handoff/Archive/` unless a human explicitly names an archived file or moves it back into an active bucket.
3. Refresh `.uai/intake-index.uai` when the local helper exists:

```powershell
powershell -NoProfile -ExecutionPolicy Bypass -File scripts\Invoke-UaiFileIntake.ps1
```

4. Load `.uai/file-handoff.uai` and `.uai/intake-index.uai` with the rest of the handoff context.
5. If the prompt names `agent-file-handoff/`, `Content/`, `Improvement/`, a dropped file, missed processing, or work likely related to active drops, refresh live intake again.
6. Inspect and summarize every `needs-agent-review` file before unrelated planning or edits.
7. Explain how each safe active file relates to the current task, then state one disposition for each file: apply now, convert into roadmap/progress state, archive as duplicate, defer with a reason, ask for clarification, or block as unsafe/out of scope.
8. For every safe relevant file, complete at least one named project-work action before archive movement.
9. Record the complete intake outcome: summary/disposition, current-task relationship when applicable, actual work, hot-memory outcome, long-memory/archive outcome or not configured, checks, and blockers.
10. Move processed source files to `agent-file-handoff/Archive/`.
11. If a human explicitly requests AIWikis archive consolidation, record source path, final memory path, sha256, disposition, actor, time, and transfer evidence before removing the source archive copy.

Dropped files are local review inputs only. They are not public truth, trusted content, release evidence, certified material, or permission to execute code. Related files must shape actual project work for the current task; memory routing, index refresh, or archive movement alone is not completion.

## Solution Layout
- `PrecisionCalculator.sln`: main solution entry.
- `NS12.VariableBase.Mathematics.Common` (`netstandard2.1`): shared interfaces and segment models.
- `NS12.VariableBase.Mathematics.Providers` (`netstandard2.1`): core math implementations (`Number`, `Fraction`, operators, algorithms, environment).
- `NS12.VariableBase.Mathematics.Providers.Tests` (`net6.0`, MSTest): unit tests for provider/environment behavior.
- `NS12.Calculator` (`net8.0`, Blazor WASM): UI project.

## Core Architecture
- `NumberSegments` is the low-level numeric representation.
  - Digits are stored least-significant-first (index `0` is the lowest place value).
  - Many algorithms assume this ordering; preserve it in all new code.
- `CharMathEnvironment` defines base/key mapping and number parsing/formatting.
- `Number` is the primary numeric type:
  - Whole part: `NumberSegments`
  - Optional fractional part: `Fraction`
  - Delegates arithmetic/comparison to static `Number.Operator` (`NumberOperator`).
- `BasicMathAlgorithm` performs segment math (`Add`, `Subtract`, `Multiply`, `Divide`, `SquareRoot`, compare helpers).
- `FractionOperator` handles `Fraction` arithmetic for numbers with fractional parts.

## Build, Test, Run
Run from repo root:

```powershell
dotnet restore PrecisionCalculator.sln
dotnet build PrecisionCalculator.sln -c Debug
dotnet test NS12.VariableBase.Mathematics.Providers.Tests\NS12.VariableBase.Mathematics.Providers.Tests.csproj
```

Run calculator UI:

```powershell
dotnet run --project NS12.Calculator\NS12.Calculator.csproj
```

Notes:
- `NS12.Calculator` targets `net8.0`.
- If tests fail with locked `testhost` binaries, terminate stale `testhost` processes and rerun.

## Known Issues / Constraints
- Protocol5 remains the parent public brand. Mathematics and UAI-1 for .NET are sibling areas under Protocol5.
- Protocol5 is the official UAI-1 for .NET implementation hub. UAIX.org remains authoritative for normative UAI standard, schema, validator, registry, governance, roadmap, changelog, and conformance records.
- Never write `UAI .NET`, `UAI.NET`, or `UAI-1 .NET` in public copy, navigation labels, titles, metadata, or handoff memory; use `UAI-1 for .NET` or just `UAI-1` so the text cannot imply the unowned `UAI.net` domain.
- JustAnIota / IOTA-1 work is an approximate public-symbol semantic converter experiment, not an exact translator, not a codec, and not a private-use profile.
- Discard objections or research claims only when they reject the project because exact/lossless translation is impossible; the project does not attempt exact conversion. Continue to respect evidence about Unicode handling, security, SQL/vector limits, and approximate-quality risks.
- IOTA-1 mappings must use assigned public ISO/IEC 10646 / Unicode characters and standard public sequences only. Do not use private-use code points, secret dictionaries, proprietary codebooks, or hidden bilingual maps.
- Runtime architecture for the C# version is facade-led: consumer projects use interfaces and POCO DTOs; logic, repository, SQL Server vector access, and LM Studio integration remain behind abstractions.
- Do not use Entity Framework in Protocol5 or JustAnIota. SQL Server access must use explicit ADO.NET / `Microsoft.Data.SqlClient` repository code behind abstractions.
- C# code added for JustAnIota must not use `var`. Declare explicit concrete or interface types so the type is readable without IDE hover.
- WordPress ZIP/theme/plugin affected-version naming does not apply to Protocol5 .NET deployment. Keep Protocol5 deployment governed by the staged publish script, route contract, .NET/NuGet package rules, and human-approved version numbers. The public site footer/bottom label should still show the last system-wide version that affected Protocol5.com, not the latest global system version when another site changed.
- Active Protocol5.com browser UI must not use jQuery, Bootstrap, or broad third-party frontend UI frameworks. Use Protocol5-owned CSS, TypeScript, and components; the only framework-class exception is approved 3D/rendering frameworks for real 3D or immersive visual work.
- Several operator members are intentionally unimplemented (`NotImplementedException`) and should not be called without implementation:
  - `NumberOperator` (multiple methods)
  - `FractionOperator` (`IsBottom`, `IsEven`, `Convert`, `Square`, `SquareRoot`, `ConvertToBase10`)
- `IterativePrimeAlgorithm.IsPrime` throws `NotImplementedException` for numbers with more than 3 segments.
- `%` currently returns the fractional remainder form (`0 r/b`) instead of an integer remainder (`r`).
- Provider tests include a broad arithmetic matrix (`50` cases per implemented base) covering `+`, `-`, `*`, `/`, `%`.

## Frozen Generated Route Rules
- Do not modify, rewrite, restyle, regenerate, reformat, template, minify, move, rename, recreate, or delete anything under `Protocol5.com/SiteContent/Prime/**` or `Protocol5.com/SiteContent/Fibonacci/**`.
- Treat `/Prime/**` and `/Fibonacci/**` as no-touch legacy/generated numeric reference route families.
- Treat generated Prime/Fibonacci `.htm` files as frozen compatibility references, not active Protocol5.com UI cleanup targets.
- Do not add layout wrappers, analytics snippets, meta changes, template injection, or CSS/JS edits inside those directories.
- Use `tools/check-frozen-generated-assets.ps1` before PR handoff when site work could affect publish output or route compatibility.
- If compatibility needs to change, add host routes, aliases, tests, or external wrapper pages outside the frozen directories.

## Editing Guidance
- Prefer extending behavior in `Providers` + `Providers.Tests` together.
- Keep environment compatibility checks (`a.Environment == b.Environment`) intact unless intentionally adding cross-environment support.
- Preserve segment validity checks (digit range, no leading zero in multi-digit values).
- Avoid committing generated artifacts (`bin/`, `obj/`, `.vs/`), even though this repo currently contains many tracked generated files.
- `Protocol5.com/SiteContent/Fibonacci/index.html` and `Protocol5.com/SiteContent/Prime/index.html` may use the new site shell, but the generated numeric files under `Protocol5.com/SiteContent/Fibonacci/*.htm` and `Protocol5.com/SiteContent/Prime/*.htm` are off-limits.
- Never modify, rename, move, recreate, or delete generated `{number}.htm` files in the source `Protocol5.com/SiteContent/Fibonacci` and `Protocol5.com/SiteContent/Prime` trees or in deployed `SiteContent/Fibonacci` and `SiteContent/Prime` copies.
- When adding navigation for Fibonacci or Prime, prefer linking directly to the existing generated `{number}.htm` pages whenever those pages already exist.
- Published output must not include generated numeric .htm files from Protocol5.com/SiteContent/Fibonacci or Protocol5.com/SiteContent/Prime; production keeps the original generated files in place and publish must not overwrite them.
- Never upload or mirror the generated Fibonacci or Prime numeric page trees to GitHub or GitHub Pages. Those generated sequence artifacts are production-only compatibility content and must stay out of GitHub-hosted publishing workflows.

## High-Value Test Areas When Changing Math Logic
- Cross-base arithmetic consistency (`binary`, `decimal`, `base36`).
- Fractional division/reduction (`Number.Reduce`, `NumberOperator.Divide`).
- Comparison semantics with negative numbers and fractions.
- Parsing/formatting round-trips (`ParseNumberSegments` <-> `ConvertToString`).


Why This File Exists

This is a UAI AI Memory handoff file from protocol5.com. 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

AGENTS.md is the entry contract for agents. It tells an agent which context files to load, what authority boundaries apply, how file intake works, and which operations are out of bounds before broad edits start.

Structure

The file is structured around these visible headings: AGENTS.md; Purpose; UAI AI Memory Startup; File Intake; Solution Layout; Core Architecture; Build, Test, Run; Known Issues / Constraints. 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-05-06T17:58:24.5168382Z
  • Source origin: current-source-workspace
  • Retrieval method: local-source-workspace
  • Duplicate group: sfg-534 (primary)
  • Historical hash records are stored in data/hashes/source-file-history.jsonl.

Machine-Readable Metadata

{
    "title":  "AGENTS.md",
    "source_site":  "protocol5.com",
    "source_url":  "https://protocol5.com/",
    "canonical_url":  "https://aiwikis.org/protocol5/uai-system/files/agents-md-c8256474/",
    "source_reference":  "AGENTS.md",
    "file_type":  "md",
    "content_category":  "uai-system",
    "content_hash":  "sha256:c8256474a0d61d6c03e93aaca0b3210d02fcc44c515a4b00fb7a278e9d251c9c",
    "last_fetched":  "2026-05-06T17:58:24.5168382Z",
    "last_changed":  "2026-05-06T01:08:07.8337949Z",
    "import_status":  "unchanged",
    "duplicate_group_id":  "sfg-534",
    "duplicate_role":  "primary",
    "related_files":  [

                      ],
    "generated_explanation":  true,
    "explanation_last_generated":  "2026-05-06T17:58:24.5168382Z"
}