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.
- package/README.md +109 -126
- package/{action/action.yml → action.yml} +4 -1
- package/{action/bin → bin}/action.js +12 -6
- package/{action/bin → bin}/docgrity.js +23 -9
- package/package.json +31 -164
- package/src/heuristics.js +146 -0
- package/{action/src → src}/issues.js +4 -1
- package/{action/src → src}/report.js +2 -1
- package/{action/src → src}/scan.js +32 -7
- package/.github/workflows/ci.yml +0 -54
- package/.vscodeignore +0 -13
- package/action/LICENSE +0 -21
- package/action/README.md +0 -104
- package/action/examples/docgrity.yml +0 -61
- package/action/package.json +0 -38
- package/action/test/corpus.test.mjs +0 -59
- package/action/test/issues.test.mjs +0 -89
- package/action/test/report.test.mjs +0 -76
- package/docgrity_logo.png +0 -0
- package/image.png +0 -0
- package/media/icon.png +0 -0
- package/media/icon.svg +0 -5
- package/samples/api-limits.md +0 -23
- package/samples/architecture-notes.md +0 -28
- package/samples/deployment-guide.md +0 -23
- package/samples/integration-guide.md +0 -21
- package/samples/release-process.md +0 -23
- package/src/agents/assess.ts +0 -187
- package/src/agents/prompts.ts +0 -94
- package/src/agents/selectModel.ts +0 -50
- package/src/core/json.ts +0 -58
- package/src/core/prefilter.ts +0 -56
- package/src/core/slug.ts +0 -10
- package/src/core/verify.ts +0 -15
- package/src/extension.ts +0 -142
- package/src/findings/diagnostics.ts +0 -78
- package/src/findings/report.ts +0 -68
- package/src/findings/store.ts +0 -60
- package/src/findings/tree.ts +0 -93
- package/src/github/issues.ts +0 -90
- package/src/github/owners.ts +0 -60
- package/src/log.ts +0 -22
- package/src/scanner/candidates.ts +0 -62
- package/src/scanner/corpus.ts +0 -75
- package/src/scanner/scan.ts +0 -215
- package/test/candidates.test.ts +0 -63
- package/test/json.test.ts +0 -87
- package/test/prefilter.test.ts +0 -65
- package/test/slug.test.ts +0 -31
- package/test/verify.test.ts +0 -47
- package/tsconfig.json +0 -15
- package/vitest.config.mts +0 -9
- /package/{action/src → src}/corpus.js +0 -0
- /package/{action/src → src}/llm.js +0 -0
- /package/{action/src → src}/prompts.js +0 -0
package/README.md
CHANGED
|
@@ -1,151 +1,134 @@
|
|
|
1
|
-
# Docgrity
|
|
1
|
+
# Docgrity Action & CLI
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
6
|
+
Part of the Docgrity family:
|
|
7
7
|
|
|
8
|
-
|
|
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
|
-
|
|
11
|
-
|
|
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
|
-
|
|
34
|
+
Full example with weekly schedule, PR trigger and Pages report publishing:
|
|
35
|
+
[examples/docgrity.yml](examples/docgrity.yml).
|
|
14
36
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
(`
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
60
|
-
globally and enable issues only in repos you own.
|
|
49
|
+
### Providers
|
|
61
50
|
|
|
62
|
-
|
|
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
|
-
|
|
58
|
+
### No-agent mode (`provider: none`)
|
|
65
59
|
|
|
66
|
-
|
|
60
|
+
Pure algorithms, no model, no keys, no network:
|
|
61
|
+
|
|
62
|
+
| Check | How | Notes |
|
|
67
63
|
|---|---|---|
|
|
68
|
-
|
|
|
69
|
-
|
|
|
70
|
-
|
|
|
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
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
79
|
+
```bash
|
|
80
|
+
npm i -g docgrity
|
|
81
|
+
docgrity scan --open
|
|
82
|
+
```
|
|
87
83
|
|
|
88
|
-
|
|
89
|
-
|
|
84
|
+
or without installing: `npx docgrity scan --open` (from a repo checkout:
|
|
85
|
+
`npx github:ujjavala/docgrity-vscode scan --open`).
|
|
90
86
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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
|
-
|
|
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
|
-
-
|
|
134
|
-
|
|
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
|
-
|
|
116
|
+
Examples:
|
|
137
117
|
|
|
138
118
|
```bash
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
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
|
-
##
|
|
126
|
+
## Design principles (shared across all Docgrity surfaces)
|
|
145
127
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
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:
|
|
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
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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 =
|
|
152
|
-
provider
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
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
|
-
"
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
6
|
-
"
|
|
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
|
-
"
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
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
|
-
"
|
|
24
|
-
"
|
|
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
|
}
|