ClawCheck is a full-stack AI safety evaluation platform for testing agent responses, generating structured review reports, and tracking improvement over time at the workspace level.
It combines a deterministic scoring pipeline with a local semantic analysis layer so teams can review not only whether an answer "sounds right," but whether it actually covers the safety expectations, caveats, and operational checks required for trustworthy agent behavior.
ClawCheck is built around a practical evaluation loop:
- A reviewer selects or links a test case.
- An AI agent produces a response to that prompt.
- The response is submitted to ClawCheck.
- ClawCheck scores the response with deterministic rubric logic.
- ClawCheck runs semantic coverage analysis against expected checks.
- A detailed report is generated and stored.
- The result is surfaced in report views, workspace history, and dashboard analytics.
This makes ClawCheck useful both as:
- A review tool for one-off agent evaluations
- A workspace-based improvement system for a single tracked agent over time
- A foundation for future sandbox-style evaluation before higher-risk agent actions are approved
ClawCheck uses an explicit, explainable scoring path for the primary evaluation result. This keeps the final score stable and reviewable instead of hiding it behind a purely generative system.
Deterministic evaluation covers:
- Category-based review logic
- Risk scoring
- Status classification
- Strength and weakness generation
- Recommendation generation
- Human-readable report summaries
This deterministic score remains the baseline system of record.
ClawCheck adds a semantic layer on top of the deterministic evaluator.
Instead of looking only for exact keyword overlap, the app compares the agent response against normalized expected checks and detects whether the response semantically:
- Covers the point clearly
- Mentions it only partially
- Misses it entirely
This enables better follow-up suggestions, repeated weakness detection, similar report retrieval, and workspace-level semantic analytics.
Each workspace is designed around a single agent being improved over time.
ClawCheck tracks:
- Linked evaluation reports
- Repeated weaknesses
- Score movement across iterations
- Semantic coverage trends
- Top follow-up recommendations
- Workspace-level semantic analytics and summaries
This turns evaluation from a one-time report into an iterative agent-improvement workflow.
The current product evaluates completed responses. The longer-term direction is to let ClawCheck act as a validation layer around autonomous or semi-autonomous agents by checking proposed responses or actions before they are finalized.
That future mode is not fully implemented as an automated gate today, but the platform already contains the foundations needed for it:
- Structured expected checks
- Report history
- Semantic retrieval
- Organization-specific evaluation context
- Workspace analytics
ClawCheck includes a local semantic search pipeline backed by vector embeddings and retrieval in Supabase Postgres with pgvector.
Traditional rubric scoring is useful, but it has limits:
- An agent can use different wording while still covering the right idea
- A response can look polished while quietly missing an important review point
- Repeated weaknesses are hard to identify reliably with tags alone
- Similar prior reports are more useful when they are found by meaning, not only category labels
The semantic layer addresses those gaps.
ClawCheck uses a local, server-side embedding pipeline with:
- Provider:
local-transformers - Model:
onnx-community/all-MiniLM-L6-v2-ONNX - Dimension:
384 - Library:
@huggingface/transformers
This approach was chosen because it is:
- Free to run locally
- Reproducible
- Suitable for hackathon and prototype environments
- Independent from paid embedding APIs
The current semantic pipeline can generate and persist embeddings for:
- Normalized expected checks
- Test case prompts
- Report agent responses
- Report summaries
The current backend supports retrieval helpers for:
- Expected-check similarity
- Similar report search
- Workspace-scoped similar report history
- Similar test case search
The semantic coverage classifier chunks the response and compares the best-matching chunk to each expected check. Each expected check is then classified as:
coveredpartialmissed
That result is used to build:
- Coverage summaries
- Semantic suggestions
- Similar report comparisons
- Workspace memory hints
- Persisted semantic analytics
The semantic layer currently supports the review process. It does not override the deterministic final score.
That means:
- The deterministic score remains the baseline evaluation result
- Semantic insights add meaning-aware feedback
- The system stays explainable while still becoming more context-aware
ClawCheck is designed to support retrieval-based evaluation against real organizational context.
The platform can embed and retrieve organization-specific material such as:
- Internal AI policies
- Privacy requirements
- Security checklists
- Compliance documents
- Safety review forms
- Tone or customer-support guidelines
- Strong benchmark answers
- Weak benchmark answers
- Previous ClawCheck reports
This is retrieval, not model training.
ClawCheck does not train a new model on organization data. Instead, it stores embeddings for relevant documents and retrieves them during evaluation so responses can be judged against the team's actual operating context.
- Public marketing pages and authenticated product dashboard
- Workspace-based agent evaluation and tracking
- Test case library with expected checks
- Deterministic evaluation and report generation
- Persisted semantic coverage and suggestion payloads
- Similar report and workspace memory retrieval
- Workspace semantic analytics
- Semantic report indicators in list and detail views
- Local embedding generation and protected reindex workflows
- Supabase-backed auth, storage, and structured data persistence
- Next.js App Router
- React 19
- TypeScript
- Tailwind CSS v4
- shadcn/ui
- Recharts
- Lucide React
- Sonner
- Next.js route handlers
- Supabase Auth
- Supabase Postgres
- Supabase
pgvector - Row-level security policies
- Server-side report persistence
@huggingface/transformers- Local ONNX embedding model
- Vector similarity search
- Chunk-based semantic coverage classification
- Deterministic semantic suggestion composition
src/
app/
(marketing)/ Public landing and roadmap pages
(dashboard)/ Authenticated product application
api/ Evaluation, semantic admin, and data routes
components/
evaluation/ Report detail UI, semantic panels, evaluation views
flow/ Public roadmap/flow content
layout/ Shared shells, sidebar, headers
marketing/ Public-facing homepage sections
reports/ Report cards, indicators, summary views
workspaces/ Workspace cards, members, analytics, trend views
shared/ Shared presentation and utility components
ui/ Base design system components
config/ App-level static configuration
data/ Seed-style static content and presentation data
hooks/ Client hooks, including evaluation flow helpers
lib/
auth/ User/session and profile helpers
db/ Supabase-backed data loading and persistence
evaluation/ Deterministic evaluator and report generator
schemas/ Zod validation schemas
semantic/ Embeddings, retrieval, coverage, suggestions, analytics
supabase/ Browser/server/admin Supabase clients
types/ Shared TypeScript domain types
supabase/
migrations/ Database schema and semantic feature migrations
docs/ Product and taxonomy reference documents
public/ Static assets
The Supabase migrations in supabase/migrations define the core application schema and the semantic-search additions.
Important schema areas include:
workspacesworkspace_versionsreportstest_casestest_case_expected_checksworkspace_semantic_analytics
Semantic-related migrations include:
- Semantic search foundation
- Vector-dimension migration to local embeddings
- Semantic retrieval SQL functions
- Report semantic persistence
- Workspace semantic analytics
The primary evaluation entrypoint is POST /api/evaluate.
At a high level, the server flow is:
- Validate the incoming evaluation payload
- Resolve workspace-linked agent details when needed
- Run deterministic evaluation
- Attempt to map the prompt to a stored test case
- Generate semantic insights when a test case is available
- Persist the report
- Persist semantic insights with the report when available
- Update workspace semantic analytics for linked workspace reports
- Return the evaluation result to the caller
Semantic failures are intentionally fail-safe:
- If semantic composition fails, the base evaluation still succeeds
- If semantic persistence fails, the base report still remains the priority
ClawCheck includes protected admin routes for semantic maintenance and preview workflows:
POST /api/admin/semantic-reindexPOST /api/admin/semantic-coverage-previewPOST /api/admin/semantic-suggestions-previewPOST /api/admin/workspace-semantic-analytics/rebuild
These routes are server-side only and protected with a manual token:
SEMANTIC_REINDEX_TOKEN
The repository does not currently include a committed .env.example, so configure environment variables from the actual runtime expectations in the codebase.
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEYSUPABASE_URLSUPABASE_SERVICE_ROLE_KEY
SEMANTIC_REINDEX_TOKENEMBEDDING_PROVIDER=local-transformersEMBEDDING_MODEL=onnx-community/all-MiniLM-L6-v2-ONNXEMBEDDING_DIMENSIONS=384
EMBEDDING_CACHE_DIREMBEDDING_DEVICEEMBEDDING_DTYPEEMBEDDING_LOCAL_FILES_ONLY
Do not commit real credentials or tokens.
If you want to follow the lockfile used in most local development sessions:
npm installIf you prefer pnpm and your lockfile is in sync:
pnpm installnpm run devOpen http://localhost:3000.
npm run typecheck
npm run lint
npm run buildThis project expects an existing Supabase project with the migrations applied.
Typical setup steps:
- Create or connect a Supabase project
- Apply the SQL migrations from
supabase/migrations - Configure local environment variables
- Seed or connect your application data
- Run the app locally
If you are using the semantic layer, make sure:
- Vector-related migrations are applied
- Semantic persistence columns exist on
reports - Expected checks are normalized in
test_case_expected_checks - Reindex routes are properly configured before running semantic backfills
ClawCheck is no longer just a starter template. It now includes:
- Real Supabase-backed data loading and persistence
- Authenticated dashboard and workspace experience
- Persisted evaluation reports
- Local semantic embeddings
- Vector retrieval helpers
- Semantic insight persistence
- Workspace semantic analytics
- A public
/flowpage that explains the product direction and roadmap
The current implementation is strongest in evaluation, persistence, semantic review, and workspace-level insight. Likely next steps include:
- Deeper response-improvement flows
- Stronger organization-context retrieval
- More benchmark and regression tooling
- Export and presentation tooling
- Tighter integration with external agent systems such as OmegaClaw
- Future safety-gate workflows for higher-risk actions
See the docs folder for additional material:
Add your preferred license here if this project is being distributed beyond internal or hackathon use.