Metadata-Version: 2.5
Name: venkel
Version: 0.1.12
Summary: Repository intelligence harness: deterministic scanners, normalized findings, executive reports, org and talent signals.
Author-email: Plausible Industries <engineering@plausibleindustries.com>
License: Venkel License (see LICENSE): use as is, no support, no warranty, no recourse
License-File: LICENSE
License-File: LICENSES.md
Requires-Python: >=3.12
Requires-Dist: jsonschema>=4.22
Requires-Dist: lizard==1.17.31
Requires-Dist: pydantic>=2.7
Requires-Dist: pyyaml>=6.0
Requires-Dist: rich>=13.7
Requires-Dist: typer>=0.12
Description-Content-Type: text/markdown

# Venkel

Repository intelligence harness. Venkel (Dutch for fennel, the many-layered bulb) scans a set
of repositories to understand and assess each one, derive conclusions about the organization
that builds and maintains them, assess the team doing the work, and surface security, scaling
and error-handling gaps. It produces an in-depth normalized dataset, a self-contained
interactive report, and prompt packs for a frontier model to turn the dataset into executive
findings.

Deterministic open-source scanners do the bulk of the work. Venkel stitches them together,
normalizes their output, and never sends code anywhere. An operator's assistant handles
acquisition and the GitHub export; see `OPERATOR.md`.

## Install

```bash
brew bundle                      # scc, trivy, gitleaks, git-sizer, node
uv tool install .                # or: uv tool install git+https://github.com/plausibleindustries/Venkel
venkel doctor --install          # opengrep (checksummed release binary) and jscpd (npm) at locked versions
venkel doctor                    # everything should read ok; missing tools are coverage gaps, not failures
```

Lizard is a Python dependency and needs nothing extra. Apple's `fm` CLI (macOS 27) is used for
optional on-box enrichment when present.

## Commands

| Command | What it does |
|---|---|
| `venkel validate CONFIG` | Validate `venkel.yaml` against the schema and check repository paths |
| `venkel config effective CONFIG` | Resolved settings per repository and which layer supplied each |
| `venkel schema [--write]` | JSON Schema for the config, generated from the models |
| `venkel doctor [--install] [--json] [--strict]` | Installed scanners vs `registry-lock.json`, Trivy DB age, fm availability |
| `venkel registry` | Registered adapters, their categories and tools |
| `venkel plan CONFIG` | What a scan would run, skip reasons, coverage gaps |
| `venkel scan CONFIG` | Run; stages under `.staging/`, publishes an immutable run with the package and reports |
| `venkel resume RUN_DIR` | Continue an interrupted run, reusing completed steps |
| `venkel verify RUN_DIR` | Recompute every artifact checksum |
| `venkel consolidate RUN_DIR [--out]` | Rebuild `consolidated/assessment.json` and JSONL from parsed records |
| `venkel ingest RUN_DIR` | Load a run into `assessment.sqlite` next to the runs |
| `venkel inspect DB` | Per-repo counts, severities, coverage gaps |
| `venkel diff DB [--a --b]` | New, resolved, unchanged findings; metric deltas; coverage changes between runs |

## Run layout

```
<output>/<timestamp>_<ulid>/
  manifest.json                 every artifact with sha256 and provenance
  effective-config.yaml         what the run used
  registry-lock.json            tool pins at the time of the run
  repos/<id>/repository.json    identity: remote, root commit, head, dirty
  repos/<id>/<adapter>/         invocation.json, stdout/stderr logs, raw/, parsed/*.jsonl, status.json
  consolidated/                 assessment.json, findings/metrics/observations/dependencies/repositories.jsonl, coverage.json
  reports/                      venkel-report.html (self-contained), summary.md
```

Records: `Finding`, `Metric`, `Observation`, `Dependency` (see `src/venkel/records.py`).
Fingerprints exclude the repo id so renamed repositories still diff cleanly.

## Adapters

| Adapter | Categories | Tool |
|---|---|---|
| repo-meta | inventory | git |
| scc | inventory | scc |
| git-activity | activity | git |
| git-team | team | git |
| trivy | dependencies, security, infrastructure | trivy |
| opengrep | security, quality, architecture | opengrep + `src/venkel/rules` |
| gitleaks | security | gitleaks |
| git-sizer | inventory | git-sizer |
| lizard | quality | lizard |
| jscpd | quality | jscpd |
| heuristics | documentation, testing, ci_cd, infrastructure, dependencies | none |
| github | github | sidecar JSON from `venkel sidecar export` |

## People data

`people.mode` is `named` (default), `pseudonymous` (keyed hashes, key stored outside the
run), or `aggregate` (no per-person records). The mode is your decision; see `OPERATOR.md`
section 0 before enabling per-person analysis.

## Where the design lives

- PRD: https://app.notion.com/p/3fa92b8d9ca0810ca9bdf0715f297d30
- Build decisions, tool registry, backlog (wins where it disagrees with the PRD):
  https://app.notion.com/p/3fa92b8d9ca08147a908c73321c4802b
- Linear project P-PI-15; tickets carry `VK-xxx` ids in their titles

## Development

```bash
uv sync
uv run pytest -q          # parser tests use captured fixtures; live tests skip without the tool
uv run ruff format . && uv run ruff check .
```
