@cejel/cejel 0.1.1 → 0.1.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # cejel
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/cejel.svg)](https://www.npmjs.com/package/cejel)
3
+ [![release](https://img.shields.io/github/v/release/BargLabs/cejel)](https://github.com/BargLabs/cejel/releases/latest)
4
4
  [![license: AGPL-3.0-only](https://img.shields.io/badge/license-AGPL--3.0--only-blue.svg)](./LICENSE)
5
5
 
6
6
  Cejel (*"SEH-jel"*) — a trust certificate for your codebase.
@@ -8,8 +8,8 @@ Cejel (*"SEH-jel"*) — a trust certificate for your codebase.
8
8
  Free, offline, no-signup CLI that scores the engineering signals that tell you whether to
9
9
  trust a repo — tests, secrets, isolation, claim-vs-reality, CI/audit discipline — and prints
10
10
  a trust certificate + badge. Especially valuable when AI wrote a lot of the code: that's
11
- exactly when you can't eyeball trust. Built on a deterministic, no-LLM
12
- scoring core — the free path makes zero network calls and requires no account.
11
+ exactly when you can't eyeball trust. Built on a deterministic, no-LLM scoring core — the
12
+ free path makes zero network calls and requires no account.
13
13
 
14
14
  Cejel is not another point scanner competing with the one you already run — it's the open,
15
15
  portable, offline trust certificate that aggregates them. Pipe in SARIF-compatible output
@@ -20,57 +20,60 @@ certificate + badge over all of them. See "Aggregate your scanners" below.
20
20
  > monorepo — the ten-product studio it was built inside — which it currently scores
21
21
  > 3.1/4.0 ("Conditional"). We score ourselves before asking you to score yourself.
22
22
 
23
- ## Leaderboard
24
-
25
- This repo ships the [Cejel OSS trust leaderboard](./leaderboard/leaderboard.md): the whole
26
- corpus scored and published in the open — elite OSS projects, Cejel itself, and the private
27
- studio monorepo Cejel was built inside — with a per-repository evidence report for every
28
- row under [`leaderboard/reports/`](./leaderboard/reports/). The board is also hosted at
29
- [cejel.dev](https://cejel.dev). Same deterministic rubric as `npx cejel .`; nobody is
30
- exempt, including us.
31
-
32
- ### Redaction policy
33
-
34
- A path is published exactly when the reader can check it. Every public repository on the
35
- board cites full evidence paths and line numbers, everywhere, in every artifact — a
36
- certificate whose evidence you cannot open is not evidence. The two private-repository
37
- entries (this monorepo's own transparency entry, and Cejel's own source sub-package inside
38
- it) never cite a source path, anywhere, in any field or format — but the finding itself, its
39
- dimension, status, score, and content hash always survive; only the location is withheld,
40
- marked uniformly as "path withheld — private repository". Redaction removes a location, never
41
- a fact: a private repository failing its own check still shows up on its certificate, by
42
- name. The B1 and B5 rubric dimensions are substrate-only (they measure signals specific to
43
- this monorepo's own internal process, not applicable to any external repository) and are
44
- excluded from the ranking for every repository, including ours — the same fairness rule
45
- either way: nobody is scored on a dimension nobody else can have.
46
-
47
- ### Known false positives (fixed before publishing)
48
-
49
- Calibrating a rubric against real, elite repositories surfaces mistakes; the record is part
50
- of the trust claim, not something to bury. Two dimensions produced a punitive score for the
51
- *absence* of a ratable surface rather than a real weakness, and both are fixed:
52
- Django was flagged critical on dependency hygiene for using version ranges instead of exact
53
- pins — normal, deliberate practice for a library, not an app; the rubric now scores
54
- dependency hygiene against archetype-appropriate norms. OSSF Scorecard — Google's own
55
- supply-chain security auditing tool — was flagged critical on audit-trail completeness for
56
- publishing release notes via GitHub Releases instead of a committed `CHANGELOG.md`; a
57
- repository with no ratable audit surface now returns "insufficient data" (excluded from the
58
- composite) instead of a punitive score. The board also publishes a measured-coverage
59
- indicator per row: a score reflects only its *measured* dimensions, and a row scored on fewer
60
- than half of its applicable dimensions is shown as unranked rather than ordered against
61
- better-evidenced rows.
23
+ ## Install
62
24
 
63
- ## Usage
25
+ No account, no key, no signup.
26
+
27
+ **Single-file binary.** One file. No Node, no npm, no `node_modules`, nothing installed.
28
+
29
+ ```bash
30
+ curl -fsSL https://github.com/BargLabs/cejel/releases/latest/download/cejel-$(uname -s)-$(uname -m) -o cejel
31
+ chmod +x cejel
32
+ ./cejel .
33
+ ```
34
+
35
+ **Don't take the offline claim on trust — check it.** Turn your network off, then run the
36
+ binary. It will score your repository and write you a certificate anyway. That is the whole
37
+ product, and you can falsify it in ten seconds:
38
+
39
+ ```bash
40
+ # with Wi-Fi off, or:
41
+ docker run --rm --network=none -v "$PWD:/w" -w /w -v "$PWD/cejel:/cejel:ro" debian:stable-slim /cejel .
42
+ ```
43
+
44
+ **npm.**
45
+
46
+ ```bash
47
+ npx @cejel/cejel .
48
+ ```
64
49
 
65
- Run it with whichever package manager you already have — no install, no signup. All of
66
- these pull the same `cejel` package from the npm registry:
50
+ > **On the name.** npm rejects the unscoped `cejel` package name as too similar to an
51
+ > existing package (`level`). The published package is the scoped `@cejel/cejel`.
52
+
53
+ **GitHub Action** — score every PR and publish the badge:
54
+
55
+ ```yaml
56
+ - uses: BargLabs/cejel/action@v1
57
+ with:
58
+ min-score: "2.5" # optional: fail the build below this
59
+ ```
60
+
61
+ **From source** — it is AGPL and it runs offline, so reading it is rather the point:
67
62
 
68
63
  ```bash
69
- npx cejel . # npm
70
- pnpm dlx cejel . # pnpm
71
- yarn dlx cejel . # yarn
72
- bunx cejel . # bun
73
- deno run -A npm:cejel . # deno
64
+ git clone https://github.com/BargLabs/cejel && cd cejel
65
+ pnpm install && pnpm build
66
+ node dist/index.js .
67
+ ```
68
+
69
+ Released binaries: `cejel-Darwin-arm64`, `cejel-Linux-x86_64`. A Homebrew tap and the
70
+ remaining architectures are in progress; they are not listed here because they do not exist
71
+ yet.
72
+
73
+ ## Usage
74
+
75
+ ```bash
76
+ ./cejel .
74
77
  ```
75
78
 
76
79
  Scores the current directory with sensible defaults: no flags, no signup, fully offline.
@@ -85,13 +88,42 @@ Prints a concise terminal certificate and writes to `.cejel/`:
85
88
  ### Flags
86
89
 
87
90
  - `<path>` — repo to score (default: current directory)
88
- - `--out-dir <dir>` — where to write report/certificate/badge files (default: `.cejel`)
91
+ - `--out <dir>` — where to write report/certificate/badge files (default: `.cejel`;
92
+ `--out-dir` remains available as a compatibility alias)
89
93
  - `--min-score <n>` — exit non-zero if the overall score is below `n` (0–4); used by the
90
94
  GitHub Action's optional threshold gate
91
95
  - `--ingest <file|glob>` — fold another scanner's output into the score (repeatable). Accepts
92
96
  SARIF, OpenSSF Scorecard JSON, or the generic Cejel external-signal shape — format is
93
97
  auto-detected. See "Aggregate your scanners" below.
94
98
  - `--quiet` — suppress the terminal certificate (files are still written)
99
+ - `-h`, `--help` — print usage and exit successfully
100
+ - `-v`, `--version` — print the version derived from the package manifest and exit successfully
101
+
102
+ ## Supported languages
103
+
104
+ Cejel reads a repository's file tree, not its bytecode — it needs to recognise a file's
105
+ source extension to say anything about it. It does not support every language, and it says so
106
+ honestly rather than guessing:
107
+
108
+ - **Deeply modelled** — JS/TS, Python: test detection, coverage, and claim-vs-reality checks
109
+ are tuned specifically for these ecosystems.
110
+ - **Partially modelled** — Go, Rust, Java, Ruby, PHP, C#, C/C++, Swift, Kotlin, Dart, Elixir,
111
+ Scala: recognised as source and scored on the language-agnostic dimensions (CI discipline,
112
+ dependency hygiene, audit trail, secrets), but without ecosystem-specific test-framework
113
+ tuning.
114
+ - **Recognised but unmodelled** — shell, R, Lua, Julia, Haskell, Terraform, SQL, Perl, OCaml,
115
+ Clojure, Erlang, Nim, Zig, F#, Groovy: counted as source so a repo isn't misread as empty,
116
+ but with the least ecosystem-specific tuning of the three tiers.
117
+ - **Not yet recognised** — other ecosystems, including COBOL, Fortran, and MATLAB. Cejel does
118
+ not score these as "source" at all: a repository with zero
119
+ recognised-extension files gets the `unrecognised_ecosystem` archetype, an explicit
120
+ `insufficient_data` status, and **no verdict** — never a confident numeric score, and never
121
+ the word "Unverified" for the sole reason that cejel cannot read the language. The
122
+ certificate states plainly which of the 11 dimensions were and were not measured.
123
+
124
+ This list will grow. It will never be "any codebase" — that claim is a promise the parser
125
+ cannot keep, and an honest support matrix is worth more than a marketing line the code
126
+ contradicts on the first unsupported repository someone runs it against.
95
127
 
96
128
  ## Aggregate your scanners
97
129
 
@@ -101,7 +133,7 @@ Cejel folds those findings into the same rubric-scored, offline trust certificat
101
133
  contributing tools shown in the certificate and report as provenance:
102
134
 
103
135
  ```bash
104
- npx cejel . --ingest munatrust.sarif --ingest scorecard.json
136
+ ./cejel . --ingest munatrust.sarif --ingest scorecard.json
105
137
  ```
106
138
 
107
139
  Or drop files in `.cejel/inputs/` and they're picked up automatically, no flag needed:
@@ -109,7 +141,7 @@ Or drop files in `.cejel/inputs/` and they're picked up automatically, no flag n
109
141
  ```bash
110
142
  mkdir -p .cejel/inputs
111
143
  cp munatrust-results.sarif .cejel/inputs/
112
- npx cejel .
144
+ ./cejel .
113
145
  ```
114
146
 
115
147
  External findings only ever adjust a dimension score *downward*, and by a bounded amount —
@@ -176,7 +208,7 @@ a configurable `min-score` threshold. The scoring step makes no network calls an
176
208
  secrets.
177
209
 
178
210
  ```yaml
179
- - uses: BargLabs/cejel/action@main
211
+ - uses: BargLabs/cejel/action@v1
180
212
  with:
181
213
  min-score: '2.5' # optional; omit to never fail the check
182
214
  ```
@@ -195,7 +227,7 @@ Add it to an MCP client config:
195
227
  "mcpServers": {
196
228
  "cejel": {
197
229
  "command": "npx",
198
- "args": ["-y", "--package=cejel", "cejel-mcp"]
230
+ "args": ["-y", "--package=@cejel/cejel", "cejel-mcp"]
199
231
  }
200
232
  }
201
233
  }
@@ -206,18 +238,19 @@ The server exposes one tool and two resources:
206
238
  - `scan` — input `{ path, format? }`; scores the repository at `path` and returns the trust
207
239
  cert as JSON (`format: "summary"`, the default, is the compact digest; `format: "json"` is
208
240
  the full report, identical to the CLI's `report.json`).
209
- - `cejel://last-scan/certificate.html` and `cejel://last-scan/badge.svg` — the HTML
210
- certificate and SVG badge for the most recent scan.
241
+ - `cejel-cejel://last-scan/certificate.html` and `cejel-cejel://last-scan/badge.svg` — the
242
+ HTML certificate and SVG badge for the most recent scan (the URI scheme derives from the
243
+ npm package name, `@cejel/cejel` → `cejel-cejel`).
211
244
 
212
245
  Like the CLI, scoring over MCP is fully offline: no network calls, no telemetry, no signup,
213
246
  and the server writes no files.
214
247
 
215
248
  ## What "offline" means here
216
249
 
217
- Scoring a repo — `npx cejel .` itself, and the Action's scoring step — makes zero network
218
- calls: no telemetry, no signup, no model call. Fetching the `cejel` package the first time
219
- (like any npm-distributed CLI, including this Action's own dependency install) does need
220
- network; that's a one-time install cost, not part of the scoring guarantee.
250
+ Scoring a repo — `cejel .` itself, and the Action's scoring step — makes zero network
251
+ calls: no telemetry, no signup, no model call. Fetching the `@cejel/cejel` package the
252
+ first time (like any npm-distributed CLI, including this Action's own dependency install)
253
+ does need network; that's a one-time install cost, not part of the scoring guarantee.
221
254
 
222
255
  ## The public leaderboard: what we redact, what we exclude, and where we were wrong
223
256
 
@@ -236,19 +269,18 @@ enforced structurally — the public artifacts are built from filtered data rath
236
269
  rendered and then scrubbed — and a build that would emit a private path fails rather than
237
270
  publishes.
238
271
 
239
- **What we exclude from ranking.** Two of the eleven dimensions — B1 (dispatch trace
240
- completeness) and B5 (verified learning trace) — measure signals that only exist inside the
241
- agent substrate Cejel was built in. No external repository can produce them. They are
242
- therefore **excluded from the ranking for every repository, including ours**: we do not
243
- score you on something you cannot have, and we do not award ourselves points for something
244
- you cannot contest. You will still see them defined in the rubric source, because the rubric
245
- is the published standard and hiding two of its dimensions would make it incomplete. Where a
246
- dimension does not apply to a repository, the certificate says *not applicable* rather than
247
- quietly scoring it zero.
272
+ **What we exclude from ranking.** The v3 repository scanner does not evaluate B1 (dispatch
273
+ trace completeness) or B5 (verified learning trace) for repository inputs, including ours:
274
+ both are always *not applicable* in a repository certificate. They remain defined in the
275
+ rubric for structured substrate evidence, but that evidence is not accepted by this scanner.
276
+ The ranking excludes both dimensions fail-closed, including when it reads a legacy or
277
+ separately produced structured report. We neither score you on evidence the public scanner
278
+ cannot collect nor award ourselves points for evidence you cannot contest.
248
279
 
249
- **Where we were wrong.** Calibrating this rubric against real repositories surfaced four
250
- errors in our own tool, all found before publication and all fixed. We list them because a
251
- scoring tool that has never been wrong is a scoring tool that has not been checked:
280
+ **Where we were wrong.** Calibrating this rubric against real repositories — and running the
281
+ board itself like a stranger would — surfaced seven errors in our own tool, all found before
282
+ (or, in one case, on) publication day, and all fixed. We list them because a scoring tool
283
+ that has never been wrong is a scoring tool that has not been checked:
252
284
 
253
285
  - **Django, scored a false critical on dependency hygiene.** We applied application-shaped
254
286
  expectations to a library. Archetype now gates the dimension.
@@ -267,11 +299,28 @@ scoring tool that has never been wrong is a scoring tool that has not been check
267
299
  the *shape* (a cron-scheduled workflow that runs the verification suite, and whether its
268
300
  results are durably published or only handed to an ephemeral CI artifact); our own internal
269
301
  nightly QA workflow is one recognized instance of that shape, not its definition.
270
-
271
- Every one of these was a false alarm produced by *us*, about *other people's code*, and we
272
- would rather you knew that than discovered it. If you believe the board scores your
273
- repository wrongly, open an issue — a rubric that cannot be corrected in public has no
274
- business being published in public.
302
+ - **Our board and our own certificates disagreed on four repositories' headline scores by
303
+ 0.1** — two coherent bases (the board's fair cross-repo ranking basis, and each
304
+ certificate's own-dimension basis), one word, "Overall", printed on both. We found it on
305
+ launch day and fixed it: "Overall" is now byte-identical everywhere it appears — board,
306
+ certificate, badge, report, and JSON — and the ranking basis, where it genuinely differs,
307
+ has its own separate, explicitly labeled column instead of borrowing the same name.
308
+ - **Our own row used a scoring path nobody else could run.** The board generator could add
309
+ internal collectors after the public scan, so its reassuring collector blacklist was not
310
+ the invariant it claimed to be. Rubric v3 removes that second path: every corpus row now
311
+ passes through the same sealed public scorer, every external source is pinned to a commit,
312
+ and a required guard re-scores every row and compares score, verdict, coverage, and
313
+ evidence. The honest correction moved Alfred's Code score from 2.5 to 2.4 and A5 from 2.9
314
+ to 2.4. It is less flattering and more trustworthy.
315
+ - **Version 0.1.1 rejected `--help` and `--version` as unknown flags, and read `-h` as a
316
+ directory path.** Version 0.1.2 handles both aliases before positional-path parsing and
317
+ derives its printed version from the package manifest.
318
+
319
+ Every one was a trust failure produced by *us* — false alarms about other people's code,
320
+ silent omissions, inconsistent presentation, or a home-only scoring path — and we would
321
+ rather you knew that than discovered it. If you believe the board scores your repository
322
+ wrongly, open an issue — a rubric that cannot be corrected in public has no business being
323
+ published in public.
275
324
 
276
325
  **No rubric change re-scores you silently.** Every change to scoring behavior requires a
277
326
  `WITAN_RUBRIC_VERSION` bump and a corpus-wide before/after delta published in