---
title: "Fetch the production-readiness Trust Gate for high-confidence agent recommendations."
method: GET
path: "/api/trust"
---

# Fetch the production-readiness Trust Gate for high-confidence agent recommendations.

`GET /api/trust`

## Request

- Base URL: `https://git.top`
- URL: `https://git.top/api/trust`
- Auth: none declared

## Query parameters

- `detail` string

## Response `200`

Trust Gate decision with checks, agent policy, health, sync, quality summary, and metadata

- TrustGateResponse: Production-readiness gate for high-confidence agent recommendations.
  - `name` string
  - `positioning` string
  - `detail` 'summary' | 'full', required
  - `decision` 'allow' | 'caution' | 'block', required
  - `summary` string
  - `production_ready` boolean, required
  - `freshness_slo` SyncFreshnessSlo, required
    - `hot_projects` object, required
      - `total` integer, required
      - `within_target` integer, required
      - `freshness_rate` number, required
      - `target_rate` number, required
      - `meets_target` boolean, required
      - `target_hours` integer, required
    - `whole_corpus` object, required
      - `total` integer, required
      - `within_target` integer, required
      - `freshness_rate` number, required
      - `target_rate` number, required
      - `meets_target` boolean, required
      - `target_basis` 'tier_policy', required
  - `checks` TrustGateCheck[], required
    - `id` string, required
    - `label` string, required
    - `status` 'pass' | 'warn' | 'fail', required
    - `observed` string, required
    - `requirement` string, required
  - `required_for_high_confidence` string[], required
  - `agent_policy` TrustGateAgentPolicy, required
    - `high_confidence_use` string
    - `caution_use` string
    - `block_use` string
    - `cite` string[]
    - `disclose_when` string[]
  - `health` HealthResponse, required: Health and source-preflight response. Agents should inspect db, metadata.source, sync_freshness, and project counts before trusting recommendations.
    - `ok` boolean, required
    - `db` 'available' | 'missing' | 'error', required
    - `project_count` integer, required
    - `raw_project_count` integer, required
    - `knowledge_ready_project_count` integer, required
    - `sync_health` string, required
    - `sync_freshness` string, required
    - `last_successful_sync_at` string, date-time, nullable
    - `hours_since_successful_sync` number, nullable
    - `operational_storage` object
      - `status` 'healthy' | 'warning' | 'critical' | 'unknown'
      - `github_cache_entries` integer
      - `github_cache_body_bytes` integer
      - `github_cache_max_entries` integer
      - `github_cache_retention_entries` integer
      - `github_cache_body_budget_bytes` integer
      - `utilization` number
      - `star_snapshot_count` integer
      - `sync_run_count` integer
      - `governance_run_count` integer
      - `project_change_count` integer
      - `feedback_proposal_count` integer
    - `metadata` Metadata, required: Common provenance envelope for agent-facing responses. Agents should require source=d1 for high-confidence production claims and disclose seed fallback.
      - `source` 'd1' | 'seed'
      - `reason` string
      - `project_count` integer
      - `generated_at` string, date-time
      - `snapshot_id` string: Stable identity for the corpus snapshot used by this response.
      - `latest_synced_at` string, date-time, nullable
      - `schema_version` 'git-top.knowledge.v1'
      - `loaded_project_limit` integer: Maximum D1 knowledge or search-candidate rows loaded into the bounded ranking set when present.
      - `truncated` boolean: Whether the D1-backed ranking or candidate set reached its limit and may omit additional matching rows.
      - `candidate_retrieval` 'd1_first': Search-only marker indicating that deterministic filters and broad query matching ran in D1 before TypeScript ranking.
      - `candidate_count` integer: Number of D1 search candidates passed to the authoritative TypeScript filter and ranking stage.
      - `candidate_limit` integer: Maximum number of D1 search candidates passed to the ranking stage.
      - `warnings` string[]: Fallback, count, freshness, or trust caveats that agents should account for before citing results.
  - `sync` object, required
  - `quality` QualityReportResponse, required: Corpus quality and trust report. release_score is the release gate; data_trust_score and risk_level describe corpus trust.
    - `score` number, required
    - `release_score` number, required
    - `data_trust_score` number, required
    - `score_summary` object
      - `release_score_meaning` string
      - `data_trust_score_meaning` string
      - `risk_level_meaning` string
    - `risk_level` 'low' | 'medium' | 'high', required
    - `risk_summary` object, required
      - `level` 'low' | 'medium' | 'high'
      - `reasons` string[]
      - `low_confidence_classification_rate` number
      - `collection_review_rate` number
      - `stale_project_rate` number
      - `stale_collection_rate` number
    - `improvement_plan` object[]
    - `project_count` integer
    - `issue_count` integer
    - `error_count` integer
    - `warning_count` integer
    - `category_distribution` object
    - `coverage` object, required
    - `issues` object[]
    - `metadata` Metadata, required: Common provenance envelope for agent-facing responses. Agents should require source=d1 for high-confidence production claims and disclose seed fallback.
      - `source` 'd1' | 'seed'
      - `reason` string
      - `project_count` integer
      - `generated_at` string, date-time
      - `snapshot_id` string: Stable identity for the corpus snapshot used by this response.
      - `latest_synced_at` string, date-time, nullable
      - `schema_version` 'git-top.knowledge.v1'
      - `loaded_project_limit` integer: Maximum D1 knowledge or search-candidate rows loaded into the bounded ranking set when present.
      - `truncated` boolean: Whether the D1-backed ranking or candidate set reached its limit and may omit additional matching rows.
      - `candidate_retrieval` 'd1_first': Search-only marker indicating that deterministic filters and broad query matching ran in D1 before TypeScript ranking.
      - `candidate_count` integer: Number of D1 search candidates passed to the authoritative TypeScript filter and ranking stage.
      - `candidate_limit` integer: Maximum number of D1 search candidates passed to the ranking stage.
      - `warnings` string[]: Fallback, count, freshness, or trust caveats that agents should account for before citing results.
  - `metadata` Metadata, required: Common provenance envelope for agent-facing responses. Agents should require source=d1 for high-confidence production claims and disclose seed fallback.
    - `source` 'd1' | 'seed'
    - `reason` string
    - `project_count` integer
    - `generated_at` string, date-time
    - `snapshot_id` string: Stable identity for the corpus snapshot used by this response.
    - `latest_synced_at` string, date-time, nullable
    - `schema_version` 'git-top.knowledge.v1'
    - `loaded_project_limit` integer: Maximum D1 knowledge or search-candidate rows loaded into the bounded ranking set when present.
    - `truncated` boolean: Whether the D1-backed ranking or candidate set reached its limit and may omit additional matching rows.
    - `candidate_retrieval` 'd1_first': Search-only marker indicating that deterministic filters and broad query matching ran in D1 before TypeScript ranking.
    - `candidate_count` integer: Number of D1 search candidates passed to the authoritative TypeScript filter and ranking stage.
    - `candidate_limit` integer: Maximum number of D1 search candidates passed to the ranking stage.
    - `warnings` string[]: Fallback, count, freshness, or trust caveats that agents should account for before citing results.

---

[API](https://skmtc.dev/git/apis/git-top-agent-api.md) · [All operations](https://skmtc.dev/git/apis/git-top-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/git/apis/git-top-agent-api/revisions/c9ebf661ef6d?raw)
