Turn blocked or flagged AI agent outputs into grounded, citation-verified DPO preference pairs using Reppo DataNet evidence pods and SERV Reasoning (Gpt 6 Luna).
| Layer | Technologies | Usage |
|---|---|---|
| Languages | TypeScript 5.9, CSS, HTML5, JavaScript |
App Router pages, API route handlers, mineral paper stylesheets, design specimen, and build configs |
| Framework & UI | Next.js 16.4, React 19.2, Tailwind CSS v4 |
Multi-route workbench (/mend, /datanets, /vault), server endpoints, and Canvas/SVG telemetry |
| Motion & Icons | Motion 12, GSAP 3, Phosphor Icons |
Reduced-motion-aware panel choreography and hairline iconography |
| Validation & Tests | Zod 4.1, Vitest 4.0, ESLint 9 |
Strict API schema validation, DPO compiler verification, and linting |
| Protocols | Reppo DataNets & Eval API, SERV Reasoning (Gpt 6 Luna) |
Evidence pod retrieval, evaluation polling, and citation-grounded repair |
AI agents fail evaluation gates when claims cite outdated dates, unverified numbers, or missing sources. Raw evaluation APIs return a score and a critique, leaving the engineer to hunt for evidence, rewrite the draft, re-verify the lift, and format training data by hand.
TraceMend closes that loop across three linked routes:
- Mend Bench (
/mend): Load a failed or flagged agent draft (answer,plan,trace, orartifact), run an instant SERV Pre-Screen (Gpt 6 Luna) or submit directly to live Reppo Evaluation Markets (eval.reppo.xyz), pin verifiable Reppo DataNet pods, generate a grounded repair via SERV Reasoning (serv_prompt_guard+serv_shadow_agent+ static BRAID prompt caching + strict JSON schema), scrub clause-by-clause diffs with the Kintsugi Optical Seam comparator, re-audit score lift, and save the(rejected, chosen)pair. - DataNet Evidence Registry (
/datanets): Browse all 19 live Reppo public DataNets, filter by market name, token symbol, or CUID, inspect up-vote vs down-vote ratios and epoch emissions, review IPFS pod provenance, and pin records straight into/mend. - DPO Preference Vault (
/vault): Filter verified remediation runs (BLOCK -> AUTO-SHIP,REVIEW -> AUTO-SHIP, or your own saved runs), inspect compiled OpenAI/TRL-compatible DPO JSONL records, copy records to clipboard, or download.jsonldatasets and Markdown audit receipts.
- Public Subnets:
GET https://reppo.ai/api/v1/public/subnets?page=1&limit=30fetches active DataNets (19live subnets) with automatic normalization and captured snapshot fallback if an upstream feed is unreachable. - Public Evidence Pods:
GET https://reppo.ai/api/v1/public/pods?page=1&limit=80retrieves recent pod records, sanitizes external links (http:/https:only), and applies server-sidesubnetIdand search filtering. - Live Evaluation Submit & Poll:
POST https://eval.reppo.xyz/api/v1/agents/eval-requests/submitandGET https://eval.reppo.xyz/api/v1/agents/eval-requests/{evalId}dispatchanswer,plan,trace, orartifactpayloads with bounded settlement windows (10to1440minutes) and surface clear UI feedback on402(credit balance),409(active pending evaluation conflict), andPENDINGsettlement states.
- Model: Uses
gpt-6-luna(Gpt 6 Lunain UI telemetry) athttps://inference-api.openserv.ai/v1/chat/completions. - Static BRAID Prompt Graph: Keeps system prompts (
TRACEMEND_SYSTEM_PROMPTandTRACEMEND_PRESCREEN_SYSTEM_PROMPT) byte-for-byte immutable so SERV Reasoning BRAID prompt caching warms across runs. - Built-in Guard & Verification Tools: Attaches
serv_prompt_guardandserv_shadow_agent(max_iterations: 2) on repair requests alongside strictresponse_format: json_schemaenforcement. - Server-Only Credentials: All calls to
eval.reppo.xyzandinference-api.openserv.airun inside Next.js Route Handlers (src/app/api/*). No API keys are exposed to the browser bundle.
- Writes validated runs to
/tmp/tracemend-vault.jsonon the server (POST /api/vault) using atomic write-and-rename and merges them with the user's browserlocalStoragemirror (src/lib/schemas.tsmergeClientAndServerRuns) so saved runs persist even across serverless cold starts. - Ships two real captured Reppo baseline specimens (
captured-specimen) pre-loaded so judges can test the entire repair, diff-scrub, and DPO export workflow without spending evaluation credits first.
tracemend/
├── src/
│ ├── app/
│ │ ├── icon.svg # Custom SVG favicon (optical reticle monogram)
│ │ ├── layout.tsx # Outfit, Rubik, JetBrains Mono fonts + shell chrome
│ │ ├── page.tsx # Redirects / -> /mend
│ │ ├── mend/page.tsx # Stage 01-04 remediation workbench
│ │ ├── datanets/page.tsx # Reppo DataNet & pod provenance registry
│ │ ├── vault/page.tsx # DPO JSONL compiler & audit receipts
│ │ └── api/
│ │ ├── datanets/route.ts # Public Reppo DataNets proxy
│ │ ├── pods/route.ts # Public Reppo pods filter proxy
│ │ ├── eval/route.ts # Reppo eval dispatch & SERV Pre-Screen
│ │ ├── eval/[id]/route.ts # Reppo eval polling endpoint
│ │ ├── mend/route.ts # SERV Gpt 6 Luna grounded citation repair
│ │ └── vault/route.ts # DPO Vault GET/POST/DELETE persistence
│ ├── components/
│ │ ├── optical-header.tsx # Caliper navigation header + live status chips
│ │ ├── calibration-field.tsx # Topographic phase-lock Canvas backdrop
│ │ ├── consensus-constellation.tsx # Orbital score dial + 4-axis SVG radar
│ │ ├── kintsugi-diff-scrub.tsx # 0%-100% seam scrub, split proof & clause view
│ │ ├── braid-trace-inspector.tsx # BRAID node trace & token/USD telemetry
│ │ ├── protocol-footer.tsx # Ft8 protocol telemetry strip with pause control
│ │ ├── mend-workbench.tsx
│ │ ├── datanets-workbench.tsx
│ │ └── vault-workbench.tsx
│ └── lib/
│ ├── schemas.ts # Zod contracts, score/route helpers, DPO compiler
│ ├── specimens.ts # Captured Reppo DataNet, pod & eval baselines
│ ├── reppo.ts # Reppo API normalizers & HTTP clients
│ ├── serv.ts # SERV Reasoning Gpt 6 Luna client & prompt builder
│ ├── vault-store.ts # Server /tmp JSON store with atomic writes
│ └── client-vault.ts # Browser localStorage mirror for pinned pods & runs
├── tests/unit/ # Vitest unit tests (schemas, vault, API clients)
├── docs/screenshots/ # Real Playwright captures across desktop & mobile
├── DESIGN.md # Approved mineral rag paper visual specification
└── .env.example # Server-side environment template
- Node.js
20+(verified on Node24.22.2) SERV_API_KEYfrom OpenServREPPO_API_KEYfrom Reppo
git clone https://github.com/Pizzylee001/tracemend.git
cd tracemend
npm install
cp .env.example .env.localAdd your keys to .env.local (never commit .env.local):
SERV_API_KEY=serv_your_key_here
REPPO_API_KEY=rk_your_key_here
SERV_MODEL=gpt-6-luna# Run unit tests (Vitest)
npm test
# Type-check & lint
npx tsc --noEmit
npm run lint
# Build production bundle
npm run build
# Start development server
npm run devOpen http://localhost:3000 (automatically opens /mend).
- Import
Pizzylee001/tracemendin the Vercel dashboard (Framework Preset: Next.js). - Add these Environment Variables under Project Settings -> Environment Variables:
SERV_API_KEY(Server-side secret key)REPPO_API_KEY(Server-side Reppo evaluation & DataNet key)SERV_MODEL=gpt-6-luna(optional default)
- Deploy. Serverless API routes persist custom DPO runs in
/tmp/tracemend-vault.jsonper warm instance while the browser mirrors saved pairs inlocalStoragefor immediate continuity.




