Skip to content

novelty: program checks on probes (identifiers veto) + grading-ladder design note - #472

Merged
napetrov merged 72 commits into
intel:mainfrom
napetrov:research/grading-tiers
Nov 14, 2026
Merged

napetrov merged 72 commits into
intel:mainfrom
napetrov:research/grading-tiers

Conversation

@napetrov

@napetrov napetrov commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Design note and its first implementation: docs/grading-tiers.md. Implemented: grading checks on atoms and probes with the roles veto, sufficient and evidence; the identifiers check; skill novelty ground (a veto from a tool's own --help); key verification (meta.key_status). Still proposed: the exec and source checks, derived answer slots, source drift.

Problem. Novelty probes are graded by one LLM judge, and the only check on that judge is inter-judge agreement. Two judges can agree and both be wrong.

Proposal. Grade each probe with the most objective grader available, as a ladder: (1) verifiable (exec, cli_help), (2) grounded (source snapshot from official docs, man pages, Sphinx inventories), (3) judge. The checks reuse the grading.checks schema from eval score reference. Each check has a role (veto / sufficient / evidence). The judge always runs in shadow, so on the subset a check decides, judge accuracy against ground truth comes out of the same run.

Prototype (no model calls, stored lab probe results, 7 public-tool skills):

  • 26% of 1,371 public atoms have an identifier a source can check. Every hand-reviewed not_found came from a negative claim, a version-bound claim, the wrong tool or a router gap; none was a skill error.
  • Treating slot presence as a positive grader agrees with the judges less than the judges agree with each other (75.8% / 80.0% vs 87.6%). In all 6 hand-checked disagreements, the judge was right.
  • Veto works: 3 of 137 perf answers named flags that don't exist in perf 6.17 (perf report --stdin and others). Judge 1 graded all three correct. The sample is tiny.

Open questions are listed in the note. This round fixed the review on 8e7de9c (the veto's negation and scope, the bracketed help, key verification, the atomic write of ground, the sufficient-check tests) and corrected the doc claims the review named. The one question it raised (a screen reference) is fixed.

🤖 Generated with Claude Code

Research note: verifiable and grounded checks on novelty probes, with the
judge kept in shadow so its accuracy against ground truth can be measured.
Includes prototype numbers from stored probe results (no model calls).

Signed-off-by: Petrov, Nikolay A <nikolay.a.petrov@intel.com>
@napetrov napetrov added the skip-changelog No user-visible change: bypasses the changelog fragment check label Nov 8, 2026
@codecov-commenter

codecov-commenter commented Nov 8, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 95.74468% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.73%. Comparing base (37ba217) to head (1ea8665).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
dokimi/dokimi/novelty/grounding.py 93.84% 5 Missing and 3 partials ⚠️
dokimi/dokimi/eval/reference_checks.py 95.78% 2 Missing and 2 partials ⚠️
dokimi/dokimi/commands/novelty_ground.py 94.11% 2 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff            @@
##             main     #472    +/-   ##
========================================
  Coverage   95.73%   95.73%            
========================================
  Files         403      405     +2     
  Lines       54061    54375   +314     
  Branches     9308     9364    +56     
========================================
+ Hits        51755    52056   +301     
- Misses       1421     1430     +9     
- Partials      885      889     +4     
Files with missing lines Coverage Δ
dokimi/dokimi/cli_routes.py 98.03% <ø> (ø)
dokimi/dokimi/commands/skill.py 100.00% <100.00%> (ø)
dokimi/dokimi/novelty/judge2.py 100.00% <100.00%> (ø)
dokimi/dokimi/novelty/measure.py 98.73% <100.00%> (+0.19%) ⬆️
dokimi/dokimi/novelty/probes.py 100.00% <100.00%> (ø)
dokimi/dokimi/novelty/report.py 98.78% <ø> (ø)
dokimi/dokimi/commands/novelty_ground.py 94.11% <94.11%> (ø)
dokimi/dokimi/eval/reference_checks.py 95.62% <95.78%> (+0.28%) ⬆️
dokimi/dokimi/novelty/grounding.py 93.84% <93.84%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…ound

An atom's meta.grading (the reference-check schema) now reaches its direct
and paraphrase probes; non-judge checks run on every answer next to the
judge. A failed veto makes the answer wrong_other, a sufficient check
decides, evidence is recorded only. Checked runs keep the judge's verdict,
and the probe record reports how often the judge passed a vetoed answer.

New identifiers check and 'skill novelty ground', which builds a veto from
a tool's own --help. The design note drops the grounded-judge idea.

Signed-off-by: Petrov, Nikolay A <nikolay.a.petrov@intel.com>
Signed-off-by: Petrov, Nikolay A <nikolay.a.petrov@intel.com>
@napetrov napetrov removed the skip-changelog No user-visible change: bypasses the changelog fragment check label Nov 8, 2026
@napetrov napetrov changed the title docs: design note for a grading ladder beyond the LLM judge novelty: program checks on probes (identifiers veto) + grading-ladder design note Nov 8, 2026
@github-actions github-actions Bot added the cli-interface-change Changes dokimi's user-facing CLI surface label Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

CLI interface change detected

This PR changes dokimi's user-facing CLI surface (commands and/or options):

+ added command `dokimi skill novelty ground`
    + option `--atoms`
    + option `--help/-h`
    + option `--out`
    + option `--tool`
    + option `--tool-version`

Updated on every push; the cli-interface-change label is on while the diff is non-empty.

@napetrov
napetrov marked this pull request as ready for review November 8, 2026 22:17
@napetrov
napetrov requested a review from a team as a code owner November 8, 2026 22:17
Copilot AI balanced review requested due to automatic review settings November 8, 2026 22:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved critical defects can reject correct answers, accept invented flags, crash grading, and stall measurement workers through unbounded regex scans.

9 open issues
What changed in this PR

12 new findings: 9 must-fix and 3 lower-priority documentation nits.

This PR adds programmatic checks alongside dokimi’s novelty judge and documents the broader grading-ladder proposal. Unlike the description’s docs-only scope, it implements identifier vetoes, verdict resolution, and check reporting.

Changes:

  • Add skill novelty ground to attach identifier checks derived from tool help.
  • Carry grading checks through probes, resolve verdicts by check role, and record judge/check comparisons.
  • Add regression tests, user documentation, a design note, and a changelog entry.
File Description
dokimi/​tests/​test_novelty_checks.py Tests grounding, check roles, verdicts, and serialization.
dokimi/​mkdocs.yml Adds the grading-ladder page to navigation.
dokimi/​dokimi/​novelty/​report.py Includes check summaries in probe records.
dokimi/​dokimi/​novelty/​probes.py Validates and attaches atom grading to probes.
dokimi/​dokimi/​novelty/​measure.py Runs checks, resolves verdicts, and summarizes comparisons.
dokimi/​dokimi/​novelty/​grounding.py Builds and attaches help-derived identifier vetoes.
dokimi/​dokimi/​eval/​reference_checks.py Adds identifier checks and role/tier validation.
dokimi/​dokimi/​commands/​skill.py Registers the grounding command and arguments.
dokimi/​dokimi/​commands/​novelty.py Implements grounding of saved atom records.
dokimi/​docs/​skill-novelty.md Documents program checks in novelty evaluation.
dokimi/​docs/​README.md Links the grading-ladder design note.
dokimi/​docs/​grading-tiers.md Describes implementation, proposals, and prototype evidence.
dokimi/​changelog.d/​20261108_120000_napetrov_grading-tiers.md Announces program checks and the grounding command.

Review effort: Balanced

Comment thread dokimi/dokimi/eval/reference_checks.py Resolved
Comment thread dokimi/dokimi/eval/reference_checks.py Resolved
Comment thread dokimi/dokimi/eval/reference_checks.py Resolved
Comment thread dokimi/dokimi/novelty/grounding.py Resolved
Comment thread dokimi/dokimi/novelty/grounding.py Resolved
Comment thread dokimi/dokimi/novelty/grounding.py Resolved
Comment thread dokimi/dokimi/novelty/grounding.py Resolved
Comment thread dokimi/dokimi/novelty/grounding.py Resolved
Comment thread dokimi/dokimi/novelty/measure.py Resolved
…t check validation

Fixes CI on intel#472: cost-table leaf, allowlisted --tool/--tool-version, child
process through dokimi.process, novelty.py back under its line baseline,
_check_problems under the complexity cap, doc list indentation, CLI snapshot.

Signed-off-by: Petrov, Nikolay A <nikolay.a.petrov@intel.com>
…status)

Signed-off-by: Petrov, Nikolay A <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g861E9Gu
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g861E9G7
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g861E9G-
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g861E9HI
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g861E9HO
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g861E9HZ
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g861E9Hg
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g861E9Hl
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g861E9Hq
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g861E9G-

Thread: PRRT_kwDOVBg7g861E9HI

Thread: PRRT_kwDOVBg7g861E9HZ
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g861E9HZ
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
…nt-block check)

Thread: none (CI fix: Static checks, comment blocks)
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
@exai-bot

exai-bot commented Nov 9, 2026 •

Copy link
Copy Markdown

OpenCodeReview: Commit 1ea8665 was not reviewed. This PR has reached its review limit (6 reviews).

CI at `1ea8665`: 13 still running, 4 passing, 1 skipped
Check Status
Build docs (strict) still running
CLI interface diff still running
CodeQL (actions) still running
CodeQL (python) still running
External catalog smoke test (uxlfoundation/skills) still running
Linux Python 3.11 still running
Linux Python 3.14 still running
Linux Wheels Python 3.11 still running
Linux Wheels Python 3.14 still running
Static checks (ruff, schema, zizmor, licenses, pre-commit, bandit, secrets, changelog, schema com... still running

3 more not listed.

To review this commit: re-request review from exai-bot in the Reviewers list.

<details><summary>Last review (cdefa30): 5 medium</summary>

Open threads from the bot: 0

</details>

Comment thread dokimi/docs/README.md Resolved
Comment thread dokimi/dokimi/eval/reference_checks.py Resolved
Comment thread dokimi/dokimi/novelty/grounding.py Resolved
Comment thread dokimi/dokimi/novelty/grounding.py Resolved
Comment thread dokimi/dokimi/novelty/grounding.py Resolved
@napetrov

Copy link
Copy Markdown
Contributor Author

Open risks at 4aef7d8, and where each one stands:

  • Negation earlier in the clause (aJoyg, vlad's thread): asked on the review; no change until you choose.
  • Contractions and curly apostrophes (YCl-): fixed in f801b50 and 4479e10.
  • Bare -- with no comma (YCl4): known limit, documented in 4aef7d8.
  • Two nits on da817b9 and 488d95a: already fixed, marker f07dbb2.

@vlad-perevezentsev vlad-perevezentsev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review at 7755042. Seven of my eight points from the last round are fixed and tested: the judge2 comparison, the sufficient refusal, the docs in answer-formats.md, --, regex validation, the write error and the full missing list. The negation point is still open, and I answered your (a)/(b) question in its thread. One new gap: a run kept at the spend-cap stop skips its checks (line comment).

What I ran, at 7755042:

  • make ci-local --offline: 18,588 passed, 0 failed, 72 skipped; every row passes.
  • Repros with mocked clients: the veto on the negation answers in the thread, and a judge reply refused as SpendCapReached on a vetoed answer. The proposed negation rule, patched in at test time: all 75 tests in test_novelty_checks.py pass.
  • On Windows (Server 2025, Python 3.13): not run. The VM cannot make a venv from the lock (litellm==1.106.4 needs filelock<4, the lock pins 4.2.4); main has the same pins, so it is not from this PR.

Checked, no issues

  • judge2: regrade samples and compares the first judge's verdict, and the new test fails on the old code (2 sampled, agreement 0).
  • Denials after a flag: does not exist / is not an option / doesn't / curly apostrophes skip only the flag they follow, also past a closing backtick.
  • Key verification: verify_keys takes missing from identifier_names, so every unknown name is kept, and it reads through the same scan as the veto.

Comment thread dokimi/dokimi/novelty/measure.py Resolved
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
…ply was kept

_capped_grade_run returned before _apply_checks, so a judge reply the cap refused
after it came back kept its verdict with no checks, and a vetoed answer could pass.

Thread: PRRT_kwDOVBg7g862mJ_7
Review: PRR_kwDOVBg7g88AAAABXhk3vA
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g861p_eW
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
…arrow-rule issue

Review: PRR_kwDOVBg7g88AAAABXaJoyg
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
…no verdict

The run stayed ungraded even when the veto failed, so a graded answer counted as not run.

Review: PRR_kwDOVBg7g88AAAABXhk3vA
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Review: PRR_kwDOVBg7g88AAAABXhk3vA
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
… the veto says

A run the cap stopped must keep the file partial: a veto verdict on it would let the
stop's no-price message and the ungraded count go unreported.

Review: PRR_kwDOVBg7g88AAAABXhk3vA
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
@napetrov

Copy link
Copy Markdown
Contributor Author

Re: review by vlad-perevezentsev

One new gap: a run kept at the spend-cap stop skips its checks
Fixed in 31113d6, the same change as the thread above; pinned by a new test.

@napetrov

Copy link
Copy Markdown
Contributor Author

Re: review by antonwolfy

a negation word earlier in the clause skips the command after it
Declined for this PR: without X, use cmd stays a documented known false pass (8fdc1b4). The narrow rule for without, no and if you can't ... <command> forms is #669.

Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>

@vlad-perevezentsev vlad-perevezentsev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I checked f1d9202. 4e85279 fixes the capped run: the veto now grades a judge reply the spend cap refused, and a reply with no verdict still counts as ungraded, so the file stays partial. The negation point is a documented known limit, with #669 for the narrow rule. I agree with keeping it out of this PR, since a miss there leaves the judge's verdict standing.

Merge: safe now: it merges cleanly into current main, 10 commits behind, and its tests pass on the merge (test_novelty_checks.py, test_novelty_provenance.py, test_reference_checks.py, test_cli_surface.py: 247 passed). Once it is in, #489, #588, #627, #633 and #482 conflict with it (docs/README.md, mkdocs.yml, cli_flags_allowlist.txt, novelty/probes.py) and need a rebase.

What I ran, at f1d9202:

  • make ci-local --offline: 19,011 passed, 0 failed, 72 skipped; every row passes.
  • The capped-run cases: a refused reply that names a verdict and one that names none, on a vetoed answer.

Checked, no issues

  • Capped runs: _capped_grade_run runs the checks either way. A vetoed answer is wrong_other, and ungraded still counts a reply with no verdict, so analyze and probe report the stop.
  • Docs: the known-limit paragraph in grading-tiers.md names the :, No TUI needed: and without the TUI cases, as the code behaves.

napetrov and others added 3 commits November 13, 2026 13:25
…ding-tiers

Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>

# Conflicts:
#	dokimi/dokimi/novelty/probes.py
…nding fixes with tests

add_checks attached an empty grading block to atoms that name no tool; the skip is back.
Tests added for a non-executable --tool, null meta or meta.grading, a custom pattern match with `=`, and a Windows --tool path.
add_checks attached an empty grading block to atoms that name no tool; the skip is back.
A --tool path reads backslashes as separators only when it starts with a drive letter, so `/opt/my\ tools/perf` keeps its escaped space.
Tests added for a non-executable --tool, null meta or meta.grading, a custom pattern match with `=`, and Windows and POSIX --tool paths.

Signed-off-by: vchamarthi <123653452+vchamarthi@users.noreply.github.com>
`checks: null`, a non-object check or a non-object grading crashed
`ground` with exit 5 (infra), while `probe` refuses the same atoms file
as an input error. Validate every atom's grading with validate_grading
first, so add_checks and verify_keys see only valid blocks.

Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
@xaleryb

xaleryb commented Nov 14, 2026

Copy link
Copy Markdown
Contributor
  • Ran skill novelty ground at 091e01c on atoms files that carry a malformed meta.grading.
  • {"checks": null}, {"checks": ["x"]} or "x" as an atom's grading -> exit 5 with TypeError/AttributeError from add_checks, or from verify_keys when the atom does not name the tool. Expected: exit 2 with atom <id>: invalid grading: ..., which is what skill novelty probe gives for the same file (probes.atom_grading).
  • Pushed 620dc9c (091e01c..620dc9c): every atom's grading is validated with validate_grading before add_checks and verify_keys run; tests cover both steps and the command, for a named and an unnamed tool. Full suite, ruff, mypy, bandit and docs check --strict pass with it.
  • Static checks fails at check-added-large-files on docs/reference/cli-interface.json (504 KB here; main is at 501 KB against the 500 KB limit, fixed by fix(cli): the CLI snapshot writes one line per parameter #737). The snapshot may need regenerating after fix(cli): the CLI snapshot writes one line per parameter #737 lands.

Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
@xaleryb

xaleryb commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Pushed 1ea8665 (620dc9c..1ea8665): merges main and regenerates docs/reference/cli-interface.json with make cli-snapshot on Python 3.13. The text merge applied cleanly but left the new skill novelty ground block in the old multi-line layout; the regenerated file is 294 KB and passes the large-file hook. On the merged tree the full suite (19830 passed), ruff, mypy, bandit, docs check --strict and the "CLI snapshot is current" step pass; cli_surface.py diff against main lists only the new skill novelty ground command.

@napetrov
napetrov merged commit 8dec40f into intel:main Nov 14, 2026
29 checks passed
napetrov added a commit to napetrov/dokimi that referenced this pull request Nov 14, 2026
Cards 29, 34 and 41 and the development pages still called merged work
open (intel#455, intel#459, intel#472, intel#556, intel#557, intel#588, intel#590, intel#594, intel#595, intel#596). Their
availability, next steps and the work index now match the merged state, and
the routing and cost-control notes name the new commands.

Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli-interface-change Changes dokimi's user-facing CLI surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants