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 .NET i...
Metadata
| Field | Value |
|---|---|
| Source site | protocol5.com |
| Source URL | https://protocol5.com/ |
| Canonical AIWikis URL | https://aiwikis.org/protocol5/uai-system/files/agents-md-3210ab3e/ |
| Source reference | AGENTS.md |
| File type | md |
| Content category | uai-system |
| Last fetched | 2026-05-02T01:47:31.8867765Z |
| Last changed | 2026-05-01T01:23:57.9609343Z |
| Content hash | sha256:3210ab3ebe7c7bcaf8c838b7e1ad4ca5ad33c7095c38fb1ad206f5ead008c4c4 |
| Import status | unchanged |
| Raw source layer | data/sources/protocol5/agents-md-3210ab3ebe7c.md |
| Normalized source layer | data/normalized/protocol5/agents-md-3210ab3ebe7c.txt |
Current File Content
Structure Preview
- AGENTS.md
- Purpose
- UAI AI Memory Startup
- 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 .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`
5. 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.
## 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 .NET Hub are sibling areas under Protocol5.
- Protocol5 UAI is the official UAI .NET implementation hub. UAIX.org remains authoritative for normative UAI standard, schema, validator, registry, governance, roadmap, changelog, and conformance records.
- 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.
- 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; Solution Layout; Core Architecture; Build, Test, Run; Known Issues / Constraints; Frozen Generated Route Rules. 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-02T01:47:31.8867765Z - Source origin:
current-source-workspace - Retrieval method:
local-source-workspace - Duplicate group:
sfg-079(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-3210ab3e/",
"source_reference": "AGENTS.md",
"file_type": "md",
"content_category": "uai-system",
"content_hash": "sha256:3210ab3ebe7c7bcaf8c838b7e1ad4ca5ad33c7095c38fb1ad206f5ead008c4c4",
"last_fetched": "2026-05-02T01:47:31.8867765Z",
"last_changed": "2026-05-01T01:23:57.9609343Z",
"import_status": "unchanged",
"duplicate_group_id": "sfg-079",
"duplicate_role": "primary",
"related_files": [
],
"generated_explanation": true,
"explanation_last_generated": "2026-05-02T01:47:31.8867765Z"
}