OrangePro
v0.2.62Find test gaps, generate grounded tests, and dynamically prove behavior with mutation testing.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
orangepro_start Start OrangePro
One-command local setup for a repo or PR: analyze sources, auto-apply weak AI candidate links and candidate flows when a real BYOK provider is configured, write behavior-coverage.html (detailed report), short_behavior-coverage.html (summary), tests.csv + rtm.md, summarize changed/gap targets, and return agent next actions. When nothing changed since the last run it returns at once with unchanged_since and reuses the reports (fresh=true forces a full run). AI lanes stay separate and never affect Proven coverage.
| Parameter | Type | Description |
|---|---|---|
ai_all | boolean | Run AI weak-linking over all deterministic behavior nodes instead of gaps-only. |
base_ref | string | Optional PR/diff base ref. Default auto-detects main/master when possible. |
coverage_timeout_ms | integer | Per-command coverage-generation timeout. |
fresh | boolean | Run in full even when nothing changed since the last run. By default an unchanged repository returns at once with unchanged_since and the reports of the last run. |
generate_coverage | boolean | Run safe local coverage generation before analyze where supported. Default false. |
include_markdown | boolean | Enrich requirements-like Markdown docs. Default true. |
model | string | Model name override. |
no_ai | boolean | Disable automatic AI weak-link and candidate-flow passes even if a provider key is configured. |
no_ai_flows | boolean | Disable automatic AI candidate-flow discovery while keeping weak AI links enabled. |
prompt_version | string | Opt-in generation strategy for the auto-prove generation lane. Default v2/deterministic; v5 uses batched two-phase generation. The prove/mint gate is unchanged either way. |
provider | string | BYOK provider override for the AI passes. |
source | string | Source path to analyze. Defaults to workspace. |
workspace | string | Local workspace root. Defaults to the current directory. |
orangepro_analyze_sources Analyze local sources
Build or refresh the local OrangePro evidence graph from a local checkout/path plus optional CSV/Markdown enrichers. Metadata-only by default — reads source in-process but never stores or uploads code. Optionally stages/applies AI candidate flows and refreshes the report when ai_flows=true.
| Parameter | Type | Description |
|---|---|---|
ai_flows | boolean | Generate and apply AI-suggested candidate flows after analyze, then refresh the behavior report. Requires a BYOK provider; skips without failing analyze if none is configured. |
include_markdown | boolean | Enrich requirements-like Markdown docs. Default true. |
include_source_snippets | boolean | Deferred: source snippets are never persisted in the first slice. |
mode | string | Persistence privacy mode. Only metadata_only is supported. |
model | string | Model name override for ai_flows. |
paths | array | Extra template/doc files (.csv/.md) to enrich the graph. |
provider | string | BYOK provider override for ai_flows. |
workspace | string | Local workspace root. Defaults to the current directory. |
orangepro_graph_score Graph readiness score
Return the local graph readiness score (0-100), band, per-dimension breakdown, and plain-language missing evidence. Readiness signal, not a proof of test lift.
| Parameter | Type | Description |
|---|---|---|
workspace | string | Local workspace root. Defaults to the current directory. |
orangepro_status Local workspace status
Show local workspace state without generating anything: whether the graph is fresh/stale/missing, source mix, score, and privacy settings (always local, no upload).
| Parameter | Type | Description |
|---|---|---|
workspace | string | Local workspace root. Defaults to the current directory. |
orangepro_doctor Recommend next evidence
Recommend the smallest next source that would most improve generated-test quality, with expected score impact. Teaches what data improves output.
| Parameter | Type | Description |
|---|---|---|
goal | string | Optimization goal hint, e.g. 'better_tests'. |
proof | boolean | Proof-focused mode: explain why top targets are not Proven (deduped blockers + smallest next steps). Read-only; mints nothing. |
workspace | string | Local workspace root. Defaults to the current directory. |
orangepro_find_test_gaps Find test gaps
List requirements/flows with weak or missing test evidence, plus top_risk_gaps for unproven code symbols ranked by the OrangePro Risk Score (Probability × Impact × DetectionDifficulty). Risk is prioritization only; it never changes coverage/proof status.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max gaps to return. Default 10. |
min_priority | string | Minimum priority to include (low|medium|high|critical). |
workspace | string | Local workspace root. Defaults to the current directory. |
orangepro_record_run Record gap-fill outcome
Record an agent test-writing attempt as static diagnostics. When test_path is provided for TS/JS, OrangePro first tries scoped deterministic re-prove; otherwise it re-analyzes the repo. Static hard COVERS edges render as Linked; public Proven requires orangepro_prove.
| Parameter | Type | Description |
|---|---|---|
agent_pass | boolean | Whether the agent-reported test command passed. Advisory only. |
evidence_ids | array | Generated-test/evidence ids tied to this attempt. Metadata only. |
model | string | Model name used by the agent/generator, if any. |
prompt_version | string | Prompt or workflow version used, if any. |
provider | string | Model provider used by the agent/generator, if any. |
run_id | string | Optional caller-supplied run id. Defaults to a local monotonic id. |
source | string | Source checkout to re-analyze. Defaults to workspace. |
target_id | string | Optional graph target id that must resolve to exactly one hard-linked CodeSymbol. |
target_symbol | string | Exact CodeSymbol external id, e.g. sym:svc/add.go#Add. Preferred. |
test_path | string | Workspace-relative test file the agent just wrote. Enables scoped deterministic re-prove for TS/JS. |
vacuous | boolean | Whether the agent judged the test vacuous/non-assertive. Advisory only. |
workspace | string | Local workspace root. Defaults to the current directory. |
orangepro_prove Run dynamic targeted proof
Run the dynamic targeted-proof oracle for a CodeSymbol and append a metadata-only ledger certificate. Public Proven closes only when baseline green plus a valid sentinel mutation of the credited symbol fails the same test at an assertion. Static record_run is diagnostics only.
| Parameter | Type | Description |
|---|---|---|
jest_config | string | Repo-relative Jest config path. |
link_node_modules | boolean | Trusted-repo speed mode: symlink node_modules into temp copies. |
method | string | Optional consistency check. If provided, must match the member derived from target_symbol. |
replacement | string | TS/JS: inert sentinel body, e.g. 'return null;' or 'return {"ok":false};'. Must be JSON-only per the oracle (required for TS/JS targets). Go derives its own sentinel. |
replacement_mode | string | Sentinel wrapping mode. Default return-json. |
run_id | string | Optional caller-supplied run id. Defaults to a local monotonic id. |
runner | string | Test runner override. Default auto. |
source | string | Source checkout containing the test and target files. Defaults to workspace. |
target_file | string | Optional consistency check. If provided, must match the file derived from target_symbol. |
target_id | string | Optional graph target id that must resolve to exactly one hard-linked CodeSymbol. |
target_symbol | string | Exact CodeSymbol external id, e.g. sym:src/service.ts#OrderService.createOrder. Preferred. |
test_env | array | Explicit non-secret KEY=value env entries for the test run. |
test_path | string | TS/JS: repo-relative test file to run (required for TS/JS targets). |
test_run | string | Go: fully-anchored test name for `go test -run`, e.g. '^TestCompute$' (required for Go targets). Java: 'TestClass#testMethod', e.g. 'CalculatorTest#addsTwoNumbers' (required for Java targets). |
timeout_ms | integer | Per baseline/mutant test timeout. |
vitest_config | string | Repo-relative Vitest config path. |
workspace | string | Local workspace root. Defaults to the current directory. |
orangepro_prove_loop Setup, run dynamic proof, refresh report
Product wrapper around orangepro_prove: run trusted-local setup_commands in the source checkout, then the UNCHANGED dynamic targeted-proof oracle, then refresh the behavior report. Setup is non-secret repo prep only (build/install/shim); a setup failure returns unrunnable, does not run the oracle, and leaves the ledger untouched (never Proven). Public Proven still closes only through the unchanged certificate.
| Parameter | Type | Description |
|---|---|---|
jest_config | string | Repo-relative Jest config path. |
link_node_modules | boolean | Trusted-repo speed mode: symlink node_modules into temp copies. |
method | string | Optional consistency check. If provided, must match the member derived from target_symbol. |
replacement | string | TS/JS: inert sentinel body, e.g. 'return null;' or 'return {"ok":false};'. Must be JSON-only per the oracle (required for TS/JS targets). Go derives its own sentinel. |
replacement_mode | string | Sentinel wrapping mode. Default return-json. |
run_id | string | Optional caller-supplied run id. Defaults to a local monotonic id. |
runner | string | Test runner override. Default auto. |
setup_commands | array | Trusted-local repo prep run in the source checkout before the oracle. Non-secret only (build/install/shim). First non-zero exit returns unrunnable. |
setup_timeout_ms | integer | Default per-setup-command timeout (ms). Default 30000. |
source | string | Source checkout containing the test and target files. Setup runs here. Defaults to workspace. |
target_file | string | Optional consistency check. If provided, must match the file derived from target_symbol. |
target_id | string | Optional graph target id that must resolve to exactly one hard-linked CodeSymbol. |
target_symbol | string | Exact CodeSymbol external id, e.g. sym:src/service.ts#OrderService.createOrder. Preferred. |
test_env | array | Explicit non-secret KEY=value env entries for the test run. |
test_path | string | TS/JS: repo-relative test file to run (required for TS/JS targets). |
test_run | string | Go: fully-anchored test name for `go test -run`, e.g. '^TestCompute$' (required for Go targets). Java: 'TestClass#testMethod', e.g. 'CalculatorTest#addsTwoNumbers' (required for Java targets). |
timeout_ms | integer | Per baseline/mutant test timeout. |
vitest_config | string | Repo-relative Vitest config path. |
workspace | string | Local workspace root. Defaults to the current directory. |
orangepro_stats Gap-fill ledger stats
Summarize the local gap-fill ledger: attempted, dynamic-reproven, unproven, legacy static-associated, generated-but-unverifiable, and kept rate. Metadata-only.
| Parameter | Type | Description |
|---|---|---|
workspace | string | Local workspace root. Defaults to the current directory. |
orangepro_rtm Deterministic traceability matrix
Write and return a deterministic Requirements Traceability Matrix. Status comes only from the local graph and gap-fill ledger: Proven, Runs under tests, Linked, Unconfirmed, No test found, Reproven, or Generated-unverifiable. No LLM calls.
| Parameter | Type | Description |
|---|---|---|
base_ref | string | Optional PR/diff scope. Restricts rows to behaviors touched vs this ref. |
format | string | Output format. Default md. |
limit | integer | Optional max rows to emit. Markdown defaults to 500 rows; JSON/CSV are uncapped unless set. |
output_path | string | Output path. Default .orangepro/rtm.<format>. |
status | array | Optional status filter, e.g. ['no-link','runtime','associated']. |
workspace | string | Local workspace root. Defaults to the current directory. |
orangepro_update_graph Incrementally update graph
Refresh the local graph from changed files. Incremental and non-destructive by default — preserves evidence and marks affected generated tests stale.
| Parameter | Type | Description |
|---|---|---|
force_full_rebuild | boolean | Force a full rebuild instead of an incremental update. |
workspace | string | Local workspace root. Defaults to the current directory. |
orangepro_changed_impact Changed-file impact
DIFF/PR TOOL — only for real code-review situations. Summarizes what changed vs a base git ref and which local graph behaviors/tests are affected (basic changed-file impact; no deep route/API shape analysis). Requires a git repo and a real diff: returns status 'no_diff' / 'no_code_changes' (diff was docs-only) / 'missing_base_ref' / 'not_a_git_repo' with guidance instead of fabricated impact when there is nothing to analyze. For baseline (no-PR) test opportunities use orangepro_find_test_gaps.
| Parameter | Type | Description |
|---|---|---|
base_ref | string | Base git ref to diff against. Default 'main'. |
workspace | string | Local workspace root. Defaults to the current directory. |
orangepro_ai_links Stage/apply AI candidate links
Opt-in AI lane: propose weak MAY_RELATE_TO candidate links between existing deterministic behavior and CodeSymbol nodes. Generate writes .orangepro/ai/links.json only; apply=true explicitly merges survivors into candidate_edges. These links never affect proven coverage.
| Parameter | Type | Description |
|---|---|---|
all | boolean | Link across all behavior nodes instead of the default gaps-only scope. |
apply | boolean | Apply staged links into candidate_edges. Default false stages links only. |
max_behaviors | integer | Maximum behavior targets to process in this AI linking run. |
max_prompt_tokens | integer | Approximate per-batch prompt token ceiling. |
model | string | Model name override. |
provider | string | BYOK provider override. |
symbols_per_behavior | integer | Deterministic CodeSymbol shortlist size per behavior. |
workspace | string | Local workspace root. Defaults to the current directory. |
orangepro_ai_flows Stage/apply AI candidate flows
Opt-in AI lane: propose candidate behavior-flow chains over existing deterministic entry and CodeSymbol ids. Generate writes .orangepro/flows.json only; apply=true stores survivors under analysis.candidate_flows. Candidate flows are a verify-these worklist and never affect Proven, deterministic flow counts, tiers, or coverage.
| Parameter | Type | Description |
|---|---|---|
apply | boolean | Apply staged flows into analysis.candidate_flows. Default false stages flows only. |
model | string | Model name override. |
provider | string | BYOK provider override. |
workspace | string | Local workspace root. Defaults to the current directory. |
orangepro_generate_tests Generate grounded tests
Generate a small capped set (1-5) of grounded tests from local evidence using your own model key (BYOK: OpenAI-compatible, Ollama, or Anthropic). Tests are diversified across lightweight LOCAL scenario buckets (happy_path, validation_error, edge_case, integration_flow, security_privacy, regression) chosen from the evidence — unjustified buckets are skipped, never padded. By default it focuses the top-gap behavior and returns up to `limit` bucket-diverse tests for it; pass multiple target_ids to split the budget across them. Each test reports its bucket plus VALIDATED grounding `evidence` (ev…
| Parameter | Type | Description |
|---|---|---|
base_ref | string | PR-scoped generation: restrict to the behaviors the diff vs this ref touches (e.g. 'main') — for branch/PR review, target only the changed code. Requires a git repo + a real diff; returns structured… |
compare | boolean | Run BOTH arms — prompt-only baseline vs Local KG, same model + system prompt — and return side-by-side scores (completeness, context awareness, accuracy, domain specificity) plus both test suites.… |
framework | string | Framework hint, e.g. 'playwright', 'vitest', 'pytest'. |
limit | integer | Total tests to generate (1-5), spread across local scenario buckets. Default 3. |
model | string | Model name override. |
prompt_version | string | Prompt strategy. Defaults to v2; v5 is opt-in until corpus validation clears it as default. |
provider | string | BYOK provider override (auto-detected from env if omitted). Use 'deterministic' for an offline stand-in; without any provider configured, generation returns setup guidance instead of degrading. |
target_ids | array | Behavior/requirement external ids to target. Default: the top-gap behavior. Pass several to split the budget across them (each gets a test when the budget allows, in priority order). |
workspace | string | Local workspace root. Defaults to the current directory. |
write_files | boolean | Deferred/premium: repo file writing is disabled in the first slice; always treated as false. |
orangepro_explain_test Explain a generated test
Explain why a generated test exists: which graph evidence anchors support it, source refs, and whether weak/candidate evidence was used. Exposes trust artifacts only, not internal generation logic.
| Parameter | Type | Description |
|---|---|---|
generated_test_id * | string | The generated test id (or title) from orangepro_generate_tests. |
workspace | string | Local workspace root. Defaults to the current directory. |
orangepro_export_evidence_pack Export evidence pack
Export a portable evidence pack (JSON) plus a human-readable Markdown summary for review or later hosted promotion. Includes facts, provenance, generated outputs, and high-level score metadata — never prompts, weights, traces, or raw source. Validates against the local schema.
| Parameter | Type | Description |
|---|---|---|
graph_html | boolean | Also write a self-contained offline evidence-graph explorer (metadata only, no network). |
include_generated_bodies | boolean | Embed generated test bodies in the pack. Default false: bodies stay in the local workspace so the exported pack is metadata-only. Raw source snippets never cross the boundary regardless of this flag. |
output_path | string | Output JSON path. Default 'orangepro-evidence-pack.json'. |
workspace | string | Local workspace root. Defaults to the current directory. |
orangepro_install_github_action Install the post-merge GitHub Actions workflow
Preview, by default, the opt-in post-merge workflow (.github/workflows/orangepro-proof.yml: contents: read, no secrets, pinned actions) and the .orangepro/actions/ folder it reads (the profile: target, oracle, fault, selected tests, the test to replay). Writes nothing unless dry_run is false and confirm is "install" (or "uninstall" with uninstall: true). Never commits, pushes, creates secrets, grants permissions or opens pull requests; a file changed since OrangePro wrote it is reported as a conflict and never overwritten or removed. Tested locally; a real Actions run is separate.
| Parameter | Type | Description |
|---|---|---|
base | string | Branch whose pushes start the workflow. Default: the remote's default branch, else main. |
build_sha256 | string | That version's build stamp. Default: this build's. |
confirm | string | Required with dry_run: false; must match the action. |
deliver | string | Opt-in: add the separate deliver job that opens one draft test PR for a verified gap (the only job with write permissions; it runs no repository code). |
dry_run | boolean | Default true: preview only. |
opro_version | string | OrangePro version the workflow installs. Default: this one. |
profile_from | string | Folder holding profile.json and the files it names. Needed to install. |
uninstall | boolean | Remove the files OrangePro wrote (only those still unchanged). |
workspace | string | Local workspace root. Defaults to the current directory. |