← docgrity home

How it works

Last updated: 6 September 2026

The pipeline

  1. Collect — repo markdown (**/*.md, capped at 200 files). node_modules, build output and git-ignored files always excluded.
  2. Pair locally — candidate pairs via local TF-IDF cosine similarity. Deterministic, instant, free — no AI at this stage.
  3. Assess — only the top pairs (25 default) hit the model via vscode.lm (your Copilot or a local model). Duplicate + contradiction share one call per pair; open-question checks pre-filter for signals first.
  4. Validate — strict-JSON schema or rejected; every evidence excerpt verified verbatim against your files (hallucination guard).
  5. Show — activity-bar view, Problems-panel squiggles on the exact evidence, an interactive dashboard, and a markdown report. Every finding records model, prompt version and confidence.
  6. Act, with approval — right-click → Raise GitHub issue. A drafted title/body (evidence, next step, potential owner from git log) is shown in a modal; nothing posts until you click Create issue.

Modes & checks

Choosing your model

Easiest: run Docgrity: Select AI model from the command palette. Manual: docgrity.model.vendor / docgrity.model.family.

OptionSetupPrivacy
GitHub Copilot (default)Sign in — nothing to configure. Any model in Copilot's picker (Claude, GPT, Gemini) works.Your Copilot subscription's terms
Local Ollamaollama pull llama3.1, then Copilot Chat → Manage models → add it; select with Select AI model.Nothing leaves your machine
Remote Ollamacloudflared tunnel --url http://localhost:11434, point Manage models at the tunnel URL. Quick tunnels change URL on restart — use a named tunnel + Cloudflare Access for stability and safety.Your own infra
Other extensionsAny extension registering vscode.lm models — set its vendor id.Per provider

Outside the editor — CLI & Action

Copilot only exists inside VS Code, so the CLI/Action use direct providers: ollama (default, keyless, private) · anthropic / openai / gemini (BYO key: api_key: ${{ secrets.DOCGRITY_API_KEY }}) · github-models (retiring — on HTTP 410, switch provider). Summary: Copilot keyless in the editor · Ollama keyless everywhere · BYO key for hosted models in CI.

No-agent mode — no AI at all

Pure algorithms, fully offline. Extension: docgrity.engine: no-agent. CLI: docgrity scan --provider none. Action: provider: none.

CheckNo-agent behaviour
DuplicatesVerbatim shared-block detection + TF-IDF. Confidence is measured (actual overlap); paraphrased duplication needs AI.
Open questionsExplicit markers (TODO, TBD, FIXME, ???, "open question"…) — deterministic, high confidence.
ContradictionsRequire AI intelligence — skipped and clearly noted. Never guessed at heuristically.

Evidence stays verbatim, owners come from git history, findings are marked method: heuristic, and confidence is shown on every surface — squiggles, tree, reports, CLI output and issue bodies.

Model quality note: prompts demand strict JSON with verbatim evidence. Small local models (<8B) fail validation more often — failed responses are rejected safely: fewer findings, never corrupted ones. Recommended local minimum: llama3.1:8b.

Cost, security & troubleshooting

← Back to home