Full Code of greyhaven-ai/autocontext for AI

main dcb1960d1bcd cached
3277 files
16.5 MB
4.5M tokens
22331 symbols
1 requests
Copy disabled (too large) Download .txt
Showing preview only (18,013K chars total). Download the full file to get everything.
Repository: greyhaven-ai/autocontext
Branch: main
Commit: dcb1960d1bcd
Files: 3277
Total size: 16.5 MB

Directory structure:
gitextract_h_7uap2s/

├── .env.example
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   ├── config.yml
│   │   └── feature_request.md
│   ├── PULL_REQUEST_TEMPLATE.md
│   └── workflows/
│       ├── ci.yml
│       ├── publish-pi-autocontext.yml
│       ├── publish-python.yml
│       └── publish-ts.yml
├── .gitignore
├── .prettierrc.json
├── AGENTS.md
├── CHANGELOG.md
├── CLAUDE.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── SECURITY.md
├── SUPPORT.md
├── autocontext/
│   ├── README.md
│   ├── assets/
│   │   ├── banner.txt
│   │   └── whats_new.txt
│   ├── demo_data/
│   │   └── README.md
│   ├── docs/
│   │   ├── agent-integration.md
│   │   ├── extensions.md
│   │   ├── fixture-loader.md
│   │   ├── mlx-training.md
│   │   ├── persistent-host.md
│   │   └── sandbox.md
│   ├── migrations/
│   │   ├── 001_initial.sql
│   │   ├── 002_phase3_phase7.sql
│   │   ├── 003_agent_subagent_metadata.sql
│   │   ├── 004_knowledge_inheritance.sql
│   │   ├── 005_ecosystem_provider_tracking.sql
│   │   ├── 006_human_feedback.sql
│   │   ├── 007_task_queue.sql
│   │   ├── 008_staged_validation.sql
│   │   ├── 009_generation_timing.sql
│   │   ├── 010_consultation_log.sql
│   │   ├── 010_session_notebook.sql
│   │   ├── 011_monitors.sql
│   │   ├── 012_research_hub.sql
│   │   ├── 013_generation_dimension_summary.sql
│   │   ├── 014_scoring_backend_metadata.sql
│   │   └── 015_match_replay.sql
│   ├── pyproject.toml
│   ├── pyrightconfig.json
│   ├── scripts/
│   │   ├── check_no_python_postinstall.py
│   │   ├── check_python_no_telemetry.py
│   │   ├── check_python_offline_install.py
│   │   ├── check_python_reproducible_wheel.py
│   │   ├── drive_anthropic_parity_fixture.py
│   │   └── drive_parity_fixture.py
│   ├── skills/
│   │   └── grid-ctf-ops/
│   │       ├── SKILL.md
│   │       └── playbook.md
│   ├── smoke_test.py
│   ├── smoke_test_loop.py
│   ├── src/
│   │   └── autocontext/
│   │       ├── __init__.py
│   │       ├── agentos/
│   │       │   ├── __init__.py
│   │       │   └── types.py
│   │       ├── agents/
│   │       │   ├── __init__.py
│   │       │   ├── agent_sdk_client.py
│   │       │   ├── analyst.py
│   │       │   ├── architect.py
│   │       │   ├── coach.py
│   │       │   ├── competitor.py
│   │       │   ├── contracts.py
│   │       │   ├── curator.py
│   │       │   ├── feedback_loops.py
│   │       │   ├── hint_feedback.py
│   │       │   ├── llm_client.py
│   │       │   ├── model_router.py
│   │       │   ├── orchestrator.py
│   │       │   ├── parsers.py
│   │       │   ├── pipeline_adapter.py
│   │       │   ├── provider_bridge.py
│   │       │   ├── role_router.py
│   │       │   ├── role_runtime_overrides.py
│   │       │   ├── runtime_session_wiring.py
│   │       │   ├── skeptic.py
│   │       │   ├── subagent_runtime.py
│   │       │   ├── translator.py
│   │       │   ├── translator_simplification.py
│   │       │   ├── trial_summary.py
│   │       │   └── types.py
│   │       ├── analytics/
│   │       │   ├── __init__.py
│   │       │   ├── aggregate_runner.py
│   │       │   ├── artifact_rendering.py
│   │       │   ├── calibration.py
│   │       │   ├── clustering.py
│   │       │   ├── correlation.py
│   │       │   ├── credit_assignment.py
│   │       │   ├── cross_runtime_trace_findings.py
│   │       │   ├── events_to_trace.py
│   │       │   ├── extractor.py
│   │       │   ├── facets.py
│   │       │   ├── html_artifact_shell.py
│   │       │   ├── issue_generator.py
│   │       │   ├── issue_store.py
│   │       │   ├── regression_fixtures.py
│   │       │   ├── rubric_drift.py
│   │       │   ├── run_trace.py
│   │       │   ├── runtime_session_run_trace.py
│   │       │   ├── store.py
│   │       │   ├── taxonomy.py
│   │       │   ├── timeline_inspector.py
│   │       │   └── trace_reporter.py
│   │       ├── artifacts/
│   │       │   ├── __init__.py
│   │       │   └── models.py
│   │       ├── banner.py
│   │       ├── blobstore/
│   │       │   ├── __init__.py
│   │       │   ├── cache.py
│   │       │   ├── factory.py
│   │       │   ├── hf_bucket.py
│   │       │   ├── local.py
│   │       │   ├── mirror.py
│   │       │   ├── ref.py
│   │       │   ├── registry.py
│   │       │   ├── store.py
│   │       │   └── sync.py
│   │       ├── bootstrap/
│   │       │   ├── __init__.py
│   │       │   ├── collector.py
│   │       │   ├── redactor.py
│   │       │   ├── renderer.py
│   │       │   └── snapshot.py
│   │       ├── cli.py
│   │       ├── cli_analytics.py
│   │       ├── cli_family_name.py
│   │       ├── cli_hermes.py
│   │       ├── cli_hermes_runners.py
│   │       ├── cli_improve.py
│   │       ├── cli_investigate.py
│   │       ├── cli_new_scenario.py
│   │       ├── cli_queue.py
│   │       ├── cli_role_runtime.py
│   │       ├── cli_runtime_overrides.py
│   │       ├── cli_solve.py
│   │       ├── cli_task_input.py
│   │       ├── cli_worker.py
│   │       ├── concepts.py
│   │       ├── config/
│   │       │   ├── __init__.py
│   │       │   ├── harness_profile.py
│   │       │   ├── presets.py
│   │       │   ├── settings.py
│   │       │   └── tuning_bounds.py
│   │       ├── consultation/
│   │       │   ├── __init__.py
│   │       │   ├── runner.py
│   │       │   ├── stage.py
│   │       │   ├── triggers.py
│   │       │   └── types.py
│   │       ├── evaluation/
│   │       │   ├── __init__.py
│   │       │   ├── ab_runner.py
│   │       │   └── ab_stats.py
│   │       ├── evidence/
│   │       │   ├── __init__.py
│   │       │   ├── manifest.py
│   │       │   ├── materializer.py
│   │       │   ├── tracker.py
│   │       │   └── workspace.py
│   │       ├── execution/
│   │       │   ├── __init__.py
│   │       │   ├── action_filter.py
│   │       │   ├── agent_task_evolution.py
│   │       │   ├── ast_safety.py
│   │       │   ├── bias_probes.py
│   │       │   ├── evaluator_guardrail.py
│   │       │   ├── executors/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── base.py
│   │       │   │   ├── gondolin_contract.py
│   │       │   │   ├── local.py
│   │       │   │   ├── monty.py
│   │       │   │   ├── primeintellect.py
│   │       │   │   └── ssh.py
│   │       │   ├── harness_coverage.py
│   │       │   ├── harness_loader.py
│   │       │   ├── harness_synthesizer.py
│   │       │   ├── harness_tester.py
│   │       │   ├── improvement_events.py
│   │       │   ├── improvement_loop.py
│   │       │   ├── judge.py
│   │       │   ├── judge_executor.py
│   │       │   ├── objective_verification.py
│   │       │   ├── output_cleaner.py
│   │       │   ├── output_verifier.py
│   │       │   ├── phased_execution.py
│   │       │   ├── policy_executor.py
│   │       │   ├── policy_refinement.py
│   │       │   ├── queued_task_browser_context.py
│   │       │   ├── rubric_calibration.py
│   │       │   ├── rubric_coherence.py
│   │       │   ├── sample_states.py
│   │       │   ├── simple_agent_task_workflow.py
│   │       │   ├── strategy_validator.py
│   │       │   ├── supervisor.py
│   │       │   ├── task_queue_store.py
│   │       │   ├── task_runner.py
│   │       │   ├── trajectory_harness.py
│   │       │   └── verification_dataset.py
│   │       ├── extensions/
│   │       │   ├── __init__.py
│   │       │   ├── hooks.py
│   │       │   ├── llm.py
│   │       │   └── loader.py
│   │       ├── harness/
│   │       │   ├── __init__.py
│   │       │   ├── adapt/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── applicator.py
│   │       │   │   └── types.py
│   │       │   ├── audit/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── types.py
│   │       │   │   └── writer.py
│   │       │   ├── core/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── controller.py
│   │       │   │   ├── events.py
│   │       │   │   ├── llm_client.py
│   │       │   │   ├── output_parser.py
│   │       │   │   ├── subagent.py
│   │       │   │   └── types.py
│   │       │   ├── cost/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── calculator.py
│   │       │   │   ├── tracker.py
│   │       │   │   └── types.py
│   │       │   ├── evaluation/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── dimensional.py
│   │       │   │   ├── failure_report.py
│   │       │   │   ├── protocol.py
│   │       │   │   ├── runner.py
│   │       │   │   ├── scenario_evaluator.py
│   │       │   │   ├── self_play.py
│   │       │   │   └── types.py
│   │       │   ├── meta/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── advisor.py
│   │       │   │   ├── collector.py
│   │       │   │   ├── profiler.py
│   │       │   │   └── types.py
│   │       │   ├── meta_optimizer.py
│   │       │   ├── mutations/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── applier.py
│   │       │   │   ├── gate.py
│   │       │   │   ├── parser.py
│   │       │   │   ├── spec.py
│   │       │   │   └── store.py
│   │       │   ├── optimizer/
│   │       │   │   ├── __init__.py
│   │       │   │   └── pareto.py
│   │       │   ├── orchestration/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── dag.py
│   │       │   │   ├── engine.py
│   │       │   │   └── types.py
│   │       │   ├── pipeline/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── advancement.py
│   │       │   │   ├── gate.py
│   │       │   │   ├── holdout.py
│   │       │   │   ├── objective_guardrail.py
│   │       │   │   ├── retry_context.py
│   │       │   │   ├── trend_gate.py
│   │       │   │   └── validity_gate.py
│   │       │   ├── repl/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── monty_worker.py
│   │       │   │   ├── session.py
│   │       │   │   ├── types.py
│   │       │   │   └── worker.py
│   │       │   ├── scoring/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── backends.py
│   │       │   │   └── elo.py
│   │       │   ├── storage/
│   │       │   │   ├── __init__.py
│   │       │   │   └── versioned_store.py
│   │       │   └── validation/
│   │       │       ├── __init__.py
│   │       │       ├── staged.py
│   │       │       └── stages.py
│   │       ├── hermes/
│   │       │   ├── __init__.py
│   │       │   ├── advisor.py
│   │       │   ├── curator_ingest.py
│   │       │   ├── dataset_export.py
│   │       │   ├── inspection.py
│   │       │   ├── plugin_emitter.py
│   │       │   ├── recommendations.py
│   │       │   ├── redaction.py
│   │       │   ├── references.py
│   │       │   ├── session_ingest.py
│   │       │   ├── sessions.py
│   │       │   ├── skill.py
│   │       │   └── trajectory_ingest.py
│   │       ├── integrations/
│   │       │   ├── __init__.py
│   │       │   ├── _shared/
│   │       │   │   ├── STABILITY.md
│   │       │   │   ├── __init__.py
│   │       │   │   ├── identity.py
│   │       │   │   ├── session.py
│   │       │   │   └── sink.py
│   │       │   ├── anthropic/
│   │       │   │   ├── STABILITY.md
│   │       │   │   ├── __init__.py
│   │       │   │   ├── _content.py
│   │       │   │   ├── _proxy.py
│   │       │   │   ├── _stream.py
│   │       │   │   ├── _taxonomy.py
│   │       │   │   ├── _trace_builder.py
│   │       │   │   └── _wrap.py
│   │       │   ├── browser/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── chrome_cdp.py
│   │       │   │   ├── chrome_cdp_discovery.py
│   │       │   │   ├── chrome_cdp_runtime.py
│   │       │   │   ├── chrome_cdp_transport.py
│   │       │   │   ├── context_capture.py
│   │       │   │   ├── contract/
│   │       │   │   │   ├── __init__.py
│   │       │   │   │   ├── json_schemas/
│   │       │   │   │   │   ├── browser-action.schema.json
│   │       │   │   │   │   ├── browser-audit-event.schema.json
│   │       │   │   │   │   ├── browser-contract.schema.json
│   │       │   │   │   │   ├── browser-session-config.schema.json
│   │       │   │   │   │   ├── browser-snapshot.schema.json
│   │       │   │   │   │   └── shared-defs.schema.json
│   │       │   │   │   ├── models.py
│   │       │   │   │   └── types.py
│   │       │   │   ├── evidence.py
│   │       │   │   ├── factory.py
│   │       │   │   ├── policy.py
│   │       │   │   ├── types.py
│   │       │   │   └── validate.py
│   │       │   ├── openai/
│   │       │   │   ├── STABILITY.md
│   │       │   │   ├── __init__.py
│   │       │   │   ├── _proxy.py
│   │       │   │   ├── _session.py
│   │       │   │   ├── _sink.py
│   │       │   │   ├── _stream.py
│   │       │   │   ├── _taxonomy.py
│   │       │   │   ├── _trace_builder.py
│   │       │   │   └── _wrap.py
│   │       │   ├── primeintellect/
│   │       │   │   ├── __init__.py
│   │       │   │   └── client.py
│   │       │   └── ssh/
│   │       │       ├── __init__.py
│   │       │       ├── client.py
│   │       │       └── config.py
│   │       ├── investigation/
│   │       │   ├── __init__.py
│   │       │   ├── browser_context.py
│   │       │   ├── engine.py
│   │       │   └── iterative.py
│   │       ├── knowledge/
│   │       │   ├── __init__.py
│   │       │   ├── coherence.py
│   │       │   ├── compaction.py
│   │       │   ├── context_selection.py
│   │       │   ├── context_selection_report.py
│   │       │   ├── dead_end_manager.py
│   │       │   ├── evidence_freshness.py
│   │       │   ├── export.py
│   │       │   ├── fresh_start.py
│   │       │   ├── harness_quality.py
│   │       │   ├── hint_volume.py
│   │       │   ├── lessons.py
│   │       │   ├── mutation_log.py
│   │       │   ├── normalized_metrics.py
│   │       │   ├── package.py
│   │       │   ├── pi_package.py
│   │       │   ├── progress.py
│   │       │   ├── protocol.py
│   │       │   ├── rapid_gate.py
│   │       │   ├── report.py
│   │       │   ├── research_hub.py
│   │       │   ├── search.py
│   │       │   ├── semantic_compaction_benchmark.py
│   │       │   ├── solve_agent_task_design.py
│   │       │   ├── solve_task_execution.py
│   │       │   ├── solver.py
│   │       │   ├── stagnation.py
│   │       │   ├── trajectory.py
│   │       │   ├── tuning.py
│   │       │   ├── verbatim_solve.py
│   │       │   └── weakness.py
│   │       ├── loop/
│   │       │   ├── __init__.py
│   │       │   ├── controller.py
│   │       │   ├── cost_control.py
│   │       │   ├── ecosystem_runner.py
│   │       │   ├── events.py
│   │       │   ├── exploration.py
│   │       │   ├── fixture_loader.py
│   │       │   ├── generation_pipeline.py
│   │       │   ├── generation_runner.py
│   │       │   ├── hypothesis_tree.py
│   │       │   ├── presets.py
│   │       │   ├── refinement_prompt.py
│   │       │   ├── remediation_router.py
│   │       │   ├── runner_hooks.py
│   │       │   ├── signature_surfacer.py
│   │       │   ├── stage_helpers/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── context_loaders.py
│   │       │   │   ├── dimensions.py
│   │       │   │   ├── exploration.py
│   │       │   │   ├── freshness.py
│   │       │   │   ├── harness_mutations.py
│   │       │   │   ├── persistence_helpers.py
│   │       │   │   ├── semantic_benchmark.py
│   │       │   │   └── tournament_prep.py
│   │       │   ├── stage_preflight.py
│   │       │   ├── stage_prevalidation.py
│   │       │   ├── stage_probe.py
│   │       │   ├── stage_staged_validation.py
│   │       │   ├── stage_tree_search.py
│   │       │   ├── stage_types.py
│   │       │   ├── stages.py
│   │       │   ├── startup_verification.py
│   │       │   ├── tournament_helpers.py
│   │       │   └── trace_artifacts.py
│   │       ├── mcp/
│   │       │   ├── __init__.py
│   │       │   ├── _base.py
│   │       │   ├── agent_task_tools.py
│   │       │   ├── artifact_tools.py
│   │       │   ├── distill_tools.py
│   │       │   ├── knowledge_tools.py
│   │       │   ├── monitor_tools.py
│   │       │   ├── runtime_session_tools.py
│   │       │   ├── sandbox.py
│   │       │   ├── server.py
│   │       │   └── tools.py
│   │       ├── monitor/
│   │       │   ├── __init__.py
│   │       │   ├── engine.py
│   │       │   ├── evaluators.py
│   │       │   └── types.py
│   │       ├── notebook/
│   │       │   ├── __init__.py
│   │       │   ├── context_provider.py
│   │       │   ├── injection.py
│   │       │   └── types.py
│   │       ├── notifications/
│   │       │   ├── __init__.py
│   │       │   ├── base.py
│   │       │   ├── callback.py
│   │       │   ├── composite.py
│   │       │   ├── http.py
│   │       │   ├── slack.py
│   │       │   └── stdout.py
│   │       ├── openclaw/
│   │       │   ├── __init__.py
│   │       │   ├── adapters.py
│   │       │   ├── agent_adapter.py
│   │       │   ├── discovery.py
│   │       │   ├── distill.py
│   │       │   ├── models.py
│   │       │   └── skill.py
│   │       ├── preflight.py
│   │       ├── production_traces/
│   │       │   ├── __init__.py
│   │       │   ├── contract/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── branded_ids.py
│   │       │   │   ├── json_schemas/
│   │       │   │   │   ├── cluster-config.schema.json
│   │       │   │   │   ├── dataset-manifest.schema.json
│   │       │   │   │   ├── dataset-row.schema.json
│   │       │   │   │   ├── env-context.schema.json
│   │       │   │   │   ├── feedback-ref.schema.json
│   │       │   │   │   ├── production-outcome.schema.json
│   │       │   │   │   ├── production-trace.schema.json
│   │       │   │   │   ├── redaction-marker.schema.json
│   │       │   │   │   ├── redaction-policy.schema.json
│   │       │   │   │   ├── retention-policy.schema.json
│   │       │   │   │   ├── rubric-config.schema.json
│   │       │   │   │   ├── selection-rule.schema.json
│   │       │   │   │   ├── session.schema.json
│   │       │   │   │   ├── shared-defs.schema.json
│   │       │   │   │   ├── timing-info.schema.json
│   │       │   │   │   ├── trace-links.schema.json
│   │       │   │   │   ├── trace-source.schema.json
│   │       │   │   │   └── usage-info.schema.json
│   │       │   │   └── models.py
│   │       │   ├── emit.py
│   │       │   ├── hashing.py
│   │       │   ├── taxonomy/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── anthropic_error_reasons.py
│   │       │   │   └── openai_error_reasons.py
│   │       │   └── validate.py
│   │       ├── prompts/
│   │       │   ├── __init__.py
│   │       │   ├── context_budget.py
│   │       │   └── templates.py
│   │       ├── providers/
│   │       │   ├── __init__.py
│   │       │   ├── anthropic.py
│   │       │   ├── base.py
│   │       │   ├── callable_wrapper.py
│   │       │   ├── mlx_provider.py
│   │       │   ├── openai_compat.py
│   │       │   ├── registry.py
│   │       │   ├── retry.py
│   │       │   ├── runtime_bridge.py
│   │       │   └── scenario_routing.py
│   │       ├── research/
│   │       │   ├── __init__.py
│   │       │   ├── consultation.py
│   │       │   ├── evaluation.py
│   │       │   ├── persistence.py
│   │       │   ├── prompt_wiring.py
│   │       │   ├── runtime.py
│   │       │   └── types.py
│   │       ├── rlm/
│   │       │   ├── __init__.py
│   │       │   ├── context_loader.py
│   │       │   ├── prompts.py
│   │       │   ├── repl_worker.py
│   │       │   ├── session.py
│   │       │   └── types.py
│   │       ├── runtimes/
│   │       │   ├── __init__.py
│   │       │   ├── base.py
│   │       │   ├── claude_cli.py
│   │       │   ├── codex_cli.py
│   │       │   ├── direct_api.py
│   │       │   ├── errors.py
│   │       │   ├── hermes_cli.py
│   │       │   ├── pi_artifacts.py
│   │       │   ├── pi_cli.py
│   │       │   ├── pi_defaults.py
│   │       │   ├── pi_rpc.py
│   │       │   ├── runtime_budget.py
│   │       │   ├── workspace_env.py
│   │       │   └── workspace_grants.py
│   │       ├── scenarios/
│   │       │   ├── __init__.py
│   │       │   ├── agent_task.py
│   │       │   ├── artifact_editing.py
│   │       │   ├── base.py
│   │       │   ├── capabilities.py
│   │       │   ├── coordination.py
│   │       │   ├── custom/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── _family_creator_shim.py
│   │       │   │   ├── agent_task_codegen.py
│   │       │   │   ├── agent_task_creator.py
│   │       │   │   ├── agent_task_designer.py
│   │       │   │   ├── agent_task_revision.py
│   │       │   │   ├── agent_task_spec.py
│   │       │   │   ├── agent_task_validator.py
│   │       │   │   ├── artifact_editing_codegen.py
│   │       │   │   ├── artifact_editing_creator.py
│   │       │   │   ├── artifact_editing_designer.py
│   │       │   │   ├── artifact_editing_spec.py
│   │       │   │   ├── classifier_cache.py
│   │       │   │   ├── classifier_input.py
│   │       │   │   ├── codegen.py
│   │       │   │   ├── coordination_codegen.py
│   │       │   │   ├── coordination_creator.py
│   │       │   │   ├── coordination_designer.py
│   │       │   │   ├── coordination_spec.py
│   │       │   │   ├── creator.py
│   │       │   │   ├── creator_registry.py
│   │       │   │   ├── designer.py
│   │       │   │   ├── designer_retry.py
│   │       │   │   ├── family_classifier.py
│   │       │   │   ├── family_pipeline.py
│   │       │   │   ├── generic_creator.py
│   │       │   │   ├── investigation_codegen.py
│   │       │   │   ├── investigation_creator.py
│   │       │   │   ├── investigation_designer.py
│   │       │   │   ├── investigation_spec.py
│   │       │   │   ├── loader.py
│   │       │   │   ├── naming.py
│   │       │   │   ├── negotiation_codegen.py
│   │       │   │   ├── negotiation_creator.py
│   │       │   │   ├── negotiation_designer.py
│   │       │   │   ├── negotiation_spec.py
│   │       │   │   ├── operator_loop_codegen.py
│   │       │   │   ├── operator_loop_creator.py
│   │       │   │   ├── operator_loop_designer.py
│   │       │   │   ├── operator_loop_spec.py
│   │       │   │   ├── registry.py
│   │       │   │   ├── schema_evolution_codegen.py
│   │       │   │   ├── schema_evolution_creator.py
│   │       │   │   ├── schema_evolution_designer.py
│   │       │   │   ├── schema_evolution_spec.py
│   │       │   │   ├── simulation_codegen.py
│   │       │   │   ├── simulation_creator.py
│   │       │   │   ├── simulation_designer.py
│   │       │   │   ├── simulation_spec.py
│   │       │   │   ├── spec.py
│   │       │   │   ├── spec_auto_heal.py
│   │       │   │   ├── tool_fragility_codegen.py
│   │       │   │   ├── tool_fragility_creator.py
│   │       │   │   ├── tool_fragility_designer.py
│   │       │   │   ├── tool_fragility_spec.py
│   │       │   │   ├── validator.py
│   │       │   │   ├── workflow_codegen.py
│   │       │   │   ├── workflow_creator.py
│   │       │   │   ├── workflow_designer.py
│   │       │   │   └── workflow_spec.py
│   │       │   ├── families.py
│   │       │   ├── family_contracts.py
│   │       │   ├── grid_ctf/
│   │       │   │   ├── __init__.py
│   │       │   │   └── scenario.py
│   │       │   ├── investigation.py
│   │       │   ├── negotiation.py
│   │       │   ├── operator_loop.py
│   │       │   ├── othello.py
│   │       │   ├── schema_evolution.py
│   │       │   ├── simulation.py
│   │       │   ├── templates/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── content-generation/
│   │       │   │   │   ├── README.md
│   │       │   │   │   ├── example_input.json
│   │       │   │   │   ├── example_output.json
│   │       │   │   │   └── spec.yaml
│   │       │   │   ├── prompt-optimization/
│   │       │   │   │   ├── README.md
│   │       │   │   │   ├── example_input.json
│   │       │   │   │   ├── example_output.json
│   │       │   │   │   └── spec.yaml
│   │       │   │   └── rag-accuracy/
│   │       │   │       ├── README.md
│   │       │   │       ├── example_input.json
│   │       │   │       ├── example_output.json
│   │       │   │       └── spec.yaml
│   │       │   ├── tool_fragility.py
│   │       │   ├── type_registry.py
│   │       │   ├── workflow.py
│   │       │   └── world_state.py
│   │       ├── sdk.py
│   │       ├── sdk_models.py
│   │       ├── security/
│   │       │   ├── __init__.py
│   │       │   └── scanner.py
│   │       ├── server/
│   │       │   ├── __init__.py
│   │       │   ├── app.py
│   │       │   ├── changelog.py
│   │       │   ├── cockpit_api.py
│   │       │   ├── hub_api.py
│   │       │   ├── knowledge_api.py
│   │       │   ├── monitor_api.py
│   │       │   ├── notebook_api.py
│   │       │   ├── openclaw_api.py
│   │       │   ├── protocol.py
│   │       │   ├── run_manager.py
│   │       │   └── writeup.py
│   │       ├── session/
│   │       │   ├── __init__.py
│   │       │   ├── action_labels.py
│   │       │   ├── context_pressure.py
│   │       │   ├── coordinator.py
│   │       │   ├── living_docs.py
│   │       │   ├── memory_consolidation.py
│   │       │   ├── progress_digest.py
│   │       │   ├── remote_bridge.py
│   │       │   ├── runtime_context.py
│   │       │   ├── runtime_events.py
│   │       │   ├── runtime_grant_events.py
│   │       │   ├── runtime_session.py
│   │       │   ├── runtime_session_ids.py
│   │       │   ├── runtime_session_read_model.py
│   │       │   ├── runtime_session_recording.py
│   │       │   ├── runtime_session_timeline.py
│   │       │   ├── skill_registry.py
│   │       │   ├── store.py
│   │       │   ├── supervisor.py
│   │       │   └── types.py
│   │       ├── sharing/
│   │       │   ├── __init__.py
│   │       │   ├── attestation.py
│   │       │   ├── bundle.py
│   │       │   ├── collector.py
│   │       │   ├── pipeline.py
│   │       │   ├── publishers/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── gist.py
│   │       │   │   └── hf.py
│   │       │   ├── redactor.py
│   │       │   └── review.py
│   │       ├── simulation/
│   │       │   ├── __init__.py
│   │       │   ├── engine.py
│   │       │   ├── export.py
│   │       │   ├── helpers.py
│   │       │   └── schema_evolution.py
│   │       ├── storage/
│   │       │   ├── __init__.py
│   │       │   ├── artifact_hooks.py
│   │       │   ├── artifact_write_methods.py
│   │       │   ├── artifacts.py
│   │       │   ├── blob_integration.py
│   │       │   ├── bootstrap_schema.py
│   │       │   ├── buffered_writer.py
│   │       │   ├── compaction_ledger.py
│   │       │   ├── context_selection_store.py
│   │       │   ├── factory.py
│   │       │   ├── migration_ledgers.py
│   │       │   ├── row_types.py
│   │       │   ├── run_paths.py
│   │       │   ├── scenario_paths.py
│   │       │   ├── sqlite_migrations.py
│   │       │   └── sqlite_store.py
│   │       ├── strategy_interface.py
│   │       ├── training/
│   │       │   ├── __init__.py
│   │       │   ├── autoresearch/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── cuda.py
│   │       │   │   ├── prepare.py
│   │       │   │   ├── program.md
│   │       │   │   ├── program.py
│   │       │   │   └── train.py
│   │       │   ├── backends.py
│   │       │   ├── export.py
│   │       │   ├── model_registry.py
│   │       │   ├── runner.py
│   │       │   └── types.py
│   │       └── util/
│   │           ├── __init__.py
│   │           └── json_io.py
│   └── tests/
│       ├── conftest.py
│       ├── fixtures/
│       │   └── hermes_curator/
│       │       ├── auto-transition-only/
│       │       │   └── run.json
│       │       ├── consolidation-only/
│       │       │   └── run.json
│       │       ├── malformed/
│       │       │   └── run.json
│       │       └── normal-run/
│       │           └── run.json
│       ├── integrations/
│       │   ├── __init__.py
│       │   ├── _shared/
│       │   │   ├── __init__.py
│       │   │   ├── test_file_sink.py
│       │   │   └── test_session.py
│       │   ├── anthropic/
│       │   │   ├── __init__.py
│       │   │   ├── conftest.py
│       │   │   ├── property/
│       │   │   │   ├── __init__.py
│       │   │   │   └── test_trace_shape_invariants.py
│       │   │   ├── test_content.py
│       │   │   ├── test_exception_taxonomy_integration.py
│       │   │   ├── test_instrument_client_factory.py
│       │   │   ├── test_proxy_async.py
│       │   │   ├── test_proxy_non_streaming.py
│       │   │   ├── test_proxy_streaming.py
│       │   │   ├── test_taxonomy.py
│       │   │   └── test_trace_builder.py
│       │   ├── openai/
│       │   │   ├── __init__.py
│       │   │   ├── conftest.py
│       │   │   ├── property/
│       │   │   │   ├── __init__.py
│       │   │   │   └── test_trace_shape_invariants.py
│       │   │   ├── test_exception_taxonomy_integration.py
│       │   │   ├── test_instrument_client_factory.py
│       │   │   ├── test_proxy_async.py
│       │   │   ├── test_proxy_non_streaming.py
│       │   │   ├── test_proxy_streaming.py
│       │   │   ├── test_responses_api.py
│       │   │   ├── test_taxonomy.py
│       │   │   └── test_trace_builder.py
│       │   └── test_shared_identity.py
│       ├── production_traces/
│       │   └── taxonomy/
│       │       ├── test_anthropic_error_reasons.py
│       │       ├── test_openai_error_reasons.py
│       │       └── test_outcome_reason_key.py
│       ├── test_ab_runner.py
│       ├── test_ab_stats.py
│       ├── test_ac628_classifier.py
│       ├── test_action_filter.py
│       ├── test_action_filter_integration.py
│       ├── test_action_labels.py
│       ├── test_advancement_contract.py
│       ├── test_agent_e2e.py
│       ├── test_agent_live_e2e.py
│       ├── test_agent_sdk_client.py
│       ├── test_agent_sdk_integration.py
│       ├── test_agent_task.py
│       ├── test_agent_task_creator_retry.py
│       ├── test_agent_task_designer_retry.py
│       ├── test_agent_task_export.py
│       ├── test_agent_task_multi_gen.py
│       ├── test_agent_task_pipeline.py
│       ├── test_agentos_adapter.py
│       ├── test_aggregate_facets.py
│       ├── test_analysis_injection.py
│       ├── test_anthropic_client_retry.py
│       ├── test_api_key_fallback.py
│       ├── test_app_settings_contract.py
│       ├── test_architect_dag_changes.py
│       ├── test_architect_tool_updates.py
│       ├── test_architect_tools.py
│       ├── test_artifact_contracts.py
│       ├── test_artifact_editing.py
│       ├── test_artifact_harness.py
│       ├── test_artifact_rendering.py
│       ├── test_ast_safety.py
│       ├── test_auto_sample_input.py
│       ├── test_backpressure.py
│       ├── test_backpressure_trend.py
│       ├── test_banner_sync.py
│       ├── test_blob_store.py
│       ├── test_blob_store_phase2.py
│       ├── test_blob_store_phase3.py
│       ├── test_bootstrap_snapshot.py
│       ├── test_browser_chrome_cdp.py
│       ├── test_browser_context_capture.py
│       ├── test_browser_contract_fixtures.py
│       ├── test_browser_discovery.py
│       ├── test_browser_evidence.py
│       ├── test_browser_factory.py
│       ├── test_browser_policy.py
│       ├── test_browser_runtime.py
│       ├── test_browser_settings.py
│       ├── test_browser_transport.py
│       ├── test_buffered_artifacts.py
│       ├── test_buffered_writer.py
│       ├── test_build_prompt_bundle_semantic_compaction.py
│       ├── test_classifier_cache.py
│       ├── test_classifier_observability.py
│       ├── test_claude_cli_retry_budget_sleep.py
│       ├── test_claude_cli_runtime_budget.py
│       ├── test_claude_cli_runtime_factory.py
│       ├── test_claude_cli_timeout.py
│       ├── test_claude_cli_tools_arg.py
│       ├── test_claude_max_total_seconds.py
│       ├── test_cli_ab_test.py
│       ├── test_cli_agent_task.py
│       ├── test_cli_backport.py
│       ├── test_cli_error_output.py
│       ├── test_cli_family_name.py
│       ├── test_cli_investigate.py
│       ├── test_cli_json.py
│       ├── test_cli_preset.py
│       ├── test_cli_runtime_timeout_overrides.py
│       ├── test_cli_simulate_runtime.py
│       ├── test_cli_solve_runtime.py
│       ├── test_coach_competitor_hints.py
│       ├── test_cockpit.py
│       ├── test_cockpit_consultation_integration.py
│       ├── test_cockpit_notebook_integration.py
│       ├── test_code_strategies.py
│       ├── test_code_strategies_e2e.py
│       ├── test_codex_cli_runtime.py
│       ├── test_concept_model_parity.py
│       ├── test_config_adaptive.py
│       ├── test_constraint_prompts.py
│       ├── test_consultation.py
│       ├── test_context_budget.py
│       ├── test_context_preparation.py
│       ├── test_context_pressure.py
│       ├── test_context_selection.py
│       ├── test_coordinator.py
│       ├── test_correlation_issues.py
│       ├── test_cost_control_and_presets.py
│       ├── test_credit_assignment.py
│       ├── test_cross_run_inheritance.py
│       ├── test_cross_runtime_migration_ledgers.py
│       ├── test_cross_runtime_trace_findings.py
│       ├── test_curator.py
│       ├── test_curator_integration.py
│       ├── test_custom_registry_isolation.py
│       ├── test_custom_scenario_name_resolution.py
│       ├── test_custom_scenario_spec.py
│       ├── test_dag_apply.py
│       ├── test_dag_mutation.py
│       ├── test_dead_end_registry.py
│       ├── test_dead_end_wiring.py
│       ├── test_derive_name.py
│       ├── test_designer_calibration.py
│       ├── test_designer_parse_retry.py
│       ├── test_designer_parse_retry_integration.py
│       ├── test_detect_family_prefers_explicit.py
│       ├── test_dict_type_consistency.py
│       ├── test_dimension_pinning.py
│       ├── test_dimension_threshold.py
│       ├── test_dimensional_scoring.py
│       ├── test_disagreement.py
│       ├── test_discovery_scenario_type.py
│       ├── test_distill_jobs.py
│       ├── test_ecosystem_convergence.py
│       ├── test_ecosystem_integration.py
│       ├── test_ecosystem_runner.py
│       ├── test_elo.py
│       ├── test_enumerate_grid_ctf.py
│       ├── test_enumerate_legal_actions.py
│       ├── test_enumerate_othello.py
│       ├── test_escalation_sweep_summary.py
│       ├── test_eval_provider_wiring.py
│       ├── test_event_subscribers.py
│       ├── test_events_to_trace.py
│       ├── test_evidence_workspace.py
│       ├── test_exploration_mechanisms.py
│       ├── test_export_cli.py
│       ├── test_export_skill_md.py
│       ├── test_extension_hooks.py
│       ├── test_factual_confidence.py
│       ├── test_failure_recovery_lessons.py
│       ├── test_failure_report.py
│       ├── test_family_aware_strategy_prompts.py
│       ├── test_family_classifier.py
│       ├── test_family_pipeline.py
│       ├── test_feedback_loops.py
│       ├── test_fixture_loader.py
│       ├── test_freshness_and_fixtures.py
│       ├── test_gate_taxonomy.py
│       ├── test_generation_pipeline.py
│       ├── test_generation_stages.py
│       ├── test_generic_creator.py
│       ├── test_gondolin_contract.py
│       ├── test_harness/
│       │   ├── __init__.py
│       │   ├── test_harness_adapt_applicator.py
│       │   ├── test_harness_adapt_types.py
│       │   ├── test_harness_audit_types.py
│       │   ├── test_harness_audit_writer.py
│       │   ├── test_harness_controller.py
│       │   ├── test_harness_cost_calculator.py
│       │   ├── test_harness_cost_tracker.py
│       │   ├── test_harness_cost_types.py
│       │   ├── test_harness_elo.py
│       │   ├── test_harness_eval_runner.py
│       │   ├── test_harness_eval_types.py
│       │   ├── test_harness_evaluator.py
│       │   ├── test_harness_events.py
│       │   ├── test_harness_gate.py
│       │   ├── test_harness_llm_client.py
│       │   ├── test_harness_meta_advisor.py
│       │   ├── test_harness_meta_collector.py
│       │   ├── test_harness_meta_optimizer.py
│       │   ├── test_harness_meta_profiler.py
│       │   ├── test_harness_meta_types.py
│       │   ├── test_harness_output_parser.py
│       │   ├── test_harness_pipeline_engine.py
│       │   ├── test_harness_repl_session.py
│       │   ├── test_harness_repl_types.py
│       │   ├── test_harness_repl_worker.py
│       │   ├── test_harness_retry_context.py
│       │   ├── test_harness_role_dag.py
│       │   ├── test_harness_scenario_evaluator.py
│       │   ├── test_harness_subagent.py
│       │   ├── test_harness_trend_gate.py
│       │   ├── test_harness_types.py
│       │   ├── test_harness_versioned_store.py
│       │   └── test_output_parser_adoption.py
│       ├── test_harness_coverage.py
│       ├── test_harness_inheritance.py
│       ├── test_harness_loader.py
│       ├── test_harness_mode.py
│       ├── test_harness_model_demotion.py
│       ├── test_harness_mutations.py
│       ├── test_harness_profile.py
│       ├── test_harness_quality.py
│       ├── test_harness_synthesizer.py
│       ├── test_harness_tester.py
│       ├── test_harness_versioning.py
│       ├── test_heal_quality_threshold.py
│       ├── test_hermes_advisor.py
│       ├── test_hermes_curator_ingest.py
│       ├── test_hermes_dataset_export.py
│       ├── test_hermes_gateway.py
│       ├── test_hermes_integration.py
│       ├── test_hermes_plugin_emitter.py
│       ├── test_hermes_protocol_alignment.py
│       ├── test_hermes_recommendations.py
│       ├── test_hermes_redaction.py
│       ├── test_hermes_references.py
│       ├── test_hermes_runtime.py
│       ├── test_hermes_session_ingest.py
│       ├── test_hermes_session_repository.py
│       ├── test_hermes_trajectory_ingest.py
│       ├── test_hint_feedback.py
│       ├── test_hint_persistence.py
│       ├── test_hint_volume_control.py
│       ├── test_holdout_evaluation.py
│       ├── test_hub_api.py
│       ├── test_human_feedback.py
│       ├── test_hypothesis_tree.py
│       ├── test_improvement_loop.py
│       ├── test_improvement_loop_events.py
│       ├── test_improvement_loop_resilience.py
│       ├── test_improvement_loop_verifier.py
│       ├── test_integration_docs.py
│       ├── test_integration_improvement.py
│       ├── test_intent_validation.py
│       ├── test_interface_conventions.py
│       ├── test_investigation_actions_coerce.py
│       ├── test_investigation_browser_context.py
│       ├── test_investigation_engine.py
│       ├── test_investigation_workflow.py
│       ├── test_judge.py
│       ├── test_judge_provider_inheritance.py
│       ├── test_judge_rubrics.py
│       ├── test_knowledge_api.py
│       ├── test_knowledge_coherence.py
│       ├── test_knowledge_compaction.py
│       ├── test_knowledge_solver.py
│       ├── test_lesson_applicability.py
│       ├── test_living_docs.py
│       ├── test_llm_classifier_fallback.py
│       ├── test_loop_controller.py
│       ├── test_loop_integration_snapshot_evidence.py
│       ├── test_match_export.py
│       ├── test_mcp_agent_tasks.py
│       ├── test_mcp_server.py
│       ├── test_mcp_tools.py
│       ├── test_memory_consolidation.py
│       ├── test_mlx_provider.py
│       ├── test_model_registry.py
│       ├── test_model_router.py
│       ├── test_model_router_integration.py
│       ├── test_module_size_limits.py
│       ├── test_monitor.py
│       ├── test_monty_e2e.py
│       ├── test_monty_executor.py
│       ├── test_monty_live.py
│       ├── test_monty_repl_integration.py
│       ├── test_monty_repl_live.py
│       ├── test_monty_repl_settings.py
│       ├── test_monty_repl_wiring.py
│       ├── test_monty_repl_worker.py
│       ├── test_monty_settings.py
│       ├── test_multi_gen_stall.py
│       ├── test_mutation_log.py
│       ├── test_negotiation.py
│       ├── test_negotiation_verification.py
│       ├── test_new_scenario_cli.py
│       ├── test_normalized_metrics.py
│       ├── test_notebook_wiring.py
│       ├── test_notifications.py
│       ├── test_objective_guardrail.py
│       ├── test_objective_verification.py
│       ├── test_openai_agent_provider.py
│       ├── test_openclaw_adapters.py
│       ├── test_openclaw_agent_adapter.py
│       ├── test_openclaw_discovery.py
│       ├── test_openclaw_operations.py
│       ├── test_openclaw_skill.py
│       ├── test_operator_loop_coordination.py
│       ├── test_operator_loop_unsupported.py
│       ├── test_orchestrator_feedback.py
│       ├── test_output_cleaner.py
│       ├── test_output_verifier.py
│       ├── test_package_boundaries.py
│       ├── test_package_topology.py
│       ├── test_param_type_conventions.py
│       ├── test_pareto_optimizer.py
│       ├── test_per_role_provider.py
│       ├── test_phased_execution.py
│       ├── test_pi_artifacts.py
│       ├── test_pi_cli_runtime.py
│       ├── test_pi_cli_timeout_cleanup.py
│       ├── test_pi_package_export.py
│       ├── test_pi_protocol_alignment.py
│       ├── test_pi_provider_surface.py
│       ├── test_pi_rpc.py
│       ├── test_pi_smoke.py
│       ├── test_pipeline_adapter.py
│       ├── test_pipeline_wiring.py
│       ├── test_policy_executor.py
│       ├── test_policy_refinement.py
│       ├── test_policy_refinement_integration.py
│       ├── test_preflight.py
│       ├── test_prepare_mlx.py
│       ├── test_preset_named.py
│       ├── test_presets.py
│       ├── test_prevalidation.py
│       ├── test_primeintellect_client.py
│       ├── test_probe_pipeline.py
│       ├── test_production_traces_contract.py
│       ├── test_production_traces_emit.py
│       ├── test_production_traces_fixtures.py
│       ├── test_production_traces_hashing.py
│       ├── test_production_traces_validate.py
│       ├── test_program_template.py
│       ├── test_progress_digests.py
│       ├── test_progress_json.py
│       ├── test_protocol.py
│       ├── test_protocol_parity.py
│       ├── test_provider_retry.py
│       ├── test_providers.py
│       ├── test_pydantic_migration.py
│       ├── test_python_control_package.py
│       ├── test_python_core_package.py
│       ├── test_rapid_exploration.py
│       ├── test_refinement_prompt.py
│       ├── test_remediation_router.py
│       ├── test_remote_bridge.py
│       ├── test_remove_hardcoded_models.py
│       ├── test_removed_backpressure_modules.py
│       ├── test_removed_harness_modules.py
│       ├── test_replay_narrative_flow.py
│       ├── test_research_adapter.py
│       ├── test_research_consultation.py
│       ├── test_research_eval.py
│       ├── test_research_hub.py
│       ├── test_research_persistence.py
│       ├── test_research_prompt_wiring.py
│       ├── test_research_protocol.py
│       ├── test_research_runtime.py
│       ├── test_restore_versioning.py
│       ├── test_retry_learning.py
│       ├── test_retry_provider.py
│       ├── test_revise_output_fix.py
│       ├── test_rlm_competitor.py
│       ├── test_rlm_context_loader.py
│       ├── test_rlm_integration.py
│       ├── test_rlm_repl_worker.py
│       ├── test_rlm_session.py
│       ├── test_role_router.py
│       ├── test_rubric_calibration.py
│       ├── test_rubric_coherence.py
│       ├── test_rubric_drift_calibration.py
│       ├── test_run_trace.py
│       ├── test_runner_integration.py
│       ├── test_runtime_bridge_provider.py
│       ├── test_runtime_budget.py
│       ├── test_runtime_context_layers.py
│       ├── test_runtime_session_api.py
│       ├── test_runtime_session_events.py
│       ├── test_runtime_session_mcp_tools.py
│       ├── test_runtime_session_run_trace.py
│       ├── test_runtime_session_run_wiring.py
│       ├── test_runtime_workspace_env.py
│       ├── test_runtimes.py
│       ├── test_sample_states.py
│       ├── test_sandbox.py
│       ├── test_scenario_artifact_paths.py
│       ├── test_scenario_behavioral_contract.py
│       ├── test_scenario_capabilities.py
│       ├── test_scenario_creator.py
│       ├── test_scenario_dispatch.py
│       ├── test_scenario_families.py
│       ├── test_scenario_routing.py
│       ├── test_scenario_templates.py
│       ├── test_scenario_type_completeness.py
│       ├── test_scenarios.py
│       ├── test_schema_evolution_tool_fragility.py
│       ├── test_score_trajectory.py
│       ├── test_scoring_backends.py
│       ├── test_sdk.py
│       ├── test_secret_scanner.py
│       ├── test_seed_tools.py
│       ├── test_self_play.py
│       ├── test_semantic_compaction_benchmark.py
│       ├── test_serde_conventions.py
│       ├── test_server_health.py
│       ├── test_service_layer.py
│       ├── test_session_notebook.py
│       ├── test_session_report_wiring.py
│       ├── test_session_reports.py
│       ├── test_session_runtime.py
│       ├── test_session_supervisor.py
│       ├── test_settings_cleanup.py
│       ├── test_shared_tools.py
│       ├── test_sharing.py
│       ├── test_signature_surfacer.py
│       ├── test_simulate_bug_fixes.py
│       ├── test_simulate_command.py
│       ├── test_simulation_contract.py
│       ├── test_simulation_helpers.py
│       ├── test_simulation_spec.py
│       ├── test_skeptic.py
│       ├── test_skill_consolidation.py
│       ├── test_skill_registry.py
│       ├── test_smoke_judge.py
│       ├── test_solve_cli_aliases.py
│       ├── test_solve_family_override.py
│       ├── test_solve_family_typo.py
│       ├── test_solve_verbatim_prompt.py
│       ├── test_solve_verbatim_wiring.py
│       ├── test_sqlite_store.py
│       ├── test_sqlite_store_bootstrap.py
│       ├── test_ssh_executor.py
│       ├── test_stage_preflight.py
│       ├── test_stage_probe.py
│       ├── test_stage_staged_validation.py
│       ├── test_stage_tree_search.py
│       ├── test_staged_runner.py
│       ├── test_staged_validation.py
│       ├── test_staged_validation_storage.py
│       ├── test_stages_enriched_retry.py
│       ├── test_stagnation.py
│       ├── test_startup_verification.py
│       ├── test_strategy_package.py
│       ├── test_strategy_package_cli.py
│       ├── test_strategy_translator.py
│       ├── test_subscription_cli_provider_surface.py
│       ├── test_task_input.py
│       ├── test_task_metrics.py
│       ├── test_task_queue_priority.py
│       ├── test_task_runner.py
│       ├── test_time_budget.py
│       ├── test_timeline_inspector.py
│       ├── test_tool_context_full.py
│       ├── test_tool_validation.py
│       ├── test_tournament_helpers.py
│       ├── test_trace_reporter.py
│       ├── test_train_cuda.py
│       ├── test_train_mlx.py
│       ├── test_train_summary.py
│       ├── test_training_backend.py
│       ├── test_training_export.py
│       ├── test_training_init.py
│       ├── test_training_pi_provider.py
│       ├── test_training_runner.py
│       ├── test_trajectory_harness.py
│       ├── test_translator_simplification.py
│       ├── test_trend_gate_integration.py
│       ├── test_two_tier_tournament.py
│       ├── test_typed_contracts.py
│       ├── test_typed_dict_rows.py
│       ├── test_validity_gate.py
│       ├── test_verbatim_solve_default_rubric.py
│       ├── test_verification_dataset.py
│       ├── test_weakness_reports.py
│       ├── test_websocket_protocol_contract.py
│       └── test_world_state.py
├── docs/
│   ├── README.md
│   ├── analytics.md
│   ├── app-settings-contract.json
│   ├── browser-exploration-contract.md
│   ├── concept-model.json
│   ├── concept-model.md
│   ├── contributor-rights-audit.md
│   ├── core-control-package-split.md
│   ├── flue-influences.md
│   ├── hermes-plugin-emitter-spike.md
│   ├── hermes-positioning.md
│   ├── knowledge-production-trace-boundary-map.md
│   ├── migrations/
│   │   ├── 2026-04-a2-ii-b-detector-plugin-contract.md
│   │   └── 2026-04-a2-iii-taxonomy-and-shared-extraction.md
│   ├── opentelemetry-bridge.md
│   ├── release-checklist.md
│   ├── scenario-parity-matrix.md
│   └── websocket-protocol-contract.json
├── examples/
│   ├── README.md
│   └── agent-runtime/
│       └── .autoctx/
│           └── agents/
│               └── support.ts
├── fixtures/
│   └── cross-runtime/
│       └── trace-finding-report.json
├── infra/
│   ├── docker/
│   │   ├── Dockerfile
│   │   └── docker-compose.yml
│   ├── fly/
│   │   └── fly.toml
│   └── scripts/
│       └── bootstrap.sh
├── knowledge/
│   └── .gitkeep
├── packages/
│   ├── README.md
│   ├── package-boundaries.json
│   ├── package-topology.json
│   ├── python/
│   │   ├── control/
│   │   │   ├── README.md
│   │   │   ├── pyproject.toml
│   │   │   └── src/
│   │   │       └── autocontext_control/
│   │   │           └── __init__.py
│   │   └── core/
│   │       ├── README.md
│   │       ├── pyproject.toml
│   │       └── src/
│   │           └── autocontext_core/
│   │               └── __init__.py
│   └── ts/
│       ├── control-plane/
│       │   ├── README.md
│       │   ├── package.json
│       │   ├── src/
│       │   │   └── index.ts
│       │   └── tsconfig.json
│       └── core/
│           ├── README.md
│           ├── package.json
│           ├── src/
│           │   └── index.ts
│           └── tsconfig.json
├── pi/
│   ├── .npmignore
│   ├── README.md
│   ├── package.json
│   ├── prompts/
│   │   ├── autoctx-improve.md
│   │   ├── autoctx-judge.md
│   │   └── autoctx-status.md
│   ├── skills/
│   │   └── autocontext/
│   │       └── SKILL.md
│   ├── src/
│   │   ├── index.ts
│   │   └── runtime-snapshot.ts
│   ├── tests/
│   │   ├── extension.test.ts
│   │   └── runtime-snapshot.test.ts
│   ├── tsconfig.json
│   ├── types/
│   │   └── autoctx.d.ts
│   └── vitest.config.ts
├── protocol/
│   └── autocontext-protocol.json
├── runs/
│   └── .gitkeep
├── scripts/
│   ├── demo.sh
│   ├── escalation-sweep/
│   │   ├── README.md
│   │   ├── fetch_manifest.py
│   │   ├── run_sweep.sh
│   │   └── summarize.py
│   ├── generate_protocol.py
│   └── sync_banner_surfaces.py
├── skills/
│   └── .gitkeep
└── ts/
    ├── .gitignore
    ├── README.md
    ├── examples/
    │   └── run-repl-session.mjs
    ├── migrations/
    │   ├── 007_task_queue.sql
    │   ├── 008_human_feedback.sql
    │   ├── 009_generation_loop.sql
    │   ├── 010_session_notebook.sql
    │   ├── 011_monitors.sql
    │   ├── 012_consultation_log.sql
    │   ├── 012_research_hub.sql
    │   └── 013_runs_status_default_parity.sql
    ├── package.json
    ├── scripts/
    │   ├── build-production-traces-sdk-cjs.mjs
    │   ├── check-detector-anthropic-python-bundle-size.mjs
    │   ├── check-detector-anthropic-ts-bundle-size.mjs
    │   ├── check-detector-openai-python-bundle-size.mjs
    │   ├── check-detector-openai-ts-bundle-size.mjs
    │   ├── check-instrument-schemas.mjs
    │   ├── check-integrations-anthropic-bundle-size.mjs
    │   ├── check-integrations-openai-bundle-size.mjs
    │   ├── check-integrations-shared-bundle-size.mjs
    │   ├── check-license-compatibility.mjs
    │   ├── check-no-postinstall-scripts.mjs
    │   ├── check-no-telemetry.mjs
    │   ├── check-production-traces-sdk-bundle-size.mjs
    │   ├── check-sdk-import-discipline.mjs
    │   ├── check-side-effects.mjs
    │   ├── drive-anthropic-parity-fixture.mjs
    │   ├── drive-parity-fixture.mjs
    │   ├── generate-browser-contract-types.mjs
    │   ├── generate-production-traces-types.mjs
    │   ├── regenerate-cross-runtime-fixtures.mjs
    │   ├── sync-python-browser-contract-schemas.mjs
    │   └── sync-python-production-traces-schemas.mjs
    ├── src/
    │   ├── agent-runtime/
    │   │   └── index.ts
    │   ├── agentos/
    │   │   ├── adapter.ts
    │   │   ├── lifecycle.ts
    │   │   └── types.ts
    │   ├── agents/
    │   │   ├── curator-parser.ts
    │   │   ├── model-router.ts
    │   │   ├── orchestrator.ts
    │   │   ├── provider-bridge.ts
    │   │   └── roles.ts
    │   ├── analysis/
    │   │   └── engine.ts
    │   ├── analytics/
    │   │   ├── credit-assignment-attribution-workflow.ts
    │   │   ├── credit-assignment-contracts.ts
    │   │   ├── credit-assignment-contribution-workflow.ts
    │   │   ├── credit-assignment-magnitude.ts
    │   │   ├── credit-assignment-models.ts
    │   │   ├── credit-assignment-reporting.ts
    │   │   ├── credit-assignment-serialization-workflow.ts
    │   │   ├── credit-assignment-vector-workflow.ts
    │   │   ├── credit-assignment.ts
    │   │   ├── number-utils.ts
    │   │   ├── rubric-drift-statistics.ts
    │   │   ├── rubric-drift-types.ts
    │   │   ├── rubric-drift-warnings.ts
    │   │   ├── rubric-drift.ts
    │   │   ├── run-trace.ts
    │   │   ├── runtime-session-run-trace.ts
    │   │   ├── timeline-inspector.ts
    │   │   └── trace-findings.ts
    │   ├── blobstore/
    │   │   ├── cache.ts
    │   │   ├── factory.ts
    │   │   ├── fs-errors.ts
    │   │   ├── index.ts
    │   │   ├── local.ts
    │   │   ├── mirror.ts
    │   │   ├── ref.ts
    │   │   ├── registry.ts
    │   │   ├── store.ts
    │   │   └── sync.ts
    │   ├── bootstrap/
    │   │   ├── collector.ts
    │   │   ├── index.ts
    │   │   ├── redactor.ts
    │   │   ├── renderer.ts
    │   │   └── snapshot.ts
    │   ├── cli/
    │   │   ├── agent-command-workflow.ts
    │   │   ├── auth-provider-command-workflow.ts
    │   │   ├── autocontext-shim.ts
    │   │   ├── benchmark-command-workflow.ts
    │   │   ├── blob-command-workflow.ts
    │   │   ├── campaign-command-execution.ts
    │   │   ├── campaign-command-workflow.ts
    │   │   ├── capabilities-command-workflow.ts
    │   │   ├── command-registry.ts
    │   │   ├── context-selection-command-workflow.ts
    │   │   ├── emit-engine-result.ts
    │   │   ├── export-command-workflow.ts
    │   │   ├── export-training-data-command-workflow.ts
    │   │   ├── import-package-command-workflow.ts
    │   │   ├── improve-command-workflow.ts
    │   │   ├── index.ts
    │   │   ├── init-command-workflow.ts
    │   │   ├── investigate-command-workflow.ts
    │   │   ├── judge-command-workflow.ts
    │   │   ├── list-command-workflow.ts
    │   │   ├── mcp-serve-command-workflow.ts
    │   │   ├── mission-command-execution.ts
    │   │   ├── mission-command-workflow.ts
    │   │   ├── new-scenario-command-contracts.ts
    │   │   ├── new-scenario-command-workflow.ts
    │   │   ├── new-scenario-created-materialization-preparation.ts
    │   │   ├── new-scenario-created-materialization.ts
    │   │   ├── new-scenario-created-result-rendering.ts
    │   │   ├── new-scenario-family-resolution.ts
    │   │   ├── new-scenario-guards.ts
    │   │   ├── new-scenario-import-field-parsing.ts
    │   │   ├── new-scenario-import-spec-assembly.ts
    │   │   ├── new-scenario-imported-materialization-preparation.ts
    │   │   ├── new-scenario-imported-materialization-public-helper.ts
    │   │   ├── new-scenario-materialization-execution.ts
    │   │   ├── new-scenario-normalization-workflow.ts
    │   │   ├── new-scenario-rendering-workflow.ts
    │   │   ├── new-scenario-result-line-builders.ts
    │   │   ├── new-scenario-result-output-serialization.ts
    │   │   ├── new-scenario-result-payload-builders.ts
    │   │   ├── new-scenario-result-rendering-entrypoints.ts
    │   │   ├── new-scenario-template-output-serialization.ts
    │   │   ├── new-scenario-template-rendering-public-helper.ts
    │   │   ├── new-scenario-template-rendering.ts
    │   │   ├── new-scenario-template-scaffold-execution.ts
    │   │   ├── new-scenario-template-scaffold-planning.ts
    │   │   ├── queue-status-command-workflow.ts
    │   │   ├── repl-command-workflow.ts
    │   │   ├── replay-command-workflow.ts
    │   │   ├── run-command-workflow.ts
    │   │   ├── run-inspection-command-workflow.ts
    │   │   ├── runnable-scenario-resolution.ts
    │   │   ├── runtime-session-command-workflow.ts
    │   │   ├── serve-command-workflow.ts
    │   │   ├── simulate-command-workflow.ts
    │   │   ├── solve-command-workflow.ts
    │   │   ├── trace-findings-command-workflow.ts
    │   │   ├── train-command-workflow.ts
    │   │   ├── tui-command-workflow.ts
    │   │   └── worker-command-workflow.ts
    │   ├── concepts/
    │   │   └── model.ts
    │   ├── config/
    │   │   ├── app-settings-schema.ts
    │   │   ├── config-json-helpers.ts
    │   │   ├── credential-model-catalog.ts
    │   │   ├── credential-provider-discovery.ts
    │   │   ├── credential-store.ts
    │   │   ├── credential-validation.ts
    │   │   ├── credentials.ts
    │   │   ├── index.ts
    │   │   ├── oauth.ts
    │   │   ├── persisted-credentials.ts
    │   │   ├── presets.ts
    │   │   ├── project-config.ts
    │   │   ├── settings-assembly-workflow.ts
    │   │   └── settings-resolution.ts
    │   ├── control-plane/
    │   │   ├── actuators/
    │   │   │   ├── _shared/
    │   │   │   │   ├── content-revert-rollback.ts
    │   │   │   │   ├── single-file-applicator.ts
    │   │   │   │   └── unified-diff-emitter.ts
    │   │   │   ├── errors.ts
    │   │   │   ├── fine-tuned-model/
    │   │   │   │   ├── applicator.ts
    │   │   │   │   ├── index.ts
    │   │   │   │   ├── legacy-adapter.ts
    │   │   │   │   └── schema.ts
    │   │   │   ├── index.ts
    │   │   │   ├── model-routing/
    │   │   │   │   ├── applicator.ts
    │   │   │   │   ├── index.ts
    │   │   │   │   └── schema.ts
    │   │   │   ├── prompt-patch/
    │   │   │   │   ├── applicator.ts
    │   │   │   │   ├── index.ts
    │   │   │   │   └── schema.ts
    │   │   │   ├── registry.ts
    │   │   │   ├── routing-rule/
    │   │   │   │   ├── applicator.ts
    │   │   │   │   ├── index.ts
    │   │   │   │   └── schema.ts
    │   │   │   └── tool-policy/
    │   │   │       ├── applicator.ts
    │   │   │       ├── index.ts
    │   │   │       └── schema.ts
    │   │   ├── cli/
    │   │   │   ├── _shared/
    │   │   │   │   ├── exit-codes.ts
    │   │   │   │   └── output-formatters.ts
    │   │   │   ├── candidate.ts
    │   │   │   ├── emit-pr.ts
    │   │   │   ├── eval.ts
    │   │   │   ├── harness.ts
    │   │   │   ├── index.ts
    │   │   │   ├── promotion.ts
    │   │   │   ├── registry-ops.ts
    │   │   │   └── types.ts
    │   │   ├── contract/
    │   │   │   ├── ablation-verification.ts
    │   │   │   ├── branded-ids.ts
    │   │   │   ├── canonical-json.ts
    │   │   │   ├── eval-run-integrity.ts
    │   │   │   ├── factories.ts
    │   │   │   ├── harness-change-proposal.ts
    │   │   │   ├── index.ts
    │   │   │   ├── invariants.ts
    │   │   │   ├── json-schemas/
    │   │   │   │   ├── artifact.schema.json
    │   │   │   │   ├── eval-run.schema.json
    │   │   │   │   ├── fine-tuned-model-payload.schema.json
    │   │   │   │   ├── harness-change-proposal.schema.json
    │   │   │   │   ├── metric-bundle.schema.json
    │   │   │   │   ├── model-routing-payload.schema.json
    │   │   │   │   ├── patch.schema.json
    │   │   │   │   ├── promotion-decision.schema.json
    │   │   │   │   ├── promotion-event.schema.json
    │   │   │   │   ├── prompt-patch-payload.schema.json
    │   │   │   │   ├── provenance.schema.json
    │   │   │   │   ├── routing-rule-payload.schema.json
    │   │   │   │   ├── shared-defs.schema.json
    │   │   │   │   └── tool-policy-payload.schema.json
    │   │   │   ├── run-track.ts
    │   │   │   ├── schema-version.ts
    │   │   │   ├── strategy-identity.ts
    │   │   │   ├── strategy-quarantine.ts
    │   │   │   ├── types.ts
    │   │   │   └── validators.ts
    │   │   ├── contract-probes/
    │   │   │   └── index.ts
    │   │   ├── emit/
    │   │   │   ├── branch-namer.ts
    │   │   │   ├── index.ts
    │   │   │   ├── modes/
    │   │   │   │   ├── auto.ts
    │   │   │   │   ├── gh.ts
    │   │   │   │   ├── git.ts
    │   │   │   │   └── patch-only.ts
    │   │   │   ├── patch-renderer.ts
    │   │   │   ├── pipeline.ts
    │   │   │   ├── pr-body-renderer.ts
    │   │   │   ├── preflight.ts
    │   │   │   └── workspace-layout.ts
    │   │   ├── eval-ingest/
    │   │   │   ├── attach.ts
    │   │   │   ├── errors.ts
    │   │   │   ├── index.ts
    │   │   │   └── validator.ts
    │   │   ├── eval-ledger/
    │   │   │   └── index.ts
    │   │   ├── external-evals/
    │   │   │   └── index.ts
    │   │   ├── instrument/
    │   │   │   ├── cli/
    │   │   │   │   ├── index.ts
    │   │   │   │   ├── instrument.ts
    │   │   │   │   └── runner.ts
    │   │   │   ├── contract/
    │   │   │   │   ├── index.ts
    │   │   │   │   ├── json-schemas/
    │   │   │   │   │   ├── instrument-plan.schema.json
    │   │   │   │   │   └── instrument-session.schema.json
    │   │   │   │   ├── plugin-compat.ts
    │   │   │   │   ├── plugin-interface.ts
    │   │   │   │   └── validators.ts
    │   │   │   ├── detectors/
    │   │   │   │   ├── anthropic-python/
    │   │   │   │   │   ├── STABILITY.md
    │   │   │   │   │   ├── index.ts
    │   │   │   │   │   └── plugin.ts
    │   │   │   │   ├── anthropic-ts/
    │   │   │   │   │   ├── STABILITY.md
    │   │   │   │   │   ├── index.ts
    │   │   │   │   │   └── plugin.ts
    │   │   │   │   ├── openai-python/
    │   │   │   │   │   ├── STABILITY.md
    │   │   │   │   │   ├── index.ts
    │   │   │   │   │   └── plugin.ts
    │   │   │   │   └── openai-ts/
    │   │   │   │       ├── STABILITY.md
    │   │   │   │       ├── index.ts
    │   │   │   │       └── plugin.ts
    │   │   │   ├── index.ts
    │   │   │   ├── llm/
    │   │   │   │   ├── enhancer.ts
    │   │   │   │   ├── index.ts
    │   │   │   │   ├── prompts.ts
    │   │   │   │   └── tty-detector.ts
    │   │   │   ├── pipeline/
    │   │   │   │   ├── index.ts
    │   │   │   │   ├── modes/
    │   │   │   │   │   ├── apply.ts
    │   │   │   │   │   ├── branch.ts
    │   │   │   │   │   └── dry-run.ts
    │   │   │   │   ├── orchestrator.ts
    │   │   │   │   ├── pr-body-renderer.ts
    │   │   │   │   └── preflight.ts
    │   │   │   ├── planner/
    │   │   │   │   ├── conflict-detector.ts
    │   │   │   │   ├── edit-composer.ts
    │   │   │   │   ├── import-manager.ts
    │   │   │   │   ├── indentation-matcher.ts
    │   │   │   │   └── index.ts
    │   │   │   ├── registry/
    │   │   │   │   ├── index.ts
    │   │   │   │   └── plugin-registry.ts
    │   │   │   ├── safety/
    │   │   │   │   ├── directive-parser.ts
    │   │   │   │   ├── hardcoded-defaults.ts
    │   │   │   │   ├── index.ts
    │   │   │   │   └── secret-detector.ts
    │   │   │   └── scanner/
    │   │   │       ├── file-type-filter.ts
    │   │   │       ├── index.ts
    │   │   │       ├── source-file.ts
    │   │   │       ├── tree-sitter-loader.ts
    │   │   │       └── walker.ts
    │   │   ├── memory-packs/
    │   │   │   └── index.ts
    │   │   ├── promotion/
    │   │   │   ├── append.ts
    │   │   │   ├── decide.ts
    │   │   │   ├── harness-change-proposal.ts
    │   │   │   ├── index.ts
    │   │   │   ├── thresholds.ts
    │   │   │   └── transitions.ts
    │   │   ├── registry/
    │   │   │   ├── artifact-store.ts
    │   │   │   ├── content-address.ts
    │   │   │   ├── eval-run-store.ts
    │   │   │   ├── harness-proposal-store.ts
    │   │   │   ├── history-store.ts
    │   │   │   ├── index-cache.ts
    │   │   │   ├── index.ts
    │   │   │   ├── lock.ts
    │   │   │   ├── repair.ts
    │   │   │   ├── state-pointer.ts
    │   │   │   └── validate.ts
    │   │   └── runtime/
    │   │       ├── index.ts
    │   │       ├── model-router.ts
    │   │       └── task-budget.ts
    │   ├── evidence/
    │   │   ├── index.ts
    │   │   ├── manifest.ts
    │   │   ├── materializer.ts
    │   │   ├── tracker.ts
    │   │   └── workspace.ts
    │   ├── execution/
    │   │   ├── action-filter-contracts.ts
    │   │   ├── action-filter-discovery-workflow.ts
    │   │   ├── action-filter-prompt-workflow.ts
    │   │   ├── action-filter-selection-workflow.ts
    │   │   ├── action-filter-verification-workflow.ts
    │   │   ├── action-filter.ts
    │   │   ├── elo.ts
    │   │   ├── gondolin-contract.ts
    │   │   ├── harness-loader.ts
    │   │   ├── improvement-loop-detection.ts
    │   │   ├── improvement-loop-policy.ts
    │   │   ├── improvement-loop-result.ts
    │   │   ├── improvement-loop.ts
    │   │   ├── judge-executor.ts
    │   │   ├── output-cleaner.ts
    │   │   ├── queued-task-browser-context.ts
    │   │   ├── sandbox.ts
    │   │   ├── simple-agent-task-workflow.ts
    │   │   ├── strategy-validator.ts
    │   │   ├── supervisor.ts
    │   │   ├── task-processing-workflow.ts
    │   │   ├── task-queue-store.ts
    │   │   ├── task-runner-config.ts
    │   │   ├── task-runner-loop-workflow.ts
    │   │   ├── task-runner.ts
    │   │   └── tournament.ts
    │   ├── extensions/
    │   │   ├── hooks.ts
    │   │   ├── index.ts
    │   │   ├── loader.ts
    │   │   └── provider-hooks.ts
    │   ├── index.ts
    │   ├── integrations/
    │   │   ├── _shared/
    │   │   │   ├── STABILITY.md
    │   │   │   ├── index.ts
    │   │   │   ├── proxy-runtime.ts
    │   │   │   ├── session.ts
    │   │   │   └── sink.ts
    │   │   ├── anthropic/
    │   │   │   ├── STABILITY.md
    │   │   │   ├── content.ts
    │   │   │   ├── index.ts
    │   │   │   ├── proxy.ts
    │   │   │   ├── stream-proxy.ts
    │   │   │   ├── taxonomy.ts
    │   │   │   ├── trace-builder.ts
    │   │   │   └── wrap.ts
    │   │   ├── browser/
    │   │   │   ├── chrome-cdp-discovery.ts
    │   │   │   ├── chrome-cdp-runtime.ts
    │   │   │   ├── chrome-cdp-transport.ts
    │   │   │   ├── chrome-cdp.ts
    │   │   │   ├── context-capture.ts
    │   │   │   ├── contract/
    │   │   │   │   ├── generated-types.ts
    │   │   │   │   ├── index.ts
    │   │   │   │   ├── json-schemas/
    │   │   │   │   │   ├── browser-action.schema.json
    │   │   │   │   │   ├── browser-audit-event.schema.json
    │   │   │   │   │   ├── browser-contract.schema.json
    │   │   │   │   │   ├── browser-session-config.schema.json
    │   │   │   │   │   ├── browser-snapshot.schema.json
    │   │   │   │   │   └── shared-defs.schema.json
    │   │   │   │   ├── types.ts
    │   │   │   │   └── validators.ts
    │   │   │   ├── evidence.ts
    │   │   │   ├── factory.ts
    │   │   │   ├── index.ts
    │   │   │   ├── policy.ts
    │   │   │   └── types.ts
    │   │   └── openai/
    │   │       ├── STABILITY.md
    │   │       ├── index.ts
    │   │       ├── proxy.ts
    │   │       ├── session.ts
    │   │       ├── sink.ts
    │   │       ├── stream-proxy.ts
    │   │       ├── taxonomy.ts
    │   │       ├── trace-builder.ts
    │   │       └── wrap.ts
    │   ├── investigation/
    │   │   ├── browser-context.ts
    │   │   ├── engine.ts
    │   │   ├── investigation-analysis-result-workflow.ts
    │   │   ├── investigation-analysis-workflow.ts
    │   │   ├── investigation-contracts.ts
    │   │   ├── investigation-engine-helpers.ts
    │   │   ├── investigation-execution-workflow.ts
    │   │   ├── investigation-generation-parsing.ts
    │   │   ├── investigation-generation-prompts.ts
    │   │   ├── investigation-generation-workflow.ts
    │   │   ├── investigation-result-workflow.ts
    │   │   ├── investigation-run-support-workflow.ts
    │   │   ├── investigation-run-workflow.ts
    │   │   └── investigation-scenario-preparation-workflow.ts
    │   ├── judge/
    │   │   ├── delegated.ts
    │   │   ├── index.ts
    │   │   ├── llm-judge.ts
    │   │   ├── parse.ts
    │   │   └── rubric-coherence.ts
    │   ├── knowledge/
    │   │   ├── agent-task-solve-execution.ts
    │   │   ├── artifact-store.ts
    │   │   ├── built-in-game-solve-execution.ts
    │   │   ├── codegen-solve-execution.ts
    │   │   ├── compaction-ledger.ts
    │   │   ├── context-selection-report.ts
    │   │   ├── context-selection-store.ts
    │   │   ├── dead-end.ts
    │   │   ├── harness-store.ts
    │   │   ├── index.ts
    │   │   ├── package-coercion.ts
    │   │   ├── package-content.ts
    │   │   ├── package-metadata.ts
    │   │   ├── package-types.ts
    │   │   ├── package.ts
    │   │   ├── playbook.ts
    │   │   ├── research-hub.ts
    │   │   ├── scenario-id.ts
    │   │   ├── semantic-compaction.ts
    │   │   ├── session-report.ts
    │   │   ├── skill-package-contracts.ts
    │   │   ├── skill-package-dict-workflow.ts
    │   │   ├── skill-package-export-workflow.ts
    │   │   ├── skill-package-lesson-cleaning.ts
    │   │   ├── skill-package-markdown-workflow.ts
    │   │   ├── skill-package.ts
    │   │   ├── solve-generation-budget.ts
    │   │   ├── solve-job-workflow.ts
    │   │   ├── solve-manager-workflow.ts
    │   │   ├── solve-package-builders.ts
    │   │   ├── solve-package-helpers.ts
    │   │   ├── solve-scenario-routing.ts
    │   │   ├── solve-workflow.ts
    │   │   ├── solver.ts
    │   │   ├── trajectory.ts
    │   │   └── versioned-store.ts
    │   ├── loop/
    │   │   ├── backpressure.ts
    │   │   ├── controller.ts
    │   │   ├── events.ts
    │   │   ├── generation-attempt-orchestrator.ts
    │   │   ├── generation-attempt-state.ts
    │   │   ├── generation-attempt-workflow.ts
    │   │   ├── generation-cycle-state.ts
    │   │   ├── generation-event-coordinator.ts
    │   │   ├── generation-execution-step.ts
    │   │   ├── generation-journal.ts
    │   │   ├── generation-lifecycle-workflow.ts
    │   │   ├── generation-loop-orchestrator.ts
    │   │   ├── generation-phase-state.ts
    │   │   ├── generation-prompts.ts
    │   │   ├── generation-recovery.ts
    │   │   ├── generation-run-state.ts
    │   │   ├── generation-runner.ts
    │   │   ├── generation-side-effect-coordinator.ts
    │   │   ├── generation-tournament-event-sequencing.ts
    │   │   ├── hypothesis-tree.ts
    │   │   ├── index.ts
    │   │   └── stagnation.ts
    │   ├── mcp/
    │   │   ├── agent-task-package-tools.ts
    │   │   ├── campaign-tools.ts
    │   │   ├── capabilities.ts
    │   │   ├── core-control-tools.ts
    │   │   ├── feedback-replay-tools.ts
    │   │   ├── instrument-tools.ts
    │   │   ├── knowledge-readback-tools.ts
    │   │   ├── mission-tools.ts
    │   │   ├── production-traces-tools.ts
    │   │   ├── run-management-tools.ts
    │   │   ├── runtime-session-tools.ts
    │   │   ├── sandbox-tools.ts
    │   │   ├── scenario-catalog-tools.ts
    │   │   ├── scenario-execution-tools.ts
    │   │   ├── scenario-revision-tools.ts
    │   │   ├── server.ts
    │   │   └── solve-tools.ts
    │   ├── mission/
    │   │   ├── adaptive-executor.ts
    │   │   ├── campaign-contracts.ts
    │   │   ├── campaign-lifecycle-workflow.ts
    │   │   ├── campaign-manager-access-workflow.ts
    │   │   ├── campaign-manager-workflow.ts
    │   │   ├── campaign-membership-store-workflow.ts
    │   │   ├── campaign-store-query-workflow.ts
    │   │   ├── campaign-store-workflow.ts
    │   │   ├── campaign-store.ts
    │   │   ├── campaign.ts
    │   │   ├── checkpoint.ts
    │   │   ├── control-plane.ts
    │   │   ├── events.ts
    │   │   ├── executor.ts
    │   │   ├── index.ts
    │   │   ├── lifecycle.ts
    │   │   ├── manager.ts
    │   │   ├── planner.ts
    │   │   ├── proof.ts
    │   │   ├── simulation-bridge.ts
    │   │   ├── status-transitions.ts
    │   │   ├── store-contracts.ts
    │   │   ├── store-lifecycle-workflow.ts
    │   │   ├── store-mappers.ts
    │   │   ├── store-schema-workflow.ts
    │   │   ├── store.ts
    │   │   ├── types.ts
    │   │   ├── verification-workflow.ts
    │   │   └── verifiers.ts
    │   ├── notifications/
    │   │   └── index.ts
    │   ├── openclaw/
    │   │   ├── artifact-contract.ts
    │   │   ├── distill-job-store.ts
    │   │   └── service.ts
    │   ├── production-traces/
    │   │   ├── cli/
    │   │   │   ├── _shared/
    │   │   │   │   ├── exit-codes.ts
    │   │   │   │   ├── flags.ts
    │   │   │   │   ├── output-formatters.ts
    │   │   │   │   ├── trace-loading.ts
    │   │   │   │   └── types.ts
    │   │   │   ├── build-dataset.ts
    │   │   │   ├── datasets.ts
    │   │   │   ├── export.ts
    │   │   │   ├── index.ts
    │   │   │   ├── ingest.ts
    │   │   │   ├── init.ts
    │   │   │   ├── list-show-stats.ts
    │   │   │   ├── policy.ts
    │   │   │   ├── prune.ts
    │   │   │   └── rotate-salt.ts
    │   │   ├── contract/
    │   │   │   ├── branded-ids.ts
    │   │   │   ├── canonical-json.ts
    │   │   │   ├── content-address.ts
    │   │   │   ├── factories.ts
    │   │   │   ├── generated-types.ts
    │   │   │   ├── index.ts
    │   │   │   ├── invariants.ts
    │   │   │   ├── json-schemas/
    │   │   │   │   ├── cluster-config.schema.json
    │   │   │   │   ├── dataset-manifest.schema.json
    │   │   │   │   ├── dataset-row.schema.json
    │   │   │   │   ├── env-context.schema.json
    │   │   │   │   ├── feedback-ref.schema.json
    │   │   │   │   ├── production-outcome.schema.json
    │   │   │   │   ├── production-trace.schema.json
    │   │   │   │   ├── redaction-marker.schema.json
    │   │   │   │   ├── redaction-policy.schema.json
    │   │   │   │   ├── retention-policy.schema.json
    │   │   │   │   ├── rubric-config.schema.json
    │   │   │   │   ├── selection-rule.schema.json
    │   │   │   │   ├── session.schema.json
    │   │   │   │   ├── shared-defs.schema.json
    │   │   │   │   ├── timing-info.schema.json
    │   │   │   │   ├── trace-links.schema.json
    │   │   │   │   ├── trace-source.schema.json
    │   │   │   │   └── usage-info.schema.json
    │   │   │   ├── types.ts
    │   │   │   └── validators.ts
    │   │   ├── dataset/
    │   │   │   ├── cluster.ts
    │   │   │   ├── index.ts
    │   │   │   ├── manifest.ts
    │   │   │   ├── pipeline.ts
    │   │   │   ├── provenance.ts
    │   │   │   ├── rubric.ts
    │   │   │   ├── select.ts
    │   │   │   ├── split.ts
    │   │   │   └── types.ts
    │   │   ├── index.ts
    │   │   ├── ingest/
    │   │   │   ├── dedupe.ts
    │   │   │   ├── index.ts
    │   │   │   ├── lock.ts
    │   │   │   ├── paths.ts
    │   │   │   ├── receipt.ts
    │   │   │   ├── redaction-phase.ts
    │   │   │   ├── scan-workflow.ts
    │   │   │   └── validator.ts
    │   │   ├── redaction/
    │   │   │   ├── apply.ts
    │   │   │   ├── hash-primitives.ts
    │   │   │   ├── index.ts
    │   │   │   ├── install-salt.ts
    │   │   │   ├── mark.ts
    │   │   │   ├── policy.ts
    │   │   │   └── types.ts
    │   │   ├── retention/
    │   │   │   ├── enforce.ts
    │   │   │   ├── gc-log.ts
    │   │   │   ├── index.ts
    │   │   │   └── policy.ts
    │   │   ├── sdk/
    │   │   │   ├── BUDGET.md
    │   │   │   ├── STABILITY.md
    │   │   │   ├── build-trace.ts
    │   │   │   ├── hashing-core.ts
    │   │   │   ├── hashing.ts
    │   │   │   ├── index.ts
    │   │   │   ├── trace-batch.ts
    │   │   │   ├── validate.ts
    │   │   │   └── write-jsonl.ts
    │   │   └── taxonomy/
    │   │       ├── anthropic-error-reasons.ts
    │   │       ├── index.ts
    │   │       └── openai-error-reasons.ts
    │   ├── prompts/
    │   │   ├── context-budget.ts
    │   │   └── templates.ts
    │   ├── providers/
    │   │   ├── deterministic.ts
    │   │   ├── index.ts
    │   │   ├── provider-config-resolution.ts
    │   │   ├── provider-factory.ts
    │   │   ├── role-provider-bundle.ts
    │   │   └── supported-provider-types.ts
    │   ├── research/
    │   │   ├── consultation.ts
    │   │   ├── evaluation.ts
    │   │   ├── persistence.ts
    │   │   ├── prompt-wiring.ts
    │   │   ├── runtime.ts
    │   │   └── types.ts
    │   ├── rlm/
    │   │   ├── agent-task.ts
    │   │   ├── index.ts
    │   │   ├── secure-exec-worker.ts
    │   │   ├── session.ts
    │   │   └── types.ts
    │   ├── runtimes/
    │   │   ├── agent-output-metadata.ts
    │   │   ├── base.ts
    │   │   ├── claude-cli.ts
    │   │   ├── codex-cli.ts
    │   │   ├── config-options.ts
    │   │   ├── direct-api.ts
    │   │   ├── index.ts
    │   │   ├── mcp-runtime-tools.ts
    │   │   ├── pi-cli.ts
    │   │   ├── pi-rpc.ts
    │   │   ├── runtime-session-agent.ts
    │   │   └── workspace-env.ts
    │   ├── scenarios/
    │   │   ├── agent-task-creator.ts
    │   │   ├── agent-task-design-workflow.ts
    │   │   ├── agent-task-designer.ts
    │   │   ├── agent-task-factory.ts
    │   │   ├── agent-task-family-routing.ts
    │   │   ├── agent-task-name-workflow.ts
    │   │   ├── agent-task-persistence-workflow.ts
    │   │   ├── agent-task-spec.ts
    │   │   ├── agent-task-store.ts
    │   │   ├── agent-task-validator.ts
    │   │   ├── artifact-editing-creator.ts
    │   │   ├── artifact-editing-designer.ts
    │   │   ├── artifact-editing-spec.ts
    │   │   ├── codegen/
    │   │   │   ├── agent-task-codegen.ts
    │   │   │   ├── artifact-editing-codegen.ts
    │   │   │   ├── coordination-codegen.ts
    │   │   │   ├── execution-validator-contracts.ts
    │   │   │   ├── execution-validator-core-workflow.ts
    │   │   │   ├── execution-validator-family-workflow.ts
    │   │   │   ├── execution-validator.ts
    │   │   │   ├── executor.ts
    │   │   │   ├── index.ts
    │   │   │   ├── investigation-codegen.ts
    │   │   │   ├── loader.ts
    │   │   │   ├── negotiation-codegen.ts
    │   │   │   ├── operator-loop-codegen.ts
    │   │   │   ├── registry.ts
    │   │   │   ├── runtime.ts
    │   │   │   ├── schema-evolution-codegen.ts
    │   │   │   ├── simulation-codegen.ts
    │   │   │   ├── template-renderer.ts
    │   │   │   ├── templates/
    │   │   │   │   ├── agent-task-template.ts
    │   │   │   │   ├── artifact-editing-template.ts
    │   │   │   │   ├── coordination-template.ts
    │   │   │   │   ├── investigation-template.ts
    │   │   │   │   ├── negotiation-template.ts
    │   │   │   │   ├── schema-evolution-template.ts
    │   │   │   │   ├── simulation-template.ts
    │   │   │   │   ├── tool-fragility-template.ts
    │   │   │   │   └── workflow-template.ts
    │   │   │   ├── tool-fragility-codegen.ts
    │   │   │   └── workflow-codegen.ts
    │   │   ├── coordination-creator.ts
    │   │   ├── coordination-designer.ts
    │   │   ├── coordination-spec.ts
    │   │   ├── custom-loader.ts
    │   │   ├── draft-workflow.ts
    │   │   ├── families.ts
    │   │   ├── family-assertion-workflow.ts
    │   │   ├── family-classifier-input.ts
    │   │   ├── family-classifier-scoring.ts
    │   │   ├── family-classifier-signals.ts
    │   │   ├── family-classifier.ts
    │   │   ├── family-contract-helpers.ts
    │   │   ├── family-designer.ts
    │   │   ├── family-detection-catalog.ts
    │   │   ├── family-expected-methods.ts
    │   │   ├── family-interface-catalogs.ts
    │   │   ├── family-interface-guards.ts
    │   │   ├── family-interface-registry.ts
    │   │   ├── family-interface-runtime.ts
    │   │   ├── family-interface-types.ts
    │   │   ├── family-interfaces.ts
    │   │   ├── family-pipeline.ts
    │   │   ├── game-interface.ts
    │   │   ├── grid-ctf.ts
    │   │   ├── index.ts
    │   │   ├── intent-validator.ts
    │   │   ├── interactive-scenario-materialization.ts
    │   │   ├── investigation-creator.ts
    │   │   ├── investigation-designer.ts
    │   │   ├── investigation-spec.ts
    │   │   ├── llm-json-response.ts
    │   │   ├── materialize-agent-task-planning.ts
    │   │   ├── materialize-agent-task-results.ts
    │   │   ├── materialize-artifact-persistence.ts
    │   │   ├── materialize-base-persisted-spec.ts
    │   │   ├── materialize-codegen-execution.ts
    │   │   ├── materialize-codegen-planning.ts
    │   │   ├── materialize-contracts.ts
    │   │   ├── materialize-dependencies.ts
    │   │   ├── materialize-execution-workflow.ts
    │   │   ├── materialize-family-planning-contracts.ts
    │   │   ├── materialize-family-planning-helper-contracts.ts
    │   │   ├── materialize-family-planning-helpers.ts
    │   │   ├── materialize-family-planning.ts
    │   │   ├── materialize-request-planning-input.ts
    │   │   ├── materialize-request-planning.ts
    │   │   ├── materialize-result-support.ts
    │   │   ├── materialize-scenario-coordinator.ts
    │   │   ├── materialize-scenario-default-wiring.ts
    │   │   ├── materialize-scenario-execution-delegation-composition-coordinator.ts
    │   │   ├── materialize-scenario-execution-delegation-finalization-assembly-coordinator.ts
    │   │   ├── materialize-scenario-execution-delegation-finalization-composition-coordinator.ts
    │   │   ├── materialize-scenario-execution-delegation-finalization-coordinator.ts
    │   │   ├── materialize-scenario-execution-delegation-finalization-result-assembly-coordinator.ts
    │   │   ├── materialize-scenario-execution-delegation-finalization-result-composition-coordinator.ts
    │   │   ├── materialize-scenario-execution-delegation-finalization-result-input-result-coordinator.ts
    │   │   ├── materialize-scenario-execution-delegation-input-coordinator.ts
    │   │   ├── materialize-scenario-execution-delegation-orchestration-coordinator.ts
    │   │   ├── materialize-scenario-execution-delegation-request-resolution.ts
    │   │   ├── materialize-scenario-execution-delegation-result.ts
    │   │   ├── materialize-scenario-execution-request.ts
    │   │   ├── materialize-scenario-request-assembly.ts
    │   │   ├── materialize-scenario-request-handoff-delegation.ts
    │   │   ├── materialize-workflow-planning-outcome.ts
    │   │   ├── materialize-workflow-request-composition.ts
    │   │   ├── materialize-workflow-request-coordinator.ts
    │   │   ├── materialize-workflow-request-finalization.ts
    │   │   ├── materialize-workflow-request-planning.ts
    │   │   ├── materialize-workflow-request-result.ts
    │   │   ├── materialize.ts
    │   │   ├── negotiation-creator.ts
    │   │   ├── negotiation-designer.ts
    │   │   ├── negotiation-spec.ts
    │   │   ├── operator-loop-creator.ts
    │   │   ├── operator-loop-designer.ts
    │   │   ├── operator-loop-spec.ts
    │   │   ├── othello.ts
    │   │   ├── persisted-parametric-scenario.ts
    │   │   ├── primary-family-contracts.ts
    │   │   ├── primary-family-interface-types.ts
    │   │   ├── primary-family-registry.ts
    │   │   ├── registry.ts
    │   │   ├── resource-trader.ts
    │   │   ├── revision-spec-normalizer.ts
    │   │   ├── scenario-creator.ts
    │   │   ├── scenario-family-fallback.ts
    │   │   ├── scenario-revision-contracts.ts
    │   │   ├── scenario-revision-execution.ts
    │   │   ├── scenario-revision-prompt-workflow.ts
    │   │   ├── scenario-revision-request-workflow.ts
    │   │   ├── scenario-revision.ts
    │   │   ├── schema-evolution-creator.ts
    │   │   ├── schema-evolution-designer.ts
    │   │   ├── schema-evolution-spec.ts
    │   │   ├── simulation-creator.ts
    │   │   ├── simulation-designer.ts
    │   │   ├── simulation-family-contracts.ts
    │   │   ├── simulation-family-guard-builders.ts
    │   │   ├── simulation-family-interface-types.ts
    │   │   ├── simulation-family-method-catalogs.ts
    │   │   ├── simulation-family-registry.ts
    │   │   ├── simulation-spec.ts
    │   │   ├── spec-auto-heal-agent-task.ts
    │   │   ├── spec-auto-heal-core.ts
    │   │   ├── spec-auto-heal-preconditions.ts
    │   │   ├── spec-auto-heal-readers.ts
    │   │   ├── spec-auto-heal.ts
    │   │   ├── templates/
    │   │   │   ├── content-generation.json
    │   │   │   ├── index.ts
    │   │   │   ├── prompt-optimization.json
    │   │   │   └── rag-accuracy.json
    │   │   ├── tool-fragility-creator.ts
    │   │   ├── tool-fragility-designer.ts
    │   │   ├── tool-fragility-spec.ts
    │   │   ├── word-count.ts
    │   │   ├── workflow-creator.ts
    │   │   ├── workflow-designer.ts
    │   │   └── workflow-spec.ts
    │   ├── server/
    │   │   ├── active-run-lifecycle.ts
    │   │   ├── auth-command-workflow.ts
    │   │   ├── campaign-api.ts
    │   │   ├── campaign-route-workflow.ts
    │   │   ├── chat-agent-command-workflow.ts
    │   │   ├── chat-agent-workflow.ts
    │   │   ├── client-error-workflow.ts
    │   │   ├── cockpit-api.ts
    │   │   ├── cockpit-changelog.ts
    │   │   ├── cockpit-consultation.ts
    │   │   ├── cockpit-writeup.ts
    │   │   ├── event-stream-envelope.ts
    │   │   ├── http-api-parity.ts
    │   │   ├── hub-api.ts
    │   │   ├── index.ts
    │   │   ├── interactive-control-command-workflow.ts
    │   │   ├── interactive-scenario-command-workflow.ts
    │   │   ├── interactive-scenario-session.ts
    │   │   ├── knowledge-api.ts
    │   │   ├── mission-action-workflow.ts
    │   │   ├── mission-api.ts
    │   │   ├── mission-progress-workflow.ts
    │   │   ├── mission-read-workflow.ts
    │   │   ├── monitor-api.ts
    │   │   ├── monitor-engine.ts
    │   │   ├── notebook-api.ts
    │   │   ├── openclaw-api.ts
    │   │   ├── protocol.ts
    │   │   ├── run-custom-scenario-registry.ts
    │   │   ├── run-environment-catalog.ts
    │   │   ├── run-manager-provider-session.ts
    │   │   ├── run-manager.ts
    │   │   ├── run-simulation-read-workflow.ts
    │   │   ├── run-start-workflow.ts
    │   │   ├── run-state-workflow.ts
    │   │   ├── runtime-session-api.ts
    │   │   ├── runtime-session-event-stream.ts
    │   │   ├── simulation-api.ts
    │   │   ├── simulation-dashboard.ts
    │   │   ├── tui-auth.ts
    │   │   ├── websocket-session-bootstrap.ts
    │   │   └── ws-server.ts
    │   ├── session/
    │   │   ├── action-labels.ts
    │   │   ├── context-pressure.ts
    │   │   ├── coordinator.ts
    │   │   ├── living-docs.ts
    │   │   ├── memory-consolidation.ts
    │   │   ├── progress-digest.ts
    │   │   ├── remote-bridge.ts
    │   │   ├── runtime-child-tasks.ts
    │   │   ├── runtime-context.ts
    │   │   ├── runtime-events.ts
    │   │   ├── runtime-grant-events.ts
    │   │   ├── runtime-json.ts
    │   │   ├── runtime-session-ids.ts
    │   │   ├── runtime-session-notifications.ts
    │   │   ├── runtime-session-read-model.ts
    │   │   ├── runtime-session-timeline.ts
    │   │   ├── runtime-session.ts
    │   │   ├── skill-registry.ts
    │   │   ├── store.ts
    │   │   ├── supervisor.ts
    │   │   └── types.ts
    │   ├── simulation/
    │   │   ├── artifact-store.ts
    │   │   ├── engine.ts
    │   │   ├── export.ts
    │   │   ├── family-executor.ts
    │   │   ├── request-planner.ts
    │   │   ├── score-normalization.ts
    │   │   ├── summary.ts
    │   │   ├── sweep-dsl.ts
    │   │   ├── types.ts
    │   │   └── variant-materializer.ts
    │   ├── storage/
    │   │   ├── consultation-store.ts
    │   │   ├── generation-match-output-workflow.ts
    │   │   ├── generation-record-contracts.ts
    │   │   ├── generation-record-store.ts
    │   │   ├── generation-run-query-workflow.ts
    │   │   ├── generation-trajectory-workflow.ts
    │   │   ├── generation-upsert-workflow.ts
    │   │   ├── hub-store.ts
    │   │   ├── human-feedback-store.ts
    │   │   ├── index.ts
    │   │   ├── monitor-store.ts
    │   │   ├── notebook-store.ts
    │   │   ├── schema-parity-manifest.ts
    │   │   ├── score-trajectory-store.ts
    │   │   ├── sqlite-store.ts
    │   │   ├── storage-consultation-facade.ts
    │   │   ├── storage-contracts.ts
    │   │   ├── storage-generation-run-facade.ts
    │   │   ├── storage-hub-facade.ts
    │   │   ├── storage-human-feedback-facade.ts
    │   │   ├── storage-migration-workflow.ts
    │   │   ├── storage-monitor-facade.ts
    │   │   ├── storage-notebook-facade.ts
    │   │   ├── storage-task-queue-facade.ts
    │   │   └── task-queue-store.ts
    │   ├── traces/
    │   │   ├── data-plane-curation-workflow.ts
    │   │   ├── data-plane-io-workflow.ts
    │   │   ├── data-plane-types.ts
    │   │   ├── data-plane.ts
    │   │   ├── dataset-adapter-provenance.ts
    │   │   ├── dataset-adapter-routing-workflow.ts
    │   │   ├── dataset-adapter-workflow.ts
    │   │   ├── dataset-csv-adapter-workflow.ts
    │   │   ├── dataset-directory-scan-workflow.ts
    │   │   ├── dataset-discovery-constants.ts
    │   │   ├── dataset-discovery-types.ts
    │   │   ├── dataset-discovery-workflow.ts
    │   │   ├── dataset-discovery.ts
    │   │   ├── dataset-json-adapter-workflow.ts
    │   │   ├── dataset-manifest-workflow.ts
    │   │   ├── dataset-markdown-adapter-workflow.ts
    │   │   ├── dataset-path-resolution-workflow.ts
    │   │   ├── distillation-curation-workflow.ts
    │   │   ├── distillation-io-workflow.ts
    │   │   ├── distillation-pipeline.ts
    │   │   ├── distillation-types.ts
    │   │   ├── export-package-workflow.ts
    │   │   ├── export-redaction-workflow.ts
    │   │   ├── export-run-artifact-workflow.ts
    │   │   ├── export-workflow-types.ts
    │   │   ├── export-workflow.ts
    │   │   ├── otel-bridge.ts
    │   │   ├── public-schema-contracts.ts
    │   │   ├── public-schema-factories.ts
    │   │   ├── public-schema.ts
    │   │   ├── public-trace-export-workflow.ts
    │   │   ├── publishers-types.ts
    │   │   ├── publishers.ts
    │   │   ├── publishing-workflow.ts
    │   │   ├── redaction-application-workflow.ts
    │   │   ├── redaction-detection-workflow.ts
    │   │   ├── redaction-patterns.ts
    │   │   ├── redaction-policy-workflow.ts
    │   │   ├── redaction-types.ts
    │   │   ├── redaction.ts
    │   │   └── trace-ingest-workflow.ts
    │   ├── training/
    │   │   ├── backends.ts
    │   │   ├── export-context-workflow.ts
    │   │   ├── export-records-workflow.ts
    │   │   ├── export-types.ts
    │   │   ├── export.ts
    │   │   ├── model-strategy-recommendations.ts
    │   │   ├── model-strategy-selection-workflow.ts
    │   │   ├── model-strategy-types.ts
    │   │   ├── model-strategy.ts
    │   │   ├── promotion-engine-workflow.ts
    │   │   ├── promotion-registry-workflow.ts
    │   │   ├── promotion-types.ts
    │   │   ├── promotion.ts
    │   │   ├── prompt-alignment-helpers.ts
    │   │   ├── prompt-alignment-types.ts
    │   │   ├── prompt-alignment-validation.ts
    │   │   ├── prompt-alignment.ts
    │   │   ├── prompt-contract-workflow.ts
    │   │   ├── runtime-prompt-adapter-workflow.ts
    │   │   ├── training-backend-core.ts
    │   │   ├── training-checkpoint-workflow.ts
    │   │   ├── training-config-workflow.ts
    │   │   ├── training-metric-utils.ts
    │   │   ├── training-promotion-workflow.ts
    │   │   ├── training-prompt-adapter-workflow.ts
    │   │   ├── training-result-workflow.ts
    │   │   ├── training-run-execution-workflow.ts
    │   │   ├── training-runner-workflow.ts
    │   │   └── training-types.ts
    │   ├── tui/
    │   │   ├── activity-command.ts
    │   │   ├── activity-settings-store.ts
    │   │   ├── activity-summary.ts
    │   │   ├── app.tsx
    │   │   ├── auth-command.ts
    │   │   ├── chat-command.ts
    │   │   ├── command-workflow.ts
    │   │   ├── commands.ts
    │   │   ├── meta-command.ts
    │   │   ├── operator-command.ts
    │   │   ├── protocol.generated.ts
    │   │   ├── run-command.ts
    │   │   ├── solve-command.ts
    │   │   └── startup-log.ts
    │   ├── types/
    │   │   └── index.ts
    │   └── util.ts
    ├── tests/
    │   ├── _fixtures/
    │   │   ├── cross-runtime-emit/
    │   │   │   ├── minimal/
    │   │   │   │   ├── inputs.json
    │   │   │   │   └── python-canonical.json
    │   │   │   ├── with-feedback-refs/
    │   │   │   │   ├── inputs.json
    │   │   │   │   └── python-canonical.json
    │   │   │   ├── with-metadata-nested/
    │   │   │   │   ├── inputs.json
    │   │   │   │   └── python-canonical.json
    │   │   │   ├── with-outcome/
    │   │   │   │   ├── inputs.json
    │   │   │   │   └── python-canonical.json
    │   │   │   ├── with-routing/
    │   │   │   │   ├── inputs.json
    │   │   │   │   └── python-canonical.json
    │   │   │   ├── with-session-hashes/
    │   │   │   │   ├── inputs.json
    │   │   │   │   └── python-canonical.json
    │   │   │   └── with-tool-calls/
    │   │   │       ├── inputs.json
    │   │   │       └── python-canonical.json
    │   │   └── plugins/
    │   │       ├── index.ts
    │   │       ├── mock-anthropic-ts.ts
    │   │       ├── mock-conflicting.ts
    │   │       ├── mock-insert-statement.ts
    │   │       └── mock-openai-python.ts
    │   ├── _helpers/
    │   │   ├── build_trace_canonical.py
    │   │   ├── hash_user_id.py
    │   │   └── python-runner.ts
    │   ├── ac628-classifier.test.ts
    │   ├── action-filter-workflows.test.ts
    │   ├── action-filter.test.ts
    │   ├── action-labels.test.ts
    │   ├── active-run-lifecycle.test.ts
    │   ├── adaptive-mission.test.ts
    │   ├── advanced-features.test.ts
    │   ├── agent-command-workflow.test.ts
    │   ├── agent-e2e.test.ts
    │   ├── agent-orchestration.test.ts
    │   ├── agent-runtime.test.ts
    │   ├── agent-task-codegen-template.test.ts
    │   ├── agent-task-name-workflow.test.ts
    │   ├── agent-task-package-tools.test.ts
    │   ├── agent-task-persistence-workflow.test.ts
    │   ├── agent-task-pipeline.test.ts
    │   ├── agent-task-solve-execution.test.ts
    │   ├── agentos-adapter.test.ts
    │   ├── analytics.test.ts
    │   ├── analyze.test.ts
    │   ├── app-settings-contract.test.ts
    │   ├── artifact-editing-codegen-template.test.ts
    │   ├── artifact-store-compaction-ledger.test.ts
    │   ├── artifact-store-hooks.test.ts
    │   ├── auth-command-workflow.test.ts
    │   ├── auth-provider-command-workflow.test.ts
    │   ├── auto-discover-custom.test.ts
    │   ├── benchmark-command-workflow.test.ts
    │   ├── benchmark-provider.test.ts
    │   ├── blob-cli.test.ts
    │   ├── blob-command-workflow.test.ts
    │   ├── blobstore.test.ts
    │   ├── bootstrap-snapshot.test.ts
    │   ├── browser-settings.test.ts
    │   ├── built-in-game-solve-execution.test.ts
    │   ├── builtin-scenarios.test.ts
    │   ├── campaign-cli.test.ts
    │   ├── campaign-command-execution.test.ts
    │   ├── campaign-command-workflow.test.ts
    │   ├── campaign-lifecycle-workflow.test.ts
    │   ├── campaign-manager-access-workflow.test.ts
    │   ├── campaign-manager-workflow.test.ts
    │   ├── campaign-route-workflow.test.ts
    │   ├── campaign-store-query-workflow.test.ts
    │   ├── campaign-store.test.ts
    │   ├── campaign-surfaces.test.ts
    │   ├── campaign.test.ts
    │   ├── capabilities-command-workflow.test.ts
    │   ├── capabilities-provider-parity.test.ts
    │   ├── chat-agent-command-workflow.test.ts
    │   ├── chat-agent-workflow.test.ts
    │   ├── cli-command-registry.test.ts
    │   ├── cli-contract.test.ts
    │   ├── cli-dx.test.ts
    │   ├── cli-emit-engine-result.test.ts
    │   ├── cli-help.test.ts
    │   ├── cli-parity.test.ts
    │   ├── cli.test.ts
    │   ├── client-error-workflow.test.ts
    │   ├── code-mission.test.ts
    │   ├── codegen-runtime.test.ts
    │   ├── codegen-solve-execution.test.ts
    │   ├── codegen.test.ts
    │   ├── concept-model-durable-session-events.test.ts
    │   ├── concept-model-parity.test.ts
    │   ├── config-presets-workflow.test.ts
    │   ├── config.test.ts
    │   ├── context-pressure.test.ts
    │   ├── context-selection-command-workflow.test.ts
    │   ├── context-selection-report.test.ts
    │   ├── context-selection-store.test.ts
    │   ├── control-plane/
    │   │   ├── actuators/
    │   │   │   ├── _shared/
    │   │   │   │   ├── content-revert-rollback.test.ts
    │   │   │   │   ├── single-file-applicator.test.ts
    │   │   │   │   └── unified-diff-emitter.test.ts
    │   │   │   ├── fine-tuned-model/
    │   │   │   │   ├── fine-tuned-model.test.ts
    │   │   │   │   └── legacy-adapter.test.ts
    │   │   │   ├── model-routing/
    │   │   │   │   ├── applicator.test.ts
    │   │   │   │   └── registration.test.ts
    │   │   │   ├── prompt-patch/
    │   │   │   │   └── prompt-patch.test.ts
    │   │   │   ├── registry.test.ts
    │   │   │   ├── routing-rule/
    │   │   │   │   └── routing-rule.test.ts
    │   │   │   └── tool-policy/
    │   │   │       └── tool-policy.test.ts
    │   │   ├── cli/
    │   │   │   ├── candidate.test.ts
    │   │   │   ├── eval.test.ts
    │   │   │   ├── exit-codes.test.ts
    │   │   │   ├── harness.test.ts
    │   │   │   ├── output-formatters.test.ts
    │   │   │   ├── promotion.test.ts
    │   │   │   ├── registry-ops.test.ts
    │   │   │   └── subprocess-smoke.test.ts
    │   │   ├── contract/
    │   │   │   ├── ablation-verification.test.ts
    │   │   │   ├── branded-ids.test.ts
    │   │   │   ├── canonical-json.test.ts
    │   │   │   ├── eval-run-provenance.test.ts
    │   │   │   ├── factories.test.ts
    │   │   │   ├── harness-change-proposal.test.ts
    │   │   │   ├── invariants.test.ts
    │   │   │   ├── run-track.test.ts
    │   │   │   ├── schema-version.test.ts
    │   │   │   ├── strategy-identity.test.ts
    │   │   │   ├── strategy-quarantine.test.ts
    │   │   │   └── validators.test.ts
    │   │   ├── contract-probes/
    │   │   │   └── contract-probes.test.ts
    │   │   ├── emit/
    │   │   │   ├── branch-namer.test.ts
    │   │   │   ├── golden/
    │   │   │   │   └── pr-bodies/
    │   │   │   │       ├── hard-fail.md
    │   │   │   │       ├── marginal.md
    │   │   │   │       ├── moderate.md
    │   │   │   │       ├── no-incumbent.md
    │   │   │   │       ├── rollback.md
    │   │   │   │       └── strong.md
    │   │   │   ├── modes/
    │   │   │   │   ├── auto.test.ts
    │   │   │   │   ├── gh.test.ts
    │   │   │   │   ├── git.test.ts
    │   │   │   │   └── patch-only.test.ts
    │   │   │   ├── patch-renderer.test.ts
    │   │   │   ├── pipeline.test.ts
    │   │   │   ├── pr-body-renderer.test.ts
    │   │   │   ├── preflight.test.ts
    │   │   │   └── workspace-layout.test.ts
    │   │   ├── eval-ingest/
    │   │   │   ├── attach.test.ts
    │   │   │   ├── errors.test.ts
    │   │   │   └── validator.test.ts
    │   │   ├── eval-ledger/
    │   │   │   └── reconcile.test.ts
    │   │   ├── external-evals/
    │   │   │   ├── boundary-policy.test.ts
    │   │   │   ├── diagnostics.test.ts
    │   │   │   └── lifecycle.test.ts
    │   │   ├── instrument/
    │   │   │   ├── _fixtures/
    │   │   │   │   └── scanner/
    │   │   │   │       ├── directives/
    │   │   │   │       │   ├── python_directive_in_string.py
    │   │   │   │       │   ├── python_off.py
    │   │   │   │       │   ├── python_off_file.py
    │   │   │   │       │   └── ts_off.ts
    │   │   │   │       ├── simple-repo/
    │   │   │   │       │   └── src/
    │   │   │   │       │       ├── app.py
    │   │   │   │       │       └── client.ts
    │   │   │   │       └── tabs-and-spaces/
    │   │   │   │           ├── four_spaces.py
    │   │   │   │           ├── tabs.py
    │   │   │   │           └── two_space.ts
    │   │   │   ├── cli/
    │   │   │   │   ├── config-loader.test.ts
    │   │   │   │   ├── exit-codes.test.ts
    │   │   │   │   ├── flags.test.ts
    │   │   │   │   ├── integration.test.ts
    │   │   │   │   ├── mcp-exposure.test.ts
    │   │   │   │   └── runner.test.ts
    │   │   │   ├── contract/
    │   │   │   │   ├── edit-descriptor.test.ts
    │   │   │   │   ├── plugin-produce-shape.test.ts
    │   │   │   │   └── source-range.test.ts
    │   │   │   ├── detectors/
    │   │   │   │   ├── anthropic-python/
    │   │   │   │   │   ├── gate-1-canonical.test.ts
    │   │   │   │   │   ├── gate-2-idempotency.test.ts
    │   │   │   │   │   ├── gate-3-factory.test.ts
    │   │   │   │   │   ├── golden/
    │   │   │   │   │   │   ├── aliased-import/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── aliased-import-module-prefixed/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── already-wrapped-skipped/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── async-client/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── bedrock-refused/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── canonical-multi-construct/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── canonical-single/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── factory-function-refused/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── mixed-async-and-sync/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── module-prefixed/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   └── vertex-refused/
    │   │   │   │   │   │       ├── existing-imports.json
    │   │   │   │   │   │       ├── expected-advisories.json
    │   │   │   │   │   │       ├── expected-edits.json
    │   │   │   │   │   │       └── input.py
    │   │   │   │   │   ├── golden.test.ts
    │   │   │   │   │   └── property/
    │   │   │   │   │       └── anthropic-python-detection.property.test.ts
    │   │   │   │   ├── anthropic-ts/
    │   │   │   │   │   ├── gate-1-canonical.test.ts
    │   │   │   │   │   ├── gate-2-idempotency.test.ts
    │   │   │   │   │   ├── gate-3-factory-function.test.ts
    │   │   │   │   │   ├── golden/
    │   │   │   │   │   │   ├── aliased-import/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.ts
    │   │   │   │   │   │   ├── aliased-import-module-prefixed/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.ts
    │   │   │   │   │   │   ├── already-wrapped-skipped/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.ts
    │   │   │   │   │   │   ├── async-client/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.ts
    │   │   │   │   │   │   ├── bedrock-refused/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.ts
    │   │   │   │   │   │   ├── canonical-multi-construct/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.ts
    │   │   │   │   │   │   ├── canonical-single/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.ts
    │   │   │   │   │   │   ├── factory-function-refused/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.ts
    │   │   │   │   │   │   ├── mixed-async-and-sync/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.ts
    │   │   │   │   │   │   ├── module-prefixed/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.ts
    │   │   │   │   │   │   └── vertex-refused/
    │   │   │   │   │   │       ├── existing-imports.json
    │   │   │   │   │   │       ├── expected-advisories.json
    │   │   │   │   │   │       ├── expected-edits.json
    │   │   │   │   │   │       └── input.ts
    │   │   │   │   │   ├── golden.test.ts
    │   │   │   │   │   └── property/
    │   │   │   │   │       └── anthropic-ts-detection.property.test.ts
    │   │   │   │   ├── openai-python/
    │   │   │   │   │   ├── gate-1-canonical.test.ts
    │   │   │   │   │   ├── gate-2-idempotency.test.ts
    │   │   │   │   │   ├── gate-3-factory.test.ts
    │   │   │   │   │   ├── golden/
    │   │   │   │   │   │   ├── aliased-import/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── aliased-import-module-prefixed/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── already-wrapped-skipped/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── async-client/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── azure-refused/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── canonical-multi-construct/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── canonical-single/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── factory-function-refused/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── mixed-async-and-sync/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   └── module-prefixed/
    │   │   │   │   │   │       ├── existing-imports.json
    │   │   │   │   │   │       ├── expected-advisories.json
    │   │   │   │   │   │       ├── expected-edits.json
    │   │   │   │   │   │       └── input.py
    │   │   │   │   │   ├── golden.test.ts
    │   │   │   │   │   └── property/
    │   │   │   │   │       └── openai-python-detection.property.test.ts
    │   │   │   │   └── openai-ts/
    │   │   │   │       ├── gate-1-canonical.test.ts
    │   │   │   │       ├── gate-2-idempotency.test.ts
    │   │   │   │       ├── gate-3-factory-function.test.ts
    │   │   │   │       ├── golden/
    │   │   │   │       │   ├── aliased-import/
    │   │   │   │       │   │   ├── existing-imports.json
    │   │   │   │       │   │   ├── expected-advisories.json
    │   │   │   │       │   │   ├── expected-edits.json
    │   │   │   │       │   │   └── input.ts
    │   │   │   │       │   ├── aliased-import-module-prefixed/
    │   │   │   │       │   │   ├── existing-imports.json
    │   │   │   │       │   │   ├── expected-advisories.json
    │   │   │   │       │   │   ├── expected-edits.json
    │   │   │   │       │   │   └── input.ts
    │   │   │   │       │   ├── already-wrapped-skipped/
    │   │   │   │       │   │   ├── existing-imports.json
    │   │   │   │       │   │   ├── expected-advisories.json
    │   │   │   │       │   │   ├── expected-edits.json
    │   │   │   │       │   │   └── input.ts
    │   │   │   │       │   ├── async-client/
    │   │   │   │       │   │   ├── existing-imports.json
    │   │   │   │       │   │   ├── expected-advisories.json
    │   │   │   │       │   │   ├── expected-edits.json
    │   │   │   │       │   │   └── input.ts
    │   │   │   │       │   ├── azure-refused/
    │   │   │   │       │   │   ├── existing-imports.json
    │   │   │   │       │   │   ├── expected-advisories.json
    │   │   │   │       │   │   ├── expected-edits.json
    │   │   │   │       │   │   └── input.ts
    │   │   │   │       │   ├── canonical-multi-construct/
    │   │   │   │       │   │   ├── existing-imports.json
    │   │   │   │       │   │   ├── expected-advisories.json
    │   │   │   │       │   │   ├── expected-edits.json
    │   │   │   │       │   │   └── input.ts
    │   │   │   │       │   ├── canonical-single/
    │   │   │   │       │   │   ├── existing-imports.json
    │   │   │   │       │   │   ├── expected-advisories.json
    │   │   │   │       │   │   ├── expected-edits.json
    │   │   │   │       │   │   └── input.ts
    │   │   │   │       │   ├── factory-function-refused/
    │   │   │   │       │   │   ├── existing-imports.json
    │   │   │   │       │   │   ├── expected-advisories.json
    │   │   │   │       │   │   ├── expected-edits.json
    │   │   │   │       │   │   └── input.ts
    │   │   │   │       │   ├── mixed-async-and-sync/
    │   │   │   │       │   │   ├── existing-imports.json
    │   │   │   │       │   │   ├── expected-advisories.json
    │   │   │   │       │   │   ├── expected-edits.json
    │   │   │   │       │   │   └── input.ts
    │   │   │   │       │   └── module-prefixed/
    │   │   │   │       │       ├── existing-imports.json
    │   │   │   │       │       ├── expected-advisories.json
    │   │   │   │       │       ├── expected-edits.json
    │   │   │   │       │       └── input.ts
    │   │   │   │       ├── golden.test.ts
    │   │   │   │       └── property/
    │   │   │   │           └── openai-ts-detection.property.test.ts
    │   │   │   ├── golden/
    │   │   │   │   ├── goldens.test.ts
    │   │   │   │   └── pr-bodies/
    │   │   │   │       ├── empty-repo.md
    │   │   │   │       ├── multi-plugin.md
    │   │   │   │       ├── one-plugin-one-file.md
    │   │   │   │       └── safety-skip.md
    │   │   │   ├── llm/
    │   │   │   │   ├── enhancer.test.ts
    │   │   │   │   ├── pr-body-renderer-llm.test.ts
    │   │   │   │   ├── prompts.test.ts
    │   │   │   │   └── tty-detector.test.ts
    │   │   │   ├── pipeline/
    │   │   │   │   ├── modes/
    │   │   │   │   │   ├── apply.test.ts
    │   │   │   │   │   ├── branch.test.ts
    │   │   │   │   │   └── dry-run.test.ts
    │   │   │   │   ├── orchestrator-real-detector.test.ts
    │   │   │   │   ├── orchestrator.property.test.ts
    │   │   │   │   ├── orchestrator.test.ts
    │   │   │   │   └── preflight.test.ts
    │   │   │   ├── planner/
    │   │   │   │   ├── _fixtures/
    │   │   │   │   │   ├── javascript/
    │   │   │   │   │   │   ├── commonjs.cjs
    │   │   │   │   │   │   ├── esm.mjs
    │   │   │   │   │   │   └── simple.js
    │   │   │   │   │   ├── python/
    │   │   │   │   │   │   ├── no-imports.py
    │   │   │   │   │   │   ├── simple.py
    │   │   │   │   │   │   ├── tabs.py
    │   │   │   │   │   │   ├── with-directive.py
    │   │   │   │   │   │   ├── with-future-imports.py
    │   │   │   │   │   │   └── with-secret.py
    │   │   │   │   │   └── typescript/
    │   │   │   │   │       ├── default-import.ts
    │   │   │   │   │       ├── mixed-quotes.ts
    │   │   │   │   │       ├── no-imports.ts
    │   │   │   │   │       ├── simple.ts
    │   │   │   │   │       ├── single-quotes.ts
    │   │   │   │   │       ├── with-directive.ts
    │   │   │   │   │       └── with-secret.ts
    │   │   │   │   ├── conflict-detector.property.test.ts
    │   │   │   │   ├── conflict-detector.test.ts
    │   │   │   │   ├── edit-composer.fixtures.test.ts
    │   │   │   │   ├── edit-composer.property.test.ts
    │   │   │   │   ├── edit-composer.test.ts
    │   │   │   │   ├── import-manager.property.test.ts
    │   │   │   │   ├── import-manager.test.ts
    │   │   │   │   ├── indentation-matcher.property.test.ts
    │   │   │   │   └── indentation-matcher.test.ts
    │   │   │   ├── registry/
    │   │   │   │   └── plugin-registry.test.ts
    │   │   │   ├── safety/
    │   │   │   │   ├── directive-parser.test.ts
    │   │   │   │   ├── hardcoded-defaults.test.ts
    │   │   │   │   ├── secret-detector-integration.test.ts
    │   │   │   │   └── secret-detector.test.ts
    │   │   │   └── scanner/
    │   │   │       ├── file-type-filter.test.ts
    │   │   │       ├── parse-existing-imports-alias.test.ts
    │   │   │       ├── source-file.test.ts
    │   │   │       ├── tree-sitter-loader.test.ts
    │   │   │       └── walker.test.ts
    │   │   ├── integration/
    │   │   │   ├── _helpers/
    │   │   │   │   ├── fixtures.ts
    │   │   │   │   └── gh-shim.ts
    │   │   │   ├── flow-1-patch-only.test.ts
    │   │   │   ├── flow-2-git-mode.test.ts
    │   │   │   ├── flow-3-gh-mode.test.ts
    │   │   │   ├── flow-4-rollback.test.ts
    │   │   │   ├── flow-5-cascade-refusal.test.ts
    │   │   │   ├── flow-6-repair.test.ts
    │   │   │   └── flow-7-legacy-adapter.test.ts
    │   │   ├── memory-packs/
    │   │   │   └── memory-pack.test.ts
    │   │   ├── production-traces/
    │   │   │   ├── cli/
    │   │   │   │   ├── _helpers/
    │   │   │   │   │   └── fixtures.ts
    │   │   │   │   ├── build-dataset-integration.test.ts
    │   │   │   │   ├── build-dataset.test.ts
    │   │   │   │   ├── datasets.test.ts
    │   │   │   │   ├── exit-codes.test.ts
    │   │   │   │   ├── export.test.ts
    │   │   │   │   ├── ingest.test.ts
    │   │   │   │   ├── init.test.ts
    │   │   │   │   ├── list-show-stats.test.ts
    │   │   │   │   ├── policy.test.ts
    │   │   │   │   ├── prune.test.ts
    │   │   │   │   ├── rotate-salt.test.ts
    │   │   │   │   └── runner.test.ts
    │   │   │   ├── contract/
    │   │   │   │   ├── branded-ids.test.ts
    │   │   │   │   ├── content-address.test.ts
    │   │   │   │   ├── cross-runtime.test.ts
    │   │   │   │   ├── factories.test.ts
    │   │   │   │   ├── generated-drift.test.ts
    │   │   │   │   ├── invariants.test.ts
    │   │   │   │   └── validators.test.ts
    │   │   │   ├── cross-runtime/
    │   │   │   │   └── python-emit-roundtrip.test.ts
    │   │   │   ├── dataset/
    │   │   │   │   ├── _helpers/
    │   │   │   │   │   └── fixtures.ts
    │   │   │   │   ├── cluster.test.ts
    │   │   │   │   ├── manifest.test.ts
    │   │   │   │   ├── pipeline-idempotence.test.ts
    │   │   │   │   ├── pipeline-redaction.test.ts
    │   │   │   │   ├── pipeline.test.ts
    │   │   │   │   ├── provenance.test.ts
    │   │   │   │   ├── rubric.test.ts
    │   │   │   │   ├── select.test.ts
    │   │   │   │   └── split-determinism.test.ts
    │   │   │   ├── fixtures/
    │   │   │   │   ├── invalid-bad-timing.json
    │   │   │   │   ├── invalid-missing-required.json
    │   │   │   │   ├── valid-anthropic.json
    │   │   │   │   ├── valid-minimal.json
    │   │   │   │   ├── valid-openai.json
    │   │   │   │   ├── valid-tool-calls.json
    │   │   │   │   ├── valid-with-feedback.json
    │   │   │   │   ├── valid-with-outcome.json
    │   │   │   │   └── valid-with-redaction-markers.json
    │   │   │   ├── golden/
    │   │   │   │   ├── datasets/
    │   │   │   │   │   ├── contrastive.manifest.json
    │   │   │   │   │   ├── multi-cluster.manifest.json
    │   │   │   │   │   ├── single-cluster.manifest.json
    │   │   │   │   │   └── synthetic-rubric.manifest.json
    │   │   │   │   └── manifests.test.ts
    │   │   │   ├── ingest/
    │   │   │   │   ├── dedupe.test.ts
    │   │   │   │   ├── lock.test.ts
    │   │   │   │   ├── paths.test.ts
    │   │   │   │   ├── receipt.test.ts
    │   │   │   │   ├── redaction-phase.test.ts
    │   │   │   │   ├── scan-workflow.test.ts
    │   │   │   │   └── validator.test.ts
    │   │   │   ├── integration/
    │   │   │   │   ├── _helpers/
    │   │   │   │   │   ├── fixtures.ts
    │   │   │   │   │   └── python-runner.ts
    │   │   │   │   ├── flow-1-python-emit-to-foundation-b.test.ts
    │   │   │   │   ├── flow-2-policy-mode-switching.test.ts
    │   │   │   │   ├── flow-3-default-on-export.test.ts
    │   │   │   │   ├── flow-4-retention-time-travel.test.ts
    │   │   │   │   ├── flow-5-dedupe-under-batch-retry.test.ts
    │   │   │   │   └── flow-6-cross-runtime-roundtrip.test.ts
    │   │   │   ├── redaction/
    │   │   │   │   ├── apply.test.ts
    │   │   │   │   ├── hash-primitives.test.ts
    │   │   │   │   ├── ingest-integration.test.ts
    │   │   │   │   ├── install-salt.test.ts
    │   │   │   │   ├── mark.test.ts
    │   │   │   │   └── policy.test.ts
    │   │   │   └── retention/
    │   │   │       ├── enforce.test.ts
    │   │   │       ├── gc-log.test.ts
    │   │   │       ├── ingest-phase2.test.ts
    │   │   │       ├── p6-monotonicity.test.ts
    │   │   │       └── policy.test.ts
    │   │   ├── promotion/
    │   │   │   ├── decide.test.ts
    │   │   │   ├── thresholds.test.ts
    │   │   │   └── transitions.test.ts
    │   │   ├── registry/
    │   │   │   ├── artifact-store-update.test.ts
    │   │   │   ├── artifact-store.test.ts
    │   │   │   ├── content-address.test.ts
    │   │   │   ├── eval-run-store.test.ts
    │   │   │   ├── history-store.test.ts
    │   │   │   ├── index-cache.test.ts
    │   │   │   ├── lock.test.ts
    │   │   │   ├── open-registry.test.ts
    │   │   │   ├── properties.test.ts
    │   │   │   ├── repair.test.ts
    │   │   │   ├── state-pointer.test.ts
    │   │   │   └── validate.test.ts
    │   │   └── runtime/
    │   │       ├── model-router-cohort.test.ts
    │   │       ├── model-router-determinism.test.ts
    │   │       ├── model-router.test.ts
    │   │       ├── task-budget.test.ts
    │   │       └── trace-integration.test.ts
    │   ├── control-plane-package.test.ts
    │   ├── coordination-codegen-template.test.ts
    │   ├── coordinator.test.ts
    │   ├── core-control-tools.test.ts
    │   ├── core-package.test.ts
    │   ├── credential-discovery-workflow.test.ts
    │   ├── credential-models-workflow.test.ts
    │   ├── credential-store-workflow.test.ts
    │   ├── credentials.test.ts
    │   ├── credit-assignment-attribution-workflow.test.ts
    │   ├── credit-assignment-contribution-workflow.test.ts
    │   ├── credit-assignment-magnitude-workflow.test.ts
    │   ├── credit-assignment-reporting-workflow.test.ts
    │   ├── credit-assignment-serialization-workflow.test.ts
    │   ├── credit-assignment-vector-workflow.test.ts
    │   ├── cross-runtime-trace-finding-report.test.ts
    │   ├── custom-scenarios.test.ts
    │   ├── dashboard-404.test.ts
    │   ├── data-plane-curation-workflow.test.ts
    │   ├── data-plane-io-workflow.test.ts
    │   ├── data-plane.test.ts
    │   ├── dataset-adapter-workflow.test.ts
    │   ├── dataset-directory-scan-workflow.test.ts
    │   ├── dataset-discovery-workflow.test.ts
    │   ├── dataset-discovery.test.ts
    │   ├── dataset-json-adapter-workflow.test.ts
    │   ├── dataset-path-resolution-workflow.test.ts
    │   ├── dataset-text-adapter-workflow.test.ts
    │   ├── delegated-judge.test.ts
    │   ├── designer-calibration.test.ts
    │   ├── dimension-pinning.test.ts
    │   ├── dimension-threshold.test.ts
    │   ├── distillation-curation-workflow.test.ts
    │   ├── distillation-io-workflow.test.ts
    │   ├── distillation-pipeline.test.ts
    │   ├── e2e/
    │   │   ├── openai-end-to-end-real-plugin.test.ts
    │   │   └── openai-end-to-end.test.ts
    │   ├── eaddrinuse.test.ts
    │   ├── elo-tournament.test.ts
    │   ├── event-stream-envelope.test.ts
    │   ├── event-stream.test.ts
    │   ├── evidence-workspace.test.ts
    │   ├── examples.test.ts
    │   ├── execution-validation.test.ts
    │   ├── execution-validator-workflows.test.ts
    │   ├── execution-validator.test.ts
    │   ├── export-command-workflow.test.ts
    │   ├── export-context-workflow.test.ts
    │   ├── export-package-workflow.test.ts
    │   ├── export-records-workflow.test.ts
    │   ├── export-run-artifact-workflow.test.ts
    │   ├── export-training-data-command-workflow.test.ts
    │   ├── extensions.test.ts
    │   ├── factual-confidence.test.ts
    │   ├── family-assertion-workflow.test.ts
    │   ├── family-classifier-input.test.ts
    │   ├── family-classifier-scoring-workflow.test.ts
    │   ├── family-contract-helpers-workflow.test.ts
    │   ├── family-designer.test.ts
    │   ├── family-interface-catalogs.test.ts
    │   ├── family-interface-guards.test.ts
    │   ├── family-interface-registry.test.ts
    │   ├── family-interface-runtime.test.ts
    │   ├── family-interface-types.test.ts
    │   ├── family-interfaces.test.ts
    │   ├── feedback-replay-tools.test.ts
    │   ├── final-parity.test.ts
    │   ├── fixtures/
    │   │   └── autoctx-agent-project/
    │   │       └── .autoctx/
    │   │           └── agents/
    │   │               └── support.ts
    │   ├── game-scenario.test.ts
    │   ├── generation-attempt-orchestrator.test.ts
    │   ├── generation-attempt-state.test.ts
    │   ├── generation-attempt-workflow.test.ts
    │   ├── generation-cycle-state.test.ts
    │   ├── generation-event-coordinator.test.ts
    │   ├── generation-execution-step.test.ts
    │   ├── generation-journal.test.ts
    │   ├── generation-lifecycle-workflow.test.ts
    │   ├── generation-loop-orchestrator.test.ts
    │   ├── generation-loop.test.ts
    │   ├── generation-phase-state.test.ts
    │   ├── generation-record-store-workflow.test.ts
    │   ├── generation-recovery.test.ts
    │   ├── generation-run-state.test.ts
    │   ├── generation-runner-hooks.test.ts
    │   ├── generation-runner-prompts.test.ts
    │   ├── generation-side-effect-coordinator.test.ts
    │   ├── generation-tournament-event-sequencing.test.ts
    │   ├── generation-trajectory-workflow.test.ts
    │   ├── gondolin-contract.test.ts
    │   ├── harness-loader.test.ts
    │   ├── harness-store.test.ts
    │   ├── http-api.test.ts
    │   ├── human-feedback-store-workflow.test.ts
    │   ├── human-feedback.test.ts
    │   ├── hypothesis-tree.test.ts
    │   ├── import-package-command-workflow.test.ts
    │   ├── improve-command-workflow.test.ts
    │   ├── improvement-loop-policy-workflow.test.ts
    │   ├── improvement-loop-result-workflow.test.ts
    │   ├── improvement-loop.test.ts
    │   ├── init-command-workflow.test.ts
    │   ├── integration/
    │   │   ├── cjs-fixture/
    │   │   │   ├── index.cjs
    │   │   │   └── package.json
    │   │   └── subpath-exports.test.ts
    │   ├── integration-improvement.test.ts
    │   ├── integrations/
    │   │   ├── _shared/
    │   │   │   ├── session.test.ts
    │   │   │   └── sink.test.ts
    │   │   ├── anthropic/
    │   │   │   ├── _helpers/
    │   │   │   │   └── fake-fetch.ts
    │   │   │   ├── content.test.ts
    │   │   │   ├── instrument-client-factory.test.ts
    │   │   │   ├── parity/
    │   │   │   │   ├── cross-runtime-fixtures.test.ts
    │   │   │   │   ├── cross-runtime-parity.property.test.ts
    │   │   │   │   └── fixtures/
    │   │   │   │       ├── api-timeout-exception/
    │   │   │   │       │   ├── error.json
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   └── request.json
    │   │   │   │       ├── messages-streaming-abandoned/
    │   │   │   │       │   ├── chunks.json
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   └── request.json
    │   │   │   │       ├── messages-streaming-with-usage/
    │   │   │   │       │   ├── chunks.json
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   └── request.json
    │   │   │   │       ├── messages-with-cache-hit/
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   ├── request.json
    │   │   │   │       │   └── response.json
    │   │   │   │       ├── messages-with-tool-use/
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   ├── request.json
    │   │   │   │       │   └── response.json
    │   │   │   │       ├── minimal-messages-success/
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   ├── request.json
    │   │   │   │       │   └── response.json
    │   │   │   │       ├── overloaded-exception/
    │   │   │   │       │   ├── error.json
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   └── request.json
    │   │   │   │       ├── rate-limit-exception/
    │   │   │   │       │   ├── error.json
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   └── request.json
    │   │   │   │       └── session-with-user-id-and-session-id/
    │   │   │   │           ├── expected-trace.canonical.json
    │   │   │   │           ├── identity.json
    │   │   │   │           ├── install-salt.txt
    │   │   │   │           ├── request.json
    │   │   │   │           └── response.json
    │   │   │   ├── proxy.test.ts
    │   │   │   ├── streaming.test.ts
    │   │   │   ├── taxonomy.test.ts
    │   │   │   └── trace-builder.test.ts
    │   │   ├── browser/
    │   │   │   ├── chrome-cdp-discovery.test.ts
    │   │   │   ├── chrome-cdp-runtime.test.ts
    │   │   │   ├── chrome-cdp-transport.test.ts
    │   │   │   ├── chrome-cdp.test.ts
    │   │   │   ├── context-capture.test.ts
    │   │   │   ├── contract/
    │   │   │   │   ├── cross-runtime.test.ts
    │   │   │   │   ├── generated-drift.test.ts
    │   │   │   │   └── validators.test.ts
    │   │   │   ├── evidence.test.ts
    │   │   │   ├── factory.test.ts
    │   │   │   ├── fixtures/
    │   │   │   │   ├── invalid-action-fill-null-field-kind.json
    │   │   │   │   ├── invalid-action-missing-session.json
    │   │   │   │   ├── invalid-action-snapshot-null-capture-html.json
    │   │   │   │   ├── invalid-audit-event-missing-reason.json
    │   │   │   │   ├── invalid-session-config-downloads-root.json
    │   │   │   │   ├── invalid-session-config-user-profile-auth.json
    │   │   │   │   ├── invalid-snapshot-bad-ref.json
    │   │   │   │   ├── invalid-snapshot-null-ref-name.json
    │   │   │   │   ├── valid-action-navigate.json
    │   │   │   │   ├── valid-audit-event-allowed.json
    │   │   │   │   ├── valid-session-config-ephemeral.json
    │   │   │   │   ├── valid-session-config-isolated-downloads.json
    │   │   │   │   └── valid-snapshot-minimal.json
    │   │   │   └── policy.test.ts
    │   │   ├── openai/
    │   │   │   ├── _helpers/
    │   │   │   │   └── fake-fetch.ts
    │   │   │   ├── end-to-end.test.ts
    │   │   │   ├── parity/
    │   │   │   │   ├── cross-runtime-fixtures.test.ts
    │   │   │   │   ├── cross-runtime-parity.property.test.ts
    │   │   │   │   └── fixtures/
    │   │   │   │       ├── chat-streaming-abandoned/
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   ├── request.json
    │   │   │   │       │   └── response.json
    │   │   │   │       ├── chat-streaming-with-usage/
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   ├── request.json
    │   │   │   │       │   └── response.json
    │   │   │   │       ├── chat-with-tool-calls/
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   ├── request.json
    │   │   │   │       │   └── response.json
    │   │   │   │       ├── content-filter-finish-reason/
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   ├── request.json
    │   │   │   │       │   └── response.json
    │   │   │   │       ├── minimal-chat-success/
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   ├── request.json
    │   │   │   │       │   └── response.json
    │   │   │   │       ├── rate-limit-exception/
    │   │   │   │       │   ├── error.json
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   └── request.json
    │   │   │   │       ├── responses-api-success/
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   ├── request.json
    │   │   │   │       │   └── response.json
    │   │   │   │       ├── session-with-user-id-and-session-id/
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   ├── install-salt.txt
    │   │   │   │       │   ├── request.json
    │   │   │   │       │   └── response.json
    │   │   │   │       └── timeout-exception/
    │   │   │   │           ├── error.json
    │   │   │   │           ├── expected-trace.canonical.json
    │   │   │   │           ├── identity.json
    │   │   │   │           └── request.json
    │   │   │   ├── property/
    │   │   │   │   └── trace-shape-invariants.property.test.ts
    │   │   │   ├── proxy.test.ts
    │   │   │   ├── responses.test.ts
    │   │   │   ├── runtime-detector-contract-python.test.ts
    │   │   │   ├── runtime-detector-contract-ts.test.ts
    │   │   │   ├── streaming.test.ts
    │   │   │   ├── taxonomy.test.ts
    │   │   │   └── trace-builder.test.ts
    │   │   └── shared/
    │   │       └── proxy-runtime.test.ts
    │   ├── interactive-control-command-workflow.test.ts
    │   ├── interactive-scenario-command-workflow.test.ts
    │   ├── interactive-scenario-materialization.test.ts
    │   ├── interactive-scenario-session.test.ts
    │   ├── internal-module-imports.test.ts
    │   ├── investigate-command-workflow.test.ts
    │   ├── investigate.test.ts
    │   ├── investigation-analysis-result-workflow.test.ts
    │   ├── investigation-analysis-workflow.test.ts
    │   ├── investigation-browser-context.test.ts
    │   ├── investigation-codegen-template.test.ts
    │   ├── investigation-engine-helpers.test.ts
    │   ├── investigation-execution-workflow.test.ts
    │   ├── investigation-generation-parsing.test.ts
    │   ├── investigation-generation-prompts.test.ts
    │   ├── investigation-generation-workflow.test.ts
    │   ├── investigation-result-workflow.test.ts
    │   ├── investigation-run-support-workflow.test.ts
    │   ├── investigation-run-workflow.test.ts
    │   ├── investigation-scenario-preparation-workflow.test.ts
    │   ├── judge-command-workflow.test.ts
    │   ├── judge-executor.test.ts
    │   ├── judge-hooks.test.ts
    │   ├── judge.test.ts
    │   ├── knowledge-api-workflow.test.ts
    │   ├── knowledge-readback-tools.test.ts
    │   ├── knowledge-system.test.ts
    │   ├── list-command-workflow.test.ts
    │   ├── living-docs.test.ts
    │   ├── loop-controller.test.ts
    │   ├── materialize-agent-task-planning.test.ts
    │   ├── materialize-agent-task-results.test.ts
    │   ├── materialize-artifact-persistence.test.ts
    │   ├── materialize-base-persisted-spec.test.ts
    │   ├── materialize-codegen-execution.test.ts
    │   ├── materialize-codegen-planning.test.ts
    │   ├── materialize-compatibility-cleanup.test.ts
    │   ├── materialize-contracts.test.ts
    │   ├── materialize-dependencies.test.ts
    │   ├── materialize-execution-workflow.test.ts
    │   ├── materialize-family-planning-contracts.test.ts
    │   ├── materialize-family-planning-helper-contracts.test.ts
    │   ├── materialize-family-planning-helpers.test.ts
    │   ├── materialize-family-planning.test.ts
    │   ├── materialize-request-planning-input.test.ts
    │   ├── materialize-request-planning.test.ts
    │   ├── materialize-result-support.test.ts
    │   ├── materialize-scenario-coordinator.test.ts
    │   ├── materialize-scenario-default-wiring.test.ts
    │   ├── materialize-scenario-execution-delegation-composition-coordinator.test.ts
    │   ├── materialize-scenario-execution-delegation-contracts.test.ts
    │   ├── materialize-scenario-execution-delegation-finalization-assembly-coordinator.test.ts
    │   ├── materialize-scenario-execution-delegation-finalization-composition-coordinator.test.ts
    │   ├── materialize-scenario-execution-delegation-finalization-coordinator.test.ts
    │   ├── materialize-scenario-execution-delegation-finalization-result-assembly-coordinator.test.ts
    │   ├── materialize-scenario-execution-delegation-finalization-result-composition-coordinator.test.ts
    │   ├── materialize-scenario-execution-delegation-finalization-result-input-result-coordinator.test.ts
    │   ├── materialize-scenario-execution-delegation-input-coordinator.test.ts
    │   ├── materialize-scenario-execution-delegation-orchestration-coordinator.test.ts
    │   ├── materialize-scenario-execution-delegation-request-resolution.test.ts
    │   ├── materialize-scenario-execution-delegation-result.test.ts
    │   ├── materialize-scenario-execution-request.test.ts
    │   ├── materialize-scenario-request-assembly.test.ts
    │   ├── materialize-scenario-request-handoff-delegation.test.ts
    │   ├── materialize-scenario.test.ts
    │   ├── materialize-workflow-planning-outcome-contracts.test.ts
    │   ├── materialize-workflow-planning-outcome.test.ts
    │   ├── materialize-workflow-request-composition.test.ts
    │   ├── materialize-workflow-request-coordinator.test.ts
    │   ├── materialize-workflow-request-finalization.test.ts
    │   ├── materialize-workflow-request-planning.test.ts
    │   ├── materialize-workflow-request-result.test.ts
    │   ├── mcp-expanded-surface.test.ts
    │   ├── mcp-rightsize.test.ts
    │   ├── mcp-runtime-tools.test.ts
    │   ├── mcp-serve-command-workflow.test.ts
    │   ├── mcp-server.test.ts
    │   ├── memory-consolidation.test.ts
    │   ├── mission-action-workflow.test.ts
    │   ├── mission-checkpoints.test.ts
    │   ├── mission-cli.test.ts
    │   ├── mission-command-execution.test.ts
    │   ├── mission-command-workflow.test.ts
    │   ├── mission-dashboard.test.ts
    │   ├── mission-execution.test.ts
    │   ├── mission-lifecycle.test.ts
    │   ├── mission-progress-workflow.test.ts
    │   ├── mission-read-workflow.test.ts
    │   ├── mission-simulation.test.ts
    │   ├── mission-status-transitions.test.ts
    │   ├── mission-store-workflows.test.ts
    │   ├── mission-verification-workflow.test.ts
    │   ├── mission.test.ts
    │   ├── model-resolution.test.ts
    │   ├── model-strategy-selection-workflow.test.ts
    │   ├── model-strategy.test.ts
    │   ├── naming-collision.test.ts
    │   ├── negotiation-codegen-template.test.ts
    │   ├── new-scenario-broader-family-materialization.test.ts
    │   ├── new-scenario-command-workflow.test.ts
    │   ├── new-scenario-created-materialization-preparation.test.ts
    │   ├── new-scenario-created-materialization.test.ts
    │   ├── new-scenario-created-result-rendering.test.ts
    │   ├── new-scenario-family-resolution.test.ts
    │   ├── new-scenario-guards.test.ts
    │   ├── new-scenario-import-field-parsing.test.ts
    │   ├── new-scenario-import-spec-assembly.test.ts
    │   ├── new-scenario-import-workflow.test.ts
    │   ├── new-scenario-imported-materialization-preparation.test.ts
    │   ├── new-scenario-imported-materialization-public-helper.test.ts
    │   ├── new-scenario-materialization-execution.test.ts
    │   ├── new-scenario-normalization-workflow.test.ts
    │   ├── new-scenario-operator-loop-materialization.test.ts
    │   ├── new-scenario-rendering-workflow.test.ts
    │   ├── new-scenario-result-line-builders.test.ts
    │   ├── new-scenario-result-output-serialization.test.ts
    │   ├── new-scenario-result-payload-builders.test.ts
    │   ├── new-scenario-result-rendering-entrypoints.test.ts
    │   ├── new-scenario-template-output-serialization.test.ts
    │   ├── new-scenario-template-rendering-public-helper.test.ts
    │   ├── new-scenario-template-rendering.test.ts
    │   ├── new-scenario-template-scaffold-execution.test.ts
    │   ├── new-scenario-template-scaffold-planning.test.ts
    │   ├── numeric-normalization.test.ts
    │   ├── oauth.test.ts
    │   ├── operator-loop-unsupported.test.ts
    │   ├── otel-bridge.test.ts
    │   ├── output-cleaner.test.ts
    │   ├── package-boundaries.test.ts
    │   ├── package-coercion-workflow.test.ts
    │   ├── package-content-workflow.test.ts
    │   ├── package-export-catalogs.test.ts
    │   ├── package-metadata-workflow.test.ts
    │   ├── package-parity.test.ts
    │   ├── package-topology.test.ts
    │   ├── parse.test.ts
    │   ├── persisted-credentials-workflow.test.ts
    │   ├── persisted-parametric-scenario.test.ts
    │   ├── pi-runtime.test.ts
    │   ├── primary-family-registry.test.ts
    │   ├── production-traces/
    │   │   ├── sdk/
    │   │   │   ├── build-trace-determinism.property.test.ts
    │   │   │   ├── build-trace.test.ts
    │   │   │   ├── cross-runtime-fixtures.test.ts
    │   │   │   ├── cross-runtime-parity.property.test.ts
    │   │   │   ├── hashing-parity.property.test.ts
    │   │   │   ├── hashing.test.ts
    │   │   │   ├── trace-batch.test.ts
    │   │   │   ├── validate.test.ts
    │   │   │   └── write-jsonl.test.ts
    │   │   └── taxonomy/
    │   │       ├── anthropic-error-reasons.test.ts
    │   │       ├── anthropic-parity.test.ts
    │   │       ├── openai-error-reasons.test.ts
    │   │       ├── outcome-reason-keys.test.ts
    │   │       └── parity.test.ts
    │   ├── production-traces-tools.test.ts
    │   ├── progress-digest.test.ts
    │   ├── project-config.test.ts
    │   ├── promotion-engine-workflow.test.ts
    │   ├── promotion-lifecycle.test.ts
    │   ├── promotion-registry-workflow.test.ts
    │   ├── prompt-alignment-adapter-workflow.test.ts
    │   ├── prompt-alignment-helpers-workflow.test.ts
    │   ├── prompt-alignment.test.ts
    │   ├── proof-mission.test.ts
    │   ├── provider-config-resolution-workflow.test.ts
    │   ├── provider-factory-workflow.test.ts
    │   ├── provider-routing.test.ts
    │   ├── provider-surface-consistency.test.ts
    │   ├── providers-registry.test.ts
    │   ├── providers.test.ts
    │   ├── public-schema-factories-workflow.test.ts
    │   ├── public-trace-export-workflow.test.ts
    │   ├── public-trace-schema.test.ts
    │   ├── publishing-connectors.test.ts
    │   ├── publishing-workflow.test.ts
    │   ├── queue-status-command-workflow.test.ts
    │   ├── queued-task-browser-context.test.ts
    │   ├── redaction-detection-workflow.test.ts
    │   ├── redaction-policy-workflow.test.ts
    │   ├── redaction.test.ts
    │   ├── remote-bridge.test.ts
    │   ├── remove-hardcoded-models.test.ts
    │   ├── repl-command-workflow.test.ts
    │   ├── replay-command-workflow.test.ts
    │   ├── research-consultation.test.ts
    │   ├── research-evaluation.test.ts
    │   ├── research-persistence.test.ts
    │   ├── research-prompt-wiring.test.ts
    │   ├── research-runtime.test.ts
    │   ├── research-types.test.ts
    │   ├── rlm-agent-task.test.ts
    │   ├── rlm-session.test.ts
    │   ├── role-provider-bundle-workflow.test.ts
    │   ├── rubric-coherence.test.ts
    │   ├── rubric-drift-statistics-workflow.test.ts
    │   ├── rubric-drift-warnings-workflow.test.ts
    │   ├── run-command-workflow.test.ts
    │   ├── run-custom-scenario-registry.test.ts
    │   ├── run-environment-catalog.test.ts
    │   ├── run-inspection-command-workflow.test.ts
    │   ├── run-management-tools.test.ts
    │   ├── run-manager-provider-session.test.ts
    │   ├── run-simulation-read-workflow.test.ts
    │   ├── run-start-workflow.test.ts
    │   ├── run-state-workflow.test.ts
    │   ├── runtime-child-tasks.test.ts
    │   ├── runtime-context-layers.test.ts
    │   ├── runtime-session-agent-runtime.test.ts
    │   ├── runtime-session-api.test.ts
    │   ├── runtime-session-command-workflow.test.ts
    │   ├── runtime-session-events.test.ts
    │   ├── runtime-session-ids.test.ts
    │   ├── runtime-session-provider-bridge.test.ts
    │   ├── runtime-session-provider-bundle.test.ts
    │   ├── runtime-session-read-model.test.ts
    │   ├── runtime-session-run-trace.test.ts
    │   ├── runtime-session-tools.test.ts
    │   ├── runtime-session.test.ts
    │   ├── runtime-workspace-env.test.ts
    │   ├── runtimes.test.ts
    │   ├── sandbox-manager.test.ts
    │   ├── sandbox-tools.test.ts
    │   ├── scenario-catalog-tools.test.ts
    │   ├── scenario-creator-family-aware.test.ts
    │   ├── scenario-draft-workflow.test.ts
    │   ├── scenario-execution-tools.test.ts
    │   ├── scenario-revision-execution.test.ts
    │   ├── scenario-revision-normalizer.test.ts
    │   ├── scenario-revision-prompt-workflow.test.ts
    │   ├── scenario-revision-tools.test.ts
    │   ├── scenario-revision.test.ts
    │   ├── scenario-spec-modes.test.ts
    │   ├── scenario-templates.test.ts
    │   ├── schema-evolution-codegen-template.test.ts
    │   ├── schema-evolution-designer-parsing.test.ts
    │   ├── score-trajectory-store-workflow.test.ts
    │   ├── scripts/
    │   │   ├── check-license-compatibility.test.ts
    │   │   ├── check-no-postinstall-scripts.test.ts
    │   │   ├── check-no-telemetry.test.ts
    │   │   ├── check-production-traces-sdk-bundle-size.test.ts
    │   │   └── check-side-effects.test.ts
    │   ├── secure-exec-worker.test.ts
    │   ├── semantic-compaction.test.ts
    │   ├── serve-command-workflow.test.ts
    │   ├── server-protocol.test.ts
    │   ├── session-runtime.test.ts
    │   ├── session-store.test.ts
    │   ├── settings-assembly-workflow.test.ts
    │   ├── settings-resolution-workflow.test.ts
    │   ├── simulate-command-workflow.test.ts
    │   ├── simulate-compare.test.ts
    │   ├── simulate-execution-workflow.test.ts
    │   ├── simulate-export-command-workflow.test.ts
    │   ├── simulate-export.test.ts
    │   ├── simulate-input-planning-workflow.test.ts
    │   ├── simulate-replay.test.ts
    │   ├── simulate-run-execution-workflow.test.ts
    │   ├── simulate.test.ts
    │   ├── simulation-artifact-store.test.ts
    │   ├── simulation-codegen-template.test.ts
    │   ├── simulation-dashboard.test.ts
    │   ├── simulation-degraded-status.test.ts
    │   ├── simulation-family-contracts.test.ts
    │   ├── simulation-family-executor.test.ts
    │   ├── simulation-family-guard-builders.test.ts
    │   ├── simulation-family-method-catalogs.test.ts
    │   ├── simulation-family-registry.test.ts
    │   ├── simulation-family-routing.test.ts
    │   ├── simulation-request-planner.test.ts
    │   ├── simulation-schema-evolution-simulate.test.ts
    │   ├── simulation-score-normalization.test.ts
    │   ├── simulation-summary.test.ts
    │   ├── simulation-variant-materializer.test.ts
    │   ├── skill-export.test.ts
    │   ├── skill-package-workflows.test.ts
    │   ├── skill-registry.test.ts
    │   ├── smart-defaults.test.ts
    │   ├── smoke-judge.test.ts
    │   ├── solve-command-workflow.test.ts
    │   ├── solve-generation-budget.test.ts
    │   ├── solve-job-workflow.test.ts
    │   ├── solve-manager-workflow.test.ts
    │   ├── solve-package-helpers-workflow.test.ts
    │   ├── solve-scenario-routing.test.ts
    │   ├── solve-tools.test.ts
    │   ├── solve-workflow.test.ts
    │   ├── spec-auto-heal-agent-task-workflow.test.ts
    │   ├── spec-auto-heal-core-workflow.test.ts
    │   ├── spec-auto-heal-preconditions-workflow.test.ts
    │   ├── spec-auto-heal.test.ts
    │   ├── storage-database-workflow.test.ts
    │   ├── storage-generation-run-facade.test.ts
    │   ├── storage-generation.test.ts
    │   ├── storage-human-feedback-facade.test.ts
    │   ├── storage-migration-workflow.test.ts
    │   ├── storage-schema-parity.test.ts
    │   ├── storage-task-queue-facade.test.ts
    │   ├── storage.test.ts
    │   ├── strategy-package-run-export.test.ts
    │   ├── strategy-validator.test.ts
    │   ├── subscription-cli-runtime-provider.test.ts
    │   ├── supervisor.test.ts
    │   ├── sweep-dsl.test.ts
    │   ├── synthetic-indicator.test.ts
    │   ├── task-metrics.test.ts
    │   ├── task-processing-workflow.test.ts
    │   ├── task-queue-store-contract.test.ts
    │   ├── task-queue-store-workflow.test.ts
    │   ├── task-runner-config-workflow.test.ts
    │   ├── task-runner-workflows.test.ts
    │   ├── task-runner.test.ts
    │   ├── tool-fragility-codegen-template.test.ts
    │   ├── trace-audit-fixes.test.ts
    │   ├── trace-export.test.ts
    │   ├── trace-findings-command-store.test.ts
    │   ├── trace-findings-command.test.ts
    │   ├── trace-findings-html.test.ts
    │   ├── trace-findings-weakness.test.ts
    │   ├── trace-findings.test.ts
    │   ├── trace-ingest-workflow.test.ts
    │   ├── train-command-workflow.test.ts
    │   ├── training-backend-core-workflow.test.ts
    │   ├── training-backend.test.ts
    │   ├── training-checkpoint-workflow.test.ts
    │   ├── training-config-workflow.test.ts
    │   ├── training-export.test.ts
    │   ├── training-promotion-workflow.test.ts
    │   ├── training-run-execution-workflow.test.ts
    │   ├── training-runner-workflow.test.ts
    │   ├── tui-activity-command.test.ts
    │   ├── tui-activity-settings-store.test.ts
    │   ├── tui-activity-summary.test.ts
    │   ├── tui-auth-command.test.ts
    │   ├── tui-auth.test.ts
    │   ├── tui-chat-command.test.ts
    │   ├── tui-command-help.test.ts
    │   ├── tui-command-workflow-router.test.ts
    │   ├── tui-command-workflow.test.ts
    │   ├── tui-meta-command.test.ts
    │   ├── tui-operator-command.test.ts
    │   ├── tui-run-command.test.ts
    │   ├── tui-solve-command.test.ts
    │   ├── tui-startup-log.test.ts
    │   ├── type-assertions.test.ts
    │   ├── typed-serialization.test.ts
    │   ├── types.test.ts
    │   ├── unified-classifier.test.ts
    │   ├── websocket-protocol-contract.test.ts
    │   ├── websocket-session-bootstrap.test.ts
    │   ├── worker-command-workflow.test.ts
    │   └── workflow-codegen-template.test.ts
    ├── tsconfig.json
    └── vitest.config.ts

================================================
FILE CONTENTS
================================================

================================================
FILE: .env.example
================================================
# Core runtime
AUTOCONTEXT_AGENT_PROVIDER=deterministic
AUTOCONTEXT_EXECUTOR_MODE=local

# Local paths
AUTOCONTEXT_DB_PATH=runs/autocontext.sqlite3
AUTOCONTEXT_RUNS_ROOT=runs
AUTOCONTEXT_KNOWLEDGE_ROOT=knowledge
AUTOCONTEXT_SKILLS_ROOT=skills
AUTOCONTEXT_CLAUDE_SKILLS_PATH=.claude/skills
AUTOCONTEXT_EVENT_STREAM_PATH=runs/events.ndjson

# Model selection
AUTOCONTEXT_MODEL_COMPETITOR=claude-sonnet-4-5-20250929
AUTOCONTEXT_MODEL_ANALYST=claude-sonnet-4-5-20250929
AUTOCONTEXT_MODEL_COACH=claude-opus-4-6
AUTOCONTEXT_MODEL_ARCHITECT=claude-opus-4-6
AUTOCONTEXT_MODEL_TRANSLATOR=claude-sonnet-4-5-20250929
AUTOCONTEXT_MODEL_CURATOR=claude-opus-4-6

# API credentials (set when using live providers)
# Prefer provider-native env vars like ANTHROPIC_API_KEY; AUTOCONTEXT_ANTHROPIC_API_KEY remains a compatibility alias.
ANTHROPIC_API_KEY=
AUTOCONTEXT_ANTHROPIC_API_KEY=
AUTOCONTEXT_PRIMEINTELLECT_API_BASE=https://api.primeintellect.ai
AUTOCONTEXT_PRIMEINTELLECT_API_KEY=
AUTOCONTEXT_PRIMEINTELLECT_DOCKER_IMAGE=python:3.11-slim
AUTOCONTEXT_PRIMEINTELLECT_CPU_CORES=1.0
AUTOCONTEXT_PRIMEINTELLECT_MEMORY_GB=2.0
AUTOCONTEXT_PRIMEINTELLECT_DISK_SIZE_GB=5.0
AUTOCONTEXT_PRIMEINTELLECT_TIMEOUT_MINUTES=30
AUTOCONTEXT_PRIMEINTELLECT_WAIT_ATTEMPTS=60

# Optional role-scoped provider credentials/endpoints
AUTOCONTEXT_COMPETITOR_API_KEY=
AUTOCONTEXT_COMPETITOR_BASE_URL=
AUTOCONTEXT_ANALYST_API_KEY=
AUTOCONTEXT_ANALYST_BASE_URL=
AUTOCONTEXT_COACH_API_KEY=
AUTOCONTEXT_COACH_BASE_URL=
AUTOCONTEXT_ARCHITECT_API_KEY=
AUTOCONTEXT_ARCHITECT_BASE_URL=

# Execution / loop tuning
AUTOCONTEXT_DEFAULT_GENERATIONS=1
AUTOCONTEXT_SEED_BASE=1000
AUTOCONTEXT_MATCHES_PER_GENERATION=3
AUTOCONTEXT_ARCHITECT_EVERY_N_GENS=3
AUTOCONTEXT_BACKPRESSURE_MIN_DELTA=0.005
AUTOCONTEXT_MAX_RETRIES=2
AUTOCONTEXT_RETRY_BACKOFF_SECONDS=0.25
AUTOCONTEXT_HARNESS_PROFILE=standard
AUTOCONTEXT_LEAN_CONTEXT_BUDGET_TOKENS=32000
AUTOCONTEXT_LEAN_HIDDEN_CONTEXT_BUDGET_TOKENS=0
AUTOCONTEXT_LEAN_TOOL_ALLOWLIST=read,bash,edit,write
AUTOCONTEXT_PI_RPC_PERSISTENT=false
AUTOCONTEXT_EXTENSIONS=
AUTOCONTEXT_EXTENSION_FAIL_FAST=false

# PrimeIntellect resilience
AUTOCONTEXT_PRIMEINTELLECT_MAX_RETRIES=2
AUTOCONTEXT_PRIMEINTELLECT_BACKOFF_SECONDS=0.75
AUTOCONTEXT_ALLOW_PRIMEINTELLECT_FALLBACK=true

# Local sandbox behavior
AUTOCONTEXT_LOCAL_SANDBOX_HARDENED=true

# Optional browser exploration (secure defaults)
AUTOCONTEXT_BROWSER_ENABLED=false
AUTOCONTEXT_BROWSER_BACKEND=chrome-cdp
AUTOCONTEXT_BROWSER_PROFILE_MODE=ephemeral
AUTOCONTEXT_BROWSER_ALLOWED_DOMAINS=
AUTOCONTEXT_BROWSER_ALLOW_AUTH=false
AUTOCONTEXT_BROWSER_ALLOW_UPLOADS=false
AUTOCONTEXT_BROWSER_ALLOW_DOWNLOADS=false
AUTOCONTEXT_BROWSER_CAPTURE_SCREENSHOTS=true
AUTOCONTEXT_BROWSER_HEADLESS=true
AUTOCONTEXT_BROWSER_DEBUGGER_URL=http://127.0.0.1:9222
AUTOCONTEXT_BROWSER_PREFERRED_TARGET_URL=
AUTOCONTEXT_BROWSER_DOWNLOADS_ROOT=
AUTOCONTEXT_BROWSER_UPLOADS_ROOT=


================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Report incorrect behavior, regressions, or setup problems
title: "[Bug] "
labels: bug
assignees: ""
---

## Summary

Describe the problem clearly.

## Surface

- Package or area: `autocontext/`, `ts/`, `tui/`, docs/examples, CI/release, or other
- Command, API, or workflow you were trying to use:

## Reproduction

1. 
2. 
3. 

## Expected behavior

What should have happened?

## Actual behavior

What happened instead?

## Environment

- OS:
- Python version:
- Node version:
- Working directory:
- Provider / executor:
- Relevant `AUTOCONTEXT_*` settings:

## Logs or screenshots

Add the relevant output, traceback, or screenshots.

## Additional context

- Run ID, scenario name, or artifact/package involved:
- Docs checked: `README`, package README, examples, agent integration guide, other


================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false
contact_links:
  - name: Docs and examples
    url: https://github.com/greyhaven-ai/autocontext/tree/main/docs
    about: Start with the docs overview, package guides, and copy-paste examples.
  - name: Usage and support
    url: https://github.com/greyhaven-ai/autocontext/blob/main/SUPPORT.md
    about: Read the support guidance before opening an issue.
  - name: Security policy
    url: https://github.com/greyhaven-ai/autocontext/blob/main/SECURITY.md
    about: Use the private security reporting process for vulnerabilities.


================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Propose a new capability or workflow improvement
title: "[Feature] "
labels: enhancement
assignees: ""
---

## Problem

What limitation or friction are you hitting?

## Audience and surface

- Who is this for? repo visitor, contributor, package user, agent integrator, maintainer, other
- Relevant surface: `autocontext/`, `ts/`, `tui/`, docs/examples, CI/release, other

## Proposed change

Describe the capability you want.

## Desired interface

If applicable, describe the desired CLI, SDK, MCP, API, or docs experience.

## Why it matters

Explain the user or engineering value.

## Scope notes

Call out any constraints, non-goals, or related prior work.


================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
## Summary

- what changed
- why it changed

## Surfaces Touched

- [ ] Python package
- [ ] TypeScript package
- [ ] TUI
- [ ] Docs or examples
- [ ] CI or release metadata

## Verification

- [ ] `cd autocontext && uv run ruff check ...`
- [ ] `cd autocontext && uv run mypy ...`
- [ ] `cd autocontext && uv run pytest ...`
- [ ] `cd ts && npm run lint`
- [ ] `cd ts && npm test`
- [ ] additional manual verification described below

## Docs And Release Impact

- [ ] no user-facing docs changes needed
- [ ] updated relevant README/docs/examples
- [ ] updated `CHANGELOG.md`
- [ ] updated version metadata if this is part of a release

## Notes

- config, migration, API, or docs impact
- breaking changes, follow-up work, or known limitations


================================================
FILE: .github/workflows/ci.yml
================================================
name: ci

on:
  push:
    branches: [main]
  pull_request:

concurrency:
  group: ci-${{ github.ref }}
  cancel-in-progress: true

permissions:
  contents: read

env:
  # Delay fresh npm versions in CI during supply-chain incidents.
  NPM_CONFIG_MIN_RELEASE_AGE: "7"
  # Match autocontext/uv.lock so `uv sync --locked` does not re-resolve.
  UV_EXCLUDE_NEWER: "2026-04-10T14:55:41Z"

jobs:
  lint:
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: autocontext
    steps:
      - uses: actions/checkout@v5
      - uses: actions/setup-python@v6
        with:
          python-version: "3.11"
      - name: Install uv
        uses: astral-sh/setup-uv@v7
        with:
          enable-cache: false
      - name: Install
        run: uv sync --locked --group dev
      - name: Ruff
        run: uv run ruff check src tests
      - name: Mypy
        run: uv run mypy src
      - name: Protocol parity check
        run: uv run python ../scripts/generate_protocol.py --check

  test:
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: autocontext
    steps:
      - uses: actions/checkout@v5
      - uses: actions/setup-python@v6
        with:
          python-version: "3.11"
      - name: Install uv
        uses: astral-sh/setup-uv@v7
        with:
          enable-cache: false
      - name: Install
        run: uv sync --locked --group dev
      - name: Tests
        run: uv run pytest --cov=src/autocontext --cov-report=html:htmlcov -m "not live"
      - name: Upload coverage
        if: always()
        uses: actions/upload-artifact@v6
        with:
          name: coverage-report
          path: autocontext/htmlcov/
          retention-days: 14

  package-boundaries:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: actions/setup-python@v6
        with:
          python-version: "3.11"
      - uses: actions/setup-node@v5
        with:
          node-version: "24"
      - name: Install uv
        uses: astral-sh/setup-uv@v7
        with:
          enable-cache: false
      - name: Install Python deps
        working-directory: autocontext
        run: uv sync --locked --group dev
      - name: Install TypeScript deps
        working-directory: ts
        run: npm ci --ignore-scripts
      - name: Python package boundary checks
        working-directory: autocontext
        run: uv run pytest tests/test_package_topology.py tests/test_package_boundaries.py -q
      - name: TypeScript package boundary checks
        working-directory: ts
        run: npx vitest run tests/package-topology.test.ts tests/package-boundaries.test.ts

  smoke:
    needs: [lint, test, package-boundaries]
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: autocontext
    steps:
      - uses: actions/checkout@v5
      - uses: actions/setup-python@v6
        with:
          python-version: "3.11"
      - name: Install uv
        uses: astral-sh/setup-uv@v7
        with:
          enable-cache: false
      - name: Install
        run: uv sync --locked --group dev
      - name: Deterministic scenario runs
        env:
          AUTOCONTEXT_AGENT_PROVIDER: deterministic
        run: |
          uv run python -m autocontext.cli run --scenario grid_ctf --gens 3 --run-id ci_smoke_grid
          uv run python -m autocontext.cli run --scenario othello --gens 1 --run-id ci_smoke_othello
      - name: Dashboard API smoke
        env:
          AUTOCONTEXT_AGENT_PROVIDER: deterministic
        run: |
          cleanup() { kill $SERVER_PID 2>/dev/null || true; }
          trap cleanup EXIT
          uv run autoctx serve --host 127.0.0.1 --port 8010 &
          SERVER_PID=$!
          sleep 2
          curl -fsS http://127.0.0.1:8010/health
          curl -fsS http://127.0.0.1:8010/api/runs

  # ────────────────────────────────────────────────────────────────────────────
  # OpenAI SDK version-pin matrix (A2-II-b Task 7.4)
  # Tests the OpenAI integration against the 3 most-recent 1.x patches (Python)
  # and 3 most-recent 4.x patches (TypeScript).
  #
  # Python: 1.82.0, 1.83.0, 1.84.0   (latest 3 minor patches of openai 1.x)
  # TS:     4.102.0, 4.103.0, 4.104.0 (latest 3 minor patches of openai 4.x)
  # ────────────────────────────────────────────────────────────────────────────
  openai-sdk-matrix-python:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        openai-version: ["1.82.0", "1.83.0", "1.84.0"]
    defaults:
      run:
        working-directory: autocontext
    env:
      OPENAI_VERSION: ${{ matrix.openai-version }}
    steps:
      - uses: actions/checkout@v5
      - uses: actions/setup-python@v6
        with:
          python-version: "3.11"
      - name: Install uv
        uses: astral-sh/setup-uv@v7
        with:
          enable-cache: false
      - name: Install base deps
        run: uv sync --locked --group dev
      - name: Pin openai to matrix version
        run: uv pip install --exclude-newer 2026-05-05T00:00:00Z "openai==$OPENAI_VERSION"
      - name: Run OpenAI integration tests
        run: uv run pytest tests/production_traces/ tests/integrations/ -q -m "not live"

  openai-sdk-matrix-ts:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        openai-version: ["4.102.0", "4.103.0", "4.104.0"]
    defaults:
      run:
        working-directory: ts
    env:
      OPENAI_VERSION: ${{ matrix.openai-version }}
    steps:
      - uses: actions/checkout@v5
      - uses: actions/setup-python@v6
        with:
          python-version: "3.11"
      - uses: actions/setup-node@v5
        with:
          node-version: "24"
      - name: Reuse setup-node headers for native addons
        shell: bash
        run: |
          nodedir="$(dirname "$(dirname "$(command -v node)")")"
          test -d "$nodedir/include/node"
          echo "npm_config_nodedir=$nodedir" >> "$GITHUB_ENV"
      - name: Install uv
        uses: astral-sh/setup-uv@v7
        with:
          enable-cache: false
      - name: Install Python parity deps
        working-directory: autocontext
        run: uv sync --locked --group dev
      - name: Install base deps
        run: npm ci --ignore-scripts
      - name: Pin openai to matrix version
        run: npm install --ignore-scripts --no-save "openai@$OPENAI_VERSION"
      - name: Run OpenAI integration tests
        run: npm test -- --run --reporter=verbose tests/integrations/ tests/control-plane/instrument/

  # ────────────────────────────────────────────────────────────────────────────
  # Anthropic SDK version-pin matrix (A2-III)
  # Tests the Anthropic integration against the 3 most-recent 0.x patches (Python)
  # and 3 most-recent 0.x patches (TypeScript @anthropic-ai/sdk).
  #
  # Python: 0.49.0, 0.50.0, 0.51.0   (latest 3 minor patches of anthropic 0.x)
  # TS:     0.39.0, 0.40.0, 0.41.0   (latest 3 minor patches of @anthropic-ai/sdk 0.x)
  # ────────────────────────────────────────────────────────────────────────────
  anthropic-sdk-matrix-python:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        anthropic-version: ["0.49.0", "0.50.0", "0.51.0"]
    defaults:
      run:
        working-directory: autocontext
    env:
      ANTHROPIC_VERSION: ${{ matrix.anthropic-version }}
    steps:
      - uses: actions/checkout@v5
      - uses: actions/setup-python@v6
        with:
          python-version: "3.11"
      - name: Install uv
        uses: astral-sh/setup-uv@v7
        with:
          enable-cache: false
      - name: Install base deps
        run: uv sync --locked --group dev
      - name: Pin anthropic to matrix version
        run: uv pip install --exclude-newer 2026-05-05T00:00:00Z "anthropic==$ANTHROPIC_VERSION"
      - name: Run Anthropic integration tests
        run: uv run pytest tests/production_traces/ tests/integrations/ -q -m "not live"

  anthropic-sdk-matrix-ts:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        anthropic-version: ["0.39.0", "0.40.0", "0.41.0"]
    defaults:
      run:
        working-directory: ts
    env:
      ANTHROPIC_VERSION: ${{ matrix.anthropic-version }}
    steps:
      - uses: actions/checkout@v5
      - uses: actions/setup-python@v6
        with:
          python-version: "3.11"
      - uses: actions/setup-node@v5
        with:
          node-version: "24"
      - name: Install uv
        uses: astral-sh/setup-uv@v7
        with:
          enable-cache: false
      - name: Install Python parity deps
        working-directory: autocontext
        run: uv sync --locked --group dev
      - name: Install base deps
        run: npm ci --ignore-scripts
      - name: Pin anthropic to matrix version
        run: npm install --ignore-scripts --no-save "@anthropic-ai/sdk@$ANTHROPIC_VERSION"
      - name: Run Anthropic integration tests
        run: npm test -- --run --reporter=verbose tests/integrations/ tests/control-plane/instrument/

  primeintellect-live:
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: autocontext
    env:
      AUTOCONTEXT_PRIMEINTELLECT_API_KEY: ${{ secrets.AUTOCONTEXT_PRIMEINTELLECT_API_KEY }}
      AUTOCONTEXT_ANTHROPIC_API_KEY: ${{ secrets.AUTOCONTEXT_ANTHROPIC_API_KEY }}
    steps:
      - uses: actions/checkout@v5
      - uses: actions/setup-python@v6
        with:
          python-version: "3.11"
      - name: Install uv
        uses: astral-sh/setup-uv@v7
        with:
          enable-cache: false
      - name: Install
        run: uv sync --locked --group dev
      - name: Live PrimeIntellect verification
        if: ${{ env.AUTOCONTEXT_PRIMEINTELLECT_API_KEY != '' && env.AUTOCONTEXT_ANTHROPIC_API_KEY != '' }}
        env:
          AUTOCONTEXT_EXECUTOR_MODE: primeintellect
          AUTOCONTEXT_PRIMEINTELLECT_API_BASE: https://api.primeintellect.ai
          AUTOCONTEXT_AGENT_PROVIDER: anthropic
        run: uv run autoctx run --scenario grid_ctf --gens 1 --run-id ci_prime_live


================================================
FILE: .github/workflows/publish-pi-autocontext.yml
================================================
name: publish-pi-autocontext

on:
  push:
    tags:
      - "pi-v*"
  workflow_dispatch:

concurrency:
  group: publish-pi-autocontext-${{ github.ref }}
  cancel-in-progress: false

permissions:
  contents: read

jobs:
  publish-npm:
    runs-on: ubuntu-latest
    environment: publish-pi-autocontext
    permissions:
      contents: read
      id-token: write
    env:
      # Delay fresh npm versions during publish workflow dependency installs.
      NPM_CONFIG_MIN_RELEASE_AGE: "7"
    defaults:
      run:
        working-directory: pi
    steps:
      - uses: actions/checkout@v5
      - uses: actions/setup-node@v5
        with:
          node-version: "24"
          registry-url: "https://registry.npmjs.org"
      - name: Validate tag matches Pi package version
        if: startsWith(github.ref, 'refs/tags/pi-v')
        run: |
          expected="${GITHUB_REF_NAME#pi-v}"
          actual="$(node -p "require('./package.json').version")"
          if [ "$actual" != "$expected" ]; then
            echo "Tag ${GITHUB_REF_NAME} does not match pi/package.json version ${actual}." >&2
            exit 1
          fi
      - name: Install dependencies
        run: npm ci --ignore-scripts
      - name: Show npm version
        run: npm --version
      - name: Lint package
        run: npm run lint
      - name: Test package
        run: npm test
      - name: Build package
        run: npm run build
      - name: Publish to npm
        run: npm publish --ignore-scripts --access public --provenance


================================================
FILE: .github/workflows/publish-python.yml
================================================
name: publish-python

on:
  push:
    tags:
      - "py-v*"
  workflow_dispatch:

concurrency:
  group: publish-python-${{ github.ref }}
  cancel-in-progress: false

permissions:
  contents: read

jobs:
  build-python:
    runs-on: ubuntu-latest
    env:
      # Avoid resolving freshly uploaded PyPI artifacts during active supply-chain incidents.
      UV_EXCLUDE_NEWER: "2026-04-10T14:55:41Z"
    defaults:
      run:
        working-directory: autocontext
    steps:
      - uses: actions/checkout@v5
      - uses: actions/setup-python@v6
        with:
          python-version: "3.11"
      - name: Validate tag matches Python package version
        if: startsWith(github.ref, 'refs/tags/py-v')
        run: |
          python - <<'PY'
          import os
          import sys
          import tomllib

          with open("pyproject.toml", "rb") as fh:
              version = tomllib.load(fh)["project"]["version"]

          tag = os.environ["GITHUB_REF_NAME"]
          expected = tag.removeprefix("py-v")
          if version != expected:
              print(
                  f"Tag {tag!r} does not match autocontext/pyproject.toml version {version!r}.",
                  file=sys.stderr,
              )
              sys.exit(1)
          PY
      - name: Install uv
        uses: astral-sh/setup-uv@v7
        with:
          enable-cache: false
      - name: Build Python package
        run: uv build
      - name: Upload Python dist
        uses: actions/upload-artifact@v6
        with:
          name: python-dist
          path: autocontext/dist/*
          retention-days: 7

  publish-pypi:
    needs: build-python
    runs-on: ubuntu-latest
    environment: publish-python
    permissions:
      contents: read
      id-token: write
    steps:
      - name: Download Python dist
        uses: actions/download-artifact@v5
        with:
          name: python-dist
          path: dist
      - name: Publish to PyPI
        uses: pypa/gh-action-pypi-publish@release/v1
        with:
          packages-dir: dist


================================================
FILE: .github/workflows/publish-ts.yml
================================================
name: publish-ts

on:
  push:
    tags:
      - "ts-v*"
  workflow_dispatch:

concurrency:
  group: publish-ts-${{ github.ref }}
  cancel-in-progress: false

permissions:
  contents: read

jobs:
  publish-npm:
    runs-on: ubuntu-latest
    environment: publish-ts
    permissions:
      contents: read
      id-token: write
    env:
      # Delay fresh npm versions during publish workflow dependency installs.
      NPM_CONFIG_MIN_RELEASE_AGE: "7"
    defaults:
      run:
        working-directory: ts
    steps:
      - uses: actions/checkout@v5
      - uses: actions/setup-node@v5
        with:
          node-version: "24"
          registry-url: "https://registry.npmjs.org"
      - name: Validate tag matches TypeScript package version
        if: startsWith(github.ref, 'refs/tags/ts-v')
        run: |
          expected="${GITHUB_REF_NAME#ts-v}"
          actual="$(node -p "require('./package.json').version")"
          if [ "$actual" != "$expected" ]; then
            echo "Tag ${GITHUB_REF_NAME} does not match ts/package.json version ${actual}." >&2
            exit 1
          fi
      - name: Install dependencies
        run: npm ci --ignore-scripts
      - name: Show npm version
        run: npm --version
      - name: Build package
        run: npm run build
      - name: Publish to npm
        run: npm publish --ignore-scripts --access public --provenance


================================================
FILE: .gitignore
================================================
# Secrets
.env
.env.*
!.env.example
**/.env
**/.env.*
!**/.env.example

# Python
__pycache__/
*.py[cod]
.python-version
.venv/
**/.venv/
.pytest_cache/
.mypy_cache/
.ruff_cache/

# Node
node_modules/

# Local agent / superpowers workflow artifacts
.claude/projects/
.pi/
.pi-lens/
/superpowers/
docs/superpowers/

# OS/editor
.DS_Store

# Worktrees
.worktrees/

# Runtime outputs
runs/*
!runs/.gitkeep
knowledge/*
!knowledge/.gitkeep
skills/*
!skills/.gitkeep
autocontext/runs/
autocontext/knowledge/

# Database artifacts
*.sqlite3
*.db


================================================
FILE: .prettierrc.json
================================================
{
  "semi": true,
  "singleQuote": false,
  "trailingComma": "all",
  "printWidth": 100
}


================================================
FILE: AGENTS.md
================================================
# Agent Guide

Use this file as the first pointer for coding agents and automation that need to work in or against this repo.

## Pick The Right Surface

- Full autocontext control plane: `autocontext/`
- Node/TypeScript toolkit and CLI: `ts/`
- Interactive terminal UI: `ts/src/tui/`
- External agent usage guide: `autocontext/docs/agent-integration.md`

## Working Directories

- Run Python commands from `autocontext/`.
- Run Node/TypeScript commands from `ts/`.
- Run TUI-related commands from `ts/`.

Most repo-level commands in the READMEs assume one of those package directories as the current working directory.

## Setup

Python:

```bash
cd autocontext
uv venv
source .venv/bin/activate
uv sync --group dev
```

TypeScript:

```bash
cd ts
npm install
```

## Common Checks

Python:

```bash
cd autocontext
uv run ruff check src tests
uv run mypy src
uv run pytest
```

TypeScript:

```bash
cd ts
npm run lint
npm test
```

## Public Docs To Keep In Sync

If you change public commands, environment variables, package names, or agent-facing workflows, update the relevant docs in the same change:

- `README.md`
- `docs/README.md`
- `autocontext/README.md`
- `ts/README.md`
- `examples/README.md`
- `autocontext/docs/agent-integration.md`
- `CONTRIBUTING.md`
- `CHANGELOG.md`

## Key References

- Repo overview: `README.md`
- Docs overview: `docs/README.md`
- Contributor workflow: `CONTRIBUTING.md`
- Python package guide: `autocontext/README.md`
- TypeScript package guide: `ts/README.md`
- Copy-paste examples: `examples/README.md`
- External agent guide: `autocontext/docs/agent-integration.md`

## Intentional Deletions

- Before restoring deleted modules to make CI green, check whether `autocontext/src/` still imports them.
- If only tests are failing, prefer rewriting or deleting the tests instead of restoring removed modules.
- Treat importable module paths as compatibility surfaces until callers are rewired or the removal is explicitly accepted as breaking.


================================================
FILE: CHANGELOG.md
================================================
# Changelog

All notable changes to this project will be documented in this file.

## [Unreleased]

### Added

- AC-707 (spike): Hermes plugin emitter prototype + decision doc. New `autocontext.hermes.plugin_emitter` module ships a fail-open `HermesTraceEmitter` orchestrator with `LLMCallEvent` / `ToolCallEvent` value types, a `TraceSink` Protocol, and a `LocalJsonlSink` concrete write surface. The emitter reuses the existing `RedactionPolicy` (DRY with AC-706) and `production_traces.emit.build_trace` (DRY with AC-704 / AC-706) so a future production plugin can adopt the shape without redesigning anything in autocontext. Decision documented at `docs/hermes-plugin-emitter-spike.md`: **DEFER** until either a concrete operator workflow demands the extra fidelity (sub-second timing, structured tool calls, provider usage) or Hermes publishes a stable plugin API contract. The file importers (AC-704 / AC-706) plus the advisor pipeline (AC-708 / AC-709) cover the current operator scenarios; paying the cross-package contract cost now would not unlock any active payoff thread. 12 tests pin the safety properties (sink fail-open, hook fail-open, late finalize ignored, concurrent sessions isolated, no network IO in default mode, shared-policy redaction, ProductionTrace shape) so a future revisit is glue work, not a green-field rewrite. AC-707 closed.

- AC-709: `autoctx hermes recommend --home ~/.hermes --baseline-from training/hermes-curator-decisions.jsonl --output recommendations.jsonl [--include-protected] [--json]` is the read-only recommendation surface. Trains a baseline advisor on AC-705 export data, walks the live Hermes inventory, and emits one JSONL row per recommendation. New `autocontext.hermes.recommendations` module exposes `Recommendation` (skill_name, predicted_action, confidence, status, features, reason) and `recommend(inventory, advisor, *, include_protected, reason)`. Read-only invariant: never writes to `~/.hermes`; Curator stays the mutation owner. Protected skills (pinned / bundled / hub provenance) are filtered out by default so a recommendation cannot mistakenly target upstream-owned content; `--include-protected` surfaces them tagged `status="protected"` for audit. Same-file guard on `--baseline-from` / `--output` mirrors the AC-706 / AC-708 ingest posture. Slice-1 refactor of `autocontext.hermes.advisor`: introduces `SkillFeatures` as the inference-time input shape so advisors take features (not labeled examples), with `CuratorDecisionExample.features` bridging training to inference cleanly. `BaselineAdvisor.predict(features)` is unchanged behaviorally; the slice-1 tests update one direct call site. 13 recommendation tests + 1 refactor regression cover features bridge, advisor protocol, protected-skill filtering, include-protected audit path, JSON round-trip, default rationale per advisor type, and 4 CLI integration tests (success, same-file guard, empty training rejection, all-protected empty-output, include-protected surfacing). 186 total hermes tests pass.

- AC-769: failure-type → remediation routing on top of `FailureReport`. New `autocontext/src/autocontext/loop/remediation_router.py` pattern-matches a `FailureReport` (plus optional AC-767 `fixtures` map) into typed `RemediationHint` instances. Three built-in rules ship: `rule_off_by_one` (matches "expected X, got Y" where diff ∈ {1, BLOCK, BLOCK²} for common block sizes, plus "off-by-N" keywords) → `SmallCaseVerify`; `rule_positional_typerror` (matches `TypeError: foo() takes N positional arguments` and extracts modules from `File "..."` traceback lines) → `SurfaceSignatures`; `rule_stale_fixture` (matches `missing-substring` failures referencing a fixture key whose cached payload is older than `stale_after_days`) → `RefreshFixture`. Rules are pluggable via a `Rule` `Protocol` and `DEFAULT_RULES` list. `route_remediations(report, *, fixtures, stale_after_days, rules)` runs every rule and concatenates hints in order; `render_hints(hints)` emits a `## Suggested next moves` prompt block. Wired into the tree-search refinement loop (`loop/stage_tree_search.py`): `HypothesisNode` gains `last_errors: list[list[str]]`, `HypothesisTree.update` accepts an optional `errors_per_match` kwarg, and the refinement-prompt build site calls `remediation_hints_for_node(selected, fixtures=ctx.fixtures)` then threads the result into `build_refinement_prompt(remediation_hints=...)`. `build_refinement_prompt` gains a `remediation_hints: str = ""` opt-in kwarg (existing callers unchanged). 23 tests cover rules, router, render, the stage_tree_search wiring helper, and an end-to-end test through `build_refinement_prompt`.

- AC-767 (docs follow-up): operator-facing documentation for the authoritative ground-truth fixture loader landed in #968. New `autocontext/docs/fixture-loader.md` covers quick-start (drop a manifest at `autocontext/knowledge/<scenario>/fixtures.json`, set `AUTOCONTEXT_FIXTURE_LOADER_ENABLED=true`), manifest format (`key`, `source`, optional `expected_sha256`), cache semantics (rehash on read, source-URL change invalidates, missing manifest is a no-op), programmatic API (`FixtureManifest`, `FixtureCache`, `UrlFetcher`, `load_scenario_fixtures`, `render_fixtures`), and the settings reference. No code changes; the implementation already shipped via #968.

- AC-708 (slice 1): `autoctx hermes train-advisor --data <jsonl> --baseline --output metrics.json` lays down the data + evaluation contract for the local Hermes curator advisor. New `autocontext.hermes.advisor` module exposes a DDD domain layer: `CuratorDecisionExample` value type loaded from AC-705 export JSONL, `BaselineAdvisor` (always-majority-class with deterministic tie-break in `CANONICAL_LABELS` order), `LabelMetrics` / `AdvisorMetrics` (per-label precision/recall + overall accuracy + `insufficient_data` flag), `train_baseline()`, and `evaluate()`. `load_curator_examples` is per-line tolerant (matches AC-704 / AC-706 ingest posture): malformed JSON, missing required fields, and unknown labels skip the row rather than aborting. `INSUFFICIENT_DATA_THRESHOLD = 20` floors when per-label metrics are meaningful — datasets below the floor still get metrics back but with the flag set, addressing the AC-708 acceptance criterion "a clear 'not enough data' failure mode for small Hermes homes". The baseline establishes the floor every later trained advisor (slice 2: logistic regression / MLX / CUDA, AC-709 recommendation surface) must beat without redesigning the data contract. 15 tests cover loader robustness, baseline determinism, per-label precision/recall on a known fixture, insufficient-data thresholds, JSON-serializable metrics, and CLI integration (`--baseline --json --output`, insufficient-data warning, empty-dataset rejection).

- AC-706 (slice 2): `autoctx hermes ingest-sessions --home ~/.hermes --output traces/hermes-sessions.jsonl --redact standard|strict|off [--since <ISO>] [--limit n] [--dry-run]` reads the Hermes session SQLite DB (`<home>/state.db`) in read-only URI mode and writes one autocontext `ProductionTrace` JSONL row per session. New `autocontext.hermes.sessions` module exposes a DDD domain layer: `HermesSession`, `HermesMessage`, `HermesSessionRepository` (read-only SQLite + schema-drift tolerance + WAL/SHM sidecar independence), and `SessionDBMissing` for the "no DB to ingest" boundary. New `autocontext.hermes.session_ingest` is the application service that maps domain objects into ProductionTraces via the same `production_traces.emit.build_trace` helper that AC-704 uses (DRY). Per-message content goes through the shared `RedactionPolicy` from slice 1 (DRY across both ingest paths), so a strict-mode user-pattern set behaves identically for trajectories and sessions. The `RAW_CONTENT_WARNING` opt-in marker from slice 1 is reused so `--redact off --json` surfaces the same audit signal for sessions. Per-trace metadata carries `session_id`, `agent_id`, `session_started_at`, `session_ended_at`, `session_metadata`, and `source: "hermes.session"`. Missing DB returns an empty summary (graceful, exit 0). 10 repository tests cover read-only refusal, missing-DB error path, since-filter, sequence order, schema drift (extra and missing columns), WAL/SHM-less open, and corrupt metadata JSON. 13 ingester tests cover end-to-end emission, shared-policy redaction, since/limit/dry-run, importer-never-mutates-DB invariant (mtime + size check), `--redact off` warning surfacing, per-trace metadata, invalid-`--since` rejection, and CLI integration. AC-706 closed.

- AC-706 (slice 1): `autoctx hermes ingest-trajectories --input <jsonl> --output <jsonl> --redact standard|strict|off` reads a Hermes trajectory JSONL file (ShareGPT-like, line-per-trajectory) and writes a redacted copy. Default `--redact standard` runs the existing `sharing/redactor` pipeline (Anthropic / OpenAI / AWS / GitHub / Slack keys, bearer tokens, emails, IPs, env values, absolute paths, high-risk file refs). `--redact strict` requires `--user-patterns` (a JSON array of `{name, pattern}` regex objects) and tags hits as `[REDACTED_USER_PATTERN:<name>]`. `--redact off` writes raw content and surfaces a CLI warning on the privacy posture (AC-706 requires explicit operator opt-in). `--dry-run` reports redaction counts without writing the output (AC-706 privacy preview). Per-line tolerance: corrupt JSON, non-object trajectories, and blank lines are skipped (not aborted) with per-line warnings. The redaction stats are returned per-category so operators can audit what was removed. New `autocontext.hermes.redaction` module exposes `RedactionPolicy`, `compile_user_patterns`, and `redact_text` as the shared policy surface that the AC-706 slice 2 (sessions) will reuse. 11 redaction-policy tests + 13 trajectory-ingester tests (including the CLI subcommand entry point and the input-never-mutated invariant). AC-706 slice 2 (`ingest-sessions` from `~/.hermes/state.db` with WAL/SHM tolerance and schema drift) is a follow-up; this slice ships the redaction primitives and the simpler JSONL surface first.

- AC-702: Hermes skill references for progressive disclosure. Adds `autocontext/src/autocontext/hermes/references.py` exposing 4 markdown references (`hermes-curator`, `cli-workflows`, `mcp-workflows`, `local-training`) accessible via `list_references()` / `render_reference(name)`. The rendered SKILL.md from `render_autocontext_skill()` now ends with a `## References` section that cross-links each one. `autoctx hermes export-skill --with-references --output <dir>/SKILL.md` writes the references next to the skill in a `references/` subdirectory; `--force` propagates to both SKILL.md and references. The skill remains useful on its own when `--with-references` is not passed. Atomic preflight: every destination is checked before any write so a reference-name collision can't leave SKILL.md half-installed. 12 tests cover canonical order, content invariants (read-only rule in curator alignment doc; concrete commands in CLI workflows; CLI-vs-MCP guidance in MCP workflows; small-dataset warning in local-training), SKILL.md cross-linking, the CLI overwrite-without-force guardrail, and the atomicity regression test.
- AC-705: `autoctx hermes export-dataset --kind curator-decisions --home ~/.hermes --output training/hermes-curator-decisions.jsonl` exports Hermes curator decision artifacts as supervised training JSONL for narrow advisor classifiers (per the AC-708 scope). Each row carries `example_id`, `source.curator_run_path`, `source.started_at`, `input.skill_{name,state,provenance,pinned,use_count,view_count,patch_count,activity_count,last_activity_at}`, `label` (`consolidated` | `pruned` | `archived` | `added`, strongest-wins precedence), `confidence: "strong"`, `redactions: []`, and `context.run_{provider,model,counts}`. Label quality rules pinned by tests: `pinned` skills NEVER become mutation targets; `bundled` and `hub` skills NEVER become mutation targets (they appear only as context). Skills missing from the inventory still emit an example with `unknown` features so historical curator decisions can be trained on. Both Hermes v0.12 action shapes are accepted (list of strings OR list of `{"name": ...}` dicts). `--since <ISO-8601>` raises ValueError on invalid input rather than silently disabling the filter; runs without parseable `started_at` fall back to file mtime for the comparison. Pinned-via-`.usage.json`, bundled-via-`.bundled_manifest`, and hub-via-`.hub/lock.json` names are protected even when no active SKILL.md folder exists. Other documented dataset kinds (`consolidation-pairs`, `skill-selection`, `skill-quality-signals`) raise `NotImplementedError` with a clear message so callers know they're planned but not yet implemented. 18 fixture-based tests cover schema, label quality rules, since/limit filters, unknown-kind dispatch, dict-shape actions, protected-name fallbacks, and --since hardening. Module docstring documents the full schema; the schema is intentionally flat and feature-engineered so it can feed `autoctx train --backend mlx|cuda` via a one-step adapter (the adapter is a follow-up). NOTE: small personal Hermes homes may not have enough data for useful model training yet -- the dataset shape ships first; usefulness depends on Curator-decision volume.
- AC-704: `autoctx hermes ingest-curator --home ~/.hermes --output traces/hermes-curator.jsonl` reads Hermes v0.12 curator run reports (`<home>/logs/curator/**/run.json`) and emits autocontext `ProductionTrace` JSONL. The ingester is tolerant: malformed JSON is skipped with a warning rather than aborting; missing `started_at` falls back to file mtime; missing `duration_seconds` falls back to 0. Curator action lists (consolidated/pruned/archived/added) and counts land in `trace.metadata.curator_*` so downstream dataset exporters (AC-705) can consume them without re-parsing raw files. Privacy defaults: `--include-llm-final` (off by default) gates whether the curator's LLM final summary is attached as an assistant message; `--include-tool-args` (off by default) gates whether raw tool-call args are preserved. `--since <ISO-8601>` and `--limit <n>` filter the run set. CLI returns a JSON summary (`runs_read`, `traces_written`, `skipped`, `warnings`) under `--json`. 11 fixture-based tests cover normal run / consolidation-only / auto-transition-only / malformed JSON / missing curator dir / since-filter / limit / synthesized-messages-satisfy-schema / include-llm-final opt-in / metadata round-trip / timing derivation.

- AC-710: `docs/hermes-positioning.md` records the Hermes Curator + autocontext positioning. Headline: Hermes Curator is the live skill-library maintainer; autocontext is the evaluation, trace, replay, export, and local-training layer. Includes an at-a-glance complementarity table, the default operator flow (`autoctx hermes inspect` -> `autoctx hermes export-skill` -> `autoctx judge` / `improve`), the read-only import boundary on `~/.hermes`, the privacy posture for session/trajectory imports, the narrow scope of `autoctx train` for advisor models, and an explicit "autocontext does not replace Curator" section. Cross-linked from `docs/README.md` "Integrating External Agents". Status footer enumerates shipped / in-flight / out-of-scope work so the doc stays accurate as the rest of the Hermes cluster lands.

- AC-682 (slice 1): TypeScript OpenTelemetry bridge for `PublicTrace`. New `ts/src/traces/otel-bridge.ts` exposes `publicTraceToOtelResourceSpans` (forward) and `otelResourceSpansToPublicTrace` (reverse) over a minimal validated subset of OTel JSON `ResourceSpans` (`OtelResourceSpansSchema` Zod). Bidirectional round-trip preserves traceId, sourceHarness (via `service.name`), `collectedAt`, sessionId, message order/content, tool calls (name/args/duration/error -> span `status.code = "ERROR"`), outcome (score/reasoning/dimensions), and redactions metadata. Reverse path validates the reconstructed trace against `PublicTraceSchema` before returning so a broken bridge cannot emit invalid traces. 11 tests cover schema validation, forward emission, round-trip, missing-service-name error path, missing-root-span error path, optional-outcome handling, zero-tool-call messages, and redaction preservation. Design note + mapping table at `docs/opentelemetry-bridge.md` enumerates the known-gap fields (file references, metadata, tool results) that survive as opaque JSON blobs rather than as structured OTel attributes. Python parity, OTLP protobuf wire format, and the ProductionTrace bridge are out of scope for slice 1.
- AC-725: `docs/flue-influences.md` design note records what the runtime workspace/session contract, scoped command/tool grants, child-agent task execution, and `cwd` discovery model borrowed from an external review, and what was explicitly NOT borrowed (no upstream dependency, no API names, no provider stack, no vocabulary replacement). Cross-linked from `docs/README.md` "Architecture And Parity"; the canonical `docs/concept-model.md` is intentionally NOT cross-linked to keep its vocabulary autocontext-native (a `tests/package-topology.test.ts` invariant pins this). Pins the guardrail that `sandbox` / `workspace` / `session` are runtime isolation/boundary concepts, not peer top-level product nouns alongside `Scenario` / `Mission`.
- AC-728: verifier-facing contract probes for terminal, service, and artifact tasks. Extends `ts/src/control-plane/contract-probes/index.ts` (previously only `probeDirectoryContract`) with three new pure probes: `probeTerminalContract` (exit code + required/forbidden stdout/stderr patterns), `probeServiceContract` (required endpoints with host/port/protocol matching + `wrong-interface` detection for `127.0.0.1` vs `0.0.0.0` confusion + optional allowed-endpoint allowlist), and `probeArtifactContract` (required/forbidden substrings + LF/CRLF line-ending check + required JSON fields via dot-paths with `invalid-json` failure when JSON parse fails). All probes follow the existing `{ passed: boolean, failures: readonly Failure[] }` shape; failures carry a typed `kind` for client filtering. 17 new tests + the existing directory probe test. Distributed/multi-rank parity probes deferred to a follow-up slice.
- AC-679 (slice 3b): `autoctx trace-findings --trace-id <id>` extends the slice-2 CLI to load a stored `ProductionTrace` by id from `.autocontext/production-traces/ingested/<date>/*.jsonl` (the local data plane that flows through `autoctx production-traces ingest`). `--trace <path>` and `--trace-id <id>` are mutually exclusive input modes; exactly one is required. The workflow adapts ProductionTrace to PublicTrace inline (flatten `source.emitter` -> `sourceHarness`, derive `collectedAt` from `timing.startedAt`, map outcome only when both `score` and `reasoning` are present, copy embedded `toolCalls` per message) so the slice-1 extractor runs unchanged. 5 new tests cover load + Markdown, JSON shape, missing-id error, mutual exclusivity, and the "neither flag" failure case. AC-679 is now substantively feature-complete (criteria 1-8 met); the only deferred work is additional taxonomy categories (slice 3e).
- AC-679 (slice 3d): `WeaknessReport` variant in `ts/src/analytics/trace-findings.ts`. Adds `WeaknessReportSchema` (Zod), `generateWeaknessReport(trace)`, and `renderWeaknessReportMarkdown(report)`. Mirrors Python's `WeaknessReport` shape (recommendation-focused with recovery analysis text) alongside the existing `TraceFindingReport`. Recommendations are one-per-distinct-category, deduplicated, sourced from a fixed `RECOMMENDATION_BY_CATEGORY` table. Recovery analysis is a narrative string composed from the outcome score and weakness count. 8 tests cover schema completeness, generation across the four taxonomy categories, deduplicated recommendations, and Markdown output sections / empty states.
- AC-679 (slice 3c): `renderTraceFindingReportHtml(report)` ships in `ts/src/analytics/trace-findings.ts`. Emits an offline-first self-contained HTML document with an inline `<style>` block, anchored finding rows (`id="finding-<id>"` so external references can link directly), and `data-category` + `data-severity` attributes on each `<li>` for client-side filtering hooks. Mirrors the shape of Python's `render_trace_writeup_html` so operator muscle memory transfers between the two runtimes. User-originated content (titles, descriptions, summary, traceId) is escaped through a single `htmlEscape` helper that handles `& < > " '`. 7 tests cover scaffolding, escaping, anchors, data attributes, empty states, offline-style block, and evidence references.
- AC-679 (slice 3a): cross-runtime TraceFindingReport JSON contract. A shared fixture at `fixtures/cross-runtime/trace-finding-report.json` (at repo root) is the wire-format contract that both Python and TypeScript validate against. Python adds `CrossRuntimeTraceFinding` / `CrossRuntimeFailureMotif` / `CrossRuntimeTraceFindingReport` Pydantic models at `analytics/cross_runtime_trace_findings.py` with camelCase JSON aliases mirroring the TS Zod schema; snake_case kwargs work for ergonomic Python use, `model_dump(by_alias=True)` is the canonical wire form. 9 Python tests + 6 TS tests on the same fixture catch shape/taxonomy/enum drift before a TS-produced report can fail to parse on Python (and vice versa). Closes AC-679 criterion 8 (cross-runtime contract tests catch Python/TS drift).
- AC-679 (slice 2): `autoctx trace-findings --trace <path> [--json]` CLI subcommand wires the slice-1 extractor library into an operator-facing TypeScript command. Reads a PublicTrace JSON file, runs `generateTraceFindingReport`, and emits the report as Markdown (default) or JSON. Handler is pure (`runTraceFindingsCommand(args) -> {stdout, stderr, exitCode}`) so the 11 unit tests drive it directly without subprocess spawn or stdout capture; the top-level `cli/index.ts` shim writes the result. Coupling to the ProductionTrace store (`--trace-id <id>`) and the extra slice-1-deferred taxonomy categories remain follow-up work.
- AC-679 (slice 1): TypeScript trace-finding extractor library at `analytics/trace-findings.ts`. Re-targets AC-679 to operate over `PublicTrace` (the TS data plane primitive) rather than mirroring Python's harness-internal RunTrace shape, so cross-runtime parity lives in the _output_ contract (`TraceFindingReportSchema` Zod schema) rather than the input trace. Slice 1 ships the Zod schemas (`TraceFindingSchema`, `FailureMotifSchema`, `TraceFindingReportSchema`), a four-category taxonomy targeting agent-behavior failures detectable from a PublicTrace (`tool_call_failure`, `agent_refusal`, `low_outcome_score`, `dimension_inconsistency`), pure extractor functions (`extractFindings`, `extractFailureMotifs`, `generateTraceFindingReport`), and `renderTraceFindingReportMarkdown`. Captures the agent-behavior axis that the AC-678 Python slice deferred. CLI subcommand, HTML rendering, additional categories (context loss / error-recovery loops), and cross-runtime fixture parity tests land in follow-up slices.
- AC-678 (slice): `autoctx analytics trace-findings --trace-id <id> [--kind writeup|weakness] [--json]` emits a trace-grounded findings report for a stored `RunTrace`. Exposes the existing `TraceReporter.generate_writeup` / `generate_weakness_report` pipeline as an operator CLI without changing the canonical report model; Markdown body matches the run-end-time writeup artifact. Reuses the `_validated_trace_id` traversal guard from `render-timeline`. Closes the headline AC-678 gap (Python report model existed without a CLI surface); semantic failure-taxonomy mapping beyond the current `event_type` grouping remains open.
- AC-749 (slice): `autoctx analytics render-timeline --trace-id <id> [--output path.html]` renders an existing persisted `RunTrace` as an interactive HTML timeline. On-demand counterpart to the run-end-time renderer that already lives in `loop/trace_artifacts.persist_run_inspection`; reuses the same `timeline_inspection_view` extractor + `render_timeline_inspection_html` view. The rendered HTML now also surfaces a "Generations" section with per-generation failure/recovery counts (data attributes `data-generation-index`, `data-generation-failure-count`, `data-generation-recovery-count` for client-side hooks). The view layer exposes the same `inspect_generation` data the JSON payload already carries -- no new analytics model.
- Harness proposal decisions now require explicit evidence references before heldout/fresh validation can accept or reject a proposal. Missing `--evidence-ref` keeps the durable decision `inconclusive`, and corrupted accepted/rejected proposal JSON with empty `evidenceRefs`, dev-only evidence, or missing baseline evidence is rejected by schema validation.
- Python and TypeScript prompt budgeting now share a domain policy for canonical duplicate-context removal, per-component token caps, protected components, and trim order; semantic compaction also caches repeated component compactions by policy version and content hash.
- AC-727 (slice): `autoctx improve --checkpoint-cmd` runs a user-supplied command after each round to preserve partial progress (e.g. `git -C /repo commit -am 'round checkpoint'` or `cp {file} /tmp/round.lean`). Same `{file}` placeholder semantics as `--verify-cmd`, plus `--checkpoint-suffix` and `--checkpoint-timeout` companions. Unlike the verifier, a checkpoint command's non-zero exit is logged but does NOT veto the round; it surfaces as a new `checkpoint_done(round=N, checkpoint_ok=..., checkpoint_exit_code=...)` event in the `--ndjson` stream. Lets long-running improve loops salvage near-miss artifacts before later rounds overshoot or time out.
- AC-723: the TypeScript CLI now exposes `autoctx agent run <agent>` and `autoctx agent dev` for experimental `.autoctx/agents` handlers. The one-shot runner accepts `--id`, JSON `--payload`, explicit `--env` files with shell env precedence, provider/model overrides for runtime-backed handlers, and `--json` output; the dev server exposes `GET /manifest` and `POST /agents/<name>/invoke`.
- Context-selection analytics reports now include actionable diagnostics for duplicate selected content, low useful-artifact recall, and selected-token bloat.
- Python analytics now includes `autoctx analytics context-selection --run-id <run-id> [--json]` to summarize persisted context-selection artifacts by selected tokens, selection rate, duplicate-content rate, useful-artifact recall, and freshness.
- AC-757: TypeScript control-plane EvalRuns now support `verified` and `experimental` tracks. `autoctx eval attach` accepts `--track verified|experimental`, `eval list --output json` reports the effective track, and promotion decisions reject explicitly experimental EvalRuns as non-promotion evidence.
- AC-758: Candidate artifacts now record deterministic strategy identity metadata: a canonical strategy fingerprint, component fingerprints, parent strategy lineage, and exact/near duplicate assessment. `autoctx candidate register/show` include the metadata, and `candidate list` surfaces the strategy fingerprint and duplicate kind.
- AC-759: Candidate artifacts now quarantine repeated invalid strategies by fingerprint. Re-registering an exact or near duplicate of a disabled/quarantined strategy records `strategyQuarantine`, `candidate list` surfaces `quarantineReason`, promotion decisions reject quarantined strategies, and operational memory skips findings tied to quarantined strategy fingerprints.
- AC-760: EvalRuns can now carry opt-in ablation verification evidence for accepted strategy and harness changes. `autoctx eval attach` accepts `--ablation-verification ./ablation.json`, `promotion decide --require-ablation` records an `ablationVerification` assessment, and `--ablation-targets strategy,harness` narrows the required target coverage.
- AC-680: TypeScript control-plane harness/context changes now have a durable `HarnessChangeProposal` workflow. `autoctx harness proposal create/list/show/decide` records finding lineage, proposed patches, expected impact, rollback criteria, and an evidence-gated decision that accepts only heldout/fresh validation against matching-suite baseline evidence.
- Strategy duplicate and quarantine checks now span all environments for the same scenario/actuator and use `payloadHash` as an exact-match fallback for legacy artifacts without `strategyIdentity`.
- AC-752: `autoctx improve --ndjson` streams per-round events as newline-delimited JSON to stdout for visibility into long-running loops. Event kinds: `round_start`, `judge_done`, `verifier_done` (only when `--verify-cmd` is set), `round_summary`, and a final summary line. Under `--ndjson` the Rich human-readable summary is suppressed so stdout is pure JSON. `--json` and `--ndjson` are mutually exclusive output modes and are rejected up front when both are passed.
- AC-753: the ndjson stream now also emits a `revision_done(round=N, output=<content>)` event right after `round_start` for every round, carrying the exact output the loop is about to evaluate. For round 1 the payload is the seed; for round N>1 it is the result of `task.revise_output()` from round N-1. Lets consumers salvage near-miss verifier-vetoed rounds. Pass `--no-ndjson-include-output` (default `--ndjson-include-output`) to suppress these events when the bulk output is unwanted; that flag drops the `revision_done` event entirely and never writes the output payload anywhere on stdout.
- AC-751: `autoctx improve --claude-max-total-seconds FLOAT` exposes `settings.claude_max_total_seconds` (the wall-clock ceiling on total claude-cli runtime in a single run; env: `AUTOCONTEXT_CLAUDE_MAX_TOTAL_SECONDS`). Only applied when the effectively-resolved judge provider is claude-cli; `judge_provider='auto'` paths that inherit `agent_provider='claude-cli'` are honored. `--timeout` help on `improve` now explicitly names the per-provider setting it writes (`claude_timeout`/`codex_timeout`/`pi_timeout`).
- Python and TypeScript now expose `autoctx worker` to run the existing task queue `TaskRunner` as a daemon or one-shot batch worker, with persistent-host deployment docs for `serve + worker`.
- Added narrow Python/TypeScript task queue store contracts so future hosted storage adapters can provide Postgres-backed claim/complete/fail/enqueue semantics without changing `TaskRunner`.
- Gondolin is documented as a reserved optional microVM sandbox backend, fails closed until a real adapter is configured, and now has public request/policy/backend contracts for out-of-tree adapters.
- TypeScript `autoctx runtime-sessions` now lists, shows, and renders operator-facing timelines for persisted runtime-session event logs from CLI-backed provider runs, including `show --run-id <run-id>` and `timeline --run-id <run-id>` for run-scoped logs; `status`, `show`, and `watch --json` surface a `runtime_session` summary when one exists, MCP exposes the same read surface via `list_runtime_sessions`, `get_runtime_session`, and `get_runtime_session_timeline`, cockpit HTTP clients can read logs and timelines from `/api/cockpit/runtime-sessions`, `/api/cockpit/runtime-sessions/:session_id/timeline`, `/api/cockpit/runs/:run_id/runtime-session`, and `/api/cockpit/runs/:run_id/runtime-session/timeline`, cockpit run list/status/resume payloads include `runtime_session` plus `runtime_session_url` for discovery, the interactive TUI exposes `/timeline <run-id>` for the same grouped view and summarizes live runtime-session activity as it arrives with persisted `/activity` filters, quiet/normal/verbose detail controls, `/activity reset`, read-only bare `/activity` and `/activity status`, and startup readback of loaded activity settings, and `/ws/events` streams live `runtime_session_event` envelopes as runtime-session events are appended.
- Python now has parity readers for runtime-session event logs: a TypeScript-compatible event/store/read-model/timeline layer, cockpit endpoints for listing logs and resolving run-scoped timelines, run list/status/resume discovery fields, and MCP tools `autocontext_list_runtime_sessions`, `autocontext_get_runtime_session`, and `autocontext_get_runtime_session_timeline` with unprefixed aliases.
- Python runtime-backed run and solve role calls now automatically append provider prompts and responses to the run-scoped runtime-session log, preserving runtime failure semantics while making the new Python readers useful without manual recorder wiring.
- Python now exposes a core `RuntimeWorkspaceEnv` contract with local filesystem and in-memory adapters, virtual path resolution, scoped command grants, and explicit cleanup semantics to match the TypeScript runtime workspace boundary.
- TypeScript runtime workspace command grants now expose structured start/end/error observability events, a no-shell local process wrapper with explicit env inheritance, redacted/truncated command output previews, child-task inheritance policy, and scoped command/tool grant types for runtime-session calls without serializing trusted env values into prompts or session logs.
- The canonical concept model now documents durable runtime-session event storage as an `Artifact` model for provider turns, shell/tool activity, child-task lineage, compaction summaries, replay, and the boundary with `RunTrace`/production traces.
- Python and TypeScript runtime-session logs now record semantic compaction ledger writes as `COMPACTION` events with entry ids, component names, ledger paths, and generation metadata for replay timelines; TypeScript records the hook-finalized ledger entries and paths after artifact write hooks run.
- Python and TypeScript now expose explicit runtime-session-to-`RunTrace` adapters for analytics reuse, mapping child-task lineage, command/tool status, and compaction artifact references without copying raw prompts, model responses, stdout/stderr, or arbitrary runtime metadata.

### Fixed

- AC-764 / AC-765: Python and TypeScript Pi CLI runtimes no longer rely on raw `subprocess.run(..., timeout=...)` / `execFileSync(..., { timeout })` cleanup. Both runtimes now isolate `pi --print` in a subprocess/session where supported, kill the full process group on timeout, close inherited stdout/stderr pipes, bound post-kill cleanup to 5s, and preserve timeout metadata (`error: "timeout"`, timeout seconds) for callers. Regression coverage includes process-group kill, interrupted/abnormal cleanup, and leaked-pipe timeout return paths.
- AC-761 / AC-735: claude-cli subprocesses are now hard-killed at their process group on timeout AND on any other abnormal exit (`KeyboardInterrupt`, `SystemExit`, ...). The previous code path used `subprocess.run(..., timeout=...)`, which only `proc.kill()`s the immediate child; claude-cli helper processes that inherit pipe fds kept the post-kill `communicate()` drain open, so a `--timeout 1200` invocation observed at 2h24m alive (AC-761) and `AUTOCONTEXT_CLAUDE_MAX_TOTAL_SECONDS=28800` runs observed at 8h45m (AC-735). The runtime now spawns claude in its own session (`start_new_session=True`) and `os.killpg(pgid, SIGKILL)`s the whole group, with a bounded 5s grace on the post-kill drain. Because `start_new_session=True` also detaches the child from the terminal's signal-delivery group, Ctrl-C / SIGINT no longer reaches the claude process group automatically; the helper's `except BaseException` branch (PR #940 review) ensures interrupted runs still clean up the detached children before re-raising. Wall-clock returns within `claude_timeout + 5s` even when grandchildren hold pipes open. POSIX only; Windows uses `proc.kill()` fallback.
- AC-756: `ImprovementResult.met_threshold` now consistently mirrors the same predicate used by the early-return paths -- the best round both cleared `quality_threshold` and satisfied `dimension_threshold` if one was configured. Previously the fallthrough exit (plateau-stall, unchanged-output, max-rounds, consecutive-failures) hard-coded `met_threshold=False`, so a run that produced above-threshold output via, e.g., a plateau-stall path was flagged as "didn't meet threshold" and could be discarded by automation. The fix tracks `best_dims_ok` alongside `best_score` so the per-dimension gate is honored at fallthrough exits too.
- AC-754: `ImprovementLoop` now peels off an outer markdown code fence (e.g. ` ```lean ... ``` `) when cleaning agent output, so verifiers that compile the output directly (`lake env lean`, `mypy`, `cargo check`, ...) no longer reject otherwise-valid content on the literal fence lines. Applied to both the seed (round 1's input) and the result of every `task.revise_output()` call. The strip is conservative: only the outer wrapper is removed, inner nested fences and unbalanced fences are preserved.
- AC-750: `ImprovementLoop` no longer fires a misleading `max_score_delta` warning when the previous round was zeroed by the external `--verify-cmd` verifier. The loop now tracks `last_unvetoed_score` separately from `prev_valid_score`; the delta check compares against the last legitimate judge score, while plateau detection still treats consecutive verifier vetoes as a stall.
- Runtime-session event stores now preserve existing events when saving stale or partial logs, and the TypeScript timeline pairs repeated child-task completions by child session id before falling back to task aliases.
- Worker commands now clamp concurrency to one for stateful persistent runtimes, and Python runtime-bridge providers close underlying runtimes on shutdown.
- TypeScript task runners now await queue-store methods so hosted Postgres adapters can implement the queue contract asynchronously.
- AC-733..AC-738 batch from the putnam_2013_a5 stress test: `improve` now exposes `--verify-cmd`/`--verify-suffix`/`--verify-timeout` for compile/test gates that can force score=0 and feed stderr back into revision; `solve` accepts `--task-prompt` to bypass the LLM scenario designer (which truncated long Lean/Putnam-style prompts), `--task-file` for file-backed descriptions, `--generations` as an alias for `--gens`, and `-d` short form for `--description`; `--family` typos surface a `did_you_mean` suggestion via the new `FamilyName` value object instead of silently falling through; `AUTOCONTEXT_CLAUDE_TOOLS=""` now renders as a single `--tools=` argv token rather than a stray double-space; and `AUTOCONTEXT_CLAUDE_MAX_TOTAL_SECONDS` (default `0`/off) attaches a `RuntimeBudget` to every settings-driven `ClaudeCLIRuntime` (default agent provider, per-role overrides, and the judge/provider registry path), with retry backoff sleeps bounded by both the per-invocation cap and the attached budget.

### Changed

- Python `autocontext` and TypeScript `autoctx` package metadata are bumped to `0.5.1` for the Pi CLI timeout-hardening release. Follow-up Pi `pi-autocontext` package metadata is bumped to `0.2.5`, its extension imports and peer dependencies are migrated to the Pi 0.74 `@earendil-works/*` / `typebox` package names, and its `autoctx` dependency now requires the hardened `^0.5.1` line.
- Default of `AUTOCONTEXT_CLAUDE_MAX_TOTAL_SECONDS` is now `0` (disabled, opt-in). Set explicitly when you want a wall-clock cap on total Claude CLI runtime; the per-invocation retry cap inside `ClaudeCLIConfig` keeps its 25-minute default for in-process retry sequences.

## [0.5.0] - 2026-05-01

### Added

- Python and TypeScript `autoctx solve` now accept the plain-language goal as a positional argument while keeping `--description` as a named option.
- Python and TypeScript `solve`/`run` commands now accept `--iterations` as the plain-language alias for `--gens`.
- Python and TypeScript `autoctx run <scenario>` now accept a positional scenario while keeping `--scenario` for scripts.
- Python and TypeScript `autoctx export <run-id>` now export knowledge from a specific run while keeping scenario-level export support.
- TypeScript CLI/TUI help now uses the same plain-language run vocabulary, including `status <run-id>`, `show <run-id> --best`, and `watch <run-id>`.
- Python `autoctx hermes inspect` now reads Hermes v0.12 skill usage telemetry and Curator reports without mutating `~/.hermes`, and `autoctx hermes export-skill` emits a first-class Hermes `autocontext` skill that teaches CLI-first workflows with MCP as optional.

### Fixed

- Python installed `autoctx` no longer crashes on no-args startup when packaged banner assets are missing.

### Changed

- Python `autocontext` and TypeScript `autoctx` package metadata are bumped to `0.5.0`.
- Pi `pi-autocontext` package metadata is bumped to `0.2.4`, and its `autoctx` dependency range accepts both the current `0.4.9` package and the upcoming `0.5.0` npm line.

## [0.4.9] - 2026-04-30

### Fixed

- TypeScript `simulate` now uses the schema-evolution scenario designer for schema-evolution prompts and rejects zero-mutation generated specs before persistence (AC-694).
- Python Pi/Pi-RPC budget errors now report the effective bounded role timeout instead of the original unbounded Pi timeout (AC-695).
- RLM sessions can soft-finalize from explicit final-answer tags, cautious natural-language closure cues, and repeated silent no-progress turns, while preserving real inspection progress (AC-696).
- Rubric drift monitoring now flags within-generation mean-versus-best compression and catches slower dimension decline patterns (AC-686).

### Changed

- Python `autocontext` and TypeScript `autoctx` package metadata are bumped to `0.4.9`.
- Pi `pi-autocontext` package metadata is bumped to `0.2.3` while intentionally keeping its `autoctx` dependency one package behind at `^0.4.8`.

## [0.4.8] - 2026-04-30

### Fixed

- TypeScript generated `schema_evolution` scenarios no longer score empty mutation plans as perfect, and generated actions now record mutation lineage before schema-coverage scoring (AC-666).
- Python Claude CLI runtime calls now use bounded timeout retries with exponential backoff, total wall-clock caps, retry metadata, and warning/error logs for long-running live-agent calls (AC-684).
- Python solve now enforces generation budgets across Pi/Pi-RPC role calls, including per-role overrides, and closes one-shot budgeted persistent Pi RPC clients after use (AC-691).
- TypeScript schema-evolution creation now recovers from Pi-style invalid JSON responses with markdown fences, prose wrappers, comments, trailing commas, and camelCase fields (AC-692).
- Python solve JSON/status output now includes resolved scenario-family metadata for stress harnesses and user workflows (AC-693).
- Iterative investigation no longer requires resolving the architect runtime before the first analyst step.
- Task-like solve lifecycle hooks now report persisted generation counts separately from improvement rounds.

### Changed

- Python `autocontext` and TypeScript `autoctx` package metadata are bumped to `0.4.8`.
- Pi `pi-autocontext` package metadata is bumped to `0.2.2` while intentionally keeping its `autoctx` dependency one package behind at `^0.4.7`.

## [0.4.7] - 2026-04-29

### Added

- Python `autoctx export` now accepts `--format pi-package` to write a Pi-local package directory with `package.json`, `SKILL.md`, prompt markdown, and the original autocontext strategy payload.
- Python and TypeScript autocontext now expose Pi-shaped extension hook buses via `AUTOCONTEXT_EXTENSIONS`, covering run/generation lifecycle, context transforms, semantic compaction, provider requests/responses, judge calls, and artifact writes.
- Pi `pi-autocontext` now exposes `autocontext_runtime_snapshot` for run artifacts, package provenance, session branch lineage, and recent event-stream context.
- TypeScript Pi RPC now supports an opt-in persistent runtime via `AUTOCONTEXT_PI_RPC_PERSISTENT=true`, reusing one `pi --mode rpc` subprocess for prompt and live-control calls.
- TypeScript CLI now exposes `autoctx solve` as a DB-backed solve-on-demand entrypoint with `--description`, `--gens`, `--timeout`, and `--json` support (AC-619).
- TypeScript solve now preserves Python-shaped controls for structured family overrides, per-generation runtime-budget enforcement, output file writing, and classifier fallback status metadata (AC-620).

### Fixed

- TypeScript capabilities now report the provider factory support surface and no longer mark the visible `train` command as Python-only (AC-626).
- TypeScript `run` now supports saved custom `agent_task` scenarios through the agent-task improvement runner instead of rejecting scenarios already discoverable in the control plane (AC-625).

### Changed

- Restructured the top-level `README.md`: leads with the Pi runtime quick start, adds an MCP-driven natural-language entry path ("Or Just Talk To Your Agent"), shows a structured artifact tree with concrete `playbook.md` and `trace.jsonl` excerpts, surfaces production-trace capture as its own section, merges the surfaces table with command examples, and adds a short FAQ. Removes redundant "How People Use It" / "Choose An Entry Point" / "Repository Layout" sections (the last is already covered in `AGENTS.md`).
- Bumped subpackage README references from `0.4.4` to `0.4.7` (`autocontext/README.md`, `ts/README.md`) to track the next release line.
- Python `autocontext`, TypeScript `autoctx`, and Pi `pi-autocontext` package metadata are bumped for the release.

## [0.4.6] - 2026-04-23

### Added

- **Browser integration surface** (AC-598–603): Chrome CDP backend for Python (`autocontext.integrations.browser`) and TypeScript (`autoctx/integrations/browser`), wired into investigations and the task queue. Includes a browser exploration contract, cross-runtime validation fixtures, parity enforcement, and selector generation for CDP element refs.
- **A2-III Anthropic integration**: `instrument_client` / `InstrumentedAsyncAnthropic` (Python) and `instrumentClient` (TypeScript) intercept Anthropic SDK calls and route production traces through the autocontext pipeline, with `AnthropicStreamProxy`/`AnthropicStreamProxyAsync` for streaming and `AnthropicTaxonomyMapper` for outcome classification. Available at `autocontext.integrations.anthropic` and `autoctx/integrations/anthropic`. Includes cross-runtime parity (9 fixtures + 50-run property tests), anthropic-python/ts detector plugins, bundle-size enforcement, and zero-telemetry guarantee.
- **Production traces `build-dataset` filters** (AC-606): `--provider`, `--app`, `--env`, and `--outcome` filters on the `build-dataset` CLI and MCP tool, plus an E2E integration test covering OpenAI + Anthropic traces through ingest→build-dataset.
- Hierarchical investigation evidence with evidence cards cache and artifact drill-down hardening.
- Tail context preservation in secondary prompt reducer surfaces.
- Solve runtime floor raised for generated scenarios.

### Fixed

- Provider proxy runtime plumbing centralized into a shared `_shared/proxy-runtime` module so Anthropic and OpenAI integration proxies share consistent lifecycle and error handling (AC-611).
- TypeScript scenario family designers now share response parsing across agent-task, artifact-editing, and tool-fragility families so generated specs preserve family-specific semantics (AC-612).
- Install salt identity invariant preserved across process restarts (AC-609).
- Cross-runtime migration ledger reconciliation so Python and TypeScript DBs stay aligned after schema divergence (AC-608).
- CLI dispatch moved into a command registry so mission routes resolve correctly (AC-610).
- Babel reverse solve designer retries restored and scenario creation stabilized (AC-607).

### Changed

- Python and TypeScript package metadata are bumped to `0.4.6`.

## [0.4.5] - 2026-04-21

### Fixed

- `quality_threshold` auto-heal no longer silently drops below the configured floor during multi-round improvement loops (AC-585).
- Judge-provider inheritance now propagates correctly to nested evaluation calls so role-routing overrides are honored end-to-end (AC-586).
- Claude CLI timeout default bumped from 300 to 600 seconds, reducing spurious failures in longer live-agent solve runs (AC-588).
- Release-sweep accounting hardened to prevent double-counting across concurrent sweep legs.

### Added

- Added a shared browser exploration contract and package-safe configuration surface across Python and TypeScript, including canonical schemas, validation helpers, secure `AUTOCONTEXT_BROWSER_*` defaults, and policy helpers.
- Added the TypeScript Chrome DevTools Protocol backend for browser exploration, including attach-only target discovery, websocket transport, policy-gated actions, and evidence artifacts.
- Added Python browser exploration integration for investigations and queued tasks, including policy-gated snapshot capture, prompt/evidence enrichment, and fail-closed task-runner wiring.
- Added a thin Python Chrome CDP browser backend with debugger-target discovery, evidence persistence, WebSocket transport, runtime factory, and policy-checked session actions.
- Added cross-runtime browser contract fixtures so Python and TypeScript validators stay in lockstep.
- Added TypeScript browser-context integration for investigations, queued tasks, and MCP queueing, including fail-closed navigation policy handling and artifact-backed browser evidence.

## [0.4.4] - 2026-04-20

### Added

- Added the production-traces contract and traffic-to-eval pipeline across Python and TypeScript, including cross-runtime schemas, emit/validate helpers, redaction, retention, dataset building, CLI/MCP surfaces, and golden integration flows.
- Added the TypeScript control-plane `model-routing` actuator plus the published `chooseModel` runtime helper for deterministic route, rollout, guardrail, fallback, and trace-integrated model selection.
- Added Python solve ergonomics for family overrides and improved classifier observability/fallback vocabulary for finance, schema-evolution, geopolitical simulation, and alignment-stress prompts.

### Fixed

- Hardened Python scenario design and solve paths around malformed designer responses, intent-drift retry feedback, mandatory calibration examples, structured quality thresholds, readable sample prompts, and schema/geopolitical simulate routing.
- Preserved the latest control-plane hardening while restacking the production-traces/model-routing foundation, including candidate artifact boundary validation and model-routing payload registration.

### Changed

- Python and TypeScript package metadata are bumped to `0.4.4`.

## [0.4.3] - 2026-04-17

### Fixed

- Hardened Pi-backed solve/runtime execution so Pi RPC waits for assistant completion, honors model/context-file options consistently, and solve runs enforce timeout budgets.
- Preserved generated-scenario family behavior across solve, export, TypeScript `new-scenario`, and `improve` flows, including empty-action family specs and improve calls without an initial output.
- Made custom scenario loading resilient and diagnosable: malformed specs no longer block registry discovery, spec-only directories surface actionable diagnostics, import-time missing files keep their real reason, and non-agent family specs can auto-materialize Python `scenario.py` sources.
- Normalized structured agent-task prompt payloads before validation and code generation, so JSON-like sample inputs, reference context, preparation instructions, and revision prompts no longer crash generated runtimes.

### Changed

- Python and TypeScript package metadata are bumped to `0.4.3`.

## [0.4.2] - 2026-04-16

### Fixed

- Preserved TypeScript workflow and custom-scenario semantics across broader scenario generation, including workflow compensation/side-effect metadata and camelCase final score weights.
- Hardened Python judge, improve, simulate, and list CLI flows around timeout overrides, fresh workspaces, provider overrides, rubric guardrails, and simulation-family routing.
- Added the Python `autoctx investigate` surface with generation fallbacks and kept its CLI implementation below the repository module-size gate.
- Restored Python `autoctx queue add --task-prompt ... --rubric ...` compatibility for prompt-backed queued tasks, including direct ad hoc queueing without a saved spec name.

### Changed

- Python and TypeScript package metadata are bumped to `0.4.2`.

## [0.4.1] - 2026-04-14

### Fixed

- Restored operator-loop escalation accounting when explicit escalation actions also mention clarification, so generated Python scenarios preserve both escalation and clarification signals.
- Preserved operator-loop family routing through Python solve creation and replay-safe feedback validation without violating the Pydantic serialization convention.
- Routed TypeScript `new-scenario` operator-loop requests through the dedicated family designer and allowed generated operator-loop scenarios to execute through the solve codegen path.
- Python and TypeScript package metadata are bumped to `0.4.1`.

## [0.4.0] - 2026-04-14

### Changed

- Refactored the TypeScript platform foundation, analytics/trace/training, and control-plane integration surfaces into thinner workflow modules while preserving CLI, MCP, and package parity.
- Hardened the extracted package-surface workflows around typed MCP tool boundaries, simulation dashboard report parsing, and deterministic simulation score normalization.
- Python and TypeScript package metadata are bumped to `0.4.0`.

## [0.3.7] - 2026-04-08

### Added

- TypeScript `autoctx campaign` CLI with create, status, list, add-mission, progress, pause, resume, and cancel subcommands, completing the CLI surface for CampaignManager (AC-533).
- Campaign API endpoints and MCP tools for multi-mission coordination with budget tracking and dependency graphs.

### Changed

- Standardized Anthropic credential loading around `ANTHROPIC_API_KEY` while keeping `AUTOCONTEXT_ANTHROPIC_API_KEY` as a compatibility alias across Python and TypeScript settings.
- Added optional role-scoped credential and endpoint overrides (`AUTOCONTEXT_{ROLE}_API_KEY`, `AUTOCONTEXT_{ROLE}_BASE_URL`) for `competitor`, `analyst`, `coach`, and `architect`, falling back to the global provider configuration when unset.

### Fixed

- Python `autoctx simulate` now resolves live generation through the effective architect-role runtime surface, so `AUTOCONTEXT_ARCHITECT_PROVIDER` and other role-routing overrides are honored instead of being bypassed by the raw client builder.
- Python simulation spec normalization now tolerates LLM-friendly action/spec shapes such as `postconditions`, nested criteria objects, and extra action-planning metadata without failing code generation.
- Structured simulation preconditions now preserve referenced action ids when LLM output includes both an `action` field and human-readable prose, so generated dependencies remain executable.
- Regenerating a custom scenario with the same name in one process now force-reloads the generated module so `solve` and creator validation do not reuse stale scenario classes from `sys.modules`.
- Pi-backed live flows now default to a 300 second timeout, reducing spurious failures in longer `solve` runs.
- Public docs now describe `operator-in-the-loop` as a runnable family and no longer contradict the executable tests.

## [0.3.6] - 2026-04-07

### Changed

- Hardened bootstrap, evidence, and privacy handling so environment snapshots redact shell paths correctly, rematerialized workspaces do not retain stale artifacts, and live prompt/evidence flows now wire the collected snapshot and evidence manifest into the real loop.
- Tightened scenario-generation safety in the TypeScript surface so `operator_loop` validation requires its real escalation/clarification hooks and spec auto-heal preserves punctuation-heavy precondition dependencies instead of dropping valid ordering.
- Improved evidence and security backstops by failing closed on TruffleHog execution errors and making the evidence workspace/MCP integration rely on a materialized runtime workspace instead of dead helper-only paths.
- Hardened blob-store backends so local keys cannot escape the configured root and Hugging Face bucket metadata/list/delete behavior remains accurate across fresh process boundaries.
- Python and TypeScript package metadata are bumped to `0.3.6`.

## [0.3.5] - 2026-04-06

### Changed

- Stabilized the post-`0.3.4` simulation path so operator-loop scenarios preserve behavioral-contract signals across multi-run, sweep, and replay flows instead of silently dropping them.
- Hardened plain-language simulation execution around explicit family detection, operator-loop contract enforcement, and shared CLI engine-result handling so incomplete runs surface consistently across Python and TypeScript surfaces.
- Tightened the simulation-engine implementation without regressing the repo module-size guardrail, including the compatibility shim needed by existing abstract-class filtering tests.
- Python and TypeScript package metadata are bumped to `0.3.5`.

## [0.3.4] - 2026-04-04

### Changed

- Added action-label and living-docs surfaces to the operator workflow, including reviewer-driven cleanup on the action-label taxonomy and living-docs maintenance path.
- Landed the TypeScript/Python parity tranche for session store and the full research package, keeping the rebased cross-surface runtime behavior aligned on current `main`.
- Folded in the `pi-autocontext` polish follow-up so the published Pi package line reflects the renamed extension and its best-practices cleanup.
- Python and TypeScript package metadata are bumped to `0.3.4`.

## [0.3.3] - 2026-04-03

### Changed

- Expanded the research surface with validated domain contracts, runtime gating, persistence hardening, and better evaluation wiring for briefs, prompts, and adapters.
- Hardened Python and TypeScript operator-control surfaces around terminal lifecycle transitions, remote approvals, progress digests, and agentOS session/runtime error handling.
- Improved SQLite bootstrap and migration compatibility so packaged installs and fresh databases stay aligned with the live generation schema.
- Expanded the TypeScript provider compatibility surface with env-driven config for `gemini`, `mistral`, `groq`, `openrouter`, and `azure-openai`, and synced the public provider docs/tests to match.
- Python and TypeScript package metadata are bumped to `0.3.3`.

## [0.3.2] - 2026-04-02

### Changed

- Completed the TypeScript session-runtime parity pass across lifecycle management, coordinator state transitions, supervision, context pressure, remote approvals, progress digests, memory consolidation, and skill registry behavior.
- Hardened the TypeScript operator control plane so terminal session and worker states stay terminal, remote approvals require connected controllers, and redirected work remains visible in progress summaries.
- Python and TypeScript package metadata are bumped to `0.3.2`.

## [0.3.1] - 2026-04-01

### Changed

- Python package publishing now uses the canonical PyPI name `autocontext` instead of `autoctx`.
- Public install docs now reflect the package split accurately: PyPI is `autocontext`, while npm remains `autoctx`.
- Python and TypeScript package metadata are bumped to `0.3.1`.

## [0.3.0] - 2026-03-29

### Added

#### Commands

- **`autoctx simulate`** — plain-language multi-variable simulation with sweeps, replay, compare, and export.
- **`autoctx investigate`** — evidence-driven diagnosis with hypotheses, confidence scoring, and unknowns.
- **`autoctx analyze`** — interpret and compare runs, simulations, investigations, and missions.
- **`autoctx train`** — train distilled models from curated datasets with backend selection.
- **Python `autoctx simulate`** — full parity with the TypeScript surface: run, replay, compare, and export.

#### Scenarios

- All 11 scenario families now fully executable in TypeScript (was 2/11) via secure-exec V8 isolate codegen.
- `operator_loop` is now a fully runnable family in both packages.
- Unified family classifier: all families reachable through the CLI.
- Spec auto-heal: codegen failures trigger automatic recovery.
- Scenario revision flow: refine created scenarios with feedback.
- Deep execution validation: generated code is executed and verified before registration.
- Three scenario templates: content-generation, prompt-optimization, and rag-accuracy.
- `new-scenario` CLI materializes runnable artifacts to disk.
- Scenario parity matrix documents Python/TypeScript surface coverage.

#### Missions & Campaigns

- Adaptive mission execution: LLM-driven goal decomposition and step planning replaces generic bookkeeping.
- Campaign abstraction: coordinate multiple missions under long-term goals with budget tracking and dependencies.
- Mission-simulation integration: missions invoke simulations as planning tools.

#### Trace Pipeline

- Open public trace schema v1.0.0: versioned interchange format for coding agent traces.
- Sensitive-data detection and redaction with policy-backed actions.
- Privacy-aware trace export workflow: redact, validate, manifest, and attestation.
- Publishing connectors for local JSONL, GitHub Gist, and Hugging Face.
- Trace-to-model data plane with `DatasetCurator` and `DataPlane`.
- Repo-local dataset discovery: scan repo trees and convert JSONL, JSON, CSV, and markdown into ShareGPT-style records.
- Curated distillation dataset pipeline with gate filtering, top-quartile selection, family filtering, and failure-example policy.

#### Training & Distillation

- Base model selection maps scenario families to training modes (from-scratch, LoRA, and full fine-tune).
- Training backend abstraction with MLX and CUDA plus an injectable `TrainingExecutor` hook.
- Prompt alignment ensures distilled models match runtime invocation.
- Candidate-shadow-active promotion lifecycle with configurable quantitative gates and rollback.

### Changed

- Consolidated operator UI: the Python `serve` and `tui` surfaces are API/WebSocket-first, while interactive terminal UI remains available through the TypeScript client surfaces.
- Richer sweep DSL: categorical sweeps, logarithmic scales, sweep file loading, and named presets.

### Fixed

- Trace pipeline audit: expanded redaction patterns, ISO 8601 timestamp validation, explicit role mapping, export warnings, and Hugging Face format fixes.
- Distillation audit: training executor hook, base model validation, CSV parser edge cases, silent catches now surfaced as warnings, and end-to-end integration coverage.

## [0.2.4] - 2026-03-26

### Added

- Session notebook context now flows into runtime prompts and cockpit views for active runs.
- World-state abstractions now support stateful scenario families and workflow-style scenarios.

### Changed

- Agent-task scaffolding and execution now use separate phased budgets.
- Operator-loop scenarios remain available as typed family metadata, but executable operator-loop scaffolding has been removed so the harness no longer bakes in escalation-specific runtime behavior.
- Public repo docs now include a docs landing page, package-selection guidance, an analytics/adoption guide, a release checklist, and copy-paste integration examples for CLI, MCP, Python SDK, and TypeScript usage.

### Fixed

- Python package fallback version metadata now matches the published `0.2.0` package version.

## [0.2.0] - 2026-03-15

### Added

- Initial public release with Python and TypeScript packages.
- Generation loop with Elo-based progression gating.
- Agent roles: competitor, analyst, coach, architect, and curator.
- Pluggable scenarios including `grid_ctf`, `othello`, and the custom creation pipeline.
- LLM judge with multi-sample evaluation.
- Task runner daemon with improvement loops.
- MCP server with tool implementations.
- FastAPI dashboard with WebSocket events.
- CLI via Typer (Python) and `parseArgs` (TypeScript).

[Unreleased]: https://github.com/greyhaven-ai/autocontext/compare/py-v0.5.0...HEAD
[0.5.0]: https://github.com/greyhaven-ai/autocontext/compare/py-v0.4.9...py-v0.5.0
[0.4.9]: https://github.com/greyhaven-ai/autocontext/compare/py-v0.4.8...py-v0.4.9
[0.4.8]: https://github.com/greyhaven-ai/autocontext/compare/py-v0.4.7...py-v0.4.8
[0.4.7]: https://github.com/greyhaven-ai/autocontext/compare/py-v0.4.6...py-v0.4.7
[0.4.6]: https://github.com/greyhaven-ai/autocontext/compare/py-v0.4.5...py-v0.4.6
[0.4.5]: https://github.com/greyhaven-ai/autocontext/compare/py-v0.4.4...py-v0.4.5
[0.4.4]: https://github.com/greyhaven-ai/autocontext/compare/py-v0.4.3...py-v0.4.4
[0.4.3]: https://github.com/greyhaven-ai/autocontext/compare/py-v0.4.2...py-v0.4.3
[0.4.2]: https://github.com/greyhaven-ai/autocontext/compare/py-v0.4.1...py-v0.4.2
[0.4.1]: https://github.com/greyhaven-ai/autocontext/compare/py-v0.4.0...py-v0.4.1
[0.4.0]: https://github.com/greyhaven-ai/autocontext/compare/py-v0.3.7...py-v0.4.0
[0.3.7]: https://github.com/greyhaven-ai/autocontext/compare/py-v0.3.6...py-v0.3.7
[0.3.6]: https://github.com/greyhaven-ai/autocontext/compare/py-v0.3.5...py-v0.3.6
[0.3.5]: https://github.com/greyhaven-ai/autocontext/compare/py-v0.3.4...py-v0.3.5
[0.3.4]: https://github.com/greyhaven-ai/autocontext/compare/py-v0.3.3...py-v0.3.4
[0.3.3]: https://github.com/greyhaven-ai/autocontext/compare/py-v0.3.2...py-v0.3.3
[0.3.2]: https://github.com/greyhaven-ai/autocontext/compare/py-v0.3.1...py-v0.3.2
[0.3.1]: https://github.com/greyhaven-ai/autocontext/compare/py-v0.3.0...py-v0.3.1
[0.3.0]: https://github.com/greyhaven-ai/autocontext/compare/py-v0.2.4...py-v0.3.0
[0.2.4]: https://github.com/greyhaven-ai/autocontext/compare/v0.2.0...py-v0.2.4
[0.2.0]: https://github.com/greyhaven-ai/autocontext/releases/tag/v0.2.0


================================================
FILE: CLAUDE.md
================================================
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Project Overview

autocontext is an iterative strategy generation and evaluation system. It runs a multi-agent loop where LLM agents collaboratively evolve strategies for pluggable scenarios, scoring them through tournament matches (game scenarios) or LLM judge evaluation (agent task scenarios) with Elo-based progression gating.

## Repository Layout

The Python package lives under `autocontext/` (not the repo root). All `uv`, `pytest`, and `autoctx` CLI commands must be run from the `autocontext/` directory.

```
autocontext/                  # Python package root (pyproject.toml lives here)
  src/autocontext/            # Source code
    agents/                   # LLM agent roles (competitor, analyst, coach, architect, curator)
    knowledge/                # Knowledge processing (trajectory builder, skill export, search, solve-on-demand)
    loop/                     # Generation runner, event emitter
    prompts/                  # Prompt template assembly
    config/                   # Pydantic settings from AUTOCONTEXT_* env vars
    storage/                  # SQLiteStore, ArtifactStore
    scenarios/                # Pluggable scenarios (grid_ctf, othello, custom/, agent tasks)
      custom/               # Natural-language → generated scenario pipeline (spec, codegen, validation, loading)
                            # Also: agent task pipeline (agent_task_designer, agent_task_codegen, agent_task_validator, agent_task_creator)
    execution/                # Execution supervisor, local/remote executors, LLM judge, task runner daemon
    providers/                # Multi-model LLM provider abstraction (Anthropic, OpenAI-compat, callable wrapper)
    notifications/            # Notification webhooks (Slack, HTTP, stdout, callback, composite)
    runtimes/                 # Agent runtime abstraction (Claude CLI, direct API)
    rlm/                      # REPL-loop mode (optional analyst/architect)
    mcp/                      # MCP server, tool implementations, sandbox manager
    server/                   # FastAPI dashboard + WebSocket events
  tests/                      # Pytest tests (~2800 tests)
  migrations/                 # SQLite migration SQL files (001-007, applied in filename order)
  dashboard/                  # Single-page HTML dashboard
  knowledge/                  # Runtime-generated: per-scenario playbooks, analysis, tools, hints, snapshots
  skills/                     # Runtime-generated: operational skill notes per scenario
  runs/                       # Runtime-generated: SQLite DB, event stream, generation artifacts
ts/                           # TypeScript package (autoctx on npm)
  src/                        # Source code
    scenarios/                # Scenario families, codegen, templates, materialization
      codegen/                # V8 isolate code generation for all 11 families (AC-436)
      templates/              # Pre-built scenario templates (AC-443)
    simulation/               # SimulationEngine: run, replay, compare, export, sweep DSL (AC-446)
    investigation/            # InvestigationEngine: evidence-driven diagnosis (AC-447)
    analysis/                 # AnalysisEngine: interpret and compare artifacts (AC-448)
    mission/                  # MissionManager, planner, adaptive executor, campaigns (AC-410, AC-435, AC-428)
    traces/                   # Public trace schema, redaction, export, publishers, data plane (AC-462–466)
    training/                 # Model strategy, backends (MLX/CUDA), prompt alignment, promotion (AC-456–460)
    mcp/                      # MCP server with tool implementations
    cli/                      # CLI entry point with all commands
  tests/                      # Vitest tests (1600+ tests)
  migrations/                 # Shared SQLite migration SQL (cross-compatible with Python)
pi/                           # Pi coding agent extension (@autocontext/pi)
  src/                        # Extension with 5 tools (judge, improve, status, scenarios, queue)
  skills/                     # Autocontext skill for Pi
  prompts/                    # Prompt templates for Pi
infra/                        # Docker, Fly.io config, bootstrap script
scripts/                      # Top-level convenience scripts (demo.sh)
.claude/                      # Claude context, implementation plans, synced skill symlinks
```

## Commands

All commands run from the `autocontext/` directory:

```bash
# Setup
uv venv && source .venv/bin/activate && uv sync --group dev

# Setup with Monty sandbox support (optional)
uv sync --group dev --extra monty

# Lint and type check
uv run ruff check src tests
uv run mypy src

# Tests
uv run pytest                              # all tests
uv run pytest tests/test_elo.py            # single file
uv run pytest tests/test_elo.py -k "test_name"  # single test

# Run (deterministic/offline mode)
AUTOCONTEXT_AGENT_PROVIDER=deterministic uv run autoctx run --scenario grid_ctf --gens 3 --run-id my_run

# Run (live Anthropic mode)
AUTOCONTEXT_AGENT_PROVIDER=anthropic AUTOCONTEXT_ANTHROPIC_API_KEY=... uv run autoctx run --scenario grid_ctf --gens 1

# Run (Agent SDK mode — agents use native tool loops)
AUTOCONTEXT_AGENT_PROVIDER=agent_sdk AUTOCONTEXT_ANTHROPIC_API_KEY=... uv run autoctx run --scenario grid_ctf --gens 3

# Run (RLM mode — REPL-loop agents for analyst/architect)
AUTOCONTEXT_AGENT_PROVIDER=deterministic AUTOCONTEXT_RLM_ENABLED=true uv run autoctx run --scenario grid_ctf --gens 3 --run-id rlm_run

# Run (Monty sandbox executor — pydantic-monty interpreter)
AUTOCONTEXT_AGENT_PROVIDER=deterministic AUTOCONTEXT_EXECUTOR_MODE=monty uv run autoctx run --scenario grid_ctf --gens 3

# Run (RLM with Monty backend — sandboxed REPL)
AUTOCONTEXT_AGENT_PROVIDER=deterministic AUTOCONTEXT_RLM_ENABLED=true AUTOCONTEXT_RLM_BACKEND=monty uv run autoctx run --scenario grid_ctf --gens 3

# Run (Pi CLI — local Pi agent runtime)
AUTOCONTEXT_AGENT_PROVIDER=pi AUTOCONTEXT_PI_COMMAND=pi uv run autoctx run --scenario grid_ctf --gens 3

# Run (Pi RPC — remote Pi agent via HTTP)
AUTOCONTEXT_AGENT_PROVIDER=pi-rpc AUTOCONTEXT_PI_RPC_ENDPOINT=http://localhost:3284 uv run autoctx run --scenario grid_ctf --gens 3

# Ecosystem mode (alternate providers across cycles, shared knowledge directory)
uv run autoctx ecosystem --scenario grid_ctf --cycles 3 --gens-per-cycle 2 \
  --provider-a anthropic --provider-b agent_sdk --rlm-a --no-rlm-b

# Other CLI commands
uv run autoctx list                            # list recent runs
uv run autoctx status <run_id>                 # generation-level status
uv run autoctx replay <run_id> --generation 1  # print replay JSON
uv run autoctx benchmark --scenario grid_ctf --runs 5
uv run autoctx serve --host 127.0.0.1 --port 8000  # dashboard + API

# MCP server (stdio, for Claude Code integration)
uv run autoctx mcp-serve

# Bootstrap + demo from repo root
bash infra/scripts/bootstrap.sh
bash scripts/demo.sh
```

## Architecture

### Generation Loop (`loop/generation_runner.py`)

Each generation: load scenario + knowledge → build score trajectory → orchestrate agents (competitor first, analyst/coach/architect in parallel, optional curator) → tournament matches with Elo → backpressure gate (`advance`/`retry`/`rollback`) → curator quality gate (`accept`/`reject`/`merge`) → persist to SQLite + artifacts → periodic lesson consolidation → cross-run snapshot on completion. Runs are idempotent; playbook updates only persist on `advance`.

### Agent Roles (`agents/`)

- **Competitor** — Produces JSON strategy (or executable Python code when `AUTOCONTEXT_CODE_STRATEGIES_ENABLED=true`)
- **Translator** — Extracts structured strategy from competitor output
- **Analyst** — Produces markdown analysis (Findings, Root Causes, Recommendations)
- **Coach** — Updates the accumulated playbook; output delimited by `<!-- PLAYBOOK_START/END -->`, `<!-- LESSONS_START/END -->`, `<!-- COMPETITOR_HINTS_START/END -->`
- **Architect** — Proposes tooling improvements, persists generated tools to `knowledge/<scenario>/tools/`
- **Curator** — Quality gate for playbook updates + lesson consolidation; uses `<!-- CURATOR_DECISION: accept|reject|merge -->` markers

Agent SDK provider (`AUTOCONTEXT_AGENT_PROVIDER=agent_sdk`) uses `claude_agent_sdk.query()` with native tool loops and per-role tool permissions.

### Providers (`providers/`)

Pluggable LLM providers: `AnthropicProvider`, `OpenAICompatibleProvider` (vLLM, Ollama), `CallableProvider` (testing), `RetryProvider` (decorator with exponential backoff). Factory: `create_provider()` / `get_provider(settings)`. Controlled by `AUTOCONTEXT_JUDGE_PROVIDER`.

### RLM — REPL-Loop Mode (`rlm/`)

Optional (`AUTOCONTEXT_RLM_ENABLED=true`): replaces single-shot analyst/architect with multi-turn REPL sessions. `RlmSession` drives conversation loops, `ReplWorker` provides a sandboxed Python REPL, `MontyReplWorker` is an alternative backend (`AUTOCONTEXT_RLM_BACKEND=monty`).

### Scenarios (`scenarios/`)

Dual-interface registry (`SCENARIO_REGISTRY` in `scenarios/__init__.py`):
- **Game scenarios** — `ScenarioInterface` ABC (`execute_match`, `describe_rules`, etc.). Built-in: `grid_ctf`, `othello`.
- **Agent task scenarios** — `AgentTaskInterface` ABC (`evaluate_output`, `get_task_prompt`, `revise_output`, etc.). Evaluated by LLM judge.

Code accessing the registry uses `hasattr`/`getattr` guards for the dual-interface pattern.

**Custom creation** (`scenarios/custom/`): natural-language → LLM designer → spec → codegen → validation → dynamic loading → registration. Both game scenarios and agent tasks have parallel pipelines. Persisted to `knowledge/_custom_scenarios/`.

### Execution (`execution/`)

- **LocalExecutor** — Subprocess execution with timeout/memory limits
- **PrimeIntellectExecutor** — Remote sandbox via PrimeIntellect SDK
- **MontyExecutor** — Sandboxed via pydantic-monty (`AUTOCONTEXT_EXECUTOR_MODE=monty`); supports JSON and code strategies
- **LLMJudge** — Multi-sample LLM evaluation with 4-tier fallback parser for score extraction
- **JudgeExecutor** — Runs context preparation + validation before judge evaluation
- **ImprovementLoop** — Multi-step evaluate→revise loop with parse-failure resilience
- **TaskRunner** — Daemon polling SQLite task queue, runs `ImprovementLoop` per task

### Knowledge System (`knowledge/`)

Per-scenario directory (`knowledge/<scenario>/`) stores: `playbook.md` (versioned, with rollback), `hints.md` (coach hints, persist across restarts), `analysis/gen_N.md`, `tools/` (architect-generated, old versions in `_archive/`), `snapshots/<run_id>/` (cross-run inheritance), `_custom_scenarios/`, `_agent_tasks/`. Score trajectory is injected into all agent prompts. Curator periodically consolidates lessons.

**Knowledge API** (`knowledge/export.py`, `search.py`, `solver.py`): skill export as portable markdown+JSON packages, TF-IDF strategy search, solve-on-demand. Exposed via MCP tools (`autocontext_*` prefix — see `mcp/server.py`) and REST under `/api/knowledge/`.

### Storage, Server, MCP

- **SQLiteStore** / **ArtifactStore** — SQLite for structured data (runs, generations, matches, feedback, task queue; migrations 001-007), filesystem for artifacts (playbooks, tools, snapshots). Skill notes synced to `.claude/skills/` via symlinks.
- **FastAPI** (`server/app.py`) — REST + WebSocket for runs, knowledge API, scenario creation, event streaming.
- **MCP server** (`mcp/`) — Stdio-based; `tools.py` (pure sync) + `server.py` (`@server.tool()` wrappers). CLI: `uv run autoctx mcp-serve`.
- **Ecosystem** (`loop/ecosystem_runner.py`) — Alternates provider modes across cycles sharing the knowledge directory.
- **Notifications** (`notifications/`) — Stdout, HTTP, Slack, callback, composite notifiers for task runner events.

## Configuration

All config via `AUTOCONTEXT_*` env vars, loaded in `config/settings.py` as Pydantic `AppSettings`. See that file for the full list. Key groups:

- **Provider**: `AUTOCONTEXT_AGENT_PROVIDER` (`deterministic`/`anthropic`/`agent_sdk`/`pi`/`pi-rpc`/`openai`/`ollama`/`vllm`), `AUTOCONTEXT_MODEL_*` (per-role model selection)
- **Execution**: `AUTOCONTEXT_EXECUTOR_MODE` (`local`/`primeintellect`/`monty`), `AUTOCONTEXT_MATCHES_PER_GENERATION`, `AUTOCONTEXT_CODE_STRATEGIES_ENABLED`
- **Loop tuning**: `AUTOCONTEXT_BACKPRESSURE_MIN_DELTA`, `AUTOCONTEXT_MAX_RETRIES`, `AUTOCONTEXT_ARCHITECT_EVERY_N_GENS`
- **Curator**: `AUTOCONTEXT_CURATOR_ENABLED`, `AUTOCONTEXT_CURATOR_CONSOLIDATE_EVERY_N_GENS`, `AUTOCONTEXT_SKILL_MAX_LESSONS`
- **Knowledge**: `AUTOCONTEXT_CROSS_RUN_INHERITANCE`, `AUTOCONTEXT_PLAYBOOK_MAX_VERSIONS`, `AUTOCONTEXT_ABLATION_NO_FEEDBACK`
- **RLM**: `AUTOCONTEXT_RLM_ENABLED`, `AUTOCONTEXT_RLM_BACKEND`, `AUTOCONTEXT_RLM_MAX_TURNS`, `AUTOCONTEXT_RLM_SUB_MODEL`
- **Judge**: `AUTOCONTEXT_JUDGE_PROVIDER`, `AUTOCONTEXT_JUDGE_MODEL`, `AUTOCONTEXT_JUDGE_SAMPLES`, `AUTOCONTEXT_JUDGE_TEMPERATURE`, `AUTOCONTEXT_JUDGE_BASE_URL`, `AUTOCONTEXT_JUDGE_API_KEY`
- **Pi**: `AUTOCONTEXT_PI_COMMAND`, `AUTOCONTEXT_PI_TIMEOUT`, `AUTOCONTEXT_PI_WORKSPACE`, `AUTOCONTEXT_PI_MODEL`
- **Pi RPC**: `AUTOCONTEXT_PI_RPC_ENDPOINT`, `AUTOCONTEXT_PI_RPC_API_KEY`, `AUTOCONTEXT_PI_RPC_SESSION_PERSISTENCE`
- **Notifications**: `AUTOCONTEXT_NOTIFY_WEBHOOK_URL`, `AUTOCONTEXT_NOTIFY_ON`

## Code Style

- Python 3.11+, managed with `uv` and `hatchling` build backend
- Ruff for linting (rules: E, F, I, B, UP), line length 130
- Mypy with `disallow_untyped_defs`, excludes tests and migrations
- Dataclasses with `slots=True` for value types, Pydantic `BaseModel` for validated models
- CLI via Typer, Rich for terminal output

## CI

GitHub Actions (`.github/workflows/ci.yml`) runs: ruff check, mypy, pytest, deterministic smoke runs for both scenarios (`grid_ctf` 3 gens, `othello` 1 gen), and dashboard API health check. A separate `primeintellect-live` job runs when secrets are available. Monty-specific tests (`test_monty_*.py`) are skipped in CI when pydantic-monty is not installed (`pytest.mark.skipif`).

## TypeScript Package (`ts/`)

Published as `autoctx` on npm. ESM-only, strict TypeScript, Node.js >=18.

```bash
cd ts
npm install
npm run lint          # tsc --noEmit
npm test              # vitest run (1600+ tests)
npm run build         # tsc (outputs to dist/)

# Core commands
autoctx run --scenario grid_ctf --gens 3
autoctx judge -p <task-prompt> -o <agent-output> -r <rubric>
autoctx improve -p <task-prompt> -o <initial-output> -r <rubric>

# Execution surfaces
autoctx simulate -d "simulate a deployment pipeline with rollback"
autoctx simulate --replay <id> --variables threshold=0.9
autoctx simulate --compare-left sim_a --compare-right sim_b
autoctx investigate -d "why did conversion drop after the release"
autoctx analyze --id <artifact-id> --type simulation
autoctx analyze --left <id> --right <id> --type simulation

# Missions
autoctx mission create --name "Ship OAuth" --goal "Implement login"
autoctx mission run --id <mission-id>

# Training
autoctx train --scenario grid_ctf --dataset train.jsonl --backend cuda

# Scenario management
autoctx new-scenario --description "test error handling in APIs"
autoctx new-scenario --template content-generation --name my_task

# Infrastructure
autoctx serve              # HTTP API server (REST + WebSocket)
autoctx tui                # Interactive terminal UI
autoctx mcp-serve          # MCP server on stdio
```

Environment variables: `ANTHROPIC_API_KEY` (required for LLM features), `AUTOCONTEXT_MODEL` (default `claude-sonnet-4-20250514`), `AUTOCONTEXT_DB_PATH` (default `./autocontext.db`).

Mirrors and extends the Python architecture. Migrations in `ts/migrations/` are cross-compatible with Python.


================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Code of Conduct

## Our Standard

We want autocontext to be a professional, constructive project for contributors, users, and maintainers. Participants are expected to communicate clearly, stay respectful, and keep technical disagreement focused on the work.

Examples of behavior that contribute to a positive environment:

- giving actionable, technically grounded feedback
- assuming good intent while still being rigorous
- documenting tradeoffs and decisions clearly
- respecting different experience levels and backgrounds
- accepting responsibility and correcting mistakes quickly

Examples of unacceptable behavior:

- harassment, discrimination, or intimidation
- personal attacks, insults, or hostile language
- publishing private information without permission
- deliberately disruptive conduct in issues, discussions, reviews, or chats
- bad-faith technical obstruction

## Scope

This Code of Conduct applies within project spaces and in public spaces when someone is representing the project. That includes GitHub issues, pull requests, discussions, documentation, and project-linked communication channels.

## Enforcement

Maintainers may remove, edit, or reject comments, commits, code, issues, and other contributions that violate this Code of Conduct. They may also temporarily or permanently restrict participation for repeated or severe violations.

## Reporting

For conduct concerns, contact the maintainers through the process described in [SUPPORT.md](SUPPORT.md). If the report concerns a maintainer, say so explicitly and it will be handled separately.

## Attribution

This document is adapted from the Contributor Covenant, version 2.1:
[https://www.contributor-covenant.org/version/2/1/code_of_conduct/](https://www.contributor-covenant.org/version/2/1/code_of_conduct/)


================================================
FILE: CONTRIBUTING.md
================================================
# Contributing

## Setup

Python work happens in `autocontext/`:

```bash
cd autocontext
uv venv
source .venv/bin/activate
uv sync --group dev
```

Optional extras:

```bash
uv sync --group dev --extra mcp
uv sync --group dev --extra mlx
uv sync --group dev --extra monty
```

TypeScript work happens in `ts/`:

```bash
cd ts
npm install
```

## Common Checks

Python:

```bash
cd autocontext
uv run ruff check src tests
uv run mypy src
uv run pytest
```

TypeScript:

```bash
cd ts
npm run lint
npm test
```

TUI-related TypeScript work:

```bash
cd ts
npm install
npm test
```

## Repo Map

- `autocontext/`: Python package, CLI, API server, and tests
- `ts/`: published TypeScript package, Node CLI, MCP server, and bundled Ink terminal UI
- `scripts/`: repo maintenance and protocol generation helpers

## Development Notes

- The Python package name and CLI are `autocontext` / `autoctx`.
- Environment variables use the `AUTOCONTEXT_` prefix.
- Prefer targeted tests for touched modules before running full suites.
- Keep protocol changes in sync with `scripts/generate_protocol.py`.
- Avoid rewriting historical plan docs unless the change is user-facing or release-facing.

## Documentation Touch Points

When a change affects public commands, environment variables, package names, or agent-facing workflows, update the relevant docs in the same PR:

- `README.md`
- `docs/README.md`
- `autocontext/README.md`
- `ts/README.md`
- `examples/README.md`
- `autocontext/docs/agent-integration.md`
- `AGENTS.md`
- `CHANGELOG.md`

## Releases

Publishing is split by package and uses GitHub OIDC trusted publishing rather than long-lived PyPI or npm tokens.

- Python publishes through `.github/workflows/publish-python.yml`
  - tag trigger: `py-v<version>`
  - manual trigger: `workflow_dispatch` from `main`
  - environment: `publish-python`
- TypeScript publishes through `.github/workflows/publish-ts.yml`
  - tag trigger: `ts-v<version>`
  - manual trigger: `workflow_dispatch` from `main`
  - environment: `publish-ts`
- Pi extension publishes through `.github/workflows/publish-pi-autocontext.yml`
  - tag trigger: `pi-v<version>`
  - manual trigger: `workflow_dispatch` from `main`
  - environment: `publish-pi-autocontext`

Release notes:

- Keep the GitHub environment branch/tag policy restricted to `main` and the matching tag namespace.
- The trusted publisher registration in PyPI and npm must match the repo, workflow filename, and environment name exactly.
- No `NPM_TOKEN`, `NODE_AUTH_TOKEN`, or PyPI API token should be required for the publish jobs.
- After cutover, remove the old combined `.github/workflows/publish.yml` publisher registration from PyPI and npm.

## Type System Conventions

### ABC vs Protocol

- **ABC** — for internal class hierarchies where subclasses share implementation via inheritance (e.g., `ScenarioInterface`, `LLMProvider`, `AgentRuntime`, `Notifier`)
- **Protocol** — for duck-typed integration points where implementors shouldn't need to import the base class (e.g., `ExecutionEngine`, `Evaluator`, `DictSerializable`, `ReplWorkerProtocol`)
- New root ABCs (`class X(ABC)`) should define at least one `@abstractmethod`; subclasses that inherit an abstract contract from another ABC do not need to redeclare one.

### Dict types

- Use `dict[str, Any]` for JSON-like dicts (not `dict[str, object]`)
- Prefer `TypedDict` when the dict shape is known at all call sites
- Use `Mapping[str, Any]` for read-only dict parameters

### Collection parameters

- Use `Sequence[X]` for read-only list parameters in public API functions
- Use `list[X]` for return types and parameters that are mutated
- Use `Mapping[str, X]` for read-only dict parameters (already used in `ScenarioInterface`)

### Type aliases

- `LlmFn = Callable[[str, str], str]` — defined in `agents/types.py`
- Use `from enum import StrEnum` (not `import enum` + `enum.StrEnum`)

### Logger naming

- Use `logger = logging.getLogger(__name__)` (lowercase, per PEP 8)

## Pull Requests

- Keep changes scoped to one feature or cleanup theme.
- Update docs and examples when renaming commands, env vars, or package paths.
- Include verification notes for the checks you ran.


================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
    Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
    stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
    that You distribute, all copyright, patent, trademark, and
    attribution notices from the Source form of the Work,
    excluding those notices that do not pertain to any part of
    the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
    distribution, then any Derivative Works that You distribute must
    include a readable copy of the attribution notices contained
    within such NOTICE file, excluding those notices that do not
    pertain to any part of the Derivative Works, in at least one
    of the following places: within a NOTICE text file distributed
    as part of the Derivative Works; within the Source form or
    documentation, if provided along with the Derivative Works; or,
    within a display generated by the Derivative Works, if and
    wherever such third-party notices normally appear. The contents
    of the NOTICE file are for informational purposes only and
    do not modify the License. You may add Your own attribution
    notices within Derivative Works that You distribute, alongside
    or as an addendum to the NOTICE text from the Work, provided
    that such additional attribution notices cannot be construed
    as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!)  The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.


================================================
FILE: README.md
================================================
<!-- autocontext-readme-hero:start -->
<p align="center">
  <img src="autocontext/assets/banner.svg" alt="autocontext ASCII banner" style="max-width: 100%; height: auto;" />
</p>

<p align="center"><strong>a recursive self-improving harness designed to help your agents (and future iterations of those agents) succeed on any task</strong></p>

<p align="center">
  <a href="https://github.com/greyhaven-ai/autocontext/blob/main/LICENSE"><img src="https://img.shields.io/github/license/greyhaven-ai/autocontext" alt="License"></a>
  <a href="https://github.com/greyhaven-ai/autocontext/stargazers"><img src="https://img.shields.io/github/stars/greyhaven-ai/autocontext" alt="GitHub stars"></a>
  <a href="https://github.com/greyhaven-ai/autocontext/commits/main"><img src="https://img.shields.io/github/last-commit/greyhaven-ai/autocontext" alt="Last commit"></a>
  <a href="https://pypi.org/project/autocontext/"><img src="https://img.shields.io/pypi/v/autocontext" alt="PyPI version"></a>
  <a href="https://www.npmjs.com/package/autoctx"><img src="https://img.shields.io/npm/v/autoctx" alt="npm version"></a>
</p>

<!-- autocontext-readme-hero:end -->

Autocontext is a harness. You point it at a goal in plain language. It iterates against real evaluation, keeps what worked, throws out what didn't, and produces a structured trace of the work plus the artifacts, playbooks, datasets, and (optionally) a distilled local model that the next agent inherits. Repeated runs get better, not just different.

## Try It In 30 Seconds

The fastest path uses our **Pi runtime**, a local coding agent that handles its own auth. No API key plumbing, no provider config: install Pi, install autocontext, point one at the other.

```bash
uv tool install autocontext==0.5.0

AUTOCONTEXT_AGENT_PROVIDER=pi \
AUTOCONTEXT_PI_COMMAND=pi \
uv run autoctx solve \
  "improve customer-support replies for billing disputes" \
  --iterations 3
```

Pi runs locally as a subprocess and emits live traces back into the harness. For a hosted Pi, set `AUTOCONTEXT_AGENT_PROVIDER=pi-rpc` and `AUTOCONTEXT_PI_RPC_ENDPOINT` instead.

Prefer TypeScript? Same surface, same command:

```bash
bun add -g autoctx@0.5.0
AUTOCONTEXT_AGENT_PROVIDER=pi bunx autoctx solve \
  "improve customer-support replies for billing disputes" \
  --iterations 5 --json
```

Already on Anthropic, OpenAI, Gemini, Mistral, Groq, OpenRouter, Azure, Claude CLI, Codex CLI, or MLX? Set `AUTOCONTEXT_AGENT_PROVIDER` and the matching credential env var:

```bash
AUTOCONTEXT_AGENT_PROVIDER=anthropic \
ANTHROPIC_API_KEY=sk-ant-... \
uv run autoctx solve "..." --iterations 3
```

See [`.env.example`](.env.example) for every provider's variables. Prefer to clone and run a starter? [`examples/README.md`](examples/README.md) has copy-paste recipes for Python CLI, Claude Code MCP, Python SDK, TypeScript library usage, and the experimental TypeScript agent handler surface.

## Or Just Talk To Your Agent

If you already work inside a coding agent, you can wire autocontext in once and give the agent a natural-language entry point. Hermes and other terminal-capable agents should start with the CLI-backed skill; MCP remains available for clients that want a tool-catalog protocol.

**Pi** ships an autocontext skill out of the box. Install the published Pi package and Pi loads natural-language wrappers over live tools such as `autocontext_solve_scenario`, `autocontext_evaluate_output`, `autocontext_run_improvement_loop`, `autocontext_run_status`, and `autocontext_list_scenarios`.

```bash
pi install npm:pi-autocontext
```

Then you just ask:

> "Solve: improve customer-support replies for billing disputes."
>
> "Judge this output against this rubric and improve it until it scores 0.85."

**Claude Code** (and any other MCP client) gets the same surface by adding one entry to `.claude/settings.json`:

```json
{
  "mcpServers": {
    "autocontext": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/autocontext", "autoctx", "mcp-serve"],
      "env": { "AUTOCONTEXT_AGENT_PROVIDER": "pi", "AUTOCONTEXT_PI_COMMAND": "pi" }
    }
  }
}
```

After that, Python MCP exposes prefixed tools such as `autocontext_solve_scenario`, `autocontext_evaluate_output`, `autocontext_run_improvement_loop`, `autocontext_run_status`, `autocontext_list_scenarios`, `autocontext_export_skill`, and `autocontext_search_strategies`. It also exposes runtime-session readers as `autocontext_list_runtime_sessions`, `autocontext_get_runtime_session`, and `autocontext_get_runtime_session_timeline`, with unprefixed aliases for parity with TypeScript MCP; Python runtime-backed `run` and `solve` role calls populate those logs automatically. The TypeScript package exposes the same capabilities with its documented tool names via `bunx autoctx mcp-serve`.

**Hermes Agent** can load a CLI-first skill and inspect Hermes Curator state without MCP:

```bash
cd autocontext
uv run autoctx hermes export-skill --output ~/.hermes/skills/autocontext/SKILL.md --json
# Add progressive-disclosure reference files alongside SKILL.md (AC-702)
uv run autoctx hermes export-skill \
    --output ~/.hermes/skills/autocontext/SKILL.md \
    --with-references --json
uv run autoctx hermes inspect --json
```

Full integration guide: [autocontext/docs/agent-integration.md](autocontext/docs/agent-integration.md).

## What You Get Back

Every run leaves a structured record on disk. Replay it, diff it, export it, feed it back into training.

```
runs/<run_id>/
├── trace.jsonl              # every prompt, tool call, and outcome, in order
├── generations/
│   ├── gen_1/
│   │   ├── strategy.json    # what the competitor proposed
│   │   ├── analysis.md      # what the analyst observed
│   │   └── score.json       # how it was evaluated
│   └── gen_2/ ...
├── report.md                # human-readable summary of the whole run
└── artifacts/               # files, configs, packages the run produced

knowledge/<scenario>/
├── playbook.md              # accumulated lessons that carried forward
├── hints.md                 # competitor hints that survived the curator
└── tools/                   # any helper tools the architect generated
```

A `playbook.md` is plain markdown the next run reads as context:

```markdown
<!-- PLAYBOOK_START -->

## Billing dispute replies

- Always restate the disputed charge in the first sentence; refunds requested without
  explicit confirmation cause loops.
- "Pending" charges are not yet billable. Don't promise a refund until status flips
  to `posted`. Verified gen_4, regressed in gen_7 when omitted.
- Empathy + specific next step beats empathy alone. Escalation rate dropped from
0.31 to 0.12 once the second sentence named the next-step owner.
<!-- PLAYBOOK_END -->
```

A `trace.jsonl` line is one event:

```json
{
  "ts": "2026-04-28T17:42:11Z",
  "gen": 4,
  "role": "competitor",
  "event": "strategy_proposed",
  "score": 0.78,
  "tokens_in": 1840,
  "tokens_out": 612,
  "strategy_id": "s_4f2a"
}
```

Inspect, replay, or compare any of it:

```bash
uv run autoctx list
uv run autoctx status <run_id>
uv run autoctx replay <run_id> --generation 2
```

## How It Works

Inside each run, five roles cooperate:

- **competitor** proposes a strategy or artifact for the task
- **analyst** explains what happened and why
- **coach** turns that analysis into playbook updates and future hints
- **architect** proposes tools or harness changes when the loop is stuck
- **curator** gates what knowledge is allowed to persist across runs

Strategies are evaluated through scenario execution, staged validation, and gating. Weak changes are rolled back. Successful changes accumulate as reusable knowledge that future runs (and future agents) inherit automatically.

The full vocabulary (Scenario, Task, Mission, Campaign, Run, Verifier, Knowledge, Artifact, Budget, Policy) lives in [docs/concept-model.md](docs/concept-model.md).

## Capture What's Happening In Production

Autocontext can sit alongside your live application and record what your agents do, then turn that into training data. Wrap your existing Anthropic or OpenAI client once:

```python
from anthropic import Anthropic
from autocontext.production_traces import instrument_client

client = instrument_client(Anthropic(), app="billing-bot", env="prod")
# use `client` exactly like before; calls are captured to JSONL with content blocks,
# cache-aware usage, and Anthropic-native outcome taxonomy.
```

```ts
import Anthropic from "@anthropic-ai/sdk";
import { instrumentClient } from "autoctx/production-traces";

const client = instrumentClient(new Anthropic(), { app: "billing-bot", env: "prod" });
```

Then build scoped datasets from the captured traces:

```bash
uv run autoctx build-dataset \
  --app billing-bot --provider anthropic \
  --env prod --outcome success \
  --output training/billing.jsonl
```

And distill them into a smaller local model with MLX (Apple Silicon) or CUDA (Linux GPUs):

```bash
uv run autoctx train --scenario support_triage --data training/billing.jsonl --time-budget 300
```

<!-- autocontext-whats-new:start -->
## What's New in 0.5.0

- **Plain-language CLI continuity** lets Python and TypeScript callers use positional goals/scenarios, `--iterations`, and run-scoped exports while preserving the existing flag forms.
- **Hermes Agent integration** adds read-only Hermes v0.12 inspection plus an exportable CLI-first `autocontext` skill for Hermes agents.
- **Packaged CLI startup** no longer crashes when installed without banner assets.
- **Release alignment** bumps Python `autocontext` and npm `autoctx` to `0.5.0`, with `pi-autocontext` moving to `0.2.4` on its own lower-numbered line.
<!-- autocontext-whats-new:end -->

## Choose Your Package

| If you want to...                                               | Start here                                                                     |
| --------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| Run the full multi-generation control plane (Python)            | [autocontext/README.md](autocontext/README.md)                                 |
| Run from Node, or operate missions, simulations, investigations | [ts/README.md](ts/README.md)                                                   |
| Install the Pi extension package                                | [pi/README.md](pi/README.md)                                                   |
| Wire an external coding agent into autocontext over MCP         | [autocontext/docs/agent-integration.md](autocontext/docs/agent-integration.md) |
| Grab copy-paste integration snippets                            | [examples/README.md](examples/README.md)                                       |

```bash
# Python: library or CLI tool
uv pip install autocontext==0.5.0
uv tool install autocontext==0.5.0

# TypeScript
bun add -g autoctx@0.5.0

# Pi extension
pi install npm:pi-autocontext
```

> The PyPI package is `autocontext`. The CLI entrypoint is `autoctx`. The npm packages are `autoctx` and `pi-autocontext` (note: an unrelated package on npm uses the name `autocontext`; that is not this project).

## Surfaces

| Surface            | Command                                                | When to use it                                                                         |
| ------------------ | ------------------------------------------------------ | -------------------------------------------------------------------------------------- |
| `solve`            | `autoctx solve "..." --iterations 3`                   | Hand the harness a goal in plain language; it generates the scenario and runs the loop |
| `run`              | `autoctx run <scenario> --iterations 3`                | Improve behavior inside a saved scenario across generations                            |
| `simulate`         | `autoctx simulate -d "..."`                            | Model a system, sweep parameters, replay, compare                                      |
| `investigate`      | `autoctx investigate -d "..."`                         | Evidence-driven diagnosis, either synthetic harness or live iterative LLM session      |
| `analyze`          | `autoctx analyze --id <id> --type <kind>`              | Inspect or compare runs, simulations, investigations, or missions after the fact       |
| `mission`          | `autoctx mission create --name "..." --goal "..."`     | Verifier-driven goal advanced step by step until done                                  |
| `campaign`         | `bunx autoctx campaign ...` (TypeScript)               | Coordinate multiple missions with budgets, dependencies, progress aggregation          |
| `worker`           | `autoctx worker --poll-interval 5`                     | Process queued tasks on a persistent host beside `autoctx serve`                       |
| `export`           | `autoctx export <run-id>`                              | Share solved knowledge as JSON, skills, or Pi-local package directories                |
| `train`            | `autoctx train --scenario <name> --data <jsonl>`       | Distill stable exported data into a cheaper local runtime                              |
| `context-selection` | `bunx autoctx context-selection --run-id <run-id> --json` (TypeScript CLI) | Inspect persisted prompt context budget, cache, diagnostics, and selection telemetry   |
| `runtime-sessions` | `bunx autoctx runtime-sessions timeline --run-id <run-id>` (TypeScript CLI) | Inspect persisted provider prompts, messages, child-task events, and operator-facing timelines from runtime-backed runs; also exposed through Python and TypeScript MCP/cockpit HTTP, the TypeScript TUI `/timeline` plus persisted filterable and resettable `/activity` live feed, and `/ws/events` updates |
| `agent`            | `bunx autoctx agent run support --id ticket-123 --payload '{"message":"..."}' --json` (TypeScript CLI) | Invoke experimental `.autoctx/agents` handlers locally, or run `autoctx agent dev` for `/manifest` and `/agents/<name>/invoke` routes |
| `hermes`           | `uv run autoctx hermes inspect --json` (Python)        | Inspect Hermes v0.12 skill usage and Curator reports, or export the Hermes skill       |
| `replay`           | `autoctx replay <run_id> --generation N`               | Inspect what happened before deciding what knowledge should persist                    |

## Scenario Families

All 11 families execute in both Python and TypeScript. TypeScript uses V8 isolate codegen; Python uses subprocess executors.

| Family             | Evaluation              | What it tests                                                           |
| ------------------ | ----------------------- | ----------------------------------------------------------------------- |
| `game`             | Tournament with Elo     | Turn-based strategy (grid_ctf, othello)                                 |
| `agent_task`       | LLM judge               | Prompt-centric tasks with optional improvement loops                    |
| `simulation`       | Trace evaluation        | Action-trace scenarios with mock environments and fault injection       |
| `artifact_editing` | Artifact validation     | File, config, and schema modification with diff tracking                |
| `investigation`    | Evidence chains         | Diagnosis accuracy with red herring detection                           |
| `workflow`         | Workflow evaluation     | Transactional flows with compensation, retry, and side-effect tracking  |
| `negotiation`      | Negotiation evaluation  | Hidden preferences, BATNA constraints, and opponent modeling            |
| `schema_evolution` | Schema adaptation       | Mid-run state changes where agents must detect stale context            |
| `tool_fragility`   | Drift adaptation        | APIs that drift, requiring agents to adapt to changed tool behavior     |
| `operator_loop`    | Judgment evaluation     | Escalation and clarification judgment in operator-in-the-loop workflows |
| `coordination`     | Coordination evaluation | Multi-agent partial context, handoff, merge, and duplication detection  |

## Providers, Runtimes, Executors

**LLM providers**: Anthropic (with `instrument_client` capture), OpenAI-compatible (vLLM, Ollama, Hermes), Gemini, Mistral, Groq, OpenRouter, Azure OpenAI, MLX (Apple Silicon), CUDA (Linux GPUs), Pi (CLI and RPC).

**Agent runtimes**: Claude CLI, Codex CLI, Hermes CLI, Direct API, Pi variants, plus branch-aware session and persistent Pi RPC for local agent loops.

**Executors**: Local subprocess, SSH remote, Monty (`pydantic-monty` sandbox), PrimeIntellect remote sandbox. Gondolin is reserved as an optional fail-closed microVM backend until its adapter is wired.

**Harness profiles and hooks**: The Python control plane supports a Pi-shaped lean profile that caps prompt context during generation and exports a minimal tool-affordance allowlist for agent surfaces that enforce tool gating. Semantic prompt compactions are recorded as Pi-shaped JSONL entries under each run; the TypeScript package now includes a mirrored deterministic prompt compactor plus `ArtifactStore` ledger read/write/latest APIs for standalone npm runs. Python and TypeScript runs can load `AUTOCONTEXT_EXTENSIONS`; Python extensions are Python modules, while TypeScript extensions are JavaScript/ESM modules that register hooks around context assembly, semantic compaction, provider calls, judge calls, artifact writes, and run lifecycle events.

A deterministic offline provider exists for the test suite. Configuration matrix: [`.env.example`](.env.example) and [docs/concept-model.md](docs/concept-model.md).

## FAQ

**Is autocontext a benchmark?**
No. It's a harness for improving real agent behavior on real work. Benchmarks (the 11 scenario families) are one of many surfaces; you can also point it at production tasks, missions, or simulations.

**How is this different from DSPy, Inspect, TextGrad, or a prompt optimizer?**
Those tools optimize prompts. Autocontext takes a goal in plain language, generates the scenario, runs a multi-role loop with verifier-driven gating, and produces transferable artifacts (playbooks, datasets, distilled models) that the next run inherits. Prompt optimization is a special case.

**Do I need API keys?**
No. The Pi runtime runs locally and handles its own auth. Anthropic, OpenAI, Gemini, Mistral, Groq, OpenRouter, Azure, MLX, and Claude/Codex CLI are all opt-in via env vars.

**Where does the knowledge live?**
On your filesystem. Runs go to `runs/`, accumulated knowledge to `knowledge/`. Indexed metadata is in SQLite. Everything is inspectable, diffable, and portable.

**Can my coding agent drive autocontext directly?**
Yes. Wire `autoctx mcp-serve` (or `bunx autoctx mcp-serve`) into Claude Code, Cursor, or Pi as an MCP server, and the agent gets natural-language access to `solve`, `judge`, `improve`, `status`, `export_skill`, and the rest. See [Or Just Talk To Your Agent](#or-just-talk-to-your-agent).

## Where To Look Next

- Canonical vocabulary and object model: [docs/concept-model.md](docs/concept-model.md)
- Docs overview: [docs/README.md](docs/README.md)
- Python package guide: [autocontext/README.md](autocontext/README.md)
- TypeScript package guide: [ts/README.md](ts/README.md)
- Copy-paste examples: [examples/README.md](examples/README.md)
- External agent integration: [autocontext/docs/agent-integration.md](autocontext/docs/agent-integration.md)
- Recent changes: [CHANGELOG.md](CHANGELOG.md)
- Contributor setup: [CONTRIBUTING.md](CONTRIBUTING.md)
- Repo layout for coding agents: [AGENTS.md](AGENTS.md)
- Sandboxed agents that need to trigger MLX training on the host: [autocontext/docs/mlx-training.md](autocontext/docs/mlx-training.md)
- Sandbox and executor notes: [autocontext/docs/sandbox.md](autocontext/docs/sandbox.md)
- Persistent host worker: [autocontext/docs/persistent-host.md](autocontext/docs/persistent-host.md)
- License: [LICENSE](LICENSE)

## Acknowledgments

Thanks to [George](https://github.com/GeorgeH87) for generously donating the `autocontext` name on PyPI.

## Project Signals

[![npm downloads](https://img.shields.io/npm/dm/autoctx?logo=npm&label=npm%20downloads)](https://www.npmjs.com/package/autoctx)
[![PyPI downloads](https://img.shields.io/pypi/dm/autocontext?logo=pypi&label=PyPI%20downloads)](https://pypi.org/project/autocontext/)

[![Star History Chart](https://api.star-history.com/svg?repos=greyhaven-ai/autocontext&type=Date)](https://www.star-history.com/#greyhaven-ai/autocontext&Date)


================================================
FILE: SECURITY.md
================================================
# Security Policy

## Reporting a Vulnerability

Do not open public GitHub issues for security vulnerabilities.

Use GitHub private vulnerability reporting for this repository when it is available. Include:

- a description of the vulnerability
- the affected version or commit
- reproduction steps or proof of concept
- impact assessment
- any suggested mitigation

If private vulnerability reporting is not available yet, do not publish the details in a public issue. Open a minimal issue asking for a private contact path and omit the vulnerability details.

## Response Expectations

We will aim to:

- acknowledge receipt promptly
- confirm whether the issue is in scope
- communicate remediation status as fixes progress
- coordinate disclosure timing when a fix is ready

## Supported Versions

This project is pre-1.0 and moving quickly. Security fixes, when available, are expected to land on the latest mainline version rather than through long-lived backport branches.


================================================
FILE: SUPPORT.md
================================================
# Support

## Questions and Usage Help

Before opening an issue, check the main docs and examples first:

- `README.md`
- `docs/README.md`
- `examples/README.md`
- `autocontext/README.md`
- `ts/README.md`
- `autocontext/docs/agent-integration.md`

Use GitHub issues for:

- setup problems
- documentation gaps
- bug reports
- feature requests

When filing an issue, include:

- what you were trying to do
- the command you ran
- the relevant environment or provider settings
- the observed error or unexpected behavior

## Security Issues

Do not report security vulnerabilities in public issues. Follow [SECURITY.md](SECURITY.md) instead.

## Scope

Public issues are the default support channel for this repository. Use them for usage questions, reproducible bugs, and feature requests. For private vulnerability reports, use the separate security flow only.

## Maintainer Expectations

This project is being open-sourced actively and the APIs may still move. We will try to keep the README, CLI usage, and environment variable guidance current, but not every internal interface is stable yet.


================================================
FILE: autocontext/README.md
================================================
# autocontext

autocontext is the Python control-plane package for running scenarios, carrying forward validated knowledge, exporting artifacts, and distilling stable behavior into cheaper runtimes over time.

The intended use is to hand the harness a real task in plain language, let it solve or simulate the problem mostly hands-off, and then inspect the resulting traces, reports, playbooks, datasets, and optional distilled model.

## Install

```bash
pip install autocontext
```

The current PyPI release line is `autocontext==0.5.0`.
The PyPI package name is now `autocontext`. The CLI entrypoint remains `autoctx`.

## Working Directory

Run the commands in this README from the `autocontext/` directory. The Python package, CLI entrypoint, tests, and migrations all live here.

## What It Does

- Runs iterative generation loops against game scenarios and agent-task scenarios
- Adds a first-class `simulate` surface for modeled-world exploration, replay, compare, and export
- Persists playbooks, hints, tools, reports, and snapshots across runs
- Supports staged validation, harness synthesis, and harness-aware routing
- Exports training data and runs autoresearch-style local training loops
- Exposes evaluation, validation, artifact, runtime-session, and discovery operations over MCP and HTTP

## Surface Summary

The Python package is the full control-plane surface in this repo. It currently includes:

- generation-loop execution via `autoctx run`
- plain-language simulation via `autoctx simulate`
- plain-language investigation via `autoctx investigate`
- local training workflows via `autoctx export-training-data` and `autoctx train`
- scenario creation and materialization via `autoctx new-scenario`
- Hermes Agent integration helpers via `autoctx hermes inspect` and `autoctx hermes export-skill` (with optional `--with-references` for progressive-disclosure reference files; AC-702)
- HTTP API and MCP server surfaces via `autoctx serve` and `autoctx mcp-serve`, including runtime-session log and timeline readers for provider-backed runs

Some newer operator-facing surfaces are currently TypeScript-first:

- `autoctx analyze`
- the interactive terminal UI via `npx autoctx tui`

`campaign` currently lives in that same bucket: it has partial TypeScript CLI/API/MCP support, but the Python package does not expose a campaign control-plane workflow yet.

## Quick Start

From the repo root:

```bash
cd autocontext
uv venv
source .venv/bin/activate
uv sync --group dev
```

Use the repo-level `.env.example` as the reference for available `AUTOCONTEXT_*` settings and supported provider-native credential aliases such as `ANTHROPIC_API_KEY`.

`operator-in-the-loop` is a runnable scenario family for escalation and clarification experiments. Use it when you want executable operator-loop simulations, judgment evaluation, and live-agent escalation workflow testing.

Run a deterministic local scenario:

```bash
AUTOCONTEXT_AGENT_PROVIDER=deterministic \
uv run autoctx solve "improve customer-support replies for billing disputes" --iterations 3
```

Run with Anthropic:

```bash
AUTOCONTEXT_AGENT_PROVIDER=anthropic \
ANTHROPIC_API_KEY=... \
uv run autoctx solve "improve customer-support replies for billing disputes" --iterations 3
```

`ANTHROPIC_API_KEY` is the preferred Anthropic credential env var. `AUTOCONTEXT_ANTHROPIC_API_KEY` remains supported as a compatibility alias.

Run with Claude CLI (`claude -p` via a local authenticated Claude Code runtime):

```bash
AUTOCONTEXT_AGENT_PROVIDER=claude-cli \
AUTOCONTEXT_CLAUDE_MODEL=sonnet \
AUTOCONTEXT_CLAUDE_TIMEOUT=300 \
uv run autoctx solve "improve customer-support replies for billing disputes" --iterations 3
```

For longer live prompts, `autoctx solve`, `autoctx judge`, and `autoctx improve` all accept `--timeout <seconds>`. `autoctx solve` also accepts `--generation-time-budget <seconds>` to cap per-generation solve runtime. You can still use provider env vars such as `AUTOCONTEXT_CLAUDE_TIMEOUT`, `AUTOCONTEXT_CLAUDE_MAX_RETRIES`, `AUTOCONTEXT_CLAUDE_MAX_TOTAL_SECONDS`, or `AUTOCONTEXT_PI_TIMEOUT`.

Run with Codex CLI (`codex exec` via a local authenticated Codex runtime):

```bash
AUTOCONTEXT_AGENT_PROVIDER=codex \
AUTOCONTEXT_CODEX_MODEL=o4-mini \
uv run autoctx solve "improve customer-support replies for billing disputes" --iterations 3
```

Run with Pi CLI (local Pi agent runtime):

```bash
AUTOCONTEXT_AGENT_PROVIDER=pi \
AUTOCONTEXT_PI_COMMAND=pi \
uv run autoctx solve "improve customer-support replies for billing disputes" --iterations 3
```

`autoctx simulate` now follows the effective architect-role runtime surface, so `AUTOCONTEXT_ARCHITECT_PROVIDER`, other role-routing overrides, and per-call `--provider <name>` overrides all apply to live simulation generation.

`autoctx investigate` now ships as a first-class Python CLI surface as well. It uses the architect runtime for investigation-spec synthesis and the analyst runtime for hypothesis generation, so role-routing overrides apply there too. The default `--mode synthetic` creates and executes a compact investigation harness. `--mode iterative` runs a live multi-step LLM investigation, emits `events.ndjson` rows, and writes Pi-shaped compaction ledger entries under `runs/<investigation_id>/` when context budget pressure triggers compaction. When browser exploration is enabled, `--browser-url <url>` captures a policy-checked snapshot and folds that evidence into the investigation prompts and report artifacts.

Run with Pi RPC (local Pi subprocess using `pi --mode rpc` JSONL):

```bash
AUTOCONTEXT_AGENT_PROVIDER=pi-rpc \
AUTOCONTEXT_PI_COMMAND=pi \
uv run autoctx solve "improve customer-support replies for billing disputes" --iterations 3
```

For deterministic evals where Pi should ignore repo-local `AGENTS.md` / `CLAUDE.md`, add:

```bash
AUTOCONTEXT_PI_NO_CONTEXT_FILES=true
```

For Pi-shaped harness runs with a tighter prompt budget and exported tool-affordance metadata, add:

```bash
AUTOCONTEXT_HARNESS_PROFILE=lean
AUTOCONTEXT_LEAN_CONTEXT_BUDGET_TOKENS=32000
AUTOCONTEXT_LEAN_TOOL_ALLOWLIST=read,bash,edit,write
AUTOCONTEXT_PI_RPC_PERSISTENT=true
```

Run with Hermes (via OpenAI-compatible gateway):

```bash
AUTOCONTEXT_AGENT_PROVIDER=openai-compatible \
AUTOCONTEXT_AGENT_BASE_URL=http://localhost:8080/v1 \
AUTOCONTEXT_AGENT_API_KEY=no-key \
AUTOCONTEXT_AGENT_DEFAULT_MODEL=hermes-3-llama-3.1-8b \
uv run autoctx solve "improve customer-support replies for billing disputes" --iterations 3
```

Start the API server:

```bash
uv run autoctx serve --host 127.0.0.1 --port 8000
```

Inspect `http://127.0.0.1:8000/` for the API index after the server starts. For an interactive terminal UI, use the TypeScript package: `npx autoctx tui`.

Run a persistent queue worker beside the API server:

```bash
uv run autoctx worker --poll-interval 5 --concurrency 2
```

Stateful persistent providers, such as persistent Pi RPC, run with effective concurrency `1` so one long-lived runtime cannot mix events across tasks.

Start the MCP server:

```bash
uv sync --group dev --extra mcp
uv run autoctx mcp-serve
```

Python runtime-backed `run` and `solve` role calls automatically append provider prompts and responses to the run-scoped runtime-session log. Runtime-session logs created by the TypeScript runtime-session provider bundle can be read from Python too when both packages point at the same `AUTOCONTEXT_DB_PATH`. Python command grants mirror the TypeScript runtime grant vocabulary for command lifecycle events: trusted env values stay out of prompt text, local command wrappers inherit only explicitly allowlisted host env, start/end/error payloads redact against the effective grant env, and child tasks inherit only grants whose scope policy allows it. The Python cockpit API exposes `GET /api/cockpit/runtime-sessions`, `GET /api/cockpit/runtime-sessions/{session_id}`, `GET /api/cockpit/runtime-sessions/{session_id}/timeline`, `GET /api/cockpit/runs/{run_id}/runtime-session`, and `GET /api/cockpit/runs/{run_id}/runtime-session/timeline`. The Python MCP server exposes the same read model through `autocontext_list_runtime_sessions`, `autocontext_get_runtime_session`, and `autocontext_get_runtime_session_timeline`, plus unprefixed aliases.

## Main CLI Commands

```bash
uv run autoctx solve "improve customer-support replies for billing disputes" --iterations 3
uv run autoctx simulate --description "simulate deploying a web service with rollback"
uv run autoctx simulate --description "simulate deploying a web service with rollback" --provider claude-cli
uv run autoctx investigate --description "why did conversion drop after Tuesday's release"
uv run autoctx investigate --description "debug the outage timeline" --mode iterative
uv run autoctx investigate --description "checkout is failing in prod" --browser-url https://status.example.com
uv run autoctx queue add --task-prompt "Write a 1-line fact about primes" --rubric "correct" --threshold 0.8 --rounds 2
uv run autoctx queue --spec support_triage --browser-url https://status.example.com
uv run autoctx worker --poll-interval 5 --concurrency 2
uv run autoctx simulate --replay deploy_sim --variables threshold=0.9
uv run autoctx list
uv run autoctx status <run_id>
uv run autoctx replay <run_id> --generation 1
uv run autoctx run support_triage --iterations 3
uv run autoctx benchmark --scenario support_triage --runs 5
uv run autoctx new-scenario --template prompt-optimization --name support_triage
uv run autoctx export-training-data --scenario support_triage --all-runs --output training/support_triage.jsonl
uv run autoctx train --scenario support_triage --data training/support_triage.jsonl --time-budget 300
uv run autoctx hermes inspect --json
uv run autoctx hermes export-skill --output ~/.hermes/skills/autocontext/SKILL.md --json
uv run autoctx hermes export-skill --output ~/.hermes/skills/autocontext/SKILL.md --with-references --json
uv run autoctx analytics context-selection --run-id <run_id> --json
uv run autoctx analytics trace-findings --trace-id <trace_id> --kind writeup --json
uv run autoctx analytics trace-findings --trace-id <trace_id> --kind weakness
uv run autoctx serve --host 127.0.0.1 --port 8000
uv run autoctx mcp-serve
uv run autoctx wait <condition_id> --json
```

Saved custom scenarios under `knowledge/_custom_scenarios/` can be rerun and benchmarked by name once their `spec.json` has been persisted, so the `new-scenario` / `solve` workflow lines up with the named `run` and `benchmark` surfaces.

Trace-finding reports read persisted `RunTrace` files from `knowledge/analytics/traces/`.
Use the filename without `.json` as `--trace-id` (for example
`trace-run-123` from `knowledge/analytics/traces/trace-run-123.json`), or run
`uv run autoctx analytics rebuild-traces --run-id <run_id> --json` to rebuild
trace artifacts from an events stream first. `--kind writeup` emits the full
summary/findings/motifs/recovery-path shape; `--kind weakness` emits
recommendations, weakness findings, motifs, and recovery analysis.

Useful variants:

```bash
AUTOCONTEXT_AGENT_PROVIDER=anthropic ANTHROPIC_API_KEY=... \
uv run autoctx solve "improve customer-support replies for billing disputes" --iterations 3

AUTOCONTEXT_AGENT_PROVIDER=anthropic \
ANTHROPIC_API_KEY=sk-ant-primary \
AUTOCONTEXT_COMPETITOR_PROVIDER=openai-compatible \
AUTOCONTEXT_COMPETITOR_API_KEY=sk-role \
AUTOCONTEXT_COMPETITOR_BASE_URL=http://localhost:8000/v1 \
uv run autoctx solve "improve customer-support replies for billing disputes" --iterations 3

AUTOCONTEXT_AGENT_PROVIDER=deterministic AUTOCONTEXT_RLM_ENABLED=true \
uv run autoctx solve "improve customer-support replies for billing disputes" --iterations 3
```

## Training Workflow

Export JSONL training data from completed runs:

```bash
uv run autoctx export-training-data \
  --scenario support_triage \
  --all-runs \
  --output training/support_triage.jsonl
```

Launch the autoresearch-style training loop:

```bash
uv sync --group dev --extra mlx
uv run autoctx train \
  --scenario support_triage \
  --data training/support_triage.jsonl \
  --time-budget 300
```

MLX training is host-only. It must run on an Apple Silicon macOS machine with Metal access. It will not run correctly inside a Docker sandbox on macOS.

If you only want to inspect generated training data first, export without training and open the JSONL directly.

For host setup details and OpenClaw automation via a file-based watcher bridge, see [docs/mlx-training.md](docs/mlx-training.md).

## Configuration

Configuration is loaded from `AUTOCONTEXT_*` environment variables in `src/autocontext/config/settings.py`.

Common settings:

- `AUTOCONTEXT_AGENT_PROVIDER`
- `AUTOCONTEXT_EXECUTOR_MODE`
- `AUTOCONTEXT_MODEL_COMPETITOR`
- `AUTOCONTEXT_MATCHES_PER_GENERATION`
- `AUTOCONTEXT_MAX_RETRIES`
- `AUTOCONTEXT_JUDGE_PROVIDER`
- `AUTOCONTEXT_PI_TIMEOUT` (defaults to 300 seconds for Pi-backed live runs)
- `AUTOCONTEXT_HARNESS_PROFILE` (`standard` or `lean`)
- `AUTOCONTEXT_LEAN_CONTEXT_BUDGET_TOKENS`
- `AUTOCONTEXT_LEAN_HIDDEN_CONTEXT_BUDGET_TOKENS`
- `AUTOCONTEXT_LEAN_TOOL_ALLOWLIST`
- `AUTOCONTEXT_PI_RPC_PERSISTENT`
- `AUTOCONTEXT_EXTENSIONS`
- `AUTOCONTEXT_EXTENSION_FAIL_FAST`
- `AUTOCONTEXT_RLM_ENABLED`
- `AUTOCONTEXT_HARNESS_PREFLIGHT_ENABLED`
- `AUTOCONTEXT_STAGED_VALIDATION_ENABLED`
- `AUTOCONTEXT_BROWSER_ENABLED`
- `AUTOCONTEXT_BROWSER_ALLOWED_DOMAINS`
- `AUTOCONTEXT_BROWSER_PROFILE_MODE`
- `AUTOCONTEXT_BROWSER_ALLOW_AUTH`
- `AUTOCONTEXT_BROWSER_ALLOW_DOWNLOADS` and `AUTOCONTEXT_BROWSER_DOWNLOADS_ROOT`

Browser exploration defaults to a secure disabled posture and uses the shared contract described in [../docs/browser-exploration-contract.md](../docs/browser-exploration-contract.md).
The Python package includes a thin Chrome CDP backend that attaches to an existing debugger endpoint, enforces the browser allowlist, and stores browser evidence under run-local roots.

`AUTOCONTEXT_HARNESS_PROFILE=lean` resolves a Pi-shaped runtime profile: prompt context is capped by `AUTOCONTEXT_LEAN_CONTEXT_BUDGET_TOKENS`, hidden/implicit context defaults to zero, and generated tool context is replaced by the lean allowlist before agent execution. `AUTOCONTEXT_PI_RPC_PERSISTENT=true` opts Pi RPC into a long-lived subprocess; one-shot Pi RPC remains the default.

`AUTOCONTEXT_EXTENSIONS` loads comma-separated extension modules that register Pi-shaped runtime hooks for context transforms, provider requests/responses, judge calls, artifact writes, and run/generation lifecycle events. Python runs load Python modules or `.py` files; TypeScript runs load JavaScript/ESM modules. See [docs/extensions.md](docs/extensions.md).

Semantic prompt compactions are also persisted as Pi-shaped JSONL entries at
`runs/<run_id>/compactions.jsonl`, including `summary`, `firstKeptEntryId`,
`tokensBefore`, and component details for runtime snapshots and resumption.

Solved strategy packages can also be exported as Pi-local package directories:

```bash
uv run autoctx export <run_id> --format pi-package --output grid-ctf-pi-package
```

The directory contains `package.json`, a Pi skill, a prompt file, and the original `autocontext.package.json` strategy payload for re-import.

See the repo-level [.env.example](../.env.example) for a working starting point.

## Repository Structure

```text
autocontext/
  src/autocontext/   Python package
  tests/             Pytest suite
  docs/              Package-specific documentation
  migrations/        SQLite migrations
ts/                  TypeScript package
infra/               Docker, Fly.io, bootstrap scripts
```

## Validation and Development

```bash
uv run ruff check src tests
uv run mypy src
uv run pytest
```

If you change protocol messages, regenerate the derived protocol artifacts from the repo root:

```bash
cd ..
uv run --directory autocontext python scripts/generate_protocol.py
```

## OpenClaw / ClawHub

autocontext exposes:

- artifact contracts for harnesses, policies, and distilled models
- REST and MCP operations for evaluate, validate, publish, import, and discover
- ClawHub skill manifests and scenario discovery metadata
- an adapter layer for running OpenClaw agents inside the harness

## OpenAI integration

Autocontext ships a zero-configuration OpenAI instrumentation path that
automatically wraps your existing `OpenAI(...)` calls and emits structured
traces to a sink of your choice.

### 1. Register detectors

Create `.autoctx.instrument.config.mjs` at the root of your repo:

```js
// .autoctx.instrument.config.mjs
import { registerDetectorPlugin } from "autoctx/control-plane/instrument";
import { plugin as openaiPythonPlugin } from "autoctx/detectors/openai-python";

registerDetectorPlugin(openaiPythonPlugin);
```

### 2. Run instrument

Preview changes without touching any files:

```bash
autoctx instrument --dry-run
```

Apply changes on a new branch for review:

```bash
autoctx instrument --apply --branch autoctx/instrument
```

### 3. Review the PR

The instrument command opens a branch. Open the PR and review the diff — you
will see your `OpenAI(...)` calls wrapped with `instrument_client(...)`.
Edit the generated TODO comment to point at your `FileSink`:

```python
# Before (generated):
client = instrument_client(OpenAI(), sink=None)  # TODO: pass your TraceSink here

# After (your edit):
from autocontext.integrations.openai import instrument_client, FileSink
sink = FileSink("./traces/openai.jsonl")
client = instrument_client(OpenAI(), sink=sink)
```

Merge the PR.

### 4. Customer code emits traces

Your code is unchanged beyond the wrap. Every `chat.completions.create` call
now emits a JSONL trace line to your sink:

```python
import openai
from autocontext.integrations.openai import instrument_client, FileSink, autocontext_session

sink = FileSink("./traces/openai.jsonl")
client = instrument_client(openai.OpenAI(), sink=sink)

with autocontext_session({"userId": "u_123"}):
    response = client.chat.completions.create(
        model="gpt-4o",
        messages=[{"role": "user", "content": "Hello!"}],
    )
    print(response.choices[0].message.content)

sink.close()
```

Emitted trace line (pretty-printed for readability):

```jsonl
{
  "schemaVersion": "1.0",
  "traceId": "...",
  "sessionContext": {
    "userId": "u_123"
  },
  "request": {
    "model": "gpt-4o",
    "messages": [
      {
        "role": "user",
        "content": "Hello!"
      }
    ]
  },
  "response": {
    "id": "...",
    "choices": [
      {
        "message": {
          "role": "assistant",
          "content": "Hi! How can I help?"
        },
        "finish_reason": "stop"
      }
    ],
    "usage": {
      "prompt_tokens": 9,
      "completion_tokens": 7,
      "total_tokens": 16
    }
  },
  "durationMs": 342,
  "errorReason": null
}
```

For the TypeScript equivalent, see `ts/src/integrations/openai/STABILITY.md`.

## Anthropic integration

Autocontext ships a zero-configuration Anthropic instrumentation path that
automatically wraps your existing `Anthropic(...)` calls and emits structured
traces to a sink of your choice.

### 1. Register detectors

Create `.autoctx.instrument.config.mjs` at the root of your repo:

```js
// .autoctx.instrument.config.mjs
import { registerDetectorPlugin } from "autoctx/control-plane/instrument";
import { plugin as anthropicPythonPlugin } from "autoctx/detectors/anthropic-python";

registerDetectorPlugin(anthropicPythonPlugin);
```

### 2. Run instrument

Preview changes without touching any files:

```bash
autoctx instrument --dry-run
```

Apply changes on a new branch for review:

```bash
autoctx instrument --apply --branch autoctx/instrument
```

### 3. Review the PR

The instrument command opens a branch. Open the PR and review the diff — you
will see your `Anthropic(...)` calls wrapped with `instrument_client(...)`.
Edit the generated TODO comment to point at your `FileSink`:

```python
# Before (generated):
client = instrument_client(Anthropic(), sink=None)  # TODO: pass your TraceSink here

# After (your edit):
from autocontext.integrations.anthropic import instrument_client, FileSink
sink = FileSink("./traces/anthropic.jsonl")
client = instrument_client(Anthropic(), sink=sink)
```

Merge the PR.

### 4. Customer code emits traces

Your code is unchanged beyond the wrap. Every `messages.create` call now emits
a JSONL trace line to your sink:

```python
import anthropic
from autocontext.integrations.anthropic import instrument_client, FileSink, autocontext_session

sink = FileSink("./traces/anthropic.jsonl")
client = instrument_client(anthropic.Anthropic(), sink=sink)

with autocontext_session({"userId": "u_123"}):
    response = client.messages.create(
        model="claude-opus-4-7-20251101",
        max_tokens=256,
        messages=[{"role": "user", "content": "Hello!"}],
    )
    print(response.content[0].text)

sink.close()
```

Emitted trace line (pretty-printed for readability):

```jsonl
{
  "schemaVersion": "1.0",
  "traceId": "...",
  "sessionContext": {
    "userId": "u_123"
  },
  "request": {
    "model": "claude-opus-4-7-20251101",
    "messages": [
      {
        "role": "user",
        "content": "Hello!"
      }
    ]
  },
  "response": {
    "id": "...",
    "content": [
      {
        "type": "text",
        "text": "Hi! How can I help?"
      }
    ],
    "stop_reason": "end_turn",
    "usage": {
      "input_tokens": 9,
      "output_tokens": 7
    }
  },
  "durationMs": 342,
  "errorReason": null
}
```

For the TypeScript equivalent, see `ts/src/integrations/anthropic/STABILITY.md`.

## Additional Docs

- [Canonical concept model](../docs/concept-model.md)
- [Agent integration guide](docs/agent-integration.md) — CLI-first integration for external agents, MCP fallback, JSON output reference
- [Sandbox modes](docs/sandbox.md)
- [Persistent host worker](docs/persistent-host.md)
- [MLX host training](docs/mlx-training.md)
- [TypeScript package guide](../ts/README.md) — `analyze`, mission control, and interactive TUI surfaces
- [Demo data notes](demo_data/README.md)
- [Copy-paste examples](../examples/README.md)
- [Change history](../CHANGELOG.md)
- [Repository overview](../README.md)


================================================
FILE: autocontext/assets/banner.txt
================================================
                          .                                                 .                             .
                        .o8                                               .o8                           .o8
 .oooo.   oooo  oooo  .o888oo  .ooooo.   .ooooo.   .ooooo.  ooo. .oo.   .o888oo  .ooooo.  oooo    ooo .o888oo
`P  )88b  `888  `888    888   d88' `88b d88' `"Y8 d88' `88b `888P"Y88b    888   d88' `88b  `88b..8P'    888
 .oP"888   888   888    888   888   888 888       888   888  888   888    888   888ooo888    Y888'      888
d8(  888   888   888    888 . 888   888 888   .o8 888   888  888   888    888 . 888    .o  .o8"'88b     888 .
`Y888""8o  `V88V"V8P'   "888" `Y8bod8P' `Y8bod8P' `Y8bod8P' o888o o888o   "888" `Y8bod8P' o88'   888o   "888"


================================================
FILE: autocontext/assets/whats_new.txt
================================================
**Plain-language CLI continuity** lets Python and TypeScript callers use positional goals/scenarios, `--iterations`, and run-scoped exports while preserving the existing flag forms.
**Hermes Agent integration** adds read-only Hermes v0.12 inspection plus an exportable CLI-first `autocontext` skill for Hermes agents.
**Packaged CLI startup** no longer crashes when installed without banner assets.
**Release alignment** bumps Python `autocontext` and npm `autoctx` to `0.5.0`, with `pi-autocontext` moving to `0.2.4` on its own lower-numbered line.


================================================
FILE: autocontext/demo_data/README.md
================================================
# Demo Data

This directory can hold pre-generated runs for demos where live execution time is constrained.

Use:

```bash
uv run autoctx run --scenario grid_ctf --gens 3 --run-id demo_seed_grid
uv run autoctx run --scenario othello --gens 2 --run-id demo_seed_othello
```

Then copy selected run folders from `runs/` into this directory if needed for offline presentations.


================================================
FILE: autocontext/docs/agent-integration.md
================================================
# External Agent Integration Guide

autocontext provides three integration surfaces for external agents: the `autoctx` CLI, an MCP server, and a Python SDK. This guide covers them in order of recommended usage.

For the canonical user-facing and runtime vocabulary behind those surfaces, see [../../docs/concept-model.md](../../docs/concept-model.md).

## Why CLI-First

The `autoctx` CLI is the default integration surface for external agents. Unix-style CLI interfaces are a natural fit for LLM agents:

- **Everything is text.** Commands accept text arguments and return text output. No serialization protocol to negotiate.
- **Commands compose cleanly.** Pipe, redirect, chain with `&&` — standard shell patterns that agents already handle well.
- **Success and failure are explicit.** Exit code 0 means success; non-zero means failure. No ambiguous status fields to parse.
- **stdout/stderr separation is a proven machine-usable contract.** Data goes to stdout, diagnostics and errors go to stderr.
- **Agents already perform well with shell-style interaction patterns.** Most LLM agents have extensive training on CLI usage.

In practice, users have reported better experiences integrating via the CLI than via MCP. The CLI is simpler to set up, easier to debug, and more predictable.

## CLI Integration Patterns

### Machine-Readable Output (`--json`)

Most `autoctx` commands accept a `--json` flag that switches output to structured JSON:

```bash
# Structured JSON to stdout
autoctx list --json
autoctx status <run_id> --json
autoctx run grid_ctf --iterations 3 --json
autoctx export <run_id> --json
autoctx train --scenario grid_ctf --data data.jsonl --json
```

**Contract:**

- **stdout** receives the JSON payload (one JSON object per line).
- **stderr** receives errors in the format `{"error": "description"}`.
- **Exit code 0** means the command succeeded. The JSON payload is on stdout.
- **Exit code 1** means the command failed. An error JSON is on stderr.

### Command Reference

#### `autoctx run` — Execute a scenario

```bash
# Game scenario (tournament-based)
autoctx run grid_ctf --iterations 5 --run-id my_run --json

# Agent task scenario (judge-based evaluation)
autoctx run my_agent_task --iterations 3 --json
```

JSON output shape:

```json
{
  "run_id": "my_run",
  "scenario": "grid_ctf",
  "best_score": 0.85,
  "generations_executed": 5,
  "current_elo": 1523.4
}
```

#### `autoctx status` — Check run progress

```bash
autoctx status <run_id> --json
```

JSON output shape:

```json
{
  "run_id": "abc123",
  "generations": [
    {
      "generation": 1,
      "mean_score": 0.72,
      "best_score": 0.85,
      "elo": 1523.4,
      "wins": 3,
      "losses": 2,
      "gate_decision": "advance",
      "status": "completed"
    }
  ]
}
```

The TypeScript CLI also includes an optional `runtime_session` object in
`status`, `show`, and `watch --json` output when a CLI-backed provider run has a
persisted runtime-session event log. Python runtime-backed `run` and `solve`
role calls write the same run-scoped log automatically. Use
`autoctx runtime-sessions show
--run-id <run_id> --json` to inspect the recorded provider prompts, messages,
and child-task events. Use `autoctx runtime-sessions timeline --run-id
<run_id> --json` for the operator-facing grouped prompt/response and child-task
timeline. TypeScript MCP clients can inspect the same logs and timeline with
`list_runtime_sessions`, `get_runtime_session`, and
`get_runtime_session_timeline` using either `sessionId` or `runId`. Python MCP
clients can use the prefixed `autocontext_list_runtime_sessions`,
`autocontext_get_runtime_session`, and
`autocontext_get_runtime_session_timeline` tools, or the same unprefixed aliases.
Python and TypeScript HTTP/cockpit clients can inspect them with
`GET /api/cockpit/runtime-sessions`,
`GET /api/cockpit/runtime-sessions/:session_id`, and
`GET /api/cockpit/runs/:run_id/runtime-session`; timeline views are available
at `GET /api/cockpit/runtime-sessions/:session_id/timeline` and
`GET /api/cockpit/runs/:run_id/runtime-session/timeline`. Cockpit run list, status, and
resume responses include `runtime_session` (a summary or `null`) and
`runtime_session_url` so UI clients can discover the full log without deriving
paths. TypeScript `/ws/events` also streams live `runtime_session_event`
envelopes on the `runtime_session` channel, with the current session summary and
newly appended event in each payload.

In the TypeScript interactive TUI, `/timeline <run_id>` renders the same
operator-facing runtime-session timeline; `/timeline` uses the active run id
when one is available. The TUI recent-activity feed also summarizes live
runtime-session prompt, assistant, shell, tool, and child-task events as they
arrive. Operators can run
`/activity [status|reset|<all|runtime|prompts|commands|children|errors> [quiet|normal|verbose]]`
to focus that live feed and tune event detail while a run is active. The TUI
saves those activity settings in the resolved autoctx config directory and
reloads them on restart; `/activity reset` clears the saved preference and
returns the feed to `all normal`. On startup, Recent Activity logs the loaded
activity setting before the command help. Bare `/activity` and `/activity status`
report the current setting without rewriting the saved preference.

#### `autoctx list` — List recent runs

```bash
autoctx list --json
```

Returns an array of run summaries:

```json
[
  {
    "run_id": "abc123",
    "scenario": "grid_ctf",
    "target_generations": 5,
    "executor_mode": "local",
    "status": "completed",
    "created_at": "2026-03-13T10:00:00"
  }
]
```

#### Monitoring long-running work

For run completion, external agents should still poll `autoctx status --json` (and related read surfaces such as `list --json`) until the desired condition is visible.

Simple polling pattern:

```bash
while true; do
  current=$(autoctx status "$RUN_ID" --json)
  state=$(echo "$current" | jq -r '.generations[-1].status // "unknown"')
  if [ "$state" = "completed" ] || [ "$state" = "failed" ]; then
    break
  fi
  sleep 5
done
```

If you are waiting on a monitor condition instead of a run status transition, the Python CLI also exposes `autoctx wait`:

```bash
autoctx wait <condition_id> --timeout 30 --json
```

JSON output shape on success:

```json
{
  "fired": true,
  "condition_id": "cond_123",
  "alert": {
    "detail": "score dropped below threshold"
  }
}
```

JSON output shape on timeout:

```json
{
  "fired": false,
  "condition_id": "cond_123",
  "timeout_seconds": 30
}
```

#### `autoctx export` — Export a strategy package

```bash
autoctx export <run_id> --output pkg.json --json
```

JSON output shape:

```json
{
  "scenario": "grid_ctf",
  "output_path": "pkg.json",
  "best_score": 0.92,
  "lessons_count": 12,
  "harness_count": 3
}
```

For Pi-local package installation, export the same strategy knowledge as a
package directory with a `package.json`, one `SKILL.md`, one prompt file, and
the original autocontext strategy payload:

```bash
autoctx export \
  --scenario grid_ctf \
  --format pi-package \
  --output grid-ctf-pi-package \
  --json
```

#### `autoctx train` — Run a training loop

```bash
autoctx train --scenario grid_ctf --data training.jsonl --backend mlx --time-budget 300 --json
# On a CUDA host with CUDA-enabled PyTorch:
autoctx train --scenario grid_ctf --data training.jsonl --backend cuda --time-budget 300 --json
```

CUDA training currently publishes checkpoint artifacts for inspection and later serving work; it does not auto-route the resulting `model.pt` bundle as a live provider model.

JSON output shape:

```json
{
  "scenario": "grid_ctf",
  "total_experiments": 8,
  "kept_count": 5,
  "discarded_count": 3,
  "best_score": 0.89,
  "checkpoint_path": "workspace/checkpoint.pt"
}
```

#### `autoctx import-package` — Import a strategy package

```bash
autoctx import-package --file grid_ctf_package.json --json
```

JSON output shape:

```json
{
  "scenario_name": "grid_ctf",
  "playbook_written": true,
  "hints_written": true,
  "skill_written": true,
  "harness_written": 2,
  "harness_skipped": 0,
  "conflict_policy": "merge"
}
```

#### `autoctx hermes` — Inspect Hermes and export the Hermes skill

```bash
# Read-only inventory of Hermes v0.12 skills, usage telemetry, and Curator reports
autoctx hermes inspect --json

# Inspect a non-default profile
autoctx hermes inspect --home "$HERMES_HOME" --json

# Export the Hermes autocontext skill for Hermes to load
autoctx hermes export-skill --output ~/.hermes/skills/autocontext/SKILL.md --json

# Also write progressive-disclosure reference files next to SKILL.md (AC-702)
autoctx hermes export-skill \
    --output ~/.hermes/skills/autocontext/SKILL.md \
    --with-references --json

# Ingest Hermes curator run reports as autocontext ProductionTrace JSONL (AC-704)
autoctx hermes ingest-curator \
    --home ~/.hermes \
    --output traces/hermes-curator.jsonl \
    [--since 2026-05-01T00:00:00Z] \
    [--limit 100] \
    [--include-llm-final] \
    [--include-tool-args] \
    --json

# Export Curator decisions as training JSONL for narrow advisors (AC-705)
autoctx hermes export-dataset --kind curator-decisions \
  --home "$HERMES_HOME" \
  --output training/hermes-curator-decisions.jsonl \
  --since 2026-05-01T00:00:00Z --limit 5000 --json

# Ingest Hermes trajectory JSONL with redaction (AC-706 slice 1)
autoctx hermes ingest-trajectories \
  --input "$HERMES_HOME/trajectory_samples.jsonl" \
  --output training/hermes-trajectories-redacted.jsonl \
  --redact standard --json

# Strict mode with caller-supplied regexes; --dry-run reports counts only
autoctx hermes ingest-trajectories \
  --input "$HERMES_HOME/trajectory_samples.jsonl" \
  --output training/hermes-trajectories-redacted.jsonl \
  --redact strict \
  --user-patterns '[{"name":"ticket","pattern":"TKT-\\d+"}]' \
  --dry-run --json

# Ingest Hermes session DB into ProductionTrace JSONL (AC-706 slice 2)
autoctx hermes ingest-sessions \
  --home "$HERMES_HOME" \
  --output traces/hermes-sessions.jsonl \
  --redact standard --json

# Train a baseline curator advisor from AC-705 JSONL (AC-708 slice 1)
autoctx hermes train-advisor \
  --data training/hermes-curator-decisions.jsonl \
  --baseline \
  --output training/advisor-metrics.json --json

# Emit read-only recommendations against a live Hermes home (AC-709)
autoctx hermes recommend \
  --home "$HERMES_HOME" \
  --baseline-from training/hermes-curator-decisions.jsonl \
  --output recommendations.jsonl --json
```

`--with-references` writes one markdown file per reference into a
sibling `references/` directory (`hermes-curator.md`,
`cli-workflows.md`, `mcp-workflows.md`, `local-training.md`). Use
`--force` to overwrite an existing `SKILL.md` or any colliding
reference file; without `--force`, all destinations are checked up
front and the command refuses without writing anything, so an
operator never ends up with a half-installed skill bundle.

`ingest-curator` is read-only against `~/.hermes`. Privacy defaults:
`--include-llm-final` (off) gates whether the curator's LLM final
summary is attached as an assistant message;
`--include-tool-args` (off) gates whether raw tool-call args are
preserved. `--since` rejects unparseable timestamps with a clear
error and also applies to runs whose `started_at` is missing (file
mtime is the fallback comparison timestamp). The JSON summary reports
`runs_read`, `traces_written`, `skipped`, and per-run `warnings`.

`export-dataset` flags:

- `--kind curator-decisions` (shipped). Other documented kinds
  (`consolidation-pairs`, `skill-selection`, `skill-quality-signals`)
  raise `NotImplementedError` until their slices land.
- `--since <ISO-8601>`: skip curator runs strictly before this
  timestamp. Invalid timestamps raise `ValueError`; runs without a
  `started_at` field fall back to file mtime for the comparison.
- `--limit <int>`: cap the number of training examples written.

Behavior notes:

- Strong labels only: `consolidated`, `pruned`, `archived`, `added`
  are emitted with `confidence: "strong"`.
- Pinned skills (`.usage.json` `pinned: true`), bundled
  (`.bundled_manifest`), and hub-installed (`.hub/lock.json`) skills
  are protected: they never appear as mutation targets, even when no
  active SKILL.md folder is present.
- Both Hermes v0.12 action shapes are accepted: a list of strings or
  a list of `{"name": ...}` objects.

`ingest-trajectories` flags:

- `--input <jsonl>`: source file. Required.
- `--output <jsonl>`: destination for the redacted JSONL. Created
  (with parents) if missing; ignored when `--dry-run` is set.
- `--redact off | standard | strict` (default `standard`): redaction
  mode. `strict` requires `--user-patterns`. `off` writes raw
  content and surfaces a CLI warning since AC-706 requires explicit
  operator opt-in for raw content.
- `--user-patterns <json>`: JSON array of `{name, pattern}` regex
  objects. Hits are tagged `[REDACTED_USER_PATTERN:<name>]` so
  downstream consumers can tell distinct user patterns apart.
- `--limit <int>`: cap on trajectories written.
- `--dry-run`: count and redact without writing the output.

Per-line tolerance: malformed JSON lines, non-object lines, and
blank lines are skipped with per-line warnings rather than aborting
the whole import. The input file is never mutated; same-path
`--input`/`--output` is rejected at the boundary.

`ingest-sessions` flags (AC-706 slice 2):

- `--home <path>`: Hermes home directory. Default `HERMES_HOME` or
  `~/.hermes`. The DB at `<home>/state.db` is opened read-only via
  SQLite URI `mode=ro`; missing DB returns an empty summary.
- `--output <jsonl>`: destination for the ProductionTrace JSONL.
- `--redact`, `--user-patterns`, `--limit`, `--dry-run`: same
  semantics as `ingest-trajectories`; the redaction policy is
  shared between the two ingesters.
- `--since <ISO-8601>`: skip sessions with `started_at` strictly
  before. Invalid timestamps raise `ValueError`.

Schema-drift posture: the repository reads only the columns it
needs (`session_id`, `started_at`, `ended_at`, `agent_id`,
`metadata` on `sessions`; `session_id`, `seq`, `role`, `content`,
`timestamp`, `metadata` on `messages`). Extra columns are ignored;
missing optional columns are tolerated. WAL/SHM sidecars are not
required. The importer never writes to the Hermes DB.

`train-advisor` flags (AC-708 slice 1):

- `--data <jsonl>`: AC-705 `curator-decisions` export to train and
  evaluate on. Required.
- `--baseline`: train the majority-class baseline advisor (the only
  kind shipped in slice 1; logistic-regression / MLX / CUDA
  backends arrive in slice 2).
- `--output <json>`: optional metrics destination on disk; `--json`
  still prints to stdout.

Loader posture: per-line tolerant (malformed JSON, missing fields,
unknown labels skip the row). Metrics surface `accuracy`, per-label
`precision` / `recall` / `support`, and an `insufficient_data` flag
that fires below `INSUFFICIENT_DATA_THRESHOLD` (20) examples so a
small Hermes home does not act on noise. The baseline accuracy is
the floor any later trained advisor must beat.

`recommend` flags (AC-709):

- `--home <path>`: Hermes home to inspect. Read-only; the surface
  never writes to `~/.hermes`.
- `--baseline-from <jsonl>`: AC-705 export to train the baseline
  advisor on. The same-file guard rejects `--output` equal to
  `--baseline-from`.
- `--output <jsonl>`: destination for the recommendation rows. One
  row per recommendation: `skill_name`, `predicted_action`,
  `confidence: "advisory"`, `status: actionable | protected`,
  `features` (the inference inputs), and `reason` (per-advisor
  rationale; baseline reads "baseline majority class (<label>)").
- `--include-protected`: surface pinned / bundled / hub skills as
  well, tagged `status="protected"`. Default omits them so
  downstream consumers cannot accidentally act on upstream-owned or
  operator-pinned content.

Read-only invariant: Curator stays the mutation owner. The
recommendation surface emits suggestions; applying them is the
operator's call (or Curator's, when AC-708 slice 2 wires the
trained advisor through). Until trained backends ship, the
baseline produces majority-class recommendations only — useful for
plumbing validation, not for acting on.

JSON output shape for `inspect`:

```json
{
  "hermes_home": "/Users/alice/.hermes",
  "skill_count": 12,
  "agent_created_skill_count": 4,
  "bundled_skill_count": 7,
  "hub_skill_count": 1,
  "pinned_skill_count": 2,
  "archived_skill_count": 3,
  "skills": [],
  "curator": {
    "run_count": 2,
    "latest": {
      "counts": {
        "consolidated_this_run": 1,
        "pruned_this_run": 0
      }
    }
  }
}
```

`autoctx hermes inspect` does not mutate `~/.hermes`. Treat Hermes Curator as the owner of Hermes skill lifecycle changes; use this command for read-only analysis, dataset planning, and recommendations.

### Error Handling

All commands follow the same error contract when `--json` is passed:

```bash
# On error, stderr receives:
{"error": "Run 'xyz' not found"}
# And the exit code is 1
```

Without `--json`, errors appear as formatted Rich console output on stderr.

### Provider Configuration

Configure which LLM provider autocontext uses via environment variables:

```bash
# Anthropic (default)
AUTOCONTEXT_AGENT_PROVIDER=anthropic \
ANTHROPIC_API_KEY=sk-ant-... \
autoctx run my_task --json

# OpenAI-compatible
AUTOCONTEXT_AGENT_PROVIDER=openai-compatible \
AUTOCONTEXT_JUDGE_PROVIDER=openai-compatible \
AUTOCONTEXT_JUDGE_API_KEY=sk-... \
AUTOCONTEXT_JUDGE_BASE_URL=https://api.openai.com/v1 \
autoctx run my_task --json

# Ollama (local, no API key needed)
AUTOCONTEXT_AGENT_PROVIDER=ollama \
AUTOCONTEXT_JUDGE_PROVIDER=ollama \
autoctx run my_task --json

# Hermes (via OpenAI-compatible gateway)
AUTOCONTEXT_AGENT_PROVIDER=openai-compatible \
AUTOCONTEXT_AGENT_BASE_URL=http://localhost:8080/v1 \
AUTOCONTEXT_AGENT_API_KEY=hermes-key \
AUTOCONTEXT_AGENT_DEFAULT_MODEL=hermes-3-llama-3.1-8b \
autoctx run my_task --json

# Hermes for both agent and judge
AUTOCONTEXT_AGENT_PROVIDER=openai-compatible \
AUTOCONTEXT_AGENT_BASE_URL=http://localhost:8080/v1 \
AUTOCONTEXT_AGENT_API_KEY=hermes-key \
AUTOCONTEXT_AGENT_DEFAULT_MODEL=hermes-3-llama-3.1-8b \
AUTOCONTEXT_JUDGE_PROVIDER=openai-compatible \
AUTOCONTEXT_JUDGE_BASE_URL=http://localhost:8080/v1 \
AUTOCONTEXT_JUDGE_API_KEY=hermes-key \
AUTOCONTEXT_JUDGE_MODEL=hermes-3-llama-3.1-70b \
autoctx run my_task --json

# Pi CLI (local Pi agent runtime)
AUTOCONTEXT_AGENT_PROVIDER=pi \
AUTOCONTEXT_PI_COMMAND=pi \
AUTOCONTEXT_PI_TIMEOUT=120 \
autoctx run my_task --json

# Pi RPC (Pi subprocess via `pi --mode rpc` JSONL)
AUTOCONTEXT_AGENT_PROVIDER=pi-rpc \
AUTOCONTEXT_PI_COMMAND=pi \
autoctx run my_task --json

# Optional: keep Pi deterministic by ignoring AGENTS.md / CLAUDE.md context files
AUTOCONTEXT_PI_NO_CONTEXT_FILES=true

# Optional: run with a Pi-shaped lean harness profile
AUTOCONTEXT_HARNESS_PROFILE=lean
AUTOCONTEXT_LEAN_CONTEXT_BUDGET_TOKENS=32000
AUTOCONTEXT_LEAN_TOOL_ALLOWLIST=read,bash,edit,write
AUTOCONTEXT_PI_RPC_PERSISTENT=true

# Role-scoped override: competitor uses a separate gateway/key
AUTOCONTEXT_AGENT_PROVIDER=anthropic \
ANTHROPIC_API_KEY=sk-ant-primary \
AUTOCONTEXT_COMPETITOR_PROVIDER=openai-compatible \
AUTOCONTEXT_COMPETITOR_API_KEY=sk-role \
AUTOCONTEXT_COMPETITOR_BASE_URL=http://localhost:8000/v1 \
autoctx run my_task --json
```

`ANTHROPIC_API_KEY` is the preferred Anthropic credential env var. `AUTOCONTEXT_ANTHROPIC_API_KEY` remains supported as a compatibility alias.

Key environment variables:

| Variable                                                             | Purpose                                                                                                                                                                                                                                                                                             |
| -------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `AUTOCONTEXT_AGENT_PROVIDER`                                         | Agent provider: `anthropic`, `openai-compatible`, `ollama`, `vllm`, `pi`, `pi-rpc`, `deterministic`                                                                                                                                                                                                 |
| `AUTOCONTEXT_AGENT_API_KEY`                                          | Global agent API key override (or use provider-native env vars such as `ANTHROPIC_API_KEY`)                                                                                                                                                                                                         |
| `AUTOCONTEXT_AGENT_BASE_URL`                                         | Global base URL for OpenAI-compatible agent endpoints                                                                                                                                                                                                                                               |
| `AUTOCONTEXT_COMPETITOR_API_KEY` / `AUTOCONTEXT_COMPETITOR_BASE_URL` | Optional competitor-specific credential and endpoint override                                                                                                                                                                                                                                       |
| `AUTOCONTEXT_ANALYST_API_KEY` / `AUTOCONTEXT_ANALYST_BASE_URL`       | Optional analyst-specific credential and endpoint override                                                                                                                                                                                                                                          |
| `AUTOCONTEXT_COACH_API_KEY` / `AUTOCONTEXT_COACH_BASE_URL`           | Optional coach-specific credential and endpoint override                                                                                                                                                                                                                                            |
| `AUTOCONTEXT_ARCHITECT_API_KEY` / `AUTOCONTEXT_ARCHITECT_BASE_URL`   | Optional architect-specific credential and endpoint override                                                                                                                                                                                                                                        |
| `AUTOCONTEXT_JUDGE_PROVIDER`                                         | Judge provider (defaults to `auto`: inherit a runtime-bridged role/agent provider, else fall back to `anthropic`)                                                                                                                                                                                   |
| `AUTOCONTEXT_JUDGE_API_KEY`                                          | API key for the judge provider                                                                                                                                                                                                                                                                      |
| `AUTOCONTEXT_JUDGE_BASE_URL`                                         | Base URL for OpenAI-compatible judge endpoints                                                                                                                                                                                                                                                      |
| `AUTOCONTEXT_JUDGE_MODEL`                                            | Override judge model name                                                                                                                                                                                                                                                                           |
| `AUTOCONTEXT_CLAUDE_MODEL`                                           | Claude CLI model alias (default: `sonnet`)                                                                                                                                                                                                                                                          |
| `AUTOCONTEXT_CLAUDE_TIMEOUT`                                         | Claude CLI execution timeout in seconds (default: 600)                                                                                                                                                                                                                                              |
| `AUTOCONTEXT_CLAUDE_MAX_RETRIES`                                     | Claude CLI timeout retry budget per provider invocation (default: 2)                                                                                                                                                                                                                                |
| `AUTOCONTEXT_CLAUDE_RETRY_BACKOFF_SECONDS`                           | Initial Claude CLI timeout retry backoff in seconds (default: 0.25)                                                                                                                                                                                                                                 |
| `AUTOCONTEXT_CLAUDE_RETRY_BACKOFF_MULTIPLIER`                        | Claude CLI timeout retry backoff multiplier (default: 2.0)                                                                                                                                                                                                                                          |
| `AUTOCONTEXT_CLAUDE_MAX_TOTAL_SECONDS`                               | Wall-clock ceiling on total Claude CLI runtime, applied both inside a single retry sequence and across all `ClaudeCLIRuntime` invocations via the attached `RuntimeBudget`. Default `0` (off, opt-in). When set > 0, also bounds retry backoff sleeps so they cannot push the runtime past the cap. |
| `AUTOCONTEXT_MODEL_COMPETITOR`                                       | Override competitor agent model                                                                                                                                                                                                                                                                     |
| `AUTOCONTEXT_DB_PATH`                                                | SQLite database path                                                                                                                                                                                                                                                                                |
| `AUTOCONTEXT_PI_COMMAND`                                             | Path to Pi CLI binary (default: `pi`)                                                                                                                                                                                                                                                               |
| `AUTOCONTEXT_PI_TIMEOUT`                                             | Pi CLI execution timeout in seconds (default: 120)                                                                                                                                                                                                                                                  |
| `AUTOCONTEXT_PI_WORKSPACE`                                           | Pi CLI working directory                                                                                                                                                                                                                                                                            |
| `AUTOCONTEXT_PI_MODEL`                                               | Manual Pi model override (pins a specific checkpoint/path)                                                                                                                                                                                                                                          |
| `AUTOCONTEXT_PI_NO_CONTEXT_FILES`                                    | Disable Pi context file loading (`AGENTS.md`, `CLAUDE.md`) for deterministic/eval-style runs                                                                                                                                                                                
Download .txt
gitextract_h_7uap2s/

├── .env.example
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   ├── config.yml
│   │   └── feature_request.md
│   ├── PULL_REQUEST_TEMPLATE.md
│   └── workflows/
│       ├── ci.yml
│       ├── publish-pi-autocontext.yml
│       ├── publish-python.yml
│       └── publish-ts.yml
├── .gitignore
├── .prettierrc.json
├── AGENTS.md
├── CHANGELOG.md
├── CLAUDE.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── SECURITY.md
├── SUPPORT.md
├── autocontext/
│   ├── README.md
│   ├── assets/
│   │   ├── banner.txt
│   │   └── whats_new.txt
│   ├── demo_data/
│   │   └── README.md
│   ├── docs/
│   │   ├── agent-integration.md
│   │   ├── extensions.md
│   │   ├── fixture-loader.md
│   │   ├── mlx-training.md
│   │   ├── persistent-host.md
│   │   └── sandbox.md
│   ├── migrations/
│   │   ├── 001_initial.sql
│   │   ├── 002_phase3_phase7.sql
│   │   ├── 003_agent_subagent_metadata.sql
│   │   ├── 004_knowledge_inheritance.sql
│   │   ├── 005_ecosystem_provider_tracking.sql
│   │   ├── 006_human_feedback.sql
│   │   ├── 007_task_queue.sql
│   │   ├── 008_staged_validation.sql
│   │   ├── 009_generation_timing.sql
│   │   ├── 010_consultation_log.sql
│   │   ├── 010_session_notebook.sql
│   │   ├── 011_monitors.sql
│   │   ├── 012_research_hub.sql
│   │   ├── 013_generation_dimension_summary.sql
│   │   ├── 014_scoring_backend_metadata.sql
│   │   └── 015_match_replay.sql
│   ├── pyproject.toml
│   ├── pyrightconfig.json
│   ├── scripts/
│   │   ├── check_no_python_postinstall.py
│   │   ├── check_python_no_telemetry.py
│   │   ├── check_python_offline_install.py
│   │   ├── check_python_reproducible_wheel.py
│   │   ├── drive_anthropic_parity_fixture.py
│   │   └── drive_parity_fixture.py
│   ├── skills/
│   │   └── grid-ctf-ops/
│   │       ├── SKILL.md
│   │       └── playbook.md
│   ├── smoke_test.py
│   ├── smoke_test_loop.py
│   ├── src/
│   │   └── autocontext/
│   │       ├── __init__.py
│   │       ├── agentos/
│   │       │   ├── __init__.py
│   │       │   └── types.py
│   │       ├── agents/
│   │       │   ├── __init__.py
│   │       │   ├── agent_sdk_client.py
│   │       │   ├── analyst.py
│   │       │   ├── architect.py
│   │       │   ├── coach.py
│   │       │   ├── competitor.py
│   │       │   ├── contracts.py
│   │       │   ├── curator.py
│   │       │   ├── feedback_loops.py
│   │       │   ├── hint_feedback.py
│   │       │   ├── llm_client.py
│   │       │   ├── model_router.py
│   │       │   ├── orchestrator.py
│   │       │   ├── parsers.py
│   │       │   ├── pipeline_adapter.py
│   │       │   ├── provider_bridge.py
│   │       │   ├── role_router.py
│   │       │   ├── role_runtime_overrides.py
│   │       │   ├── runtime_session_wiring.py
│   │       │   ├── skeptic.py
│   │       │   ├── subagent_runtime.py
│   │       │   ├── translator.py
│   │       │   ├── translator_simplification.py
│   │       │   ├── trial_summary.py
│   │       │   └── types.py
│   │       ├── analytics/
│   │       │   ├── __init__.py
│   │       │   ├── aggregate_runner.py
│   │       │   ├── artifact_rendering.py
│   │       │   ├── calibration.py
│   │       │   ├── clustering.py
│   │       │   ├── correlation.py
│   │       │   ├── credit_assignment.py
│   │       │   ├── cross_runtime_trace_findings.py
│   │       │   ├── events_to_trace.py
│   │       │   ├── extractor.py
│   │       │   ├── facets.py
│   │       │   ├── html_artifact_shell.py
│   │       │   ├── issue_generator.py
│   │       │   ├── issue_store.py
│   │       │   ├── regression_fixtures.py
│   │       │   ├── rubric_drift.py
│   │       │   ├── run_trace.py
│   │       │   ├── runtime_session_run_trace.py
│   │       │   ├── store.py
│   │       │   ├── taxonomy.py
│   │       │   ├── timeline_inspector.py
│   │       │   └── trace_reporter.py
│   │       ├── artifacts/
│   │       │   ├── __init__.py
│   │       │   └── models.py
│   │       ├── banner.py
│   │       ├── blobstore/
│   │       │   ├── __init__.py
│   │       │   ├── cache.py
│   │       │   ├── factory.py
│   │       │   ├── hf_bucket.py
│   │       │   ├── local.py
│   │       │   ├── mirror.py
│   │       │   ├── ref.py
│   │       │   ├── registry.py
│   │       │   ├── store.py
│   │       │   └── sync.py
│   │       ├── bootstrap/
│   │       │   ├── __init__.py
│   │       │   ├── collector.py
│   │       │   ├── redactor.py
│   │       │   ├── renderer.py
│   │       │   └── snapshot.py
│   │       ├── cli.py
│   │       ├── cli_analytics.py
│   │       ├── cli_family_name.py
│   │       ├── cli_hermes.py
│   │       ├── cli_hermes_runners.py
│   │       ├── cli_improve.py
│   │       ├── cli_investigate.py
│   │       ├── cli_new_scenario.py
│   │       ├── cli_queue.py
│   │       ├── cli_role_runtime.py
│   │       ├── cli_runtime_overrides.py
│   │       ├── cli_solve.py
│   │       ├── cli_task_input.py
│   │       ├── cli_worker.py
│   │       ├── concepts.py
│   │       ├── config/
│   │       │   ├── __init__.py
│   │       │   ├── harness_profile.py
│   │       │   ├── presets.py
│   │       │   ├── settings.py
│   │       │   └── tuning_bounds.py
│   │       ├── consultation/
│   │       │   ├── __init__.py
│   │       │   ├── runner.py
│   │       │   ├── stage.py
│   │       │   ├── triggers.py
│   │       │   └── types.py
│   │       ├── evaluation/
│   │       │   ├── __init__.py
│   │       │   ├── ab_runner.py
│   │       │   └── ab_stats.py
│   │       ├── evidence/
│   │       │   ├── __init__.py
│   │       │   ├── manifest.py
│   │       │   ├── materializer.py
│   │       │   ├── tracker.py
│   │       │   └── workspace.py
│   │       ├── execution/
│   │       │   ├── __init__.py
│   │       │   ├── action_filter.py
│   │       │   ├── agent_task_evolution.py
│   │       │   ├── ast_safety.py
│   │       │   ├── bias_probes.py
│   │       │   ├── evaluator_guardrail.py
│   │       │   ├── executors/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── base.py
│   │       │   │   ├── gondolin_contract.py
│   │       │   │   ├── local.py
│   │       │   │   ├── monty.py
│   │       │   │   ├── primeintellect.py
│   │       │   │   └── ssh.py
│   │       │   ├── harness_coverage.py
│   │       │   ├── harness_loader.py
│   │       │   ├── harness_synthesizer.py
│   │       │   ├── harness_tester.py
│   │       │   ├── improvement_events.py
│   │       │   ├── improvement_loop.py
│   │       │   ├── judge.py
│   │       │   ├── judge_executor.py
│   │       │   ├── objective_verification.py
│   │       │   ├── output_cleaner.py
│   │       │   ├── output_verifier.py
│   │       │   ├── phased_execution.py
│   │       │   ├── policy_executor.py
│   │       │   ├── policy_refinement.py
│   │       │   ├── queued_task_browser_context.py
│   │       │   ├── rubric_calibration.py
│   │       │   ├── rubric_coherence.py
│   │       │   ├── sample_states.py
│   │       │   ├── simple_agent_task_workflow.py
│   │       │   ├── strategy_validator.py
│   │       │   ├── supervisor.py
│   │       │   ├── task_queue_store.py
│   │       │   ├── task_runner.py
│   │       │   ├── trajectory_harness.py
│   │       │   └── verification_dataset.py
│   │       ├── extensions/
│   │       │   ├── __init__.py
│   │       │   ├── hooks.py
│   │       │   ├── llm.py
│   │       │   └── loader.py
│   │       ├── harness/
│   │       │   ├── __init__.py
│   │       │   ├── adapt/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── applicator.py
│   │       │   │   └── types.py
│   │       │   ├── audit/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── types.py
│   │       │   │   └── writer.py
│   │       │   ├── core/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── controller.py
│   │       │   │   ├── events.py
│   │       │   │   ├── llm_client.py
│   │       │   │   ├── output_parser.py
│   │       │   │   ├── subagent.py
│   │       │   │   └── types.py
│   │       │   ├── cost/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── calculator.py
│   │       │   │   ├── tracker.py
│   │       │   │   └── types.py
│   │       │   ├── evaluation/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── dimensional.py
│   │       │   │   ├── failure_report.py
│   │       │   │   ├── protocol.py
│   │       │   │   ├── runner.py
│   │       │   │   ├── scenario_evaluator.py
│   │       │   │   ├── self_play.py
│   │       │   │   └── types.py
│   │       │   ├── meta/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── advisor.py
│   │       │   │   ├── collector.py
│   │       │   │   ├── profiler.py
│   │       │   │   └── types.py
│   │       │   ├── meta_optimizer.py
│   │       │   ├── mutations/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── applier.py
│   │       │   │   ├── gate.py
│   │       │   │   ├── parser.py
│   │       │   │   ├── spec.py
│   │       │   │   └── store.py
│   │       │   ├── optimizer/
│   │       │   │   ├── __init__.py
│   │       │   │   └── pareto.py
│   │       │   ├── orchestration/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── dag.py
│   │       │   │   ├── engine.py
│   │       │   │   └── types.py
│   │       │   ├── pipeline/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── advancement.py
│   │       │   │   ├── gate.py
│   │       │   │   ├── holdout.py
│   │       │   │   ├── objective_guardrail.py
│   │       │   │   ├── retry_context.py
│   │       │   │   ├── trend_gate.py
│   │       │   │   └── validity_gate.py
│   │       │   ├── repl/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── monty_worker.py
│   │       │   │   ├── session.py
│   │       │   │   ├── types.py
│   │       │   │   └── worker.py
│   │       │   ├── scoring/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── backends.py
│   │       │   │   └── elo.py
│   │       │   ├── storage/
│   │       │   │   ├── __init__.py
│   │       │   │   └── versioned_store.py
│   │       │   └── validation/
│   │       │       ├── __init__.py
│   │       │       ├── staged.py
│   │       │       └── stages.py
│   │       ├── hermes/
│   │       │   ├── __init__.py
│   │       │   ├── advisor.py
│   │       │   ├── curator_ingest.py
│   │       │   ├── dataset_export.py
│   │       │   ├── inspection.py
│   │       │   ├── plugin_emitter.py
│   │       │   ├── recommendations.py
│   │       │   ├── redaction.py
│   │       │   ├── references.py
│   │       │   ├── session_ingest.py
│   │       │   ├── sessions.py
│   │       │   ├── skill.py
│   │       │   └── trajectory_ingest.py
│   │       ├── integrations/
│   │       │   ├── __init__.py
│   │       │   ├── _shared/
│   │       │   │   ├── STABILITY.md
│   │       │   │   ├── __init__.py
│   │       │   │   ├── identity.py
│   │       │   │   ├── session.py
│   │       │   │   └── sink.py
│   │       │   ├── anthropic/
│   │       │   │   ├── STABILITY.md
│   │       │   │   ├── __init__.py
│   │       │   │   ├── _content.py
│   │       │   │   ├── _proxy.py
│   │       │   │   ├── _stream.py
│   │       │   │   ├── _taxonomy.py
│   │       │   │   ├── _trace_builder.py
│   │       │   │   └── _wrap.py
│   │       │   ├── browser/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── chrome_cdp.py
│   │       │   │   ├── chrome_cdp_discovery.py
│   │       │   │   ├── chrome_cdp_runtime.py
│   │       │   │   ├── chrome_cdp_transport.py
│   │       │   │   ├── context_capture.py
│   │       │   │   ├── contract/
│   │       │   │   │   ├── __init__.py
│   │       │   │   │   ├── json_schemas/
│   │       │   │   │   │   ├── browser-action.schema.json
│   │       │   │   │   │   ├── browser-audit-event.schema.json
│   │       │   │   │   │   ├── browser-contract.schema.json
│   │       │   │   │   │   ├── browser-session-config.schema.json
│   │       │   │   │   │   ├── browser-snapshot.schema.json
│   │       │   │   │   │   └── shared-defs.schema.json
│   │       │   │   │   ├── models.py
│   │       │   │   │   └── types.py
│   │       │   │   ├── evidence.py
│   │       │   │   ├── factory.py
│   │       │   │   ├── policy.py
│   │       │   │   ├── types.py
│   │       │   │   └── validate.py
│   │       │   ├── openai/
│   │       │   │   ├── STABILITY.md
│   │       │   │   ├── __init__.py
│   │       │   │   ├── _proxy.py
│   │       │   │   ├── _session.py
│   │       │   │   ├── _sink.py
│   │       │   │   ├── _stream.py
│   │       │   │   ├── _taxonomy.py
│   │       │   │   ├── _trace_builder.py
│   │       │   │   └── _wrap.py
│   │       │   ├── primeintellect/
│   │       │   │   ├── __init__.py
│   │       │   │   └── client.py
│   │       │   └── ssh/
│   │       │       ├── __init__.py
│   │       │       ├── client.py
│   │       │       └── config.py
│   │       ├── investigation/
│   │       │   ├── __init__.py
│   │       │   ├── browser_context.py
│   │       │   ├── engine.py
│   │       │   └── iterative.py
│   │       ├── knowledge/
│   │       │   ├── __init__.py
│   │       │   ├── coherence.py
│   │       │   ├── compaction.py
│   │       │   ├── context_selection.py
│   │       │   ├── context_selection_report.py
│   │       │   ├── dead_end_manager.py
│   │       │   ├── evidence_freshness.py
│   │       │   ├── export.py
│   │       │   ├── fresh_start.py
│   │       │   ├── harness_quality.py
│   │       │   ├── hint_volume.py
│   │       │   ├── lessons.py
│   │       │   ├── mutation_log.py
│   │       │   ├── normalized_metrics.py
│   │       │   ├── package.py
│   │       │   ├── pi_package.py
│   │       │   ├── progress.py
│   │       │   ├── protocol.py
│   │       │   ├── rapid_gate.py
│   │       │   ├── report.py
│   │       │   ├── research_hub.py
│   │       │   ├── search.py
│   │       │   ├── semantic_compaction_benchmark.py
│   │       │   ├── solve_agent_task_design.py
│   │       │   ├── solve_task_execution.py
│   │       │   ├── solver.py
│   │       │   ├── stagnation.py
│   │       │   ├── trajectory.py
│   │       │   ├── tuning.py
│   │       │   ├── verbatim_solve.py
│   │       │   └── weakness.py
│   │       ├── loop/
│   │       │   ├── __init__.py
│   │       │   ├── controller.py
│   │       │   ├── cost_control.py
│   │       │   ├── ecosystem_runner.py
│   │       │   ├── events.py
│   │       │   ├── exploration.py
│   │       │   ├── fixture_loader.py
│   │       │   ├── generation_pipeline.py
│   │       │   ├── generation_runner.py
│   │       │   ├── hypothesis_tree.py
│   │       │   ├── presets.py
│   │       │   ├── refinement_prompt.py
│   │       │   ├── remediation_router.py
│   │       │   ├── runner_hooks.py
│   │       │   ├── signature_surfacer.py
│   │       │   ├── stage_helpers/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── context_loaders.py
│   │       │   │   ├── dimensions.py
│   │       │   │   ├── exploration.py
│   │       │   │   ├── freshness.py
│   │       │   │   ├── harness_mutations.py
│   │       │   │   ├── persistence_helpers.py
│   │       │   │   ├── semantic_benchmark.py
│   │       │   │   └── tournament_prep.py
│   │       │   ├── stage_preflight.py
│   │       │   ├── stage_prevalidation.py
│   │       │   ├── stage_probe.py
│   │       │   ├── stage_staged_validation.py
│   │       │   ├── stage_tree_search.py
│   │       │   ├── stage_types.py
│   │       │   ├── stages.py
│   │       │   ├── startup_verification.py
│   │       │   ├── tournament_helpers.py
│   │       │   └── trace_artifacts.py
│   │       ├── mcp/
│   │       │   ├── __init__.py
│   │       │   ├── _base.py
│   │       │   ├── agent_task_tools.py
│   │       │   ├── artifact_tools.py
│   │       │   ├── distill_tools.py
│   │       │   ├── knowledge_tools.py
│   │       │   ├── monitor_tools.py
│   │       │   ├── runtime_session_tools.py
│   │       │   ├── sandbox.py
│   │       │   ├── server.py
│   │       │   └── tools.py
│   │       ├── monitor/
│   │       │   ├── __init__.py
│   │       │   ├── engine.py
│   │       │   ├── evaluators.py
│   │       │   └── types.py
│   │       ├── notebook/
│   │       │   ├── __init__.py
│   │       │   ├── context_provider.py
│   │       │   ├── injection.py
│   │       │   └── types.py
│   │       ├── notifications/
│   │       │   ├── __init__.py
│   │       │   ├── base.py
│   │       │   ├── callback.py
│   │       │   ├── composite.py
│   │       │   ├── http.py
│   │       │   ├── slack.py
│   │       │   └── stdout.py
│   │       ├── openclaw/
│   │       │   ├── __init__.py
│   │       │   ├── adapters.py
│   │       │   ├── agent_adapter.py
│   │       │   ├── discovery.py
│   │       │   ├── distill.py
│   │       │   ├── models.py
│   │       │   └── skill.py
│   │       ├── preflight.py
│   │       ├── production_traces/
│   │       │   ├── __init__.py
│   │       │   ├── contract/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── branded_ids.py
│   │       │   │   ├── json_schemas/
│   │       │   │   │   ├── cluster-config.schema.json
│   │       │   │   │   ├── dataset-manifest.schema.json
│   │       │   │   │   ├── dataset-row.schema.json
│   │       │   │   │   ├── env-context.schema.json
│   │       │   │   │   ├── feedback-ref.schema.json
│   │       │   │   │   ├── production-outcome.schema.json
│   │       │   │   │   ├── production-trace.schema.json
│   │       │   │   │   ├── redaction-marker.schema.json
│   │       │   │   │   ├── redaction-policy.schema.json
│   │       │   │   │   ├── retention-policy.schema.json
│   │       │   │   │   ├── rubric-config.schema.json
│   │       │   │   │   ├── selection-rule.schema.json
│   │       │   │   │   ├── session.schema.json
│   │       │   │   │   ├── shared-defs.schema.json
│   │       │   │   │   ├── timing-info.schema.json
│   │       │   │   │   ├── trace-links.schema.json
│   │       │   │   │   ├── trace-source.schema.json
│   │       │   │   │   └── usage-info.schema.json
│   │       │   │   └── models.py
│   │       │   ├── emit.py
│   │       │   ├── hashing.py
│   │       │   ├── taxonomy/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── anthropic_error_reasons.py
│   │       │   │   └── openai_error_reasons.py
│   │       │   └── validate.py
│   │       ├── prompts/
│   │       │   ├── __init__.py
│   │       │   ├── context_budget.py
│   │       │   └── templates.py
│   │       ├── providers/
│   │       │   ├── __init__.py
│   │       │   ├── anthropic.py
│   │       │   ├── base.py
│   │       │   ├── callable_wrapper.py
│   │       │   ├── mlx_provider.py
│   │       │   ├── openai_compat.py
│   │       │   ├── registry.py
│   │       │   ├── retry.py
│   │       │   ├── runtime_bridge.py
│   │       │   └── scenario_routing.py
│   │       ├── research/
│   │       │   ├── __init__.py
│   │       │   ├── consultation.py
│   │       │   ├── evaluation.py
│   │       │   ├── persistence.py
│   │       │   ├── prompt_wiring.py
│   │       │   ├── runtime.py
│   │       │   └── types.py
│   │       ├── rlm/
│   │       │   ├── __init__.py
│   │       │   ├── context_loader.py
│   │       │   ├── prompts.py
│   │       │   ├── repl_worker.py
│   │       │   ├── session.py
│   │       │   └── types.py
│   │       ├── runtimes/
│   │       │   ├── __init__.py
│   │       │   ├── base.py
│   │       │   ├── claude_cli.py
│   │       │   ├── codex_cli.py
│   │       │   ├── direct_api.py
│   │       │   ├── errors.py
│   │       │   ├── hermes_cli.py
│   │       │   ├── pi_artifacts.py
│   │       │   ├── pi_cli.py
│   │       │   ├── pi_defaults.py
│   │       │   ├── pi_rpc.py
│   │       │   ├── runtime_budget.py
│   │       │   ├── workspace_env.py
│   │       │   └── workspace_grants.py
│   │       ├── scenarios/
│   │       │   ├── __init__.py
│   │       │   ├── agent_task.py
│   │       │   ├── artifact_editing.py
│   │       │   ├── base.py
│   │       │   ├── capabilities.py
│   │       │   ├── coordination.py
│   │       │   ├── custom/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── _family_creator_shim.py
│   │       │   │   ├── agent_task_codegen.py
│   │       │   │   ├── agent_task_creator.py
│   │       │   │   ├── agent_task_designer.py
│   │       │   │   ├── agent_task_revision.py
│   │       │   │   ├── agent_task_spec.py
│   │       │   │   ├── agent_task_validator.py
│   │       │   │   ├── artifact_editing_codegen.py
│   │       │   │   ├── artifact_editing_creator.py
│   │       │   │   ├── artifact_editing_designer.py
│   │       │   │   ├── artifact_editing_spec.py
│   │       │   │   ├── classifier_cache.py
│   │       │   │   ├── classifier_input.py
│   │       │   │   ├── codegen.py
│   │       │   │   ├── coordination_codegen.py
│   │       │   │   ├── coordination_creator.py
│   │       │   │   ├── coordination_designer.py
│   │       │   │   ├── coordination_spec.py
│   │       │   │   ├── creator.py
│   │       │   │   ├── creator_registry.py
│   │       │   │   ├── designer.py
│   │       │   │   ├── designer_retry.py
│   │       │   │   ├── family_classifier.py
│   │       │   │   ├── family_pipeline.py
│   │       │   │   ├── generic_creator.py
│   │       │   │   ├── investigation_codegen.py
│   │       │   │   ├── investigation_creator.py
│   │       │   │   ├── investigation_designer.py
│   │       │   │   ├── investigation_spec.py
│   │       │   │   ├── loader.py
│   │       │   │   ├── naming.py
│   │       │   │   ├── negotiation_codegen.py
│   │       │   │   ├── negotiation_creator.py
│   │       │   │   ├── negotiation_designer.py
│   │       │   │   ├── negotiation_spec.py
│   │       │   │   ├── operator_loop_codegen.py
│   │       │   │   ├── operator_loop_creator.py
│   │       │   │   ├── operator_loop_designer.py
│   │       │   │   ├── operator_loop_spec.py
│   │       │   │   ├── registry.py
│   │       │   │   ├── schema_evolution_codegen.py
│   │       │   │   ├── schema_evolution_creator.py
│   │       │   │   ├── schema_evolution_designer.py
│   │       │   │   ├── schema_evolution_spec.py
│   │       │   │   ├── simulation_codegen.py
│   │       │   │   ├── simulation_creator.py
│   │       │   │   ├── simulation_designer.py
│   │       │   │   ├── simulation_spec.py
│   │       │   │   ├── spec.py
│   │       │   │   ├── spec_auto_heal.py
│   │       │   │   ├── tool_fragility_codegen.py
│   │       │   │   ├── tool_fragility_creator.py
│   │       │   │   ├── tool_fragility_designer.py
│   │       │   │   ├── tool_fragility_spec.py
│   │       │   │   ├── validator.py
│   │       │   │   ├── workflow_codegen.py
│   │       │   │   ├── workflow_creator.py
│   │       │   │   ├── workflow_designer.py
│   │       │   │   └── workflow_spec.py
│   │       │   ├── families.py
│   │       │   ├── family_contracts.py
│   │       │   ├── grid_ctf/
│   │       │   │   ├── __init__.py
│   │       │   │   └── scenario.py
│   │       │   ├── investigation.py
│   │       │   ├── negotiation.py
│   │       │   ├── operator_loop.py
│   │       │   ├── othello.py
│   │       │   ├── schema_evolution.py
│   │       │   ├── simulation.py
│   │       │   ├── templates/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── content-generation/
│   │       │   │   │   ├── README.md
│   │       │   │   │   ├── example_input.json
│   │       │   │   │   ├── example_output.json
│   │       │   │   │   └── spec.yaml
│   │       │   │   ├── prompt-optimization/
│   │       │   │   │   ├── README.md
│   │       │   │   │   ├── example_input.json
│   │       │   │   │   ├── example_output.json
│   │       │   │   │   └── spec.yaml
│   │       │   │   └── rag-accuracy/
│   │       │   │       ├── README.md
│   │       │   │       ├── example_input.json
│   │       │   │       ├── example_output.json
│   │       │   │       └── spec.yaml
│   │       │   ├── tool_fragility.py
│   │       │   ├── type_registry.py
│   │       │   ├── workflow.py
│   │       │   └── world_state.py
│   │       ├── sdk.py
│   │       ├── sdk_models.py
│   │       ├── security/
│   │       │   ├── __init__.py
│   │       │   └── scanner.py
│   │       ├── server/
│   │       │   ├── __init__.py
│   │       │   ├── app.py
│   │       │   ├── changelog.py
│   │       │   ├── cockpit_api.py
│   │       │   ├── hub_api.py
│   │       │   ├── knowledge_api.py
│   │       │   ├── monitor_api.py
│   │       │   ├── notebook_api.py
│   │       │   ├── openclaw_api.py
│   │       │   ├── protocol.py
│   │       │   ├── run_manager.py
│   │       │   └── writeup.py
│   │       ├── session/
│   │       │   ├── __init__.py
│   │       │   ├── action_labels.py
│   │       │   ├── context_pressure.py
│   │       │   ├── coordinator.py
│   │       │   ├── living_docs.py
│   │       │   ├── memory_consolidation.py
│   │       │   ├── progress_digest.py
│   │       │   ├── remote_bridge.py
│   │       │   ├── runtime_context.py
│   │       │   ├── runtime_events.py
│   │       │   ├── runtime_grant_events.py
│   │       │   ├── runtime_session.py
│   │       │   ├── runtime_session_ids.py
│   │       │   ├── runtime_session_read_model.py
│   │       │   ├── runtime_session_recording.py
│   │       │   ├── runtime_session_timeline.py
│   │       │   ├── skill_registry.py
│   │       │   ├── store.py
│   │       │   ├── supervisor.py
│   │       │   └── types.py
│   │       ├── sharing/
│   │       │   ├── __init__.py
│   │       │   ├── attestation.py
│   │       │   ├── bundle.py
│   │       │   ├── collector.py
│   │       │   ├── pipeline.py
│   │       │   ├── publishers/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── gist.py
│   │       │   │   └── hf.py
│   │       │   ├── redactor.py
│   │       │   └── review.py
│   │       ├── simulation/
│   │       │   ├── __init__.py
│   │       │   ├── engine.py
│   │       │   ├── export.py
│   │       │   ├── helpers.py
│   │       │   └── schema_evolution.py
│   │       ├── storage/
│   │       │   ├── __init__.py
│   │       │   ├── artifact_hooks.py
│   │       │   ├── artifact_write_methods.py
│   │       │   ├── artifacts.py
│   │       │   ├── blob_integration.py
│   │       │   ├── bootstrap_schema.py
│   │       │   ├── buffered_writer.py
│   │       │   ├── compaction_ledger.py
│   │       │   ├── context_selection_store.py
│   │       │   ├── factory.py
│   │       │   ├── migration_ledgers.py
│   │       │   ├── row_types.py
│   │       │   ├── run_paths.py
│   │       │   ├── scenario_paths.py
│   │       │   ├── sqlite_migrations.py
│   │       │   └── sqlite_store.py
│   │       ├── strategy_interface.py
│   │       ├── training/
│   │       │   ├── __init__.py
│   │       │   ├── autoresearch/
│   │       │   │   ├── __init__.py
│   │       │   │   ├── cuda.py
│   │       │   │   ├── prepare.py
│   │       │   │   ├── program.md
│   │       │   │   ├── program.py
│   │       │   │   └── train.py
│   │       │   ├── backends.py
│   │       │   ├── export.py
│   │       │   ├── model_registry.py
│   │       │   ├── runner.py
│   │       │   └── types.py
│   │       └── util/
│   │           ├── __init__.py
│   │           └── json_io.py
│   └── tests/
│       ├── conftest.py
│       ├── fixtures/
│       │   └── hermes_curator/
│       │       ├── auto-transition-only/
│       │       │   └── run.json
│       │       ├── consolidation-only/
│       │       │   └── run.json
│       │       ├── malformed/
│       │       │   └── run.json
│       │       └── normal-run/
│       │           └── run.json
│       ├── integrations/
│       │   ├── __init__.py
│       │   ├── _shared/
│       │   │   ├── __init__.py
│       │   │   ├── test_file_sink.py
│       │   │   └── test_session.py
│       │   ├── anthropic/
│       │   │   ├── __init__.py
│       │   │   ├── conftest.py
│       │   │   ├── property/
│       │   │   │   ├── __init__.py
│       │   │   │   └── test_trace_shape_invariants.py
│       │   │   ├── test_content.py
│       │   │   ├── test_exception_taxonomy_integration.py
│       │   │   ├── test_instrument_client_factory.py
│       │   │   ├── test_proxy_async.py
│       │   │   ├── test_proxy_non_streaming.py
│       │   │   ├── test_proxy_streaming.py
│       │   │   ├── test_taxonomy.py
│       │   │   └── test_trace_builder.py
│       │   ├── openai/
│       │   │   ├── __init__.py
│       │   │   ├── conftest.py
│       │   │   ├── property/
│       │   │   │   ├── __init__.py
│       │   │   │   └── test_trace_shape_invariants.py
│       │   │   ├── test_exception_taxonomy_integration.py
│       │   │   ├── test_instrument_client_factory.py
│       │   │   ├── test_proxy_async.py
│       │   │   ├── test_proxy_non_streaming.py
│       │   │   ├── test_proxy_streaming.py
│       │   │   ├── test_responses_api.py
│       │   │   ├── test_taxonomy.py
│       │   │   └── test_trace_builder.py
│       │   └── test_shared_identity.py
│       ├── production_traces/
│       │   └── taxonomy/
│       │       ├── test_anthropic_error_reasons.py
│       │       ├── test_openai_error_reasons.py
│       │       └── test_outcome_reason_key.py
│       ├── test_ab_runner.py
│       ├── test_ab_stats.py
│       ├── test_ac628_classifier.py
│       ├── test_action_filter.py
│       ├── test_action_filter_integration.py
│       ├── test_action_labels.py
│       ├── test_advancement_contract.py
│       ├── test_agent_e2e.py
│       ├── test_agent_live_e2e.py
│       ├── test_agent_sdk_client.py
│       ├── test_agent_sdk_integration.py
│       ├── test_agent_task.py
│       ├── test_agent_task_creator_retry.py
│       ├── test_agent_task_designer_retry.py
│       ├── test_agent_task_export.py
│       ├── test_agent_task_multi_gen.py
│       ├── test_agent_task_pipeline.py
│       ├── test_agentos_adapter.py
│       ├── test_aggregate_facets.py
│       ├── test_analysis_injection.py
│       ├── test_anthropic_client_retry.py
│       ├── test_api_key_fallback.py
│       ├── test_app_settings_contract.py
│       ├── test_architect_dag_changes.py
│       ├── test_architect_tool_updates.py
│       ├── test_architect_tools.py
│       ├── test_artifact_contracts.py
│       ├── test_artifact_editing.py
│       ├── test_artifact_harness.py
│       ├── test_artifact_rendering.py
│       ├── test_ast_safety.py
│       ├── test_auto_sample_input.py
│       ├── test_backpressure.py
│       ├── test_backpressure_trend.py
│       ├── test_banner_sync.py
│       ├── test_blob_store.py
│       ├── test_blob_store_phase2.py
│       ├── test_blob_store_phase3.py
│       ├── test_bootstrap_snapshot.py
│       ├── test_browser_chrome_cdp.py
│       ├── test_browser_context_capture.py
│       ├── test_browser_contract_fixtures.py
│       ├── test_browser_discovery.py
│       ├── test_browser_evidence.py
│       ├── test_browser_factory.py
│       ├── test_browser_policy.py
│       ├── test_browser_runtime.py
│       ├── test_browser_settings.py
│       ├── test_browser_transport.py
│       ├── test_buffered_artifacts.py
│       ├── test_buffered_writer.py
│       ├── test_build_prompt_bundle_semantic_compaction.py
│       ├── test_classifier_cache.py
│       ├── test_classifier_observability.py
│       ├── test_claude_cli_retry_budget_sleep.py
│       ├── test_claude_cli_runtime_budget.py
│       ├── test_claude_cli_runtime_factory.py
│       ├── test_claude_cli_timeout.py
│       ├── test_claude_cli_tools_arg.py
│       ├── test_claude_max_total_seconds.py
│       ├── test_cli_ab_test.py
│       ├── test_cli_agent_task.py
│       ├── test_cli_backport.py
│       ├── test_cli_error_output.py
│       ├── test_cli_family_name.py
│       ├── test_cli_investigate.py
│       ├── test_cli_json.py
│       ├── test_cli_preset.py
│       ├── test_cli_runtime_timeout_overrides.py
│       ├── test_cli_simulate_runtime.py
│       ├── test_cli_solve_runtime.py
│       ├── test_coach_competitor_hints.py
│       ├── test_cockpit.py
│       ├── test_cockpit_consultation_integration.py
│       ├── test_cockpit_notebook_integration.py
│       ├── test_code_strategies.py
│       ├── test_code_strategies_e2e.py
│       ├── test_codex_cli_runtime.py
│       ├── test_concept_model_parity.py
│       ├── test_config_adaptive.py
│       ├── test_constraint_prompts.py
│       ├── test_consultation.py
│       ├── test_context_budget.py
│       ├── test_context_preparation.py
│       ├── test_context_pressure.py
│       ├── test_context_selection.py
│       ├── test_coordinator.py
│       ├── test_correlation_issues.py
│       ├── test_cost_control_and_presets.py
│       ├── test_credit_assignment.py
│       ├── test_cross_run_inheritance.py
│       ├── test_cross_runtime_migration_ledgers.py
│       ├── test_cross_runtime_trace_findings.py
│       ├── test_curator.py
│       ├── test_curator_integration.py
│       ├── test_custom_registry_isolation.py
│       ├── test_custom_scenario_name_resolution.py
│       ├── test_custom_scenario_spec.py
│       ├── test_dag_apply.py
│       ├── test_dag_mutation.py
│       ├── test_dead_end_registry.py
│       ├── test_dead_end_wiring.py
│       ├── test_derive_name.py
│       ├── test_designer_calibration.py
│       ├── test_designer_parse_retry.py
│       ├── test_designer_parse_retry_integration.py
│       ├── test_detect_family_prefers_explicit.py
│       ├── test_dict_type_consistency.py
│       ├── test_dimension_pinning.py
│       ├── test_dimension_threshold.py
│       ├── test_dimensional_scoring.py
│       ├── test_disagreement.py
│       ├── test_discovery_scenario_type.py
│       ├── test_distill_jobs.py
│       ├── test_ecosystem_convergence.py
│       ├── test_ecosystem_integration.py
│       ├── test_ecosystem_runner.py
│       ├── test_elo.py
│       ├── test_enumerate_grid_ctf.py
│       ├── test_enumerate_legal_actions.py
│       ├── test_enumerate_othello.py
│       ├── test_escalation_sweep_summary.py
│       ├── test_eval_provider_wiring.py
│       ├── test_event_subscribers.py
│       ├── test_events_to_trace.py
│       ├── test_evidence_workspace.py
│       ├── test_exploration_mechanisms.py
│       ├── test_export_cli.py
│       ├── test_export_skill_md.py
│       ├── test_extension_hooks.py
│       ├── test_factual_confidence.py
│       ├── test_failure_recovery_lessons.py
│       ├── test_failure_report.py
│       ├── test_family_aware_strategy_prompts.py
│       ├── test_family_classifier.py
│       ├── test_family_pipeline.py
│       ├── test_feedback_loops.py
│       ├── test_fixture_loader.py
│       ├── test_freshness_and_fixtures.py
│       ├── test_gate_taxonomy.py
│       ├── test_generation_pipeline.py
│       ├── test_generation_stages.py
│       ├── test_generic_creator.py
│       ├── test_gondolin_contract.py
│       ├── test_harness/
│       │   ├── __init__.py
│       │   ├── test_harness_adapt_applicator.py
│       │   ├── test_harness_adapt_types.py
│       │   ├── test_harness_audit_types.py
│       │   ├── test_harness_audit_writer.py
│       │   ├── test_harness_controller.py
│       │   ├── test_harness_cost_calculator.py
│       │   ├── test_harness_cost_tracker.py
│       │   ├── test_harness_cost_types.py
│       │   ├── test_harness_elo.py
│       │   ├── test_harness_eval_runner.py
│       │   ├── test_harness_eval_types.py
│       │   ├── test_harness_evaluator.py
│       │   ├── test_harness_events.py
│       │   ├── test_harness_gate.py
│       │   ├── test_harness_llm_client.py
│       │   ├── test_harness_meta_advisor.py
│       │   ├── test_harness_meta_collector.py
│       │   ├── test_harness_meta_optimizer.py
│       │   ├── test_harness_meta_profiler.py
│       │   ├── test_harness_meta_types.py
│       │   ├── test_harness_output_parser.py
│       │   ├── test_harness_pipeline_engine.py
│       │   ├── test_harness_repl_session.py
│       │   ├── test_harness_repl_types.py
│       │   ├── test_harness_repl_worker.py
│       │   ├── test_harness_retry_context.py
│       │   ├── test_harness_role_dag.py
│       │   ├── test_harness_scenario_evaluator.py
│       │   ├── test_harness_subagent.py
│       │   ├── test_harness_trend_gate.py
│       │   ├── test_harness_types.py
│       │   ├── test_harness_versioned_store.py
│       │   └── test_output_parser_adoption.py
│       ├── test_harness_coverage.py
│       ├── test_harness_inheritance.py
│       ├── test_harness_loader.py
│       ├── test_harness_mode.py
│       ├── test_harness_model_demotion.py
│       ├── test_harness_mutations.py
│       ├── test_harness_profile.py
│       ├── test_harness_quality.py
│       ├── test_harness_synthesizer.py
│       ├── test_harness_tester.py
│       ├── test_harness_versioning.py
│       ├── test_heal_quality_threshold.py
│       ├── test_hermes_advisor.py
│       ├── test_hermes_curator_ingest.py
│       ├── test_hermes_dataset_export.py
│       ├── test_hermes_gateway.py
│       ├── test_hermes_integration.py
│       ├── test_hermes_plugin_emitter.py
│       ├── test_hermes_protocol_alignment.py
│       ├── test_hermes_recommendations.py
│       ├── test_hermes_redaction.py
│       ├── test_hermes_references.py
│       ├── test_hermes_runtime.py
│       ├── test_hermes_session_ingest.py
│       ├── test_hermes_session_repository.py
│       ├── test_hermes_trajectory_ingest.py
│       ├── test_hint_feedback.py
│       ├── test_hint_persistence.py
│       ├── test_hint_volume_control.py
│       ├── test_holdout_evaluation.py
│       ├── test_hub_api.py
│       ├── test_human_feedback.py
│       ├── test_hypothesis_tree.py
│       ├── test_improvement_loop.py
│       ├── test_improvement_loop_events.py
│       ├── test_improvement_loop_resilience.py
│       ├── test_improvement_loop_verifier.py
│       ├── test_integration_docs.py
│       ├── test_integration_improvement.py
│       ├── test_intent_validation.py
│       ├── test_interface_conventions.py
│       ├── test_investigation_actions_coerce.py
│       ├── test_investigation_browser_context.py
│       ├── test_investigation_engine.py
│       ├── test_investigation_workflow.py
│       ├── test_judge.py
│       ├── test_judge_provider_inheritance.py
│       ├── test_judge_rubrics.py
│       ├── test_knowledge_api.py
│       ├── test_knowledge_coherence.py
│       ├── test_knowledge_compaction.py
│       ├── test_knowledge_solver.py
│       ├── test_lesson_applicability.py
│       ├── test_living_docs.py
│       ├── test_llm_classifier_fallback.py
│       ├── test_loop_controller.py
│       ├── test_loop_integration_snapshot_evidence.py
│       ├── test_match_export.py
│       ├── test_mcp_agent_tasks.py
│       ├── test_mcp_server.py
│       ├── test_mcp_tools.py
│       ├── test_memory_consolidation.py
│       ├── test_mlx_provider.py
│       ├── test_model_registry.py
│       ├── test_model_router.py
│       ├── test_model_router_integration.py
│       ├── test_module_size_limits.py
│       ├── test_monitor.py
│       ├── test_monty_e2e.py
│       ├── test_monty_executor.py
│       ├── test_monty_live.py
│       ├── test_monty_repl_integration.py
│       ├── test_monty_repl_live.py
│       ├── test_monty_repl_settings.py
│       ├── test_monty_repl_wiring.py
│       ├── test_monty_repl_worker.py
│       ├── test_monty_settings.py
│       ├── test_multi_gen_stall.py
│       ├── test_mutation_log.py
│       ├── test_negotiation.py
│       ├── test_negotiation_verification.py
│       ├── test_new_scenario_cli.py
│       ├── test_normalized_metrics.py
│       ├── test_notebook_wiring.py
│       ├── test_notifications.py
│       ├── test_objective_guardrail.py
│       ├── test_objective_verification.py
│       ├── test_openai_agent_provider.py
│       ├── test_openclaw_adapters.py
│       ├── test_openclaw_agent_adapter.py
│       ├── test_openclaw_discovery.py
│       ├── test_openclaw_operations.py
│       ├── test_openclaw_skill.py
│       ├── test_operator_loop_coordination.py
│       ├── test_operator_loop_unsupported.py
│       ├── test_orchestrator_feedback.py
│       ├── test_output_cleaner.py
│       ├── test_output_verifier.py
│       ├── test_package_boundaries.py
│       ├── test_package_topology.py
│       ├── test_param_type_conventions.py
│       ├── test_pareto_optimizer.py
│       ├── test_per_role_provider.py
│       ├── test_phased_execution.py
│       ├── test_pi_artifacts.py
│       ├── test_pi_cli_runtime.py
│       ├── test_pi_cli_timeout_cleanup.py
│       ├── test_pi_package_export.py
│       ├── test_pi_protocol_alignment.py
│       ├── test_pi_provider_surface.py
│       ├── test_pi_rpc.py
│       ├── test_pi_smoke.py
│       ├── test_pipeline_adapter.py
│       ├── test_pipeline_wiring.py
│       ├── test_policy_executor.py
│       ├── test_policy_refinement.py
│       ├── test_policy_refinement_integration.py
│       ├── test_preflight.py
│       ├── test_prepare_mlx.py
│       ├── test_preset_named.py
│       ├── test_presets.py
│       ├── test_prevalidation.py
│       ├── test_primeintellect_client.py
│       ├── test_probe_pipeline.py
│       ├── test_production_traces_contract.py
│       ├── test_production_traces_emit.py
│       ├── test_production_traces_fixtures.py
│       ├── test_production_traces_hashing.py
│       ├── test_production_traces_validate.py
│       ├── test_program_template.py
│       ├── test_progress_digests.py
│       ├── test_progress_json.py
│       ├── test_protocol.py
│       ├── test_protocol_parity.py
│       ├── test_provider_retry.py
│       ├── test_providers.py
│       ├── test_pydantic_migration.py
│       ├── test_python_control_package.py
│       ├── test_python_core_package.py
│       ├── test_rapid_exploration.py
│       ├── test_refinement_prompt.py
│       ├── test_remediation_router.py
│       ├── test_remote_bridge.py
│       ├── test_remove_hardcoded_models.py
│       ├── test_removed_backpressure_modules.py
│       ├── test_removed_harness_modules.py
│       ├── test_replay_narrative_flow.py
│       ├── test_research_adapter.py
│       ├── test_research_consultation.py
│       ├── test_research_eval.py
│       ├── test_research_hub.py
│       ├── test_research_persistence.py
│       ├── test_research_prompt_wiring.py
│       ├── test_research_protocol.py
│       ├── test_research_runtime.py
│       ├── test_restore_versioning.py
│       ├── test_retry_learning.py
│       ├── test_retry_provider.py
│       ├── test_revise_output_fix.py
│       ├── test_rlm_competitor.py
│       ├── test_rlm_context_loader.py
│       ├── test_rlm_integration.py
│       ├── test_rlm_repl_worker.py
│       ├── test_rlm_session.py
│       ├── test_role_router.py
│       ├── test_rubric_calibration.py
│       ├── test_rubric_coherence.py
│       ├── test_rubric_drift_calibration.py
│       ├── test_run_trace.py
│       ├── test_runner_integration.py
│       ├── test_runtime_bridge_provider.py
│       ├── test_runtime_budget.py
│       ├── test_runtime_context_layers.py
│       ├── test_runtime_session_api.py
│       ├── test_runtime_session_events.py
│       ├── test_runtime_session_mcp_tools.py
│       ├── test_runtime_session_run_trace.py
│       ├── test_runtime_session_run_wiring.py
│       ├── test_runtime_workspace_env.py
│       ├── test_runtimes.py
│       ├── test_sample_states.py
│       ├── test_sandbox.py
│       ├── test_scenario_artifact_paths.py
│       ├── test_scenario_behavioral_contract.py
│       ├── test_scenario_capabilities.py
│       ├── test_scenario_creator.py
│       ├── test_scenario_dispatch.py
│       ├── test_scenario_families.py
│       ├── test_scenario_routing.py
│       ├── test_scenario_templates.py
│       ├── test_scenario_type_completeness.py
│       ├── test_scenarios.py
│       ├── test_schema_evolution_tool_fragility.py
│       ├── test_score_trajectory.py
│       ├── test_scoring_backends.py
│       ├── test_sdk.py
│       ├── test_secret_scanner.py
│       ├── test_seed_tools.py
│       ├── test_self_play.py
│       ├── test_semantic_compaction_benchmark.py
│       ├── test_serde_conventions.py
│       ├── test_server_health.py
│       ├── test_service_layer.py
│       ├── test_session_notebook.py
│       ├── test_session_report_wiring.py
│       ├── test_session_reports.py
│       ├── test_session_runtime.py
│       ├── test_session_supervisor.py
│       ├── test_settings_cleanup.py
│       ├── test_shared_tools.py
│       ├── test_sharing.py
│       ├── test_signature_surfacer.py
│       ├── test_simulate_bug_fixes.py
│       ├── test_simulate_command.py
│       ├── test_simulation_contract.py
│       ├── test_simulation_helpers.py
│       ├── test_simulation_spec.py
│       ├── test_skeptic.py
│       ├── test_skill_consolidation.py
│       ├── test_skill_registry.py
│       ├── test_smoke_judge.py
│       ├── test_solve_cli_aliases.py
│       ├── test_solve_family_override.py
│       ├── test_solve_family_typo.py
│       ├── test_solve_verbatim_prompt.py
│       ├── test_solve_verbatim_wiring.py
│       ├── test_sqlite_store.py
│       ├── test_sqlite_store_bootstrap.py
│       ├── test_ssh_executor.py
│       ├── test_stage_preflight.py
│       ├── test_stage_probe.py
│       ├── test_stage_staged_validation.py
│       ├── test_stage_tree_search.py
│       ├── test_staged_runner.py
│       ├── test_staged_validation.py
│       ├── test_staged_validation_storage.py
│       ├── test_stages_enriched_retry.py
│       ├── test_stagnation.py
│       ├── test_startup_verification.py
│       ├── test_strategy_package.py
│       ├── test_strategy_package_cli.py
│       ├── test_strategy_translator.py
│       ├── test_subscription_cli_provider_surface.py
│       ├── test_task_input.py
│       ├── test_task_metrics.py
│       ├── test_task_queue_priority.py
│       ├── test_task_runner.py
│       ├── test_time_budget.py
│       ├── test_timeline_inspector.py
│       ├── test_tool_context_full.py
│       ├── test_tool_validation.py
│       ├── test_tournament_helpers.py
│       ├── test_trace_reporter.py
│       ├── test_train_cuda.py
│       ├── test_train_mlx.py
│       ├── test_train_summary.py
│       ├── test_training_backend.py
│       ├── test_training_export.py
│       ├── test_training_init.py
│       ├── test_training_pi_provider.py
│       ├── test_training_runner.py
│       ├── test_trajectory_harness.py
│       ├── test_translator_simplification.py
│       ├── test_trend_gate_integration.py
│       ├── test_two_tier_tournament.py
│       ├── test_typed_contracts.py
│       ├── test_typed_dict_rows.py
│       ├── test_validity_gate.py
│       ├── test_verbatim_solve_default_rubric.py
│       ├── test_verification_dataset.py
│       ├── test_weakness_reports.py
│       ├── test_websocket_protocol_contract.py
│       └── test_world_state.py
├── docs/
│   ├── README.md
│   ├── analytics.md
│   ├── app-settings-contract.json
│   ├── browser-exploration-contract.md
│   ├── concept-model.json
│   ├── concept-model.md
│   ├── contributor-rights-audit.md
│   ├── core-control-package-split.md
│   ├── flue-influences.md
│   ├── hermes-plugin-emitter-spike.md
│   ├── hermes-positioning.md
│   ├── knowledge-production-trace-boundary-map.md
│   ├── migrations/
│   │   ├── 2026-04-a2-ii-b-detector-plugin-contract.md
│   │   └── 2026-04-a2-iii-taxonomy-and-shared-extraction.md
│   ├── opentelemetry-bridge.md
│   ├── release-checklist.md
│   ├── scenario-parity-matrix.md
│   └── websocket-protocol-contract.json
├── examples/
│   ├── README.md
│   └── agent-runtime/
│       └── .autoctx/
│           └── agents/
│               └── support.ts
├── fixtures/
│   └── cross-runtime/
│       └── trace-finding-report.json
├── infra/
│   ├── docker/
│   │   ├── Dockerfile
│   │   └── docker-compose.yml
│   ├── fly/
│   │   └── fly.toml
│   └── scripts/
│       └── bootstrap.sh
├── knowledge/
│   └── .gitkeep
├── packages/
│   ├── README.md
│   ├── package-boundaries.json
│   ├── package-topology.json
│   ├── python/
│   │   ├── control/
│   │   │   ├── README.md
│   │   │   ├── pyproject.toml
│   │   │   └── src/
│   │   │       └── autocontext_control/
│   │   │           └── __init__.py
│   │   └── core/
│   │       ├── README.md
│   │       ├── pyproject.toml
│   │       └── src/
│   │           └── autocontext_core/
│   │               └── __init__.py
│   └── ts/
│       ├── control-plane/
│       │   ├── README.md
│       │   ├── package.json
│       │   ├── src/
│       │   │   └── index.ts
│       │   └── tsconfig.json
│       └── core/
│           ├── README.md
│           ├── package.json
│           ├── src/
│           │   └── index.ts
│           └── tsconfig.json
├── pi/
│   ├── .npmignore
│   ├── README.md
│   ├── package.json
│   ├── prompts/
│   │   ├── autoctx-improve.md
│   │   ├── autoctx-judge.md
│   │   └── autoctx-status.md
│   ├── skills/
│   │   └── autocontext/
│   │       └── SKILL.md
│   ├── src/
│   │   ├── index.ts
│   │   └── runtime-snapshot.ts
│   ├── tests/
│   │   ├── extension.test.ts
│   │   └── runtime-snapshot.test.ts
│   ├── tsconfig.json
│   ├── types/
│   │   └── autoctx.d.ts
│   └── vitest.config.ts
├── protocol/
│   └── autocontext-protocol.json
├── runs/
│   └── .gitkeep
├── scripts/
│   ├── demo.sh
│   ├── escalation-sweep/
│   │   ├── README.md
│   │   ├── fetch_manifest.py
│   │   ├── run_sweep.sh
│   │   └── summarize.py
│   ├── generate_protocol.py
│   └── sync_banner_surfaces.py
├── skills/
│   └── .gitkeep
└── ts/
    ├── .gitignore
    ├── README.md
    ├── examples/
    │   └── run-repl-session.mjs
    ├── migrations/
    │   ├── 007_task_queue.sql
    │   ├── 008_human_feedback.sql
    │   ├── 009_generation_loop.sql
    │   ├── 010_session_notebook.sql
    │   ├── 011_monitors.sql
    │   ├── 012_consultation_log.sql
    │   ├── 012_research_hub.sql
    │   └── 013_runs_status_default_parity.sql
    ├── package.json
    ├── scripts/
    │   ├── build-production-traces-sdk-cjs.mjs
    │   ├── check-detector-anthropic-python-bundle-size.mjs
    │   ├── check-detector-anthropic-ts-bundle-size.mjs
    │   ├── check-detector-openai-python-bundle-size.mjs
    │   ├── check-detector-openai-ts-bundle-size.mjs
    │   ├── check-instrument-schemas.mjs
    │   ├── check-integrations-anthropic-bundle-size.mjs
    │   ├── check-integrations-openai-bundle-size.mjs
    │   ├── check-integrations-shared-bundle-size.mjs
    │   ├── check-license-compatibility.mjs
    │   ├── check-no-postinstall-scripts.mjs
    │   ├── check-no-telemetry.mjs
    │   ├── check-production-traces-sdk-bundle-size.mjs
    │   ├── check-sdk-import-discipline.mjs
    │   ├── check-side-effects.mjs
    │   ├── drive-anthropic-parity-fixture.mjs
    │   ├── drive-parity-fixture.mjs
    │   ├── generate-browser-contract-types.mjs
    │   ├── generate-production-traces-types.mjs
    │   ├── regenerate-cross-runtime-fixtures.mjs
    │   ├── sync-python-browser-contract-schemas.mjs
    │   └── sync-python-production-traces-schemas.mjs
    ├── src/
    │   ├── agent-runtime/
    │   │   └── index.ts
    │   ├── agentos/
    │   │   ├── adapter.ts
    │   │   ├── lifecycle.ts
    │   │   └── types.ts
    │   ├── agents/
    │   │   ├── curator-parser.ts
    │   │   ├── model-router.ts
    │   │   ├── orchestrator.ts
    │   │   ├── provider-bridge.ts
    │   │   └── roles.ts
    │   ├── analysis/
    │   │   └── engine.ts
    │   ├── analytics/
    │   │   ├── credit-assignment-attribution-workflow.ts
    │   │   ├── credit-assignment-contracts.ts
    │   │   ├── credit-assignment-contribution-workflow.ts
    │   │   ├── credit-assignment-magnitude.ts
    │   │   ├── credit-assignment-models.ts
    │   │   ├── credit-assignment-reporting.ts
    │   │   ├── credit-assignment-serialization-workflow.ts
    │   │   ├── credit-assignment-vector-workflow.ts
    │   │   ├── credit-assignment.ts
    │   │   ├── number-utils.ts
    │   │   ├── rubric-drift-statistics.ts
    │   │   ├── rubric-drift-types.ts
    │   │   ├── rubric-drift-warnings.ts
    │   │   ├── rubric-drift.ts
    │   │   ├── run-trace.ts
    │   │   ├── runtime-session-run-trace.ts
    │   │   ├── timeline-inspector.ts
    │   │   └── trace-findings.ts
    │   ├── blobstore/
    │   │   ├── cache.ts
    │   │   ├── factory.ts
    │   │   ├── fs-errors.ts
    │   │   ├── index.ts
    │   │   ├── local.ts
    │   │   ├── mirror.ts
    │   │   ├── ref.ts
    │   │   ├── registry.ts
    │   │   ├── store.ts
    │   │   └── sync.ts
    │   ├── bootstrap/
    │   │   ├── collector.ts
    │   │   ├── index.ts
    │   │   ├── redactor.ts
    │   │   ├── renderer.ts
    │   │   └── snapshot.ts
    │   ├── cli/
    │   │   ├── agent-command-workflow.ts
    │   │   ├── auth-provider-command-workflow.ts
    │   │   ├── autocontext-shim.ts
    │   │   ├── benchmark-command-workflow.ts
    │   │   ├── blob-command-workflow.ts
    │   │   ├── campaign-command-execution.ts
    │   │   ├── campaign-command-workflow.ts
    │   │   ├── capabilities-command-workflow.ts
    │   │   ├── command-registry.ts
    │   │   ├── context-selection-command-workflow.ts
    │   │   ├── emit-engine-result.ts
    │   │   ├── export-command-workflow.ts
    │   │   ├── export-training-data-command-workflow.ts
    │   │   ├── import-package-command-workflow.ts
    │   │   ├── improve-command-workflow.ts
    │   │   ├── index.ts
    │   │   ├── init-command-workflow.ts
    │   │   ├── investigate-command-workflow.ts
    │   │   ├── judge-command-workflow.ts
    │   │   ├── list-command-workflow.ts
    │   │   ├── mcp-serve-command-workflow.ts
    │   │   ├── mission-command-execution.ts
    │   │   ├── mission-command-workflow.ts
    │   │   ├── new-scenario-command-contracts.ts
    │   │   ├── new-scenario-command-workflow.ts
    │   │   ├── new-scenario-created-materialization-preparation.ts
    │   │   ├── new-scenario-created-materialization.ts
    │   │   ├── new-scenario-created-result-rendering.ts
    │   │   ├── new-scenario-family-resolution.ts
    │   │   ├── new-scenario-guards.ts
    │   │   ├── new-scenario-import-field-parsing.ts
    │   │   ├── new-scenario-import-spec-assembly.ts
    │   │   ├── new-scenario-imported-materialization-preparation.ts
    │   │   ├── new-scenario-imported-materialization-public-helper.ts
    │   │   ├── new-scenario-materialization-execution.ts
    │   │   ├── new-scenario-normalization-workflow.ts
    │   │   ├── new-scenario-rendering-workflow.ts
    │   │   ├── new-scenario-result-line-builders.ts
    │   │   ├── new-scenario-result-output-serialization.ts
    │   │   ├── new-scenario-result-payload-builders.ts
    │   │   ├── new-scenario-result-rendering-entrypoints.ts
    │   │   ├── new-scenario-template-output-serialization.ts
    │   │   ├── new-scenario-template-rendering-public-helper.ts
    │   │   ├── new-scenario-template-rendering.ts
    │   │   ├── new-scenario-template-scaffold-execution.ts
    │   │   ├── new-scenario-template-scaffold-planning.ts
    │   │   ├── queue-status-command-workflow.ts
    │   │   ├── repl-command-workflow.ts
    │   │   ├── replay-command-workflow.ts
    │   │   ├── run-command-workflow.ts
    │   │   ├── run-inspection-command-workflow.ts
    │   │   ├── runnable-scenario-resolution.ts
    │   │   ├── runtime-session-command-workflow.ts
    │   │   ├── serve-command-workflow.ts
    │   │   ├── simulate-command-workflow.ts
    │   │   ├── solve-command-workflow.ts
    │   │   ├── trace-findings-command-workflow.ts
    │   │   ├── train-command-workflow.ts
    │   │   ├── tui-command-workflow.ts
    │   │   └── worker-command-workflow.ts
    │   ├── concepts/
    │   │   └── model.ts
    │   ├── config/
    │   │   ├── app-settings-schema.ts
    │   │   ├── config-json-helpers.ts
    │   │   ├── credential-model-catalog.ts
    │   │   ├── credential-provider-discovery.ts
    │   │   ├── credential-store.ts
    │   │   ├── credential-validation.ts
    │   │   ├── credentials.ts
    │   │   ├── index.ts
    │   │   ├── oauth.ts
    │   │   ├── persisted-credentials.ts
    │   │   ├── presets.ts
    │   │   ├── project-config.ts
    │   │   ├── settings-assembly-workflow.ts
    │   │   └── settings-resolution.ts
    │   ├── control-plane/
    │   │   ├── actuators/
    │   │   │   ├── _shared/
    │   │   │   │   ├── content-revert-rollback.ts
    │   │   │   │   ├── single-file-applicator.ts
    │   │   │   │   └── unified-diff-emitter.ts
    │   │   │   ├── errors.ts
    │   │   │   ├── fine-tuned-model/
    │   │   │   │   ├── applicator.ts
    │   │   │   │   ├── index.ts
    │   │   │   │   ├── legacy-adapter.ts
    │   │   │   │   └── schema.ts
    │   │   │   ├── index.ts
    │   │   │   ├── model-routing/
    │   │   │   │   ├── applicator.ts
    │   │   │   │   ├── index.ts
    │   │   │   │   └── schema.ts
    │   │   │   ├── prompt-patch/
    │   │   │   │   ├── applicator.ts
    │   │   │   │   ├── index.ts
    │   │   │   │   └── schema.ts
    │   │   │   ├── registry.ts
    │   │   │   ├── routing-rule/
    │   │   │   │   ├── applicator.ts
    │   │   │   │   ├── index.ts
    │   │   │   │   └── schema.ts
    │   │   │   └── tool-policy/
    │   │   │       ├── applicator.ts
    │   │   │       ├── index.ts
    │   │   │       └── schema.ts
    │   │   ├── cli/
    │   │   │   ├── _shared/
    │   │   │   │   ├── exit-codes.ts
    │   │   │   │   └── output-formatters.ts
    │   │   │   ├── candidate.ts
    │   │   │   ├── emit-pr.ts
    │   │   │   ├── eval.ts
    │   │   │   ├── harness.ts
    │   │   │   ├── index.ts
    │   │   │   ├── promotion.ts
    │   │   │   ├── registry-ops.ts
    │   │   │   └── types.ts
    │   │   ├── contract/
    │   │   │   ├── ablation-verification.ts
    │   │   │   ├── branded-ids.ts
    │   │   │   ├── canonical-json.ts
    │   │   │   ├── eval-run-integrity.ts
    │   │   │   ├── factories.ts
    │   │   │   ├── harness-change-proposal.ts
    │   │   │   ├── index.ts
    │   │   │   ├── invariants.ts
    │   │   │   ├── json-schemas/
    │   │   │   │   ├── artifact.schema.json
    │   │   │   │   ├── eval-run.schema.json
    │   │   │   │   ├── fine-tuned-model-payload.schema.json
    │   │   │   │   ├── harness-change-proposal.schema.json
    │   │   │   │   ├── metric-bundle.schema.json
    │   │   │   │   ├── model-routing-payload.schema.json
    │   │   │   │   ├── patch.schema.json
    │   │   │   │   ├── promotion-decision.schema.json
    │   │   │   │   ├── promotion-event.schema.json
    │   │   │   │   ├── prompt-patch-payload.schema.json
    │   │   │   │   ├── provenance.schema.json
    │   │   │   │   ├── routing-rule-payload.schema.json
    │   │   │   │   ├── shared-defs.schema.json
    │   │   │   │   └── tool-policy-payload.schema.json
    │   │   │   ├── run-track.ts
    │   │   │   ├── schema-version.ts
    │   │   │   ├── strategy-identity.ts
    │   │   │   ├── strategy-quarantine.ts
    │   │   │   ├── types.ts
    │   │   │   └── validators.ts
    │   │   ├── contract-probes/
    │   │   │   └── index.ts
    │   │   ├── emit/
    │   │   │   ├── branch-namer.ts
    │   │   │   ├── index.ts
    │   │   │   ├── modes/
    │   │   │   │   ├── auto.ts
    │   │   │   │   ├── gh.ts
    │   │   │   │   ├── git.ts
    │   │   │   │   └── patch-only.ts
    │   │   │   ├── patch-renderer.ts
    │   │   │   ├── pipeline.ts
    │   │   │   ├── pr-body-renderer.ts
    │   │   │   ├── preflight.ts
    │   │   │   └── workspace-layout.ts
    │   │   ├── eval-ingest/
    │   │   │   ├── attach.ts
    │   │   │   ├── errors.ts
    │   │   │   ├── index.ts
    │   │   │   └── validator.ts
    │   │   ├── eval-ledger/
    │   │   │   └── index.ts
    │   │   ├── external-evals/
    │   │   │   └── index.ts
    │   │   ├── instrument/
    │   │   │   ├── cli/
    │   │   │   │   ├── index.ts
    │   │   │   │   ├── instrument.ts
    │   │   │   │   └── runner.ts
    │   │   │   ├── contract/
    │   │   │   │   ├── index.ts
    │   │   │   │   ├── json-schemas/
    │   │   │   │   │   ├── instrument-plan.schema.json
    │   │   │   │   │   └── instrument-session.schema.json
    │   │   │   │   ├── plugin-compat.ts
    │   │   │   │   ├── plugin-interface.ts
    │   │   │   │   └── validators.ts
    │   │   │   ├── detectors/
    │   │   │   │   ├── anthropic-python/
    │   │   │   │   │   ├── STABILITY.md
    │   │   │   │   │   ├── index.ts
    │   │   │   │   │   └── plugin.ts
    │   │   │   │   ├── anthropic-ts/
    │   │   │   │   │   ├── STABILITY.md
    │   │   │   │   │   ├── index.ts
    │   │   │   │   │   └── plugin.ts
    │   │   │   │   ├── openai-python/
    │   │   │   │   │   ├── STABILITY.md
    │   │   │   │   │   ├── index.ts
    │   │   │   │   │   └── plugin.ts
    │   │   │   │   └── openai-ts/
    │   │   │   │       ├── STABILITY.md
    │   │   │   │       ├── index.ts
    │   │   │   │       └── plugin.ts
    │   │   │   ├── index.ts
    │   │   │   ├── llm/
    │   │   │   │   ├── enhancer.ts
    │   │   │   │   ├── index.ts
    │   │   │   │   ├── prompts.ts
    │   │   │   │   └── tty-detector.ts
    │   │   │   ├── pipeline/
    │   │   │   │   ├── index.ts
    │   │   │   │   ├── modes/
    │   │   │   │   │   ├── apply.ts
    │   │   │   │   │   ├── branch.ts
    │   │   │   │   │   └── dry-run.ts
    │   │   │   │   ├── orchestrator.ts
    │   │   │   │   ├── pr-body-renderer.ts
    │   │   │   │   └── preflight.ts
    │   │   │   ├── planner/
    │   │   │   │   ├── conflict-detector.ts
    │   │   │   │   ├── edit-composer.ts
    │   │   │   │   ├── import-manager.ts
    │   │   │   │   ├── indentation-matcher.ts
    │   │   │   │   └── index.ts
    │   │   │   ├── registry/
    │   │   │   │   ├── index.ts
    │   │   │   │   └── plugin-registry.ts
    │   │   │   ├── safety/
    │   │   │   │   ├── directive-parser.ts
    │   │   │   │   ├── hardcoded-defaults.ts
    │   │   │   │   ├── index.ts
    │   │   │   │   └── secret-detector.ts
    │   │   │   └── scanner/
    │   │   │       ├── file-type-filter.ts
    │   │   │       ├── index.ts
    │   │   │       ├── source-file.ts
    │   │   │       ├── tree-sitter-loader.ts
    │   │   │       └── walker.ts
    │   │   ├── memory-packs/
    │   │   │   └── index.ts
    │   │   ├── promotion/
    │   │   │   ├── append.ts
    │   │   │   ├── decide.ts
    │   │   │   ├── harness-change-proposal.ts
    │   │   │   ├── index.ts
    │   │   │   ├── thresholds.ts
    │   │   │   └── transitions.ts
    │   │   ├── registry/
    │   │   │   ├── artifact-store.ts
    │   │   │   ├── content-address.ts
    │   │   │   ├── eval-run-store.ts
    │   │   │   ├── harness-proposal-store.ts
    │   │   │   ├── history-store.ts
    │   │   │   ├── index-cache.ts
    │   │   │   ├── index.ts
    │   │   │   ├── lock.ts
    │   │   │   ├── repair.ts
    │   │   │   ├── state-pointer.ts
    │   │   │   └── validate.ts
    │   │   └── runtime/
    │   │       ├── index.ts
    │   │       ├── model-router.ts
    │   │       └── task-budget.ts
    │   ├── evidence/
    │   │   ├── index.ts
    │   │   ├── manifest.ts
    │   │   ├── materializer.ts
    │   │   ├── tracker.ts
    │   │   └── workspace.ts
    │   ├── execution/
    │   │   ├── action-filter-contracts.ts
    │   │   ├── action-filter-discovery-workflow.ts
    │   │   ├── action-filter-prompt-workflow.ts
    │   │   ├── action-filter-selection-workflow.ts
    │   │   ├── action-filter-verification-workflow.ts
    │   │   ├── action-filter.ts
    │   │   ├── elo.ts
    │   │   ├── gondolin-contract.ts
    │   │   ├── harness-loader.ts
    │   │   ├── improvement-loop-detection.ts
    │   │   ├── improvement-loop-policy.ts
    │   │   ├── improvement-loop-result.ts
    │   │   ├── improvement-loop.ts
    │   │   ├── judge-executor.ts
    │   │   ├── output-cleaner.ts
    │   │   ├── queued-task-browser-context.ts
    │   │   ├── sandbox.ts
    │   │   ├── simple-agent-task-workflow.ts
    │   │   ├── strategy-validator.ts
    │   │   ├── supervisor.ts
    │   │   ├── task-processing-workflow.ts
    │   │   ├── task-queue-store.ts
    │   │   ├── task-runner-config.ts
    │   │   ├── task-runner-loop-workflow.ts
    │   │   ├── task-runner.ts
    │   │   └── tournament.ts
    │   ├── extensions/
    │   │   ├── hooks.ts
    │   │   ├── index.ts
    │   │   ├── loader.ts
    │   │   └── provider-hooks.ts
    │   ├── index.ts
    │   ├── integrations/
    │   │   ├── _shared/
    │   │   │   ├── STABILITY.md
    │   │   │   ├── index.ts
    │   │   │   ├── proxy-runtime.ts
    │   │   │   ├── session.ts
    │   │   │   └── sink.ts
    │   │   ├── anthropic/
    │   │   │   ├── STABILITY.md
    │   │   │   ├── content.ts
    │   │   │   ├── index.ts
    │   │   │   ├── proxy.ts
    │   │   │   ├── stream-proxy.ts
    │   │   │   ├── taxonomy.ts
    │   │   │   ├── trace-builder.ts
    │   │   │   └── wrap.ts
    │   │   ├── browser/
    │   │   │   ├── chrome-cdp-discovery.ts
    │   │   │   ├── chrome-cdp-runtime.ts
    │   │   │   ├── chrome-cdp-transport.ts
    │   │   │   ├── chrome-cdp.ts
    │   │   │   ├── context-capture.ts
    │   │   │   ├── contract/
    │   │   │   │   ├── generated-types.ts
    │   │   │   │   ├── index.ts
    │   │   │   │   ├── json-schemas/
    │   │   │   │   │   ├── browser-action.schema.json
    │   │   │   │   │   ├── browser-audit-event.schema.json
    │   │   │   │   │   ├── browser-contract.schema.json
    │   │   │   │   │   ├── browser-session-config.schema.json
    │   │   │   │   │   ├── browser-snapshot.schema.json
    │   │   │   │   │   └── shared-defs.schema.json
    │   │   │   │   ├── types.ts
    │   │   │   │   └── validators.ts
    │   │   │   ├── evidence.ts
    │   │   │   ├── factory.ts
    │   │   │   ├── index.ts
    │   │   │   ├── policy.ts
    │   │   │   └── types.ts
    │   │   └── openai/
    │   │       ├── STABILITY.md
    │   │       ├── index.ts
    │   │       ├── proxy.ts
    │   │       ├── session.ts
    │   │       ├── sink.ts
    │   │       ├── stream-proxy.ts
    │   │       ├── taxonomy.ts
    │   │       ├── trace-builder.ts
    │   │       └── wrap.ts
    │   ├── investigation/
    │   │   ├── browser-context.ts
    │   │   ├── engine.ts
    │   │   ├── investigation-analysis-result-workflow.ts
    │   │   ├── investigation-analysis-workflow.ts
    │   │   ├── investigation-contracts.ts
    │   │   ├── investigation-engine-helpers.ts
    │   │   ├── investigation-execution-workflow.ts
    │   │   ├── investigation-generation-parsing.ts
    │   │   ├── investigation-generation-prompts.ts
    │   │   ├── investigation-generation-workflow.ts
    │   │   ├── investigation-result-workflow.ts
    │   │   ├── investigation-run-support-workflow.ts
    │   │   ├── investigation-run-workflow.ts
    │   │   └── investigation-scenario-preparation-workflow.ts
    │   ├── judge/
    │   │   ├── delegated.ts
    │   │   ├── index.ts
    │   │   ├── llm-judge.ts
    │   │   ├── parse.ts
    │   │   └── rubric-coherence.ts
    │   ├── knowledge/
    │   │   ├── agent-task-solve-execution.ts
    │   │   ├── artifact-store.ts
    │   │   ├── built-in-game-solve-execution.ts
    │   │   ├── codegen-solve-execution.ts
    │   │   ├── compaction-ledger.ts
    │   │   ├── context-selection-report.ts
    │   │   ├── context-selection-store.ts
    │   │   ├── dead-end.ts
    │   │   ├── harness-store.ts
    │   │   ├── index.ts
    │   │   ├── package-coercion.ts
    │   │   ├── package-content.ts
    │   │   ├── package-metadata.ts
    │   │   ├── package-types.ts
    │   │   ├── package.ts
    │   │   ├── playbook.ts
    │   │   ├── research-hub.ts
    │   │   ├── scenario-id.ts
    │   │   ├── semantic-compaction.ts
    │   │   ├── session-report.ts
    │   │   ├── skill-package-contracts.ts
    │   │   ├── skill-package-dict-workflow.ts
    │   │   ├── skill-package-export-workflow.ts
    │   │   ├── skill-package-lesson-cleaning.ts
    │   │   ├── skill-package-markdown-workflow.ts
    │   │   ├── skill-package.ts
    │   │   ├── solve-generation-budget.ts
    │   │   ├── solve-job-workflow.ts
    │   │   ├── solve-manager-workflow.ts
    │   │   ├── solve-package-builders.ts
    │   │   ├── solve-package-helpers.ts
    │   │   ├── solve-scenario-routing.ts
    │   │   ├── solve-workflow.ts
    │   │   ├── solver.ts
    │   │   ├── trajectory.ts
    │   │   └── versioned-store.ts
    │   ├── loop/
    │   │   ├── backpressure.ts
    │   │   ├── controller.ts
    │   │   ├── events.ts
    │   │   ├── generation-attempt-orchestrator.ts
    │   │   ├── generation-attempt-state.ts
    │   │   ├── generation-attempt-workflow.ts
    │   │   ├── generation-cycle-state.ts
    │   │   ├── generation-event-coordinator.ts
    │   │   ├── generation-execution-step.ts
    │   │   ├── generation-journal.ts
    │   │   ├── generation-lifecycle-workflow.ts
    │   │   ├── generation-loop-orchestrator.ts
    │   │   ├── generation-phase-state.ts
    │   │   ├── generation-prompts.ts
    │   │   ├── generation-recovery.ts
    │   │   ├── generation-run-state.ts
    │   │   ├── generation-runner.ts
    │   │   ├── generation-side-effect-coordinator.ts
    │   │   ├── generation-tournament-event-sequencing.ts
    │   │   ├── hypothesis-tree.ts
    │   │   ├── index.ts
    │   │   └── stagnation.ts
    │   ├── mcp/
    │   │   ├── agent-task-package-tools.ts
    │   │   ├── campaign-tools.ts
    │   │   ├── capabilities.ts
    │   │   ├── core-control-tools.ts
    │   │   ├── feedback-replay-tools.ts
    │   │   ├── instrument-tools.ts
    │   │   ├── knowledge-readback-tools.ts
    │   │   ├── mission-tools.ts
    │   │   ├── production-traces-tools.ts
    │   │   ├── run-management-tools.ts
    │   │   ├── runtime-session-tools.ts
    │   │   ├── sandbox-tools.ts
    │   │   ├── scenario-catalog-tools.ts
    │   │   ├── scenario-execution-tools.ts
    │   │   ├── scenario-revision-tools.ts
    │   │   ├── server.ts
    │   │   └── solve-tools.ts
    │   ├── mission/
    │   │   ├── adaptive-executor.ts
    │   │   ├── campaign-contracts.ts
    │   │   ├── campaign-lifecycle-workflow.ts
    │   │   ├── campaign-manager-access-workflow.ts
    │   │   ├── campaign-manager-workflow.ts
    │   │   ├── campaign-membership-store-workflow.ts
    │   │   ├── campaign-store-query-workflow.ts
    │   │   ├── campaign-store-workflow.ts
    │   │   ├── campaign-store.ts
    │   │   ├── campaign.ts
    │   │   ├── checkpoint.ts
    │   │   ├── control-plane.ts
    │   │   ├── events.ts
    │   │   ├── executor.ts
    │   │   ├── index.ts
    │   │   ├── lifecycle.ts
    │   │   ├── manager.ts
    │   │   ├── planner.ts
    │   │   ├── proof.ts
    │   │   ├── simulation-bridge.ts
    │   │   ├── status-transitions.ts
    │   │   ├── store-contracts.ts
    │   │   ├── store-lifecycle-workflow.ts
    │   │   ├── store-mappers.ts
    │   │   ├── store-schema-workflow.ts
    │   │   ├── store.ts
    │   │   ├── types.ts
    │   │   ├── verification-workflow.ts
    │   │   └── verifiers.ts
    │   ├── notifications/
    │   │   └── index.ts
    │   ├── openclaw/
    │   │   ├── artifact-contract.ts
    │   │   ├── distill-job-store.ts
    │   │   └── service.ts
    │   ├── production-traces/
    │   │   ├── cli/
    │   │   │   ├── _shared/
    │   │   │   │   ├── exit-codes.ts
    │   │   │   │   ├── flags.ts
    │   │   │   │   ├── output-formatters.ts
    │   │   │   │   ├── trace-loading.ts
    │   │   │   │   └── types.ts
    │   │   │   ├── build-dataset.ts
    │   │   │   ├── datasets.ts
    │   │   │   ├── export.ts
    │   │   │   ├── index.ts
    │   │   │   ├── ingest.ts
    │   │   │   ├── init.ts
    │   │   │   ├── list-show-stats.ts
    │   │   │   ├── policy.ts
    │   │   │   ├── prune.ts
    │   │   │   └── rotate-salt.ts
    │   │   ├── contract/
    │   │   │   ├── branded-ids.ts
    │   │   │   ├── canonical-json.ts
    │   │   │   ├── content-address.ts
    │   │   │   ├── factories.ts
    │   │   │   ├── generated-types.ts
    │   │   │   ├── index.ts
    │   │   │   ├── invariants.ts
    │   │   │   ├── json-schemas/
    │   │   │   │   ├── cluster-config.schema.json
    │   │   │   │   ├── dataset-manifest.schema.json
    │   │   │   │   ├── dataset-row.schema.json
    │   │   │   │   ├── env-context.schema.json
    │   │   │   │   ├── feedback-ref.schema.json
    │   │   │   │   ├── production-outcome.schema.json
    │   │   │   │   ├── production-trace.schema.json
    │   │   │   │   ├── redaction-marker.schema.json
    │   │   │   │   ├── redaction-policy.schema.json
    │   │   │   │   ├── retention-policy.schema.json
    │   │   │   │   ├── rubric-config.schema.json
    │   │   │   │   ├── selection-rule.schema.json
    │   │   │   │   ├── session.schema.json
    │   │   │   │   ├── shared-defs.schema.json
    │   │   │   │   ├── timing-info.schema.json
    │   │   │   │   ├── trace-links.schema.json
    │   │   │   │   ├── trace-source.schema.json
    │   │   │   │   └── usage-info.schema.json
    │   │   │   ├── types.ts
    │   │   │   └── validators.ts
    │   │   ├── dataset/
    │   │   │   ├── cluster.ts
    │   │   │   ├── index.ts
    │   │   │   ├── manifest.ts
    │   │   │   ├── pipeline.ts
    │   │   │   ├── provenance.ts
    │   │   │   ├── rubric.ts
    │   │   │   ├── select.ts
    │   │   │   ├── split.ts
    │   │   │   └── types.ts
    │   │   ├── index.ts
    │   │   ├── ingest/
    │   │   │   ├── dedupe.ts
    │   │   │   ├── index.ts
    │   │   │   ├── lock.ts
    │   │   │   ├── paths.ts
    │   │   │   ├── receipt.ts
    │   │   │   ├── redaction-phase.ts
    │   │   │   ├── scan-workflow.ts
    │   │   │   └── validator.ts
    │   │   ├── redaction/
    │   │   │   ├── apply.ts
    │   │   │   ├── hash-primitives.ts
    │   │   │   ├── index.ts
    │   │   │   ├── install-salt.ts
    │   │   │   ├── mark.ts
    │   │   │   ├── policy.ts
    │   │   │   └── types.ts
    │   │   ├── retention/
    │   │   │   ├── enforce.ts
    │   │   │   ├── gc-log.ts
    │   │   │   ├── index.ts
    │   │   │   └── policy.ts
    │   │   ├── sdk/
    │   │   │   ├── BUDGET.md
    │   │   │   ├── STABILITY.md
    │   │   │   ├── build-trace.ts
    │   │   │   ├── hashing-core.ts
    │   │   │   ├── hashing.ts
    │   │   │   ├── index.ts
    │   │   │   ├── trace-batch.ts
    │   │   │   ├── validate.ts
    │   │   │   └── write-jsonl.ts
    │   │   └── taxonomy/
    │   │       ├── anthropic-error-reasons.ts
    │   │       ├── index.ts
    │   │       └── openai-error-reasons.ts
    │   ├── prompts/
    │   │   ├── context-budget.ts
    │   │   └── templates.ts
    │   ├── providers/
    │   │   ├── deterministic.ts
    │   │   ├── index.ts
    │   │   ├── provider-config-resolution.ts
    │   │   ├── provider-factory.ts
    │   │   ├── role-provider-bundle.ts
    │   │   └── supported-provider-types.ts
    │   ├── research/
    │   │   ├── consultation.ts
    │   │   ├── evaluation.ts
    │   │   ├── persistence.ts
    │   │   ├── prompt-wiring.ts
    │   │   ├── runtime.ts
    │   │   └── types.ts
    │   ├── rlm/
    │   │   ├── agent-task.ts
    │   │   ├── index.ts
    │   │   ├── secure-exec-worker.ts
    │   │   ├── session.ts
    │   │   └── types.ts
    │   ├── runtimes/
    │   │   ├── agent-output-metadata.ts
    │   │   ├── base.ts
    │   │   ├── claude-cli.ts
    │   │   ├── codex-cli.ts
    │   │   ├── config-options.ts
    │   │   ├── direct-api.ts
    │   │   ├── index.ts
    │   │   ├── mcp-runtime-tools.ts
    │   │   ├── pi-cli.ts
    │   │   ├── pi-rpc.ts
    │   │   ├── runtime-session-agent.ts
    │   │   └── workspace-env.ts
    │   ├── scenarios/
    │   │   ├── agent-task-creator.ts
    │   │   ├── agent-task-design-workflow.ts
    │   │   ├── agent-task-designer.ts
    │   │   ├── agent-task-factory.ts
    │   │   ├── agent-task-family-routing.ts
    │   │   ├── agent-task-name-workflow.ts
    │   │   ├── agent-task-persistence-workflow.ts
    │   │   ├── agent-task-spec.ts
    │   │   ├── agent-task-store.ts
    │   │   ├── agent-task-validator.ts
    │   │   ├── artifact-editing-creator.ts
    │   │   ├── artifact-editing-designer.ts
    │   │   ├── artifact-editing-spec.ts
    │   │   ├── codegen/
    │   │   │   ├── agent-task-codegen.ts
    │   │   │   ├── artifact-editing-codegen.ts
    │   │   │   ├── coordination-codegen.ts
    │   │   │   ├── execution-validator-contracts.ts
    │   │   │   ├── execution-validator-core-workflow.ts
    │   │   │   ├── execution-validator-family-workflow.ts
    │   │   │   ├── execution-validator.ts
    │   │   │   ├── executor.ts
    │   │   │   ├── index.ts
    │   │   │   ├── investigation-codegen.ts
    │   │   │   ├── loader.ts
    │   │   │   ├── negotiation-codegen.ts
    │   │   │   ├── operator-loop-codegen.ts
    │   │   │   ├── registry.ts
    │   │   │   ├── runtime.ts
    │   │   │   ├── schema-evolution-codegen.ts
    │   │   │   ├── simulation-codegen.ts
    │   │   │   ├── template-renderer.ts
    │   │   │   ├── templates/
    │   │   │   │   ├── agent-task-template.ts
    │   │   │   │   ├── artifact-editing-template.ts
    │   │   │   │   ├── coordination-template.ts
    │   │   │   │   ├── investigation-template.ts
    │   │   │   │   ├── negotiation-template.ts
    │   │   │   │   ├── schema-evolution-template.ts
    │   │   │   │   ├── simulation-template.ts
    │   │   │   │   ├── tool-fragility-template.ts
    │   │   │   │   └── workflow-template.ts
    │   │   │   ├── tool-fragility-codegen.ts
    │   │   │   └── workflow-codegen.ts
    │   │   ├── coordination-creator.ts
    │   │   ├── coordination-designer.ts
    │   │   ├── coordination-spec.ts
    │   │   ├── custom-loader.ts
    │   │   ├── draft-workflow.ts
    │   │   ├── families.ts
    │   │   ├── family-assertion-workflow.ts
    │   │   ├── family-classifier-input.ts
    │   │   ├── family-classifier-scoring.ts
    │   │   ├── family-classifier-signals.ts
    │   │   ├── family-classifier.ts
    │   │   ├── family-contract-helpers.ts
    │   │   ├── family-designer.ts
    │   │   ├── family-detection-catalog.ts
    │   │   ├── family-expected-methods.ts
    │   │   ├── family-interface-catalogs.ts
    │   │   ├── family-interface-guards.ts
    │   │   ├── family-interface-registry.ts
    │   │   ├── family-interface-runtime.ts
    │   │   ├── family-interface-types.ts
    │   │   ├── family-interfaces.ts
    │   │   ├── family-pipeline.ts
    │   │   ├── game-interface.ts
    │   │   ├── grid-ctf.ts
    │   │   ├── index.ts
    │   │   ├── intent-validator.ts
    │   │   ├── interactive-scenario-materialization.ts
    │   │   ├── investigation-creator.ts
    │   │   ├── investigation-designer.ts
    │   │   ├── investigation-spec.ts
    │   │   ├── llm-json-response.ts
    │   │   ├── materialize-agent-task-planning.ts
    │   │   ├── materialize-agent-task-results.ts
    │   │   ├── materialize-artifact-persistence.ts
    │   │   ├── materialize-base-persisted-spec.ts
    │   │   ├── materialize-codegen-execution.ts
    │   │   ├── materialize-codegen-planning.ts
    │   │   ├── materialize-contracts.ts
    │   │   ├── materialize-dependencies.ts
    │   │   ├── materialize-execution-workflow.ts
    │   │   ├── materialize-family-planning-contracts.ts
    │   │   ├── materialize-family-planning-helper-contracts.ts
    │   │   ├── materialize-family-planning-helpers.ts
    │   │   ├── materialize-family-planning.ts
    │   │   ├── materialize-request-planning-input.ts
    │   │   ├── materialize-request-planning.ts
    │   │   ├── materialize-result-support.ts
    │   │   ├── materialize-scenario-coordinator.ts
    │   │   ├── materialize-scenario-default-wiring.ts
    │   │   ├── materialize-scenario-execution-delegation-composition-coordinator.ts
    │   │   ├── materialize-scenario-execution-delegation-finalization-assembly-coordinator.ts
    │   │   ├── materialize-scenario-execution-delegation-finalization-composition-coordinator.ts
    │   │   ├── materialize-scenario-execution-delegation-finalization-coordinator.ts
    │   │   ├── materialize-scenario-execution-delegation-finalization-result-assembly-coordinator.ts
    │   │   ├── materialize-scenario-execution-delegation-finalization-result-composition-coordinator.ts
    │   │   ├── materialize-scenario-execution-delegation-finalization-result-input-result-coordinator.ts
    │   │   ├── materialize-scenario-execution-delegation-input-coordinator.ts
    │   │   ├── materialize-scenario-execution-delegation-orchestration-coordinator.ts
    │   │   ├── materialize-scenario-execution-delegation-request-resolution.ts
    │   │   ├── materialize-scenario-execution-delegation-result.ts
    │   │   ├── materialize-scenario-execution-request.ts
    │   │   ├── materialize-scenario-request-assembly.ts
    │   │   ├── materialize-scenario-request-handoff-delegation.ts
    │   │   ├── materialize-workflow-planning-outcome.ts
    │   │   ├── materialize-workflow-request-composition.ts
    │   │   ├── materialize-workflow-request-coordinator.ts
    │   │   ├── materialize-workflow-request-finalization.ts
    │   │   ├── materialize-workflow-request-planning.ts
    │   │   ├── materialize-workflow-request-result.ts
    │   │   ├── materialize.ts
    │   │   ├── negotiation-creator.ts
    │   │   ├── negotiation-designer.ts
    │   │   ├── negotiation-spec.ts
    │   │   ├── operator-loop-creator.ts
    │   │   ├── operator-loop-designer.ts
    │   │   ├── operator-loop-spec.ts
    │   │   ├── othello.ts
    │   │   ├── persisted-parametric-scenario.ts
    │   │   ├── primary-family-contracts.ts
    │   │   ├── primary-family-interface-types.ts
    │   │   ├── primary-family-registry.ts
    │   │   ├── registry.ts
    │   │   ├── resource-trader.ts
    │   │   ├── revision-spec-normalizer.ts
    │   │   ├── scenario-creator.ts
    │   │   ├── scenario-family-fallback.ts
    │   │   ├── scenario-revision-contracts.ts
    │   │   ├── scenario-revision-execution.ts
    │   │   ├── scenario-revision-prompt-workflow.ts
    │   │   ├── scenario-revision-request-workflow.ts
    │   │   ├── scenario-revision.ts
    │   │   ├── schema-evolution-creator.ts
    │   │   ├── schema-evolution-designer.ts
    │   │   ├── schema-evolution-spec.ts
    │   │   ├── simulation-creator.ts
    │   │   ├── simulation-designer.ts
    │   │   ├── simulation-family-contracts.ts
    │   │   ├── simulation-family-guard-builders.ts
    │   │   ├── simulation-family-interface-types.ts
    │   │   ├── simulation-family-method-catalogs.ts
    │   │   ├── simulation-family-registry.ts
    │   │   ├── simulation-spec.ts
    │   │   ├── spec-auto-heal-agent-task.ts
    │   │   ├── spec-auto-heal-core.ts
    │   │   ├── spec-auto-heal-preconditions.ts
    │   │   ├── spec-auto-heal-readers.ts
    │   │   ├── spec-auto-heal.ts
    │   │   ├── templates/
    │   │   │   ├── content-generation.json
    │   │   │   ├── index.ts
    │   │   │   ├── prompt-optimization.json
    │   │   │   └── rag-accuracy.json
    │   │   ├── tool-fragility-creator.ts
    │   │   ├── tool-fragility-designer.ts
    │   │   ├── tool-fragility-spec.ts
    │   │   ├── word-count.ts
    │   │   ├── workflow-creator.ts
    │   │   ├── workflow-designer.ts
    │   │   └── workflow-spec.ts
    │   ├── server/
    │   │   ├── active-run-lifecycle.ts
    │   │   ├── auth-command-workflow.ts
    │   │   ├── campaign-api.ts
    │   │   ├── campaign-route-workflow.ts
    │   │   ├── chat-agent-command-workflow.ts
    │   │   ├── chat-agent-workflow.ts
    │   │   ├── client-error-workflow.ts
    │   │   ├── cockpit-api.ts
    │   │   ├── cockpit-changelog.ts
    │   │   ├── cockpit-consultation.ts
    │   │   ├── cockpit-writeup.ts
    │   │   ├── event-stream-envelope.ts
    │   │   ├── http-api-parity.ts
    │   │   ├── hub-api.ts
    │   │   ├── index.ts
    │   │   ├── interactive-control-command-workflow.ts
    │   │   ├── interactive-scenario-command-workflow.ts
    │   │   ├── interactive-scenario-session.ts
    │   │   ├── knowledge-api.ts
    │   │   ├── mission-action-workflow.ts
    │   │   ├── mission-api.ts
    │   │   ├── mission-progress-workflow.ts
    │   │   ├── mission-read-workflow.ts
    │   │   ├── monitor-api.ts
    │   │   ├── monitor-engine.ts
    │   │   ├── notebook-api.ts
    │   │   ├── openclaw-api.ts
    │   │   ├── protocol.ts
    │   │   ├── run-custom-scenario-registry.ts
    │   │   ├── run-environment-catalog.ts
    │   │   ├── run-manager-provider-session.ts
    │   │   ├── run-manager.ts
    │   │   ├── run-simulation-read-workflow.ts
    │   │   ├── run-start-workflow.ts
    │   │   ├── run-state-workflow.ts
    │   │   ├── runtime-session-api.ts
    │   │   ├── runtime-session-event-stream.ts
    │   │   ├── simulation-api.ts
    │   │   ├── simulation-dashboard.ts
    │   │   ├── tui-auth.ts
    │   │   ├── websocket-session-bootstrap.ts
    │   │   └── ws-server.ts
    │   ├── session/
    │   │   ├── action-labels.ts
    │   │   ├── context-pressure.ts
    │   │   ├── coordinator.ts
    │   │   ├── living-docs.ts
    │   │   ├── memory-consolidation.ts
    │   │   ├── progress-digest.ts
    │   │   ├── remote-bridge.ts
    │   │   ├── runtime-child-tasks.ts
    │   │   ├── runtime-context.ts
    │   │   ├── runtime-events.ts
    │   │   ├── runtime-grant-events.ts
    │   │   ├── runtime-json.ts
    │   │   ├── runtime-session-ids.ts
    │   │   ├── runtime-session-notifications.ts
    │   │   ├── runtime-session-read-model.ts
    │   │   ├── runtime-session-timeline.ts
    │   │   ├── runtime-session.ts
    │   │   ├── skill-registry.ts
    │   │   ├── store.ts
    │   │   ├── supervisor.ts
    │   │   └── types.ts
    │   ├── simulation/
    │   │   ├── artifact-store.ts
    │   │   ├── engine.ts
    │   │   ├── export.ts
    │   │   ├── family-executor.ts
    │   │   ├── request-planner.ts
    │   │   ├── score-normalization.ts
    │   │   ├── summary.ts
    │   │   ├── sweep-dsl.ts
    │   │   ├── types.ts
    │   │   └── variant-materializer.ts
    │   ├── storage/
    │   │   ├── consultation-store.ts
    │   │   ├── generation-match-output-workflow.ts
    │   │   ├── generation-record-contracts.ts
    │   │   ├── generation-record-store.ts
    │   │   ├── generation-run-query-workflow.ts
    │   │   ├── generation-trajectory-workflow.ts
    │   │   ├── generation-upsert-workflow.ts
    │   │   ├── hub-store.ts
    │   │   ├── human-feedback-store.ts
    │   │   ├── index.ts
    │   │   ├── monitor-store.ts
    │   │   ├── notebook-store.ts
    │   │   ├── schema-parity-manifest.ts
    │   │   ├── score-trajectory-store.ts
    │   │   ├── sqlite-store.ts
    │   │   ├── storage-consultation-facade.ts
    │   │   ├── storage-contracts.ts
    │   │   ├── storage-generation-run-facade.ts
    │   │   ├── storage-hub-facade.ts
    │   │   ├── storage-human-feedback-facade.ts
    │   │   ├── storage-migration-workflow.ts
    │   │   ├── storage-monitor-facade.ts
    │   │   ├── storage-notebook-facade.ts
    │   │   ├── storage-task-queue-facade.ts
    │   │   └── task-queue-store.ts
    │   ├── traces/
    │   │   ├── data-plane-curation-workflow.ts
    │   │   ├── data-plane-io-workflow.ts
    │   │   ├── data-plane-types.ts
    │   │   ├── data-plane.ts
    │   │   ├── dataset-adapter-provenance.ts
    │   │   ├── dataset-adapter-routing-workflow.ts
    │   │   ├── dataset-adapter-workflow.ts
    │   │   ├── dataset-csv-adapter-workflow.ts
    │   │   ├── dataset-directory-scan-workflow.ts
    │   │   ├── dataset-discovery-constants.ts
    │   │   ├── dataset-discovery-types.ts
    │   │   ├── dataset-discovery-workflow.ts
    │   │   ├── dataset-discovery.ts
    │   │   ├── dataset-json-adapter-workflow.ts
    │   │   ├── dataset-manifest-workflow.ts
    │   │   ├── dataset-markdown-adapter-workflow.ts
    │   │   ├── dataset-path-resolution-workflow.ts
    │   │   ├── distillation-curation-workflow.ts
    │   │   ├── distillation-io-workflow.ts
    │   │   ├── distillation-pipeline.ts
    │   │   ├── distillation-types.ts
    │   │   ├── export-package-workflow.ts
    │   │   ├── export-redaction-workflow.ts
    │   │   ├── export-run-artifact-workflow.ts
    │   │   ├── export-workflow-types.ts
    │   │   ├── export-workflow.ts
    │   │   ├── otel-bridge.ts
    │   │   ├── public-schema-contracts.ts
    │   │   ├── public-schema-factories.ts
    │   │   ├── public-schema.ts
    │   │   ├── public-trace-export-workflow.ts
    │   │   ├── publishers-types.ts
    │   │   ├── publishers.ts
    │   │   ├── publishing-workflow.ts
    │   │   ├── redaction-application-workflow.ts
    │   │   ├── redaction-detection-workflow.ts
    │   │   ├── redaction-patterns.ts
    │   │   ├── redaction-policy-workflow.ts
    │   │   ├── redaction-types.ts
    │   │   ├── redaction.ts
    │   │   └── trace-ingest-workflow.ts
    │   ├── training/
    │   │   ├── backends.ts
    │   │   ├── export-context-workflow.ts
    │   │   ├── export-records-workflow.ts
    │   │   ├── export-types.ts
    │   │   ├── export.ts
    │   │   ├── model-strategy-recommendations.ts
    │   │   ├── model-strategy-selection-workflow.ts
    │   │   ├── model-strategy-types.ts
    │   │   ├── model-strategy.ts
    │   │   ├── promotion-engine-workflow.ts
    │   │   ├── promotion-registry-workflow.ts
    │   │   ├── promotion-types.ts
    │   │   ├── promotion.ts
    │   │   ├── prompt-alignment-helpers.ts
    │   │   ├── prompt-alignment-types.ts
    │   │   ├── prompt-alignment-validation.ts
    │   │   ├── prompt-alignment.ts
    │   │   ├── prompt-contract-workflow.ts
    │   │   ├── runtime-prompt-adapter-workflow.ts
    │   │   ├── training-backend-core.ts
    │   │   ├── training-checkpoint-workflow.ts
    │   │   ├── training-config-workflow.ts
    │   │   ├── training-metric-utils.ts
    │   │   ├── training-promotion-workflow.ts
    │   │   ├── training-prompt-adapter-workflow.ts
    │   │   ├── training-result-workflow.ts
    │   │   ├── training-run-execution-workflow.ts
    │   │   ├── training-runner-workflow.ts
    │   │   └── training-types.ts
    │   ├── tui/
    │   │   ├── activity-command.ts
    │   │   ├── activity-settings-store.ts
    │   │   ├── activity-summary.ts
    │   │   ├── app.tsx
    │   │   ├── auth-command.ts
    │   │   ├── chat-command.ts
    │   │   ├── command-workflow.ts
    │   │   ├── commands.ts
    │   │   ├── meta-command.ts
    │   │   ├── operator-command.ts
    │   │   ├── protocol.generated.ts
    │   │   ├── run-command.ts
    │   │   ├── solve-command.ts
    │   │   └── startup-log.ts
    │   ├── types/
    │   │   └── index.ts
    │   └── util.ts
    ├── tests/
    │   ├── _fixtures/
    │   │   ├── cross-runtime-emit/
    │   │   │   ├── minimal/
    │   │   │   │   ├── inputs.json
    │   │   │   │   └── python-canonical.json
    │   │   │   ├── with-feedback-refs/
    │   │   │   │   ├── inputs.json
    │   │   │   │   └── python-canonical.json
    │   │   │   ├── with-metadata-nested/
    │   │   │   │   ├── inputs.json
    │   │   │   │   └── python-canonical.json
    │   │   │   ├── with-outcome/
    │   │   │   │   ├── inputs.json
    │   │   │   │   └── python-canonical.json
    │   │   │   ├── with-routing/
    │   │   │   │   ├── inputs.json
    │   │   │   │   └── python-canonical.json
    │   │   │   ├── with-session-hashes/
    │   │   │   │   ├── inputs.json
    │   │   │   │   └── python-canonical.json
    │   │   │   └── with-tool-calls/
    │   │   │       ├── inputs.json
    │   │   │       └── python-canonical.json
    │   │   └── plugins/
    │   │       ├── index.ts
    │   │       ├── mock-anthropic-ts.ts
    │   │       ├── mock-conflicting.ts
    │   │       ├── mock-insert-statement.ts
    │   │       └── mock-openai-python.ts
    │   ├── _helpers/
    │   │   ├── build_trace_canonical.py
    │   │   ├── hash_user_id.py
    │   │   └── python-runner.ts
    │   ├── ac628-classifier.test.ts
    │   ├── action-filter-workflows.test.ts
    │   ├── action-filter.test.ts
    │   ├── action-labels.test.ts
    │   ├── active-run-lifecycle.test.ts
    │   ├── adaptive-mission.test.ts
    │   ├── advanced-features.test.ts
    │   ├── agent-command-workflow.test.ts
    │   ├── agent-e2e.test.ts
    │   ├── agent-orchestration.test.ts
    │   ├── agent-runtime.test.ts
    │   ├── agent-task-codegen-template.test.ts
    │   ├── agent-task-name-workflow.test.ts
    │   ├── agent-task-package-tools.test.ts
    │   ├── agent-task-persistence-workflow.test.ts
    │   ├── agent-task-pipeline.test.ts
    │   ├── agent-task-solve-execution.test.ts
    │   ├── agentos-adapter.test.ts
    │   ├── analytics.test.ts
    │   ├── analyze.test.ts
    │   ├── app-settings-contract.test.ts
    │   ├── artifact-editing-codegen-template.test.ts
    │   ├── artifact-store-compaction-ledger.test.ts
    │   ├── artifact-store-hooks.test.ts
    │   ├── auth-command-workflow.test.ts
    │   ├── auth-provider-command-workflow.test.ts
    │   ├── auto-discover-custom.test.ts
    │   ├── benchmark-command-workflow.test.ts
    │   ├── benchmark-provider.test.ts
    │   ├── blob-cli.test.ts
    │   ├── blob-command-workflow.test.ts
    │   ├── blobstore.test.ts
    │   ├── bootstrap-snapshot.test.ts
    │   ├── browser-settings.test.ts
    │   ├── built-in-game-solve-execution.test.ts
    │   ├── builtin-scenarios.test.ts
    │   ├── campaign-cli.test.ts
    │   ├── campaign-command-execution.test.ts
    │   ├── campaign-command-workflow.test.ts
    │   ├── campaign-lifecycle-workflow.test.ts
    │   ├── campaign-manager-access-workflow.test.ts
    │   ├── campaign-manager-workflow.test.ts
    │   ├── campaign-route-workflow.test.ts
    │   ├── campaign-store-query-workflow.test.ts
    │   ├── campaign-store.test.ts
    │   ├── campaign-surfaces.test.ts
    │   ├── campaign.test.ts
    │   ├── capabilities-command-workflow.test.ts
    │   ├── capabilities-provider-parity.test.ts
    │   ├── chat-agent-command-workflow.test.ts
    │   ├── chat-agent-workflow.test.ts
    │   ├── cli-command-registry.test.ts
    │   ├── cli-contract.test.ts
    │   ├── cli-dx.test.ts
    │   ├── cli-emit-engine-result.test.ts
    │   ├── cli-help.test.ts
    │   ├── cli-parity.test.ts
    │   ├── cli.test.ts
    │   ├── client-error-workflow.test.ts
    │   ├── code-mission.test.ts
    │   ├── codegen-runtime.test.ts
    │   ├── codegen-solve-execution.test.ts
    │   ├── codegen.test.ts
    │   ├── concept-model-durable-session-events.test.ts
    │   ├── concept-model-parity.test.ts
    │   ├── config-presets-workflow.test.ts
    │   ├── config.test.ts
    │   ├── context-pressure.test.ts
    │   ├── context-selection-command-workflow.test.ts
    │   ├── context-selection-report.test.ts
    │   ├── context-selection-store.test.ts
    │   ├── control-plane/
    │   │   ├── actuators/
    │   │   │   ├── _shared/
    │   │   │   │   ├── content-revert-rollback.test.ts
    │   │   │   │   ├── single-file-applicator.test.ts
    │   │   │   │   └── unified-diff-emitter.test.ts
    │   │   │   ├── fine-tuned-model/
    │   │   │   │   ├── fine-tuned-model.test.ts
    │   │   │   │   └── legacy-adapter.test.ts
    │   │   │   ├── model-routing/
    │   │   │   │   ├── applicator.test.ts
    │   │   │   │   └── registration.test.ts
    │   │   │   ├── prompt-patch/
    │   │   │   │   └── prompt-patch.test.ts
    │   │   │   ├── registry.test.ts
    │   │   │   ├── routing-rule/
    │   │   │   │   └── routing-rule.test.ts
    │   │   │   └── tool-policy/
    │   │   │       └── tool-policy.test.ts
    │   │   ├── cli/
    │   │   │   ├── candidate.test.ts
    │   │   │   ├── eval.test.ts
    │   │   │   ├── exit-codes.test.ts
    │   │   │   ├── harness.test.ts
    │   │   │   ├── output-formatters.test.ts
    │   │   │   ├── promotion.test.ts
    │   │   │   ├── registry-ops.test.ts
    │   │   │   └── subprocess-smoke.test.ts
    │   │   ├── contract/
    │   │   │   ├── ablation-verification.test.ts
    │   │   │   ├── branded-ids.test.ts
    │   │   │   ├── canonical-json.test.ts
    │   │   │   ├── eval-run-provenance.test.ts
    │   │   │   ├── factories.test.ts
    │   │   │   ├── harness-change-proposal.test.ts
    │   │   │   ├── invariants.test.ts
    │   │   │   ├── run-track.test.ts
    │   │   │   ├── schema-version.test.ts
    │   │   │   ├── strategy-identity.test.ts
    │   │   │   ├── strategy-quarantine.test.ts
    │   │   │   └── validators.test.ts
    │   │   ├── contract-probes/
    │   │   │   └── contract-probes.test.ts
    │   │   ├── emit/
    │   │   │   ├── branch-namer.test.ts
    │   │   │   ├── golden/
    │   │   │   │   └── pr-bodies/
    │   │   │   │       ├── hard-fail.md
    │   │   │   │       ├── marginal.md
    │   │   │   │       ├── moderate.md
    │   │   │   │       ├── no-incumbent.md
    │   │   │   │       ├── rollback.md
    │   │   │   │       └── strong.md
    │   │   │   ├── modes/
    │   │   │   │   ├── auto.test.ts
    │   │   │   │   ├── gh.test.ts
    │   │   │   │   ├── git.test.ts
    │   │   │   │   └── patch-only.test.ts
    │   │   │   ├── patch-renderer.test.ts
    │   │   │   ├── pipeline.test.ts
    │   │   │   ├── pr-body-renderer.test.ts
    │   │   │   ├── preflight.test.ts
    │   │   │   └── workspace-layout.test.ts
    │   │   ├── eval-ingest/
    │   │   │   ├── attach.test.ts
    │   │   │   ├── errors.test.ts
    │   │   │   └── validator.test.ts
    │   │   ├── eval-ledger/
    │   │   │   └── reconcile.test.ts
    │   │   ├── external-evals/
    │   │   │   ├── boundary-policy.test.ts
    │   │   │   ├── diagnostics.test.ts
    │   │   │   └── lifecycle.test.ts
    │   │   ├── instrument/
    │   │   │   ├── _fixtures/
    │   │   │   │   └── scanner/
    │   │   │   │       ├── directives/
    │   │   │   │       │   ├── python_directive_in_string.py
    │   │   │   │       │   ├── python_off.py
    │   │   │   │       │   ├── python_off_file.py
    │   │   │   │       │   └── ts_off.ts
    │   │   │   │       ├── simple-repo/
    │   │   │   │       │   └── src/
    │   │   │   │       │       ├── app.py
    │   │   │   │       │       └── client.ts
    │   │   │   │       └── tabs-and-spaces/
    │   │   │   │           ├── four_spaces.py
    │   │   │   │           ├── tabs.py
    │   │   │   │           └── two_space.ts
    │   │   │   ├── cli/
    │   │   │   │   ├── config-loader.test.ts
    │   │   │   │   ├── exit-codes.test.ts
    │   │   │   │   ├── flags.test.ts
    │   │   │   │   ├── integration.test.ts
    │   │   │   │   ├── mcp-exposure.test.ts
    │   │   │   │   └── runner.test.ts
    │   │   │   ├── contract/
    │   │   │   │   ├── edit-descriptor.test.ts
    │   │   │   │   ├── plugin-produce-shape.test.ts
    │   │   │   │   └── source-range.test.ts
    │   │   │   ├── detectors/
    │   │   │   │   ├── anthropic-python/
    │   │   │   │   │   ├── gate-1-canonical.test.ts
    │   │   │   │   │   ├── gate-2-idempotency.test.ts
    │   │   │   │   │   ├── gate-3-factory.test.ts
    │   │   │   │   │   ├── golden/
    │   │   │   │   │   │   ├── aliased-import/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── aliased-import-module-prefixed/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── already-wrapped-skipped/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── async-client/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── bedrock-refused/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── canonical-multi-construct/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── canonical-single/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── factory-function-refused/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── mixed-async-and-sync/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── module-prefixed/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   └── vertex-refused/
    │   │   │   │   │   │       ├── existing-imports.json
    │   │   │   │   │   │       ├── expected-advisories.json
    │   │   │   │   │   │       ├── expected-edits.json
    │   │   │   │   │   │       └── input.py
    │   │   │   │   │   ├── golden.test.ts
    │   │   │   │   │   └── property/
    │   │   │   │   │       └── anthropic-python-detection.property.test.ts
    │   │   │   │   ├── anthropic-ts/
    │   │   │   │   │   ├── gate-1-canonical.test.ts
    │   │   │   │   │   ├── gate-2-idempotency.test.ts
    │   │   │   │   │   ├── gate-3-factory-function.test.ts
    │   │   │   │   │   ├── golden/
    │   │   │   │   │   │   ├── aliased-import/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.ts
    │   │   │   │   │   │   ├── aliased-import-module-prefixed/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.ts
    │   │   │   │   │   │   ├── already-wrapped-skipped/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.ts
    │   │   │   │   │   │   ├── async-client/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.ts
    │   │   │   │   │   │   ├── bedrock-refused/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.ts
    │   │   │   │   │   │   ├── canonical-multi-construct/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.ts
    │   │   │   │   │   │   ├── canonical-single/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.ts
    │   │   │   │   │   │   ├── factory-function-refused/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.ts
    │   │   │   │   │   │   ├── mixed-async-and-sync/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.ts
    │   │   │   │   │   │   ├── module-prefixed/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.ts
    │   │   │   │   │   │   └── vertex-refused/
    │   │   │   │   │   │       ├── existing-imports.json
    │   │   │   │   │   │       ├── expected-advisories.json
    │   │   │   │   │   │       ├── expected-edits.json
    │   │   │   │   │   │       └── input.ts
    │   │   │   │   │   ├── golden.test.ts
    │   │   │   │   │   └── property/
    │   │   │   │   │       └── anthropic-ts-detection.property.test.ts
    │   │   │   │   ├── openai-python/
    │   │   │   │   │   ├── gate-1-canonical.test.ts
    │   │   │   │   │   ├── gate-2-idempotency.test.ts
    │   │   │   │   │   ├── gate-3-factory.test.ts
    │   │   │   │   │   ├── golden/
    │   │   │   │   │   │   ├── aliased-import/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── aliased-import-module-prefixed/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── already-wrapped-skipped/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── async-client/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── azure-refused/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── canonical-multi-construct/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── canonical-single/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── factory-function-refused/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   ├── mixed-async-and-sync/
    │   │   │   │   │   │   │   ├── existing-imports.json
    │   │   │   │   │   │   │   ├── expected-advisories.json
    │   │   │   │   │   │   │   ├── expected-edits.json
    │   │   │   │   │   │   │   └── input.py
    │   │   │   │   │   │   └── module-prefixed/
    │   │   │   │   │   │       ├── existing-imports.json
    │   │   │   │   │   │       ├── expected-advisories.json
    │   │   │   │   │   │       ├── expected-edits.json
    │   │   │   │   │   │       └── input.py
    │   │   │   │   │   ├── golden.test.ts
    │   │   │   │   │   └── property/
    │   │   │   │   │       └── openai-python-detection.property.test.ts
    │   │   │   │   └── openai-ts/
    │   │   │   │       ├── gate-1-canonical.test.ts
    │   │   │   │       ├── gate-2-idempotency.test.ts
    │   │   │   │       ├── gate-3-factory-function.test.ts
    │   │   │   │       ├── golden/
    │   │   │   │       │   ├── aliased-import/
    │   │   │   │       │   │   ├── existing-imports.json
    │   │   │   │       │   │   ├── expected-advisories.json
    │   │   │   │       │   │   ├── expected-edits.json
    │   │   │   │       │   │   └── input.ts
    │   │   │   │       │   ├── aliased-import-module-prefixed/
    │   │   │   │       │   │   ├── existing-imports.json
    │   │   │   │       │   │   ├── expected-advisories.json
    │   │   │   │       │   │   ├── expected-edits.json
    │   │   │   │       │   │   └── input.ts
    │   │   │   │       │   ├── already-wrapped-skipped/
    │   │   │   │       │   │   ├── existing-imports.json
    │   │   │   │       │   │   ├── expected-advisories.json
    │   │   │   │       │   │   ├── expected-edits.json
    │   │   │   │       │   │   └── input.ts
    │   │   │   │       │   ├── async-client/
    │   │   │   │       │   │   ├── existing-imports.json
    │   │   │   │       │   │   ├── expected-advisories.json
    │   │   │   │       │   │   ├── expected-edits.json
    │   │   │   │       │   │   └── input.ts
    │   │   │   │       │   ├── azure-refused/
    │   │   │   │       │   │   ├── existing-imports.json
    │   │   │   │       │   │   ├── expected-advisories.json
    │   │   │   │       │   │   ├── expected-edits.json
    │   │   │   │       │   │   └── input.ts
    │   │   │   │       │   ├── canonical-multi-construct/
    │   │   │   │       │   │   ├── existing-imports.json
    │   │   │   │       │   │   ├── expected-advisories.json
    │   │   │   │       │   │   ├── expected-edits.json
    │   │   │   │       │   │   └── input.ts
    │   │   │   │       │   ├── canonical-single/
    │   │   │   │       │   │   ├── existing-imports.json
    │   │   │   │       │   │   ├── expected-advisories.json
    │   │   │   │       │   │   ├── expected-edits.json
    │   │   │   │       │   │   └── input.ts
    │   │   │   │       │   ├── factory-function-refused/
    │   │   │   │       │   │   ├── existing-imports.json
    │   │   │   │       │   │   ├── expected-advisories.json
    │   │   │   │       │   │   ├── expected-edits.json
    │   │   │   │       │   │   └── input.ts
    │   │   │   │       │   ├── mixed-async-and-sync/
    │   │   │   │       │   │   ├── existing-imports.json
    │   │   │   │       │   │   ├── expected-advisories.json
    │   │   │   │       │   │   ├── expected-edits.json
    │   │   │   │       │   │   └── input.ts
    │   │   │   │       │   └── module-prefixed/
    │   │   │   │       │       ├── existing-imports.json
    │   │   │   │       │       ├── expected-advisories.json
    │   │   │   │       │       ├── expected-edits.json
    │   │   │   │       │       └── input.ts
    │   │   │   │       ├── golden.test.ts
    │   │   │   │       └── property/
    │   │   │   │           └── openai-ts-detection.property.test.ts
    │   │   │   ├── golden/
    │   │   │   │   ├── goldens.test.ts
    │   │   │   │   └── pr-bodies/
    │   │   │   │       ├── empty-repo.md
    │   │   │   │       ├── multi-plugin.md
    │   │   │   │       ├── one-plugin-one-file.md
    │   │   │   │       └── safety-skip.md
    │   │   │   ├── llm/
    │   │   │   │   ├── enhancer.test.ts
    │   │   │   │   ├── pr-body-renderer-llm.test.ts
    │   │   │   │   ├── prompts.test.ts
    │   │   │   │   └── tty-detector.test.ts
    │   │   │   ├── pipeline/
    │   │   │   │   ├── modes/
    │   │   │   │   │   ├── apply.test.ts
    │   │   │   │   │   ├── branch.test.ts
    │   │   │   │   │   └── dry-run.test.ts
    │   │   │   │   ├── orchestrator-real-detector.test.ts
    │   │   │   │   ├── orchestrator.property.test.ts
    │   │   │   │   ├── orchestrator.test.ts
    │   │   │   │   └── preflight.test.ts
    │   │   │   ├── planner/
    │   │   │   │   ├── _fixtures/
    │   │   │   │   │   ├── javascript/
    │   │   │   │   │   │   ├── commonjs.cjs
    │   │   │   │   │   │   ├── esm.mjs
    │   │   │   │   │   │   └── simple.js
    │   │   │   │   │   ├── python/
    │   │   │   │   │   │   ├── no-imports.py
    │   │   │   │   │   │   ├── simple.py
    │   │   │   │   │   │   ├── tabs.py
    │   │   │   │   │   │   ├── with-directive.py
    │   │   │   │   │   │   ├── with-future-imports.py
    │   │   │   │   │   │   └── with-secret.py
    │   │   │   │   │   └── typescript/
    │   │   │   │   │       ├── default-import.ts
    │   │   │   │   │       ├── mixed-quotes.ts
    │   │   │   │   │       ├── no-imports.ts
    │   │   │   │   │       ├── simple.ts
    │   │   │   │   │       ├── single-quotes.ts
    │   │   │   │   │       ├── with-directive.ts
    │   │   │   │   │       └── with-secret.ts
    │   │   │   │   ├── conflict-detector.property.test.ts
    │   │   │   │   ├── conflict-detector.test.ts
    │   │   │   │   ├── edit-composer.fixtures.test.ts
    │   │   │   │   ├── edit-composer.property.test.ts
    │   │   │   │   ├── edit-composer.test.ts
    │   │   │   │   ├── import-manager.property.test.ts
    │   │   │   │   ├── import-manager.test.ts
    │   │   │   │   ├── indentation-matcher.property.test.ts
    │   │   │   │   └── indentation-matcher.test.ts
    │   │   │   ├── registry/
    │   │   │   │   └── plugin-registry.test.ts
    │   │   │   ├── safety/
    │   │   │   │   ├── directive-parser.test.ts
    │   │   │   │   ├── hardcoded-defaults.test.ts
    │   │   │   │   ├── secret-detector-integration.test.ts
    │   │   │   │   └── secret-detector.test.ts
    │   │   │   └── scanner/
    │   │   │       ├── file-type-filter.test.ts
    │   │   │       ├── parse-existing-imports-alias.test.ts
    │   │   │       ├── source-file.test.ts
    │   │   │       ├── tree-sitter-loader.test.ts
    │   │   │       └── walker.test.ts
    │   │   ├── integration/
    │   │   │   ├── _helpers/
    │   │   │   │   ├── fixtures.ts
    │   │   │   │   └── gh-shim.ts
    │   │   │   ├── flow-1-patch-only.test.ts
    │   │   │   ├── flow-2-git-mode.test.ts
    │   │   │   ├── flow-3-gh-mode.test.ts
    │   │   │   ├── flow-4-rollback.test.ts
    │   │   │   ├── flow-5-cascade-refusal.test.ts
    │   │   │   ├── flow-6-repair.test.ts
    │   │   │   └── flow-7-legacy-adapter.test.ts
    │   │   ├── memory-packs/
    │   │   │   └── memory-pack.test.ts
    │   │   ├── production-traces/
    │   │   │   ├── cli/
    │   │   │   │   ├── _helpers/
    │   │   │   │   │   └── fixtures.ts
    │   │   │   │   ├── build-dataset-integration.test.ts
    │   │   │   │   ├── build-dataset.test.ts
    │   │   │   │   ├── datasets.test.ts
    │   │   │   │   ├── exit-codes.test.ts
    │   │   │   │   ├── export.test.ts
    │   │   │   │   ├── ingest.test.ts
    │   │   │   │   ├── init.test.ts
    │   │   │   │   ├── list-show-stats.test.ts
    │   │   │   │   ├── policy.test.ts
    │   │   │   │   ├── prune.test.ts
    │   │   │   │   ├── rotate-salt.test.ts
    │   │   │   │   └── runner.test.ts
    │   │   │   ├── contract/
    │   │   │   │   ├── branded-ids.test.ts
    │   │   │   │   ├── content-address.test.ts
    │   │   │   │   ├── cross-runtime.test.ts
    │   │   │   │   ├── factories.test.ts
    │   │   │   │   ├── generated-drift.test.ts
    │   │   │   │   ├── invariants.test.ts
    │   │   │   │   └── validators.test.ts
    │   │   │   ├── cross-runtime/
    │   │   │   │   └── python-emit-roundtrip.test.ts
    │   │   │   ├── dataset/
    │   │   │   │   ├── _helpers/
    │   │   │   │   │   └── fixtures.ts
    │   │   │   │   ├── cluster.test.ts
    │   │   │   │   ├── manifest.test.ts
    │   │   │   │   ├── pipeline-idempotence.test.ts
    │   │   │   │   ├── pipeline-redaction.test.ts
    │   │   │   │   ├── pipeline.test.ts
    │   │   │   │   ├── provenance.test.ts
    │   │   │   │   ├── rubric.test.ts
    │   │   │   │   ├── select.test.ts
    │   │   │   │   └── split-determinism.test.ts
    │   │   │   ├── fixtures/
    │   │   │   │   ├── invalid-bad-timing.json
    │   │   │   │   ├── invalid-missing-required.json
    │   │   │   │   ├── valid-anthropic.json
    │   │   │   │   ├── valid-minimal.json
    │   │   │   │   ├── valid-openai.json
    │   │   │   │   ├── valid-tool-calls.json
    │   │   │   │   ├── valid-with-feedback.json
    │   │   │   │   ├── valid-with-outcome.json
    │   │   │   │   └── valid-with-redaction-markers.json
    │   │   │   ├── golden/
    │   │   │   │   ├── datasets/
    │   │   │   │   │   ├── contrastive.manifest.json
    │   │   │   │   │   ├── multi-cluster.manifest.json
    │   │   │   │   │   ├── single-cluster.manifest.json
    │   │   │   │   │   └── synthetic-rubric.manifest.json
    │   │   │   │   └── manifests.test.ts
    │   │   │   ├── ingest/
    │   │   │   │   ├── dedupe.test.ts
    │   │   │   │   ├── lock.test.ts
    │   │   │   │   ├── paths.test.ts
    │   │   │   │   ├── receipt.test.ts
    │   │   │   │   ├── redaction-phase.test.ts
    │   │   │   │   ├── scan-workflow.test.ts
    │   │   │   │   └── validator.test.ts
    │   │   │   ├── integration/
    │   │   │   │   ├── _helpers/
    │   │   │   │   │   ├── fixtures.ts
    │   │   │   │   │   └── python-runner.ts
    │   │   │   │   ├── flow-1-python-emit-to-foundation-b.test.ts
    │   │   │   │   ├── flow-2-policy-mode-switching.test.ts
    │   │   │   │   ├── flow-3-default-on-export.test.ts
    │   │   │   │   ├── flow-4-retention-time-travel.test.ts
    │   │   │   │   ├── flow-5-dedupe-under-batch-retry.test.ts
    │   │   │   │   └── flow-6-cross-runtime-roundtrip.test.ts
    │   │   │   ├── redaction/
    │   │   │   │   ├── apply.test.ts
    │   │   │   │   ├── hash-primitives.test.ts
    │   │   │   │   ├── ingest-integration.test.ts
    │   │   │   │   ├── install-salt.test.ts
    │   │   │   │   ├── mark.test.ts
    │   │   │   │   └── policy.test.ts
    │   │   │   └── retention/
    │   │   │       ├── enforce.test.ts
    │   │   │       ├── gc-log.test.ts
    │   │   │       ├── ingest-phase2.test.ts
    │   │   │       ├── p6-monotonicity.test.ts
    │   │   │       └── policy.test.ts
    │   │   ├── promotion/
    │   │   │   ├── decide.test.ts
    │   │   │   ├── thresholds.test.ts
    │   │   │   └── transitions.test.ts
    │   │   ├── registry/
    │   │   │   ├── artifact-store-update.test.ts
    │   │   │   ├── artifact-store.test.ts
    │   │   │   ├── content-address.test.ts
    │   │   │   ├── eval-run-store.test.ts
    │   │   │   ├── history-store.test.ts
    │   │   │   ├── index-cache.test.ts
    │   │   │   ├── lock.test.ts
    │   │   │   ├── open-registry.test.ts
    │   │   │   ├── properties.test.ts
    │   │   │   ├── repair.test.ts
    │   │   │   ├── state-pointer.test.ts
    │   │   │   └── validate.test.ts
    │   │   └── runtime/
    │   │       ├── model-router-cohort.test.ts
    │   │       ├── model-router-determinism.test.ts
    │   │       ├── model-router.test.ts
    │   │       ├── task-budget.test.ts
    │   │       └── trace-integration.test.ts
    │   ├── control-plane-package.test.ts
    │   ├── coordination-codegen-template.test.ts
    │   ├── coordinator.test.ts
    │   ├── core-control-tools.test.ts
    │   ├── core-package.test.ts
    │   ├── credential-discovery-workflow.test.ts
    │   ├── credential-models-workflow.test.ts
    │   ├── credential-store-workflow.test.ts
    │   ├── credentials.test.ts
    │   ├── credit-assignment-attribution-workflow.test.ts
    │   ├── credit-assignment-contribution-workflow.test.ts
    │   ├── credit-assignment-magnitude-workflow.test.ts
    │   ├── credit-assignment-reporting-workflow.test.ts
    │   ├── credit-assignment-serialization-workflow.test.ts
    │   ├── credit-assignment-vector-workflow.test.ts
    │   ├── cross-runtime-trace-finding-report.test.ts
    │   ├── custom-scenarios.test.ts
    │   ├── dashboard-404.test.ts
    │   ├── data-plane-curation-workflow.test.ts
    │   ├── data-plane-io-workflow.test.ts
    │   ├── data-plane.test.ts
    │   ├── dataset-adapter-workflow.test.ts
    │   ├── dataset-directory-scan-workflow.test.ts
    │   ├── dataset-discovery-workflow.test.ts
    │   ├── dataset-discovery.test.ts
    │   ├── dataset-json-adapter-workflow.test.ts
    │   ├── dataset-path-resolution-workflow.test.ts
    │   ├── dataset-text-adapter-workflow.test.ts
    │   ├── delegated-judge.test.ts
    │   ├── designer-calibration.test.ts
    │   ├── dimension-pinning.test.ts
    │   ├── dimension-threshold.test.ts
    │   ├── distillation-curation-workflow.test.ts
    │   ├── distillation-io-workflow.test.ts
    │   ├── distillation-pipeline.test.ts
    │   ├── e2e/
    │   │   ├── openai-end-to-end-real-plugin.test.ts
    │   │   └── openai-end-to-end.test.ts
    │   ├── eaddrinuse.test.ts
    │   ├── elo-tournament.test.ts
    │   ├── event-stream-envelope.test.ts
    │   ├── event-stream.test.ts
    │   ├── evidence-workspace.test.ts
    │   ├── examples.test.ts
    │   ├── execution-validation.test.ts
    │   ├── execution-validator-workflows.test.ts
    │   ├── execution-validator.test.ts
    │   ├── export-command-workflow.test.ts
    │   ├── export-context-workflow.test.ts
    │   ├── export-package-workflow.test.ts
    │   ├── export-records-workflow.test.ts
    │   ├── export-run-artifact-workflow.test.ts
    │   ├── export-training-data-command-workflow.test.ts
    │   ├── extensions.test.ts
    │   ├── factual-confidence.test.ts
    │   ├── family-assertion-workflow.test.ts
    │   ├── family-classifier-input.test.ts
    │   ├── family-classifier-scoring-workflow.test.ts
    │   ├── family-contract-helpers-workflow.test.ts
    │   ├── family-designer.test.ts
    │   ├── family-interface-catalogs.test.ts
    │   ├── family-interface-guards.test.ts
    │   ├── family-interface-registry.test.ts
    │   ├── family-interface-runtime.test.ts
    │   ├── family-interface-types.test.ts
    │   ├── family-interfaces.test.ts
    │   ├── feedback-replay-tools.test.ts
    │   ├── final-parity.test.ts
    │   ├── fixtures/
    │   │   └── autoctx-agent-project/
    │   │       └── .autoctx/
    │   │           └── agents/
    │   │               └── support.ts
    │   ├── game-scenario.test.ts
    │   ├── generation-attempt-orchestrator.test.ts
    │   ├── generation-attempt-state.test.ts
    │   ├── generation-attempt-workflow.test.ts
    │   ├── generation-cycle-state.test.ts
    │   ├── generation-event-coordinator.test.ts
    │   ├── generation-execution-step.test.ts
    │   ├── generation-journal.test.ts
    │   ├── generation-lifecycle-workflow.test.ts
    │   ├── generation-loop-orchestrator.test.ts
    │   ├── generation-loop.test.ts
    │   ├── generation-phase-state.test.ts
    │   ├── generation-record-store-workflow.test.ts
    │   ├── generation-recovery.test.ts
    │   ├── generation-run-state.test.ts
    │   ├── generation-runner-hooks.test.ts
    │   ├── generation-runner-prompts.test.ts
    │   ├── generation-side-effect-coordinator.test.ts
    │   ├── generation-tournament-event-sequencing.test.ts
    │   ├── generation-trajectory-workflow.test.ts
    │   ├── gondolin-contract.test.ts
    │   ├── harness-loader.test.ts
    │   ├── harness-store.test.ts
    │   ├── http-api.test.ts
    │   ├── human-feedback-store-workflow.test.ts
    │   ├── human-feedback.test.ts
    │   ├── hypothesis-tree.test.ts
    │   ├── import-package-command-workflow.test.ts
    │   ├── improve-command-workflow.test.ts
    │   ├── improvement-loop-policy-workflow.test.ts
    │   ├── improvement-loop-result-workflow.test.ts
    │   ├── improvement-loop.test.ts
    │   ├── init-command-workflow.test.ts
    │   ├── integration/
    │   │   ├── cjs-fixture/
    │   │   │   ├── index.cjs
    │   │   │   └── package.json
    │   │   └── subpath-exports.test.ts
    │   ├── integration-improvement.test.ts
    │   ├── integrations/
    │   │   ├── _shared/
    │   │   │   ├── session.test.ts
    │   │   │   └── sink.test.ts
    │   │   ├── anthropic/
    │   │   │   ├── _helpers/
    │   │   │   │   └── fake-fetch.ts
    │   │   │   ├── content.test.ts
    │   │   │   ├── instrument-client-factory.test.ts
    │   │   │   ├── parity/
    │   │   │   │   ├── cross-runtime-fixtures.test.ts
    │   │   │   │   ├── cross-runtime-parity.property.test.ts
    │   │   │   │   └── fixtures/
    │   │   │   │       ├── api-timeout-exception/
    │   │   │   │       │   ├── error.json
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   └── request.json
    │   │   │   │       ├── messages-streaming-abandoned/
    │   │   │   │       │   ├── chunks.json
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   └── request.json
    │   │   │   │       ├── messages-streaming-with-usage/
    │   │   │   │       │   ├── chunks.json
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   └── request.json
    │   │   │   │       ├── messages-with-cache-hit/
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   ├── request.json
    │   │   │   │       │   └── response.json
    │   │   │   │       ├── messages-with-tool-use/
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   ├── request.json
    │   │   │   │       │   └── response.json
    │   │   │   │       ├── minimal-messages-success/
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   ├── request.json
    │   │   │   │       │   └── response.json
    │   │   │   │       ├── overloaded-exception/
    │   │   │   │       │   ├── error.json
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   └── request.json
    │   │   │   │       ├── rate-limit-exception/
    │   │   │   │       │   ├── error.json
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   └── request.json
    │   │   │   │       └── session-with-user-id-and-session-id/
    │   │   │   │           ├── expected-trace.canonical.json
    │   │   │   │           ├── identity.json
    │   │   │   │           ├── install-salt.txt
    │   │   │   │           ├── request.json
    │   │   │   │           └── response.json
    │   │   │   ├── proxy.test.ts
    │   │   │   ├── streaming.test.ts
    │   │   │   ├── taxonomy.test.ts
    │   │   │   └── trace-builder.test.ts
    │   │   ├── browser/
    │   │   │   ├── chrome-cdp-discovery.test.ts
    │   │   │   ├── chrome-cdp-runtime.test.ts
    │   │   │   ├── chrome-cdp-transport.test.ts
    │   │   │   ├── chrome-cdp.test.ts
    │   │   │   ├── context-capture.test.ts
    │   │   │   ├── contract/
    │   │   │   │   ├── cross-runtime.test.ts
    │   │   │   │   ├── generated-drift.test.ts
    │   │   │   │   └── validators.test.ts
    │   │   │   ├── evidence.test.ts
    │   │   │   ├── factory.test.ts
    │   │   │   ├── fixtures/
    │   │   │   │   ├── invalid-action-fill-null-field-kind.json
    │   │   │   │   ├── invalid-action-missing-session.json
    │   │   │   │   ├── invalid-action-snapshot-null-capture-html.json
    │   │   │   │   ├── invalid-audit-event-missing-reason.json
    │   │   │   │   ├── invalid-session-config-downloads-root.json
    │   │   │   │   ├── invalid-session-config-user-profile-auth.json
    │   │   │   │   ├── invalid-snapshot-bad-ref.json
    │   │   │   │   ├── invalid-snapshot-null-ref-name.json
    │   │   │   │   ├── valid-action-navigate.json
    │   │   │   │   ├── valid-audit-event-allowed.json
    │   │   │   │   ├── valid-session-config-ephemeral.json
    │   │   │   │   ├── valid-session-config-isolated-downloads.json
    │   │   │   │   └── valid-snapshot-minimal.json
    │   │   │   └── policy.test.ts
    │   │   ├── openai/
    │   │   │   ├── _helpers/
    │   │   │   │   └── fake-fetch.ts
    │   │   │   ├── end-to-end.test.ts
    │   │   │   ├── parity/
    │   │   │   │   ├── cross-runtime-fixtures.test.ts
    │   │   │   │   ├── cross-runtime-parity.property.test.ts
    │   │   │   │   └── fixtures/
    │   │   │   │       ├── chat-streaming-abandoned/
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   ├── request.json
    │   │   │   │       │   └── response.json
    │   │   │   │       ├── chat-streaming-with-usage/
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   ├── request.json
    │   │   │   │       │   └── response.json
    │   │   │   │       ├── chat-with-tool-calls/
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   ├── request.json
    │   │   │   │       │   └── response.json
    │   │   │   │       ├── content-filter-finish-reason/
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   ├── request.json
    │   │   │   │       │   └── response.json
    │   │   │   │       ├── minimal-chat-success/
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   ├── request.json
    │   │   │   │       │   └── response.json
    │   │   │   │       ├── rate-limit-exception/
    │   │   │   │       │   ├── error.json
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   └── request.json
    │   │   │   │       ├── responses-api-success/
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   ├── request.json
    │   │   │   │       │   └── response.json
    │   │   │   │       ├── session-with-user-id-and-session-id/
    │   │   │   │       │   ├── expected-trace.canonical.json
    │   │   │   │       │   ├── identity.json
    │   │   │   │       │   ├── install-salt.txt
    │   │   │   │       │   ├── request.json
    │   │   │   │       │   └── response.json
    │   │   │   │       └── timeout-exception/
    │   │   │   │           ├── error.json
    │   │   │   │           ├── expected-trace.canonical.json
    │   │   │   │           ├── identity.json
    │   │   │   │           └── request.json
    │   │   │   ├── property/
    │   │   │   │   └── trace-shape-invariants.property.test.ts
    │   │   │   ├── proxy.test.ts
    │   │   │   ├── responses.test.ts
    │   │   │   ├── runtime-detector-contract-python.test.ts
    │   │   │   ├── runtime-detector-contract-ts.test.ts
    │   │   │   ├── streaming.test.ts
    │   │   │   ├── taxonomy.test.ts
    │   │   │   └── trace-builder.test.ts
    │   │   └── shared/
    │   │       └── proxy-runtime.test.ts
    │   ├── interactive-control-command-workflow.test.ts
    │   ├── interactive-scenario-command-workflow.test.ts
    │   ├── interactive-scenario-materialization.test.ts
    │   ├── interactive-scenario-session.test.ts
    │   ├── internal-module-imports.test.ts
    │   ├── investigate-command-workflow.test.ts
    │   ├── investigate.test.ts
    │   ├── investigation-analysis-result-workflow.test.ts
    │   ├── investigation-analysis-workflow.test.ts
    │   ├── investigation-browser-context.test.ts
    │   ├── investigation-codegen-template.test.ts
    │   ├── investigation-engine-helpers.test.ts
    │   ├── investigation-execution-workflow.test.ts
    │   ├── investigation-generation-parsing.test.ts
    │   ├── investigation-generation-prompts.test.ts
    │   ├── investigation-generation-workflow.test.ts
    │   ├── investigation-result-workflow.test.ts
    │   ├── investigation-run-support-workflow.test.ts
    │   ├── investigation-run-workflow.test.ts
    │   ├── investigation-scenario-preparation-workflow.test.ts
    │   ├── judge-command-workflow.test.ts
    │   ├── judge-executor.test.ts
    │   ├── judge-hooks.test.ts
    │   ├── judge.test.ts
    │   ├── knowledge-api-workflow.test.ts
    │   ├── knowledge-readback-tools.test.ts
    │   ├── knowledge-system.test.ts
    │   ├── list-command-workflow.test.ts
    │   ├── living-docs.test.ts
    │   ├── loop-controller.test.ts
    │   ├── materialize-agent-task-planning.test.ts
    │   ├── materialize-agent-task-results.test.ts
    │   ├── materialize-artifact-persistence.test.ts
    │   ├── materialize-base-persisted-spec.test.ts
    │   ├── materialize-codegen-execution.test.ts
    │   ├── materialize-codegen-planning.test.ts
    │   ├── materialize-compatibility-cleanup.test.ts
    │   ├── materialize-contracts.test.ts
    │   ├── materialize-dependencies.test.ts
    │   ├── materialize-execution-workflow.test.ts
    │   ├── materialize-family-planning-contracts.test.ts
    │   ├── materialize-family-planning-helper-contracts.test.ts
    │   ├── materialize-family-planning-helpers.test.ts
    │   ├── materialize-family-planning.test.ts
    │   ├── materialize-request-planning-input.test.ts
    │   ├── materialize-request-planning.test.ts
    │   ├── materialize-result-support.test.ts
    │   ├── materialize-scenario-coordinator.test.ts
    │   ├── materialize-scenario-default-wiring.test.ts
    │   ├── materialize-scenario-execution-delegation-composition-coordinator.test.ts
    │   ├── materialize-scenario-execution-delegation-contracts.test.ts
    │   ├── materialize-scenario-execution-delegation-finalization-assembly-coordinator.test.ts
    │   ├── materialize-scenario-execution-delegation-finalization-composition-coordinator.test.ts
    │   ├── materialize-scenario-execution-delegation-finalization-coordinator.test.ts
    │   ├── materialize-scenario-execution-delegation-finalization-result-assembly-coordinator.test.ts
    │   ├── materialize-scenario-execution-delegation-finalization-result-composition-coordinator.test.ts
    │   ├── materialize-scenario-execution-delegation-finalization-result-input-result-coordinator.test.ts
    │   ├── materialize-scenario-execution-delegation-input-coordinator.test.ts
    │   ├── materialize-scenario-execution-delegation-orchestration-coordinator.test.ts
    │   ├── materialize-scenario-execution-delegation-request-resolution.test.ts
    │   ├── materialize-scenario-execution-delegation-result.test.ts
    │   ├── materialize-scenario-execution-request.test.ts
    │   ├── materialize-scenario-request-assembly.test.ts
    │   ├── materialize-scenario-request-handoff-delegation.test.ts
    │   ├── materialize-scenario.test.ts
    │   ├── materialize-workflow-planning-outcome-contracts.test.ts
    │   ├── materialize-workflow-planning-outcome.test.ts
    │   ├── materialize-workflow-request-composition.test.ts
    │   ├── materialize-workflow-request-coordinator.test.ts
    │   ├── materialize-workflow-request-finalization.test.ts
    │   ├── materialize-workflow-request-planning.test.ts
    │   ├── materialize-workflow-request-result.test.ts
    │   ├── mcp-expanded-surface.test.ts
    │   ├── mcp-rightsize.test.ts
    │   ├── mcp-runtime-tools.test.ts
    │   ├── mcp-serve-command-workflow.test.ts
    │   ├── mcp-server.test.ts
    │   ├── memory-consolidation.test.ts
    │   ├── mission-action-workflow.test.ts
    │   ├── mission-checkpoints.test.ts
    │   ├── mission-cli.test.ts
    │   ├── mission-command-execution.test.ts
    │   ├── mission-command-workflow.test.ts
    │   ├── mission-dashboard.test.ts
    │   ├── mission-execution.test.ts
    │   ├── mission-lifecycle.test.ts
    │   ├── mission-progress-workflow.test.ts
    │   ├── mission-read-workflow.test.ts
    │   ├── mission-simulation.test.ts
    │   ├── mission-status-transitions.test.ts
    │   ├── mission-store-workflows.test.ts
    │   ├── mission-verification-workflow.test.ts
    │   ├── mission.test.ts
    │   ├── model-resolution.test.ts
    │   ├── model-strategy-selection-workflow.test.ts
    │   ├── model-strategy.test.ts
    │   ├── naming-collision.test.ts
    │   ├── negotiation-codegen-template.test.ts
    │   ├── new-scenario-broader-family-materialization.test.ts
    │   ├── new-scenario-command-workflow.test.ts
    │   ├── new-scenario-created-materialization-preparation.test.ts
    │   ├── new-scenario-created-materialization.test.ts
    │   ├── new-scenario-created-result-rendering.test.ts
    │   ├── new-scenario-family-resolution.test.ts
    │   ├── new-scenario-guards.test.ts
    │   ├── new-scenario-import-field-parsing.test.ts
    │   ├── new-scenario-import-spec-assembly.test.ts
    │   ├── new-scenario-import-workflow.test.ts
    │   ├── new-scenario-imported-materialization-preparation.test.ts
    │   ├── new-scenario-imported-materialization-public-helper.test.ts
    │   ├── new-scenario-materialization-execution.test.ts
    │   ├── new-scenario-normalization-workflow.test.ts
    │   ├── new-scenario-operator-loop-materialization.test.ts
    │   ├── new-scenario-rendering-workflow.test.ts
    │   ├── new-scenario-result-line-builders.test.ts
    │   ├── new-scenario-result-output-serialization.test.ts
    │   ├── new-scenario-result-payload-builders.test.ts
    │   ├── new-scenario-result-rendering-entrypoints.test.ts
    │   ├── new-scenario-template-output-serialization.test.ts
    │   ├── new-scenario-template-rendering-public-helper.test.ts
    │   ├── new-scenario-template-rendering.test.ts
    │   ├── new-scenario-template-scaffold-execution.test.ts
    │   ├── new-scenario-template-scaffold-planning.test.ts
    │   ├── numeric-normalization.test.ts
    │   ├── oauth.test.ts
    │   ├── operator-loop-unsupported.test.ts
    │   ├── otel-bridge.test.ts
    │   ├── output-cleaner.test.ts
    │   ├── package-boundaries.test.ts
    │   ├── package-coercion-workflow.test.ts
    │   ├── package-content-workflow.test.ts
    │   ├── package-export-catalogs.test.ts
    │   ├── package-metadata-workflow.test.ts
    │   ├── package-parity.test.ts
    │   ├── package-topology.test.ts
    │   ├── parse.test.ts
    │   ├── persisted-credentials-workflow.test.ts
    │   ├── persisted-parametric-scenario.test.ts
    │   ├── pi-runtime.test.ts
    │   ├── primary-family-registry.test.ts
    │   ├── production-traces/
    │   │   ├── sdk/
    │   │   │   ├── build-trace-determinism.property.test.ts
    │   │   │   ├── build-trace.test.ts
    │   │   │   ├── cross-runtime-fixtures.test.ts
    │   │   │   ├── cross-runtime-parity.property.test.ts
    │   │   │   ├── hashing-parity.property.test.ts
    │   │   │   ├── hashing.test.ts
    │   │   │   ├── trace-batch.test.ts
    │   │   │   ├── validate.test.ts
    │   │   │   └── write-jsonl.test.ts
    │   │   └── taxonomy/
    │   │       ├── anthropic-error-reasons.test.ts
    │   │       ├── anthropic-parity.test.ts
    │   │       ├── openai-error-reasons.test.ts
    │   │       ├── outcome-reason-keys.test.ts
    │   │       └── parity.test.ts
    │   ├── production-traces-tools.test.ts
    │   ├── progress-digest.test.ts
    │   ├── project-config.test.ts
    │   ├── promotion-engine-workflow.test.ts
    │   ├── promotion-lifecycle.test.ts
    │   ├── promotion-registry-workflow.test.ts
    │   ├── prompt-alignment-adapter-workflow.test.ts
    │   ├── prompt-alignment-helpers-workflow.test.ts
    │   ├── prompt-alignment.test.ts
    │   ├── proof-mission.test.ts
    │   ├── provider-config-resolution-workflow.test.ts
    │   ├── provider-factory-workflow.test.ts
    │   ├── provider-routing.test.ts
    │   ├── provider-surface-consistency.test.ts
    │   ├── providers-registry.test.ts
    │   ├── providers.test.ts
    │   ├── public-schema-factories-workflow.test.ts
    │   ├── public-trace-export-workflow.test.ts
    │   ├── public-trace-schema.test.ts
    │   ├── publishing-connectors.test.ts
    │   ├── publishing-workflow.test.ts
    │   ├── queue-status-command-workflow.test.ts
    │   ├── queued-task-browser-context.test.ts
    │   ├── redaction-detection-workflow.test.ts
    │   ├── redaction-policy-workflow.test.ts
    │   ├── redaction.test.ts
    │   ├── remote-bridge.test.ts
    │   ├── remove-hardcoded-models.test.ts
    │   ├── repl-command-workflow.test.ts
    │   ├── replay-command-workflow.test.ts
    │   ├── research-consultation.test.ts
    │   ├── research-evaluation.test.ts
    │   ├── research-persistence.test.ts
    │   ├── research-prompt-wiring.test.ts
    │   ├── research-runtime.test.ts
    │   ├── research-types.test.ts
    │   ├── rlm-agent-task.test.ts
    │   ├── rlm-session.test.ts
    │   ├── role-provider-bundle-workflow.test.ts
    │   ├── rubric-coherence.test.ts
    │   ├── rubric-drift-statistics-workflow.test.ts
    │   ├── rubric-drift-warnings-workflow.test.ts
    │   ├── run-command-workflow.test.ts
    │   ├── run-custom-scenario-registry.test.ts
    │   ├── run-environment-catalog.test.ts
    │   ├── run-inspection-command-workflow.test.ts
    │   ├── run-management-tools.test.ts
    │   ├── run-manager-provider-session.test.ts
    │   ├── run-simulation-read-workflow.test.ts
    │   ├── run-start-workflow.test.ts
    │   ├── run-state-workflow.test.ts
    │   ├── runtime-child-tasks.test.ts
    │   ├── runtime-context-layers.test.ts
    │   ├── runtime-session-agent-runtime.test.ts
    │   ├── runtime-session-api.test.ts
    │   ├── runtime-session-command-workflow.test.ts
    │   ├── runtime-session-events.test.ts
    │   ├── runtime-session-ids.test.ts
    │   ├── runtime-session-provider-bridge.test.ts
    │   ├── runtime-session-provider-bundle.test.ts
    │   ├── runtime-session-read-model.test.ts
    │   ├── runtime-session-run-trace.test.ts
    │   ├── runtime-session-tools.test.ts
    │   ├── runtime-session.test.ts
    │   ├── runtime-workspace-env.test.ts
    │   ├── runtimes.test.ts
    │   ├── sandbox-manager.test.ts
    │   ├── sandbox-tools.test.ts
    │   ├── scenario-catalog-tools.test.ts
    │   ├── scenario-creator-family-aware.test.ts
    │   ├── scenario-draft-workflow.test.ts
    │   ├── scenario-execution-tools.test.ts
    │   ├── scenario-revision-execution.test.ts
    │   ├── scenario-revision-normalizer.test.ts
    │   ├── scenario-revision-prompt-workflow.test.ts
    │   ├── scenario-revision-tools.test.ts
    │   ├── scenario-revision.test.ts
    │   ├── scenario-spec-modes.test.ts
    │   ├── scenario-templates.test.ts
    │   ├── schema-evolution-codegen-template.test.ts
    │   ├── schema-evolution-designer-parsing.test.ts
    │   ├── score-trajectory-store-workflow.test.ts
    │   ├── scripts/
    │   │   ├── check-license-compatibility.test.ts
    │   │   ├── check-no-postinstall-scripts.test.ts
    │   │   ├── check-no-telemetry.test.ts
    │   │   ├── check-production-traces-sdk-bundle-size.test.ts
    │   │   └── check-side-effects.test.ts
    │   ├── secure-exec-worker.test.ts
    │   ├── semantic-compaction.test.ts
    │   ├── serve-command-workflow.test.ts
    │   ├── server-protocol.test.ts
    │   ├── session-runtime.test.ts
    │   ├── session-store.test.ts
    │   ├── settings-assembly-workflow.test.ts
    │   ├── settings-resolution-workflow.test.ts
    │   ├── simulate-command-workflow.test.ts
    │   ├── simulate-compare.test.ts
    │   ├── simulate-execution-workflow.test.ts
    │   ├── simulate-export-command-workflow.test.ts
    │   ├── simulate-export.test.ts
    │   ├── simulate-input-planning-workflow.test.ts
    │   ├── simulate-replay.test.ts
    │   ├── simulate-run-execution-workflow.test.ts
    │   ├── simulate.test.ts
    │   ├── simulation-artifact-store.test.ts
    │   ├── simulation-codegen-template.test.ts
    │   ├── simulation-dashboard.test.ts
    │   ├── simulation-degraded-status.test.ts
    │   ├── simulation-family-contracts.test.ts
    │   ├── simulation-family-executor.test.ts
    │   ├── simulation-family-guard-builders.test.ts
    │   ├── simulation-family-method-catalogs.test.ts
    │   ├── simulation-family-registry.test.ts
    │   ├── simulation-family-routing.test.ts
    │   ├── simulation-request-planner.test.ts
    │   ├── simulation-schema-evolution-simulate.test.ts
    │   ├── simulation-score-normalization.test.ts
    │   ├── simulation-summary.test.ts
    │   ├── simulation-variant-materializer.test.ts
    │   ├── skill-export.test.ts
    │   ├── skill-package-workflows.test.ts
    │   ├── skill-registry.test.ts
    │   ├── smart-defaults.test.ts
    │   ├── smoke-judge.test.ts
    │   ├── solve-command-workflow.test.ts
    │   ├── solve-generation-budget.test.ts
    │   ├── solve-job-workflow.test.ts
    │   ├── solve-manager-workflow.test.ts
    │   ├── solve-package-helpers-workflow.test.ts
    │   ├── solve-scenario-routing.test.ts
    │   ├── solve-tools.test.ts
    │   ├── solve-workflow.test.ts
    │   ├── spec-auto-heal-agent-task-workflow.test.ts
    │   ├── spec-auto-heal-core-workflow.test.ts
    │   ├── spec-auto-heal-preconditions-workflow.test.ts
    │   ├── spec-auto-heal.test.ts
    │   ├── storage-database-workflow.test.ts
    │   ├── storage-generation-run-facade.test.ts
    │   ├── storage-generation.test.ts
    │   ├── storage-human-feedback-facade.test.ts
    │   ├── storage-migration-workflow.test.ts
    │   ├── storage-schema-parity.test.ts
    │   ├── storage-task-queue-facade.test.ts
    │   ├── storage.test.ts
    │   ├── strategy-package-run-export.test.ts
    │   ├── strategy-validator.test.ts
    │   ├── subscription-cli-runtime-provider.test.ts
    │   ├── supervisor.test.ts
    │   ├── sweep-dsl.test.ts
    │   ├── synthetic-indicator.test.ts
    │   ├── task-metrics.test.ts
    │   ├── task-processing-workflow.test.ts
    │   ├── task-queue-store-contract.test.ts
    │   ├── task-queue-store-workflow.test.ts
    │   ├── task-runner-config-workflow.test.ts
    │   ├── task-runner-workflows.test.ts
    │   ├── task-runner.test.ts
    │   ├── tool-fragility-codegen-template.test.ts
    │   ├── trace-audit-fixes.test.ts
    │   ├── trace-export.test.ts
    │   ├── trace-findings-command-store.test.ts
    │   ├── trace-findings-command.test.ts
    │   ├── trace-findings-html.test.ts
    │   ├── trace-findings-weakness.test.ts
    │   ├── trace-findings.test.ts
    │   ├── trace-ingest-workflow.test.ts
    │   ├── train-command-workflow.test.ts
    │   ├── training-backend-core-workflow.test.ts
    │   ├── training-backend.test.ts
    │   ├── training-checkpoint-workflow.test.ts
    │   ├── training-config-workflow.test.ts
    │   ├── training-export.test.ts
    │   ├── training-promotion-workflow.test.ts
    │   ├── training-run-execution-workflow.test.ts
    │   ├── training-runner-workflow.test.ts
    │   ├── tui-activity-command.test.ts
    │   ├── tui-activity-settings-store.test.ts
    │   ├── tui-activity-summary.test.ts
    │   ├── tui-auth-command.test.ts
    │   ├── tui-auth.test.ts
    │   ├── tui-chat-command.test.ts
    │   ├── tui-command-help.test.ts
    │   ├── tui-command-workflow-router.test.ts
    │   ├── tui-command-workflow.test.ts
    │   ├── tui-meta-command.test.ts
    │   ├── tui-operator-command.test.ts
    │   ├── tui-run-command.test.ts
    │   ├── tui-solve-command.test.ts
    │   ├── tui-startup-log.test.ts
    │   ├── type-assertions.test.ts
    │   ├── typed-serialization.test.ts
    │   ├── types.test.ts
    │   ├── unified-classifier.test.ts
    │   ├── websocket-protocol-contract.test.ts
    │   ├── websocket-session-bootstrap.test.ts
    │   ├── worker-command-workflow.test.ts
    │   └── workflow-codegen-template.test.ts
    ├── tsconfig.json
    └── vitest.config.ts
Download .txt
Showing preview only (2,210K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (22331 symbols across 2232 files)

FILE: autocontext/migrations/001_initial.sql
  type runs (line 1) | CREATE TABLE IF NOT EXISTS runs (
  type generations (line 11) | CREATE TABLE IF NOT EXISTS generations (
  type matches (line 24) | CREATE TABLE IF NOT EXISTS matches (
  type agent_outputs (line 36) | CREATE TABLE IF NOT EXISTS agent_outputs (

FILE: autocontext/migrations/002_phase3_phase7.sql
  type generation_recovery (line 5) | CREATE TABLE IF NOT EXISTS generation_recovery (
  type agent_role_metrics (line 16) | CREATE TABLE IF NOT EXISTS agent_role_metrics (

FILE: autocontext/migrations/004_knowledge_inheritance.sql
  type knowledge_snapshots (line 1) | CREATE TABLE IF NOT EXISTS knowledge_snapshots (
  type idx_knowledge_snapshots_scenario (line 11) | CREATE INDEX IF NOT EXISTS idx_knowledge_snapshots_scenario

FILE: autocontext/migrations/006_human_feedback.sql
  type human_feedback (line 1) | CREATE TABLE IF NOT EXISTS human_feedback (
  type idx_feedback_scenario (line 10) | CREATE INDEX IF NOT EXISTS idx_feedback_scenario ON human_feedback(scena...

FILE: autocontext/migrations/007_task_queue.sql
  type task_queue (line 2) | CREATE TABLE IF NOT EXISTS task_queue (
  type idx_task_queue_status (line 21) | CREATE INDEX IF NOT EXISTS idx_task_queue_status ON task_queue(status)
  type idx_task_queue_priority (line 22) | CREATE INDEX IF NOT EXISTS idx_task_queue_priority ON task_queue(priorit...
  type idx_task_queue_spec (line 23) | CREATE INDEX IF NOT EXISTS idx_task_queue_spec ON task_queue(spec_name)

FILE: autocontext/migrations/008_staged_validation.sql
  type staged_validation_results (line 1) | CREATE TABLE IF NOT EXISTS staged_validation_results (

FILE: autocontext/migrations/010_consultation_log.sql
  type consultation_log (line 1) | CREATE TABLE IF NOT EXISTS consultation_log (
  type idx_consultation_log_run (line 17) | CREATE INDEX IF NOT EXISTS idx_consultation_log_run ON consultation_log(...

FILE: autocontext/migrations/010_session_notebook.sql
  type session_notebooks (line 1) | CREATE TABLE IF NOT EXISTS session_notebooks (
  type idx_session_notebooks_scenario (line 15) | CREATE INDEX IF NOT EXISTS idx_session_notebooks_scenario ON session_not...

FILE: autocontext/migrations/011_monitors.sql
  type monitor_conditions (line 2) | CREATE TABLE IF NOT EXISTS monitor_conditions (
  type monitor_alerts (line 12) | CREATE TABLE IF NOT EXISTS monitor_alerts (
  type idx_monitor_conditions_active (line 24) | CREATE INDEX IF NOT EXISTS idx_monitor_conditions_active ON monitor_cond...
  type idx_monitor_alerts_condition (line 25) | CREATE INDEX IF NOT EXISTS idx_monitor_alerts_condition ON monitor_alert...
  type idx_monitor_alerts_fired_at (line 26) | CREATE INDEX IF NOT EXISTS idx_monitor_alerts_fired_at ON monitor_alerts...

FILE: autocontext/migrations/012_research_hub.sql
  type hub_sessions (line 1) | CREATE TABLE IF NOT EXISTS hub_sessions (
  type idx_hub_sessions_status (line 15) | CREATE INDEX IF NOT EXISTS idx_hub_sessions_status ON hub_sessions(status)
  type idx_hub_sessions_shared (line 16) | CREATE INDEX IF NOT EXISTS idx_hub_sessions_shared ON hub_sessions(shared)
  type idx_hub_sessions_heartbeat (line 17) | CREATE INDEX IF NOT EXISTS idx_hub_sessions_heartbeat ON hub_sessions(la...
  type hub_packages (line 19) | CREATE TABLE IF NOT EXISTS hub_packages (
  type idx_hub_packages_scenario (line 38) | CREATE INDEX IF NOT EXISTS idx_hub_packages_scenario ON hub_packages(sce...
  type idx_hub_packages_family (line 39) | CREATE INDEX IF NOT EXISTS idx_hub_packages_family ON hub_packages(scena...
  type idx_hub_packages_source_run (line 40) | CREATE INDEX IF NOT EXISTS idx_hub_packages_source_run ON hub_packages(s...
  type idx_hub_packages_created_at (line 41) | CREATE INDEX IF NOT EXISTS idx_hub_packages_created_at ON hub_packages(c...
  type hub_results (line 43) | CREATE TABLE IF NOT EXISTS hub_results (
  type idx_hub_results_scenario (line 58) | CREATE INDEX IF NOT EXISTS idx_hub_results_scenario ON hub_results(scena...
  type idx_hub_results_run (line 59) | CREATE INDEX IF NOT EXISTS idx_hub_results_run ON hub_results(run_id)
  type idx_hub_results_package (line 60) | CREATE INDEX IF NOT EXISTS idx_hub_results_package ON hub_results(packag...
  type idx_hub_results_created_at (line 61) | CREATE INDEX IF NOT EXISTS idx_hub_results_created_at ON hub_results(cre...
  type hub_promotions (line 63) | CREATE TABLE IF NOT EXISTS hub_promotions (
  type idx_hub_promotions_package (line 74) | CREATE INDEX IF NOT EXISTS idx_hub_promotions_package ON hub_promotions(...
  type idx_hub_promotions_source_run (line 75) | CREATE INDEX IF NOT EXISTS idx_hub_promotions_source_run ON hub_promotio...
  type idx_hub_promotions_created_at (line 76) | CREATE INDEX IF NOT EXISTS idx_hub_promotions_created_at ON hub_promotio...

FILE: autocontext/scripts/check_no_python_postinstall.py
  function _is_hook_name (line 42) | def _is_hook_name(name: str) -> bool:
  function check_pyproject (line 46) | def check_pyproject() -> None:
  function check_setup_py (line 86) | def check_setup_py() -> None:

FILE: autocontext/scripts/check_python_no_telemetry.py
  function scan_file (line 65) | def scan_file(path: Path) -> None:
  function walk (line 84) | def walk(root: Path, exts: tuple[str, ...]) -> list[Path]:

FILE: autocontext/scripts/check_python_offline_install.py
  function _run (line 31) | def _run(cmd: list[str], **kwargs) -> subprocess.CompletedProcess:

FILE: autocontext/scripts/check_python_reproducible_wheel.py
  function _sha256 (line 26) | def _sha256(path: Path) -> str:
  function _build_wheel (line 34) | def _build_wheel(dest: Path) -> Path:

FILE: autocontext/scripts/drive_anthropic_parity_fixture.py
  function main (line 18) | def main() -> None:
  function normalize_trace (line 145) | def normalize_trace(trace: dict[str, Any], fixture_name: str) -> dict[st...
  function canonical_json (line 164) | def canonical_json(obj: Any) -> str:

FILE: autocontext/scripts/drive_parity_fixture.py
  function main (line 36) | def main() -> None:
  function normalize_trace (line 163) | def normalize_trace(trace: dict[str, Any], fixture_name: str) -> dict[st...
  function canonical_json (line 197) | def canonical_json(obj: Any) -> str:

FILE: autocontext/smoke_test.py
  function section (line 29) | def section(title: str):
  function main (line 35) | def main():

FILE: autocontext/smoke_test_loop.py
  class LinkedInPostTask (line 21) | class LinkedInPostTask(AgentTaskInterface):
    method __init__ (line 24) | def __init__(self, provider: AnthropicProvider):
    method get_task_prompt (line 39) | def get_task_prompt(self, state: dict) -> str:
    method evaluate_output (line 47) | def evaluate_output(self, output, state, reference_context=None,
    method revise_output (line 62) | def revise_output(self, output, judge_result, state):
    method get_rubric (line 81) | def get_rubric(self):
    method initial_state (line 84) | def initial_state(self, seed=None):
    method describe_task (line 87) | def describe_task(self):
  function section (line 91) | def section(title: str):
  function main (line 97) | def main():

FILE: autocontext/src/autocontext/agentos/types.py
  class AgentOsRuntimePort (line 33) | class AgentOsRuntimePort(Protocol):
    method create_session (line 40) | async def create_session(self, agent_type: str) -> dict[str, Any]: ...
    method prompt (line 41) | async def prompt(self, session_id: str, prompt: str) -> None: ...
    method close_session (line 42) | async def close_session(self, session_id: str) -> None: ...
    method dispose (line 43) | async def dispose(self) -> None: ...
  class AgentOsPermissions (line 46) | class AgentOsPermissions(BaseModel):
  class AgentOsConfig (line 57) | class AgentOsConfig(BaseModel):
    method needs_sandbox (line 68) | def needs_sandbox(self, task_description: str) -> bool:

FILE: autocontext/src/autocontext/agents/agent_sdk_client.py
  function _resolve_model (line 30) | def _resolve_model(model: str) -> str:
  class AgentSdkConfig (line 42) | class AgentSdkConfig:
  class AgentSdkClient (line 49) | class AgentSdkClient(LanguageModelClient):
    method __init__ (line 52) | def __init__(self, config: AgentSdkConfig | None = None) -> None:
    method generate (line 55) | def generate(
    method _query (line 76) | async def _query(self, prompt: str, model: str, role: str, system_prom...
    method generate_multiturn (line 97) | def generate_multiturn(

FILE: autocontext/src/autocontext/agents/analyst.py
  class AnalystRunner (line 7) | class AnalystRunner:
    method __init__ (line 8) | def __init__(self, runtime: SubagentRuntime, model: str) -> None:
    method run (line 12) | def run(self, prompt: str) -> RoleExecution:

FILE: autocontext/src/autocontext/agents/architect.py
  function parse_architect_tool_specs (line 13) | def parse_architect_tool_specs(content: str) -> list[dict[str, Any]]:
  function parse_dag_changes (line 46) | def parse_dag_changes(content: str) -> list[dict[str, Any]]:
  function parse_architect_harness_specs (line 84) | def parse_architect_harness_specs(content: str) -> list[dict[str, Any]]:
  class ArchitectRunner (line 123) | class ArchitectRunner:
    method __init__ (line 124) | def __init__(self, runtime: SubagentRuntime, model: str) -> None:
    method run (line 128) | def run(self, prompt: str) -> RoleExecution:

FILE: autocontext/src/autocontext/agents/coach.py
  function parse_coach_sections (line 8) | def parse_coach_sections(content: str) -> tuple[str, str, str]:
  class CoachRunner (line 25) | class CoachRunner:
    method __init__ (line 26) | def __init__(self, runtime: SubagentRuntime, model: str) -> None:
    method run (line 30) | def run(self, prompt: str) -> RoleExecution:

FILE: autocontext/src/autocontext/agents/competitor.py
  class CompetitorRunner (line 11) | class CompetitorRunner:
    method __init__ (line 12) | def __init__(self, runtime: SubagentRuntime, model: str) -> None:
    method run (line 16) | def run(
    method revise (line 37) | def revise(
    method refine_strategy (line 49) | def refine_strategy(

FILE: autocontext/src/autocontext/agents/contracts.py
  class CompetitorOutput (line 8) | class CompetitorOutput:
  class AnalystOutput (line 16) | class AnalystOutput:
  class CoachOutput (line 25) | class CoachOutput:
  class ArchitectOutput (line 34) | class ArchitectOutput:

FILE: autocontext/src/autocontext/agents/curator.py
  class CuratorPlaybookDecision (line 27) | class CuratorPlaybookDecision:
  class CuratorLessonResult (line 35) | class CuratorLessonResult:
  function parse_curator_playbook_decision (line 41) | def parse_curator_playbook_decision(content: str) -> CuratorPlaybookDeci...
  function parse_curator_lesson_result (line 60) | def parse_curator_lesson_result(content: str) -> CuratorLessonResult:
  class KnowledgeCurator (line 102) | class KnowledgeCurator:
    method __init__ (line 103) | def __init__(self, runtime: SubagentRuntime, model: str) -> None:
    method assess_playbook_quality (line 107) | def assess_playbook_quality(
    method rate_analyst_output (line 154) | def rate_analyst_output(
    method consolidate_lessons (line 195) | def consolidate_lessons(

FILE: autocontext/src/autocontext/agents/feedback_loops.py
  class AnalystRating (line 29) | class AnalystRating(BaseModel):
    method overall (line 40) | def overall(self) -> float:
    method _coerce_rationale (line 45) | def _coerce_rationale(cls, value: Any) -> str:
    method to_dict (line 54) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 58) | def from_dict(cls, data: dict[str, Any]) -> AnalystRating:
  function format_analyst_feedback (line 62) | def format_analyst_feedback(rating: AnalystRating | None) -> str:
  class ToolUsageRecord (line 82) | class ToolUsageRecord(BaseModel):
    method to_dict (line 91) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 95) | def from_dict(cls, data: dict[str, Any]) -> ToolUsageRecord:
  class ToolUsageTracker (line 99) | class ToolUsageTracker:
    method __init__ (line 102) | def __init__(self, known_tools: list[str]) -> None:
    method record_generation (line 108) | def record_generation(self, generation: int, strategy_text: str) -> None:
    method get_stats (line 119) | def get_stats(self) -> dict[str, ToolUsageRecord]:
    method to_dict (line 122) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 128) | def from_dict(cls, data: dict[str, Any], known_tools: list[str]) -> To...
  function format_utilization_report (line 145) | def format_utilization_report(
  function identify_stale_tools (line 171) | def identify_stale_tools(

FILE: autocontext/src/autocontext/agents/hint_feedback.py
  function _sanitize_hint_text (line 32) | def _sanitize_hint_text(text: str) -> str:
  function _truncate_hint_text (line 38) | def _truncate_hint_text(text: str, *, limit: int = _HINT_REFLECTION_MAX_...
  function prepare_hint_reflection_items (line 44) | def prepare_hint_reflection_items(hints: str) -> list[str]:
  class HintFeedback (line 88) | class HintFeedback(BaseModel):
    method _normalize_feedback_items (line 99) | def _normalize_feedback_items(cls, value: Any) -> list[str]:
    method is_empty (line 102) | def is_empty(self) -> bool:
    method to_dict (line 105) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 109) | def from_dict(cls, data: dict[str, Any]) -> HintFeedback:
  function build_hint_reflection_prompt (line 113) | def build_hint_reflection_prompt(
  function _normalize_feedback_list (line 145) | def _normalize_feedback_list(value: Any) -> list[str]:
  function _normalize_feedback_index_list (line 160) | def _normalize_feedback_index_list(value: Any, *, max_index: int) -> lis...
  function parse_hint_feedback (line 185) | def parse_hint_feedback(
  function format_hint_feedback_for_coach (line 236) | def format_hint_feedback_for_coach(feedback: HintFeedback | None) -> str:

FILE: autocontext/src/autocontext/agents/llm_client.py
  class AnthropicClient (line 22) | class AnthropicClient(LanguageModelClient):
    method __init__ (line 23) | def __init__(
    method _messages_create_with_retry (line 38) | def _messages_create_with_retry(self, **kwargs: Any) -> Any:
    method generate (line 69) | def generate(
    method generate_multiturn (line 101) | def generate_multiturn(
  class MLXClient (line 136) | class MLXClient(LanguageModelClient):
    method __init__ (line 139) | def __init__(self, model_path: str, *, temperature: float = 0.8, max_t...
    method generate (line 142) | def generate(
    method generate_multiturn (line 166) | def generate_multiturn(
  class DeterministicDevClient (line 188) | class DeterministicDevClient(LanguageModelClient):
    method __init__ (line 191) | def __init__(self) -> None:
    method reset_rlm_turns (line 194) | def reset_rlm_turns(self) -> None:
    method generate_multiturn (line 197) | def generate_multiturn(
    method generate (line 232) | def generate(
    method _curator_playbook_response (line 324) | def _curator_playbook_response(self) -> str:
    method _skeptic_review_response (line 332) | def _skeptic_review_response(self) -> str:
    method _curator_consolidate_response (line 345) | def _curator_consolidate_response(self) -> str:
    method _scenario_designer_response (line 357) | def _scenario_designer_response() -> str:
    method _code_strategy_response (line 440) | def _code_strategy_response(self, prompt_lower: str) -> str:
    method _is_othello (line 469) | def _is_othello(prompt_lower: str) -> bool:
    method _competitor_narrative (line 473) | def _competitor_narrative(self, prompt_lower: str) -> str:
    method _translator_response (line 512) | def _translator_response(self, prompt_lower: str) -> str:
  function build_client_from_settings (line 534) | def build_client_from_settings(

FILE: autocontext/src/autocontext/agents/model_router.py
  class TierConfig (line 18) | class TierConfig:
  class ModelRouter (line 38) | class ModelRouter:
    method __init__ (line 41) | def __init__(self, config: TierConfig) -> None:
    method select (line 50) | def select(
    method _max_tier (line 110) | def _max_tier(self, a: str, b: str) -> str:
    method _min_tier (line 114) | def _min_tier(self, a: str, b: str) -> str:

FILE: autocontext/src/autocontext/agents/orchestrator.py
  class _RlmBackendConfig (line 44) | class _RlmBackendConfig:
  function _resolve_rlm_backend (line 53) | def _resolve_rlm_backend(settings: AppSettings) -> _RlmBackendConfig:
  function apply_dag_changes (line 110) | def apply_dag_changes(dag: RoleDAG, changes: Sequence[dict[str, Any]]) -...
  class AgentOrchestrator (line 132) | class AgentOrchestrator:
    method __init__ (line 135) | def __init__(
    method _wrap_client (line 186) | def _wrap_client(self, client: LanguageModelClient, *, provider_name: ...
    method _mark_disposable_client (line 189) | def _mark_disposable_client(self, client: LanguageModelClient) -> Lang...
    method _close_disposable_client (line 193) | def _close_disposable_client(self, client: LanguageModelClient) -> None:
    method from_settings (line 206) | def from_settings(
    method _client_for_role (line 222) | def _client_for_role(self, role: str) -> LanguageModelClient:
    method _configured_role_provider (line 225) | def _configured_role_provider(self, role: str) -> str:
    method _available_local_models (line 230) | def _available_local_models(self, scenario_name: str = "", runtime_typ...
    method _scenario_bound_runtime_client (line 261) | def _scenario_bound_runtime_client(
    method _scenario_bound_override_client (line 299) | def _scenario_bound_override_client(
    method _scenario_bound_default_client (line 312) | def _scenario_bound_default_client(
    method _resolve_role_provider_config (line 324) | def _resolve_role_provider_config(
    method _client_for_provider_config (line 347) | def _client_for_provider_config(
    method _resolve_role_execution (line 414) | def _resolve_role_execution(
    method resolve_role_execution (line 449) | def resolve_role_execution(
    method _use_role_runtime (line 478) | def _use_role_runtime(
    method run_generation (line 516) | def run_generation(
    method _run_via_pipeline (line 703) | def _run_via_pipeline(
    method resolve_model (line 780) | def resolve_model(
    method _get_harness_coverage (line 801) | def _get_harness_coverage(self, scenario_name: str) -> HarnessCoverage...
    method _enrich_coach_prompt (line 824) | def _enrich_coach_prompt(self, base_prompt: str, analyst_content: str)...
    method _run_single_rlm_session (line 827) | def _run_single_rlm_session(
    method _run_rlm_competitor (line 869) | def _run_rlm_competitor(
    method _run_rlm_roles (line 933) | def _run_rlm_roles(

FILE: autocontext/src/autocontext/agents/parsers.py
  function _extract_section_bullets (line 14) | def _extract_section_bullets(markdown: str, heading: str) -> list[str]:
  function parse_competitor_output (line 37) | def parse_competitor_output(
  function parse_analyst_output (line 51) | def parse_analyst_output(raw_markdown: str) -> AnalystOutput:
  function parse_coach_output (line 69) | def parse_coach_output(raw_markdown: str) -> CoachOutput:
  function parse_architect_output (line 85) | def parse_architect_output(raw_markdown: str) -> ArchitectOutput:

FILE: autocontext/src/autocontext/agents/pipeline_adapter.py
  function build_mts_dag (line 17) | def build_mts_dag() -> RoleDAG:
  function build_role_handler (line 32) | def build_role_handler(

FILE: autocontext/src/autocontext/agents/provider_bridge.py
  class ProviderBridgeClient (line 34) | class ProviderBridgeClient(LanguageModelClient):
    method __init__ (line 41) | def __init__(self, provider: LLMProvider, *, use_provider_default_mode...
    method generate (line 45) | def generate(
  class RuntimeBridgeClient (line 77) | class RuntimeBridgeClient(LanguageModelClient):
    method __init__ (line 84) | def __init__(self, runtime: AgentRuntime) -> None:
    method generate (line 87) | def generate(
    method close (line 114) | def close(self) -> None:
  class RuntimeSessionRecordingClient (line 120) | class RuntimeSessionRecordingClient(LanguageModelClient):
    method __init__ (line 123) | def __init__(
    method __getattr__ (line 136) | def __getattr__(self, name: str) -> object:
    method generate (line 139) | def generate(
    method close (line 200) | def close(self) -> None:
  function wrap_runtime_session_client (line 206) | def wrap_runtime_session_client(
  function _find_runtime_bridge_client (line 226) | def _find_runtime_bridge_client(client: object) -> RuntimeBridgeClient |...
  function _runtime_session_response_metadata (line 237) | def _runtime_session_response_metadata(
  function _role_setting (line 263) | def _role_setting(settings: AppSettings, role: str, suffix: str) -> str:
  function configured_role_provider (line 270) | def configured_role_provider(role: str, settings: AppSettings) -> str:
  function has_role_client_override (line 274) | def has_role_client_override(role: str, settings: AppSettings) -> bool:
  function _provider_api_key (line 284) | def _provider_api_key(provider_type: str, settings: AppSettings, *, role...
  function _provider_base_url (line 297) | def _provider_base_url(settings: AppSettings, *, role: str = "") -> str ...
  function _create_provider_bridge (line 304) | def _create_provider_bridge(
  function _create_claude_cli_bridge (line 335) | def _create_claude_cli_bridge(
  function _create_codex_cli_bridge (line 347) | def _create_codex_cli_bridge(
  function _load_openclaw_factory (line 364) | def _load_openclaw_factory(factory_path: str) -> Callable[..., object]:
  function create_role_client (line 381) | def create_role_client(
  function _build_openclaw_agent (line 514) | def _build_openclaw_agent(settings: AppSettings) -> object:

FILE: autocontext/src/autocontext/agents/role_router.py
  class ProviderClass (line 20) | class ProviderClass(StrEnum):
  class ProviderConfig (line 31) | class ProviderConfig:
  class RoutingContext (line 41) | class RoutingContext:
  class RoleRouter (line 87) | class RoleRouter:
    method __init__ (line 90) | def __init__(
    method route (line 118) | def route(
    method estimate_run_cost (line 144) | def estimate_run_cost(
    method _auto_route (line 175) | def _auto_route(self, role: str, ctx: RoutingContext) -> ProviderConfig:
    method _config_for_class (line 197) | def _config_for_class(
    method _config_for_explicit (line 219) | def _config_for_explicit(self, role: str, provider_type: str) -> Provi...
    method _config_for_default (line 231) | def _config_for_default(self, role: str) -> ProviderConfig:

FILE: autocontext/src/autocontext/agents/role_runtime_overrides.py
  function settings_for_budgeted_role_call (line 21) | def settings_for_budgeted_role_call(
  function apply_role_overrides (line 46) | def apply_role_overrides(orch: Any, settings: AppSettings) -> None:

FILE: autocontext/src/autocontext/agents/runtime_session_wiring.py
  function run_runtime_session_scope (line 16) | def run_runtime_session_scope(
  function runtime_session_client_for_role (line 43) | def runtime_session_client_for_role(

FILE: autocontext/src/autocontext/agents/skeptic.py
  class SkepticReview (line 19) | class SkepticReview:
  function parse_skeptic_review (line 28) | def parse_skeptic_review(content: str) -> SkepticReview:
  class SkepticAgent (line 68) | class SkepticAgent:
    method __init__ (line 69) | def __init__(self, runtime: SubagentRuntime, model: str) -> None:
    method review (line 73) | def review(

FILE: autocontext/src/autocontext/agents/translator.py
  class StrategyTranslator (line 18) | class StrategyTranslator:
    method __init__ (line 21) | def __init__(self, runtime: SubagentRuntime, model: str) -> None:
    method _strip_fences (line 26) | def _strip_fences(text: str) -> str:
    method translate (line 30) | def translate(self, raw_output: str, strategy_interface: str) -> tuple...
    method _matches_strategy_interface (line 71) | def _matches_strategy_interface(strategy: Mapping[str, Any], strategy_...
    method translate_code (line 89) | def translate_code(self, raw_output: str) -> tuple[dict[str, Any], Rol...
    method _extract_code_block (line 108) | def _extract_code_block(text: str) -> str:

FILE: autocontext/src/autocontext/agents/translator_simplification.py
  function extract_strategy_deterministic (line 30) | def extract_strategy_deterministic(raw_text: str) -> dict[str, Any] | None:
  function _try_parse_object (line 55) | def _try_parse_object(text: str) -> dict[str, Any] | None:
  function _extract_section_bullets (line 84) | def _extract_section_bullets(markdown: str, heading: str) -> list[str]:
  function _extract_marker_bullets (line 103) | def _extract_marker_bullets(text: str) -> list[str]:
  class ConsolidatedRoleOutput (line 113) | class ConsolidatedRoleOutput(BaseModel):
    method to_dict (line 126) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 130) | def from_dict(cls, data: dict[str, Any]) -> ConsolidatedRoleOutput:
  function parse_consolidated_output (line 134) | def parse_consolidated_output(markdown: str) -> ConsolidatedRoleOutput:
  class RoleBenchmarkResult (line 166) | class RoleBenchmarkResult(BaseModel):
    method to_dict (line 180) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 184) | def from_dict(cls, data: dict[str, Any]) -> RoleBenchmarkResult:
  function compare_role_outputs (line 188) | def compare_role_outputs(

FILE: autocontext/src/autocontext/agents/trial_summary.py
  function build_trial_summary (line 8) | def build_trial_summary(

FILE: autocontext/src/autocontext/agents/types.py
  class AgentOutputs (line 17) | class AgentOutputs:

FILE: autocontext/src/autocontext/analytics/aggregate_runner.py
  class AggregateResult (line 32) | class AggregateResult:
  class AggregateRunner (line 40) | class AggregateRunner:
    method __init__ (line 43) | def __init__(
    method run (line 53) | def run(
    method _derive_release_context (line 112) | def _derive_release_context(self, facets: Sequence[RunFacet]) -> list[...

FILE: autocontext/src/autocontext/analytics/artifact_rendering.py
  class FindingView (line 19) | class FindingView:
  class FailureMotifView (line 29) | class FailureMotifView:
  class RecoveryPathView (line 37) | class RecoveryPathView:
  class TraceWriteupView (line 45) | class TraceWriteupView:
    method context (line 55) | def context(self) -> str:
  class WeaknessReportView (line 60) | class WeaknessReportView:
  class TimelineEventView (line 70) | class TimelineEventView:
  class GenerationSummaryView (line 89) | class GenerationSummaryView:
  class TimelineInspectionView (line 104) | class TimelineInspectionView:
  class CurationItemView (line 121) | class CurationItemView:
  class ScenarioCurationView (line 128) | class ScenarioCurationView:
  function trace_writeup_view (line 139) | def trace_writeup_view(writeup: Any) -> TraceWriteupView:
  function weakness_report_view (line 152) | def weakness_report_view(report: Any) -> WeaknessReportView:
  function timeline_inspection_view (line 164) | def timeline_inspection_view(trace: Any) -> TimelineInspectionView:
  function scenario_curation_view_from_artifacts (line 221) | def scenario_curation_view_from_artifacts(artifacts: Any, scenario_name:...
  function render_trace_writeup_markdown (line 268) | def render_trace_writeup_markdown(view: TraceWriteupView) -> str:
  function render_weakness_report_markdown (line 307) | def render_weakness_report_markdown(view: WeaknessReportView) -> str:
  function render_trace_writeup_html (line 338) | def render_trace_writeup_html(view: TraceWriteupView) -> str:
  function render_weakness_report_html (line 369) | def render_weakness_report_html(view: WeaknessReportView) -> str:
  function render_markdown_document_html (line 399) | def render_markdown_document_html(title: str, markdown: str) -> str:
  function _render_generation_summaries_html (line 412) | def _render_generation_summaries_html(summaries: tuple[GenerationSummary...
  function render_timeline_inspection_html (line 437) | def render_timeline_inspection_html(view: TimelineInspectionView) -> str:
  function render_scenario_curation_html (line 490) | def render_scenario_curation_html(view: ScenarioCurationView) -> str:
  function _finding_view (line 513) | def _finding_view(finding: Any) -> FindingView:
  function _failure_motif_view (line 524) | def _failure_motif_view(motif: Any) -> FailureMotifView:
  function _recovery_path_view (line 533) | def _recovery_path_view(path: Any) -> RecoveryPathView:
  function _metadata (line 542) | def _metadata(obj: Any) -> dict[str, Any]:
  function _h (line 547) | def _h(value: object) -> str:
  function _safe_id (line 551) | def _safe_id(raw: str) -> str:
  function _render_findings_html (line 556) | def _render_findings_html(findings: tuple[FindingView, ...], *, empty: s...
  function _render_evidence_html (line 576) | def _render_evidence_html(evidence_ids: tuple[str, ...]) -> str:
  function _render_motifs_html (line 583) | def _render_motifs_html(motifs: tuple[FailureMotifView, ...]) -> str:
  function _render_recovery_paths_html (line 598) | def _render_recovery_paths_html(paths: tuple[RecoveryPathView, ...]) -> ...
  function _render_list_html (line 613) | def _render_list_html(items: tuple[str, ...], *, empty: str) -> str:
  function _render_timeline_event_html (line 619) | def _render_timeline_event_html(event: TimelineEventView) -> str:
  function _render_artifact_links (line 641) | def _render_artifact_links(links: tuple[str, ...]) -> str:
  function _render_path_list (line 648) | def _render_path_list(paths: tuple[tuple[str, ...], ...], empty: str) ->...
  function _render_curation_section (line 658) | def _render_curation_section(title: str, items: list[CurationItemView]) ...
  function _curation_export_markdown (line 680) | def _curation_export_markdown(view: ScenarioCurationView) -> str:
  function _markdown_items (line 703) | def _markdown_items(title: str, content: str, source: str) -> list[Curat...
  function _weakness_items (line 710) | def _weakness_items(reports: list[object]) -> list[CurationItemView]:
  function _markdown_report_items (line 731) | def _markdown_report_items(title: str, reports: list[object]) -> list[Cu...

FILE: autocontext/src/autocontext/analytics/calibration.py
  class CalibrationSample (line 24) | class CalibrationSample(BaseModel):
    method to_dict (line 41) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 45) | def from_dict(cls, data: dict[str, Any]) -> CalibrationSample:
  class CalibrationOutcome (line 49) | class CalibrationOutcome(BaseModel):
    method to_dict (line 63) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 67) | def from_dict(cls, data: dict[str, Any]) -> CalibrationOutcome:
  class CalibrationRound (line 71) | class CalibrationRound(BaseModel):
    method to_dict (line 82) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 86) | def from_dict(cls, data: dict[str, Any]) -> CalibrationRound:
  class SpotCheckSampler (line 90) | class SpotCheckSampler:
    method __init__ (line 93) | def __init__(self, max_samples: int = 10) -> None:
    method sample (line 96) | def sample(
  class CalibrationStore (line 180) | class CalibrationStore:
    method __init__ (line 183) | def __init__(self, root: Path) -> None:
    method persist_round (line 189) | def persist_round(self, rnd: CalibrationRound) -> Path:
    method load_round (line 194) | def load_round(self, round_id: str) -> CalibrationRound | None:
    method list_rounds (line 201) | def list_rounds(self) -> list[CalibrationRound]:
    method persist_outcome (line 208) | def persist_outcome(self, outcome: CalibrationOutcome) -> Path:
    method load_outcome (line 213) | def load_outcome(self, outcome_id: str) -> CalibrationOutcome | None:
    method list_outcomes (line 220) | def list_outcomes(self) -> list[CalibrationOutcome]:

FILE: autocontext/src/autocontext/analytics/clustering.py
  class EventPattern (line 18) | class EventPattern(BaseModel):
    method to_dict (line 30) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 34) | def from_dict(cls, data: dict[str, Any]) -> EventPattern:
  class FacetCluster (line 38) | class FacetCluster(BaseModel):
    method to_dict (line 53) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 57) | def from_dict(cls, data: dict[str, Any]) -> FacetCluster:
  class PatternClusterer (line 61) | class PatternClusterer:
    method cluster_friction (line 64) | def cluster_friction(self, facets: list[RunFacet]) -> list[FacetCluster]:
    method cluster_delight (line 70) | def cluster_delight(self, facets: list[RunFacet]) -> list[FacetCluster]:
    method _cluster_signals (line 76) | def _cluster_signals(
    method query_clusters (line 142) | def query_clusters(

FILE: autocontext/src/autocontext/analytics/correlation.py
  class ReleaseContext (line 24) | class ReleaseContext(BaseModel):
    method to_dict (line 33) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 37) | def from_dict(cls, data: dict[str, Any]) -> ReleaseContext:
  class CorrelationDimension (line 41) | class CorrelationDimension(BaseModel):
    method to_dict (line 52) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 56) | def from_dict(cls, data: dict[str, Any]) -> CorrelationDimension:
  class CorrelationResult (line 60) | class CorrelationResult(BaseModel):
    method to_dict (line 74) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 78) | def from_dict(cls, data: dict[str, Any]) -> CorrelationResult:
  class SignalCorrelator (line 82) | class SignalCorrelator:
    method correlate (line 85) | def correlate(
    method _dimension_breakdown (line 133) | def _dimension_breakdown(
    method _release_breakdown (line 170) | def _release_breakdown(
  class CorrelationStore (line 239) | class CorrelationStore:
    method __init__ (line 242) | def __init__(self, root: Path) -> None:
    method persist (line 246) | def persist(self, result: CorrelationResult) -> Path:
    method load (line 251) | def load(self, correlation_id: str) -> CorrelationResult | None:
    method list_results (line 258) | def list_results(self) -> list[CorrelationResult]:

FILE: autocontext/src/autocontext/analytics/credit_assignment.py
  class ComponentChange (line 24) | class ComponentChange(BaseModel):
    method to_dict (line 32) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 36) | def from_dict(cls, data: dict[str, Any]) -> ComponentChange:
  class GenerationChangeVector (line 40) | class GenerationChangeVector(BaseModel):
    method total_change_magnitude (line 49) | def total_change_magnitude(self) -> float:
    method to_dict (line 52) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 56) | def from_dict(cls, data: dict[str, Any]) -> GenerationChangeVector:
  class AttributionResult (line 60) | class AttributionResult(BaseModel):
    method to_dict (line 68) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 72) | def from_dict(cls, data: dict[str, Any]) -> AttributionResult:
  class CreditAssignmentRecord (line 76) | class CreditAssignmentRecord(BaseModel):
    method to_dict (line 85) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 89) | def from_dict(cls, data: dict[str, Any]) -> CreditAssignmentRecord:
  function _text_change_magnitude (line 93) | def _text_change_magnitude(old: str, new: str) -> float:
  function _list_change_magnitude (line 107) | def _list_change_magnitude(old: list, new: list) -> float:
  function compute_change_vector (line 120) | def compute_change_vector(
  function attribute_credit (line 169) | def attribute_credit(vector: GenerationChangeVector) -> AttributionResult:
  function format_attribution_for_agent (line 220) | def format_attribution_for_agent(
  function summarize_credit_patterns (line 255) | def summarize_credit_patterns(records: list[CreditAssignmentRecord]) -> ...

FILE: autocontext/src/autocontext/analytics/cross_runtime_trace_findings.py
  class _CamelModel (line 42) | class _CamelModel(BaseModel):
  class CrossRuntimeTraceFinding (line 50) | class CrossRuntimeTraceFinding(_CamelModel):
    method __get_pydantic_core_schema__ (line 59) | def __get_pydantic_core_schema__(cls, source_type, handler):  # type: ...
  class CrossRuntimeFailureMotif (line 64) | class CrossRuntimeFailureMotif(_CamelModel):
  class CrossRuntimeTraceFindingReport (line 72) | class CrossRuntimeTraceFindingReport(_CamelModel):

FILE: autocontext/src/autocontext/analytics/events_to_trace.py
  function events_to_trace (line 89) | def events_to_trace(events_path: Path, run_id: str) -> RunTrace:
  function collect_run_ids (line 149) | def collect_run_ids(events_path: Path) -> list[str]:
  function _read_event_rows (line 160) | def _read_event_rows(events_path: Path, run_id: str) -> list[dict[str, A...
  function _iter_event_rows (line 167) | def _iter_event_rows(events_path: Path) -> list[dict[str, Any]]:
  function _payload (line 183) | def _payload(row: dict[str, Any]) -> dict[str, Any]:
  function _category_for (line 188) | def _category_for(event_type: str) -> str:
  function _stage_for (line 192) | def _stage_for(event_type: str, payload: dict[str, Any]) -> str:
  function _actor_for (line 199) | def _actor_for(event_type: str, payload: dict[str, Any]) -> ActorRef:
  function _resources_for (line 206) | def _resources_for(payload: dict[str, Any]) -> list[ResourceRef]:
  function _summary_for (line 219) | def _summary_for(event_type: str, payload: dict[str, Any]) -> str:
  function _outcome_for (line 227) | def _outcome_for(event_type: str, payload: dict[str, Any]) -> str | None:
  function _severity_for (line 243) | def _severity_for(event_type: str, payload: dict[str, Any]) -> str:
  function _generation_index (line 257) | def _generation_index(payload: dict[str, Any]) -> int:
  function _duration_ms (line 265) | def _duration_ms(payload: dict[str, Any]) -> int | None:
  function _int_value (line 274) | def _int_value(value: Any, default: int) -> int:

FILE: autocontext/src/autocontext/analytics/extractor.py
  class FacetExtractor (line 19) | class FacetExtractor:
    method extract (line 22) | def extract(self, data: dict[str, Any]) -> RunFacet:
    method _extract_friction (line 97) | def _extract_friction(
    method _extract_delight (line 143) | def _extract_delight(

FILE: autocontext/src/autocontext/analytics/facets.py
  class RunEvent (line 17) | class RunEvent(BaseModel):
    method to_dict (line 33) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 37) | def from_dict(cls, data: dict[str, Any]) -> RunEvent:
  class FrictionSignal (line 41) | class FrictionSignal(BaseModel):
    method to_dict (line 55) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 59) | def from_dict(cls, data: dict[str, Any]) -> FrictionSignal:
  class DelightSignal (line 63) | class DelightSignal(BaseModel):
    method to_dict (line 75) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 79) | def from_dict(cls, data: dict[str, Any]) -> DelightSignal:
  class RunFacet (line 83) | class RunFacet(BaseModel):
    method to_dict (line 114) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 118) | def from_dict(cls, data: dict[str, Any]) -> RunFacet:

FILE: autocontext/src/autocontext/analytics/html_artifact_shell.py
  function html_document (line 8) | def html_document(title: str, body: str, *, script: str = "") -> str:
  function _h (line 182) | def _h(value: object) -> str:

FILE: autocontext/src/autocontext/analytics/issue_generator.py
  class ThresholdConfig (line 20) | class ThresholdConfig(BaseModel):
  class IssueCandidate (line 29) | class IssueCandidate(BaseModel):
    method to_dict (line 49) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 53) | def from_dict(cls, data: dict[str, Any]) -> IssueCandidate:
  class ProbeCandidate (line 57) | class ProbeCandidate(BaseModel):
    method to_dict (line 76) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 80) | def from_dict(cls, data: dict[str, Any]) -> ProbeCandidate:
  class IssueGenerator (line 84) | class IssueGenerator:
    method __init__ (line 87) | def __init__(self, config: ThresholdConfig | None = None) -> None:
    method generate (line 90) | def generate(
    method _meets_threshold (line 168) | def _meets_threshold(self, cluster: FacetCluster) -> bool:
    method _build_rationale (line 176) | def _build_rationale(
    method _compute_priority (line 202) | def _compute_priority(self, cluster: FacetCluster) -> str:

FILE: autocontext/src/autocontext/analytics/issue_store.py
  class IssueStore (line 15) | class IssueStore:
    method __init__ (line 18) | def __init__(self, root: Path) -> None:
    method persist_issue (line 24) | def persist_issue(self, candidate: IssueCandidate) -> Path:
    method persist_probe (line 29) | def persist_probe(self, probe: ProbeCandidate) -> Path:
    method load_issue (line 34) | def load_issue(self, candidate_id: str) -> IssueCandidate | None:
    method load_probe (line 41) | def load_probe(self, candidate_id: str) -> ProbeCandidate | None:
    method list_issues (line 48) | def list_issues(self) -> list[IssueCandidate]:
    method list_probes (line 55) | def list_probes(self) -> list[ProbeCandidate]:
    method has_issue_for_cluster (line 62) | def has_issue_for_cluster(self, cluster_id: str) -> bool:
    method has_issue_for_signal_type (line 69) | def has_issue_for_signal_type(self, signal_type: str) -> bool:
    method has_issue_for_signature (line 76) | def has_issue_for_signature(
    method has_probe_for_signal_type (line 106) | def has_probe_for_signal_type(self, signal_type: str) -> bool:
    method has_probe_for_signature (line 113) | def has_probe_for_signature(

FILE: autocontext/src/autocontext/analytics/regression_fixtures.py
  class RegressionFixture (line 23) | class RegressionFixture(BaseModel):
    method to_dict (line 36) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 40) | def from_dict(cls, data: dict[str, Any]) -> RegressionFixture:
  function generate_fixtures_from_friction (line 44) | def generate_fixtures_from_friction(
  class FixtureStore (line 110) | class FixtureStore:
    method __init__ (line 113) | def __init__(self, root: Path) -> None:
    method persist (line 117) | def persist(self, fixture: RegressionFixture) -> Path:
    method replace_for_scenario (line 122) | def replace_for_scenario(
    method load (line 136) | def load(self, fixture_id: str) -> RegressionFixture | None:
    method list_for_scenario (line 142) | def list_for_scenario(self, scenario: str) -> list[RegressionFixture]:
  function _stable_fixture_id (line 151) | def _stable_fixture_id(scenario: str, pattern: str) -> str:

FILE: autocontext/src/autocontext/analytics/rubric_drift.py
  class RubricSnapshot (line 28) | class RubricSnapshot(BaseModel):
    method to_dict (line 51) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 55) | def from_dict(cls, data: dict[str, Any]) -> RubricSnapshot:
  class DimensionDriftSnapshot (line 59) | class DimensionDriftSnapshot(BaseModel):
    method to_dict (line 71) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 75) | def from_dict(cls, data: dict[str, Any]) -> DimensionDriftSnapshot:
  class DriftThresholds (line 79) | class DriftThresholds(BaseModel):
  class DriftWarning (line 95) | class DriftWarning(BaseModel):
    method to_dict (line 112) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 116) | def from_dict(cls, data: dict[str, Any]) -> DriftWarning:
  class RubricDriftMonitor (line 120) | class RubricDriftMonitor:
    method __init__ (line 123) | def __init__(self, thresholds: DriftThresholds | None = None) -> None:
    method compute_snapshot (line 126) | def compute_snapshot(
    method compute_dimension_snapshot (line 219) | def compute_dimension_snapshot(
    method detect_drift (line 251) | def detect_drift(
    method detect_dimension_drift (line 360) | def detect_dimension_drift(
    method analyze (line 477) | def analyze(
    method _make_warning (line 493) | def _make_warning(
  function _dimension_summary_from_row (line 525) | def _dimension_summary_from_row(row: dict[str, Any]) -> dict[str, Any]:
  function _append_dimension_values (line 539) | def _append_dimension_values(target: dict[str, list[float]], raw_values:...
  function _is_monotonic_decline (line 548) | def _is_monotonic_decline(series: list[float]) -> bool:
  function _max_equal_streak (line 552) | def _max_equal_streak(left: list[float], right: list[float], *, limit: i...
  function _pearson (line 566) | def _pearson(left: list[float], right: list[float]) -> float | None:
  class DriftStore (line 582) | class DriftStore:
    method __init__ (line 585) | def __init__(self, root: Path) -> None:
    method persist_snapshot (line 591) | def persist_snapshot(self, snapshot: RubricSnapshot) -> Path:
    method load_snapshot (line 596) | def load_snapshot(self, snapshot_id: str) -> RubricSnapshot | None:
    method list_snapshots (line 603) | def list_snapshots(self) -> list[RubricSnapshot]:
    method persist_warning (line 610) | def persist_warning(self, warning: DriftWarning) -> Path:
    method load_warning (line 615) | def load_warning(self, warning_id: str) -> DriftWarning | None:
    method list_warnings (line 622) | def list_warnings(self) -> list[DriftWarning]:

FILE: autocontext/src/autocontext/analytics/run_trace.py
  class ActorRef (line 27) | class ActorRef(BaseModel):
    method to_dict (line 37) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 41) | def from_dict(cls, data: dict[str, Any]) -> ActorRef:
  class ResourceRef (line 45) | class ResourceRef(BaseModel):
    method to_dict (line 56) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 60) | def from_dict(cls, data: dict[str, Any]) -> ResourceRef:
  class TraceEvent (line 64) | class TraceEvent(BaseModel):
    method to_dict (line 96) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 100) | def from_dict(cls, data: dict[str, Any]) -> TraceEvent:
  class CausalEdge (line 104) | class CausalEdge(BaseModel):
    method to_dict (line 114) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 118) | def from_dict(cls, data: dict[str, Any]) -> CausalEdge:
  class RunTrace (line 122) | class RunTrace(BaseModel):
    method to_dict (line 138) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 142) | def from_dict(cls, data: dict[str, Any]) -> RunTrace:
  class TraceStore (line 146) | class TraceStore:
    method __init__ (line 149) | def __init__(self, root: Path, writer: Callable[[Path, dict[str, Any]]...
    method persist (line 154) | def persist(self, trace: RunTrace) -> Path:
    method load (line 163) | def load(self, trace_id: str) -> RunTrace | None:
    method list_traces (line 170) | def list_traces(

FILE: autocontext/src/autocontext/analytics/runtime_session_run_trace.py
  class _RuntimeEventRecord (line 15) | class _RuntimeEventRecord:
  function runtime_session_log_to_run_trace (line 21) | def runtime_session_log_to_run_trace(
  function _parent_event_id_for (line 123) | def _parent_event_id_for(
  function _runtime_session_id (line 159) | def _runtime_session_id(record: _RuntimeEventRecord) -> str:
  function _flatten_runtime_events (line 163) | def _flatten_runtime_events(
  function _trace_event_type (line 184) | def _trace_event_type(event: RuntimeSessionEvent) -> str:
  function _actor_for (line 188) | def _actor_for(record: _RuntimeEventRecord) -> ActorRef:
  function _detail_for (line 205) | def _detail_for(record: _RuntimeEventRecord) -> dict[str, Any]:
  function _resources_for (line 248) | def _resources_for(event: RuntimeSessionEvent) -> list[ResourceRef]:
  function _category_for (line 265) | def _category_for(event: RuntimeSessionEvent) -> str:
  function _stage_for (line 275) | def _stage_for(record: _RuntimeEventRecord) -> str:
  function _severity_for (line 288) | def _severity_for(event: RuntimeSessionEvent) -> str:
  function _outcome_for (line 298) | def _outcome_for(event: RuntimeSessionEvent) -> str | None:
  function _summary_for (line 311) | def _summary_for(event: RuntimeSessionEvent) -> str:
  function _generation_index (line 324) | def _generation_index(event: RuntimeSessionEvent) -> int:
  function _is_error (line 329) | def _is_error(event: RuntimeSessionEvent) -> bool:
  function _infer_run_id (line 333) | def _infer_run_id(log: RuntimeSessionEventLog) -> str:
  function _infer_scenario_name (line 348) | def _infer_scenario_name(log: RuntimeSessionEventLog) -> str:
  function _copy_str (line 352) | def _copy_str(source: dict[str, Any], target: dict[str, Any], source_key...
  function _copy_number (line 358) | def _copy_number(source: dict[str, Any], target: dict[str, Any], source_...
  function _copy_bool (line 364) | def _copy_bool(source: dict[str, Any], target: dict[str, Any], source_ke...
  function _copy_str_list (line 370) | def _copy_str_list(source: dict[str, Any], target: dict[str, Any], sourc...
  function _json_safe_record (line 376) | def _json_safe_record(value: dict[str, Any]) -> dict[str, Any]:
  function _read_str (line 381) | def _read_str(value: Any) -> str:
  function _finite_number (line 385) | def _finite_number(value: Any) -> int | float | None:

FILE: autocontext/src/autocontext/analytics/store.py
  class FacetStore (line 19) | class FacetStore:
    method __init__ (line 22) | def __init__(self, root: Path) -> None:
    method persist (line 26) | def persist(self, facet: RunFacet) -> Path:
    method load (line 35) | def load(self, run_id: str) -> RunFacet | None:
    method list_facets (line 43) | def list_facets(self, scenario: str | None = None) -> list[RunFacet]:
    method query (line 54) | def query(self, **filters: Any) -> list[RunFacet]:

FILE: autocontext/src/autocontext/analytics/taxonomy.py
  class TaxonomyEntry (line 20) | class TaxonomyEntry(BaseModel):
    method to_dict (line 33) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 37) | def from_dict(cls, data: dict[str, Any]) -> TaxonomyEntry:
  function _make_builtins (line 59) | def _make_builtins() -> list[TaxonomyEntry]:
  class FacetTaxonomy (line 89) | class FacetTaxonomy:
    method __init__ (line 92) | def __init__(self) -> None:
    method get_entries (line 95) | def get_entries(self) -> list[TaxonomyEntry]:
    method add_entry (line 99) | def add_entry(self, entry: TaxonomyEntry) -> None:
    method _has_name (line 103) | def _has_name(self, name: str) -> bool:
    method propose_from_cluster (line 106) | def propose_from_cluster(
    method evolve (line 136) | def evolve(
    method save (line 153) | def save(self, path: Path) -> None:
    method load (line 159) | def load(cls, path: Path) -> FacetTaxonomy:

FILE: autocontext/src/autocontext/analytics/timeline_inspector.py
  class TimelineFilter (line 31) | class TimelineFilter(BaseModel):
  class TimelineEntry (line 42) | class TimelineEntry(BaseModel):
    method to_dict (line 53) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 57) | def from_dict(cls, data: dict[str, Any]) -> TimelineEntry:
  class RunInspection (line 61) | class RunInspection(BaseModel):
  class GenerationInspection (line 74) | class GenerationInspection(BaseModel):
  function _matches_filter (line 86) | def _matches_filter(event: TraceEvent, filt: TimelineFilter) -> bool:
  function _make_entry (line 106) | def _make_entry(event: TraceEvent, idx: int) -> TimelineEntry:
  class TimelineBuilder (line 120) | class TimelineBuilder:
    method build (line 123) | def build(
    method build_summary (line 137) | def build_summary(self, trace: RunTrace) -> list[TimelineEntry]:
    method compare_generations (line 162) | def compare_generations(
  class StateInspector (line 175) | class StateInspector:
    method inspect_run (line 178) | def inspect_run(self, trace: RunTrace) -> RunInspection:
    method inspect_generation (line 200) | def inspect_generation(
    method find_failure_paths (line 219) | def find_failure_paths(self, trace: RunTrace) -> list[list[TraceEvent]]:
    method find_recovery_paths (line 224) | def find_recovery_paths(self, trace: RunTrace) -> list[list[TraceEvent]]:
    method dependency_chain (line 229) | def dependency_chain(
    method _trace_causes (line 237) | def _trace_causes(
    method _compute_causal_depth (line 269) | def _compute_causal_depth(self, trace: RunTrace) -> int:
    method _parent_map (line 292) | def _parent_map(self, trace: RunTrace) -> dict[str, list[str]]:
    method _run_summary (line 314) | def _run_summary(

FILE: autocontext/src/autocontext/analytics/trace_reporter.py
  class TraceFinding (line 31) | class TraceFinding(BaseModel):
    method to_dict (line 43) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 47) | def from_dict(cls, data: dict[str, Any]) -> TraceFinding:
  class FailureMotif (line 51) | class FailureMotif(BaseModel):
    method to_dict (line 61) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 65) | def from_dict(cls, data: dict[str, Any]) -> FailureMotif:
  class RecoveryPath (line 69) | class RecoveryPath(BaseModel):
    method to_dict (line 79) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 83) | def from_dict(cls, data: dict[str, Any]) -> RecoveryPath:
  class TraceWriteup (line 87) | class TraceWriteup(BaseModel):
    method to_dict (line 100) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 104) | def from_dict(cls, data: dict[str, Any]) -> TraceWriteup:
    method to_markdown (line 107) | def to_markdown(self) -> str:
    method to_html (line 112) | def to_html(self) -> str:
  class WeaknessReport (line 118) | class WeaknessReport(BaseModel):
    method to_dict (line 130) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 134) | def from_dict(cls, data: dict[str, Any]) -> WeaknessReport:
    method to_markdown (line 137) | def to_markdown(self) -> str:
    method to_html (line 142) | def to_html(self) -> str:
  function _uid (line 148) | def _uid() -> str:
  class TraceReporter (line 152) | class TraceReporter:
    method extract_findings (line 155) | def extract_findings(self, trace: RunTrace) -> list[TraceFinding]:
    method extract_failure_motifs (line 188) | def extract_failure_motifs(self, trace: RunTrace) -> list[FailureMotif]:
    method extract_recovery_paths (line 214) | def extract_recovery_paths(self, trace: RunTrace) -> list[RecoveryPath]:
    method generate_writeup (line 242) | def generate_writeup(self, trace: RunTrace) -> TraceWriteup:
    method generate_weakness_report (line 263) | def generate_weakness_report(self, trace: RunTrace) -> WeaknessReport:
    method _collect_evidence (line 287) | def _collect_evidence(self, trace: RunTrace, event: TraceEvent) -> lis...
    method _map_severity (line 302) | def _map_severity(self, event_severity: str) -> str:
    method _find_cause_failure (line 306) | def _find_cause_failure(
    method _collect_path (line 329) | def _collect_path(
    method _compose_writeup_summary (line 351) | def _compose_writeup_summary(
    method _compose_recovery_analysis (line 379) | def _compose_recovery_analysis(self, recovery_paths: list[RecoveryPath...
    method _compose_recommendations (line 389) | def _compose_recommendations(
    method _parent_map (line 418) | def _parent_map(self, trace: RunTrace) -> dict[str, list[str]]:
    method _ancestor_ids (line 440) | def _ancestor_ids(self, parent_map: dict[str, list[str]], event_id: st...
  class ReportStore (line 453) | class ReportStore:
    method __init__ (line 456) | def __init__(self, root: Path) -> None:
    method persist_writeup (line 462) | def persist_writeup(self, writeup: TraceWriteup) -> Path:
    method load_writeup (line 467) | def load_writeup(self, writeup_id: str) -> TraceWriteup | None:
    method list_writeups (line 474) | def list_writeups(self) -> list[TraceWriteup]:
    method latest_writeup_for_run (line 481) | def latest_writeup_for_run(self, run_id: str) -> TraceWriteup | None:
    method persist_weakness_report (line 487) | def persist_weakness_report(self, report: WeaknessReport) -> Path:
    method load_weakness_report (line 492) | def load_weakness_report(self, report_id: str) -> WeaknessReport | None:
    method list_weakness_reports (line 499) | def list_weakness_reports(self) -> list[WeaknessReport]:
    method latest_weakness_report_for_run (line 506) | def latest_weakness_report_for_run(self, run_id: str) -> WeaknessRepor...

FILE: autocontext/src/autocontext/artifacts/models.py
  class ArtifactProvenance (line 17) | class ArtifactProvenance(BaseModel):
  class _ArtifactBase (line 26) | class _ArtifactBase(BaseModel):
  class HarnessArtifact (line 39) | class HarnessArtifact(_ArtifactBase):
  class PolicyArtifact (line 52) | class PolicyArtifact(_ArtifactBase):
  class DistilledModelArtifact (line 65) | class DistilledModelArtifact(_ArtifactBase):
  class ArtifactManifest (line 81) | class ArtifactManifest(BaseModel):
    method all_artifacts (line 89) | def all_artifacts(self) -> list[_ArtifactBase]:

FILE: autocontext/src/autocontext/banner.py
  function _assets_dir (line 57) | def _assets_dir() -> Path:
  function get_banner_path (line 61) | def get_banner_path() -> Path:
  function get_whats_new_path (line 66) | def get_whats_new_path() -> Path:
  function get_banner_svg_path (line 71) | def get_banner_svg_path() -> Path:
  function _read_packaged_asset (line 76) | def _read_packaged_asset(name: str) -> str | None:
  function _read_source_asset (line 88) | def _read_source_asset(name: str) -> str | None:
  function load_banner_art (line 96) | def load_banner_art() -> str:
  function load_whats_new (line 103) | def load_whats_new() -> tuple[str, ...]:
  function render_banner_svg (line 115) | def render_banner_svg() -> str:
  function banner_plain (line 152) | def banner_plain() -> str:
  function print_banner_rich (line 157) | def print_banner_rich() -> None:
  function render_readme_banner_block (line 195) | def render_readme_banner_block() -> str:
  function render_readme_whats_new_block (line 211) | def render_readme_whats_new_block() -> str:
  function render_dashboard_banner_block (line 222) | def render_dashboard_banner_block() -> str:

FILE: autocontext/src/autocontext/blobstore/cache.py
  class HydrationCache (line 18) | class HydrationCache:
    method __init__ (line 21) | def __init__(self, root: Path, max_mb: float = 500) -> None:
    method put (line 27) | def put(self, key: str, data: bytes, digest: str) -> None:
    method get (line 36) | def get(self, key: str, expected_digest: str | None = None) -> bytes |...
    method total_size_bytes (line 54) | def total_size_bytes(self) -> int:
    method clear (line 62) | def clear(self) -> None:
    method _evict_if_needed (line 69) | def _evict_if_needed(self) -> None:

FILE: autocontext/src/autocontext/blobstore/factory.py
  function create_blob_store (line 10) | def create_blob_store(

FILE: autocontext/src/autocontext/blobstore/hf_bucket.py
  class HfBucketStore (line 22) | class HfBucketStore(BlobStore):
    method __init__ (line 25) | def __init__(self, repo_id: str, cache_dir: Path, repo_type: str = "da...
    method put (line 31) | def put(self, key: str, data: bytes) -> str:
    method get (line 59) | def get(self, key: str) -> bytes | None:
    method head (line 91) | def head(self, key: str) -> dict[str, Any] | None:
    method list_prefix (line 108) | def list_prefix(self, prefix: str) -> list[str]:
    method delete (line 127) | def delete(self, key: str) -> bool:
    method _load_index (line 141) | def _load_index(self) -> tuple[bool, dict[str, dict[str, Any]]]:
    method _save_index (line 174) | def _save_index(self, index: dict[str, dict[str, Any]]) -> None:
    method _delete_remote_file (line 190) | def _delete_remote_file(self, key: str) -> None:
    method _run_hf_command (line 206) | def _run_hf_command(self, cmd: list[str]) -> str:
  function _guess_content_type (line 218) | def _guess_content_type(key: str) -> str:

FILE: autocontext/src/autocontext/blobstore/local.py
  class LocalBlobStore (line 13) | class LocalBlobStore(BlobStore):
    method __init__ (line 22) | def __init__(self, root: Path) -> None:
    method put (line 26) | def put(self, key: str, data: bytes) -> str:
    method get (line 33) | def get(self, key: str) -> bytes | None:
    method head (line 39) | def head(self, key: str) -> dict[str, Any] | None:
    method list_prefix (line 50) | def list_prefix(self, prefix: str) -> list[str]:
    method delete (line 63) | def delete(self, key: str) -> bool:
    method put_file (line 70) | def put_file(self, key: str, path: Path) -> str:
    method append (line 76) | def append(self, key: str, data: bytes) -> str:
    method get_file (line 83) | def get_file(self, key: str, dest: Path) -> bool:
  function _sha256 (line 92) | def _sha256(data: bytes) -> str:
  function _sha256_file (line 96) | def _sha256_file(path: Path) -> str:
  function _guess_content_type (line 104) | def _guess_content_type(key: str) -> str:

FILE: autocontext/src/autocontext/blobstore/mirror.py
  class BlobMirror (line 16) | class BlobMirror:
    method __init__ (line 19) | def __init__(
    method mirror_artifact (line 29) | def mirror_artifact(
    method mirror_file (line 58) | def mirror_file(

FILE: autocontext/src/autocontext/blobstore/ref.py
  class BlobRef (line 11) | class BlobRef:
    method is_hydrated (line 24) | def is_hydrated(self) -> bool:
    method to_dict (line 28) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 42) | def from_dict(cls, data: dict[str, Any]) -> BlobRef:

FILE: autocontext/src/autocontext/blobstore/registry.py
  class BlobRegistry (line 12) | class BlobRegistry:
    method __init__ (line 15) | def __init__(self) -> None:
    method register (line 18) | def register(self, run_id: str, name: str, ref: BlobRef) -> None:
    method lookup (line 23) | def lookup(self, run_id: str, name: str) -> BlobRef | None:
    method list_for_run (line 26) | def list_for_run(self, run_id: str) -> list[BlobRef]:
    method save (line 29) | def save(self, path: Path) -> None:
    method load (line 37) | def load(cls, path: Path) -> BlobRegistry:

FILE: autocontext/src/autocontext/blobstore/store.py
  class BlobStore (line 15) | class BlobStore(ABC):
    method put (line 19) | def put(self, key: str, data: bytes) -> str:
    method get (line 23) | def get(self, key: str) -> bytes | None:
    method head (line 27) | def head(self, key: str) -> dict[str, Any] | None:
    method list_prefix (line 31) | def list_prefix(self, prefix: str) -> list[str]:
    method delete (line 35) | def delete(self, key: str) -> bool:
    method append (line 38) | def append(self, key: str, data: bytes) -> str:
    method put_file (line 43) | def put_file(self, key: str, path: Path) -> str:
    method get_file (line 47) | def get_file(self, key: str, dest: Path) -> bool:
  function normalize_blob_key (line 57) | def normalize_blob_key(key: str, *, allow_empty: bool = False) -> str:
  function resolve_blob_path (line 80) | def resolve_blob_path(root: Path, key: str) -> Path:
  function prefix_matches (line 92) | def prefix_matches(key: str, prefix: str) -> bool:

FILE: autocontext/src/autocontext/blobstore/sync.py
  class SyncResult (line 17) | class SyncResult:
  class SyncManager (line 27) | class SyncManager:
    method __init__ (line 30) | def __init__(self, store: BlobStore, runs_root: Path) -> None:
    method sync_run (line 34) | def sync_run(self, run_id: str) -> SyncResult:
    method status (line 70) | def status(self) -> dict[str, Any]:
  function _matches_local_artifact (line 91) | def _matches_local_artifact(path: Path, local_size: int, existing: dict[...
  function _file_sha256 (line 101) | def _file_sha256(path: Path) -> str:

FILE: autocontext/src/autocontext/bootstrap/collector.py
  function collect_snapshot (line 52) | def collect_snapshot() -> EnvironmentSnapshot:
  function _collect_core (line 72) | def _collect_core() -> dict[str, Any]:
  function _get_username (line 87) | def _get_username() -> str:
  function _collect_runtimes (line 94) | def _collect_runtimes() -> dict[str, Any]:
  function _collect_packages (line 116) | def _collect_packages() -> dict[str, Any]:
  function _collect_filesystem (line 148) | def _collect_filesystem(cwd: str) -> dict[str, Any]:
  function _collect_git (line 173) | def _collect_git() -> dict[str, Any]:
  function _collect_system (line 228) | def _collect_system() -> dict[str, Any]:

FILE: autocontext/src/autocontext/bootstrap/redactor.py
  class RedactionConfig (line 12) | class RedactionConfig:
  function redact_snapshot (line 23) | def redact_snapshot(snapshot: EnvironmentSnapshot, config: RedactionConf...
  function _strip_prefix (line 83) | def _strip_prefix(path: str, prefix: str) -> str:
  function _redact_path_like (line 91) | def _redact_path_like(value: str) -> str:

FILE: autocontext/src/autocontext/bootstrap/renderer.py
  function render_prompt_section (line 10) | def render_prompt_section(snapshot: EnvironmentSnapshot) -> str:
  function render_full_json (line 54) | def render_full_json(snapshot: EnvironmentSnapshot) -> str:

FILE: autocontext/src/autocontext/bootstrap/snapshot.py
  class PackageInfo (line 10) | class PackageInfo:
  class EnvironmentSnapshot (line 18) | class EnvironmentSnapshot:
    method to_dict (line 59) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 89) | def from_dict(cls, data: dict[str, Any]) -> EnvironmentSnapshot:

FILE: autocontext/src/autocontext/cli.py
  class AgentTaskRunSummary (line 56) | class AgentTaskRunSummary:
  function _main_callback (line 75) | def _main_callback(ctx: typer.Context) -> None:
  function _apply_preset_env (line 83) | def _apply_preset_env(preset: str | None) -> None:
  function _runner (line 89) | def _runner(preset: str | None = None) -> GenerationRunner:
  function _sqlite_from_settings (line 97) | def _sqlite_from_settings(settings: AppSettings) -> SQLiteStore:
  function _artifacts_from_settings (line 103) | def _artifacts_from_settings(settings: AppSettings) -> ArtifactStore:
  function _resolve_export_artifact_roots (line 110) | def _resolve_export_artifact_roots(
  function _write_json_stdout (line 150) | def _write_json_stdout(payload: object) -> None:
  function _write_json_stderr (line 154) | def _write_json_stderr(message: str) -> None:
  function _check_json_exit (line 158) | def _check_json_exit(result: dict[str, Any]) -> None:
  function _exit_provider_error (line 164) | def _exit_provider_error(
  function _is_agent_task (line 185) | def _is_agent_task(scenario_name: str) -> bool:
  function _resolve_simulation_runtime (line 197) | def _resolve_simulation_runtime(settings: AppSettings) -> tuple[LLMProvi...
  function _resolve_role_runtime (line 206) | def _resolve_role_runtime(
  function _resolve_investigation_runtime (line 224) | def _resolve_investigation_runtime(
  function _resolve_agent_task_runtime (line 232) | def _resolve_agent_task_runtime(
  function _run_agent_task (line 242) | def _run_agent_task(
  function run (line 339) | def run(
  function resume (line 465) | def resume(
  function replay (line 495) | def replay(run_id: str = typer.Argument(...), generation: int = typer.Op...
  function benchmark (line 508) | def benchmark(scenario: str = typer.Option("grid_ctf"), runs: int = type...
  function list_runs (line 521) | def list_runs(
  function status (line 554) | def status(
  function serve (line 605) | def serve(
  function ecosystem (line 615) | def ecosystem(
  function tui (line 678) | def tui(
  function ab_test (line 708) | def ab_test(
  function mcp_serve (line 789) | def mcp_serve() -> None:
  function _run_training (line 800) | def _run_training(config: TrainingConfig, *, json_output: bool = False) ...
  function train (line 814) | def train(
  function export_training_data_cmd (line 883) | def export_training_data_cmd(
  function export_cmd (line 957) | def export_cmd(
  function simulate (line 1091) | def simulate(
  function investigate (line 1243) | def investigate(
  function import_package_cmd (line 1271) | def import_package_cmd(
  function wait (line 1356) | def wait(
  function judge (line 1418) | def judge(

FILE: autocontext/src/autocontext/cli_analytics.py
  function _cli_attr (line 24) | def _cli_attr(dependency_module: str, name: str) -> Any:
  function _validated_trace_id (line 28) | def _validated_trace_id(trace_id: str) -> str:
  function run_render_timeline_command (line 57) | def run_render_timeline_command(
  function run_trace_findings_command (line 99) | def run_trace_findings_command(
  function run_rebuild_traces_command (line 147) | def run_rebuild_traces_command(
  function run_drift_command (line 217) | def run_drift_command(
  function run_context_selection_command (line 264) | def run_context_selection_command(
  function register_analytics_command (line 304) | def register_analytics_command(

FILE: autocontext/src/autocontext/cli_family_name.py
  class FamilyNameError (line 26) | class FamilyNameError(ValueError):
  class FamilyName (line 36) | class FamilyName:
    method from_user_input (line 46) | def from_user_input(cls, value: str | None) -> FamilyName | None:
  function _known_family_names (line 93) | def _known_family_names() -> list[str]:
  function _format_did_you_mean (line 100) | def _format_did_you_mean(

FILE: autocontext/src/autocontext/cli_hermes.py
  function _cli_attr (line 24) | def _cli_attr(dependency_module: str, name: str) -> Any:
  function register_hermes_command (line 28) | def register_hermes_command(

FILE: autocontext/src/autocontext/cli_hermes_runners.py
  function run_hermes_inspect_command (line 39) | def run_hermes_inspect_command(
  function run_hermes_export_skill_command (line 55) | def run_hermes_export_skill_command(
  function run_hermes_ingest_curator_command (line 129) | def run_hermes_ingest_curator_command(
  function run_hermes_export_dataset_command (line 173) | def run_hermes_export_dataset_command(
  function run_hermes_ingest_trajectories_command (line 220) | def run_hermes_ingest_trajectories_command(
  function run_hermes_ingest_sessions_command (line 297) | def run_hermes_ingest_sessions_command(
  function _same_file (line 378) | def _same_file(a: Path, b: Path) -> bool:
  function run_hermes_train_advisor_command (line 388) | def run_hermes_train_advisor_command(
  function run_hermes_recommend_command (line 459) | def run_hermes_recommend_command(
  function _is_inside (line 550) | def _is_inside(path: Path, parent: Path) -> bool:
  function _print_inventory (line 566) | def _print_inventory(inventory: HermesInventory, *, console: Console) ->...

FILE: autocontext/src/autocontext/cli_improve.py
  function _cli_attr (line 26) | def _cli_attr(dependency_module: str, name: str) -> Any:
  function register_improve_command (line 37) | def register_improve_command(

FILE: autocontext/src/autocontext/cli_investigate.py
  class InvestigationRuntimeResolver (line 17) | class InvestigationRuntimeResolver(Protocol):
    method __call__ (line 18) | def __call__(self, settings: AppSettings, *, role: str) -> tuple[LLMPr...
  function run_investigate_command (line 21) | def run_investigate_command(

FILE: autocontext/src/autocontext/cli_new_scenario.py
  function _cli_attr (line 20) | def _cli_attr(dependency_module: str, name: str) -> Any:
  function _get_custom_scenarios_dir (line 24) | def _get_custom_scenarios_dir() -> Path:
  function _create_family_scenario (line 29) | def _create_family_scenario(
  function register_new_scenario_command (line 60) | def register_new_scenario_command(

FILE: autocontext/src/autocontext/cli_queue.py
  class QueueEnqueuer (line 17) | class QueueEnqueuer(Protocol):
    method __call__ (line 18) | def __call__(
  function _cli_attr (line 33) | def _cli_attr(dependency_module: str, name: str) -> Any:
  function derive_queue_spec_name (line 37) | def derive_queue_spec_name(task_prompt: str) -> str:
  function resolve_queue_spec_name (line 42) | def resolve_queue_spec_name(spec: str, task_prompt: str) -> str:
  function run_queue_command (line 54) | def run_queue_command(
  function register_queue_command (line 127) | def register_queue_command(

FILE: autocontext/src/autocontext/cli_role_runtime.py
  function _sqlite_from_settings (line 16) | def _sqlite_from_settings(settings: AppSettings) -> SQLiteStore:
  function _role_default_model (line 22) | def _role_default_model(settings: AppSettings, role: str) -> str:
  function _wrap_role_client_as_provider (line 34) | def _wrap_role_client_as_provider(
  function resolve_role_runtime (line 55) | def resolve_role_runtime(

FILE: autocontext/src/autocontext/cli_runtime_overrides.py
  function _format_timeout_seconds (line 18) | def _format_timeout_seconds(seconds: float) -> str:
  function _reported_timeout_seconds (line 24) | def _reported_timeout_seconds(message: str) -> float | None:
  function runtime_timeout_field_for_provider (line 34) | def runtime_timeout_field_for_provider(provider_name: str) -> str | None:
  function _apply_timeout_overrides (line 45) | def _apply_timeout_overrides(
  function solve_runtime_provider_names (line 59) | def solve_runtime_provider_names(settings: AppSettings) -> list[str]:
  function solve_primary_runtime_provider (line 71) | def solve_primary_runtime_provider(settings: AppSettings) -> str:
  function apply_judge_runtime_overrides (line 79) | def apply_judge_runtime_overrides(
  function apply_solve_runtime_overrides (line 122) | def apply_solve_runtime_overrides(
  function format_runtime_provider_error (line 141) | def format_runtime_provider_error(

FILE: autocontext/src/autocontext/cli_solve.py
  function _validate_family_override (line 26) | def _validate_family_override(family_name: str | None) -> None:
  class SolveRunSummary (line 45) | class SolveRunSummary:
  function _cli_attr (line 60) | def _cli_attr(dependency_module: str, name: str) -> Any:
  function run_solve_command (line 64) | def run_solve_command(
  function _resolve_solve_description (line 165) | def _resolve_solve_description(
  function _resolve_solve_generations (line 172) | def _resolve_solve_generations(gens: int | None, iterations: int | None)...
  function register_solve_command (line 176) | def register_solve_command(

FILE: autocontext/src/autocontext/cli_task_input.py
  class TaskInputError (line 26) | class TaskInputError(ValueError):
  class TaskInput (line 36) | class TaskInput:
    method from_text (line 47) | def from_text(cls, text: str) -> TaskInput:
    method from_file (line 54) | def from_file(cls, path: str | Path) -> TaskInput:
    method from_args (line 70) | def from_args(

FILE: autocontext/src/autocontext/cli_worker.py
  class WorkerRunner (line 17) | class WorkerRunner(Protocol):
    method run (line 18) | def run(self) -> int: ...
    method run_batch (line 20) | def run_batch(self, limit: int | None = None) -> int: ...
  class WorkerRunnerFactory (line 23) | class WorkerRunnerFactory(Protocol):
    method __call__ (line 24) | def __call__(
  function _cli_attr (line 37) | def _cli_attr(dependency_module: str, name: str) -> Any:
  function _close_if_supported (line 41) | def _close_if_supported(resource: object) -> None:
  function _validate_worker_options (line 47) | def _validate_worker_options(
  function _write_worker_error (line 61) | def _write_worker_error(
  function _select_worker_model (line 74) | def _select_worker_model(settings: AppSettings, provider: LLMProvider, m...
  function _resolve_worker_concurrency (line 84) | def _resolve_worker_concurrency(provider: LLMProvider, requested: int) -...
  function run_worker_command (line 91) | def run_worker_command(
  function register_worker_command (line 173) | def register_worker_command(

FILE: autocontext/src/autocontext/concepts.py
  function get_concept_model (line 148) | def get_concept_model() -> dict[str, Any]:

FILE: autocontext/src/autocontext/config/harness_profile.py
  class HarnessRuntimeProfile (line 16) | class HarnessRuntimeProfile(BaseModel):
  function _parse_tool_allowlist (line 28) | def _parse_tool_allowlist(raw: str) -> tuple[str, ...]:
  function _profile_value (line 40) | def _profile_value(raw: object) -> str:
  function resolve_harness_runtime_profile (line 45) | def resolve_harness_runtime_profile(settings: AppSettings) -> HarnessRun...
  function render_harness_tool_context (line 68) | def render_harness_tool_context(profile: HarnessRuntimeProfile, generate...

FILE: autocontext/src/autocontext/config/presets.py
  function apply_preset (line 74) | def apply_preset(name: str) -> dict[str, Any]:

FILE: autocontext/src/autocontext/config/settings.py
  function setting_env_keys (line 22) | def setting_env_keys(field_name: str) -> tuple[str, ...]:
  class HarnessMode (line 27) | class HarnessMode(StrEnum):
  class HarnessProfile (line 36) | class HarnessProfile(StrEnum):
  class AppSettings (line 43) | class AppSettings(BaseModel):
    method _coerce_budget_limit (line 753) | def _coerce_budget_limit(cls, v: object) -> float | None:
  function load_settings (line 761) | def load_settings() -> AppSettings:
  function validate_harness_mode (line 783) | def validate_harness_mode(settings: AppSettings) -> AppSettings:

FILE: autocontext/src/autocontext/config/tuning_bounds.py
  class ParamBounds (line 17) | class ParamBounds:
  function architect_bounds (line 57) | def architect_bounds() -> dict[str, tuple[float, float]]:
  function protocol_bounds (line 62) | def protocol_bounds() -> dict[str, tuple[type, float, float]]:

FILE: autocontext/src/autocontext/consultation/runner.py
  class ConsultationRunner (line 14) | class ConsultationRunner:
    method __init__ (line 15) | def __init__(self, provider: LLMProvider) -> None:
    method consult (line 18) | def consult(self, request: ConsultationRequest) -> ConsultationResult:
    method _build_system_prompt (line 25) | def _build_system_prompt(self, request: ConsultationRequest) -> str:
    method _build_user_prompt (line 35) | def _build_user_prompt(self, request: ConsultationRequest) -> str:
    method _parse_response (line 50) | def _parse_response(self, completion: CompletionResult) -> Consultatio...
  function _extract_section (line 63) | def _extract_section(text: str, heading: str) -> str:
  function _format_score_history (line 70) | def _format_score_history(scores: list[float], *, max_items: int = 8) ->...
  function _format_gate_history (line 78) | def _format_gate_history(gates: list[str], *, max_items: int = 8) -> str:

FILE: autocontext/src/autocontext/consultation/stage.py
  function stage_consultation (line 26) | def stage_consultation(
  function _create_consultation_provider (line 120) | def _create_consultation_provider(ctx: GenerationContext) -> LLMProvider...

FILE: autocontext/src/autocontext/consultation/triggers.py
  function detect_consultation_triggers (line 15) | def detect_consultation_triggers(

FILE: autocontext/src/autocontext/consultation/types.py
  class ConsultationTrigger (line 8) | class ConsultationTrigger(StrEnum):
  class ConsultationRequest (line 16) | class ConsultationRequest:
  class ConsultationResult (line 27) | class ConsultationResult:
    method to_advisory_markdown (line 36) | def to_advisory_markdown(self) -> str:

FILE: autocontext/src/autocontext/evaluation/ab_runner.py
  class ABTestConfig (line 17) | class ABTestConfig:
  class ABTestResult (line 29) | class ABTestResult:
    method mean_delta (line 37) | def mean_delta(self) -> float:
    method treatment_wins (line 45) | def treatment_wins(self) -> int:
    method baseline_wins (line 49) | def baseline_wins(self) -> int:
  class ABTestRunner (line 54) | class ABTestRunner:
    method __init__ (line 57) | def __init__(self, config: ABTestConfig) -> None:
    method run (line 60) | def run(self) -> ABTestResult:
    method _run_condition (line 82) | def _run_condition(self, env_overrides: dict[str, str], run_id: str) -...

FILE: autocontext/src/autocontext/evaluation/ab_stats.py
  class ABStatsReport (line 13) | class ABStatsReport:
    method to_markdown (line 23) | def to_markdown(self) -> str:
  function mcnemar_test (line 41) | def mcnemar_test(
  function _binomial_p_value (line 87) | def _binomial_p_value(successes: int, n: int) -> float:
  function _exact_binomial_two_sided (line 92) | def _exact_binomial_two_sided(k: int, n: int) -> float:

FILE: autocontext/src/autocontext/evidence/manifest.py
  function render_evidence_manifest (line 11) | def render_evidence_manifest(workspace: EvidenceWorkspace, *, role: str ...
  function render_artifact_detail (line 56) | def render_artifact_detail(
  function _resolve_workspace_path (line 82) | def _resolve_workspace_path(workspace_dir: Path, rel_path: str) -> Path ...
  function _excerpt_content (line 92) | def _excerpt_content(content: str, *, excerpt_lines: int) -> str:
  function _top_evidence_cards (line 104) | def _top_evidence_cards(workspace: EvidenceWorkspace, *, role: str) -> l...

FILE: autocontext/src/autocontext/evidence/materializer.py
  function materialize_workspace (line 36) | def materialize_workspace(
  function _compute_source_signature (line 133) | def _compute_source_signature(
  function _load_cached_workspace (line 156) | def _load_cached_workspace(workspace_dir: Path, *, source_signature: str...
  function _refresh_cached_workspace_after_secret_scan (line 187) | def _refresh_cached_workspace_after_secret_scan(
  function _apply_secret_scan (line 199) | def _apply_secret_scan(
  function _cleanup_previous_workspace (line 244) | def _cleanup_previous_workspace(workspace_dir: Path) -> None:
  function _resolve_workspace_path (line 275) | def _resolve_workspace_path(workspace_dir: Path, rel_path: str) -> Path ...
  function _scan_run_artifacts (line 285) | def _scan_run_artifacts(run_dir: Path, run_id: str) -> list[EvidenceArti...
  function _scan_knowledge_artifacts (line 314) | def _scan_knowledge_artifacts(knowledge_dir: Path, scenario_name: str) -...
  function _classify_file (line 383) | def _classify_file(path: Path, root: Path) -> str | None:
  function _extract_generation (line 403) | def _extract_generation(path: Path) -> int | None:
  function _make_id (line 417) | def _make_id(source: str, path: Path) -> str:

FILE: autocontext/src/autocontext/evidence/tracker.py
  function record_access (line 15) | def record_access(workspace: EvidenceWorkspace, artifact_id: str) -> None:
  function save_access_log (line 21) | def save_access_log(workspace: EvidenceWorkspace) -> None:
  function load_access_log (line 30) | def load_access_log(workspace_dir: str) -> list[str]:
  function compute_utilization (line 47) | def compute_utilization(workspace: EvidenceWorkspace) -> dict[str, Any]:

FILE: autocontext/src/autocontext/evidence/workspace.py
  class EvidenceArtifact (line 10) | class EvidenceArtifact:
    method to_dict (line 23) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 37) | def from_dict(cls, data: dict[str, Any]) -> EvidenceArtifact:
  class EvidenceWorkspace (line 52) | class EvidenceWorkspace:
    method get_artifact (line 64) | def get_artifact(self, artifact_id: str) -> EvidenceArtifact | None:
    method list_by_kind (line 70) | def list_by_kind(self, kind: str) -> list[EvidenceArtifact]:
    method to_dict (line 73) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 86) | def from_dict(cls, data: dict[str, Any]) -> EvidenceWorkspace:

FILE: autocontext/src/autocontext/execution/action_filter.py
  class ActionFilterHarness (line 24) | class ActionFilterHarness:
    method __init__ (line 27) | def __init__(
    method get_legal_actions (line 35) | def get_legal_actions(self, state: Mapping[str, Any]) -> list[dict[str...
    method format_action_prompt (line 47) | def format_action_prompt(self, actions: list[dict[str, Any]]) -> str:
    method parse_action_selection (line 88) | def parse_action_selection(
    method verify_action (line 122) | def verify_action(
    method get_verify_feedback (line 134) | def get_verify_feedback(
    method _get_harness_actions (line 150) | def _get_harness_actions(self, state: Mapping[str, Any]) -> list[dict[...
    method _is_continuous_param_space (line 167) | def _is_continuous_param_space(actions: list[dict[str, Any]]) -> bool:
    method _parse_continuous_selection (line 182) | def _parse_continuous_selection(
    method _extract_json_object (line 207) | def _extract_json_object(response: str) -> dict[str, Any] | None:

FILE: autocontext/src/autocontext/execution/agent_task_evolution.py
  class AgentTaskGenerationState (line 15) | class AgentTaskGenerationState(BaseModel):
    method to_dict (line 26) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 30) | def from_dict(cls, data: dict[str, Any]) -> AgentTaskGenerationState:
  class AgentTaskGenerationEvaluation (line 35) | class AgentTaskGenerationEvaluation:
  function accumulate_lessons (line 47) | def accumulate_lessons(
  function build_enriched_prompt (line 87) | def build_enriched_prompt(
  class AgentTaskTrajectory (line 122) | class AgentTaskTrajectory(BaseModel):
    method cold_vs_warm_summary (line 134) | def cold_vs_warm_summary(self) -> str:
    method to_dict (line 149) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 153) | def from_dict(cls, data: dict[str, Any]) -> AgentTaskTrajectory:
  class ScenarioFamilyGuide (line 157) | class ScenarioFamilyGuide:
    method __init__ (line 160) | def __init__(self) -> None:
    method to_markdown (line 201) | def to_markdown(self) -> str:
  class AgentTaskEvolutionRunner (line 214) | class AgentTaskEvolutionRunner:
    method __init__ (line 217) | def __init__(
    method run_generation (line 231) | def run_generation(
    method run_with_state (line 299) | def run_with_state(
    method run (line 340) | def run(self, num_generations: int = 10) -> AgentTaskTrajectory:

FILE: autocontext/src/autocontext/execution/ast_safety.py
  class AstSafetyVisitor (line 26) | class AstSafetyVisitor(ast.NodeVisitor):
    method __init__ (line 29) | def __init__(self) -> None:
    method visit_Import (line 32) | def visit_Import(self, node: ast.Import) -> None:  # noqa: N802
    method visit_ImportFrom (line 37) | def visit_ImportFrom(self, node: ast.ImportFrom) -> None:  # noqa: N802
    method visit_Attribute (line 42) | def visit_Attribute(self, node: ast.Attribute) -> None:  # noqa: N802
    method visit_Name (line 47) | def visit_Name(self, node: ast.Name) -> None:  # noqa: N802
    method visit_Call (line 52) | def visit_Call(self, node: ast.Call) -> None:  # noqa: N802
  function check_ast_safety (line 59) | def check_ast_safety(source: str) -> list[str]:

FILE: autocontext/src/autocontext/execution/bias_probes.py
  class BiasProbeResult (line 13) | class BiasProbeResult(BaseModel):
    method to_dict (line 21) | def to_dict(self) -> dict[str, Any]:
  class BiasReport (line 25) | class BiasReport(BaseModel):
    method bias_types_detected (line 34) | def bias_types_detected(self) -> list[str]:
    method to_dict (line 38) | def to_dict(self) -> dict[str, Any]:
  function run_position_bias_probe (line 42) | def run_position_bias_probe(

FILE: autocontext/src/autocontext/execution/evaluator_guardrail.py
  class EvaluatorGuardrailResult (line 22) | class EvaluatorGuardrailResult(BaseModel):
    method to_dict (line 32) | def to_dict(self) -> dict[str, Any]:
  function evaluate_evaluator_guardrail (line 36) | def evaluate_evaluator_guardrail(

FILE: autocontext/src/autocontext/execution/executors/base.py
  class ExecutionEngine (line 9) | class ExecutionEngine(Protocol):
    method execute (line 10) | def execute(

FILE: autocontext/src/autocontext/execution/executors/gondolin_contract.py
  class GondolinSecretRef (line 18) | class GondolinSecretRef:
  class GondolinSandboxPolicy (line 26) | class GondolinSandboxPolicy:
  class GondolinExecutionRequest (line 38) | class GondolinExecutionRequest:
  class GondolinExecutionResult (line 48) | class GondolinExecutionResult:
  class GondolinBackend (line 57) | class GondolinBackend(Protocol):
    method execute (line 60) | def execute(self, request: GondolinExecutionRequest) -> GondolinExecut...

FILE: autocontext/src/autocontext/execution/executors/local.py
  function _load_scenario_module (line 15) | def _load_scenario_module(scenario_module: str, scenario_source_path: st...
  function _execute_in_subprocess (line 24) | def _execute_in_subprocess(
  class LocalExecutor (line 43) | class LocalExecutor:
    method execute (line 44) | def execute(

FILE: autocontext/src/autocontext/execution/executors/monty.py
  function _create_monty (line 14) | def _create_monty(code: str, inputs: list[str], external_functions: list...
  class MontyExecutor (line 106) | class MontyExecutor:
    method __init__ (line 114) | def __init__(
    method build_eval_script (line 123) | def build_eval_script() -> str:
    method build_code_strategy_script (line 128) | def build_code_strategy_script(agent_code: str) -> str:
    method _build_dispatch (line 132) | def _build_dispatch(
    method _build_code_dispatch (line 162) | def _build_code_dispatch(
    method execute_code_strategy (line 190) | def execute_code_strategy(
    method execute (line 260) | def execute(

FILE: autocontext/src/autocontext/execution/executors/primeintellect.py
  class PrimeIntellectExecutor (line 10) | class PrimeIntellectExecutor:
    method __init__ (line 11) | def __init__(
    method execute (line 21) | def execute(

FILE: autocontext/src/autocontext/execution/executors/ssh.py
  class SSHExecutor (line 23) | class SSHExecutor:
    method __init__ (line 30) | def __init__(
    method execute (line 45) | def execute(
    method _build_eval_command (line 90) | def _build_eval_command(
    method _execute_local_fallback (line 117) | def _execute_local_fallback(

FILE: autocontext/src/autocontext/execution/harness_coverage.py
  class HarnessCoverage (line 18) | class HarnessCoverage:
  class HarnessCoverageAnalyzer (line 30) | class HarnessCoverageAnalyzer:
    method analyze (line 45) | def analyze(
    method recommend_model_tier (line 83) | def recommend_model_tier(self, coverage: HarnessCoverage) -> str:

FILE: autocontext/src/autocontext/execution/harness_loader.py
  class _HarnessTimeout (line 35) | class _HarnessTimeout(Exception):
  function _run_with_timeout (line 39) | def _run_with_timeout(fn: Callable[[], Any], timeout_seconds: float) -> ...
  class HarnessValidationResult (line 68) | class HarnessValidationResult:
  function _exec_harness_source (line 76) | def _exec_harness_source(source: str, namespace: dict[str, Any]) -> None:
  class HarnessLoader (line 89) | class HarnessLoader:
    method __init__ (line 92) | def __init__(self, harness_dir: Path, *, timeout_seconds: float = 5.0)...
    method load (line 98) | def load(self) -> list[str]:
    method validate_strategy (line 157) | def validate_strategy(self, strategy: dict[str, Any], scenario: Any) -...
    method get_callable (line 183) | def get_callable(self, file_name: str, fn_name: str) -> Callable[..., ...
    method has_callable (line 188) | def has_callable(self, file_name: str, fn_name: str) -> bool:
    method loaded_names (line 193) | def loaded_names(self) -> list[str]:

FILE: autocontext/src/autocontext/execution/harness_synthesizer.py
  class SynthesisResult (line 23) | class SynthesisResult:
  class HarnessSynthesizer (line 33) | class HarnessSynthesizer:
    method __init__ (line 50) | def __init__(
    method synthesize (line 66) | def synthesize(
    method _generate_initial (line 165) | def _generate_initial(self, target_functions: list[str]) -> str:
    method _refine (line 195) | def _refine(self, current_source: str, failure_context: str, target_fu...
    method _write_output (line 223) | def _write_output(source: str, output_dir: Path) -> None:
  function _extract_python_code (line 231) | def _extract_python_code(text: str) -> str | None:

FILE: autocontext/src/autocontext/execution/harness_tester.py
  class HarnessTestFailure (line 26) | class HarnessTestFailure:
  class HarnessTestReport (line 38) | class HarnessTestReport:
  class HarnessTester (line 49) | class HarnessTester:
    method __init__ (line 63) | def __init__(
    method test_harness (line 74) | def test_harness(
    method _sample_diverse_failures (line 239) | def _sample_diverse_failures(self, failures: list[HarnessTestFailure])...
    method _make_blanket_failures (line 292) | def _make_blanket_failures(
  function _test_single_state (line 313) | def _test_single_state(
  function _actions_match (line 441) | def _actions_match(expected: list[dict[str, Any]], actual: Any) -> bool:
  function _normalize_action (line 452) | def _normalize_action(value: Any) -> Any:
  function _validation_result_is_valid (line 461) | def _validation_result_is_valid(result: Any) -> bool:
  function _example_strategy_from_sample (line 472) | def _example_strategy_from_sample(sample: SampleState, scenario: Any | N...
  function _strategy_is_valid (line 505) | def _strategy_is_valid(sample: SampleState, scenario: Any | None, strate...

FILE: autocontext/src/autocontext/execution/improvement_events.py
  class ImprovementLoopEvent (line 19) | class ImprovementLoopEvent:

FILE: autocontext/src/autocontext/execution/improvement_loop.py
  function _is_parse_failure (line 45) | def _is_parse_failure(score: float, reasoning: str) -> bool:
  class RoundResult (line 53) | class RoundResult:
  class ImprovementResult (line 69) | class ImprovementResult:
    method improved (line 89) | def improved(self) -> bool:
  class ImprovementLoop (line 99) | class ImprovementLoop:
    method __init__ (line 109) | def __init__(
    method run (line 144) | def run(

FILE: autocontext/src/autocontext/execution/judge.py
  class DisagreementMetrics (line 25) | class DisagreementMetrics(BaseModel):
    method to_dict (line 35) | def to_dict(self) -> dict[str, Any]:
  class JudgeResult (line 40) | class JudgeResult:
  function _coerce_float (line 60) | def _coerce_float(value: Any, default: float) -> float:
  function _detect_generated_dimensions (line 67) | def _detect_generated_dimensions(dimension_keys: list[str], rubric: str)...
  function _looks_like_dual_section_escape (line 92) | def _looks_like_dual_section_escape(agent_output: str) -> bool:
  function _apply_same_span_contradiction_guardrail (line 118) | def _apply_same_span_contradiction_guardrail(
  class LLMJudge (line 151) | class LLMJudge:
    method __init__ (line 158) | def __init__(
    method rubric_warnings (line 196) | def rubric_warnings(self) -> list[str]:
    method evaluate (line 200) | def evaluate(
    method _build_judge_prompt (line 371) | def _build_judge_prompt(
    method _parse_judge_response (line 422) | def _parse_judge_response(self, response: str) -> tuple[float, str, di...
    method _try_marker_parse (line 454) | def _try_marker_parse(response: str) -> dict | None:
    method _try_code_block_parse (line 470) | def _try_code_block_parse(response: str) -> dict | None:
    method _try_raw_json_parse (line 483) | def _try_raw_json_parse(response: str) -> dict | None:
    method _try_plaintext_parse (line 504) | def _try_plaintext_parse(response: str) -> tuple[float, str, dict[str,...
    method _extract_from_dict (line 526) | def _extract_from_dict(

FILE: autocontext/src/autocontext/execution/judge_executor.py
  class JudgeExecutor (line 6) | class JudgeExecutor:
    method __init__ (line 9) | def __init__(self, task: AgentTaskInterface) -> None:
    method execute (line 12) | def execute(

FILE: autocontext/src/autocontext/execution/objective_verification.py
  class GroundTruthItem (line 27) | class GroundTruthItem(BaseModel):
    method to_dict (line 52) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 56) | def from_dict(cls, data: dict[str, Any]) -> GroundTruthItem:
  class ItemMatchDetail (line 60) | class ItemMatchDetail(BaseModel):
    method to_dict (line 69) | def to_dict(self) -> dict[str, Any]:
  class OracleResult (line 73) | class OracleResult(BaseModel):
    method to_dict (line 86) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 90) | def from_dict(cls, data: dict[str, Any]) -> OracleResult:
  class OracleComparison (line 94) | class OracleComparison(BaseModel):
    method summary (line 105) | def summary(self) -> str:
    method to_dict (line 117) | def to_dict(self) -> dict[str, Any]:
  class ObjectiveVerificationConfig (line 121) | class ObjectiveVerificationConfig(BaseModel):
    method to_dict (line 128) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 132) | def from_dict(cls, data: dict[str, Any]) -> ObjectiveVerificationConfig:
    method build_oracle (line 135) | def build_oracle(self) -> KeywordMatchOracle:
  class ObjectiveOracle (line 140) | class ObjectiveOracle(ABC):
    method evaluate (line 144) | def evaluate(self, output: str) -> OracleResult:
  class KeywordMatchOracle (line 157) | class KeywordMatchOracle(ObjectiveOracle):
    method __init__ (line 165) | def __init__(
    method evaluate (line 176) | def evaluate(self, output: str) -> OracleResult:
    method _find_item_in_output (line 226) | def _find_item_in_output(
    method _all_groups_match (line 239) | def _all_groups_match(keyword_groups: list[list[str]], text: str) -> b...
    method _check_weight_near (line 246) | def _check_weight_near(self, weight: str, lines: list[str], line_idx: ...
    method _count_claims (line 256) | def _count_claims(self, output: str) -> int:
    method _estimate_claims (line 266) | def _estimate_claims(output: str) -> int:
  function compare_oracle_vs_rubric (line 285) | def compare_oracle_vs_rubric(
  function run_objective_verification (line 308) | def run_objective_verification(

FILE: autocontext/src/autocontext/execution/output_cleaner.py
  function _strip_markdown_fence_wrapper (line 13) | def _strip_markdown_fence_wrapper(text: str) -> str:
  function _strip_last_section (line 48) | def _strip_last_section(text: str, header: str) -> str:
  function clean_revision_output (line 63) | def clean_revision_output(output: str) -> str:

FILE: autocontext/src/autocontext/execution/output_verifier.py
  class VerifyResult (line 40) | class VerifyResult:
    method message (line 52) | def message(self) -> str:
  class OutputVerifier (line 68) | class OutputVerifier:
    method __init__ (line 83) | def __init__(
    method enabled (line 107) | def enabled(self) -> bool:
    method run (line 111) | def run(self, output_text: str) -> VerifyResult:
    method _run_with_file (line 138) | def _run_with_file(self, output_text: str) -> VerifyResult:
    method _run_with_stdin (line 156) | def _run_with_stdin(self, output_text: str) -> VerifyResult:
    method _invoke (line 159) | def _invoke(self, argv: list[str], *, stdin_text: str | None) -> Verif...
  function make_verifier (line 205) | def make_verifier(
  function make_checkpointer (line 231) | def make_checkpointer(

FILE: autocontext/src/autocontext/execution/phased_execution.py
  class PhaseBudget (line 33) | class PhaseBudget:
  class PhaseResult (line 40) | class PhaseResult(BaseModel):
    method to_dict (line 51) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 55) | def from_dict(cls, data: dict[str, Any]) -> PhaseResult:
  class PhasedExecutionPlan (line 60) | class PhasedExecutionPlan:
  class PhasedExecutionResult (line 68) | class PhasedExecutionResult(BaseModel):
    method to_dict (line 75) | def to_dict(self) -> dict[str, Any]:
    method all_completed (line 83) | def all_completed(self) -> bool:
    method failed_phase (line 87) | def failed_phase(self) -> str | None:
    method completed_phases (line 94) | def completed_phases(self) -> int:
    method from_dict (line 98) | def from_dict(cls, data: dict[str, Any]) -> PhasedExecutionResult:
  class PhaseTimer (line 102) | class PhaseTimer:
    method __init__ (line 105) | def __init__(self, budget_seconds: float) -> None:
    method start (line 110) | def start(self) -> None:
    method stop (line 114) | def stop(self) -> None:
    method elapsed (line 117) | def elapsed(self) -> float:
    method remaining (line 123) | def remaining(self) -> float:
    method is_expired (line 126) | def is_expired(self) -> bool:
  function split_budget (line 130) | def split_budget(
  class PhasedRunner (line 159) | class PhasedRunner:
    method run_phase (line 162) | def run_phase(
    method run_all (line 231) | def run_all(

FILE: autocontext/src/autocontext/execution/policy_executor.py
  class PolicyMatchResult (line 36) | class PolicyMatchResult:
  class _PolicyTimeout (line 48) | class _PolicyTimeout(Exception):
  function _run_with_timeout (line 52) | def _run_with_timeout(fn: Callable[[], Any], timeout_seconds: float) -> ...
  function _exec_policy_source (line 82) | def _exec_policy_source(source: str, namespace: dict[str, Any]) -> None:
  class PolicyExecutor (line 93) | class PolicyExecutor:
    method __init__ (line 105) | def __init__(
    method _build_namespace (line 118) | def _build_namespace(self) -> dict[str, Any]:
    method _compile_policy (line 129) | def _compile_policy(self, policy_source: str) -> tuple[Callable[..., d...
    method _execute_single_match (line 155) | def _execute_single_match(
    method execute_match (line 255) | def execute_match(self, policy_source: str, seed: int | None = None) -...
    method execute_batch (line 296) | def execute_batch(

FILE: autocontext/src/autocontext/execution/policy_refinement.py
  class PolicyIteration (line 26) | class PolicyIteration:
  class PolicyRefinementResult (line 38) | class PolicyRefinementResult:
  function compute_heuristic (line 49) | def compute_heuristic(match_results: list[PolicyMatchResult]) -> float:
  function _extract_policy_from_response (line 64) | def _extract_policy_from_response(response_text: str) -> str:
  function _build_refinement_prompt (line 80) | def _build_refinement_prompt(
  function _format_score_history (line 129) | def _format_score_history(match_results: list[PolicyMatchResult], *, max...
  function _build_match_feedback (line 137) | def _build_match_feedback(match_results: list[PolicyMatchResult]) -> str:
  class PolicyRefinementLoop (line 158) | class PolicyRefinementLoop:
    method __init__ (line 170) | def __init__(
    method _evaluate_policy (line 192) | def _evaluate_policy(self, policy_source: str, iteration: int) -> tupl...
    method _refine_policy (line 199) | def _refine_policy(
    method _check_convergence (line 218) | def _check_convergence(self, heuristic_history: list[float]) -> bool:
    method refine (line 225) | def refine(self, initial_policy: str) -> PolicyRefinementResult:

FILE: autocontext/src/autocontext/execution/queued_task_browser_context.py
  class QueuedTaskBrowserContextService (line 15) | class QueuedTaskBrowserContextService(Protocol):
    method build_reference_context (line 18) | def build_reference_context(
  class SettingsBackedQueuedTaskBrowserContextService (line 28) | class SettingsBackedQueuedTaskBrowserContextService:
    method build_reference_context (line 33) | def build_reference_context(
  function create_queued_task_browser_context_service (line 51) | def create_queued_task_browser_context_service(
  function merge_queued_task_reference_context (line 58) | def merge_queued_task_reference_context(

FILE: autocontext/src/autocontext/execution/rubric_calibration.py
  class CalibrationAnchor (line 31) | class CalibrationAnchor(BaseModel):
    method to_dict (line 42) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 46) | def from_dict(cls, data: dict[str, Any]) -> CalibrationAnchor:
  class CalibrationSet (line 50) | class CalibrationSet(BaseModel):
    method score_bands (line 57) | def score_bands(self) -> dict[str, list[CalibrationAnchor]]:
    method to_dict (line 64) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 68) | def from_dict(cls, data: dict[str, Any]) -> CalibrationSet:
  class JudgeVarianceResult (line 72) | class JudgeVarianceResult(BaseModel):
    method to_dict (line 81) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 85) | def from_dict(cls, data: dict[str, Any]) -> JudgeVarianceResult:
  function measure_judge_variance (line 89) | def measure_judge_variance(scores: list[float]) -> JudgeVarianceResult:
  class AlignmentResult (line 108) | class AlignmentResult(BaseModel):
    method to_dict (line 117) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 121) | def from_dict(cls, data: dict[str, Any]) -> AlignmentResult:
  function _pearson_correlation (line 125) | def _pearson_correlation(xs: list[float], ys: list[float]) -> float:
  function compute_alignment (line 144) | def compute_alignment(
  class AlignmentTolerance (line 180) | class AlignmentTolerance(BaseModel):
    method default_for_domain (line 189) | def default_for_domain(cls, domain: str) -> AlignmentTolerance:
    method to_dict (line 213) | def to_dict(self) -> dict[str, Any]:
    method check (line 216) | def check(self, alignment: AlignmentResult) -> dict[str, Any]:
  class CalibrationReport (line 242) | class CalibrationReport(BaseModel):
    method summary (line 252) | def summary(self) -> str:
    method to_dict (line 265) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 269) | def from_dict(cls, data: dict[str, Any]) -> CalibrationReport:
  function _score_band_for_score (line 273) | def _score_band_for_score(score: float) -> str:
  function calibration_set_from_examples (line 283) | def calibration_set_from_examples(
  function _aggregate_variance (line 318) | def _aggregate_variance(results: list[JudgeVarianceResult]) -> JudgeVari...
  function run_judge_calibration (line 332) | def run_judge_calibration(

FILE: autocontext/src/autocontext/execution/rubric_coherence.py
  class RubricCoherenceResult (line 8) | class RubricCoherenceResult:
  function _has_pattern (line 15) | def _has_pattern(lower: str, patterns: tuple[str, ...]) -> bool:
  function _allows_separate_depth_and_accessibility (line 19) | def _allows_separate_depth_and_accessibility(lower: str) -> bool:
  function check_rubric_coherence (line 35) | def check_rubric_coherence(rubric: str) -> RubricCoherenceResult:

FILE: autocontext/src/autocontext/execution/sample_states.py
  class SampleState (line 21) | class SampleState:
  function _classify_phase (line 30) | def _classify_phase(turn: int, max_turn: int) -> str:
  class SampleStateGenerator (line 42) | class SampleStateGenerator:
    method __init__ (line 53) | def __init__(self, scenario: ScenarioInterface, n_states: int = 50) ->...
    method generate (line 61) | def generate(self) -> list[SampleState]:
    method generate_with_ground_truth (line 68) | def generate_with_ground_truth(self) -> list[SampleState]:
    method _collect_states (line 81) | def _collect_states(self, *, include_ground_truth: bool) -> list[Sampl...
    method _simulate_game (line 127) | def _simulate_game(self, seed: int) -> list[dict[str, Any]]:
    method _random_actions (line 157) | def _random_actions(self, state: dict[str, Any], rng: random.Random) -...
    method _is_valid_action (line 193) | def _is_valid_action(self, state: dict[str, Any], actions: dict[str, A...

FILE: autocontext/src/autocontext/execution/simple_agent_task_workflow.py
  function generate_simple_agent_task_output (line 9) | def generate_simple_agent_task_output(
  function revise_simple_agent_task_output (line 30) | def revise_simple_agent_task_output(
  function build_simple_agent_task_user_prompt (line 64) | def build_simple_agent_task_user_prompt(
  function build_simple_agent_task_revision_prompt (line 79) | def build_simple_agent_task_revision_prompt(
  function _build_reference_context_block (line 108) | def _build_reference_context_block(reference_context: str | None) -> str:
  function _build_required_concepts_block (line 115) | def _build_required_concepts_block(required_concepts: list[str] | None) ...
  function _build_objective_feedback_block (line 123) | def _build_objective_feedback_block(objective_feedback: str | None) -> str:

FILE: autocontext/src/autocontext/execution/strategy_validator.py
  class ValidationResult (line 19) | class ValidationResult:
  class StrategyValidator (line 27) | class StrategyValidator:
    method __init__ (line 30) | def __init__(self, scenario: ScenarioInterface, settings: AppSettings)...
    method validate (line 34) | def validate(self, strategy: dict[str, Any]) -> ValidationResult:
    method format_revision_prompt (line 59) | def format_revision_prompt(self, result: ValidationResult, original_st...

FILE: autocontext/src/autocontext/execution/supervisor.py
  class ExecutionInput (line 11) | class ExecutionInput:
  class ExecutionOutput (line 18) | class ExecutionOutput:
  class ExecutionSupervisor (line 23) | class ExecutionSupervisor:
    method __init__ (line 26) | def __init__(self, executor: ExecutionEngine | None = None) -> None:
    method run (line 29) | def run(self, scenario: ScenarioInterface, payload: ExecutionInput) ->...

FILE: autocontext/src/autocontext/execution/task_queue_store.py
  class TaskQueueStore (line 17) | class TaskQueueStore(Protocol):
    method dequeue_task (line 20) | def dequeue_task(self) -> TaskQueueRow | None:
    method get_task (line 23) | def get_task(self, task_id: str) -> TaskQueueRow | None:
    method complete_task (line 26) | def complete_task(
    method fail_task (line 37) | def fail_task(self, task_id: str, error: str) -> None:
    method get_calibration_examples (line 40) | def get_calibration_examples(self, scenario_name: str, limit: int = 5)...
  class TaskQueueEnqueueStore (line 45) | class TaskQueueEnqueueStore(TaskQueueStore, Protocol):
    method enqueue_task (line 48) | def enqueue_task(

FILE: autocontext/src/autocontext/execution/task_runner.py
  class TaskConfig (line 57) | class TaskConfig:
    method from_json (line 79) | def from_json(cls, data: str | None) -> TaskConfig:
  function _serialize_result (line 104) | def _serialize_result(
  function _serialize_evolution_result (line 149) | def _serialize_evolution_result(
  function _build_objective_payload (line 228) | def _build_objective_payload(
  function _build_objective_revision_feedback (line 260) | def _build_objective_revision_feedback(
  function _build_objective_guardrail_payload (line 278) | def _build_objective_guardrail_payload(
  function _build_evaluator_guardrail_payload (line 290) | def _build_evaluator_guardrail_payload(
  function _build_rubric_calibration_payload (line 310) | def _build_rubric_calibration_payload(
  class SimpleAgentTask (line 336) | class SimpleAgentTask(AgentTaskInterface):
    method __init__ (line 343) | def __init__(
    method get_task_prompt (line 365) | def get_task_prompt(self, state: dict) -> str:
    method get_rubric (line 368) | def get_rubric(self) -> str:
    method initial_state (line 371) | def initial_state(self, seed: int | None = None) -> dict:
    method describe_task (line 374) | def describe_task(self) -> str:
    method evaluate_output (line 377) | def evaluate_output(
    method generate_output (line 423) | def generate_output(self, state: dict) -> str:
    method revise_output (line 433) | def revise_output(self, output: str, judge_result: AgentTaskResult, st...
  class TaskRunner (line 453) | class TaskRunner:
    method __init__ (line 462) | def __init__(
    method run (line 484) | def run(self) -> int:
    method run_once (line 515) | def run_once(self) -> dict[str, Any] | None:
    method run_batch (line 524) | def run_batch(self, limit: int | None = None) -> int:
    method shutdown (line 563) | def shutdown(self) -> None:
    method _process_task (line 567) | def _process_task(self, task: dict[str, Any]) -> None:
    method _run_task_multi_generation (line 693) | def _run_task_multi_generation(
    method _resolve_reference_context (line 840) | def _resolve_reference_context(self, task_id: str, config: TaskConfig)...
    method _emit_completion_event (line 852) | def _emit_completion_event(
    method _emit_failure_event (line 873) | def _emit_failure_event(self, task_id: str, spec_name: str, error: str...
    method _setup_signals (line 889) | def _setup_signals(self) -> None:
    method _handle_signal (line 898) | def _handle_signal(self, signum: int, frame: Any) -> None:
    method _sleep (line 902) | def _sleep(self, seconds: float) -> None:
  function create_task_runner_from_settings (line 909) | def create_task_runner_from_settings(
  function enqueue_task (line 938) | def enqueue_task(

FILE: autocontext/src/autocontext/execution/trajectory_harness.py
  class PlaybookInspector (line 31) | class PlaybookInspector:
    method __init__ (line 34) | def __init__(
    method key_snapshots (line 42) | def key_snapshots(self) -> dict[str, str]:
    method growth_summary (line 52) | def growth_summary(self) -> dict[str, int]:
  class TrajectoryComparison (line 58) | class TrajectoryComparison(BaseModel):
    method summary (line 72) | def summary(self) -> str:
    method to_dict (line 84) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 88) | def from_dict(cls, data: dict[str, Any]) -> TrajectoryComparison:
  function validate_improvement (line 92) | def validate_improvement(
  class TrajectoryReport (line 136) | class TrajectoryReport:
    method mean_scores_per_generation (line 145) | def mean_scores_per_generation(self) -> list[float]:
    method compare (line 157) | def compare(self) -> TrajectoryComparison:
  class MultiSeedTrajectoryRunner (line 186) | class MultiSeedTrajectoryRunner:
    method __init__ (line 189) | def __init__(
    method _playbooks_by_generation (line 204) | def _playbooks_by_generation(trajectory: AgentTaskTrajectory) -> dict[...
    method run (line 215) | def run(

FILE: autocontext/src/autocontext/execution/verification_dataset.py
  class DatasetProvenance (line 34) | class DatasetProvenance(BaseModel):
    method to_dict (line 45) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 49) | def from_dict(cls, data: dict[str, Any]) -> DatasetProvenance:
  class VerificationDataset (line 53) | class VerificationDataset(BaseModel):
    method build_oracle (line 63) | def build_oracle(self) -> KeywordMatchOracle:
    method to_dict (line 68) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 72) | def from_dict(cls, data: dict[str, Any]) -> VerificationDataset:
  class DatasetRegistry (line 76) | class DatasetRegistry:
    method __init__ (line 79) | def __init__(self, root: Path) -> None:
    method _dataset_dir (line 83) | def _dataset_dir(self, dataset_id: str) -> Path:
    method _version_path (line 86) | def _version_path(self, dataset_id: str, version: str) -> Path:
    method register (line 90) | def register(self, dataset: VerificationDataset) -> Path:
    method load (line 106) | def load(self, dataset_id: str, version: str | None = None) -> Verific...
    method list_versions (line 130) | def list_versions(self, dataset_id: str) -> list[str]:
    method list_datasets (line 140) | def list_datasets(self) -> list[VerificationDataset]:
  class VerificationRunRecord (line 149) | class VerificationRunRecord(BaseModel):
    method to_dict (line 161) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 165) | def from_dict(cls, data: dict[str, Any]) -> VerificationRunRecord:
  class OracleRevisionFeedback (line 169) | class OracleRevisionFeedback(BaseModel):
    method to_dict (line 178) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 182) | def from_dict(cls, data: dict[str, Any]) -> OracleRevisionFeedback:
    method is_empty (line 185) | def is_empty(self) -> bool:
  function oracle_to_revision_feedback (line 193) | def oracle_to_revision_feedback(result: OracleResult) -> OracleRevisionF...
  function resolve_objective_verification_config (line 239) | def resolve_objective_verification_config(
  function enrich_objective_payload (line 283) | def enrich_objective_payload(

FILE: autocontext/src/autocontext/extensions/hooks.py
  class HookEvents (line 11) | class HookEvents(StrEnum):
  class HookResult (line 30) | class HookResult:
  class HookError (line 45) | class HookError:
  class HookEvent (line 54) | class HookEvent:
    method raise_if_blocked (line 64) | def raise_if_blocked(self) -> None:
  function event_name (line 72) | def event_name(value: HookEvents | str) -> str:
  function event_block_error (line 76) | def event_block_error(event: HookEvent) -> RuntimeError:
  function _handler_name (line 81) | def _handler_name(handler: HookHandler) -> str:
  class HookBus (line 89) | class HookBus:
    method __init__ (line 97) | def __init__(self, *, fail_fast: bool = False) -> None:
    method on (line 101) | def on(self, name: HookEvents | str, handler: HookHandler) -> HookHand...
    method has_handlers (line 105) | def has_handlers(self, name: HookEvents | str) -> bool:
    method emit (line 109) | def emit(
    method _apply_result (line 143) | def _apply_result(event: HookEvent, result: HookResult | Mapping[str, ...
  function get_current_hook_bus (line 164) | def get_current_hook_bus() -> HookBus | None:
  function active_hook_bus (line 169) | def active_hook_bus(hook_bus: HookBus | None) -> Iterator[None]:
  class ExtensionAPI (line 180) | class ExtensionAPI:
    method __init__ (line 183) | def __init__(self, bus: HookBus) -> None:
    method on (line 186) | def on(
    method emit (line 199) | def emit(

FILE: autocontext/src/autocontext/extensions/llm.py
  class HookedLanguageModelClient (line 12) | class HookedLanguageModelClient(LanguageModelClient):
    method __init__ (line 15) | def __init__(self, inner: LanguageModelClient, hook_bus: HookBus, *, p...
    method __getattr__ (line 20) | def __getattr__(self, name: str) -> Any:
    method generate (line 23) | def generate(
    method generate_multiturn (line 53) | def generate_multiturn(
    method _emit_response (line 86) | def _emit_response(self, response: ModelResponse, request: dict[str, A...
  class HookedLLMProvider (line 107) | class HookedLLMProvider(LLMProvider):
    method __init__ (line 110) | def __init__(
    method __getattr__ (line 123) | def __getattr__(self, name: str) -> Any:
    method complete (line 126) | def complete(
    method default_model (line 175) | def default_model(self) -> str:
    method name (line 179) | def name(self) -> str:
  function _message_list (line 183) | def _message_list(value: Any) -> list[dict[str, str]]:
  function _optional_str (line 195) | def _optional_str(value: Any) -> str | None:
  function _optional_float (line 201) | def _optional_float(value: Any) -> float | None:
  function _usage_dict (line 207) | def _usage_dict(value: Any) -> dict[str, int]:
  function _usage_from_payload (line 213) | def _usage_from_payload(default: RoleUsage, value: Any) -> RoleUsage:
  function wrap_language_model_client (line 224) | def wrap_language_model_client(
  function wrap_llm_provider (line 237) | def wrap_llm_provider(

FILE: autocontext/src/autocontext/extensions/loader.py
  function load_extensions (line 14) | def load_extensions(refs: str | Iterable[str], bus: HookBus) -> list[str]:
  function _split_refs (line 31) | def _split_refs(refs: str | Iterable[str]) -> list[str]:
  function _load_target (line 37) | def _load_target(ref: str) -> Any:
  function _load_module (line 52) | def _load_module(module_ref: str) -> ModuleType:
  function _invoke_extension (line 66) | def _invoke_extension(target: Any, api: ExtensionAPI) -> None:
  function _call (line 86) | def _call(func: Any, api: ExtensionAPI) -> Any:

FILE: autocontext/src/autocontext/harness/adapt/applicator.py
  function _parse_cadence (line 27) | def _parse_cadence(value: str) -> int | None:
  class ConfigApplicator (line 39) | class ConfigApplicator:
    method __init__ (line 42) | def __init__(self, audit_writer: AppendOnlyAuditWriter | None = None) ...
    method apply (line 45) | def apply(
    method _write_audit (line 150) | def _write_audit(self, result: AdaptationResult) -> None:

FILE: autocontext/src/autocontext/harness/adapt/types.py
  class AdaptationStatus (line 11) | class AdaptationStatus(StrEnum):
  class AdaptationResult (line 20) | class AdaptationResult:
    method now (line 33) | def now() -> str:
    method to_dict (line 36) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 49) | def from_dict(cls, data: dict[str, Any]) -> AdaptationResult:
  class AdaptationPolicy (line 63) | class AdaptationPolicy:

FILE: autocontext/src/autocontext/harness/audit/types.py
  class AuditCategory (line 11) | class AuditCategory(StrEnum):
  class AuditEntry (line 21) | class AuditEntry:
    method now (line 32) | def now() -> str:
    method to_dict (line 35) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 46) | def from_dict(cls, data: dict[str, Any]) -> AuditEntry:

FILE: autocontext/src/autocontext/harness/audit/writer.py
  class AppendOnlyAuditWriter (line 12) | class AppendOnlyAuditWriter:
    method __init__ (line 15) | def __init__(self, path: Path) -> None:
    method append (line 20) | def append(self, entry: AuditEntry) -> None:
    method read_all (line 29) | def read_all(self) -> list[AuditEntry]:
    method read (line 32) | def read(
    method count (line 51) | def count(self) -> int:
    method _read_lines (line 57) | def _read_lines(self) -> list[AuditEntry]:

FILE: autocontext/src/autocontext/harness/core/controller.py
  class LoopController (line 9) | class LoopController:
    method __init__ (line 12) | def __init__(self) -> None:
    method pause (line 21) | def pause(self) -> None:
    method resume (line 24) | def resume(self) -> None:
    method is_paused (line 27) | def is_paused(self) -> bool:
    method wait_if_paused (line 30) | def wait_if_paused(self) -> None:
    method set_gate_override (line 34) | def set_gate_override(self, decision: str) -> None:
    method take_gate_override (line 38) | def take_gate_override(self) -> str | None:
    method inject_hint (line 44) | def inject_hint(self, text: str) -> None:
    method take_hint (line 48) | def take_hint(self) -> str | None:
    method submit_chat (line 54) | def submit_chat(self, role: str, message: str) -> str:
    method poll_chat (line 60) | def poll_chat(self) -> tuple[str, str] | None:
    method respond_chat (line 67) | def respond_chat(self, role: str, response: str) -> None:

FILE: autocontext/src/autocontext/harness/core/events.py
  class EventStreamEmitter (line 18) | class EventStreamEmitter:
    method __init__ (line 19) | def __init__(self, path: Path) -> None:
    method subscribe (line 25) | def subscribe(self, callback: EventCallback) -> None:
    method unsubscribe (line 29) | def unsubscribe(self, callback: EventCallback) -> None:
    method emit (line 33) | def emit(self, event: str, payload: dict[str, Any], channel: str = "ge...

FILE: autocontext/src/autocontext/harness/core/llm_client.py
  class LanguageModelClient (line 8) | class LanguageModelClient:
    method generate (line 9) | def generate(
    method generate_multiturn (line 20) | def generate_multiturn(

FILE: autocontext/src/autocontext/harness/core/output_parser.py
  function strip_json_fences (line 13) | def strip_json_fences(text: str) -> str:
  function extract_json (line 19) | def extract_json(text: str) -> dict[str, Any]:
  function extract_tagged_content (line 28) | def extract_tagged_content(text: str, tag: str) -> str | None:
  function extract_delimited_section (line 35) | def extract_delimited_section(text: str, start_marker: str, end_marker: ...

FILE: autocontext/src/autocontext/harness/core/subagent.py
  class SubagentTask (line 13) | class SubagentTask:
  class SubagentRuntime (line 21) | class SubagentRuntime:
    method __init__ (line 24) | def __init__(self, client: LanguageModelClient) -> None:
    method run_task (line 27) | def run_task(self, task: SubagentTask) -> RoleExecution:

FILE: autocontext/src/autocontext/harness/core/types.py
  class RoleUsage (line 10) | class RoleUsage:
  class RoleExecution (line 18) | class RoleExecution:
  class ModelResponse (line 28) | class ModelResponse:

FILE: autocontext/src/autocontext/harness/cost/calculator.py
  class CostCalculator (line 18) | class CostCalculator:
    method __init__ (line 21) | def __init__(
    method calculate (line 30) | def calculate(self, model: str, input_tokens: int, output_tokens: int)...
    method from_usage (line 43) | def from_usage(self, usage: RoleUsage) -> CostRecord:
    method calculate_batch (line 46) | def calculate_batch(self, usages: list[RoleUsage]) -> list[CostRecord]:

FILE: autocontext/src/autocontext/harness/cost/tracker.py
  class CostTracker (line 12) | class CostTracker:
    method __init__ (line 15) | def __init__(
    method record (line 28) | def record(self, usage: RoleUsage, role: str, generation: int | None =...
    method cost_by_role (line 43) | def cost_by_role(self) -> dict[str, float]:
    method cost_by_model (line 50) | def cost_by_model(self) -> dict[str, float]:
    method cost_per_generation (line 57) | def cost_per_generation(self) -> list[tuple[int, float]]:
    method summary (line 65) | def summary(self) -> CostSummary:
    method reset (line 70) | def reset(self) -> None:

FILE: autocontext/src/autocontext/harness/cost/types.py
  class ModelPricing (line 9) | class ModelPricing:
  class CostRecord (line 17) | class CostRecord:
    method to_dict (line 26) | def to_dict(self) -> dict[str, Any]:
  class CostSummary (line 38) | class CostSummary:
    method from_records (line 47) | def from_records(cls, records: list[CostRecord]) -> CostSummary:

FILE: autocontext/src/autocontext/harness/evaluation/dimensional.py
  class ScoringDimension (line 22) | class ScoringDimension(BaseModel):
    method to_dict (line 29) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 33) | def from_dict(cls, data: dict[str, Any]) -> ScoringDimension:
  class DimensionalScore (line 37) | class DimensionalScore(BaseModel):
    method weighted_aggregate (line 44) | def weighted_aggregate(self, dimension_specs: Sequence[ScoringDimensio...
    method to_dict (line 55) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 59) | def from_dict(cls, data: dict[str, Any]) -> DimensionalScore:
  function normalize_dimension_specs (line 63) | def normalize_dimension_specs(
  function extract_dimension_scores (line 72) | def extract_dimension_scores(
  function detect_dimension_regression (line 85) | def detect_dimension_regression(
  function format_dimension_trajectory (line 109) | def format_dimension_trajectory(

FILE: autocontext/src/autocontext/harness/evaluation/failure_report.py
  class MatchDiagnosis (line 16) | class MatchDiagnosis:
  class FailureReport (line 28) | class FailureReport:
    method from_tournament (line 40) | def from_tournament(
    method to_prompt_context (line 72) | def to_prompt_context(self) -> str:

FILE: autocontext/src/autocontext/harness/evaluation/protocol.py
  class Evaluator (line 11) | class Evaluator(Protocol):
    method evaluate (line 12) | def evaluate(

FILE: autocontext/src/autocontext/harness/evaluation/runner.py
  function _comparative_score (line 15) | def _comparative_score(candidate_score: float, opponent_score: float) ->...
  class EvaluationRunner (line 19) | class EvaluationRunner:
    method __init__ (line 20) | def __init__(
    method run (line 32) | def run(

FILE: autocontext/src/autocontext/harness/evaluation/scenario_evaluator.py
  class ScenarioEvaluator (line 15) | class ScenarioEvaluator:
    method __init__ (line 22) | def __init__(self, scenario: Any, supervisor: Any, hook_bus: HookBus |...
    method evaluate (line 27) | def evaluate(

FILE: autocontext/src/autocontext/harness/evaluation/self_play.py
  class SelfPlayOpponent (line 22) | class SelfPlayOpponent(BaseModel):
    method to_dict (line 31) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 35) | def from_dict(cls, data: dict[str, Any]) -> SelfPlayOpponent:
  class SelfPlayConfig (line 39) | class SelfPlayConfig(BaseModel):
    method to_dict (line 46) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 50) | def from_dict(cls, data: dict[str, Any]) -> SelfPlayConfig:
  class SelfPlayPool (line 54) | class SelfPlayPool:
    method __init__ (line 57) | def __init__(self, config: SelfPlayConfig) -> None:
    method add (line 61) | def add(self, opponent: SelfPlayOpponent) -> None:
    method get_opponents (line 71) | def get_opponents(self) -> list[SelfPlayOpponent]:
    method config (line 78) | def config(self) -> SelfPlayConfig:
    method size (line 82) | def size(self) -> int:
  function planned_self_play_trials (line 86) | def planned_self_play_trials(
  function load_self_play_pool (line 104) | def load_self_play_pool(
  function build_opponent_pool (line 155) | def build_opponent_pool(

FILE: autocontext/src/autocontext/harness/evaluation/types.py
  class EvaluationLimits (line 10) | class EvaluationLimits:
  class EvaluationResult (line 17) | class EvaluationResult:
  class EvaluationSummary (line 27) | class EvaluationSummary:

FILE: autocontext/src/autocontext/harness/meta/advisor.py
  class AdvisorConfig (line 20) | class AdvisorConfig:
  function _model_tier (line 29) | def _model_tier(model: str) -> int:
  function _cheaper_model (line 36) | def _cheaper_model(model: str) -> str | None:
  function _more_capable_model (line 43) | def _more_capable_model(model: str) -> str | None:
  class ConfigAdvisor (line 50) | class ConfigAdvisor:
    method __init__ (line 53) | def __init__(
    method recommend (line 63) | def recommend(self) -> list[ConfigRecommendation]:
    method summary (line 75) | def summary(self) -> str:
    method _check_model (line 88) | def _check_model(self, role: str, profile: RoleProfile) -> list[Config...
    method _check_cadence (line 135) | def _check_cadence(self, role: str, profile: RoleProfile) -> list[Conf...

FILE: autocontext/src/autocontext/harness/meta/collector.py
  class MetricsCollector (line 11) | class MetricsCollector:
    method __init__ (line 14) | def __init__(self) -> None:
    method add (line 18) | def add(self, metric: RoleMetric) -> None:
    method add_generation (line 22) | def add_generation(self, metrics: list[RoleMetric]) -> None:
    method for_role (line 26) | def for_role(self, role: str) -> list[RoleMetric]:
    method roles (line 33) | def roles(self) -> set[str]:
    method generation_count (line 37) | def generation_count(self) -> int:
    method latest_generation (line 41) | def latest_generation(self) -> int | None:
    method clear (line 47) | def clear(self) -> None:
    method save (line 51) | def save(self, path: Path) -> None:
    method load (line 70) | def load(cls, path: Path) -> MetricsCollector:

FILE: autocontext/src/autocontext/harness/meta/profiler.py
  class PerformanceProfiler (line 10) | class PerformanceProfiler:
    method __init__ (line 13) | def __init__(self, collector: MetricsCollector, min_observations: int ...
    method profile (line 17) | def profile(self, role: str) -> RoleProfile | None:
    method all_profiles (line 23) | def all_profiles(self) -> dict[str, RoleProfile]:
    method ranked_by_efficiency (line 31) | def ranked_by_efficiency(self) -> list[RoleProfile]:
    method ranked_by_cost (line 38) | def ranked_by_cost(self) -> list[RoleProfile]:
    method summary (line 42) | def summary(self) -> str:
    method _build_profile (line 60) | def _build_profile(role: str, observations: list[RoleMetric]) -> RoleP...

FILE: autocontext/src/autocontext/harness/meta/types.py
  class RoleMetric (line 8) | class RoleMetric:
    method total_tokens (line 21) | def total_tokens(self) -> int:
  class RoleProfile (line 26) | class RoleProfile:
  class ConfigRecommendation (line 40) | class ConfigRecommendation:

FILE: autocontext/src/autocontext/harness/meta_optimizer.py
  class MetaOptimizer (line 21) | class MetaOptimizer:
    method __init__ (line 24) | def __init__(
    method from_settings (line 39) | def from_settings(cls, settings: AppSettings) -> MetaOptimizer:
    method record_llm_call (line 75) | def record_llm_call(self, role: str, usage: RoleUsage, generation: int...
    method record_gate_decision (line 92) | def record_gate_decision(self, decision: str, delta: float, generation...
    method record_generation (line 104) | def record_generation(
    method cost_summary (line 130) | def cost_summary(self) -> CostSummary | None:
    method generation_costs (line 136) | def generation_costs(self) -> list[tuple[int, float]]:
    method profiles (line 142) | def profiles(self) -> dict[str, RoleProfile]:
    method recommendations (line 148) | def recommendations(self) -> list[ConfigRecommendation]:
    method report (line 154) | def report(self) -> str:

FILE: autocontext/src/autocontext/harness/mutations/applier.py
  function apply_mutations (line 8) | def apply_mutations(
  function get_active_completion_checks (line 32) | def get_active_completion_checks(mutations: list[HarnessMutation]) -> li...

FILE: autocontext/src/autocontext/harness/mutations/gate.py
  class GateResult (line 13) | class GateResult:
  function evaluate_mutation (line 20) | def evaluate_mutation(mutation: HarnessMutation) -> GateResult:

FILE: autocontext/src/autocontext/harness/mutations/parser.py
  function parse_mutations (line 18) | def parse_mutations(content: str) -> list[HarnessMutation]:

FILE: autocontext/src/autocontext/harness/mutations/spec.py
  class MutationType (line 11) | class MutationType(StrEnum):
  class HarnessMutation (line 19) | class HarnessMutation:
    method to_dict (line 32) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 46) | def from_dict(cls, data: dict[str, Any]) -> HarnessMutation:

FILE: autocontext/src/autocontext/harness/mutations/store.py
  class MutationStore (line 18) | class MutationStore:
    method __init__ (line 21) | def __init__(self, root: Path) -> None:
    method _scenario_dir (line 24) | def _scenario_dir(self, scenario_name: str) -> Path:
    method save (line 27) | def save(self, scenario_name: str, mutations: list[HarnessMutation]) -...
    method load (line 45) | def load(self, scenario_name: str) -> list[HarnessMutation]:
    method list_versions (line 56) | def list_versions(self, scenario_name: str) -> list[str]:
    method rollback (line 70) | def rollback(self, scenario_name: str) -> bool:

FILE: autocontext/src/autocontext/harness/optimizer/pareto.py
  class ActionableSideInfo (line 23) | class ActionableSideInfo:
    method to_dict (line 32) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 42) | def from_dict(cls, data: dict[str, Any]) -> ActionableSideInfo:
  class OptimizationObjective (line 53) | class OptimizationObjective:
    method is_better (line 59) | def is_better(self, a: float, b: float) -> bool:
  class Candidate (line 67) | class Candidate:
    method dominates (line 76) | def dominates(
  class ParetoFrontier (line 96) | class ParetoFrontier:
    method __init__ (line 99) | def __init__(self, objectives: list[OptimizationObjective]) -> None:
    method add (line 103) | def add(self, candidate: Candidate) -> bool:
    method candidates (line 119) | def candidates(self) -> list[Candidate]:
    method best_for (line 122) | def best_for(self, objective_name: str) -> Candidate | None:
  function merge_candidates (line 142) | def merge_candidates(a: Candidate, b: Candidate) -> Candidate:

FILE: autocontext/src/autocontext/harness/orchestration/dag.py
  class RoleDAG (line 8) | class RoleDAG:
    method __init__ (line 9) | def __init__(self, roles: list[RoleSpec]) -> None:
    method validate (line 13) | def validate(self) -> None:
    method execution_batches (line 24) | def execution_batches(self) -> list[list[str]]:
    method add_role (line 47) | def add_role(self, role: RoleSpec) -> None:
    method remove_role (line 67) | def remove_role(self, name: str) -> None:
    method roles (line 78) | def roles(self) -> dict[str, RoleSpec]:

FILE: autocontext/src/autocontext/harness/orchestration/engine.py
  class PipelineEngine (line 14) | class PipelineEngine:
    method __init__ (line 15) | def __init__(self, dag: RoleDAG, handler: RoleHandler, max_workers: in...
    method execute (line 20) | def execute(

FILE: autocontext/src/autocontext/harness/orchestration/types.py
  class RoleSpec (line 9) | class RoleSpec:
  class PipelineConfig (line 20) | class PipelineConfig:
    method __post_init__ (line 25) | def __post_init__(self) -> None:

FILE: autocontext/src/autocontext/harness/pipeline/advancement.py
  class AdvancementMetrics (line 27) | class AdvancementMetrics(BaseModel):
    method delta (line 48) | def delta(self) -> float:
    method to_dict (line 51) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 57) | def from_dict(cls, data: dict[str, Any]) -> AdvancementMetrics:
  class AdvancementRationale (line 61) | class AdvancementRationale(BaseModel):
    method to_dict (line 72) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 76) | def from_dict(cls, data: dict[str, Any]) -> AdvancementRationale:
  function evaluate_advancement (line 80) | def evaluate_advancement(

FILE: autocontext/src/autocontext/harness/pipeline/gate.py
  class GateDecision (line 9) | class GateDecision:
  class BackpressureGate (line 17) | class BackpressureGate:
    method __init__ (line 18) | def __init__(self, min_delta: float = 0.005) -> None:
    method evaluate (line 21) | def evaluate(self, previous_best: float, current_best: float, retry_co...

FILE: autocontext/src/autocontext/harness/pipeline/holdout.py
  class HoldoutPolicy (line 23) | class HoldoutPolicy(BaseModel):
    method to_dict (line 33) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 37) | def from_dict(cls, data: dict[str, Any]) -> HoldoutPolicy:
  class HoldoutResult (line 41) | class HoldoutResult(BaseModel):
    method to_dict (line 52) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 56) | def from_dict(cls, data: dict[str, Any]) -> HoldoutResult:
  function holdout_check (line 60) | def holdout_check(
  class HoldoutVerifier (line 120) | class HoldoutVerifier:
    method __init__ (line 123) | def __init__(
    method verify (line 131) | def verify(

FILE: autocontext/src/autocontext/harness/pipeline/objective_guardrail.py
  class ObjectiveGuardrailPolicy (line 23) | class ObjectiveGuardrailPolicy(BaseModel):
    method to_dict (line 33) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 37) | def from_dict(cls, data: dict[str, Any]) -> ObjectiveGuardrailPolicy:
  class GuardrailResult (line 41) | class GuardrailResult(BaseModel):
    method to_dict (line 50) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 54) | def from_dict(cls, data: dict[str, Any]) -> GuardrailResult:
  function check_objective_guardrail (line 58) | def check_objective_guardrail(
  function resolve_objective_guardrail_policy (line 121) | def resolve_objective_guardrail_policy(
  function evaluate_objective_guardrail (line 133) | def evaluate_objective_guardrail(
  class ForecastClaim (line 171) | class ForecastClaim:
  function settle_forecasts (line 181) | def settle_forecasts(claims: list[ForecastClaim]) -> dict[str, Any]:

FILE: autocontext/src/autocontext/harness/pipeline/retry_context.py
  class RetryContext (line 10) | class RetryContext:

FILE: autocontext/src/autocontext/harness/pipeline/trend_gate.py
  class ScoreHistory (line 11) | class ScoreHistory:
  class TrendAwareGate (line 16) | class TrendAwareGate:
    method __init__ (line 17) | def __init__(
    method evaluate (line 30) | def evaluate(

FILE: autocontext/src/autocontext/harness/pipeline/validity_gate.py
  class ValidityGateResult (line 22) | class ValidityGateResult:
  class ValidityGate (line 32) | class ValidityGate:
    method __init__ (line 41) | def __init__(
    method check (line 53) | def check(self, strategy: dict[str, Any], state: dict[str, Any] | None...
    method consume_retry (line 99) | def consume_retry(self) -> bool:
    method reset (line 109) | def reset(self) -> None:

FILE: autocontext/src/autocontext/harness/repl/monty_worker.py
  function _create_repl_monty (line 20) | def _create_repl_monty(code: str, inputs: list[str], external_functions:...
  function _stdlib_dispatch (line 57) | def _stdlib_dispatch(module_name: str, func_name: str, *args: Any) -> Any:
  function _rewrite_trailing_expr (line 85) | def _rewrite_trailing_expr(code: str) -> str:
  class MontyReplWorker (line 148) | class MontyReplWorker:
    method __init__ (line 157) | def __init__(
    method namespace (line 176) | def namespace(self) -> dict[str, Any]:
    method _separate_namespace (line 179) | def _separate_namespace(self) -> tuple[dict[str, Any], dict[str, Calla...
    method _build_dispatch (line 190) | def _build_dispatch(
    method run_code (line 212) | def run_code(self, command: ReplCommand) -> ReplResult:

FILE: autocontext/src/autocontext/harness/repl/session.py
  function _extract_code_block (line 73) | def _extract_code_block(text: str) -> str | None:
  function _extract_final_answer_marker (line 82) | def _extract_final_answer_marker(text: str) -> str | None:
  function _natural_closure_content (line 90) | def _natural_closure_content(text: str) -> str | None:
  function _is_read_only_code (line 98) | def _is_read_only_code(code: str) -> bool:
  function _set_answer_content (line 114) | def _set_answer_content(namespace: dict[str, Any], content: str) -> None:
  function _answer_content (line 122) | def _answer_content(namespace: dict[str, Any]) -> str:
  function _snapshot_value (line 130) | def _snapshot_value(value: Any) -> Any:
  function _progress_signature (line 154) | def _progress_signature(namespace: dict[str, Any]) -> str:
  function _turn_progress_signature (line 167) | def _turn_progress_signature(
  function make_llm_batch (line 184) | def make_llm_batch(
  class RlmSession (line 220) | class RlmSession:
    method __init__ (line 223) | def __init__(
    method run (line 248) | def run(self) -> RoleExecution:

FILE: autocontext/src/autocontext/harness/repl/types.py
  class ReplWorkerProtocol (line 10) | class ReplWorkerProtocol(Protocol):
    method namespace (line 14) | def namespace(self) -> dict[str, Any]: ...
    method run_code (line 16) | def run_code(self, command: ReplCommand) -> ReplResult: ...
  class ReplCommand (line 20) | class ReplCommand:
  class ReplResult (line 27) | class ReplResult:
  class ExecutionRecord (line 36) | class ExecutionRecord:
  class RlmContext (line 47) | class RlmContext:

FILE: autocontext/src/autocontext/harness/repl/worker.py
  function _peek (line 28) | def _peek(text: str, start: int = 0, length: int = 2000) -> str:
  function _grep (line 33) | def _grep(text: str, pattern: str, *, context: int = 0) -> list[str]:
  function _chunk_by_size (line 48) | def _chunk_by_size(text: str, size: int = 4000, overlap: int = 0) -> lis...
  function _chunk_by_headers (line 67) | def _chunk_by_headers(text: str, pattern: str = r"^#{1,3} ") -> list[dic...
  class CodeTimeout (line 116) | class CodeTimeout(BaseException):
  function _build_restricted_builtins (line 124) | def _build_restricted_builtins() -> dict[str, Any]:
  class ReplWorker (line 138) | class ReplWorker:
    method __init__ (line 150) | def __init__(
    method namespace (line 171) | def namespace(self) -> dict[str, Any]:
    method run_code (line 174) | def run_code(self, command: ReplCommand) -> ReplResult:
    method _execute_with_timeout (line 229) | def _execute_with_timeout(self, fn: Any) -> Any:
    method _timeout_via_signal (line 235) | def _timeout_via_signal(self, fn: Any) -> Any:
    method _timeout_via_thread (line 247) | def _timeout_via_thread(self, fn: Any) -> Any:

FILE: autocontext/src/autocontext/harness/scoring/backends.py
  function _normalize_score (line 31) | def _normalize_score(score: float) -> float:
  class TrialResult (line 35) | class TrialResult(BaseModel):
    method is_win (line 43) | def is_win(self, threshold: float = _WIN_THRESHOLD) -> bool:
    method to_dict (line 46) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 50) | def from_dict(cls, data: dict[str, Any]) -> TrialResult:
  class RatingUpdate (line 56) | class RatingUpdate:
  class ScoringBackend (line 67) | class ScoringBackend(ABC):
    method name (line 72) | def name(self) -> str:
    method default_uncertainty (line 76) | def default_uncertainty(self) -> float | None:
    method update (line 81) | def update(
  class EloBackend (line 90) | class EloBackend(ScoringBackend):
    method __init__ (line 93) | def __init__(self, k_factor: float = _ELO_K) -> None:
    method name (line 97) | def name(self) -> str:
    method update (line 100) | def update(
  class GlickoBackend (line 125) | class GlickoBackend(ScoringBackend):
    method __init__ (line 128) | def __init__(self, default_rd: float = 350.0) -> None:
    method name (line 132) | def name(self) -> str:
    method default_uncertainty (line 136) | def default_uncertainty(self) -> float | None:
    method update (line 139) | def update(
  function get_backend (line 185) | def get_backend(name: str) -> ScoringBackend:

FILE: autocontext/src/autocontext/harness/scoring/elo.py
  function expected_score (line 6) | def expected_score(player_rating: float, opponent_rating: float) -> float:
  function update_elo (line 10) | def update_elo(player_rating: float, opponent_rating: float, actual_scor...

FILE: autocontext/src/autocontext/harness/storage/versioned_store.py
  class VersionedFileStore (line 8) | class VersionedFileStore:
    method __init__ (line 11) | def __init__(
    method _versions_dir (line 25) | def _versions_dir(self, name: str) -> Path:
    method _version_glob (line 31) | def _version_glob(self) -> str:
    method _version_path (line 35) | def _version_path(self, versions_dir: Path, num: int) -> Path:
    method write (line 39) | def write(self, name: str, content: str) -> None:
    method read (line 53) | def read(self, name: str, default: str = "") -> str:
    method rollback (line 58) | def rollback(self, name: str) -> bool:
    method version_count (line 73) | def version_count(self, name: str) -> int:
    method read_version (line 80) | def read_version(self, name: str, version: int) -> str:
    method _prune (line 86) | def _prune(self, versions_dir: Path) -> None:

FILE: autocontext/src/autocontext/harness/validation/staged.py
  class StageStatus (line 26) | class StageStatus(StrEnum):
  class StageResult (line 35) | class StageResult:
    method passed (line 46) | def passed(self) -> bool:
  class ValidationStage (line 51) | class ValidationStage(ABC):
    method __init__ (line 59) | def __init__(self, order: int) -> None:
    method order (line 63) | def order(self) -> int:
    method name (line 69) | def name(self) -> str:
    method run (line 73) | def run(self, candidate: Any, scenario: Any) -> StageResult:
  class ValidationPipeline (line 85) | class ValidationPipeline:
    method __init__ (line 99) | def __init__(self, stages: list[ValidationStage]) -> None:
    method run (line 102) | def run(self, candidate: Any, scenario: Any) -> list[StageResult]:
    method all_passed (line 140) | def all_passed(results: Sequence[StageResult]) -> bool:
    method failed_stage (line 145) | def failed_stage(results: Sequence[StageResult]) -> str | None:

FILE: autocontext/src/autocontext/harness/validation/stages.py
  class SyntaxStage (line 34) | class SyntaxStage(ValidationStage):
    method name (line 38) | def name(self) -> str:
    method run (line 41) | def run(self, candidate: Any, scenario: Any) -> StageResult:
  class ContractStage (line 93) | class ContractStage(ValidationStage):
    method name (line 97) | def name(self) -> str:
    method run (line 100) | def run(self, candidate: Any, scenario: Any) -> StageResult:
  class DeterministicStage (line 151) | class DeterministicStage(ValidationStage):
    method __init__ (line 154) | def __init__(self, order: int, *, timeout_seconds: float = DEFAULT_STA...
    method name (line 159) | def name(self) -> str:
    method run (line 162) | def run(self, candidate: Any, scenario: Any) -> StageResult:
  class EdgeCaseStage (line 234) | class EdgeCaseStage(ValidationStage):
    method __init__ (line 237) | def __init__(self, order: int, *, timeout_seconds: float = DEFAULT_STA...
    method name (line 242) | def name(self) -> str:
    method run (line 245) | def run(self, candidate: Any, scenario: Any) -> StageResult:
  class EvaluationReadyStage (line 346) | class EvaluationReadyStage(ValidationStage):
    method __init__ (line 349) | def __init__(self, order: int, *, timeout_seconds: float = DEFAULT_STA...
    method name (line 354) | def name(self) -> str:
    method run (line 357) | def run(self, candidate: Any, scenario: Any) -> StageResult:
  class ValidationMetrics (line 424) | class ValidationMetrics:
    method __init__ (line 431) | def __init__(self) -> None:
    method record (line 437) | def record(self, results: list[StageResult]) -> None:
    method estimated_evaluations_saved (line 450) | def estimated_evaluations_saved(self) -> int:
    method to_event_payload (line 454) | def to_event_payload(self) -> dict[str, Any]:
    method reset (line 464) | def reset(self) -> None:
  class ValidationRunner (line 475) | class ValidationRunner:
    method __init__ (line 483) | def __init__(self, pipeline: ValidationPipeline) -> None:
    method metrics (line 488) | def metrics(self) -> ValidationMetrics:
    method validate (line 491) | def validate(self, candidate: Any, scenario: Any) -> list[StageResult]:
    method reset_metrics (line 497) | def reset_metrics(self) -> None:
  function default_pipeline (line 505) | def default_pipeline() -> ValidationPipeline:
  function _elapsed (line 519) | def _elapsed(t0: float) -> float:
  function _load_choose_action (line 523) | def _load_choose_action(source: str, *, timeout_seconds: float = DEFAULT...
  function _run_choose_action (line 542) | def _run_choose_action(

FILE: autocontext/src/autocontext/hermes/advisor.py
  class SkillFeatures (line 52) | class SkillFeatures:
    method activity_count (line 70) | def activity_count(self) -> int:
  class CuratorDecisionExample (line 75) | class CuratorDecisionExample:
    method activity_count (line 94) | def activity_count(self) -> int:
    method features (line 98) | def features(self) -> SkillFeatures:
  class LabelMetrics (line 112) | class LabelMetrics:
    method to_dict (line 119) | def to_dict(self) -> dict[str, Any]:
  class AdvisorMetrics (line 124) | class AdvisorMetrics:
    method to_dict (line 132) | def to_dict(self) -> dict[str, Any]:
  class Advisor (line 141) | class Advisor(Protocol):
    method predict (line 144) | def predict(self, features: SkillFeatures) -> str: ...
  class BaselineAdvisor (line 148) | class BaselineAdvisor:
    method predict (line 159) | def predict(self, features: SkillFeatures) -> str:  # noqa: ARG002 (un...
  function train_baseline (line 163) | def train_baseline(examples: list[CuratorDecisionExample]) -> BaselineAd...
  function evaluate (line 179) | def evaluate(advisor: Advisor, examples: list[CuratorDecisionExample]) -...
  function load_curator_examples (line 222) | def load_curator_examples(path: Path) -> list[CuratorDecisionExample]:
  function _example_from_row (line 246) | def _example_from_row(row: Any) -> CuratorDecisionExample | None:
  function _as_int (line 279) | def _as_int(value: Any) -> int | None:

FILE: autocontext/src/autocontext/hermes/curator_ingest.py
  class IngestSummary (line 36) | class IngestSummary:
  function ingest_curator_reports (line 46) | def ingest_curator_reports(
  function _effective_started_at (line 153) | def _effective_started_at(data: dict[str, Any], path: Path) -> datetime:
  function _curator_run_to_trace (line 165) | def _curator_run_to_trace(
  function _build_summary_text (line 260) | def _build_summary_text(
  function _build_tool_calls (line 277) | def _build_tool_calls(raw: Any, *, include_tool_args: bool) -> list[dict...
  function _parse_json (line 298) | def _parse_json(text: str) -> dict[str, Any]:
  function _parse_iso (line 307) | def _parse_iso(value: str) -> datetime | None:
  function _add_seconds (line 317) | def _add_seconds(started_at: str, seconds: float) -> datetime | None:
  function _as_str (line 324) | def _as_str(value: Any) -> str | None:
  function _as_float (line 328) | def _as_float(value: Any) -> float | None:
  function _as_dict (line 334) | def _as_dict(value: Any) -> dict[str, Any]:
  function _as_str_list (line 338) | def _as_str_list(value: Any) -> list[str]:

FILE: autocontext/src/autocontext/hermes/dataset_export.py
  class ExportSummary (line 80) | class ExportSummary:
  function export_dataset (line 89) | def export_dataset(
  function export_curator_decisions (line 112) | def export_curator_decisions(
  function _collect_action_labels (line 190) | def _collect_action_labels(run: CuratorRunSummary) -> dict[str, str]:
  function _is_valid_target (line 214) | def _is_valid_target(
  function _collect_protected_names (line 245) | def _collect_protected_names(*, home: Path, inventory: HermesInventory) ...
  function _effective_started_at (line 298) | def _effective_started_at(run: CuratorRunSummary) -> datetime:
  function _build_example (line 309) | def _build_example(
  function _read_run_json (line 361) | def _read_run_json(path: Path) -> dict[str, Any]:
  function _parse_iso (line 370) | def _parse_iso(value: str) -> datetime | None:
  function _as_name_list (line 380) | def _as_name_list(value: Any) -> list[str]:

FILE: autocontext/src/autocontext/hermes/inspection.py
  class HermesSkill (line 18) | class HermesSkill:
    method agent_created (line 37) | def agent_created(self) -> bool:
    method activity_count (line 41) | def activity_count(self) -> int:
    method last_activity_at (line 45) | def last_activity_at(self) -> str | None:
    method to_dict (line 52) | def to_dict(self) -> dict[str, Any]:
  class CuratorRunSummary (line 75) | class CuratorRunSummary:
    method to_dict (line 91) | def to_dict(self) -> dict[str, Any]:
  class CuratorInventory (line 109) | class CuratorInventory:
    method to_dict (line 117) | def to_dict(self) -> dict[str, Any]:
  class HermesInventory (line 127) | class HermesInventory:
    method skills_by_name (line 145) | def skills_by_name(self) -> dict[str, HermesSkill]:
    method to_dict (line 148) | def to_dict(self) -> dict[str, Any]:
  function inspect_hermes_home (line 166) | def inspect_hermes_home(hermes_home: str | Path | None = None) -> Hermes...
  function _resolve_hermes_home (line 212) | def _resolve_hermes_home(hermes_home: str | Path | None) -> Path:
  function _iter_active_skill_files (line 221) | def _iter_active_skill_files(skills_root: Path) -> tuple[Path, ...]:
  function _iter_archived_skill_files (line 239) | def _iter_archived_skill_files(skills_root: Path) -> tuple[Path, ...]:
  function _skill_from_path (line 246) | def _skill_from_path(
  function _read_skill_frontmatter (line 277) | def _read_skill_frontmatter(skill_md: Path) -> dict[str, Any]:
  function _read_usage (line 299) | def _read_usage(path: Path) -> dict[str, dict[str, Any]]:
  function _read_bundled_manifest_names (line 308) | def _read_bundled_manifest_names(path: Path) -> set[str]:
  function _read_hub_installed_names (line 323) | def _read_hub_installed_names(path: Path) -> set[str]:
  function _inspect_curator (line 331) | def _inspect_curator(reports_root: Path) -> CuratorInventory:
  function _curator_run_from_path (line 342) | def _curator_run_from_path(path: Path) -> CuratorRunSummary:
  function _curator_sort_key (line 364) | def _curator_sort_key(run: CuratorRunSummary) -> tuple[datetime, str]:
  function _read_json_object (line 375) | def _read_json_object(path: Path) -> dict[str, Any]:
  function _provenance (line 385) | def _provenance(name: str, *, bundled_names: set[str], hub_names: set[st...
  function _latest_activity_at (line 393) | def _latest_activity_at(*values: str | None) -> str | None:
  function _parse_iso_datetime (line 406) | def _parse_iso_datetime(value: str | None) -> datetime | None:
  function _as_str (line 418) | def _as_str(value: Any) -> str | None:
  function _as_int (line 424) | def _as_int(value: Any) -> int:
  function _as_float (line 431) | def _as_float(value: Any) -> float | None:
  function _as_dict (line 440) | def _as_dict(value: Any) -> dict[str, Any]:
  function _is_relative_to (line 444) | def _is_relative_to(path: Path, parent: Path) -> bool:

FILE: autocontext/src/autocontext/hermes/plugin_emitter.py
  class PluginEmitterError (line 62) | class PluginEmitterError(Exception):
  class LLMCallEvent (line 71) | class LLMCallEvent:
  class ToolCallEvent (line 82) | class ToolCallEvent:
  class TraceSink (line 91) | class TraceSink(Protocol):
    method write (line 98) | def write(self, trace: dict[str, Any]) -> None: ...
    method close (line 100) | def close(self) -> None: ...
  class LocalJsonlSink (line 104) | class LocalJsonlSink:
    method write (line 117) | def write(self, trace: dict[str, Any]) -> None:
    method close (line 130) | def close(self) -> None:
  class _SessionState (line 138) | class _SessionState:
  class HermesTraceEmitter (line 147) | class HermesTraceEmitter:
    method start_session (line 167) | def start_session(self, *, session_id: str, agent_id: str) -> None:
    method record_llm_call (line 179) | def record_llm_call(self, *, session_id: str, event: LLMCallEvent) -> ...
    method record_tool_call (line 202) | def record_tool_call(self, *, session_id: str, event: ToolCallEvent) -...
    method finalize_session (line 212) | def finalize_session(self, *, session_id: str) -> None:
    method _build_trace (line 224) | def _build_trace(self, state: _SessionState) -> dict[str, Any]:
  function _now_iso (line 277) | def _now_iso() -> str:
  function _accumulate (line 281) | def _accumulate(target: RedactionStats, source: RedactionStats) -> None:

FILE: autocontext/src/autocontext/hermes/recommendations.py
  class Recommendation (line 40) | class Recommendation:
    method to_dict (line 50) | def to_dict(self) -> dict[str, Any]:
  function recommend (line 70) | def recommend(
  function _is_protected (line 109) | def _is_protected(skill: HermesSkill) -> bool:
  function _features_from_skill (line 115) | def _features_from_skill(skill: HermesSkill) -> SkillFeatures:
  function _default_reason (line 129) | def _default_reason(advisor: Advisor) -> str:

FILE: autocontext/src/autocontext/hermes/redaction.py
  class UserPattern (line 38) | class UserPattern:
  class RedactionPolicy (line 50) | class RedactionPolicy:
    method __post_init__ (line 64) | def __post_init__(self) -> None:
  class RedactionStats (line 74) | class RedactionStats:
    method add (line 80) | def add(self, category: str, count: int = 1) -> None:
    method to_dict (line 84) | def to_dict(self) -> dict[str, Any]:
  function redact_text (line 88) | def redact_text(text: str, policy: RedactionPolicy) -> tuple[str, Redact...
  function compile_user_patterns (line 117) | def compile_user_patterns(raw: list[dict[str, str]] | None) -> tuple[Use...
  function redact_value (line 142) | def redact_value(value: Any, policy: RedactionPolicy) -> tuple[Any, Reda...
  function _walk (line 159) | def _walk(value: Any, *, policy: RedactionPolicy, stats: RedactionStats)...

FILE: autocontext/src/autocontext/hermes/references.py
  function list_references (line 307) | def list_references() -> tuple[str, ...]:
  function render_reference (line 313) | def render_reference(name: str) -> str:

FILE: autocontext/src/autocontext/hermes/session_ingest.py
  class SessionIngestSummary (line 42) | class SessionIngestSummary:
    method to_dict (line 54) | def to_dict(self) -> dict[str, Any]:
  function ingest_session_db (line 67) | def ingest_session_db(
  function _session_to_trace (line 142) | def _session_to_trace(
  function _session_summary_text (line 213) | def _session_summary_text(session: HermesSession, *, message_count: int)...
  function _normalize_role (line 226) | def _normalize_role(role: str) -> str:
  function _parse_iso (line 239) | def _parse_iso(value: str) -> datetime | None:
  function _latency_ms (line 250) | def _latency_ms(started_at: str, ended_at: str) -> int:
  function _now_iso (line 258) | def _now_iso() -> str:

FILE: autocontext/src/autocontext/hermes/sessions.py
  class SessionDBMissing (line 34) | class SessionDBMissing(FileNotFoundError):
  class HermesSession (line 44) | class HermesSession:
  class HermesMessage (line 55) | class HermesMessage:
  class HermesSessionRepository (line 73) | class HermesSessionRepository:
    method __init__ (line 82) | def __init__(self, db_path: Path) -> None:
    method db_path (line 93) | def db_path(self) -> Path:
    method iter_sessions (line 96) | def iter_sessions(self, *, since: datetime | None = None) -> Iterator[...
    method iter_messages (line 123) | def iter_messages(self, session_id: str) -> Iterator[HermesMessage]:
    method _table_names (line 139) | def _table_names(self) -> set[str]:
    method _existing_columns (line 143) | def _existing_columns(self, table: str, expected: tuple[str, ...]) -> ...
    method _row_to_session (line 150) | def _row_to_session(self, row: sqlite3.Row, cols: tuple[str, ...]) -> ...
    method _row_to_message (line 160) | def _row_to_message(self, row: sqlite3.Row, cols: tuple[str, ...]) -> ...
  function _as_str (line 172) | def _as_str(value: Any) -> str | None:
  function _parse_metadata (line 176) | def _parse_metadata(value: Any) -> dict[str, Any]:
  function _parse_iso (line 190) | def _parse_iso(value: str | None) -> datetime | None:

FILE: autocontext/src/autocontext/hermes/skill.py
  function render_autocontext_skill (line 9) | def render_autocontext_skill() -> str:

FILE: autocontext/src/autocontext/hermes/trajectory_ingest.py
  class TrajectoryIngestSummary (line 61) | class TrajectoryIngestSummary:
    method to_dict (line 73) | def to_dict(self) -> dict[str, Any]:
  function ingest_trajectory_jsonl (line 86) | def ingest_trajectory_jsonl(
  function _same_file (line 182) | def _same_file(a: Path, b: Path) -> bool:
  function _redact_trajectory (line 198) | def _redact_trajectory(
  function _redact_message (line 236) | def _redact_message(
  function _accumulate (line 252) | def _accumulate(target: RedactionStats, source: RedactionStats) -> None:

FILE: autocontext/src/autocontext/integrations/_shared/identity.py
  function resolve_identity (line 15) | def resolve_identity(

FILE: autocontext/src/autocontext/integrations/_shared/session.py
  function autocontext_session (line 22) | def autocontext_session(
  function current_session (line 42) | def current_session() -> dict[str, str]:

FILE: autocontext/src/autocontext/integrations/_shared/sink.py
  class TraceSink (line 23) | class TraceSink(Protocol):
    method add (line 24) | def add(self, trace: dict[str, Any]) -> None: ...
    method flush (line 25) | def flush(self) -> None: ...
    method close (line 26) | def close(self) -> None: ...
  class FileSink (line 29) | class FileSink:
    method __init__ (line 37) | def __init__(
    method add (line 57) | def add(self, trace: dict[str, Any]) -> None:
    method flush (line 68) | def flush(self) -> None:
    method close (line 72) | def close(self) -> None:
    method _flush_locked (line 79) | def _flush_locked(self) -> None:
    method _atexit_handler (line 99) | def _atexit_handler(self) -> None:

FILE: autocontext/src/autocontext/integrations/anthropic/_content.py
  function flatten_content (line 7) | def flatten_content(content: str | list[dict[str, Any]]) -> str:
  function extract_tool_uses (line 20) | def extract_tool_uses(

FILE: autocontext/src/autocontext/integrations/anthropic/_proxy.py
  function _now_iso (line 24) | def _now_iso() -> str:
  function _is_async_client (line 28) | def _is_async_client(client: Any) -> bool:
  function _response_usage_and_content (line 37) | def _response_usage_and_content(response: Any) -> tuple[dict[str, Any] |...
  class _MessagesProxy (line 50) | class _MessagesProxy:
    method __init__ (line 51) | def __init__(self, parent: ClientProxy) -> None:
    method create (line 54) | def create(self, **kwargs: Any) -> Any:
    method stream (line 64) | def stream(self, **kwargs: Any) -> Any:
  class ClientProxy (line 70) | class ClientProxy:
    method __init__ (line 71) | def __init__(
    method __getattr__ (line 86) | def __getattr__(self, name: str) -> Any:
    method _source_info (line 91) | def _source_info(self) -> dict[str, Any]:
    method _env (line 99) | def _env(self) -> dict[str, Any]:
    method _invoke_non_streaming (line 102) | def _invoke_non_streaming(self, *, kwargs: dict[str, Any]) -> Any:
    method _invoke_non_streaming_async (line 147) | async def _invoke_non_streaming_async(self, *, kwargs: dict[str, Any])...
    method _invoke_streaming (line 192) | def _invoke_streaming(self, *, kwargs: dict[str, Any]) -> Any:
    method _invoke_helper_streaming (line 227) | def _invoke_helper_streaming(self, *, kwargs: dict[str, Any]) -> Any:
    method _invoke_streaming_async (line 302) | def _invoke_streaming_async(self, *, kwargs: dict[str, Any]) -> Any:
    method _invoke_helper_streaming_async (line 346) | def _invoke_helper_streaming_async(self, *, kwargs: dict[str, Any]) ->...

FILE: autocontext/src/autocontext/integrations/anthropic/_stream.py
  class _Accumulator (line 11) | class _Accumulator:
    method __init__ (line 12) | def __init__(self) -> None:
    method on_message_start (line 17) | def on_message_start(self, ev: dict[str, Any]) -> None:
    method on_content_block_start (line 22) | def on_content_block_start(self, ev: dict[str, Any]) -> None:
    method on_content_block_delta (line 28) | def on_content_block_delta(self, ev: dict[str, Any]) -> None:
    method on_content_block_stop (line 38) | def on_content_block_stop(self, ev: dict[str, Any]) -> None:
    method on_message_delta (line 50) | def on_message_delta(self, ev: dict[str, Any]) -> None:
    method handle_event (line 60) | def handle_event(self, ev: dict[str, Any]) -> bool:
  function _abandoned_callback (line 78) | def _abandoned_callback(
  class StreamProxy (line 92) | class StreamProxy:
    method __init__ (line 95) | def __init__(
    method __enter__ (line 108) | def __enter__(self) -> StreamProxy:
    method __exit__ (line 111) | def __exit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None:
    method __iter__ (line 130) | def __iter__(self) -> StreamProxy:
    method __next__ (line 133) | def __next__(self) -> Any:
    method text_stream (line 151) | def text_stream(self) -> Generator[str, None, None]:
    method accumulated (line 160) | def accumulated(self) -> _Accumulator:
  class AsyncStreamProxy (line 164) | class AsyncStreamProxy:
    method __init__ (line 167) | def __init__(
    method __aenter__ (line 180) | async def __aenter__(self) -> AsyncStreamProxy:
    method __aexit__ (line 183) | async def __aexit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) ->...
    method __aiter__ (line 202) | def __aiter__(self) -> AsyncStreamProxy:
    method __anext__ (line 205) | async def __anext__(self) -> Any:
    method text_stream (line 223) | def text_stream(self) -> AsyncGenerator[str, None]:
    method accumulated (line 233) | def accumulated(self) -> _Accumulator:
  class HelperStreamProxy (line 237) | class HelperStreamProxy:
    method __init__ (line 240) | def __init__(
    method _emit_success (line 254) | def _emit_success(self, message: Any) -> None:
    method _emit_failure (line 260) | def _emit_failure(self, exc: BaseException) -> None:
    method _emit_partial (line 266) | def _emit_partial(self) -> None:
    method __iter__ (line 276) | def __iter__(self) -> HelperStreamProxy:
    method __next__ (line 279) | def __next__(self) -> Any:
    method __enter__ (line 297) | def __enter__(self) -> HelperStreamProxy:
    method __exit__ (line 300) | def __exit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None:
    method close (line 307) | def close(self) -> None:
    method get_final_message (line 310) | def get_final_message(self) -> Any:
    method get_final_text (line 319) | def get_final_text(self) -> str:
    method until_done (line 328) | def until_done(self) -> None:
    method current_message_snapshot (line 337) | def current_message_snapshot(self) -> Any:
    method request_id (line 341) | def request_id(self) -> str | None:
    method response (line 346) | def response(self) -> Any:
    method text_stream (line 350) | def text_stream(self) -> Generator[str, None, None]:
  class HelperStreamManagerProxy (line 359) | class HelperStreamManagerProxy:
    method __init__ (line 362) | def __init__(
    method __enter__ (line 376) | def __enter__(self) -> HelperStreamProxy:
    method __exit__ (line 386) | def __exit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None:
  class AsyncHelperStreamProxy (line 392) | class AsyncHelperStreamProxy:
    method __init__ (line 395) | def __init__(
    method _emit_success (line 409) | def _emit_success(self, message: Any) -> None:
    method _emit_failure (line 415) | def _emit_failure(self, exc: BaseException) -> None:
    method _emit_partial (line 421) | def _emit_partial(self) -> None:
    method __aiter__ (line 431) | def __aiter__(self) -> AsyncHelperStreamProxy:
    method __anext__ (line 434) | async def __anext__(self) -> Any:
    method __aenter__ (line 452) | async def __aenter__(self) -> AsyncHelperStreamProxy:
    method __aexit__ (line 455) | async def __aexit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) ->...
    method close (line 462) | async def close(self) -> None:
    method get_final_message (line 465) | async def get_final_message(self) -> Any:
    method get_final_text (line 474) | async def get_final_text(self) -> str:
    method until_done (line 483) | async def until_done(self) -> None:
    method current_message_snapshot (line 492) | def current_message_snapshot(self) -> Any:
    method request_id (line 496) | def request_id(self) -> str | None:
    method response (line 501) | def response(self) -> Any:
    method text_stream (line 505) | def text_stream(self) -> AsyncGenerator[str, None]:
  class AsyncHelperStreamManagerProxy (line 517) | class AsyncHelperStreamManagerProxy:
    method __init__ (line 520) | def __init__(
    method __aenter__ (line 534) | async def __aenter__(self) -> AsyncHelperStreamProxy:
    method __aexit__ (line 544) | async def __aexit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) ->...

FILE: autocontext/src/autocontext/integrations/anthropic/_taxonomy.py
  function map_exception_to_reason (line 12) | def map_exception_to_reason(exc: BaseException) -> AnthropicErrorReasonKey:
  function is_mapped_class_present (line 17) | def is_mapped_class_present(class_name: str) -> bool:

FILE: autocontext/src/autocontext/integrations/anthropic/_trace_builder.py
  function _redact (line 22) | def _redact(msg: str) -> str:
  function _now_iso (line 28) | def _now_iso() -> str:
  function _normalize_request_messages (line 32) | def _normalize_request_messages(messages: list[dict[str, Any]]) -> list[...
  function _map_usage (line 45) | def _map_usage(response_usage: dict[str, Any] | None) -> dict[str, Any]:
  function build_request_snapshot (line 74) | def build_request_snapshot(
  function _identity_to_session (line 83) | def _identity_to_session(identity: dict[str, str]) -> dict[str, Any] | N...
  function _metadata_with_stop_reason (line 92) | def _metadata_with_stop_reason(stop_reason: str | None) -> dict[str, Any...
  function build_success_trace (line 98) | def build_success_trace(
  function build_failure_trace (line 140) | def build_failure_trace(
  function finalize_streaming_trace (line 169) | def finalize_streaming_trace(

FILE: autocontext/src/autocontext/integrations/anthropic/_wrap.py
  function instrument_client (line 14) | def instrument_client(

FILE: autocontext/src/autocontext/integrations/browser/chrome_cdp.py
  class ChromeCdpTransport (line 79) | class ChromeCdpTransport(Protocol):
    method send (line 80) | async def send(self, method: str, params: dict[str, Any] | None = None...
    method close (line 81) | async def close(self) -> None: ...
  class ChromeCdpSession (line 84) | class ChromeCdpSession(BrowserSessionPort):
    method __init__ (line 87) | def __init__(
    method navigate (line 103) | async def navigate(self, url: str) -> BrowserAuditEvent:
    method snapshot (line 127) | async def snapshot(self) -> BrowserSnapshot:
    method click (line 179) | async def click(self, ref: str) -> BrowserAuditEvent:
    method fill (line 207) | async def fill(
    method press (line 242) | async def press(self, key: str) -> BrowserAuditEvent:
    method screenshot (line 269) | async def screenshot(self, name: str) -> BrowserAuditEvent:
    method close (line 296) | async def close(self) -> None:
    method _ensure_domains_enabled (line 299) | async def _ensure_domains_enabled(self) -> None:
    method _build_action (line 306) | def _build_action(self, action_type: str, params: dict[str, Any]) -> B...
    method _record_action_result (line 316) | def _record_action_result(
    method _persist_snapshot_artifacts (line 344) | def _persist_snapshot_artifacts(
    method _selector_for_ref (line 360) | def _selector_for_ref(self, ref: str) -> str:
    method _record_interactive_result (line 363) | async def _record_interactive_result(
    method _read_current_url (line 390) | async def _read_current_url(self) -> str:
  function _extract_result_value (line 406) | def _extract_result_value(response: dict[str, Any]) -> dict[str, Any]:
  function _normalize_snapshot_refs (line 416) | def _normalize_snapshot_refs(refs: Any) -> list[dict[str, Any]]:
  function _evaluate_navigation_url_policy (line 438) | def _evaluate_navigation_url_policy(config: BrowserSessionConfig, url: s...
  function _click_expression (line 452) | def _click_expression(selector: str) -> str:
  function _fill_expression (line 464) | def _fill_expression(selector: str, text: str) -> str:
  function _press_expression (line 482) | def _press_expression(key: str) -> str:
  function _empty_artifacts (line 495) | def _empty_artifacts() -> BrowserArtifactPaths:
  function _new_id (line 499) | def _new_id(prefix: str) -> str:
  function _utcnow (line 503) | def _utcnow() -> datetime:

FILE: autocontext/src/autocontext/integrations/browser/chrome_cdp_discovery.py
  class ChromeCdpDiscoveryError (line 18) | class ChromeCdpDiscoveryError(RuntimeError):
  class ChromeCdpTarget (line 23) | class ChromeCdpTarget:
  class ChromeCdpTargetDiscoveryPort (line 32) | class ChromeCdpTargetDiscoveryPort(Protocol):
    method resolve_websocket_url (line 33) | async def resolve_websocket_url(
  class ChromeCdpTargetDiscovery (line 41) | class ChromeCdpTargetDiscovery(ChromeCdpTargetDiscoveryPort):
    method __init__ (line 44) | def __init__(
    method list_targets (line 53) | async def list_targets(self) -> list[ChromeCdpTarget]:
    method resolve_websocket_url (line 64) | async def resolve_websocket_url(
  function select_chrome_cdp_target (line 78) | def select_chrome_cdp_target(
  function _fetch_json (line 104) | async def _fetch_json(url: str) -> object:
  function _parse_target (line 111) | def _parse_target(payload: object) -> ChromeCdpTarget | None:
  function _is_target_allowed (line 130) | def _is_target_allowed(config: BrowserSessionConfig, url: str) -> bool:

FILE: autocontext/src/autocontext/integrations/browser/chrome_cdp_runtime.py
  class ChromeCdpRuntime (line 24) | class ChromeCdpRuntime(BrowserRuntimePort):
    method __init__ (line 27) | def __init__(
    method create_session (line 48) | async def create_session(self, config: BrowserSessionConfig) -> Browse...
    method _resolve_websocket_url (line 59) | async def _resolve_websocket_url(self, config: BrowserSessionConfig) -...
  function _new_session_id (line 73) | def _new_session_id() -> str:

FILE: autocontext/src/autocontext/integrations/browser/chrome_cdp_transport.py
  class ChromeCdpTransportError (line 13) | class ChromeCdpTransportError(RuntimeError):
  class ChromeCdpWebSocketTransport (line 17) | class ChromeCdpWebSocketTransport:
    method __init__ (line 20) | def __init__(
    method connect (line 36) | async def connect(self) -> None:
    method send (line 50) | async def send(self, method: str, params: dict[str, Any] | None = None...
    method close (line 73) | async def close(self) -> None:
    method _reader_loop (line 85) | async def _reader_loop(self) -> None:
    method _fail_pending (line 117) | def _fail_pending(self, error: ChromeCdpTransportError) -> None:
    method _decode_message (line 124) | def _decode_message(self, raw_message: Any) -> dict[str, Any] | None:
  function _error_message (line 135) | def _error_message(error: dict[str, Any]) -> str:

FILE: autocontext/src/autocontext/integrations/browser/context_capture.py
  class CapturedBrowserContext (line 18) | class CapturedBrowserContext:
  function capture_browser_context (line 28) | def capture_browser_context(
  function _capture_browser_context_async (line 48) | async def _capture_browser_context_async(
  function render_captured_browser_context (line 72) | def render_captured_browser_context(context: CapturedBrowserContext) -> ...
  function _trim_visible_text (line 87) | def _trim_visible_text(text: str) -> str:

FILE: autocontext/src/autocontext/integrations/browser/contract/models.py
  class Params1 (line 17) | class Params1(BaseModel):
  class Params4 (line 25) | class Params4(BaseModel):
  class Params5 (line 32) | class Params5(BaseModel):
  class Ref (line 39) | class Ref(BaseModel):
  class BrowserSnapshot (line 51) | class BrowserSnapshot(BaseModel):
  class Artifacts (line 66) | class Artifacts(BaseModel):
  class BrowserSessionConfig (line 75) | class BrowserSessionConfig(BaseModel):
  class Params (line 91) | class Params(BaseModel):
  class BrowserAction1 (line 98) | class BrowserAction1(BaseModel):
  class BrowserAction2 (line 110) | class BrowserAction2(BaseModel):
  class Params2 (line 122) | class Params2(BaseModel):
  class BrowserAction3 (line 129) | class BrowserAction3(BaseModel):
  class Params3 (line 141) | class Params3(BaseModel):
  class BrowserAction4 (line 150) | class BrowserAction4(BaseModel):
  class BrowserAction5 (line 162) | class BrowserAction5(BaseModel):
  class BrowserAction6 (line 174) | class BrowserAction6(BaseModel):
  class BrowserAuditEvent (line 186) | class BrowserAuditEvent(BaseModel):
  class BrowserContractBundle (line 214) | class BrowserContractBundle(BaseModel):

FILE: autocontext/src/autocontext/integrations/browser/evidence.py
  class BrowserArtifactPaths (line 14) | class BrowserArtifactPaths(TypedDict):
  class BrowserEvidenceStore (line 20) | class BrowserEvidenceStore:
    method __init__ (line 23) | def __init__(self, root_dir: str | Path) -> None:
    method append_audit_event (line 26) | def append_audit_event(self, event: BrowserAuditEvent | dict[str, Any]...
    method persist_snapshot_artifacts (line 42) | def persist_snapshot_artifacts(
    method _session_dir (line 79) | def _session_dir(self, session_id: str) -> Path:
    method _artifact_path (line 82) | def _artifact_path(self, *, session_id: str, subdir: str, filename: st...
  function _safe_path_component (line 90) | def _safe_path_component(value: str, *, fallback: str) -> str:

FILE: autocontext/src/autocontext/integrations/browser/factory.py
  class ConfiguredBrowserRuntime (line 16) | class ConfiguredBrowserRuntime:
  function browser_runtime_from_settings (line 23) | def browser_runtime_from_settings(

FILE: autocontext/src/autocontext/integrations/browser/policy.py
  class BrowserPolicyDecision (line 19) | class BrowserPolicyDecision:
  function normalize_browser_allowed_domains (line 25) | def normalize_browser_allowed_domains(domains: str | list[str]) -> list[...
  function build_default_browser_session_config (line 38) | def build_default_browser_session_config(
  function resolve_browser_session_config (line 64) | def resolve_browser_session_config(settings: AppSettings) -> BrowserSess...
  function evaluate_browser_action_policy (line 78) | def evaluate_browser_action_policy(
  function _parse_navigation_target (line 108) | def _parse_navigation_target(url: str) -> tuple[str, bool] | None:
  function _matches_allowed_domain (line 119) | def _matches_allowed_domain(hostname: str, allowed_domain: str) -> bool:

FILE: autocontext/src/autocontext/integrations/browser/types.py
  class BrowserSessionPort (line 15) | class BrowserSessionPort(Protocol):
    method navigate (line 20) | async def navigate(self, url: str) -> BrowserAuditEvent: ...
    method snapshot (line 21) | async def snapshot(self) -> BrowserSnapshot: ...
    method click (line 22) | async def click(self, ref: str) -> BrowserAuditEvent: ...
    method fill (line 23) | async def fill(
    method press (line 30) | async def press(self, key: str) -> BrowserAuditEvent: ...
    method screenshot (line 31) | async def screenshot(self, name: str) -> BrowserAuditEvent: ...
    method close (line 32) | async def close(self) -> None: ...
  class BrowserRuntimePort (line 36) | class BrowserRuntimePort(Protocol):
    method create_session (line 39) | async def create_session(self, config: BrowserSessionConfig) -> Browse...

FILE: autocontext/src/autocontext/integrations/browser/validate.py
  class ValidatedBrowserSessionConfig (line 18) | class ValidatedBrowserSessionConfig(BrowserSessionConfig):
    method _validate_cross_field_policy (line 20) | def _validate_cross_field_policy(self) -> ValidatedBrowserSessionConfig:
  function validate_browser_session_config (line 52) | def validate_browser_session_config(data: Any) -> BrowserSessionConfig:
  function validate_browser_action (line 56) | def validate_browser_action(data: Any) -> BrowserAction:
  function validate_browser_snapshot (line 60) | def validate_browser_snapshot(data: Any) -> BrowserSnapshot:
  function validate_browser_audit_event (line 64) | def validate_browser_audit_event(data: Any) -> BrowserAuditEvent:
  function validate_browser_session_config_dict (line 68) | def validate_browser_session_config_dict(data: Any) -> tuple[bool, list[...
  function validate_browser_action_dict (line 72) | def validate_browser_action_dict(data: Any) -> tuple[bool, list[str]]:
  function validate_browser_snapshot_dict (line 76) | def validate_browser_snapshot_dict(data: Any) -> tuple[bool, list[str]]:
  function validate_browser_audit_event_dict (line 80) | def validate_browser_audit_event_dict(data: Any) -> tuple[bool, list[str]]:
  function _validate_dict (line 84) | def _validate_dict(data: Any, validator: Any) -> tuple[bool, list[str]]:
  function _reject_explicit_nulls_for_action (line 92) | def _reject_explicit_nulls_for_action(data: Any) -> Any:
  function _reject_explicit_nulls_for_snapshot (line 97) | def _reject_explicit_nulls_for_snapshot(data: Any) -> Any:
  function _validate_any (line 102) | def _validate_any(data: Any, model: Any) -> Any:
  function _format_error (line 109) | def _format_error(err: Any) -> str:
  function _reject_explicit_null_paths (line 116) | def _reject_explicit_null_paths(data: Any, paths: tuple[tuple[str, ...],...
  function _reject_explicit_null_path (line 121) | def _reject_explicit_null_path(data: Any, path: tuple[str, ...], current...

FILE: autocontext/src/autocontext/integrations/openai/_proxy.py
  function _is_async_client (line 29) | def _is_async_client(client: Any) -> bool:
  function _now_iso (line 42) | def _now_iso() -> str:
  class _ChatCompletionsProxy (line 46) | class _ChatCompletionsProxy:
    method __init__ (line 47) | def __init__(self, parent: ClientProxy, inner_create: Any) -> None:
    method create (line 51) | def create(self, **kwargs: Any) -> Any:
  class _ChatProxy (line 69) | class _ChatProxy:
    method __init__ (line 70) | def __init__(self, parent: ClientProxy, inner_chat: Any) -> None:
    method completions (line 75) | def completions(self) -> _ChatCompletionsProxy:
  class _ResponsesProxy (line 79) | class _ResponsesProxy:
    method __init__ (line 80) | def __init__(self, parent: ClientProxy, inner_responses_create: Any) -...
    method create (line 84) | def create(self, **kwargs: Any) -> Any:
  class ClientProxy (line 112) | class ClientProxy:
    method __init__ (line 113) | def __init__(
    method __getattr__ (line 128) | def __getattr__(self, name: str) -> Any:
    method _source_info (line 135) | def _source_info(self) -> dict[str, Any]:
    method _env (line 143) | def _env(self) -> dict[str, Any]:
    method _invoke_non_streaming (line 146) | def _invoke_non_streaming(
    method _invoke_non_streaming_responses (line 200) | def _invoke_non_streaming_responses(
    method _invoke_non_streaming_async (line 251) | async def _invoke_non_streaming_async(
    method _invoke_non_streaming_async_responses (line 305) | async def _invoke_non_streaming_async_responses(
    method _invoke_streaming (line 356) | def _invoke_streaming(
    method _invoke_streaming_async (line 413) | def _invoke_streaming_async(

FILE: autocontext/src/autocontext/integrations/openai/_stream.py
  class StreamProxy (line 16) | class StreamProxy:
    method __init__ (line 17) | def __init__(
    method _finalized (line 41) | def _finalized(self) -> bool:
    method _finalized (line 45) | def _finalized(self, value: bool) -> None:
    method __enter__ (line 48) | def __enter__(self) -> StreamProxy:
    method __exit__ (line 51) | def __exit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None:
    method __iter__ (line 74) | def __iter__(self) -> StreamProxy:
    method __next__ (line 77) | def __next__(self) -> Any:
    method _accumulate (line 89) | def _accumulate(self, chunk: Any) -> None:
    method accumulated (line 108) | def accumulated(self) -> dict[str, Any]:
  function _abandoned_callback (line 112) | def _abandoned_callback(
  class AsyncStreamProxy (line 126) | class AsyncStreamProxy:
    method __init__ (line 127) | def __init__(
    method _finalized (line 142) | def _finalized(self) -> bool:
    method __aenter__ (line 145) | async def __aenter__(self) -> AsyncStreamProxy:
    method __aexit__ (line 148) | async def __aexit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) ->...
    method __aiter__ (line 166) | def __aiter__(self) -> AsyncStreamProxy:
    method __anext__ (line 169) | async def __anext__(self) -> Any:
    method accumulated (line 181) | def accumulated(self) -> dict[str, Any]:

FILE: autocontext/src/autocontext/integrations/openai/_taxonomy.py
  function map_exception_to_reason (line 16) | def map_exception_to_reason(exc: BaseException) -> OpenAiErrorReasonKey:
  function is_mapped_class_present (line 22) | def is_mapped_class_present(class_name: str) -> bool:

FILE: autocontext/src/autocontext/integrations/openai/_trace_builder.py
  function _redact (line 26) | def _redact(msg: str) -> str:
  function _now_iso (line 32) | def _now_iso() -> str:
  function _normalize_messages (line 36) | def _normalize_messages(messages: list[dict[str, Any]]) -> list[dict[str...
  function _normalize_tool_calls (line 48) | def _normalize_tool_calls(
  function build_request_snapshot (line 73) | def build_request_snapshot(
  function _map_usage (line 83) | def _map_usage(response_usage: dict[str, Any] | None) -> dict[str, Any]:
  function _identity_to_session (line 92) | def _identity_to_session(identity: dict[str, str]) -> dict[str, Any] | N...
  function build_success_trace (line 101) | def build_success_trace(
  function build_failure_trace (line 127) | def build_failure_trace(
  function finalize_streaming_trace (line 159) | def finalize_streaming_trace(

FILE: autocontext/src/autocontext/integrations/openai/_wrap.py
  function instrument_client (line 21) | def instrument_client(

FILE: autocontext/src/autocontext/integrations/primeintellect/client.py
  class PrimeIntellectClient (line 17) | class PrimeIntellectClient:
    method warm_provision (line 30) | def warm_provision(self, environment_name: str, max_retries: int = 2, ...
    method execute_strategy (line 39) | def execute_strategy(
    method _probe (line 73) | async def _probe(self) -> None:
    method _execute_strategy_once (line 77) | async def _execute_strategy_once(
    method fallback_local_response (line 127) | def fallback_local_response(self, scenario_name: str, seed: int) -> di...
    method unavailable_state (line 146) | def unavailable_state(self, environment_name: str, reason: str) -> dic...
    method _build_eval_command (line 153) | def _build_eval_command(self, *, scenario_name: str, strategy: dict[st...

FILE: autocontext/src/autocontext/integrations/ssh/client.py
  class SSHCommandResult (line 19) | class SSHCommandResult:
    method success (line 28) | def success(self) -> bool:
  class SSHClient (line 32) | class SSHClient:
    method __init__ (line 39) | def __init__(self, config: SSHHostConfig) -> None:
    method _ssh_base_args (line 42) | def _ssh_base_args(self) -> list[str]:
    method _ssh_target (line 56) | def _ssh_target(self) -> str:
    method _scp_base_args (line 62) | def _scp_base_args(self) -> list[str]:
    method _scp_target (line 76) | def _scp_target(self, remote_path: str) -> str:
    method _wrap_command (line 82) | def _wrap_command(self, command: str) -> str:
    method execute_command (line 91) | def execute_command(self, command: str, *, timeout: float | None = Non...
    method health_check (line 123) | def health_check(self) -> dict[str, Any]:
    method validate_runtime (line 132) | def validate_runtime(self) -> None:
    method upload_file (line 152) | def upload_file(self, local_path: Path, remote_path: str) -> None:
    method download_file (line 159) | def download_file(self, remote_path: str, local_path: Path) -> None:
    method ensure_working_directory (line 166) | def ensure_working_directory(self) -> None:

FILE: autocontext/src/autocontext/integrations/ssh/config.py
  class SSHHostCapabilities (line 8) | class SSHHostCapabilities(BaseModel):
  class SSHHostConfig (line 18) | class SSHHostConfig(BaseModel):

FILE: autocontext/src/autocontext/investigation/browser_context.py
  class InvestigationBrowserContext (line 16) | class InvestigationBrowserContext:
  function render_investigation_browser_context (line 26) | def render_investigation_browser_context(context: InvestigationBrowserCo...
  function build_browser_evidence_summary (line 39) | def build_browser_evidence_summary(context: InvestigationBrowserContext)...
  function capture_investigation_browser_context (line 46) | def capture_investigation_browser_context(

FILE: autocontext/src/autocontext/investigation/engine.py
  class InvestigationRequest (line 31) | class InvestigationRequest:
  class InvestigationHypothesis (line 41) | class InvestigationHypothesis:
  class InvestigationEvidence (line 49) | class InvestigationEvidence:
  class InvestigationConclusion (line 60) | class InvestigationConclusion:
  class InvestigationArtifacts (line 67) | class InvestigationArtifacts:
  class InvestigationResult (line 73) | class InvestigationResult:
    method to_dict (line 89) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 93) | def from_dict(cls, data: dict[str, Any]) -> InvestigationResult:
  class _ExecutedInvestigation (line 117) | class _ExecutedInvestigation:
  function derive_investigation_name (line 123) | def derive_investigation_name(description: str) -> str:
  function generate_investigation_id (line 128) | def generate_investigation_id() -> str:
  function normalize_positive_integer (line 132) | def normalize_positive_integer(value: int | None) -> int | None:
  function parse_investigation_json (line 138) | def parse_investigation_json(text: str) -> dict[str, Any] | None:
  function _build_investigation_spec_prompt (line 165) | def _build_investigation_spec_prompt(
  function _build_hypothesis_prompt (line 191) | def _build_hypothesis_prompt(
  function _spec_from_dict (line 226) | def _spec_from_dict(data: dict[str, Any]) -> InvestigationSpec:
  function _persist_investigation_artifacts (line 255) | def _persist_investigation_artifacts(
  function _execute_generated_investigation (line 269) | def _execute_generated_investigation(
  function _normalize_text (line 325) | def _normalize_text(text: str) -> str:
  function _tokenize (line 329) | def _tokenize(text: str) -> list[str]:
  function _similarity_score (line 359) | def _similarity_score(left: str, right: str) -> float:
  function _build_evidence (line 368) | def _build_evidence(
  function _build_clustered_evidence_summary (line 399) | def _build_clustered_evidence_summary(
  function _evidence_priority (line 429) | def _evidence_priority(
  function _cluster_by_source (line 444) | def _cluster_by_source(items: list[EvidenceItem]) -> list[tuple[str, lis...
  function _render_clusters (line 451) | def _render_clusters(
  function _shorten_text (line 469) | def _shorten_text(text: str, *, max_chars: int = 120) -> str:
  function _sanitize_evidence_for_prompt (line 476) | def _sanitize_evidence_for_prompt(text: str, *, diagnosis_target: str) -...
  function _parse_hypotheses (line 495) | def _parse_hypotheses(
  function _evaluate_hypotheses (line 527) | def _evaluate_hypotheses(
  function _build_conclusion (line 585) | def _build_conclusion(
  function _identify_unknowns (line 614) | def _identify_unknowns(
  function _recommend_next_steps (line 628) | def _recommend_next_steps(
  function _build_failed_result (line 643) | def _build_failed_result(
  class InvestigationEngine (line 668) | class InvestigationEngine:
    method __init__ (line 669) | def __init__(
    method run (line 686) | def run(self, request: InvestigationRequest) -> InvestigationResult:

FILE: autocontext/src/autocontext/investigation/iterative.py
  function run_iterative_investigation (line 22) | def run_iterative_investigation(
  function _build_iterative_investigation_prompt (line 177) | def _build_iterative_investigation_prompt(
  function _coerce_iterative_hypotheses (line 212) | def _coerce_iterative_hypotheses(payload: dict[str, Any], max_hypotheses...
  function _coerce_iterative_evidence (line 242) | def _coerce_iterative_evidence(
  function _coerce_iterative_conclusion (line 282) | def _coerce_iterative_conclusion(payload: dict[str, Any], hypotheses: li...
  function _recommend_next_steps (line 309) | def _recommend_next_steps(hypotheses: list[Any], unknowns: list[str]) ->...
  function _string_list (line 321) | def _string_list(value: Any) -> list[str]:
  function _persist_iterative_investigation_artifacts (line 325) | def _persist_iterative_investigation_artifacts(
  function _compact_iterative_context_if_needed (line 348) | def _compact_iterative_context_if_needed(
  function _render_transcript_for_compaction (line 385) | def _render_transcript_for_compaction(transcript: list[dict[str, Any]]) ...
  function _latest_compaction_parent_id (line 407) | def _latest_compaction_parent_id(artifacts: Any | None, investigation_id...
  function _emit_investigation_event (line 414) | def _emit_investigation_event(events: Any | None, event: str, payload: d...
  function _write_json_artifact (line 420) | def _write_json_artifact(artifacts: Any | None, path: Path, payload: dic...
  function _write_text_artifact (line 428) | def _write_text_artifact(artifacts: Any | None, path: Path, content: str...

FILE: autocontext/src/autocontext/knowledge/coherence.py
  class CoherenceReport (line 25) | class CoherenceReport:
  function _check_playbook (line 31) | def _check_playbook(playbook_content: str) -> list[str]:
  function _check_tools (line 38) | def _check_tools(playbook_content: str, knowledge_dir: Path) -> list[str]:
  function _check_lesson_contradictions (line 54) | def _check_lesson_contradictions(lessons: list[str]) -> list[str]:
  function _read_lessons (line 86) | def _read_lessons(scenario_name: str, knowledge_root: Path, skills_root:...
  function check_coherence (line 117) | def check_coherence(

FILE: autocontext/src/autocontext/knowledge/compaction.py
  class CompactionEntry (line 75) | class CompactionEntry:
    method to_dict (line 86) | def to_dict(self) -> dict[str, Any]:
    method from_dict (line 99) | def from_dict(cls, data: Mapping[str, Any]) -> CompactionEntry:
  class PromptCompactionResult (line 113) | class PromptCompactionResult:
  function compact_prompt_components (line 118) | def compact_prompt_components(components: Mapping[str, str]) -> dict[str...
  function compact_prompt_components_with_entries (line 123) | def compact_prompt_components_with_entries(
  function _compact_prompt_components (line 144) | def _compact_prompt_components(components: Mapping[str, str]) -> dict[st...
  function compaction_entries_for_components (line 151) | def compaction_entries_for_components(
  function _build_compaction_entry (line 184) | def _build_compaction_entry(
  function _structured_compaction_summary (line 216) | def _structured_compaction_summary(key: str, tokens_before: int, tokens_...
  function _new_entry_id (line 229) | def _new_entry_id() -> str:
  function _utc_timestamp (line 233) | def _utc_timestamp() -> str:
  function _coerce_int (line 237) | def _coerce_int(value: Any) -> int:
  function compact_prompt_component (line 252) | def compact_prompt_component(key: str, value: str) -> str:
  function clear_prompt_compaction_cache (line 264) | def clear_prompt_compaction_cache() -> None:
  function prompt_compaction_cache_stats (line 272) | def prompt_compaction_cache_stats() -> dict[str, int]:
  function extract_promotable_lines (line 281) | def extract_promotable_lines(text: str, *, max_items: int = 3) -> list[s...
  function _compact_component (line 319) | def _compact_component(key: str, text: str, max_tokens: int) -> str:
  function _cached_compact_component (line 343) | def _cached_compact_component(key: str, text: str, max_tokens: int) -> str:
  function _compact_history (line 366) | def _compact_history(text: str, *, max_tokens: int) -> str:
  function _compact_markdown (line 379) | def _compact_markdown(
  function _compact_table (line 400) | def _compact_table(text: str, *, max_tokens: int) -> str:
  function _compact_plain_prose (line 446) | def _compact_plain_prose(text: str, *, max_tokens: int) -> str:
  function _split_sections (line 460) | def _split_sections(text: str) -> list[str]:
  function _looks_like_plain_prose (line 477) | def _looks_like_plain_prose(text: str) -> bool:
  function _compact_section (line 490) | def _compact_section(section: str, *, prefer_recent: bool = False) -> str:
  function _is_structured_line (line 519) | def _is_structured_line(line: str) -> bool:
  function _dedupe_lines (line 527) | def _dedupe_lines(lines: Iterable[str]) -> list[str]:
  function _truncate_text (line 539) | def _truncate_text(text: str, *, max_tokens: int) -> str:

FILE: autocontext/src/autocontext/knowledge/context_selection.py
  function _utc_now (line 15) | def _utc_now() -> str:
  class ContextSelectionCandidate (line 20) | class ContextSelectionCandidate:
    method from_contents (line 36) | def from_contents(
    method to_dict (line 63) |
Copy disabled (too large) Download .json
Condensed preview — 3277 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (18,425K chars).
[
  {
    "path": ".env.example",
    "chars": 2888,
    "preview": "# Core runtime\nAUTOCONTEXT_AGENT_PROVIDER=deterministic\nAUTOCONTEXT_EXECUTOR_MODE=local\n\n# Local paths\nAUTOCONTEXT_DB_PA"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "chars": 827,
    "preview": "---\nname: Bug report\nabout: Report incorrect behavior, regressions, or setup problems\ntitle: \"[Bug] \"\nlabels: bug\nassign"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "chars": 561,
    "preview": "blank_issues_enabled: false\ncontact_links:\n  - name: Docs and examples\n    url: https://github.com/greyhaven-ai/autocont"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "chars": 694,
    "preview": "---\nname: Feature request\nabout: Propose a new capability or workflow improvement\ntitle: \"[Feature] \"\nlabels: enhancemen"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "chars": 747,
    "preview": "## Summary\n\n- what changed\n- why it changed\n\n## Surfaces Touched\n\n- [ ] Python package\n- [ ] TypeScript package\n- [ ] TU"
  },
  {
    "path": ".github/workflows/ci.yml",
    "chars": 9998,
    "preview": "name: ci\n\non:\n  push:\n    branches: [main]\n  pull_request:\n\nconcurrency:\n  group: ci-${{ github.ref }}\n  cancel-in-progr"
  },
  {
    "path": ".github/workflows/publish-pi-autocontext.yml",
    "chars": 1514,
    "preview": "name: publish-pi-autocontext\n\non:\n  push:\n    tags:\n      - \"pi-v*\"\n  workflow_dispatch:\n\nconcurrency:\n  group: publish-"
  },
  {
    "path": ".github/workflows/publish-python.yml",
    "chars": 2037,
    "preview": "name: publish-python\n\non:\n  push:\n    tags:\n      - \"py-v*\"\n  workflow_dispatch:\n\nconcurrency:\n  group: publish-python-$"
  },
  {
    "path": ".github/workflows/publish-ts.yml",
    "chars": 1384,
    "preview": "name: publish-ts\n\non:\n  push:\n    tags:\n      - \"ts-v*\"\n  workflow_dispatch:\n\nconcurrency:\n  group: publish-ts-${{ githu"
  },
  {
    "path": ".gitignore",
    "chars": 538,
    "preview": "# Secrets\n.env\n.env.*\n!.env.example\n**/.env\n**/.env.*\n!**/.env.example\n\n# Python\n__pycache__/\n*.py[cod]\n.python-version\n"
  },
  {
    "path": ".prettierrc.json",
    "chars": 90,
    "preview": "{\n  \"semi\": true,\n  \"singleQuote\": false,\n  \"trailingComma\": \"all\",\n  \"printWidth\": 100\n}\n"
  },
  {
    "path": "AGENTS.md",
    "chars": 1983,
    "preview": "# Agent Guide\n\nUse this file as the first pointer for coding agents and automation that need to work in or against this "
  },
  {
    "path": "CHANGELOG.md",
    "chars": 65639,
    "preview": "# Changelog\n\nAll notable changes to this project will be documented in this file.\n\n## [Unreleased]\n\n### Added\n\n- AC-707 "
  },
  {
    "path": "CLAUDE.md",
    "chars": 15794,
    "preview": "# CLAUDE.md\n\nThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.\n\n## "
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 1803,
    "preview": "# Code of Conduct\n\n## Our Standard\n\nWe want autocontext to be a professional, constructive project for contributors, use"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 4186,
    "preview": "# Contributing\n\n## Setup\n\nPython work happens in `autocontext/`:\n\n```bash\ncd autocontext\nuv venv\nsource .venv/bin/activa"
  },
  {
    "path": "LICENSE",
    "chars": 10343,
    "preview": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AN"
  },
  {
    "path": "README.md",
    "chars": 20623,
    "preview": "<!-- autocontext-readme-hero:start -->\n<p align=\"center\">\n  <img src=\"autocontext/assets/banner.svg\" alt=\"autocontext AS"
  },
  {
    "path": "SECURITY.md",
    "chars": 980,
    "preview": "# Security Policy\n\n## Reporting a Vulnerability\n\nDo not open public GitHub issues for security vulnerabilities.\n\nUse Git"
  },
  {
    "path": "SUPPORT.md",
    "chars": 1097,
    "preview": "# Support\n\n## Questions and Usage Help\n\nBefore opening an issue, check the main docs and examples first:\n\n- `README.md`\n"
  },
  {
    "path": "autocontext/README.md",
    "chars": 22176,
    "preview": "# autocontext\n\nautocontext is the Python control-plane package for running scenarios, carrying forward validated knowled"
  },
  {
    "path": "autocontext/assets/banner.txt",
    "chars": 762,
    "preview": "                          .                                                 .                             .\n            "
  },
  {
    "path": "autocontext/assets/whats_new.txt",
    "chars": 550,
    "preview": "**Plain-language CLI continuity** lets Python and TypeScript callers use positional goals/scenarios, `--iterations`, and"
  },
  {
    "path": "autocontext/demo_data/README.md",
    "chars": 375,
    "preview": "# Demo Data\n\nThis directory can hold pre-generated runs for demos where live execution time is constrained.\n\nUse:\n\n```ba"
  },
  {
    "path": "autocontext/docs/agent-integration.md",
    "chars": 56368,
    "preview": "# External Agent Integration Guide\n\nautocontext provides three integration surfaces for external agents: the `autoctx` C"
  },
  {
    "path": "autocontext/docs/extensions.md",
    "chars": 3224,
    "preview": "# Extension Hooks\n\nAutocontext exposes small Python and TypeScript extension hook buses for Pi-shaped runtime customizat"
  },
  {
    "path": "autocontext/docs/fixture-loader.md",
    "chars": 4796,
    "preview": "# Fixture loader (AC-767)\n\n`autocontext` can pre-fetch external reference data (\"authoritative ground truth\")\nbefore gen"
  },
  {
    "path": "autocontext/docs/mlx-training.md",
    "chars": 8708,
    "preview": "# MLX Host Training Setup (Apple Silicon)\n\n## Overview\n\nautocontext's `autoctx train` command uses [MLX](https://github."
  },
  {
    "path": "autocontext/docs/persistent-host.md",
    "chars": 5721,
    "preview": "# Persistent Host Worker\n\nUse this shape when you want Autocontext to keep accepting queued work while a server stays on"
  },
  {
    "path": "autocontext/docs/sandbox.md",
    "chars": 3369,
    "preview": "# Sandbox Modes\n\nautocontext supports three shipped execution modes for game scenarios, plus judge-based evaluation for "
  },
  {
    "path": "autocontext/migrations/001_initial.sql",
    "chars": 1571,
    "preview": "CREATE TABLE IF NOT EXISTS runs (\n    run_id TEXT PRIMARY KEY,\n    scenario TEXT NOT NULL,\n    target_generations INTEGE"
  },
  {
    "path": "autocontext/migrations/002_phase3_phase7.sql",
    "chars": 1099,
    "preview": "ALTER TABLE generations ADD COLUMN elo REAL NOT NULL DEFAULT 1000.0;\nALTER TABLE generations ADD COLUMN wins INTEGER NOT"
  },
  {
    "path": "autocontext/migrations/003_agent_subagent_metadata.sql",
    "chars": 164,
    "preview": "ALTER TABLE agent_role_metrics ADD COLUMN subagent_id TEXT NOT NULL DEFAULT '';\nALTER TABLE agent_role_metrics ADD COLUM"
  },
  {
    "path": "autocontext/migrations/004_knowledge_inheritance.sql",
    "chars": 477,
    "preview": "CREATE TABLE IF NOT EXISTS knowledge_snapshots (\n    id INTEGER PRIMARY KEY AUTOINCREMENT,\n    scenario TEXT NOT NULL,\n "
  },
  {
    "path": "autocontext/migrations/005_ecosystem_provider_tracking.sql",
    "chars": 236,
    "preview": "ALTER TABLE runs ADD COLUMN agent_provider TEXT NOT NULL DEFAULT '';\nALTER TABLE knowledge_snapshots ADD COLUMN agent_pr"
  },
  {
    "path": "autocontext/migrations/006_human_feedback.sql",
    "chars": 380,
    "preview": "CREATE TABLE IF NOT EXISTS human_feedback (\n    id INTEGER PRIMARY KEY AUTOINCREMENT,\n    scenario_name TEXT NOT NULL,\n "
  },
  {
    "path": "autocontext/migrations/007_task_queue.sql",
    "chars": 958,
    "preview": "-- Task queue for the always-on runner daemon\nCREATE TABLE IF NOT EXISTS task_queue (\n    id TEXT PRIMARY KEY,\n    spec_"
  },
  {
    "path": "autocontext/migrations/008_staged_validation.sql",
    "chars": 497,
    "preview": "CREATE TABLE IF NOT EXISTS staged_validation_results (\n    id INTEGER PRIMARY KEY AUTOINCREMENT,\n    run_id TEXT NOT NUL"
  },
  {
    "path": "autocontext/migrations/009_generation_timing.sql",
    "chars": 124,
    "preview": "-- AC-174: Track per-generation wall-clock duration.\nALTER TABLE generations ADD COLUMN duration_seconds REAL DEFAULT NU"
  },
  {
    "path": "autocontext/migrations/010_consultation_log.sql",
    "chars": 738,
    "preview": "CREATE TABLE IF NOT EXISTS consultation_log (\n    id INTEGER PRIMARY KEY AUTOINCREMENT,\n    run_id TEXT NOT NULL,\n    ge"
  },
  {
    "path": "autocontext/migrations/010_session_notebook.sql",
    "chars": 687,
    "preview": "CREATE TABLE IF NOT EXISTS session_notebooks (\n    session_id TEXT PRIMARY KEY,\n    scenario_name TEXT NOT NULL,\n    cur"
  },
  {
    "path": "autocontext/migrations/011_monitors.sql",
    "chars": 1082,
    "preview": "-- AC-209: Monitor conditions and alerts\nCREATE TABLE IF NOT EXISTS monitor_conditions (\n    id TEXT PRIMARY KEY,\n    na"
  },
  {
    "path": "autocontext/migrations/012_research_hub.sql",
    "chars": 3567,
    "preview": "CREATE TABLE IF NOT EXISTS hub_sessions (\n    session_id TEXT PRIMARY KEY,\n    owner TEXT NOT NULL DEFAULT '',\n    statu"
  },
  {
    "path": "autocontext/migrations/013_generation_dimension_summary.sql",
    "chars": 167,
    "preview": "-- AC-338: Persist per-generation dimensional scoring summaries for trajectory/reporting.\nALTER TABLE generations ADD CO"
  },
  {
    "path": "autocontext/migrations/014_scoring_backend_metadata.sql",
    "chars": 394,
    "preview": "-- AC-319: persist scoring backend selection and uncertainty metadata.\nALTER TABLE generations ADD COLUMN scoring_backen"
  },
  {
    "path": "autocontext/migrations/015_match_replay.sql",
    "chars": 271,
    "preview": "-- AC-171: Add replay/state columns to matches for training export\nALTER TABLE matches ADD COLUMN winner TEXT NOT NULL D"
  },
  {
    "path": "autocontext/pyproject.toml",
    "chars": 3066,
    "preview": "[build-system]\nrequires = [\"hatchling>=1.26.0\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"autocontext\"\nversio"
  },
  {
    "path": "autocontext/pyrightconfig.json",
    "chars": 68,
    "preview": "{\n  \"venvPath\": \".\",\n  \"venv\": \".venv\",\n  \"pythonVersion\": \"3.11\"\n}\n"
  },
  {
    "path": "autocontext/scripts/check_no_python_postinstall.py",
    "chars": 3570,
    "preview": "#!/usr/bin/env python3\n\"\"\"\ncheck_no_python_postinstall.py — Enterprise discipline check.\n\nParses pyproject.toml and asse"
  },
  {
    "path": "autocontext/scripts/check_python_no_telemetry.py",
    "chars": 4251,
    "preview": "#!/usr/bin/env python3\n\"\"\"\ncheck_python_no_telemetry.py — Enterprise discipline check.\n\nGreps the autocontext source (pr"
  },
  {
    "path": "autocontext/scripts/check_python_offline_install.py",
    "chars": 3402,
    "preview": "#!/usr/bin/env python3\n\"\"\"\ncheck_python_offline_install.py — Enterprise discipline check.\n\nVerifies that `autocontext` c"
  },
  {
    "path": "autocontext/scripts/check_python_reproducible_wheel.py",
    "chars": 2467,
    "preview": "#!/usr/bin/env python3\n\"\"\"\ncheck_python_reproducible_wheel.py — Enterprise discipline check.\n\nBuilds the wheel twice wit"
  },
  {
    "path": "autocontext/scripts/drive_anthropic_parity_fixture.py",
    "chars": 7120,
    "preview": "#!/usr/bin/env python3\n\"\"\"Cross-runtime parity fixture driver — Anthropic Python runtime.\"\"\"\nfrom __future__ import anno"
  },
  {
    "path": "autocontext/scripts/drive_parity_fixture.py",
    "chars": 7515,
    "preview": "#!/usr/bin/env python3\n\"\"\"\nCross-runtime parity fixture driver — Python runtime.\n\nUsage: uv run python scripts/drive_par"
  },
  {
    "path": "autocontext/skills/grid-ctf-ops/SKILL.md",
    "chars": 5222,
    "preview": "---\nname: grid-ctf-ops\ndescription: Operational knowledge for the grid_ctf scenario including strategy playbook, lessons"
  },
  {
    "path": "autocontext/skills/grid-ctf-ops/playbook.md",
    "chars": 203,
    "preview": "## Strategy Updates\n\n- Keep defensive anchor.\n- Balance aggression with proportional defense.\n\n## Prompt Optimizations\n\n"
  },
  {
    "path": "autocontext/smoke_test.py",
    "chars": 6081,
    "preview": "\"\"\"End-to-end smoke test — exercises the full autocontext Phase A stack with a real provider.\n\nTests:\n1. AnthropicProvid"
  },
  {
    "path": "autocontext/smoke_test_loop.py",
    "chars": 6263,
    "preview": "\"\"\"E2E smoke test: ImprovementLoop with real API calls.\n\nTests the full generate→judge→revise→judge cycle to verify:\n1. "
  },
  {
    "path": "autocontext/src/autocontext/__init__.py",
    "chars": 283,
    "preview": "\"\"\"autocontext control plane package.\"\"\"\n\nfrom autocontext.extensions import ExtensionAPI, HookBus, HookEvents, HookResu"
  },
  {
    "path": "autocontext/src/autocontext/agentos/__init__.py",
    "chars": 211,
    "preview": "\"\"\"Optional agentOS integration (AC-517).\"\"\"\n\nfrom autocontext.agentos.types import AgentOsConfig, AgentOsPermissions, A"
  },
  {
    "path": "autocontext/src/autocontext/agentos/types.py",
    "chars": 2040,
    "preview": "\"\"\"agentOS integration types (AC-517).\n\nPort types that define the boundary between autocontext's session\ndomain and age"
  },
  {
    "path": "autocontext/src/autocontext/agents/__init__.py",
    "chars": 402,
    "preview": "from .curator import KnowledgeCurator\nfrom .orchestrator import AgentOrchestrator\nfrom .skeptic import SkepticAgent, Ske"
  },
  {
    "path": "autocontext/src/autocontext/agents/agent_sdk_client.py",
    "chars": 4240,
    "preview": "\"\"\"LLM client using Claude Agent SDK with native tool use.\"\"\"\n\nfrom __future__ import annotations\n\nimport asyncio\nimport"
  },
  {
    "path": "autocontext/src/autocontext/agents/analyst.py",
    "chars": 617,
    "preview": "from __future__ import annotations\n\nfrom autocontext.agents.subagent_runtime import SubagentRuntime, SubagentTask\nfrom a"
  },
  {
    "path": "autocontext/src/autocontext/agents/architect.py",
    "chars": 4460,
    "preview": "from __future__ import annotations\n\nimport ast\nimport json\nfrom collections.abc import Mapping\nfrom typing import Any\n\nf"
  },
  {
    "path": "autocontext/src/autocontext/agents/coach.py",
    "chars": 1489,
    "preview": "from __future__ import annotations\n\nfrom autocontext.agents.subagent_runtime import SubagentRuntime, SubagentTask\nfrom a"
  },
  {
    "path": "autocontext/src/autocontext/agents/competitor.py",
    "chars": 1843,
    "preview": "from __future__ import annotations\n\nimport logging\n\nfrom autocontext.agents.subagent_runtime import SubagentRuntime, Sub"
  },
  {
    "path": "autocontext/src/autocontext/agents/contracts.py",
    "chars": 951,
    "preview": "from __future__ import annotations\n\nfrom dataclasses import dataclass, field\nfrom typing import Any\n\n\n@dataclass(slots=T"
  },
  {
    "path": "autocontext/src/autocontext/agents/curator.py",
    "chars": 9385,
    "preview": "from __future__ import annotations\n\nimport json\nimport re\nfrom dataclasses import dataclass\nfrom typing import Any\n\nfrom"
  },
  {
    "path": "autocontext/src/autocontext/agents/feedback_loops.py",
    "chars": 6420,
    "preview": "\"\"\"Feedback loops for analyst quality scoring and tool usage tracking (AC-335 + AC-336).\n\nCloses two broken incentive lo"
  },
  {
    "path": "autocontext/src/autocontext/agents/hint_feedback.py",
    "chars": 8377,
    "preview": "\"\"\"Bidirectional competitor hint feedback after tournament (AC-337).\n\nAfter tournament, the competitor annotates which h"
  },
  {
    "path": "autocontext/src/autocontext/agents/llm_client.py",
    "chars": 28279,
    "preview": "from __future__ import annotations\n\nimport json\nimport logging\nimport os\nimport time\nfrom typing import Any\n\nimport anth"
  },
  {
    "path": "autocontext/src/autocontext/agents/model_router.py",
    "chars": 4423,
    "preview": "\"\"\"Tiered model routing based on complexity signals.\n\nInspired by Plankton's pattern-based Haiku/Sonnet/Opus routing tha"
  },
  {
    "path": "autocontext/src/autocontext/agents/orchestrator.py",
    "chars": 39625,
    "preview": "from __future__ import annotations\n\nimport json as _json\nimport logging\nfrom collections.abc import Callable, Sequence\nf"
  },
  {
    "path": "autocontext/src/autocontext/agents/parsers.py",
    "chars": 3310,
    "preview": "from __future__ import annotations\n\nimport logging\nimport re\nfrom typing import Any\n\nfrom autocontext.agents.architect i"
  },
  {
    "path": "autocontext/src/autocontext/agents/pipeline_adapter.py",
    "chars": 3772,
    "preview": "\"\"\"Adapter building a harness PipelineEngine from autocontext orchestrator components.\"\"\"\nfrom __future__ import annotat"
  },
  {
    "path": "autocontext/src/autocontext/agents/provider_bridge.py",
    "chars": 22152,
    "preview": "\"\"\"Bridge adapter: wrap an LLMProvider as a LanguageModelClient.\n\nEnables per-role provider overrides (AC-184) by allowi"
  },
  {
    "path": "autocontext/src/autocontext/agents/role_router.py",
    "chars": 9294,
    "preview": "\"\"\"Capability- and cost-aware role routing (AC-204).\n\nRoutes agent roles to executable providers based on capability req"
  },
  {
    "path": "autocontext/src/autocontext/agents/role_runtime_overrides.py",
    "chars": 2451,
    "preview": "from __future__ import annotations\n\nimport logging\nimport time\nfrom typing import Any\n\nfrom autocontext.agents.subagent_"
  },
  {
    "path": "autocontext/src/autocontext/agents/runtime_session_wiring.py",
    "chars": 1641,
    "preview": "\"\"\"Runtime-session recording glue for Python role execution.\"\"\"\n\nfrom __future__ import annotations\n\nfrom collections.ab"
  },
  {
    "path": "autocontext/src/autocontext/agents/skeptic.py",
    "chars": 4436,
    "preview": "from __future__ import annotations\n\nimport re\nfrom dataclasses import dataclass, field\n\nfrom autocontext.agents.subagent"
  },
  {
    "path": "autocontext/src/autocontext/agents/subagent_runtime.py",
    "chars": 159,
    "preview": "from __future__ import annotations\n\nfrom autocontext.harness.core.subagent import SubagentRuntime, SubagentTask\n\n__all__"
  },
  {
    "path": "autocontext/src/autocontext/agents/translator.py",
    "chars": 5126,
    "preview": "\"\"\"StrategyTranslator — extracts structured JSON strategy from free-form competitor output.\"\"\"\n\nfrom __future__ import a"
  },
  {
    "path": "autocontext/src/autocontext/agents/translator_simplification.py",
    "chars": 8430,
    "preview": "\"\"\"Translator simplification and analyst+coach consolidation spike (AC-188).\n\nTrack 1: Deterministic strategy extraction"
  },
  {
    "path": "autocontext/src/autocontext/agents/trial_summary.py",
    "chars": 990,
    "preview": "from __future__ import annotations\n\nfrom typing import Any\n\nfrom autocontext.agents.types import RoleExecution\n\n\ndef bui"
  },
  {
    "path": "autocontext/src/autocontext/agents/types.py",
    "chars": 1093,
    "preview": "from __future__ import annotations\n\nfrom collections.abc import Callable\nfrom dataclasses import dataclass\nfrom typing i"
  },
  {
    "path": "autocontext/src/autocontext/analytics/__init__.py",
    "chars": 233,
    "preview": "\"\"\"Aggregate analytics for cross-run facets, signal extraction, and pattern clustering.\"\"\"\n\nfrom autocontext.analytics.r"
  },
  {
    "path": "autocontext/src/autocontext/analytics/aggregate_runner.py",
    "chars": 4810,
    "preview": "\"\"\"Aggregate analysis pipeline runner (AC-258 + AC-257).\n\nOrchestrates the full pipeline: load facets → cluster → correl"
  },
  {
    "path": "autocontext/src/autocontext/analytics/artifact_rendering.py",
    "chars": 26131,
    "preview": "\"\"\"Shared renderers for human-facing analytics artifacts.\n\nStructured reports and traces remain the source of truth. Thi"
  },
  {
    "path": "autocontext/src/autocontext/analytics/calibration.py",
    "chars": 8095,
    "preview": "\"\"\"Periodic human calibration and spot-check workflow (AC-260).\n\nDefines a lightweight sampling workflow for human revie"
  },
  {
    "path": "autocontext/src/autocontext/analytics/clustering.py",
    "chars": 5916,
    "preview": "\"\"\"Pattern clustering across runs (AC-256).\n\nGroups similar friction and delight signals across RunFacets,\nsupporting se"
  },
  {
    "path": "autocontext/src/autocontext/analytics/correlation.py",
    "chars": 9505,
    "preview": "\"\"\"Signal correlation across runs (AC-258).\n\nCorrelates aggregate friction/delight clusters with releases, runtime\nenvir"
  },
  {
    "path": "autocontext/src/autocontext/analytics/credit_assignment.py",
    "chars": 10895,
    "preview": "\"\"\"Component sensitivity profiling and credit assignment (AC-199).\n\nTracks which components changed between generations "
  },
  {
    "path": "autocontext/src/autocontext/analytics/cross_runtime_trace_findings.py",
    "chars": 3368,
    "preview": "\"\"\"AC-679 (slice 3a): cross-runtime TraceFindingReport JSON contract.\n\nThe TypeScript package defines the canonical Zod "
  },
  {
    "path": "autocontext/src/autocontext/analytics/events_to_trace.py",
    "chars": 9524,
    "preview": "\"\"\"Convert raw NDJSON event streams into canonical RunTrace artifacts.\"\"\"\n\nfrom __future__ import annotations\n\nimport js"
  },
  {
    "path": "autocontext/src/autocontext/analytics/extractor.py",
    "chars": 7029,
    "preview": "\"\"\"Facet extraction from completed run data (AC-255).\n\nProcesses run metadata from SQLiteStore + ArtifactStore into stru"
  },
  {
    "path": "autocontext/src/autocontext/analytics/facets.py",
    "chars": 3106,
    "preview": "\"\"\"Canonical aggregate facet and run-event schema for completed runs (AC-255).\n\nDefines the structured event model for c"
  },
  {
    "path": "autocontext/src/autocontext/analytics/html_artifact_shell.py",
    "chars": 4355,
    "preview": "\"\"\"Shared HTML document shell for derived analytics artifacts.\"\"\"\n\nfrom __future__ import annotations\n\nfrom html import "
  },
  {
    "path": "autocontext/src/autocontext/analytics/issue_generator.py",
    "chars": 7451,
    "preview": "\"\"\"Thresholded issue and probe generation from friction patterns (AC-257).\n\nGenerates auditable IssueCandidate and Probe"
  },
  {
    "path": "autocontext/src/autocontext/analytics/issue_store.py",
    "chars": 5078,
    "preview": "\"\"\"Persistence for issue and probe candidates (AC-257).\n\nStores IssueCandidate and ProbeCandidate artifacts as JSON file"
  },
  {
    "path": "autocontext/src/autocontext/analytics/regression_fixtures.py",
    "chars": 5483,
    "preview": "\"\"\"Friction analytics → regression fixtures and prevalidation (AC-328).\n\nConverts recurring friction clusters into reusa"
  },
  {
    "path": "autocontext/src/autocontext/analytics/rubric_drift.py",
    "chars": 24005,
    "preview": "\"\"\"Rubric-drift monitoring across runs and releases (AC-259).\n\nDetects when judge rubric or scoring behavior is drifting"
  },
  {
    "path": "autocontext/src/autocontext/analytics/run_trace.py",
    "chars": 5208,
    "preview": "\"\"\"Canonical run-state event model and causal trace artifact (AC-262).\n\nProvides a rich, versioned event schema for repr"
  },
  {
    "path": "autocontext/src/autocontext/analytics/runtime_session_run_trace.py",
    "chars": 15803,
    "preview": "\"\"\"Adapt runtime-session observability logs into canonical RunTrace artifacts.\"\"\"\n\nfrom __future__ import annotations\n\ni"
  },
  {
    "path": "autocontext/src/autocontext/analytics/store.py",
    "chars": 2254,
    "preview": "\"\"\"Facet persistence and querying (AC-255).\n\nStores RunFacet instances as JSON files in a structured directory,\nsupporti"
  },
  {
    "path": "autocontext/src/autocontext/analytics/taxonomy.py",
    "chars": 5389,
    "preview": "\"\"\"Evolving facet taxonomy (AC-256).\n\nManages a taxonomy of facet categories that can grow as new recurring\npatterns are"
  },
  {
    "path": "autocontext/src/autocontext/analytics/timeline_inspector.py",
    "chars": 11391,
    "preview": "\"\"\"Timeline and state inspector for runs and generations (AC-263).\n\nProvides an operator-facing inspection surface for u"
  },
  {
    "path": "autocontext/src/autocontext/analytics/trace_reporter.py",
    "chars": 18903,
    "preview": "\"\"\"Trace-grounded writeups and weakness reports (AC-264).\n\nConsumes canonical run-event traces (AC-262) to produce struc"
  },
  {
    "path": "autocontext/src/autocontext/artifacts/__init__.py",
    "chars": 424,
    "preview": "\"\"\"OpenClaw artifact contract schemas for harnesses, policies, and distilled models.\"\"\"\nfrom __future__ import annotatio"
  },
  {
    "path": "autocontext/src/autocontext/artifacts/models.py",
    "chars": 4746,
    "preview": "\"\"\"Portable artifact schemas for the OpenClaw/ClawHub contract.\n\nDefines Pydantic models for the three artifact types ex"
  },
  {
    "path": "autocontext/src/autocontext/banner.py",
    "chars": 7556,
    "preview": "\"\"\"ASCII banner for autocontext CLI and terminal surfaces.\n\nThe banner art uses the figlet 'Colossal' style, chosen for "
  },
  {
    "path": "autocontext/src/autocontext/blobstore/__init__.py",
    "chars": 395,
    "preview": "\"\"\"Deduplicated bucket-backed blob store (AC-518).\"\"\"\n\nfrom __future__ import annotations\n\nfrom autocontext.blobstore.fa"
  },
  {
    "path": "autocontext/src/autocontext/blobstore/cache.py",
    "chars": 3364,
    "preview": "\"\"\"Hydration cache — local cache for remote-backed blobs (AC-518 Phase 2).\n\nProvides digest-verified retrieval and LRU e"
  },
  {
    "path": "autocontext/src/autocontext/blobstore/factory.py",
    "chars": 1056,
    "preview": "\"\"\"BlobStore factory (AC-518).\"\"\"\n\nfrom __future__ import annotations\n\nfrom pathlib import Path\n\nfrom autocontext.blobst"
  },
  {
    "path": "autocontext/src/autocontext/blobstore/hf_bucket.py",
    "chars": 7897,
    "preview": "\"\"\"Hugging Face Bucket blob store backend (AC-518).\n\nWraps ``huggingface-cli`` for upload/download. Uses a local cache\nd"
  },
  {
    "path": "autocontext/src/autocontext/blobstore/local.py",
    "chars": 3656,
    "preview": "\"\"\"Local filesystem blob store — content-addressed by SHA256 (AC-518).\"\"\"\n\nfrom __future__ import annotations\n\nimport ha"
  },
  {
    "path": "autocontext/src/autocontext/blobstore/mirror.py",
    "chars": 2463,
    "preview": "\"\"\"BlobMirror — hooks artifact writes into blob store (AC-518 Phase 2).\n\nIntercepts large artifact writes and mirrors th"
  },
  {
    "path": "autocontext/src/autocontext/blobstore/ref.py",
    "chars": 1758,
    "preview": "\"\"\"BlobRef — structured artifact locator (AC-518).\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import datac"
  },
  {
    "path": "autocontext/src/autocontext/blobstore/registry.py",
    "chars": 1588,
    "preview": "\"\"\"BlobRegistry — tracks BlobRefs by run + artifact name (AC-518).\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nf"
  },
  {
    "path": "autocontext/src/autocontext/blobstore/store.py",
    "chars": 3451,
    "preview": "\"\"\"BlobStore abstract base class (AC-518).\n\nBackend-agnostic interface for large artifact storage. Implementations\nmust "
  },
  {
    "path": "autocontext/src/autocontext/blobstore/sync.py",
    "chars": 3149,
    "preview": "\"\"\"SyncManager — bulk sync local runs to blob store (AC-518 Phase 2).\"\"\"\n\nfrom __future__ import annotations\n\nimport has"
  },
  {
    "path": "autocontext/src/autocontext/bootstrap/__init__.py",
    "chars": 568,
    "preview": "\"\"\"Environment snapshot bootstrapping (AC-503).\"\"\"\n\nfrom __future__ import annotations\n\nfrom autocontext.bootstrap.colle"
  },
  {
    "path": "autocontext/src/autocontext/bootstrap/collector.py",
    "chars": 8887,
    "preview": "\"\"\"Environment snapshot collector (AC-503).\n\nGathers environment info via stdlib only. Each helper catches all exception"
  },
  {
    "path": "autocontext/src/autocontext/bootstrap/redactor.py",
    "chars": 3371,
    "preview": "\"\"\"Environment snapshot redaction (AC-503).\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfr"
  },
  {
    "path": "autocontext/src/autocontext/bootstrap/renderer.py",
    "chars": 2269,
    "preview": "\"\"\"Environment snapshot prompt rendering (AC-503).\"\"\"\n\nfrom __future__ import annotations\n\nimport json\n\nfrom autocontext"
  },
  {
    "path": "autocontext/src/autocontext/bootstrap/snapshot.py",
    "chars": 3966,
    "preview": "\"\"\"Environment snapshot domain model (AC-503).\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass"
  },
  {
    "path": "autocontext/src/autocontext/cli.py",
    "chars": 58355,
    "preview": "from __future__ import annotations\n\nimport dataclasses\nimport json\nimport logging\nimport os\nimport sys\nimport threading\n"
  },
  {
    "path": "autocontext/src/autocontext/cli_analytics.py",
    "chars": 15268,
    "preview": "from __future__ import annotations\n\nimport importlib\nfrom collections.abc import Callable\nfrom pathlib import Path\nfrom "
  },
  {
    "path": "autocontext/src/autocontext/cli_family_name.py",
    "chars": 4191,
    "preview": "\"\"\"FamilyName — operator-supplied scenario-family value object (AC-738).\n\nCLI commands that accept ``--family <name>`` t"
  },
  {
    "path": "autocontext/src/autocontext/cli_hermes.py",
    "chars": 13214,
    "preview": "from __future__ import annotations\n\nimport importlib\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Annotate"
  },
  {
    "path": "autocontext/src/autocontext/cli_hermes_runners.py",
    "chars": 21231,
    "preview": "\"\"\"Runner functions backing the `autoctx hermes` typer subcommands.\n\nSplit out of ``cli_hermes.py`` (PR #973 review P1) "
  },
  {
    "path": "autocontext/src/autocontext/cli_improve.py",
    "chars": 11082,
    "preview": "\"\"\"Registration of the `autoctx improve` command.\n\nExtracted from `cli.py` to keep that file under the grandfathered mod"
  },
  {
    "path": "autocontext/src/autocontext/cli_investigate.py",
    "chars": 5218,
    "preview": "from __future__ import annotations\n\nfrom collections.abc import Callable\nfrom typing import TYPE_CHECKING, Any, Protocol"
  },
  {
    "path": "autocontext/src/autocontext/cli_new_scenario.py",
    "chars": 7092,
    "preview": "from __future__ import annotations\n\nimport importlib\nimport logging\nfrom pathlib import Path\nfrom typing import Any\n\nimp"
  },
  {
    "path": "autocontext/src/autocontext/cli_queue.py",
    "chars": 5902,
    "preview": "from __future__ import annotations\n\nimport importlib\nimport re\nfrom collections.abc import Callable\nfrom typing import T"
  },
  {
    "path": "autocontext/src/autocontext/cli_role_runtime.py",
    "chars": 3534,
    "preview": "from __future__ import annotations\n\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any\n\nfrom autocontext.age"
  },
  {
    "path": "autocontext/src/autocontext/cli_runtime_overrides.py",
    "chars": 6467,
    "preview": "from __future__ import annotations\n\nimport re\nfrom typing import Any\n\nfrom autocontext.config.settings import AppSetting"
  },
  {
    "path": "autocontext/src/autocontext/cli_solve.py",
    "chars": 10333,
    "preview": "from __future__ import annotations\n\nimport dataclasses\nimport importlib\nfrom collections.abc import Callable\nfrom datacl"
  },
  {
    "path": "autocontext/src/autocontext/cli_task_input.py",
    "chars": 3631,
    "preview": "\"\"\"TaskInput — operator-supplied task value object (AC-737).\n\nCLI commands that take a \"task\" can accept it as either an"
  },
  {
    "path": "autocontext/src/autocontext/cli_worker.py",
    "chars": 6870,
    "preview": "from __future__ import annotations\n\nimport importlib\nfrom collections.abc import Callable\nfrom typing import TYPE_CHECKI"
  },
  {
    "path": "autocontext/src/autocontext/concepts.py",
    "chars": 5417,
    "preview": "\"\"\"Canonical concept model metadata for capability discovery surfaces.\"\"\"\n\nfrom __future__ import annotations\n\nfrom copy"
  },
  {
    "path": "autocontext/src/autocontext/config/__init__.py",
    "chars": 320,
    "preview": "from .harness_profile import HarnessRuntimeProfile, render_harness_tool_context, resolve_harness_runtime_profile\nfrom .s"
  },
  {
    "path": "autocontext/src/autocontext/config/harness_profile.py",
    "chars": 2522,
    "preview": "\"\"\"Runtime harness profile value objects.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import TYPE_CHECKING\n\nfrom"
  },
  {
    "path": "autocontext/src/autocontext/config/presets.py",
    "chars": 2651,
    "preview": "\"\"\"Settings preset definitions (AC-173).\n\nNamed presets: quick, standard, deep, rapid, long_run, short_run.\nEach preset "
  },
  {
    "path": "autocontext/src/autocontext/config/settings.py",
    "chars": 38028,
    "preview": "from __future__ import annotations\n\nimport logging\nimport os\nfrom enum import StrEnum\nfrom pathlib import Path\nfrom typi"
  },
  {
    "path": "autocontext/src/autocontext/config/tuning_bounds.py",
    "chars": 2054,
    "preview": "\"\"\"Canonical tuning bounds for meta-parameter validation.\n\nBoth the AR-3 research protocol (protocol.py) and AR-6 archit"
  },
  {
    "path": "autocontext/src/autocontext/consultation/__init__.py",
    "chars": 89,
    "preview": "\"\"\"AC-212: Escalation-based provider consultation.\"\"\"\nfrom __future__ import annotations\n"
  },
  {
    "path": "autocontext/src/autocontext/consultation/runner.py",
    "chars": 3677,
    "preview": "\"\"\"Consultation runner — calls secondary provider for advisory opinion (AC-212).\"\"\"\nfrom __future__ import annotations\n\n"
  },
  {
    "path": "autocontext/src/autocontext/consultation/stage.py",
    "chars": 4505,
    "preview": "\"\"\"Pipeline stage for provider consultation (AC-212).\n\nOptionally consults a secondary provider when triggers indicate a"
  },
  {
    "path": "autocontext/src/autocontext/consultation/triggers.py",
    "chars": 1602,
    "preview": "\"\"\"Trigger detection for provider consultation (AC-212).\"\"\"\nfrom __future__ import annotations\n\nfrom collections.abc imp"
  },
  {
    "path": "autocontext/src/autocontext/consultation/types.py",
    "chars": 1726,
    "preview": "\"\"\"Consultation types for AC-212: escalation-based provider consultation.\"\"\"\nfrom __future__ import annotations\n\nfrom da"
  },
  {
    "path": "autocontext/src/autocontext/evaluation/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "autocontext/src/autocontext/evaluation/ab_runner.py",
    "chars": 4046,
    "preview": "\"\"\"A/B testing framework for autocontext configuration comparison.\n\nInspired by Plankton's SWE-bench A/B testing with Mc"
  },
  {
    "path": "autocontext/src/autocontext/evaluation/ab_stats.py",
    "chars": 3032,
    "preview": "\"\"\"McNemar's statistical test for A/B testing results.\n\nInspired by Plankton's SWE-bench A/B analysis with binomial p-va"
  },
  {
    "path": "autocontext/src/autocontext/evidence/__init__.py",
    "chars": 689,
    "preview": "\"\"\"Browsable prior-run evidence workspace (AC-504).\"\"\"\n\nfrom __future__ import annotations\n\nfrom autocontext.evidence.ma"
  },
  {
    "path": "autocontext/src/autocontext/evidence/manifest.py",
    "chars": 4795,
    "preview": "\"\"\"Evidence workspace prompt rendering (AC-504).\"\"\"\n\nfrom __future__ import annotations\n\nfrom collections import Counter"
  },
  {
    "path": "autocontext/src/autocontext/evidence/materializer.py",
    "chars": 15638,
    "preview": "\"\"\"Evidence workspace materializer (AC-504).\n\nScans prior-run directories and knowledge artifacts, copies them into a\nfl"
  },
  {
    "path": "autocontext/src/autocontext/evidence/tracker.py",
    "chars": 2336,
    "preview": "\"\"\"Evidence access tracking (AC-504).\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nfrom collections import Counte"
  },
  {
    "path": "autocontext/src/autocontext/evidence/workspace.py",
    "chars": 3365,
    "preview": "\"\"\"Evidence workspace domain model (AC-504).\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass, "
  },
  {
    "path": "autocontext/src/autocontext/execution/__init__.py",
    "chars": 647,
    "preview": "from .action_filter import ActionFilterHarness\nfrom .phased_execution import (\n    PhaseBudget,\n    PhasedExecutionPlan,"
  },
  {
    "path": "autocontext/src/autocontext/execution/action_filter.py",
    "chars": 8014,
    "preview": "\"\"\"ActionFilterHarness — constrains LLM action selection to valid moves.\n\nWraps match execution to enumerate legal actio"
  },
  {
    "path": "autocontext/src/autocontext/execution/agent_task_evolution.py",
    "chars": 12209,
    "preview": "\"\"\"Multi-generation support for AgentTask scenarios (AC-281).\"\"\"\n\nfrom __future__ import annotations\n\nfrom collections.a"
  },
  {
    "path": "autocontext/src/autocontext/execution/ast_safety.py",
    "chars": 2484,
    "preview": "\"\"\"AST safety checker — rejects dangerous patterns before code execution.\n\nWalks the AST of architect-generated harness "
  },
  {
    "path": "autocontext/src/autocontext/execution/bias_probes.py",
    "chars": 3336,
    "preview": "from __future__ import annotations\n\nimport logging\nfrom typing import Any\n\nfrom pydantic import BaseModel, Field, comput"
  },
  {
    "path": "autocontext/src/autocontext/execution/evaluator_guardrail.py",
    "chars": 3808,
    "preview": "\"\"\"Live evaluator guardrails for disagreement and bias probes (AC-330).\"\"\"\n\nfrom __future__ import annotations\n\nimport l"
  },
  {
    "path": "autocontext/src/autocontext/execution/executors/__init__.py",
    "chars": 566,
    "preview": "from .base import ExecutionEngine\nfrom .gondolin_contract import (\n    GondolinBackend,\n    GondolinExecutionRequest,\n  "
  },
  {
    "path": "autocontext/src/autocontext/execution/executors/base.py",
    "chars": 500,
    "preview": "from __future__ import annotations\n\nfrom collections.abc import Mapping\nfrom typing import Any, Protocol\n\nfrom autoconte"
  },
  {
    "path": "autocontext/src/autocontext/execution/executors/gondolin_contract.py",
    "chars": 1840,
    "preview": "\"\"\"Contract for optional Gondolin-backed microVM execution.\n\nThis module intentionally contains only request/response sh"
  },
  {
    "path": "autocontext/src/autocontext/execution/executors/local.py",
    "chars": 3633,
    "preview": "from __future__ import annotations\n\nimport resource\nimport sys\nfrom collections.abc import Mapping\nfrom concurrent.futur"
  },
  {
    "path": "autocontext/src/autocontext/execution/executors/monty.py",
    "chars": 11750,
    "preview": "\"\"\"MontyExecutor — sandboxed execution via pydantic-monty interpreter.\"\"\"\nfrom __future__ import annotations\n\nimport log"
  },
  {
    "path": "autocontext/src/autocontext/execution/executors/primeintellect.py",
    "chars": 1327,
    "preview": "from __future__ import annotations\n\nfrom collections.abc import Mapping\nfrom typing import Any\n\nfrom autocontext.integra"
  },
  {
    "path": "autocontext/src/autocontext/execution/executors/ssh.py",
    "chars": 4898,
    "preview": "\"\"\"Trusted SSH executor — runs strategy matches on user-owned machines.\n\nExplicit, auditable remote execution for truste"
  },
  {
    "path": "autocontext/src/autocontext/execution/harness_coverage.py",
    "chars": 3212,
    "preview": "\"\"\"HarnessCoverageAnalyzer - measures harness protection level for model tiering.\n\nAnalyzes loaded harness validators to"
  },
  {
    "path": "autocontext/src/autocontext/execution/harness_loader.py",
    "chars": 7678,
    "preview": "\"\"\"HarnessLoader — loads and runs architect-generated executable validators.\n\nLoads .py files from knowledge/<scenario>/"
  },
  {
    "path": "autocontext/src/autocontext/execution/harness_synthesizer.py",
    "chars": 9468,
    "preview": "\"\"\"HarnessSynthesizer — iterative LLM refinement loop for harness code.\n\nGenerates an initial harness from a scenario de"
  },
  {
    "path": "autocontext/src/autocontext/execution/harness_tester.py",
    "chars": 19661,
    "preview": "\"\"\"HarnessTester — validates candidate harness code against sample states in parallel.\n\nRuns each harness function (``en"
  },
  {
    "path": "autocontext/src/autocontext/execution/improvement_events.py",
    "chars": 2585,
    "preview": "\"\"\"Per-round event value objects emitted by `ImprovementLoop` (AC-752).\n\nThese exist so callers (CLI `--ndjson`, dashboa"
  },
  {
    "path": "autocontext/src/autocontext/execution/improvement_loop.py",
    "chars": 30188,
    "preview": "\"\"\"Multi-step improvement loop for agent tasks.\n\nOrchestrates: generate -> judge -> revise -> judge -> ... -> done.\nStop"
  },
  {
    "path": "autocontext/src/autocontext/execution/judge.py",
    "chars": 22265,
    "preview": "from __future__ import annotations\n\nimport json\nimport logging\nimport math\nimport re\nfrom collections.abc import Sequenc"
  },
  {
    "path": "autocontext/src/autocontext/execution/judge_executor.py",
    "chars": 1408,
    "preview": "from __future__ import annotations\n\nfrom autocontext.scenarios.agent_task import AgentTaskInterface, AgentTaskResult\n\n\nc"
  },
  {
    "path": "autocontext/src/autocontext/execution/objective_verification.py",
    "chars": 11580,
    "preview": "\"\"\"Generic objective verification harness for verifiable domains (AC-282).\n\nProvides a domain-agnostic oracle framework "
  },
  {
    "path": "autocontext/src/autocontext/execution/output_cleaner.py",
    "chars": 4193,
    "preview": "\"\"\"Strip revision metadata from agent outputs.\n\nLLM revision agents often prepend/append analysis headers, self-assessme"
  },
  {
    "path": "autocontext/src/autocontext/execution/output_verifier.py",
    "chars": 8742,
    "preview": "\"\"\"External-command verifier for improvement-loop outputs.\n\nAC-733: the LLM judge cannot run a real verifier (compiler, "
  },
  {
    "path": "autocontext/src/autocontext/execution/phased_execution.py",
    "chars": 9171,
    "preview": "\"\"\"Phased execution with separate budgets and timeouts (AC-244).\n\nSplits agent-task scaffolding and execution into indep"
  },
  {
    "path": "autocontext/src/autocontext/execution/policy_executor.py",
    "chars": 11549,
    "preview": "\"\"\"PolicyExecutor — zero-LLM match execution of code policies.\n\nRuns a Python code policy (``choose_action(state) -> dic"
  },
  {
    "path": "autocontext/src/autocontext/execution/policy_refinement.py",
    "chars": 11114,
    "preview": "\"\"\"PolicyRefinementLoop — iterative code-policy synthesis.\n\nIteratively improves a Python code policy for a scenario by:"
  },
  {
    "path": "autocontext/src/autocontext/execution/queued_task_browser_context.py",
    "chars": 2349,
    "preview": "\"\"\"Browser-backed reference-context enrichment for queued tasks.\"\"\"\n\nfrom __future__ import annotations\n\nfrom dataclasse"
  },
  {
    "path": "autocontext/src/autocontext/execution/rubric_calibration.py",
    "chars": 13233,
    "preview": "\"\"\"Rubric calibration — human anchors, judge variance, and alignment (AC-283).\n\nInfrastructure for validating LLM-genera"
  },
  {
    "path": "autocontext/src/autocontext/execution/rubric_coherence.py",
    "chars": 3253,
    "preview": "from __future__ import annotations\n\nimport re\nfrom dataclasses import dataclass, field\n\n\n@dataclass(slots=True)\nclass Ru"
  },
  {
    "path": "autocontext/src/autocontext/execution/sample_states.py",
    "chars": 7478,
    "preview": "\"\"\"SampleStateGenerator — produces diverse game states for harness testing.\n\nSimulates random play from a ScenarioInterf"
  },
  {
    "path": "autocontext/src/autocontext/execution/simple_agent_task_workflow.py",
    "chars": 4642,
    "preview": "\"\"\"Prompt helpers for simple queued agent tasks.\"\"\"\n\nfrom __future__ import annotations\n\nfrom autocontext.providers.base"
  },
  {
    "path": "autocontext/src/autocontext/execution/strategy_validator.py",
    "chars": 2592,
    "preview": "\"\"\"Strategy pre-validation via self-play dry-run before tournament.\"\"\"\n\nfrom __future__ import annotations\n\nimport json\n"
  },
  {
    "path": "autocontext/src/autocontext/execution/supervisor.py",
    "chars": 1073,
    "preview": "from __future__ import annotations\n\nfrom collections.abc import Mapping\nfrom dataclasses import dataclass\n\nfrom autocont"
  },
  {
    "path": "autocontext/src/autocontext/execution/task_queue_store.py",
    "chars": 1710,
    "preview": "\"\"\"Task queue storage contract for background workers.\n\nThe open-source worker uses :class:`SQLiteStore`, but the task r"
  },
  {
    "path": "autocontext/src/autocontext/execution/task_runner.py",
    "chars": 37580,
    "preview": "\"\"\"Task runner daemon for always-on evaluation.\n\nPolls a SQLite-backed task queue, runs ImprovementLoop for each task,\na"
  },
  {
    "path": "autocontext/src/autocontext/execution/trajectory_harness.py",
    "chars": 9670,
    "preview": "\"\"\"Multi-seed trajectory test harness for knowledge-heavy domains (AC-284).\n\nRuns AgentTaskEvolutionRunner across multip"
  },
  {
    "path": "autocontext/src/autocontext/execution/verification_dataset.py",
    "chars": 11118,
    "preview": "\"\"\"Verification dataset registry, provenance, and oracle feedback (AC-292).\n\nManages versioned ground-truth datasets for"
  },
  {
    "path": "autocontext/src/autocontext/extensions/__init__.py",
    "chars": 800,
    "preview": "\"\"\"Pi-shaped extension hooks for autocontext runtime surfaces.\"\"\"\n\nfrom autocontext.extensions.hooks import (\n    Extens"
  },
  {
    "path": "autocontext/src/autocontext/extensions/hooks.py",
    "chars": 6390,
    "preview": "from __future__ import annotations\n\nfrom collections.abc import Callable, Iterator, Mapping\nfrom contextlib import conte"
  },
  {
    "path": "autocontext/src/autocontext/extensions/llm.py",
    "chars": 8811,
    "preview": "from __future__ import annotations\n\nfrom dataclasses import asdict\nfrom typing import Any\n\nfrom autocontext.extensions.h"
  }
]

// ... and 3077 more files (download for full content)

About this extraction

This page contains the full source code of the greyhaven-ai/autocontext GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 3277 files (16.5 MB), approximately 4.5M tokens, and a symbol index with 22331 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!