Port optimization types, store, search space, engine, and LLM optimizer
from Python to Rust. Includes SearchDimension, SearchSpace, TrialConfig,
TrialResult, OptimizationStore (SQLite), OptimizationEngine with Pareto
frontier, LLMOptimizer with OptimizerBackend trait. 47 tests pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Shorten docstrings in backward-compat shims to fix E501 (line too long).
Sort imports in learning/__init__.py. Zero Ruff violations remaining.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move 12 optimize-related test files from tests/ root into tests/learning/
to match the module reorganization. All 305 tests pass from new locations.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move the optimization module under the Learning pillar where it
conceptually belongs. All internal imports updated to
openjarvis.learning.optimize. Backward-compatibility shims at the old
openjarvis.optimize path re-export everything. External consumers
(CLI optimize_cmd, server api_routes) updated to import from new location.
All 305 optimize-related tests pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove NFS lock artifacts, empty research output files, results/ and
site/ build artifacts. Add .ruff_cache/, .nfs*, research_mining_* to
.gitignore.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix all ruff E501 line-length violations
- Add noqa: E402 for intentional late imports in runner scripts
- Remove unused imports in tb_agent.py
- Update test_llm_optimizer assertions to expect fixed params in
unparseable/missing-params cases (intended behavior change)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Keep both system_prompt (optimization) and episode_mode (Phase 25) in
RunConfig. Merge terminalbench_native metadata using v2 task_data dict
API while preserving new create_task_env/verify_requirements methods.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove duplicate config structs in Rust config.rs and Python config.py
- Remove duplicate match arms in Rust discovery.rs
- Fix E501 line-too-long in evals/cli.py
- Fix E402 imports-not-at-top in test_ama_bench.py and test_loghub.py
- Fix E501 long lines in test_loghub.py
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add four new OpenAI-compatible inference engines across the full stack:
Rust backend:
- Config structs with serde defaults (ExoEngineConfig, NexaEngineConfig,
UzuEngineConfig, AppleFmEngineConfig) in openjarvis-core
- Factory constructors on OpenAICompatEngine (exo, nexa, uzu, apple_fm)
- Engine enum variants with delegate_engine! macro dispatch
- Discovery and resolution in get_engine_static()
- PyO3 bridge support in PyEngine
Python frontend:
- Data-driven engine class registration in openai_compat_engines.py
- Config dataclasses with backward-compat host properties
- Discovery host map entries
- DEFAULT_SEARCH_SPACE updated with new engine backends
- Apple FM shim (FastAPI wrapper for python-apple-fm-sdk, macOS only)
Config & tests:
- TOML config sections for all four engines
- Unit tests for factory methods, enum variants, and search space
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add gen-files and literate-nav mkdocs plugins
- Create docs/gen_ref_pages.py (adapted from IPW) to auto-generate API reference pages
- Replace 15 manual API nav entries with single auto-generated api-reference/ section
- Add mkdocs-gen-files and mkdocs-literate-nav to docs extra dependencies
Cross-pollinated from intelligence-per-watt docs patterns.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove unused imports (os, pytest) in test_rust_bridge.py
- Add pytest.importorskip for fastapi/starlette in test_learning_api.py
- Fix AppleEnergyMonitor test fixtures: set _zeus_ok, _chip_name,
_tdp_watts attributes when using __new__ to skip __init__
- Fix uninitialized monitor test to match CPU-time fallback behavior
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
str(Role.SYSTEM) returns 'Role.SYSTEM' on Python 3.10, not 'system'.
Use getattr(m, 'role', None) == 'system' which works because Role
inherits from str. Also wires compress_context into operative agent.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Surface per-instance scores (SampleScore), structured feedback
(TrialFeedback), Pareto frontier tracking, pillar-targeted mutation,
and config merge strategies. Store migration adds new columns with
backward-compatible deserialization.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add the orchestration layer that ties together the LLM optimizer, trial
runner, and persistence into a propose-evaluate-analyze loop with early
stopping and recipe export. 36 new tests pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement LLMOptimizer that uses a cloud LLM to propose and analyze
OpenJarvis configurations, inspired by DSPy's GEPA approach with
textual trace feedback rather than just scalar rewards. 46 tests pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add TrialRunner to bridge TrialConfig to the eval framework (EvalRunner),
TraceJudge for LLM-as-judge scoring of agent traces, and FeedbackCollector
for aggregating explicit, thumbs, and judge-driven feedback signals.
68 tests pass covering all three modules.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Synthesize reusable benchmarks from interaction traces with feedback
scores. Mines high-quality traces, groups by query class, picks the
best reference per class, and exposes results through DatasetProvider
and LLM-judge Scorer so EvalRunner can evaluate against personal
workflow patterns.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add the optimize module with core data types (SearchDimension, SearchSpace,
TrialConfig, TrialResult, OptimizationRun) and search space builder
(build_search_space, DEFAULT_SEARCH_SPACE) covering all 5 pillars. Includes
TrialConfig.to_recipe() mapping and SearchSpace.to_prompt_description()
for LLM-readable rendering. 66 tests pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- .gitignore: keep both Rust target/ and Claude plan artifacts/Tauri schemas sections
- uv.lock: keep main's provides-extras with speech, eval-wandb, eval-sheets extras
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>