@neuralaxis/vibedoctor 0.1.1 → 0.1.3

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 (75) hide show
  1. package/README.md +219 -290
  2. package/dist/adapters/biome.d.ts +1 -1
  3. package/dist/adapters/biome.js +7 -4
  4. package/dist/adapters/coveragePy.js +3 -0
  5. package/dist/adapters/customDeadChain.d.ts +2 -1
  6. package/dist/adapters/customDeadChain.js +100 -8
  7. package/dist/adapters/customLeftovers.js +33 -10
  8. package/dist/adapters/deptry.js +21 -2
  9. package/dist/adapters/index.d.ts +3 -0
  10. package/dist/adapters/index.js +7 -1
  11. package/dist/adapters/jscpd.d.ts +1 -0
  12. package/dist/adapters/jscpd.js +10 -1
  13. package/dist/adapters/knip.js +29 -4
  14. package/dist/adapters/lizard.d.ts +1 -1
  15. package/dist/adapters/lizard.js +51 -2
  16. package/dist/adapters/osvScanner.js +14 -2
  17. package/dist/adapters/presidio.d.ts +2 -0
  18. package/dist/adapters/presidio.js +158 -0
  19. package/dist/adapters/privacyDetector.d.ts +10 -0
  20. package/dist/adapters/privacyDetector.js +600 -0
  21. package/dist/adapters/ruff.d.ts +1 -1
  22. package/dist/adapters/ruff.js +4 -1
  23. package/dist/adapters/semgrep.d.ts +1 -1
  24. package/dist/adapters/semgrep.js +17 -3
  25. package/dist/adapters/shared.d.ts +1 -0
  26. package/dist/adapters/shared.js +22 -0
  27. package/dist/adapters/telemetryDetector.d.ts +2 -0
  28. package/dist/adapters/telemetryDetector.js +118 -0
  29. package/dist/adapters/tsc.js +43 -18
  30. package/dist/adapters/vulture.d.ts +1 -1
  31. package/dist/adapters/vulture.js +25 -6
  32. package/dist/agentPack/generateAgentPack.d.ts +7 -0
  33. package/dist/agentPack/generateAgentPack.js +89 -1
  34. package/dist/agentPack/templates/index.js +21 -15
  35. package/dist/agentPack/templates/skills.js +57 -4
  36. package/dist/cli/commands/agent.d.ts +5 -0
  37. package/dist/cli/commands/agent.js +10 -0
  38. package/dist/cli/commands/agentPlan.js +9 -1
  39. package/dist/cli/commands/init.js +50 -17
  40. package/dist/cli/commands/privacyReview.d.ts +9 -0
  41. package/dist/cli/commands/privacyReview.js +304 -0
  42. package/dist/cli/commands/scan.d.ts +1 -1
  43. package/dist/cli/commands/scan.js +31 -1
  44. package/dist/cli/commands/setup.js +16 -1
  45. package/dist/cli/commands/tool.d.ts +4 -0
  46. package/dist/cli/commands/tool.js +11 -0
  47. package/dist/cli/index.js +36 -0
  48. package/dist/core/config.d.ts +29 -0
  49. package/dist/core/config.js +142 -5
  50. package/dist/core/engine.d.ts +35 -1
  51. package/dist/core/engine.js +204 -36
  52. package/dist/core/finding.d.ts +16 -2
  53. package/dist/core/finding.js +5 -0
  54. package/dist/core/paths.js +5 -0
  55. package/dist/core/privacyReview.d.ts +51 -0
  56. package/dist/core/privacyReview.js +94 -0
  57. package/dist/core/projectDetector.d.ts +1 -1
  58. package/dist/core/projectDetector.js +34 -12
  59. package/dist/core/scanPlanner.js +4 -0
  60. package/dist/core/scoring.js +6 -0
  61. package/dist/core/toolRunner.d.ts +1 -0
  62. package/dist/core/toolRunner.js +73 -11
  63. package/dist/index.d.ts +2 -0
  64. package/dist/index.js +5 -0
  65. package/dist/mcp/tools/shared.d.ts +1 -1
  66. package/dist/mcp/tools/shared.js +8 -1
  67. package/dist/reporters/agent.js +8 -0
  68. package/dist/reporters/html.js +12 -8
  69. package/dist/reporters/json.js +5 -5
  70. package/dist/reporters/markdown.js +15 -1
  71. package/dist/reporters/sarif.js +6 -0
  72. package/dist/reporters/terminal.js +1 -5
  73. package/dist/rules/severityMap.d.ts +1 -0
  74. package/dist/rules/severityMap.js +1 -0
  75. package/package.json +6 -2
package/README.md CHANGED
@@ -1,290 +1,219 @@
1
- # VibeDoctor
2
-
3
- **A health check for code you didn't write line by line.**
4
-
5
- AI writes most of the code now. It ships fast, and it also leaves behind dead
6
- branches, half-removed fallbacks, commented-out experiments, untested files, and
7
- the occasional hardcoded secret. VibeDoctor is the checkup that catches all of
8
- that before it reaches your main branch.
9
-
10
- It runs the quality tools your project already uses, normalizes their output into
11
- one finding model, scores the repo, and tells humans **and** coding agents exactly
12
- what to fix next.
13
-
14
- ```bash
15
- npx @neuralaxis/vibedoctor scan
16
- ```
17
-
18
- ```text
19
- Health: 71/100 ⚠️
20
-
21
- Blockers: 1
22
- Fix next: 3
23
- Leftovers: 1
24
- Dead code candidates: 1
25
- Refactor candidates: 1
26
-
27
- BLOCKERS
28
- 1. Hardcoded secret in config (src/config.ts)
29
-
30
- FIX NEXT
31
- 1. Hardcoded secret (src/config.ts)
32
- 2. Dead chain candidate (src/legacy.ts)
33
- 3. Ready for refactor (src/report_builder.ts)
34
-
35
- READY FOR AGENT
36
- Run:
37
- vibedoctor agent-plan
38
- ```
39
-
40
- No dashboards, no SaaS sign-up, no config required to start. One command, one
41
- short answer.
42
-
43
- ## Why VibeDoctor
44
-
45
- - **Built for the AI era.** It specifically hunts the debt that generated code
46
- leaves behind: dead chains, legacy fallbacks, leftover comments, and untested
47
- surface area, not just lint noise.
48
- - **One score, one priority list.** Fifteen-plus tools collapse into a single
49
- health score and a ranked "fix next" list instead of a wall of warnings.
50
- - **Agent-native.** Ships skills and instructions for Codex, Claude Code, GitHub
51
- Copilot, and Cursor, plus an MCP server, so your agent can scan and self-correct.
52
- - **Honest by default.** Missing tools are reported as skipped, never silently
53
- counted as passing.
54
- - **Zero lock-in.** It orchestrates open tools you already trust and writes plain
55
- JSON, HTML, Markdown, and SARIF you own.
56
-
57
- ## What It Checks
58
-
59
- VibeDoctor detects the project shape, discovers local tool binaries from
60
- `node_modules/.bin` and Python virtualenv folders, then runs relevant adapters
61
- when available.
62
-
63
- It can report on:
64
-
65
- - type and lint failures from TypeScript, Pyright, Ruff, and Biome
66
- - secrets and dependency risk from Gitleaks, OSV-Scanner, Semgrep, deptry, and Knip
67
- - dead code from Vulture, Knip, and VibeDoctor's dead-chain detector
68
- - leftover AI or legacy code such as commented-out blocks, fallback flags, and stale TODOs
69
- - refactor-readiness hotspots, duplication, complexity, and coverage gaps
70
- - test coverage from coverage.py, Vitest, and Jest
71
-
72
- Missing tools are reported as skipped instead of treated as clean coverage.
73
-
74
- ## Quickstart
75
-
76
- From the repository or package you want to inspect:
77
-
78
- ```bash
79
- npx @neuralaxis/vibedoctor init
80
- npx @neuralaxis/vibedoctor setup
81
- npx @neuralaxis/vibedoctor scan --quick
82
- npx @neuralaxis/vibedoctor scan --changed
83
- ```
84
-
85
- Prefer a shorter command? Install it once and call the `vibedoctor` binary directly:
86
-
87
- ```bash
88
- npm install -g @neuralaxis/vibedoctor
89
- vibedoctor scan
90
- ```
91
-
92
- The remaining examples use the `vibedoctor` binary; prefix them with `npx @neuralaxis/vibedoctor` if you skip the global install.
93
-
94
- Want the strongest first scan? Run `vibedoctor setup --apply`. VibeDoctor will
95
- install the recommended project-local npm/Python tools (core essentials + high-value
96
- extras like duplication, coverage, and complexity) it can install safely, and
97
- print exact manual steps for native tools such as Gitleaks, OSV-Scanner, Semgrep, and Lizard.
98
-
99
- For the strongest signal in monorepos, run VibeDoctor from the package or service root you are actively changing. Running from the monorepo root is supported, but package roots usually produce tighter dependency and test-tool signal.
100
-
101
- After a scan, VibeDoctor writes:
102
-
103
- - `.vibedoctor/report.json` for tools and agents
104
- - `.vibedoctor/report.html` for a browser-readable report
105
- - `.vibedoctor/agent-plan.md` for guided repair work
106
-
107
- ## Common Workflows
108
-
109
- | Goal | Command |
110
- | --- | --- |
111
- | Initialize config | `vibedoctor init` |
112
- | Plan/install scanner tools | `vibedoctor setup` / `vibedoctor setup --apply` |
113
- | Fast local triage | `vibedoctor scan --quick` |
114
- | Review only changed files | `vibedoctor scan --changed` |
115
- | Full repository scan | `vibedoctor scan --full` |
116
- | Scan one category | `vibedoctor scan --category dead_code,leftovers --report json` |
117
- | Apply safe tool fixes | `vibedoctor fix --safe` |
118
- | Create a baseline | `vibedoctor baseline create` |
119
- | Explain one finding | `vibedoctor explain <finding-id>` |
120
- | Verify after edits | `vibedoctor verify` |
121
- | Generate agent plan | `vibedoctor agent-plan --format markdown` |
122
- | Start MCP server | `vibedoctor mcp` |
123
-
124
- `scan` and `verify` return a non-zero exit code when the configured score threshold or fail-fast checks are tripped, so they drop straight into a pre-commit hook or CI gate.
125
-
126
- ## Configuration
127
-
128
- `vibedoctor init` writes a `vibedoctor.yml` you can tune. Sensible defaults are
129
- baked in, so editing is optional. The most useful knobs:
130
-
131
- - `score.minimum` — the health score that `scan`/`verify` must clear to pass
132
- - `baseline.fail_only_on_new_issues` — only fail on debt introduced since the baseline
133
- - `checks.*` — enable/disable categories and set fail-fast rules for secrets, type errors, test failures, and vulnerabilities
134
- - `paths.include` / `paths.exclude` — scope what gets scanned
135
-
136
- Use `vibedoctor baseline create` to snapshot existing debt, then fail builds only
137
- on *new* problems while you pay down the rest over time.
138
-
139
- ## Tool Setup Philosophy
140
-
141
- VibeDoctor prefers tools already installed by the repository because that matches
142
- your real CI versions and config. It never treats a missing tool as a clean pass:
143
- missing tools are shown as skipped with install guidance.
144
-
145
- For a smoother first run, `vibedoctor setup` (or `setup --apply`) gives you the
146
- curated recommended install plan out of the box. Many users don't know which
147
- extra packages will give the best signal, so the default now includes the
148
- essentials plus high-value "recommended" tools:
149
-
150
- - built-in detectors: leftovers, dead-chain candidates, and refactor readiness
151
- - JS/TS: TypeScript, Biome, Knip
152
- - Python: Ruff, Pyright, Vulture
153
- - security/dependencies: Gitleaks and OSV-Scanner
154
- - **Recommended extras (included by default)**: jscpd (duplication), coverage.py,
155
- radon (complexity), deptry (dependency hygiene), semgrep (rules), and lizard
156
- (function-level complexity hotspots)
157
-
158
- `vibedoctor setup --apply` installs the automatable package-manager tools (npm/pip/uv/poetry/etc).
159
- Native binaries (Gitleaks, OSV-Scanner, Semgrep, Lizard, ...) are listed with
160
- clear one-line install hints instead of being downloaded automatically.
161
-
162
- If you want the absolute minimal core only, or to target just one ecosystem:
163
-
164
- - `vibedoctor setup --include essential` — smallest core set only
165
- - `vibedoctor setup --include all` — recommended set plus any extended tools
166
- - `vibedoctor setup --include npm` — JS/TS package installs only
167
- - `vibedoctor setup --include python` — Python package installs only
168
- - `vibedoctor setup --include manual` — native/manual binaries only (hints)
169
- - `vibedoctor setup --include built-in` — VibeDoctor's built-in detectors only
170
-
171
- After setup (or any manual installs), re-run `vibedoctor scan --quick` or
172
- `scan --full` to see the richer findings and a stronger health score. The setup
173
- command itself always prints suggestions for additional tools you may not have
174
- thought of.
175
-
176
- ## Reports
177
-
178
- Use `scan --report <format>` or `report` commands depending on whether you want a fresh scan or a rendered artifact.
179
-
180
- ```bash
181
- vibedoctor scan --full --report json
182
- vibedoctor report --html
183
- vibedoctor report --markdown
184
- vibedoctor report --agent
185
- vibedoctor report --sarif
186
- ```
187
-
188
- JSON is the best format for automation. Terminal output is intentionally short and answers: health score, blockers, fix-next items, leftovers, dead-code candidates, skipped tools, and errored tool causes.
189
-
190
- ## Agent Pack
191
-
192
- VibeDoctor can install repo-scoped instructions and skills for Codex, Claude Code, GitHub Copilot, and Cursor.
193
-
194
- ```bash
195
- vibedoctor agent init --targets all
196
- vibedoctor agent doctor --targets all
197
- ```
198
-
199
- Generated files:
200
-
201
- | Target | Files |
202
- | --- | --- |
203
- | Codex | `AGENTS.md`, `.agents/skills/<skill>/SKILL.md`, `.agents/skills/<skill>/agents/openai.yaml` |
204
- | Claude Code | `.claude/skills/<skill>/SKILL.md` plus mirrored skill support files |
205
- | GitHub Copilot | `.github/copilot-instructions.md`, `.github/skills/<skill>/SKILL.md` plus mirrored skill support files |
206
- | Cursor | `.cursor/rules/vibedoctor.mdc`, `.cursor/mcp.json` |
207
- | Shared policy | `.vibedoctor/agent-policy.yml`, `.vibedoctor/agent-pack.json` |
208
-
209
- The canonical source is `.agents/skills`. `agent sync` mirrors those skills into the target-specific locations.
210
-
211
- ```bash
212
- vibedoctor agent pack
213
- vibedoctor agent sync --targets claude,copilot,cursor
214
- vibedoctor agent sync --targets all --force
215
- ```
216
-
217
- This follows the same packaging model used by the major coding agents:
218
-
219
- - Codex reads repository instructions from `AGENTS.md` and repo skills from `.agents/skills/<skill>/SKILL.md`. VibeDoctor also emits optional Codex `agents/openai.yaml` metadata for a cleaner app experience.
220
- - Claude Code reads project skills from `.claude/skills/<skill>/SKILL.md`, where the directory name becomes the slash command.
221
- - GitHub Copilot reads repository guidance from `.github/copilot-instructions.md` and can use agent instructions from `AGENTS.md`.
222
- - Cursor uses rule files and MCP configuration for always-on guidance and tool access.
223
-
224
- VibeDoctor ships repo-scoped skills, not a Codex or Claude plugin package. That is intentional for now: the CLI installs workflow guidance directly into the repository being scanned.
225
-
226
- ## MCP Server
227
-
228
- Start the MCP server with:
229
-
230
- ```bash
231
- vibedoctor mcp
232
- ```
233
-
234
- The server exposes structured tools for changed scans, full scans, safe fixes, report retrieval, agent-plan retrieval, finding explanations, and verification.
235
-
236
- ## Development
237
-
238
- Requirements:
239
-
240
- - Node.js 18 or newer
241
- - npm 10.x for lockfile-compatible installs
242
-
243
- Install dependencies and run the full local check:
244
-
245
- ```bash
246
- npm ci
247
- npm run check
248
- ```
249
-
250
- Useful scripts:
251
-
252
- ```bash
253
- npm test
254
- npm run typecheck
255
- npm run build
256
- npm run dev -- scan --quick
257
- ```
258
-
259
- `npm run build` emits production files into `dist/` from `src/` only. Generated output, dependencies, coverage, local virtualenvs, and VibeDoctor report artifacts are intentionally ignored by Git.
260
-
261
- ## Project Layout
262
-
263
- | Path | Purpose |
264
- | --- | --- |
265
- | `src/adapters` | Tool adapters and parsers |
266
- | `src/core` | Project detection, scan planning, scoring, baselines, and command execution |
267
- | `src/cli` | Command-line interface |
268
- | `src/agentPack` | Agent instructions, skills, policy, and target shims |
269
- | `src/mcp` | MCP server and tools |
270
- | `src/reporters` | Terminal, JSON, Markdown, HTML, SARIF, and agent reports |
271
- | `fixtures` | Small sample projects for integration tests |
272
- | `tests` | Unit, integration, and snapshot tests |
273
-
274
- ## Packaging
275
-
276
- Before publish or release packaging, run:
277
-
278
- ```bash
279
- npm pack --dry-run
280
- ```
281
-
282
- The `prepack` script rebuilds `dist/`, and the npm package includes only compiled output plus README, license, and package metadata.
283
-
284
- ## CI
285
-
286
- GitHub Actions runs `npm ci` and `npm run check` on Node 20 and 22 for pushes and pull requests to `main`.
287
-
288
- ## License
289
-
290
- VibeDoctor is licensed under GPL-3.0-or-later. You can use, copy, modify, and redistribute it under the GPL terms; distributed derivative works must provide corresponding source under compatible GPL terms.
1
+ # VibeDoctor
2
+
3
+ A health check for code you did not write line by line.
4
+
5
+ VibeDoctor is a local code-health CLI for JS, TS, Python, and mixed repositories. It turns scattered tool output into a ranked health report, safe repair workflow, Privacy Review artifact, MCP server, and reusable agent skills.
6
+
7
+ ```bash
8
+ npx @neuralaxis/vibedoctor scan --changed
9
+ ```
10
+
11
+ For a stronger first run:
12
+
13
+ ```bash
14
+ npx @neuralaxis/vibedoctor init
15
+ npx @neuralaxis/vibedoctor setup --apply
16
+ npx @neuralaxis/vibedoctor scan --quick
17
+ ```
18
+
19
+ Install once if you prefer the short binary:
20
+
21
+ ```bash
22
+ npm install -g @neuralaxis/vibedoctor
23
+ vibedoctor scan --full
24
+ ```
25
+
26
+ ## Release Demos
27
+
28
+ <video src="docs/assets/vibedoctor-product-release-demo-v0.1.1.mp4" controls muted playsinline width="100%"></video>
29
+
30
+ [Direct video link](docs/assets/vibedoctor-product-release-demo-v0.1.1.mp4)
31
+
32
+ ## Why VibeDoctor
33
+
34
+ - It focuses on the failure modes AI-heavy repos accumulate: dead branches, stale fallbacks, leftovers, weak coverage, and accidental sensitive-data exposure.
35
+ - It collapses many tool results into one finding model, one score, and a ranked fix list instead of a wall of unrelated warnings.
36
+ - It is agent-native without locking you into a hosted service: reports stay local and output remains plain JSON, HTML, Markdown, and SARIF.
37
+ - It tells agents whether a scan is complete, provides exact recovery commands for failed tools, and prevents partial scores from masquerading as authoritative health checks.
38
+
39
+ ## What VibeDoctor Checks
40
+
41
+ VibeDoctor detects the project shape, discovers local tool binaries, runs the checks that make sense for the repo, and reports missing tools as skipped instead of pretending they passed.
42
+
43
+ - Type and lint failures from TypeScript, Pyright, Ruff, Biome, and similar local tools.
44
+ - Secrets and dependency risk from Gitleaks, OSV-Scanner, Semgrep, deptry, Knip, and project-native scanners when available.
45
+ - Privacy and PII exposure from VibeDoctor's deterministic detector, with optional Presidio support.
46
+ - Dead code from Vulture, Knip, and VibeDoctor's dead-chain detector.
47
+ - AI and legacy leftovers such as commented-out blocks, stale TODOs, fallback flags, and half-removed code.
48
+ - Refactor-readiness hotspots, duplication, complexity, and coverage gaps.
49
+ - Test and coverage signal from local JS and Python tooling.
50
+
51
+ After a scan, VibeDoctor writes machine-readable and human-readable artifacts under `.vibedoctor/`, including `report.json`, `report.html`, and `agent-plan.md`.
52
+
53
+ ## Tool Setup Philosophy
54
+
55
+ VibeDoctor prefers repository-local tools and config so the scan matches the versions you actually use in development and CI. Missing tools are reported as skipped with install guidance instead of being counted as clean.
56
+
57
+ ## Common CLI Workflows
58
+
59
+ | Goal | Command |
60
+ | --- | --- |
61
+ | Initialize config | `vibedoctor init` |
62
+ | Plan scanner setup | `vibedoctor setup` |
63
+ | Install automatable recommended tools | `vibedoctor setup --apply` |
64
+ | Fast local triage | `vibedoctor scan --quick` |
65
+ | Review changed files | `vibedoctor scan --changed` |
66
+ | Full repository scan | `vibedoctor scan --full` |
67
+ | Scan selected categories | `vibedoctor scan --category dead_code,leftovers --report json` |
68
+ | Scan privacy findings only | `vibedoctor scan --category privacy --report json` |
69
+ | Render reports | `vibedoctor report --html`, `--markdown`, `--sarif`, or `--agent` |
70
+ | Apply safe tool fixes | `vibedoctor fix --safe` |
71
+ | Create a baseline | `vibedoctor baseline create` |
72
+ | Explain a finding | `vibedoctor explain <finding-id>` |
73
+ | Verify after edits | `vibedoctor verify` |
74
+ | Retry a timed-out scanner | `vibedoctor tool retry <tool-id> [--timeout 600]` |
75
+ | Generate an agent repair plan | `vibedoctor agent-plan --format markdown` |
76
+
77
+ `scan` and `verify` return exit code `1` when completed health gates fail and exit code `2` when required checks are incomplete. Reports label incomplete scores as `PARTIAL` or `INVALID` and include machine-readable `recoveryActions`.
78
+
79
+ Timeouts and required checks are configurable:
80
+
81
+ ```yaml
82
+ runtime:
83
+ default_timeout_seconds: 120
84
+ tool_timeouts:
85
+ biome: 180
86
+ semgrep: 300
87
+ required_tools:
88
+ - biome
89
+ - semgrep
90
+ fail_on_incomplete_scan: true
91
+ ```
92
+
93
+ ## Privacy Review
94
+
95
+ Privacy Review is deterministic-first and advisory by default. The built-in privacy detector finds regulated identifiers, personal-data fields, sensitive attributes, and combination-risk patterns while storing masked evidence in reports.
96
+
97
+ ```bash
98
+ vibedoctor scan --category privacy --report json
99
+ vibedoctor privacy-review --refresh --format markdown
100
+ ```
101
+
102
+ By default, privacy findings affect the privacy category score but do not lower the overall health score or fail CI. To make privacy findings blocking, opt in through config:
103
+
104
+ - `checks.privacy.fail_on_regulated_identifiers`
105
+ - `checks.privacy.fail_on_sensitive_attributes`
106
+
107
+ The `privacy-review` command writes `.vibedoctor/privacy-review.json` with structured review decisions and merge-back metadata. Optional AI adjudication only runs when `checks.privacy.ai.enabled` is true and the configured API-key environment variables are present.
108
+
109
+ ## Agent Skills And Plugins
110
+
111
+ VibeDoctor has two agent surfaces.
112
+
113
+ Repo-local install:
114
+
115
+ ```bash
116
+ vibedoctor agent init --targets all
117
+ vibedoctor agent doctor --targets all
118
+ ```
119
+
120
+ This writes repository-scoped guidance and skills:
121
+
122
+ - `AGENTS.md`
123
+ - `.agents/skills/<skill>/SKILL.md`
124
+ - `.agents/skills/<skill>/agents/openai.yaml`
125
+ - `.claude/skills/<skill>/SKILL.md`
126
+ - `.github/skills/<skill>/SKILL.md`
127
+ - `.github/copilot-instructions.md`
128
+ - `.cursor/rules/vibedoctor.mdc`
129
+ - `.cursor/mcp.json`
130
+ - `.vibedoctor/agent-policy.yml`
131
+
132
+ Plugin bundle:
133
+
134
+ ```bash
135
+ vibedoctor agent plugin --target codex
136
+ vibedoctor agent plugin --target claude
137
+ vibedoctor agent plugin --targets all --force
138
+ ```
139
+
140
+ This materializes an installable bundle under `plugins/vibedoctor/`:
141
+
142
+ - `plugins/vibedoctor/.codex-plugin/plugin.json`
143
+ - `plugins/vibedoctor/.claude-plugin/plugin.json`
144
+ - `plugins/vibedoctor/skills/<skill>/SKILL.md`
145
+
146
+ Codex discovers the plugin from `.codex-plugin/plugin.json`, which points to `./skills/`. Claude Code uses the plugin namespace for skill commands, for example:
147
+
148
+ ```text
149
+ /vibedoctor:vibedoctor-health-scan
150
+ /vibedoctor:vibedoctor-privacy-review
151
+ ```
152
+
153
+ The canonical skill catalog is exported from the package root as `AGENT_SKILLS`, `DEFAULT_SKILL_NAMES`, and `SkillTemplate`, and the same templates generate repo skills, Claude skills, Copilot/Cursor shims, and packaged plugin skills.
154
+
155
+ ## MCP Server
156
+
157
+ Start the MCP server over stdio:
158
+
159
+ ```bash
160
+ vibedoctor mcp
161
+ ```
162
+
163
+ The MCP server exposes structured tools for changed scans, full scans, safe fixes, report retrieval, agent-plan retrieval, finding explanations, and verification. Agent configs generated by `vibedoctor agent init --targets all` include target-specific MCP wiring where supported.
164
+
165
+ ## Configuration
166
+
167
+ `vibedoctor init` writes `vibedoctor.yml`. Editing is optional, but these are the most common controls:
168
+
169
+ - `score.minimum`: health score required for `scan` and `verify` to pass.
170
+ - `baseline.fail_only_on_new_issues`: fail only on debt introduced after the baseline.
171
+ - `checks.*`: enable categories and fail-fast gates for secrets, type errors, test failures, and vulnerabilities.
172
+ - `checks.privacy.*`: tune deterministic privacy detection, masking, optional Presidio support, optional AI review, and CI blocking behavior.
173
+ - `paths.include` and `paths.exclude`: scope scanned files.
174
+
175
+ Use `vibedoctor baseline create` to snapshot existing debt, then fail builds only on new problems while you pay down the rest.
176
+
177
+ ## Development And Release
178
+
179
+ Requirements:
180
+
181
+ - Node.js 18 or newer
182
+ - npm 10.x
183
+
184
+ Run the local verification set:
185
+
186
+ ```bash
187
+ npm test
188
+ npm run typecheck
189
+ npm run build
190
+ npm pack --dry-run
191
+ ```
192
+
193
+ Useful development commands:
194
+
195
+ ```bash
196
+ npm run dev -- scan --quick
197
+ npm run dev -- agent init --targets all
198
+ npm run dev -- agent plugin --targets all --force
199
+ ```
200
+
201
+ `npm run build` emits production files into `dist/`. Plugin bundles under `plugins/` are generated on demand by `vibedoctor agent plugin ...` and are ignored in this repository by default.
202
+
203
+ ## Project Layout
204
+
205
+ | Path | Purpose |
206
+ | --- | --- |
207
+ | `src/adapters` | Tool adapters and parsers |
208
+ | `src/core` | Project detection, scan planning, scoring, baselines, and command execution |
209
+ | `src/cli` | Command-line interface |
210
+ | `src/agentPack` | Agent instructions, skills, policy, shims, and plugin generation |
211
+ | `src/mcp` | MCP server and tools |
212
+ | `src/reporters` | Terminal, JSON, Markdown, HTML, SARIF, and agent reports |
213
+ | `plugins/vibedoctor` | Generated Codex and Claude plugin bundle |
214
+ | `fixtures` | Sample projects for tests |
215
+ | `tests` | Unit, integration, and snapshot tests |
216
+
217
+ ## License
218
+
219
+ VibeDoctor is licensed under GPL-3.0-or-later.
@@ -1,2 +1,2 @@
1
- import type { ToolAdapter } from "./shared";
1
+ import { type ToolAdapter } from "./shared";
2
2
  export declare const biomeAdapter: ToolAdapter;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.biomeAdapter = void 0;
4
4
  const finding_1 = require("../core/finding");
5
+ const shared_1 = require("./shared");
5
6
  function parseBiomeOutput(stdout) {
6
7
  const trimmed = stdout.trim();
7
8
  if (!trimmed) {
@@ -26,11 +27,12 @@ exports.biomeAdapter = {
26
27
  return project.languages.includes("javascript") || project.languages.includes("typescript");
27
28
  },
28
29
  buildScanCommand(ctx) {
30
+ const targets = (0, shared_1.adapterTargets)(ctx, /\.(?:js|jsx|ts|tsx|json|jsonc)$/i);
29
31
  return {
30
32
  cmd: "biome",
31
- args: ["check", ".", "--reporter=json"],
33
+ args: ["check", ...targets, "--reporter=json"],
32
34
  cwd: ctx.root,
33
- timeoutMs: 60_000
35
+ timeoutMs: 180_000
34
36
  };
35
37
  },
36
38
  parseResult(result, ctx) {
@@ -55,11 +57,12 @@ exports.biomeAdapter = {
55
57
  }));
56
58
  },
57
59
  buildFixCommand(ctx) {
60
+ const targets = (0, shared_1.adapterTargets)(ctx, /\.(?:js|jsx|ts|tsx|json|jsonc)$/i);
58
61
  return {
59
62
  cmd: "biome",
60
- args: ["check", ".", "--write"],
63
+ args: ["check", ...targets, "--write"],
61
64
  cwd: ctx.root,
62
- timeoutMs: 60_000
65
+ timeoutMs: 180_000
63
66
  };
64
67
  },
65
68
  installHint: "Install Biome with: npm install -D @biomejs/biome"
@@ -46,6 +46,9 @@ exports.coveragePyAdapter = {
46
46
  }
47
47
  catch {
48
48
  findings = [];
49
+ if (/no data to report|no coverage data/i.test(`${status.stderr}\n${status.stdout}`)) {
50
+ status.status = "skipped";
51
+ }
49
52
  }
50
53
  finally {
51
54
  await node_fs_1.promises.rm(reportFile, { force: true }).catch(() => undefined);
@@ -1,4 +1,5 @@
1
1
  import type { Finding } from "../core/finding";
2
+ import type { VibeDoctorConfig } from "../core/config";
2
3
  import type { ProjectContext } from "../core/projectDetector";
3
4
  type CodeNode = {
4
5
  id: string;
@@ -16,5 +17,5 @@ type DeadChainCandidate = {
16
17
  reasons: string[];
17
18
  dependencies: string[];
18
19
  };
19
- export declare function detectDeadChains(project: ProjectContext, findings: Finding[]): Promise<Finding[]>;
20
+ export declare function detectDeadChains(project: ProjectContext, findings: Finding[], config?: Pick<VibeDoctorConfig, "paths">): Promise<Finding[]>;
20
21
  export type { CodeNode, DeadChainCandidate };