Spaces:
Sleeping
Sleeping
LedgerShield Documentation
This folder contains the long-form documentation for LedgerShield. The root README.md is the project pitch, quick-start guide, and entry point; the files here go deeper into benchmark design, task contracts, APIs, architecture, development workflow, and deployment.
Where to Start
If you are new here, read the root README.md first, then follow the reading path below that matches your role.
Reading Paths
Evaluating the benchmark (judge, reviewer, researcher)
README.mdβ project overview, benchmark at a glance, upgrade snapshotindex.mdβ why LedgerShield exists, core concepts, scoring philosophytasks.mdβ task families, case catalog, output contracts, scoring dimensionsarchitecture.mdβ system layers, hidden state, reward flow, grading pipeline
Building an agent
index.mdβ core concepts and episode lifecycletasks.mdβ what the agent must output and how it is gradedapi-reference.mdβ REST endpoints, payloads, action contractsdevelopment.mdβ repo map and extension guidance
Contributing to the codebase
development.mdβ setup, tests, CI, and repo maparchitecture.mdβ system design and grading pipelineapi-reference.mdβ payload schemas you must keep in synctasks.mdβ scoring dimensions affected by code changes
Operating or deploying LedgerShield
deployment.mdβ local, Docker, HF Space, and runtime configurationapi-reference.mdβ endpoints and health checksindex.mdβ benchmark scope and case loading
Documentation Map
| File | Best for | Contents |
|---|---|---|
index.md |
first-time readers | motivation, benchmark scope, core concepts, quick start, and evaluation framing |
tasks.md |
agent builders and benchmark users | task families AβE, case catalog, output contracts by task, scoring weights, and penalties |
api-reference.md |
integrators and agent builders | REST endpoints (/reset, /step, /state, /leaderboard, /benchmark-report), request/response envelopes, action taxonomy, reward model |
architecture.md |
researchers and maintainers | system layers, hidden-state mechanics, reward design, grading pipeline, case generation, realism modules |
development.md |
contributors | local setup, test suite, CI expectations, detailed repo/file map, extension guidance |
deployment.md |
operators | local/Docker/HF deployment, environment variables, deployment profiles, troubleshooting |
How The Docs Relate to Code
| Doc section | Primary code files it documents |
|---|---|
Investigation tools (index.md, api-reference.md) |
server/tools.py β tool implementations, email thread parsing, domain alignment |
Grading and penalties (tasks.md, architecture.md) |
server/grading.py, server/trajectory_grading.py, server/risk_rules.py, server/outcome_simulator.py |
Agent behavior and tiering (README.md, development.md) |
inference.py β ModelCapabilityProfile, evidence grounding, guardrail pipelines |
Guardrail sanitization (development.md, tasks.md) |
task_c_guardrails.py, task_d_guardrails.py β composite signals, PAY evidence, sanitize logic |
Environment loop (architecture.md) |
server/environment.py β reward shaping, PBRS, truncation, rendering |
State and pressure (architecture.md) |
server/world_state.py, server/pressure_events.py |
Case generation (architecture.md) |
server/case_factory.py, server/attack_library.py, server/data_loader.py |
Benchmark evaluation (README.md) |
benchmark_report.py, compare_models_live.py β live comparison with capability profiles |
Code Landmarks
| Path | Why you would open it |
|---|---|
../server/environment.py |
reward shaping, truncation semantics, rendering, tool dispatch |
../server/world_state.py |
hidden/public state, artifacts, pressure events, decision readiness |
../server/grading.py |
task rubrics, degenerate evidence cap, semantic counterfactual scoring |
../server/trajectory_grading.py |
trajectory-aware scoring and efficiency logic |
../server/tools.py |
investigation tools, email-thread payload construction, domain alignment |
../server/case_factory.py |
generated challenge/holdout/twin cases |
../server/attack_library.py |
adversarial attack inventory (16 types) |
../server/currency_engine.py |
multi-currency realism (FX, IBAN, SWIFT, aging) |
../server/compliance_engine.py |
SOX-style control evaluation |
../server/curriculum.py |
dynamic difficulty adaptation |
../server/dual_agent_mode.py |
watchdog-mode novelty module |
../inference.py |
submission-safe agent with ModelCapabilityProfile tiers |
../task_c_guardrails.py |
Task C composite signal detection and PAY evidence |
../task_d_guardrails.py |
Task D composite signal detection and PAY evidence |
../benchmark_report.py |
benchmark report and leaderboard generation |
../compare_models_live.py |
live multi-model comparison with capability profiles |
Practical Advice
- Quick benchmark contract? Start with
tasks.md. - Agent failing a case? Pair
tasks.mdwith the trace artifacts inlive_model_comparison_debug/. - Changing scoring? Read
architecture.mdand thendevelopment.md. - Changing endpoints or payloads? Keep
api-reference.mdin sync. - Adding a new tool or intervention? Update
server/tools.py,server/schema.py,server/environment.py, and thenapi-reference.md+architecture.md. - Understanding agent tiering? See
inference.pyβModelCapabilityProfileand the Upgrade Snapshot in the rootREADME.md.