A Cline eval harness: scores diff quality + tool-trajectory from a real Cline messages.json trace.
Project description
Clinescope
Clinescope is an AI evaluation tool that lives in your Cline development workflow, reads your logs, and helps you write better prompts by checking tool choices, catching messy code rewrites, and ensuring updates don't break past work.
Clinescope reads a Cline log and scores four things:
tool_selection: did the agent call the tools the task needed?diff_coherence: are its code patches valid and well-formed?diff_minimality: are its edits small and focused, not bloated rewrites?apply_recovery: when a patch failed, did the agent fix it?
Clinescope is an independent, unofficial tool - not affiliated with, endorsed by, or sponsored by Cline or Cline Bot Inc. "Cline" is a trademark of Cline Bot Inc., used only to describe compatibility.
Why Clinescope (the wedge)
Most eval frameworks score chatbot Q&A. Clinescope scores coding-agent execution traces — and it
ships the one thing the incumbents leave to "write your own custom scorer": a code-diff-quality
scorer. DeepEval scores tool selection but not code patches or diffs; promptfoo, Langfuse, and
Braintrust hand the diff scorer to you; UK AISI's Inspect runs SWE agents but ships no diff-quality
scorer. Clinescope's diff_coherence / diff_minimality / apply_recovery scorers are that layer,
run against real captured Cline traces (see the validation corpus).
Is the LLM judge any good? (judge validation)
An eval tool that uses an LLM to judge quality has to answer one question honestly: does the judge
agree with a human? Clinescope measures this the way a rigorous eval reader expects — chance-corrected
inter-rater agreement (Cohen's κ) between the LLM judge and a human-labeled gold set, with a
bootstrap confidence interval. The result on the current 50-item gold set (a free local gpt-oss:20b
judge vs. 50 blind human labels):
cohen_kappa: 0.0496 95% CI: [-0.1200, 0.2175] N = 50
confusion (rows = human, cols = judge):
human WASTEFUL → 3 agree / 21 missed
human NOT-WASTEFUL → 24 agree / 2 missed
The confusion matrix tells the story: the free 20B judge is strongly NOT-WASTEFUL-biased — it calls
almost everything "fine," so on a balanced set it catches only 3 of 24 genuinely wasteful patches.
Because κ ≈ 0 is far below the 0.5 floor, the judge is deliberately treated as advisory-only and kept
out of the CI gate — clinescope-gate fires only on the deterministic scorers, never on a judge that
measured at chance level. That negative result is the point: Clinescope gates on the signals it trusts
and, provably, not on the one it doesn't. Recompute it yourself with no model call:
python -m clinescope.judge_run --report-only # reads the committed cache; prints κ + CI
python -m clinescope.judge_multidraw --report-only # how much κ moves across repeated draws
Honest caveats: N is still small so the CI is wide (it straddles zero), the judge is one free local
model on small edits, and a single-draw κ isn't reproducible to the digit — gpt-oss:20b flips labels
run-to-run even at temperature 0, which judge_multidraw measures directly (per-draw κ spread + Fleiss'
self-consistency). Growing the gold set from 26 to 50 harder, balanced, blind-labeled cases lowered the
measured κ — an honest floor, not a marketing figure. Robustness across multiple/frontier judge models
is on the roadmap.
Get Started
-
Install Clinescope
Requires Python 3.11+. Installing into a virtual environment is recommended.
pip install clinescope
Zero runtime dependencies (pure stdlib). The bundled sample traces, the real-trace validation corpus, and the human-labeled judge gold set all ship with the install, so
clinescope-corpusandpython -m clinescope.judge_run --report-onlywork out of the box — nogit cloneneeded. -
Use Clinescope
Get the score:
Point Clinescope at a Cline log file (a
messages.jsontrace) to score the run — replacepath/to/messages.jsonbelow with your own. (Cloned the repo instead ofpip install? The same commands run as-is against the bundledexamples/sample-trace.json.)clinescope path/to/messages.json --expected read_files apply_patch
After
--expected, list the tools you think the task needed. Clinescope checks whether the agent actually used them and scores the rest of the run automatically. Not sure which tool names to use? Runclinescope --list-toolsto print the ones Clinescope knows.Get full breakdown of every scorer:
clinescope path/to/messages.json --expected read_files apply_patch --verbose
Get advice to improve prompting:
clinescope path/to/messages.json --expected read_files apply_patch --advice
Compare several runs side by side:
Run the same task against different models (or Cline versions) and score them all in one table:
python -m clinescope.compare run-a.json run-b.json run-c.json
Each row is one run; the columns are the four scorers. To score
tool_selectionper run (each task expects different tools), pass a--labels manifest.jsonmapping each trace path to its{"display": "...", "expected_tools": [...]}.
Validation Corpus
Clinescope ships a corpus of real captured Cline runs in examples/corpus/, each hand-labeled in corpus.json with its expected score profile, failure taxonomy, and the evidence its advice should name. A runner scores every trace, checks it against its label, prints a summary table, and exits non-zero if any trace fails its label — so the corpus is a real regression gate, not a demo. It ships with the install, so it runs anywhere:
clinescope-corpus # or: python -m clinescope.corpus
This is the un-fakeable evidence that Clinescope catches real agent failures (and stays quiet on clean runs): the traces are real, the failures are real, and the runner proves Clinescope reproduces every labeled outcome. Six real traces cover three of the four failure modes; the fourth (blind_rewrite) is an honestly-stated gap — see examples/corpus/README.md for the coverage table and why no local model produced it.
Reporting Bugs
Small, discussed-first changes are welcome -- see CONTRIBUTING.md for dev setup, tests, and what a scorer change needs. You can file a GitHub issue.
License
Apache-2.0. Copyright 2026 Tran Binh Minh.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file clinescope-1.0.1.tar.gz.
File metadata
- Download URL: clinescope-1.0.1.tar.gz
- Upload date:
- Size: 240.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e5c251bcfb4fff5307801e658073365a5993fc423a8ee4bb8492c62f5b19128
|
|
| MD5 |
79de0b6873757f7288327ffd05cfb0a2
|
|
| BLAKE2b-256 |
6bb7087fc6ee93bf8bc96dde0acf95417b03926646d1dfd4aec12a1b3aeb2d49
|
Provenance
The following attestation bundles were made for clinescope-1.0.1.tar.gz:
Publisher:
release.yml on minh2416294/clinescope
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clinescope-1.0.1.tar.gz -
Subject digest:
7e5c251bcfb4fff5307801e658073365a5993fc423a8ee4bb8492c62f5b19128 - Sigstore transparency entry: 2154244514
- Sigstore integration time:
-
Permalink:
minh2416294/clinescope@6272ff9eef11b465c3d6f7fc31e5a0e830a26066 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/minh2416294
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6272ff9eef11b465c3d6f7fc31e5a0e830a26066 -
Trigger Event:
release
-
Statement type:
File details
Details for the file clinescope-1.0.1-py3-none-any.whl.
File metadata
- Download URL: clinescope-1.0.1-py3-none-any.whl
- Upload date:
- Size: 193.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4be3185998524b7cd42a90fdefcc8beff79cf72e2e92133d96a429a7634a67ae
|
|
| MD5 |
66054da60d037e202efe9fc8ccfbbb6d
|
|
| BLAKE2b-256 |
e019d399aa896d61a5fdb32530ff7a87259460260f10af56aa27e4aef1ba3641
|
Provenance
The following attestation bundles were made for clinescope-1.0.1-py3-none-any.whl:
Publisher:
release.yml on minh2416294/clinescope
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clinescope-1.0.1-py3-none-any.whl -
Subject digest:
4be3185998524b7cd42a90fdefcc8beff79cf72e2e92133d96a429a7634a67ae - Sigstore transparency entry: 2154244597
- Sigstore integration time:
-
Permalink:
minh2416294/clinescope@6272ff9eef11b465c3d6f7fc31e5a0e830a26066 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/minh2416294
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6272ff9eef11b465c3d6f7fc31e5a0e830a26066 -
Trigger Event:
release
-
Statement type: