Skip to content

docs(cli): help text for every option; test the deferred list - #1420

Merged
napetrov merged 18 commits into
intel:mainfrom
napetrov:docs/cli-help-strings
Dec 2, 2026
Merged

napetrov merged 18 commits into
intel:mainfrom
napetrov:docs/cli-help-strings

Conversation

@napetrov

@napetrov napetrov commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Part of #94 (Q15: help strings and labels; REVIEW M3).

Summary

  • Added help across the CLI, including agent replay --profile. The CLI interface snapshot confirms identical flags, defaults, choices, and types.
  • tests/test_cli_option_help.py checks that every visible option and positional has help. DEFERRED lists exact command and option pairs and rejects stale entries.
  • REVIEW M3: benchmark preflight and repo compare stay FREE (see below). The model and judge options introduced by Part of #94 (F1b, model + judge) #1197 are preserved.

Table (leaf, option, new help)

leaf option help added
agent replay --profile Task profile used to score the archived sessions
arms matrix-run --concurrency Answers in flight at once
arms matrix-run --rerank-threshold Min relevance score for a doc to be kept after reranking
arms plugin-delta --out Plugin-delta JSON output path
arms run --concurrency Answers in flight at once
arms run --rerank-threshold Min relevance score for a doc to be kept after reranking
benchmark batch --out-dir Parent directory for each library's results (default: results)
benchmark preflight --concurrency Concurrency the planned run would use (no call is made)
benchmark preflight --retrieval-tokens Tokens of docs retrieved per question, as the planned run would use
catalog novelty --concurrency Model calls in flight at once
catalog novelty --no-paraphrase Skip the paraphrase probes (the same question reworded; needs a model)
catalog novelty --no-reversal Skip the reversal probes (the atom asserted backwards; needs a model)
catalog routing --max-output-tokens Output-token ceiling per model call; raise it for reasoning models
catalog routing --out Routing result JSON output path
data export --format Export format: JSON Lines, Parquet or Hugging Face
data export --kind Kind of artifact in --input
data schema show kind Artifact kind whose JSON schema to print
delivery release --json Print the cli_output.v1 envelope on stdout instead of the report
delivery release --manifest Delivery manifest JSON: the artifact, image, platform, docs snapshot and profile
delivery release --out Where to write the delivery result JSON
delivery release --policy Release policy JSON: the checks each profile requires
delivery release --tasks Task catalog JSON that the profile's tasks are drawn from
delivery report --json Print the cli_output.v1 envelope on stdout instead of the report
delivery report result Saved delivery result JSON (from release or scan --out)
delivery scan --corpus Saved external source corpus JSON to replay
delivery scan --json Print the cli_output.v1 envelope on stdout instead of the report
delivery scan --manifest Delivery manifest JSON: the artifact, image, platform, docs snapshot and profile
delivery scan --out Where to write the delivery result JSON
delivery scan --tasks Task catalog JSON that the profile's tasks are drawn from
docs check --out Snapshot JSON path (default: baselines/current.json)
docs check --spec Benchmark spec to run (default: benchmarks/spec.v1.yaml)
docs compare --candidate Snapshot to compare against the baseline
docs compare --out Comparison JSON path (default: reports/compare.json)
eval judge agreement --baseline-arm Baseline arm for the deltas (default: the answers file's, else baseline)
eval judge agreement --concurrency Judge calls in flight at once
eval judge wording --concurrency Judge calls in flight at once
eval judge wording --min-accuracy Accuracy gate in each condition’s report (0–1). FRAGILE uses the paired comparison (default gate: 0.8)
eval judge wording --seed Seed for choosing the base answers and degradations
eval questions refine --target-advanced Advanced questions wanted. Fewer are reported as a gap (default: 10)
eval questions refine --target-beginner Beginner questions wanted. Fewer are reported as a gap (default: 10)
eval questions refine --target-intermediate Intermediate questions wanted. Fewer are reported as a gap (default: 10)
eval questions review --concurrency Review calls in flight at once
eval score checklist --concurrency Judge calls in flight at once
eval score pairwise --baseline-arm Baseline arm for the deltas (default: the answers file's, else baseline)
eval score pairwise --concurrency Judge calls in flight at once
eval score reference --concurrency Answers scored in parallel
explore run --baseline-arm Baseline arm for deltas. Deltas are omitted if the baseline is absent from the run or unspecified
explore run --out explore_runs JSON path (default: explore_runs.json in --out-dir)
explore run --out-dir Directory for the run output (default: results/explore-runs)
repo run --reps Repetitions of each task-arm-model cell (default: 1)
repo skill reach --max-turns Agent turns allowed per scenario (default: 4)
skill novelty analyze --concurrency Model calls in flight at once
skill novelty analyze --format Rendered view format: html or md (default: html)
skill novelty analyze --no-paraphrase Skip the paraphrase probes (the same question reworded; needs a model)
skill novelty analyze --no-reversal Skip the reversal probes (the atom asserted backwards; needs a model)
skill novelty analyze --no-shorten Skip the shortening candidates
skill novelty analyze --out novelty.v1 JSON path (default: novelty.json in --out-dir)
skill novelty analyze --out-dir Directory for novelty.json and the view (default: results/novelty/)
skill novelty atoms --max-output-tokens Output-token ceiling per extraction call; raise it for reasoning models
skill novelty atoms --no-verify Skip the per-atom faithfulness check
skill novelty atoms --out atoms.json output path
skill novelty items --out Item-analysis JSON output path
skill novelty probe --concurrency Model calls in flight at once
skill novelty probe --no-paraphrase Skip the paraphrase probes (the same question reworded; needs a model)
skill novelty probe --no-reversal Skip the reversal probes (the atom asserted backwards; needs a model)
skill novelty probe --out probes.json output path
skill novelty retest --scoring Outcome scoring: lenient or strict (default: lenient)
skill novelty view --format Rendered view format: html or md
skill novelty view --out View output path
skill routing --max-output-tokens Output-token ceiling per model call; raise it for reasoning models
skill routing --out Routing result JSON output path
skill shorten --max-output-tokens Output-token ceiling per shortening adjudication; raise it for reasoning models
subjects run --concurrency Answers in flight at once
subjects run --context7-id Explicit Context7 library ID for doc arms (skips resolution)
subjects run --max-iterations Max tool-call rounds for agentic arms (default: 6)
subjects run --no-plugin-deltas Do not compute the paired plugin_delta artifacts
subjects run --out Subject scorecard JSON path (default: subject-scorecard.json in --out-dir)
subjects run --out-dir Directory for the matrix cells and the subject scorecard
subjects run --rerank-threshold Min relevance score for a doc to be kept after reranking
subjects run --top-k Docs to retrieve before reranking, for doc/MCP arms (default: 5)
subjects run --work-baseline-harness Baseline harness for task-suite deltas (added first if absent from --work-harnesses)
subjects run --work-command-template Shell command template that runs one cell of a command harness
subjects run --work-output-dir Directory for the task-suite runs (default: /work)
tasks run --baseline-harness Harness the others are compared against (added first if absent from --harness)
tasks run --out task_runs JSON path (default: task_runs.json in --out-dir)
tasks run --out-dir Directory for the per-task run output (default: results/task-runs)
tools preference --concurrency Calls in flight at once
tools preference --out tool_preference.v1 JSON path

Kept without help (deferred, with reason)

tests/test_cli_option_help.py lists the 18 remaining command and option pairs without help. It checks that every entry still exists and still lacks help. Those entries cover the remaining model and judge options, --out-md on four commands, and docs check --root. Removed provider options and the now-documented extractor options are no longer deferred.

REVIEW M3

benchmark preflight is FREE because it validates the execution plan and prints an independence warning. repo compare is FREE because it reads and scores saved results. The CLI interface snapshot confirms their labels.

Test

  • pytest tests/test_cli_option_help.py: verifies help coverage, rejects stale deferrals, and rejects a new command reusing a deferred option. Compared the generated CLI interface from both trees to verify the help edits preserve the interface.

Changelog fragment: changelog.d/20261129_150111_napetrov_docs-cli-help-strings.md (### Changed).

🤖 Generated with Claude Code

86 option entries across eval, arms, skill novelty, subjects, tasks,
explore, delivery, data, docs, benchmark, repo and tools had no help
text. Each now says what the option does, read from the code it sets.
No name, default, choice, type or behaviour changes; the CLI snapshot
has no help keys and is unchanged.

tests/test_cli_option_help.py walks build_parser(): every non-suppressed
option and positional has help, except the DEFERRED options (model and
judge family, plus the output and inputs renames of this wave). A
DEFERRED row fails once it is gone or fully documented.

Part of intel#94

Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
@napetrov
napetrov requested a review from a team as a code owner November 29, 2026 23:47
@exai-bot

exai-bot commented Nov 29, 2026 •

Copy link
Copy Markdown

✅ OpenCodeReview: Review complete: 0 finding(s) across 22 selected item(s).

CI at 5853150: 26 passing, 4 skipped.

Review limit reached. This PR has had 6 reviews, so it will only be reviewed again when you ask.
To ask: re-request review from exai-bot in the Reviewers list.

Test notes (2)
  • dokimi/dokimi/commands/answer_formats.py:127: With r.add_argument("--concurrency", type=positive_int, default=4, help="Answers scored in parallel") changed to pass, the tests still pass: dokimi/tests/test_cli_option_help.py. If this condition matters, a test should pin it.
  • dokimi/dokimi/commands/arms.py:358: With arms_run_p.add_argument("--rerank-threshold", type=float, default=0.3, dest="rerank_threshold", help="Min relevance score for a doc to be kept after reranking") changed to pass, the tests still pass: dokimi/tests/test_cli_option_help.py. If this condition matters, a test should pin it.
Review details
  • Commit reviewed: 5853150 against merge base 2664550
  • Coverage: 22 files in 3 groups
  • Engine: OpenCodeReview v1.13.5-exai.4.8f73eada, us.openai.gpt-6.1-sol
  • Usage: 257k tokens (134k from cache), 20s
  • Tool calls: 20 (12 file_read, 2 code_search, 2 local_check_results, 2 pr_threads, 1 ci_status, 1 file_find)
  • CLI help documentation, parsing, and regression tests: 4 files
  • Execution, benchmarking, and skill command help: 9 files
  • Data, evaluation, and resource command help: 9 files

@codecov-commenter

codecov-commenter commented Nov 29, 2026 •

Copy link
Copy Markdown

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

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.46%. Comparing base (2664550) to head (5853150).
⚠️ Report is 1 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1420      +/-   ##
==========================================
- Coverage   96.47%   96.46%   -0.01%     
==========================================
  Files         533      533              
  Lines       71339    71340       +1     
  Branches    12333    12333              
==========================================
- Hits        68823    68818       -5     
- Misses       1540     1541       +1     
- Partials      976      981       +5     
Files with missing lines Coverage Δ
dokimi/dokimi/commands/agent_run.py 93.93% <100.00%> (+4.04%) ⬆️
dokimi/dokimi/commands/answer_formats.py 91.11% <100.00%> (ø)
dokimi/dokimi/commands/arms.py 97.76% <100.00%> (ø)
dokimi/dokimi/commands/benchmark.py 94.63% <100.00%> (ø)
dokimi/dokimi/commands/data.py 100.00% <100.00%> (ø)
dokimi/dokimi/commands/dataset.py 100.00% <100.00%> (ø)
dokimi/dokimi/commands/delivery.py 97.18% <100.00%> (+0.04%) ⬆️
dokimi/dokimi/commands/explore.py 92.23% <100.00%> (ø)
dokimi/dokimi/commands/judge_reliability.py 98.26% <100.00%> (ø)
dokimi/dokimi/commands/novelty_flags.py 100.00% <100.00%> (ø)
... and 9 more

... and 7 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Mutation of changed lines

⚠️ Tests miss 2 of 8 small breaks of the lines this PR changes, and the check was not complete

At 5853150: 4 caught · 2 missed · 2 inconclusive · 72 not tried in time

Each row is a small deliberate break (a mutant) of a line this PR changes that every test reaching that line still passes. Add a test that fails on it or, if it cannot change behaviour, put # mutation-ok[<operator>]: <reason> at the end of the line or alone on the line above.

Where Operator Change no test notices Tests reaching the line
dokimi/dokimi/commands/answer_formats.py:127 delete-statement r.add_argument("--concurrency", type=positive_int, default=4, help="Answers scor → pass 933
dokimi/dokimi/commands/benchmark.py:642 delete-statement bench_pre_p.add_argument("--concurrency", type=positive_int, default=DEFAULT_CON → pass 933

Not the whole picture:

  • 72 breaks were not tried before the time budget ran out
  • 19 more breaks of covered changed lines were over the limit and not tried
  • 10 candidate test files were not run
  • 73 changed lines were not mutated

Warning only: a missed break does not fail the job. Updated on every push; the full report is in the ci run summary.

@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.

🟡 Changes needed · reviewed 109ce01

To fix: a few new help texts say something the code does not do (line comments); the smaller wording points there are optional.

✅ make ci-local --offline: 31,395 passed, 116 skipped (the changed-line mutation step did not finish here) · ✅ 142 options without help on the base, 56 on this head, all in DEFERRED: the "86" holds · ✅ every change only sets help=

A useful sweep, and the test keeps new options from landing without help.

Comment thread dokimi/dokimi/commands/questions.py Resolved
Comment thread dokimi/tests/test_cli_option_help.py Resolved
Comment thread dokimi/dokimi/commands/tasks.py Resolved
Comment thread dokimi/dokimi/commands/explore.py Resolved
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>

# Conflicts:
#	dokimi/dokimi/commands/judge_reliability.py
#	dokimi/dokimi/commands/questions.py
#	dokimi/dokimi/commands/skill.py
Thread: PRRT_kwDOVBg7g869mN9o
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g869mN9z
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g869mN-B
Thread: PRRT_kwDOVBg7g869mN-I
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g869mN94
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g869mN99
Thread: PRR_kwDOVBg7g88AAAABbIMQsg
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
@napetrov

Copy link
Copy Markdown
Contributor Author

Re: review by vlad-perevezentsev

a few new help texts say something the code does not do
Updated the help and scoped the deferrals. 1047c41

@vchamarthi vchamarthi 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.

@napetrov, could you fix the problem I found (in the line comments)? Then push and I'll take another look.

Also holding my approval:

  • A check of the change fails on this head.

What I checked on 1047c41:

  • The full test suite fails with main merged in, at tests/test_cli_option_help.py::test_every_option_has_help_or_is_deferred, ci.yml:test / Run tests, ci.yml:test / Repeat changed tests.
  • When I changed the code on purpose, the tests still passed for 9 of 12 changes, and no test pins these down yet (non-blocking): dokimi/dokimi/commands/answer_formats.py:122 (the call is dropped), dokimi/dokimi/commands/arms.py:355 (the call is dropped), dokimi/dokimi/commands/arms.py:478 (the call is dropped) and 6 more.
  • The 3 changed tests pass, and fail on main as expected.
  • It merges cleanly onto main.

Comment thread dokimi/tests/test_cli_option_help.py Resolved
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g86-G2if
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRR_kwDOVBg7g88AAAABbZXjag
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Copilot AI balanced review requested due to automatic review settings December 1, 2026 16:40
@napetrov

napetrov commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

Re: review by vchamarthi

A check of the change fails on this head.
With main merged, all three option-help tests pass at 60acc20. The parser now documents the provider, output-token limit and JSON output path.

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.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

4 open issues
What changed in this PR

This PR expands CLI option/positional help text across the command tree and adds a test to enforce that all visible CLI actions have help, with an explicit deferred list for intentionally undocumented flags (e.g., model/judge family owned by #1197).

Changes:

  • Added tests/test_cli_option_help.py to validate help coverage and to fail on stale deferrals.
  • Added/expanded help= strings for many existing options across CLI command modules (without changing flags/defaults/types).
  • Added a changelog fragment documenting the CLI help expansion.
File Description
dokimi/​tests/​test_cli_option_help.py New test that walks the CLI parser tree, enforcing per-action help with a deferred allowlist.
dokimi/​dokimi/​commands/​tools.py Adds help text for tools preference options (--concurrency, --out).
dokimi/​dokimi/​commands/​tasks.py Adds help for tasks run output/baseline harness flags.
dokimi/​dokimi/​commands/​subjects.py Adds help for several subjects run options (output dirs, concurrency, retrieval knobs).
dokimi/​dokimi/​commands/​skill.py Adds help for skill novelty * output/view/verification flags and token ceilings.
dokimi/​dokimi/​commands/​run.py Adds help for docs check/compare spec and output options.
dokimi/​dokimi/​commands/​routing_parser.py Adds help for routing/sensitivity output and token ceiling flags.
dokimi/​dokimi/​commands/​repo_skill_reach.py Adds help for repo skill reach --max-turns.
dokimi/​dokimi/​commands/​repo_run.py Adds help for repo run --reps.
dokimi/​dokimi/​commands/​questions.py Adds help for question refinement targets and review concurrency.
dokimi/​dokimi/​commands/​novelty_flags.py Adds help for novelty model concurrency and probe toggles.
dokimi/​dokimi/​commands/​judge_reliability.py Adds help for concurrency/baseline/seeding/min-accuracy options.
dokimi/​dokimi/​commands/​explore.py Adds help for baseline arm and output paths in explore run.
dokimi/​dokimi/​commands/​delivery.py Adds centralized help strings for delivery path flags and --json/positional help.
dokimi/​dokimi/​commands/​dataset.py Adds help for export --kind and --format.
dokimi/​dokimi/​commands/​data.py Adds help for data schema show kind.
dokimi/​dokimi/​commands/​benchmark.py Adds help for preflight concurrency/retrieval tokens and batch output dir.
dokimi/​dokimi/​commands/​arms.py Adds help for rerank threshold, concurrency, and plugin-delta --out.
dokimi/​dokimi/​commands/​answer_formats.py Adds help for reference scoring concurrency.
dokimi/​changelog.d/​20261129_150111_napetrov_docs-cli-help-strings.md Changelog entry describing the expanded CLI help and new enforcement test.

Review effort: Lite

Comment thread dokimi/tests/test_cli_option_help.py Resolved
Comment thread dokimi/tests/test_cli_option_help.py Resolved
Comment thread dokimi/tests/test_cli_option_help.py Resolved
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g86-LcoC
Thread: PRRT_kwDOVBg7g86-Lcm8
Thread: PRRT_kwDOVBg7g86-Lcne
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g86-Lcoo
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
@napetrov

napetrov commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

The option-help check now visits shared parsers once, and the judge accuracy help uses ASCII punctuation.

@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 · re-checked 8b00a9f · nothing required from @napetrov

🔀 Merge: safe now · merges cleanly into current main, 13 commits behind; its tests pass on the merge · after it, #1197 (benchmark.py, routing_parser.py, skill.py), #1413 (novelty_flags.py, skill.py) and #1522 (run.py) need a rebase

✅ make ci-local --offline: 32,487 passed, 125 skipped · ✅ tests/test_cli_option_help.py on a merge with current main: 4 passed · ✅ a new command's --root without help now fails the test

The earlier points are fixed; the deferred list now excuses only the exact command and option.

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

# Conflicts:
#	dokimi/dokimi/commands/benchmark.py
#	dokimi/dokimi/commands/routing_parser.py
#	dokimi/dokimi/commands/skill.py
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
(cherry picked from commit e249323eb321bbc70ac425c03170071d835a143c)
@napetrov
napetrov merged commit ed7a4e2 into intel:main Dec 2, 2026
35 of 36 checks passed
napetrov added a commit that referenced this pull request Dec 3, 2026
* docs(cli): help text for the 18 options DEFERRED still listed; empty the list

The renames that #1420 waited on have landed, so the options that the
DEFERRED list still covered get their help text here. DEFERRED is now
empty, and the option-help test fails on any visible option without help.

Part of #94 (Q15: help strings).

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

* fix(subjects): --out-md help names its real default

Signed-off-by: Vladislav Perevezentsev <vladislav.perevezentsev@intel.com>

---------

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants