TOOLTRUTH / PLANNING

Verification before
action.

Planning & system architecture document

Version v111 August 2026Authors: Tejbeer Kaur, Shaurya Sharma, Raghav Sachdeva, Vaibhav Dhiman
01 / SCOPE

Project scope & objectives

ToolTruth introduces a verification boundary between an AI agent and external tools. Its purpose is to detect contradictions, stale values, invalid transitions, and other illegal states before a tool result is trusted by the agent.

Core propositionDon't let a plausible tool response become an unverified action.
  • Model tool contracts and relevant state as typed data.
  • Validate tool outputs against expected schemas and state constraints.
  • Expose explainable verification results to the calling agent.
  • Keep a versioned trail of project deliverables and planning decisions.
02 / USERS

Proposed functions & users

UserFunctionExpected outcome
AI agentSubmit tool call + contextReceive verified / blocked result
DeveloperDefine tool schemas and constraintsConsistent validation rules
Project adminUpload and publish deliverablesAuditable version history
Evaluator / reviewerBrowse project evidenceClear, stable project trail
03 / FEATURES

System features & external interfaces

01

Contract validation

Schema/type checks for tool inputs and outputs.

02

State validation

Detect stale, contradictory or illegal-state transitions.

03

Evidence storage

Versioned metadata in PostgreSQL and files in S3.

04 / ARCHITECTURE

Full-stack architecture

GitHub PagesHTML / CSS / JS
↕ HTTPS / JSON
FastAPIAuth · uploads · publish · versions
↙   ↘
PostgreSQLmetadata / versions / admin
AWS S3versioned project files

The static frontend can operate in demo mode without the backend. When deployed, API_BASE_URL points to the FastAPI service.

05 / QUALITY

Performance, security & quality goals

Performance

Static first load should remain lightweight. API responses should be JSON and cacheable where appropriate.

Security

JWT admin authentication, bcrypt password hashes, CORS allow-list, S3 private objects and short-lived pre-signed URLs.

Reliability

Immutable published history, health endpoint, systemd restart policy and explicit error states.

Usability

Responsive public site, accessible navigation, clear upload states and useful feedback.

Maintainability

Separated routers, models, schemas, storage, frontend API client and design tokens.

Observability

Structured application logs and upload/publish records provide an audit trail.

06 / RISKS

Technical risk register

RiskImpactMitigation
S3 credentials misconfiguredHighUse IAM role / least privilege and environment validation.
Stale tool dataHighAttach freshness constraints and reject expired facts.
JWT exposureHighHTTPS, short expiry, sessionStorage and no secrets in frontend.
API unavailableMediumPublic frontend falls back to static/demo data.
Version overwrittenMediumAppend-only publish records; never delete previous versions.
07 / TIMELINE

17-week delivery plan

Interactive schedule with task dependencies, milestones, and week/month views.

Planned work Dependent work Final validation / demo