docgrity 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/README.md +109 -126
  2. package/{action/action.yml → action.yml} +4 -1
  3. package/{action/bin → bin}/action.js +12 -6
  4. package/{action/bin → bin}/docgrity.js +23 -9
  5. package/package.json +31 -164
  6. package/src/heuristics.js +146 -0
  7. package/{action/src → src}/issues.js +4 -1
  8. package/{action/src → src}/report.js +2 -1
  9. package/{action/src → src}/scan.js +32 -7
  10. package/.github/workflows/ci.yml +0 -54
  11. package/.vscodeignore +0 -13
  12. package/action/LICENSE +0 -21
  13. package/action/README.md +0 -104
  14. package/action/examples/docgrity.yml +0 -61
  15. package/action/package.json +0 -38
  16. package/action/test/corpus.test.mjs +0 -59
  17. package/action/test/issues.test.mjs +0 -89
  18. package/action/test/report.test.mjs +0 -76
  19. package/docgrity_logo.png +0 -0
  20. package/image.png +0 -0
  21. package/media/icon.png +0 -0
  22. package/media/icon.svg +0 -5
  23. package/samples/api-limits.md +0 -23
  24. package/samples/architecture-notes.md +0 -28
  25. package/samples/deployment-guide.md +0 -23
  26. package/samples/integration-guide.md +0 -21
  27. package/samples/release-process.md +0 -23
  28. package/src/agents/assess.ts +0 -187
  29. package/src/agents/prompts.ts +0 -94
  30. package/src/agents/selectModel.ts +0 -50
  31. package/src/core/json.ts +0 -58
  32. package/src/core/prefilter.ts +0 -56
  33. package/src/core/slug.ts +0 -10
  34. package/src/core/verify.ts +0 -15
  35. package/src/extension.ts +0 -142
  36. package/src/findings/diagnostics.ts +0 -78
  37. package/src/findings/report.ts +0 -68
  38. package/src/findings/store.ts +0 -60
  39. package/src/findings/tree.ts +0 -93
  40. package/src/github/issues.ts +0 -90
  41. package/src/github/owners.ts +0 -60
  42. package/src/log.ts +0 -22
  43. package/src/scanner/candidates.ts +0 -62
  44. package/src/scanner/corpus.ts +0 -75
  45. package/src/scanner/scan.ts +0 -215
  46. package/test/candidates.test.ts +0 -63
  47. package/test/json.test.ts +0 -87
  48. package/test/prefilter.test.ts +0 -65
  49. package/test/slug.test.ts +0 -31
  50. package/test/verify.test.ts +0 -47
  51. package/tsconfig.json +0 -15
  52. package/vitest.config.mts +0 -9
  53. /package/{action/src → src}/corpus.js +0 -0
  54. /package/{action/src → src}/llm.js +0 -0
  55. /package/{action/src → src}/prompts.js +0 -0
package/README.md CHANGED
@@ -1,151 +1,134 @@
1
- # Docgrity for VS Code
1
+ # Docgrity Action & CLI
2
2
 
3
- [![VS Code Marketplace](https://img.shields.io/visual-studio-marketplace/v/ujjavala.docgrity?label=VS%20Code%20Marketplace)](https://marketplace.visualstudio.com/items?itemName=ujjavala.docgrity)
4
- [![CI](https://github.com/ujjavala/docgrity-vscode/actions/workflows/ci.yml/badge.svg)](https://github.com/ujjavala/docgrity-vscode/actions/workflows/ci.yml)
3
+ **Continuous doc-integrity for your repo's markdown: contradictions, duplicates and open
4
+ questions — as a GitHub Action (with deduplicated issues) and a read-only local CLI.**
5
5
 
6
- **Find where your repository's docs disagree with themselves — and raise a GitHub issue to get it fixed.**
6
+ Part of the Docgrity family:
7
7
 
8
- **Install:** search “Docgrity” in the Extensions view, or `code --install-extension ujjavala.docgrity`
8
+ | Surface | Job | Acts? |
9
+ |---|---|---|
10
+ | [Confluence app](https://ujjavala.github.io/docgrity-site/) | wiki integrity | comments (human-approved) |
11
+ | VS Code extension | interactive repo-doc scans | raises issues (human-approved) |
12
+ | **This Action** | continuous CI enforcement | issues (opt-in, deduped, capped) + report |
13
+ | **This CLI** | local observation | **read-only** — report dashboard only |
14
+
15
+ ## GitHub Action
16
+
17
+ ```yaml
18
+ - uses: ujjavala/docgrity-vscode/action@main
19
+ env:
20
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # for issue creation
21
+ with:
22
+ provider: anthropic # or openai / gemini / ollama
23
+ api_key: ${{ secrets.DOCGRITY_API_KEY }}
24
+ create_issues: 'true' # opt-in; default false
25
+ max_new_issues: 5
26
+ ```
9
27
 
10
- The repo-docs sibling of the [Docgrity Confluence app](https://ujjavala.github.io/docgrity-site/).
11
- Scoped deliberately: **markdown files only** (`**/*.md` READMEs, ADRs, runbooks, guides).
28
+ > **Note:** GitHub Models (`provider: github-models`) is being retired by GitHub
29
+ > runs may fail with HTTP 410 (`github_models_retirement`). Use a BYO-key provider
30
+ > (`anthropic` / `openai` / `gemini`) or `ollama` instead. Copilot models are **not**
31
+ > available here: Copilot has no API outside the editor — only the VS Code extension
32
+ > can use it.
12
33
 
13
- This repo contains all three repo-docs surfaces:
34
+ Full example with weekly schedule, PR trigger and Pages report publishing:
35
+ [examples/docgrity.yml](examples/docgrity.yml).
14
36
 
15
- | Surface | Where | Acts? |
16
- |---|---|---|
17
- | **VS Code extension** (this root) | interactive scans in the editor | raises issues, human-approved one at a time |
18
- | **GitHub Action** ([action/](action/)) | CI: schedule + PRs | opt-in deduped issues, job summary, HTML report |
19
- | **Local CLI** ([action/bin/docgrity.js](action/bin/docgrity.js)) | your terminal | **read-only** report dashboard, no actions |
20
-
21
- See [action/README.md](action/README.md) for Action and CLI usage
22
- (`uses: ujjavala/docgrity-vscode/action@main`).
23
-
24
- ## What it does
25
-
26
- 1. **Scan** — `Docgrity: Scan repository docs` collects your markdown files, picks
27
- candidate pairs locally with TF-IDF (no network), then asks the LLM to assess:
28
- - **Contradictions** — conflicting factual claims across two docs
29
- - **Duplicates** — substantially overlapping docs that should be merged
30
- - **Open questions** — unresolved TBD/TODO/"who owns this?" buried in docs
31
- 2. **Review** — findings appear in the Docgrity view with evidence excerpts; each
32
- excerpt is a click away from the exact spot in the file, and shows as a
33
- diagnostic squiggle. Every finding records the model + prompt version.
34
- 3. **Act** — right-click a finding → **Raise GitHub issue**. Docgrity drafts the
35
- issue (title, evidence, suggested next step, *potential* owner from git history),
36
- shows you the draft, and only creates it after you approve. The issue is labelled
37
- `docgrity` and `docgrity:<type>`.
38
-
39
- ## Zero cost, zero keys
40
-
41
- - All LLM calls go through **your own GitHub Copilot subscription** via the VS Code
42
- Language Model API. No API keys, no servers, no telemetry.
43
- - Issue creation uses VS Code's built-in GitHub sign-in.
44
- - Candidate selection is local TF-IDF — the LLM only sees the top pairs.
45
-
46
- ## Modes: report-only vs report + issues
47
-
48
- | `docgrity.mode` | Behaviour |
49
- |---|---|
50
- | `report-and-issue` (default) | Scan, review findings, and raise GitHub issues — each previewed and human-approved. |
51
- | `report-only` | Scan and review only. The *Raise GitHub issue* action is hidden and blocked — the extension is guaranteed to never post anywhere. Good for client repos, compliance-sensitive environments, or just reading. |
52
-
53
- Set it in Settings → search “docgrity mode”, or in `.vscode/settings.json`:
54
-
55
- ```json
56
- { "docgrity.mode": "report-only" }
57
- ```
37
+ What it does per run:
38
+
39
+ 1. Collects markdown docs (`**/*.md`, capped), selects candidate pairs locally (TF-IDF),
40
+ assesses with the LLM using versioned prompts and typed-JSON validation, verifies
41
+ every evidence excerpt verbatim against the source (hallucination guard).
42
+ 2. Writes a **job summary** table and a **static HTML report** (`docgrity-report/`)
43
+ with evidence, links to docs on GitHub, and *potential* owners from git history.
44
+ 3. **Opt-in** (`create_issues: true`): syncs GitHub issues **deduplicated by a stable
45
+ finding fingerprint** — new findings create issues (capped per run), unchanged ones
46
+ are left alone, resolved ones are auto-closed with a comment. Labels: `docgrity`,
47
+ `docgrity:<type>`.
58
48
 
59
- Per-workspace settings win over user settings, so you can default to report-only
60
- globally and enable issues only in repos you own.
49
+ ### Providers
61
50
 
62
- ## Choosing which checks run
51
+ | provider | key | cost |
52
+ |---|---|---|
53
+ | `anthropic` / `openai` / `gemini` | `api_key` input (use a repo secret) — defaults: `claude-3-5-haiku-latest`, `gpt-4o-mini`, `gemini-flash` | your key |
54
+ | `ollama` (CLI default) | none — local or tunnelled endpoint | free, fully private |
55
+ | `none` (no-agent mode) | none — zero LLM calls | free, instant, fully offline |
56
+ | `github-models` | none — uses `GITHUB_TOKEN` with `models: read` | **being retired by GitHub** (HTTP 410) — switch to a provider above |
63
57
 
64
- Each check is a separate toggle — run any combination:
58
+ ### No-agent mode (`provider: none`)
65
59
 
66
- | Setting | Default | What it does |
60
+ Pure algorithms, no model, no keys, no network:
61
+
62
+ | Check | How | Notes |
67
63
  |---|---|---|
68
- | `docgrity.checks.duplicates` | `true` | Pairwise duplicate detection |
69
- | `docgrity.checks.contradictions` | `true` | Pairwise contradiction detection |
70
- | `docgrity.checks.openQuestions` | `true` | Per-doc unresolved-question detection |
64
+ | **Duplicates** | verbatim shared-block detection + TF-IDF similarity | catches copy-paste duplication; paraphrased duplication needs AI |
65
+ | **Open questions** | explicit markers (`TODO`, `TBD`, `FIXME`, `???`, "open question"…) | deterministic high confidence; subtle unanswered questions need AI |
66
+ | **Contradictions** | **requires AI intelligence** (semantic understanding) — skipped, and the report says so | never guessed at heuristically |
71
67
 
72
- These combine freely with any model (`docgrity.model.*`) and either mode
73
- (`docgrity.mode`). Disabling checks also speeds up scans: pair selection is
74
- skipped entirely when both pairwise checks are off.
68
+ Confidence is *measured*, not guessed: duplicate confidence comes from the
69
+ actual verbatim-overlap ratio; marker-based open questions score 0.85–0.95.
70
+ Tuned for precision paraphrased text, shared code samples and boilerplate
71
+ headings never fire. Evidence is verbatim by construction. Findings carry
72
+ `method: heuristic`, and issue drafts use a deterministic template.
75
73
 
76
- ## Scan performance
74
+ Great as a zero-setup PR pre-check (heuristics on every PR, full AI scan weekly)
75
+ or when no key/model is available.
77
76
 
78
- - When both pairwise checks are enabled they run as a **single combined LLM
79
- call per pair** (the model reads each pair once, not twice).
80
- - Docs with no open-question signals (no TODO/TBD/`???`/unanswered questions)
81
- are **pre-filtered out** before any LLM call.
82
- - Assessments run with **bounded concurrency** (4 at a time).
83
- - For large repos, tune `docgrity.maxFiles`, `docgrity.maxPairs`, and
84
- `docgrity.include` to narrow the corpus.
77
+ ## Local CLI (read-only)
85
78
 
86
- ## Choosing your model (Copilot, Claude, GPT, local llama…)
79
+ ```bash
80
+ npm i -g docgrity
81
+ docgrity scan --open
82
+ ```
87
83
 
88
- Run **`Docgrity: Select AI model`** from the command palette — it lists every model
89
- VS Code exposes and saves your choice. Or set it manually:
84
+ or without installing: `npx docgrity scan --open` (from a repo checkout:
85
+ `npx github:ujjavala/docgrity-vscode scan --open`).
90
86
 
91
- | Setting | Meaning | Default |
92
- |---|---|---|
93
- | `docgrity.model.vendor` | `vscode.lm` vendor id (`copilot` covers Copilot + BYOK models; empty = any) | `copilot` |
94
- | `docgrity.model.family` | preferred model family, e.g. `gpt-4o`, `claude-sonnet-4.5`, `llama3.1` (empty = first available) | `""` |
95
-
96
- **Options, in order of simplicity:**
97
-
98
- 1. **Copilot (default)** — sign in to GitHub Copilot; nothing to configure.
99
- 2. **Claude / GPT / Gemini via Copilot** — any model enabled in Copilot's model picker
100
- is available; set `docgrity.model.family` (e.g. `claude-sonnet-4.5`) or use
101
- *Select AI model*.
102
- 3. **Local Ollama**install [Ollama](https://ollama.com), `ollama pull llama3.1`,
103
- then in Copilot Chat **Manage models** → add the Ollama model. It registers under
104
- the `copilot` vendor; pick it with *Select AI model*. Fully local — no doc content
105
- leaves your machine.
106
- 4. **Remote Ollama over a Cloudflare Tunnel** — if your model runs on another box
107
- (home server, GPU rig):
108
- ```bash
109
- # on the machine running Ollama
110
- cloudflared tunnel --url http://localhost:11434
111
- ```
112
- Point Copilot's Manage models → Ollama endpoint at the generated
113
- `https://….trycloudflare.com` URL. Note: quick tunnels get a **new URL on every
114
- restart** — re-update the endpoint each time, or create a **named tunnel** with your
115
- own domain for a stable URL (`cloudflared tunnel create …`). Protect a named tunnel
116
- with Cloudflare Access — an open LLM endpoint is abusable.
117
-
118
- Small local models fail Docgrity's strict-JSON validation more often than hosted
119
- ones; failed responses are rejected safely (never mis-recorded) — expect fewer
120
- findings rather than wrong ones. 8B+ instruct models work best.
121
-
122
- ## Design principles (shared with the Forge app)
123
-
124
- - Typed JSON outputs only — model responses are validated in code, never trusted prose.
125
- - Every finding requires verbatim evidence, verified against the source file
126
- (hallucinated quotes are dropped).
127
- - Ownership is always *potential* (last git author), never asserted.
128
- - Nothing is posted anywhere without explicit human approval.
129
- - Doc content is untrusted input — it cannot override agent instructions.
87
+ Runs the same scan locally and opens the **report dashboard**: findings, evidence,
88
+ doc links and potential owners. **The CLI never raises issues or takes any action** —
89
+ by design, local scans observe; only CI (explicitly opted in) acts.
90
+
91
+ ```
92
+ Usage: docgrity scan [options]
93
+
94
+ --dir <path> Directory to scan (default: .)
95
+ --out <path> Report output directory (default: docgrity-report)
96
+ --open Open the HTML report when done
97
+
98
+ --checks <list> duplicates, contradictions, open-questions any combination
99
+ --max-files <n> Max markdown files (default: 200)
100
+ --max-pairs <n> Max document pairs (default: 25)
101
+ --threshold-duplicate / --threshold-contradiction / --threshold-open-question <0..1>
130
102
 
131
- ## Requirements
103
+ --provider <p> none | ollama | gemini | openai | anthropic | github-models
104
+ (none = no-agent mode: algorithms only, contradictions skipped)
105
+ --model <m> Model name
106
+ --endpoint <url> Ollama endpoint (default http://localhost:11434)
132
107
 
133
- - VS Code 1.95+, an active GitHub Copilot subscription, a workspace with a GitHub
134
- `origin` remote (for issue creation).
108
+ --version, -v Installed version + latest on npm
109
+ --help, -h Full help
110
+ ```
111
+
112
+ Provider auto-detection: `DOCGRITY_API_KEY` set → `gemini`; else `GITHUB_TOKEN` →
113
+ `github-models` (retiring — pass `--provider` explicitly); else → `ollama` (local,
114
+ fully private — nothing leaves your machine).
135
115
 
136
- ## Development
116
+ Examples:
137
117
 
138
118
  ```bash
139
- npm install
140
- npm run compile
141
- # F5 in VS Code to launch the Extension Development Host
119
+ docgrity scan --provider none --open # no-agent: no model, no keys
120
+ docgrity scan --checks contradictions # one check only
121
+ docgrity scan --checks duplicates,open-questions --max-pairs 10
122
+ docgrity scan --provider ollama --model llama3.1:8b # fully local
123
+ DOCGRITY_API_KEY=... docgrity scan --provider gemini --open
142
124
  ```
143
125
 
144
- ## Settings
126
+ ## Design principles (shared across all Docgrity surfaces)
145
127
 
146
- | Setting | Default | Purpose |
147
- |---|---|---|
148
- | `docgrity.include` | `**/*.md` | Docs glob (markdown only by design) |
149
- | `docgrity.exclude` | `**/{node_modules,…}/**` | Excluded paths |
150
- | `docgrity.maxFiles` / `docgrity.maxPairs` | 200 / 25 | Scan caps |
151
- | `docgrity.thresholds.*` | 0.75 / 0.7 / 0.6 | Confidence gates per finding type |
128
+ - Typed JSON outputs only; model responses validated in code.
129
+ - Every finding requires verbatim evidence, verified against the source file.
130
+ - Ownership is always *potential* (last git author), never asserted.
131
+ - Action-taking is opt-in, capped, and auditable (issue trailer records model +
132
+ prompt version + fingerprint).
133
+ - Doc content is untrusted input it cannot override agent instructions.
134
+ - Zero dependencies; plain Node 20+ ESM.
@@ -8,7 +8,10 @@ branding:
8
8
  color: 'blue'
9
9
  inputs:
10
10
  provider:
11
- description: 'LLM provider: github-models (default, uses GITHUB_TOKEN), gemini, openai, anthropic'
11
+ description: >-
12
+ LLM provider: anthropic, openai, gemini (api_key required), ollama, github-models
13
+ (retiring), or "none" for no-agent mode — heuristic duplicates + open questions
14
+ only; contradiction detection requires an AI model and is skipped.
12
15
  default: 'github-models'
13
16
  api_key:
14
17
  description: 'API key for gemini/openai/anthropic (pass a repo secret). Not needed for github-models.'
@@ -18,13 +18,19 @@ const slug = process.env.GITHUB_REPOSITORY ?? '';
18
18
  const branch = (process.env.GITHUB_REF_NAME ?? 'main').replace(/^refs\/heads\//, '');
19
19
 
20
20
  try {
21
- const client = makeClient({
22
- provider: input('provider', 'github-models'),
23
- apiKey: input('api_key'),
24
- githubToken: token,
25
- });
21
+ const provider = input('provider', 'github-models');
22
+ // provider: none → no-agent mode: heuristic duplicates + open questions,
23
+ // contradictions skipped (they need AI), template-drafted issues.
24
+ const client =
25
+ provider === 'none'
26
+ ? null
27
+ : makeClient({
28
+ provider,
29
+ apiKey: input('api_key'),
30
+ githubToken: token,
31
+ });
26
32
 
27
- console.log(`Docgrity scan on ${slug} (${branch})`);
33
+ console.log(`Docgrity scan on ${slug} (${branch})${provider === 'none' ? ' — no-agent (heuristic) mode' : ''}`);
28
34
  const { findings, stats } = await runScan(root, { client, log: (m) => console.log(m) });
29
35
 
30
36
  // Opt-in issue sync (deduped by fingerprint, capped, auto-close resolved).
@@ -54,8 +54,12 @@ Options:
54
54
  --threshold-contradiction <0..1> Min confidence, contradictions (default: 0.7)
55
55
  --threshold-open-question <0..1> Min confidence, open questions (default: 0.6)
56
56
 
57
- --provider <p> ollama | gemini | openai | anthropic | github-models
57
+ --provider <p> none | ollama | gemini | openai | anthropic | github-models
58
58
  (default: auto — see below)
59
+ none = no-agent mode: pure algorithms, zero LLM calls.
60
+ Detects duplicates (verbatim shared blocks + TF-IDF)
61
+ and open questions (TODO/TBD/FIXME/???… markers).
62
+ Contradictions REQUIRE an AI model and are skipped.
59
63
  --model <m> Model name (provider-specific default otherwise)
60
64
  --endpoint <url> Ollama endpoint (default: http://localhost:11434,
61
65
  or DOCGRITY_OLLAMA_URL; supports tunnelled remotes)
@@ -74,6 +78,7 @@ Provider auto-detection (when --provider is omitted):
74
78
 
75
79
  Examples:
76
80
  docgrity scan --open
81
+ docgrity scan --provider none # no-agent: no model, no keys, instant
77
82
  docgrity scan --checks contradictions
78
83
  docgrity scan --checks duplicates,open-questions --max-pairs 10
79
84
  docgrity scan --provider ollama --model llama3.1:8b
@@ -148,16 +153,22 @@ const provider =
148
153
  const checks = parseChecks(args.checks);
149
154
 
150
155
  try {
151
- const client = makeClient({
152
- provider,
153
- apiKey: process.env.DOCGRITY_API_KEY,
154
- githubToken: process.env.GITHUB_TOKEN || process.env.GH_TOKEN,
155
- model: args.model,
156
- endpoint: args.endpoint,
157
- });
156
+ const client =
157
+ provider === 'none'
158
+ ? null
159
+ : makeClient({
160
+ provider,
161
+ apiKey: process.env.DOCGRITY_API_KEY,
162
+ githubToken: process.env.GITHUB_TOKEN || process.env.GH_TOKEN,
163
+ model: args.model,
164
+ endpoint: args.endpoint,
165
+ });
158
166
 
159
167
  const enabled = Object.entries(checks).filter(([, on]) => on).map(([k]) => k).join(', ');
160
- console.log(`Docgrity local scan (read-only) — provider: ${provider}; checks: ${enabled}`);
168
+ console.log(`Docgrity local scan (read-only) — provider: ${provider}${provider === 'none' ? ' (no-agent, heuristics only)' : ''}; checks: ${enabled}`);
169
+ if (provider === 'none' && checks.contradictions) {
170
+ console.log(' Note: contradiction detection needs AI intelligence — it will be skipped. Use an LLM provider to enable it.');
171
+ }
161
172
  const { findings, stats } = await runScan(root, {
162
173
  client,
163
174
  checks,
@@ -181,6 +192,9 @@ try {
181
192
  await writeFile(path.join(outDir, 'findings.json'), JSON.stringify({ findings, stats }, null, 2));
182
193
 
183
194
  console.log(`\n${findings.length} finding(s) across ${stats.docs} docs.`);
195
+ for (const f of findings) {
196
+ console.log(` [${f.severity}] ${f.type} — ${(f.confidence * 100).toFixed(0)}% confidence — ${f.files.join(' + ')}`);
197
+ }
184
198
  console.log(`Report: ${reportPath}`);
185
199
  console.log('Note: local scans are read-only — review owners and evidence in the report; issues are only raised by CI (opt-in).');
186
200
 
package/package.json CHANGED
@@ -1,171 +1,38 @@
1
1
  {
2
2
  "name": "docgrity",
3
- "displayName": "Docgrity — Doc Integrity for Repos",
4
- "description": "Finds contradictions, duplicates and open questions across your repository's markdown docs, and raises GitHub issues to get them fixed. Uses your own Copilot subscription no keys, no servers.",
5
- "version": "0.1.2",
6
- "publisher": "ujjavala",
3
+ "version": "0.1.4",
4
+ "description": "Docgrity doc-integrity scans for CI and local use: contradictions, duplicates and open questions across repository markdown docs. Read-only CLI generates an HTML report; never posts anything.",
5
+ "type": "module",
6
+ "bin": { "docgrity": "bin/docgrity.js" },
7
+ "files": [
8
+ "bin/",
9
+ "src/",
10
+ "action.yml",
11
+ "README.md",
12
+ "LICENSE"
13
+ ],
14
+ "engines": { "node": ">=20" },
15
+ "scripts": {
16
+ "scan": "node bin/docgrity.js scan",
17
+ "test": "node --test \"test/*.test.mjs\""
18
+ },
7
19
  "repository": {
8
20
  "type": "git",
9
- "url": "https://github.com/ujjavala/docgrity-vscode"
10
- },
11
- "bin": {
12
- "docgrity": "action/bin/docgrity.js"
21
+ "url": "git+https://github.com/ujjavala/docgrity-vscode.git",
22
+ "directory": "action"
13
23
  },
14
- "icon": "media/icon.png",
15
- "engines": {
16
- "vscode": "^1.95.0"
17
- },
18
- "categories": [
19
- "AI",
20
- "Linters",
21
- "Other"
24
+ "homepage": "https://ujjavala.github.io/docgrity-vscode-site/",
25
+ "bugs": "https://github.com/ujjavala/docgrity-vscode/issues",
26
+ "keywords": [
27
+ "documentation",
28
+ "markdown",
29
+ "lint",
30
+ "contradiction",
31
+ "duplicate",
32
+ "llm",
33
+ "cli",
34
+ "github-action"
22
35
  ],
23
- "main": "./out/extension.js",
24
- "activationEvents": [],
25
- "contributes": {
26
- "commands": [
27
- {
28
- "command": "docgrity.scan",
29
- "title": "Docgrity: Scan repository docs"
30
- },
31
- {
32
- "command": "docgrity.selectModel",
33
- "title": "Docgrity: Select AI model (Copilot / Claude / local…)"
34
- },
35
- {
36
- "command": "docgrity.raiseIssue",
37
- "title": "Docgrity: Raise GitHub issue for finding"
38
- },
39
- {
40
- "command": "docgrity.openReport",
41
- "title": "Docgrity: Open findings report (markdown)"
42
- },
43
- {
44
- "command": "docgrity.clearFindings",
45
- "title": "Docgrity: Clear findings"
46
- }
47
- ],
48
- "viewsContainers": {
49
- "activitybar": [
50
- {
51
- "id": "docgrity",
52
- "title": "Docgrity",
53
- "icon": "media/icon.svg"
54
- }
55
- ]
56
- },
57
- "views": {
58
- "docgrity": [
59
- {
60
- "id": "docgrity.findings",
61
- "name": "Findings"
62
- }
63
- ]
64
- },
65
- "menus": {
66
- "view/item/context": [
67
- {
68
- "command": "docgrity.raiseIssue",
69
- "when": "view == docgrity.findings && viewItem == finding && docgrity.issuesEnabled"
70
- }
71
- ],
72
- "commandPalette": [
73
- {
74
- "command": "docgrity.raiseIssue",
75
- "when": "docgrity.issuesEnabled"
76
- }
77
- ]
78
- },
79
- "configuration": {
80
- "title": "Docgrity",
81
- "properties": {
82
- "docgrity.mode": {
83
- "type": "string",
84
- "enum": [
85
- "report-only",
86
- "report-and-issue"
87
- ],
88
- "enumDescriptions": [
89
- "Scan and show findings in the editor only. The 'Raise GitHub issue' action is hidden — nothing can be posted anywhere.",
90
- "Scan, show findings, and allow raising GitHub issues (each one previewed and human-approved before posting)."
91
- ],
92
- "default": "report-and-issue",
93
- "description": "What Docgrity is allowed to do. 'report-only' guarantees the extension never posts anything."
94
- },
95
- "docgrity.checks.duplicates": {
96
- "type": "boolean",
97
- "default": true,
98
- "description": "Check document pairs for duplicates (docs that should be merged)."
99
- },
100
- "docgrity.checks.contradictions": {
101
- "type": "boolean",
102
- "default": true,
103
- "description": "Check document pairs for contradictions (conflicting factual claims)."
104
- },
105
- "docgrity.checks.openQuestions": {
106
- "type": "boolean",
107
- "default": true,
108
- "description": "Check each document for unresolved open questions (TBDs, TODOs, unanswered questions)."
109
- },
110
- "docgrity.include": {
111
- "type": "string",
112
- "default": "**/*.md",
113
- "description": "Glob for documents to scan (markdown only by design)."
114
- },
115
- "docgrity.exclude": {
116
- "type": "string",
117
- "default": "",
118
- "description": "Additional glob for paths to exclude from scans. node_modules, dist, build, vendor etc. and anything in .gitignore are always excluded."
119
- },
120
- "docgrity.maxFiles": {
121
- "type": "number",
122
- "default": 200,
123
- "description": "Maximum number of markdown files per scan."
124
- },
125
- "docgrity.maxPairs": {
126
- "type": "number",
127
- "default": 25,
128
- "description": "Maximum candidate document pairs assessed per scan."
129
- },
130
- "docgrity.model.vendor": {
131
- "type": "string",
132
- "default": "copilot",
133
- "description": "Language model vendor to use via vscode.lm. 'copilot' covers Copilot models and Ollama models added through Copilot Chat's 'Manage models'. Set to another provider's vendor id, or empty for any available model."
134
- },
135
- "docgrity.model.family": {
136
- "type": "string",
137
- "default": "",
138
- "description": "Preferred model family (e.g. 'gpt-4o', 'llama3.1'). Empty = first available model from the vendor."
139
- },
140
- "docgrity.thresholds.duplicate": {
141
- "type": "number",
142
- "default": 0.75,
143
- "description": "Minimum confidence to record a duplicate finding."
144
- },
145
- "docgrity.thresholds.contradiction": {
146
- "type": "number",
147
- "default": 0.7,
148
- "description": "Minimum confidence to record a contradiction finding."
149
- },
150
- "docgrity.thresholds.openQuestion": {
151
- "type": "number",
152
- "default": 0.6,
153
- "description": "Minimum confidence to record an open-question finding."
154
- }
155
- }
156
- }
157
- },
158
- "scripts": {
159
- "compile": "tsc -p ./",
160
- "watch": "tsc -watch -p ./",
161
- "test": "vitest run",
162
- "test:watch": "vitest",
163
- "vscode:prepublish": "npm run compile"
164
- },
165
- "devDependencies": {
166
- "@types/node": "^22.0.0",
167
- "@types/vscode": "^1.95.0",
168
- "typescript": "^5.6.0",
169
- "vitest": "^3.2.7"
170
- }
36
+ "author": "ujjavala",
37
+ "license": "MIT"
171
38
  }