confidence_history
Shows the trend of confidence-score and execution-depth across recent runs to reveal if verification confidence is improving, decaying, or oscillating.
Instructions
Returns the confidence-score and execution-depth trend across the last N Veris runs persisted in local state (.veris/state.db). Confidence math uses a 14-day half-life decay over real execution results — so this surface shows whether the project's verification confidence is improving, decaying, or oscillating over time. Useful for dashboards, weekly health checks, or detecting regressions in test coverage discipline. Defaults to last 20 runs; pass limit to widen.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of runs to return. Defaults to 20. |
Implementation Reference
- src/mcp/McpServer.ts:352-354 (handler)Handler function for the confidence_history tool. Delegates to VerisState.confidenceTrend(), defaulting to 30 results if no limit is provided.
private handleConfidenceHistory(args: any) { return this.text(this.state.confidenceTrend(args.limit || 30)); } - src/mcp/McpServer.ts:144-146 (schema)Tool registration entry with description and input schema. Accepts optional 'limit' parameter (number).
{ name: "confidence_history", description: "Returns the confidence-score and execution-depth trend across the last N Veris runs persisted in local state (.veris/state.db). Confidence math uses a 14-day half-life decay over real execution results — so this surface shows whether the project's verification confidence is improving, decaying, or oscillating over time. Useful for dashboards, weekly health checks, or detecting regressions in test coverage discipline. Defaults to last 20 runs; pass `limit` to widen.", inputSchema: { type: "object", properties: { limit: { type: "number", description: "Maximum number of runs to return. Defaults to 20." } }, required: [] } }, - src/mcp/McpServer.ts:75-75 (registration)Switch-case routing that dispatches 'confidence_history' tool requests to the handleConfidenceHistory method.
case "confidence_history": return this.handleConfidenceHistory(args); - Core SQL query backing the confidence_history tool. Fetches the most recent N run records (ordered by timestamp descending), returning runId, timestamp, overallConfidence, and executionDepth.
public confidenceTrend(limit = 30): ConfidenceTrendRow[] { if (!this.db) return []; return this.db.prepare(` SELECT run_id as runId, ts, overall_confidence as overallConfidence, execution_depth as executionDepth FROM runs ORDER BY ts DESC LIMIT ? `).all(limit) as ConfidenceTrendRow[]; } - src/persistence/VerisState.ts:50-55 (helper)Type definition for each row returned by confidence_history: runId, timestamp, overall confidence score, and execution depth.
export interface ConfidenceTrendRow { runId: string; ts: string; overallConfidence: number; executionDepth: number; }