{
  "schema_version": "codelens-runtime-surface-contract",
  "workspace": {
    "version": "1.13.35",
    "description": "Rust MCP code intelligence for coding agents \u2014 live indexes, bounded hybrid retrieval, host-neutral workflows, single-writer sessions, and mutation gates.",
    "members": [
      "crates/codelens-engine",
      "crates/codelens-mcp"
    ],
    "member_count": 2
  },
  "tool_registry": {
    "definition_count": 100,
    "output_schema_count": 71,
    "namespaces": {
      "filesystem": 5,
      "graph": 11,
      "lsp": 2,
      "memory": 5,
      "reports": 23,
      "session": 40,
      "symbols": 14
    },
    "tiers": {
      "analysis": 25,
      "primitive": 47,
      "workflow": 28
    },
    "phases": {
      "agnostic": 47,
      "build": 1,
      "eval": 8,
      "plan": 26,
      "review": 18
    },
    "execution_classes": {
      "analyze": 39,
      "mutate": 16,
      "read": 45
    },
    "tools": [
      {
        "name": "get_current_config",
        "namespace": "session",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 395
      },
      {
        "name": "read_file",
        "namespace": "filesystem",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 182
      },
      {
        "name": "list_dir",
        "namespace": "filesystem",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": false,
        "estimated_tokens": 155
      },
      {
        "name": "find_file",
        "namespace": "filesystem",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": false,
        "estimated_tokens": 102
      },
      {
        "name": "find_annotations",
        "namespace": "filesystem",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 160
      },
      {
        "name": "find_tests",
        "namespace": "filesystem",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 153
      },
      {
        "name": "get_symbols_overview",
        "namespace": "symbols",
        "tier": "primitive",
        "phase": "plan",
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 585
      },
      {
        "name": "find_symbol",
        "namespace": "symbols",
        "tier": "primitive",
        "phase": "plan",
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 835
      },
      {
        "name": "get_ranked_context",
        "namespace": "symbols",
        "tier": "analysis",
        "phase": "plan",
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 1568
      },
      {
        "name": "search",
        "namespace": "symbols",
        "tier": "workflow",
        "phase": "plan",
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 598
      },
      {
        "name": "overview",
        "namespace": "symbols",
        "tier": "workflow",
        "phase": "plan",
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 310
      },
      {
        "name": "bm25_symbol_search",
        "namespace": "symbols",
        "tier": "analysis",
        "phase": null,
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 645
      },
      {
        "name": "search_symbols_fuzzy",
        "namespace": "symbols",
        "tier": "analysis",
        "phase": "plan",
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": false,
        "estimated_tokens": 194
      },
      {
        "name": "get_complexity",
        "namespace": "graph",
        "tier": "analysis",
        "phase": "plan",
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 199
      },
      {
        "name": "refresh_symbol_index",
        "namespace": "session",
        "tier": "workflow",
        "phase": null,
        "execution_policy": {
          "execution_class": "mutate",
          "risk": "medium",
          "cost_hint": "medium",
          "concurrency_safe": false
        },
        "has_output_schema": true,
        "estimated_tokens": 268
      },
      {
        "name": "diagnose",
        "namespace": "reports",
        "tier": "workflow",
        "phase": "review",
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 299
      },
      {
        "name": "find_referencing_symbols",
        "namespace": "symbols",
        "tier": "primitive",
        "phase": "plan",
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 984
      },
      {
        "name": "get_file_diagnostics",
        "namespace": "lsp",
        "tier": "primitive",
        "phase": "review",
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 488
      },
      {
        "name": "search_workspace_symbols",
        "namespace": "symbols",
        "tier": "primitive",
        "phase": "plan",
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": false,
        "estimated_tokens": 229
      },
      {
        "name": "get_type_hierarchy",
        "namespace": "symbols",
        "tier": "analysis",
        "phase": "plan",
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 331
      },
      {
        "name": "resolve_symbol_target",
        "namespace": "session",
        "tier": "analysis",
        "phase": null,
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 450
      },
      {
        "name": "find_declaration",
        "namespace": "session",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 550
      },
      {
        "name": "find_implementations",
        "namespace": "session",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 559
      },
      {
        "name": "get_diagnostics_for_symbol",
        "namespace": "session",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 445
      },
      {
        "name": "plan_symbol_rename",
        "namespace": "symbols",
        "tier": "analysis",
        "phase": "plan",
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": false,
        "estimated_tokens": 230
      },
      {
        "name": "get_lsp_recipe",
        "namespace": "lsp",
        "tier": "primitive",
        "phase": "review",
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": false,
        "estimated_tokens": 214
      },
      {
        "name": "graph",
        "namespace": "graph",
        "tier": "workflow",
        "phase": "plan",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 401
      },
      {
        "name": "analyze",
        "namespace": "reports",
        "tier": "workflow",
        "phase": "review",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": false,
        "estimated_tokens": 257
      },
      {
        "name": "get_changed_files",
        "namespace": "graph",
        "tier": "primitive",
        "phase": "plan",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 161
      },
      {
        "name": "get_callers",
        "namespace": "graph",
        "tier": "analysis",
        "phase": null,
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 520
      },
      {
        "name": "get_callees",
        "namespace": "graph",
        "tier": "analysis",
        "phase": null,
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 504
      },
      {
        "name": "find_scoped_references",
        "namespace": "graph",
        "tier": "analysis",
        "phase": "plan",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 559
      },
      {
        "name": "get_symbol_importance",
        "namespace": "graph",
        "tier": "analysis",
        "phase": "plan",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 130
      },
      {
        "name": "verify_change_readiness",
        "namespace": "reports",
        "tier": "workflow",
        "phase": "review",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 858
      },
      {
        "name": "onboard_project",
        "namespace": "session",
        "tier": "workflow",
        "phase": null,
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": false,
        "estimated_tokens": 117
      },
      {
        "name": "analyze_change_request",
        "namespace": "session",
        "tier": "workflow",
        "phase": null,
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": false,
        "estimated_tokens": 180
      },
      {
        "name": "orchestrate_change",
        "namespace": "session",
        "tier": "workflow",
        "phase": null,
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": false,
        "estimated_tokens": 389
      },
      {
        "name": "module_boundary_report",
        "namespace": "reports",
        "tier": "workflow",
        "phase": "plan",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 811
      },
      {
        "name": "mermaid_module_graph",
        "namespace": "reports",
        "tier": "workflow",
        "phase": "plan",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 823
      },
      {
        "name": "safe_rename_report",
        "namespace": "reports",
        "tier": "workflow",
        "phase": "review",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 836
      },
      {
        "name": "unresolved_reference_check",
        "namespace": "reports",
        "tier": "workflow",
        "phase": "review",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 848
      },
      {
        "name": "dead_code_report",
        "namespace": "reports",
        "tier": "workflow",
        "phase": "review",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 839
      },
      {
        "name": "impact_report",
        "namespace": "reports",
        "tier": "workflow",
        "phase": "plan",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 800
      },
      {
        "name": "refactor_safety_report",
        "namespace": "reports",
        "tier": "workflow",
        "phase": "review",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 811
      },
      {
        "name": "diff_aware_references",
        "namespace": "reports",
        "tier": "workflow",
        "phase": "review",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 796
      },
      {
        "name": "start_analysis_job",
        "namespace": "reports",
        "tier": "workflow",
        "phase": "eval",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 529
      },
      {
        "name": "get_analysis_job",
        "namespace": "reports",
        "tier": "primitive",
        "phase": "eval",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 286
      },
      {
        "name": "cancel_analysis_job",
        "namespace": "reports",
        "tier": "workflow",
        "phase": "eval",
        "execution_policy": {
          "execution_class": "mutate",
          "risk": "medium",
          "cost_hint": "medium",
          "concurrency_safe": false
        },
        "has_output_schema": true,
        "estimated_tokens": 298
      },
      {
        "name": "list_analysis_jobs",
        "namespace": "session",
        "tier": "primitive",
        "phase": "eval",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 357
      },
      {
        "name": "list_analysis_artifacts",
        "namespace": "session",
        "tier": "primitive",
        "phase": "eval",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 215
      },
      {
        "name": "get_analysis_section",
        "namespace": "reports",
        "tier": "primitive",
        "phase": "eval",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 140
      },
      {
        "name": "review",
        "namespace": "reports",
        "tier": "workflow",
        "phase": "review",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 348
      },
      {
        "name": "explore_codebase",
        "namespace": "reports",
        "tier": "workflow",
        "phase": "plan",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 210
      },
      {
        "name": "trace_request_path",
        "namespace": "reports",
        "tier": "workflow",
        "phase": "plan",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 208
      },
      {
        "name": "review_architecture",
        "namespace": "reports",
        "tier": "workflow",
        "phase": "plan",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 181
      },
      {
        "name": "plan_safe_refactor",
        "namespace": "reports",
        "tier": "workflow",
        "phase": "plan",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 203
      },
      {
        "name": "cleanup_duplicate_logic",
        "namespace": "reports",
        "tier": "workflow",
        "phase": "build",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 293
      },
      {
        "name": "review_changes",
        "namespace": "reports",
        "tier": "workflow",
        "phase": "review",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 206
      },
      {
        "name": "diagnose_issues",
        "namespace": "reports",
        "tier": "workflow",
        "phase": "review",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "medium",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 197
      },
      {
        "name": "activate_project",
        "namespace": "session",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 331
      },
      {
        "name": "prepare_harness_session",
        "namespace": "session",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "mutate",
          "risk": "medium",
          "cost_hint": "medium",
          "concurrency_safe": false
        },
        "has_output_schema": true,
        "estimated_tokens": 5032
      },
      {
        "name": "register_agent_work",
        "namespace": "session",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "mutate",
          "risk": "medium",
          "cost_hint": "medium",
          "concurrency_safe": false
        },
        "has_output_schema": true,
        "estimated_tokens": 224
      },
      {
        "name": "list_active_agents",
        "namespace": "session",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 120
      },
      {
        "name": "claim_files",
        "namespace": "session",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "mutate",
          "risk": "medium",
          "cost_hint": "medium",
          "concurrency_safe": false
        },
        "has_output_schema": true,
        "estimated_tokens": 236
      },
      {
        "name": "release_files",
        "namespace": "session",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "mutate",
          "risk": "medium",
          "cost_hint": "medium",
          "concurrency_safe": false
        },
        "has_output_schema": true,
        "estimated_tokens": 206
      },
      {
        "name": "get_watch_status",
        "namespace": "session",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 209
      },
      {
        "name": "prune_index_failures",
        "namespace": "session",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "mutate",
          "risk": "medium",
          "cost_hint": "medium",
          "concurrency_safe": false
        },
        "has_output_schema": true,
        "estimated_tokens": 172
      },
      {
        "name": "add_queryable_project",
        "namespace": "session",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "mutate",
          "risk": "high",
          "cost_hint": "medium",
          "concurrency_safe": false
        },
        "has_output_schema": false,
        "estimated_tokens": 108
      },
      {
        "name": "remove_queryable_project",
        "namespace": "session",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "mutate",
          "risk": "high",
          "cost_hint": "medium",
          "concurrency_safe": false
        },
        "has_output_schema": false,
        "estimated_tokens": 100
      },
      {
        "name": "query_project",
        "namespace": "session",
        "tier": "analysis",
        "phase": null,
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": false,
        "estimated_tokens": 150
      },
      {
        "name": "list_queryable_projects",
        "namespace": "session",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": false,
        "estimated_tokens": 87
      },
      {
        "name": "set_preset",
        "namespace": "session",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "mutate",
          "risk": "medium",
          "cost_hint": "medium",
          "concurrency_safe": false
        },
        "has_output_schema": false,
        "estimated_tokens": 133
      },
      {
        "name": "set_profile",
        "namespace": "session",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "mutate",
          "risk": "medium",
          "cost_hint": "medium",
          "concurrency_safe": false
        },
        "has_output_schema": false,
        "estimated_tokens": 150
      },
      {
        "name": "get_capabilities",
        "namespace": "session",
        "tier": "analysis",
        "phase": null,
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 1228
      },
      {
        "name": "get_tool_metrics",
        "namespace": "session",
        "tier": "primitive",
        "phase": "eval",
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 237
      },
      {
        "name": "audit_builder_session",
        "namespace": "session",
        "tier": "analysis",
        "phase": "review",
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 365
      },
      {
        "name": "audit_planner_session",
        "namespace": "session",
        "tier": "analysis",
        "phase": "review",
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 363
      },
      {
        "name": "export_session_markdown",
        "namespace": "session",
        "tier": "primitive",
        "phase": "eval",
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 233
      },
      {
        "name": "audit_log_query",
        "namespace": "session",
        "tier": "analysis",
        "phase": null,
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 412
      },
      {
        "name": "audit_tool_surface_consistency",
        "namespace": "session",
        "tier": "analysis",
        "phase": null,
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 381
      },
      {
        "name": "find_phantom_modules",
        "namespace": "session",
        "tier": "analysis",
        "phase": null,
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 251
      },
      {
        "name": "find_redundant_definitions",
        "namespace": "session",
        "tier": "analysis",
        "phase": null,
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 264
      },
      {
        "name": "find_over_visible_apis",
        "namespace": "session",
        "tier": "analysis",
        "phase": null,
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 359
      },
      {
        "name": "audit_memory_consistency",
        "namespace": "session",
        "tier": "analysis",
        "phase": null,
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": false,
        "estimated_tokens": 241
      },
      {
        "name": "list_memories",
        "namespace": "memory",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 162
      },
      {
        "name": "read_memory",
        "namespace": "memory",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": false,
        "estimated_tokens": 128
      },
      {
        "name": "write_memory",
        "namespace": "memory",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "mutate",
          "risk": "high",
          "cost_hint": "medium",
          "concurrency_safe": false
        },
        "has_output_schema": false,
        "estimated_tokens": 130
      },
      {
        "name": "delete_memory",
        "namespace": "memory",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "mutate",
          "risk": "high",
          "cost_hint": "medium",
          "concurrency_safe": false
        },
        "has_output_schema": false,
        "estimated_tokens": 126
      },
      {
        "name": "rename_memory",
        "namespace": "memory",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "mutate",
          "risk": "high",
          "cost_hint": "medium",
          "concurrency_safe": false
        },
        "has_output_schema": false,
        "estimated_tokens": 139
      },
      {
        "name": "archive_memory",
        "namespace": "session",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "mutate",
          "risk": "high",
          "cost_hint": "medium",
          "concurrency_safe": false
        },
        "has_output_schema": false,
        "estimated_tokens": 135
      },
      {
        "name": "restore_memory",
        "namespace": "session",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "mutate",
          "risk": "high",
          "cost_hint": "medium",
          "concurrency_safe": false
        },
        "has_output_schema": false,
        "estimated_tokens": 153
      },
      {
        "name": "list_archived",
        "namespace": "session",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": false,
        "estimated_tokens": 108
      },
      {
        "name": "read_policy",
        "namespace": "session",
        "tier": "primitive",
        "phase": null,
        "execution_policy": {
          "execution_class": "read",
          "risk": "low",
          "cost_hint": "low",
          "concurrency_safe": true
        },
        "has_output_schema": false,
        "estimated_tokens": 107
      },
      {
        "name": "find_misplaced_code",
        "namespace": "graph",
        "tier": "analysis",
        "phase": "review",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "high",
          "concurrency_safe": true
        },
        "has_output_schema": false,
        "estimated_tokens": 251
      },
      {
        "name": "find_similar_code",
        "namespace": "graph",
        "tier": "analysis",
        "phase": "plan",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "high",
          "concurrency_safe": true
        },
        "has_output_schema": false,
        "estimated_tokens": 295
      },
      {
        "name": "find_code_duplicates",
        "namespace": "graph",
        "tier": "analysis",
        "phase": "review",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "high",
          "concurrency_safe": true
        },
        "has_output_schema": false,
        "estimated_tokens": 273
      },
      {
        "name": "classify_symbol",
        "namespace": "graph",
        "tier": "analysis",
        "phase": "review",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "high",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 309
      },
      {
        "name": "semantic_search",
        "namespace": "symbols",
        "tier": "primitive",
        "phase": "plan",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "high",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 343
      },
      {
        "name": "embedding_coverage_report",
        "namespace": "symbols",
        "tier": "primitive",
        "phase": "plan",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "high",
          "concurrency_safe": true
        },
        "has_output_schema": true,
        "estimated_tokens": 599
      },
      {
        "name": "index_embeddings",
        "namespace": "symbols",
        "tier": "primitive",
        "phase": "plan",
        "execution_policy": {
          "execution_class": "analyze",
          "risk": "low",
          "cost_hint": "high",
          "concurrency_safe": true
        },
        "has_output_schema": false,
        "estimated_tokens": 189
      }
    ]
  },
  "surfaces": {
    "profiles": [
      {
        "name": "readonly",
        "tool_count": 40,
        "preferred_namespaces": [
          "reports",
          "symbols",
          "graph",
          "session"
        ],
        "preferred_tiers": [
          "workflow"
        ],
        "preferred_phases": [
          "plan",
          "review"
        ],
        "tools": [
          "overview",
          "search",
          "graph",
          "review",
          "prepare_harness_session",
          "diagnose",
          "analyze",
          "verify_change_readiness",
          "mermaid_module_graph",
          "impact_report",
          "start_analysis_job",
          "explore_codebase",
          "review_architecture",
          "plan_safe_refactor",
          "review_changes",
          "diagnose_issues",
          "onboard_project",
          "analyze_change_request",
          "get_analysis_job",
          "get_analysis_section",
          "get_symbols_overview",
          "find_symbol",
          "get_ranked_context",
          "bm25_symbol_search",
          "find_referencing_symbols",
          "semantic_search",
          "embedding_coverage_report",
          "index_embeddings",
          "get_changed_files",
          "get_current_config",
          "find_declaration",
          "find_implementations",
          "get_diagnostics_for_symbol",
          "activate_project",
          "set_preset",
          "set_profile",
          "get_capabilities",
          "get_tool_metrics",
          "audit_builder_session",
          "audit_planner_session"
        ],
        "deprecated": false
      },
      {
        "name": "builder",
        "tool_count": 40,
        "preferred_namespaces": [
          "reports",
          "symbols",
          "graph",
          "filesystem",
          "session"
        ],
        "preferred_tiers": [
          "workflow",
          "analysis",
          "primitive"
        ],
        "preferred_phases": [
          "build",
          "review"
        ],
        "tools": [
          "overview",
          "search",
          "graph",
          "review",
          "diagnose",
          "plan_safe_refactor",
          "prepare_harness_session",
          "analyze_change_request",
          "analyze",
          "verify_change_readiness",
          "explore_codebase",
          "trace_request_path",
          "cleanup_duplicate_logic",
          "refresh_symbol_index",
          "get_ranked_context",
          "bm25_symbol_search",
          "plan_symbol_rename",
          "get_callers",
          "get_callees",
          "get_capabilities",
          "audit_builder_session",
          "audit_planner_session",
          "get_analysis_job",
          "get_symbols_overview",
          "find_symbol",
          "find_referencing_symbols",
          "semantic_search",
          "embedding_coverage_report",
          "index_embeddings",
          "find_tests",
          "get_current_config",
          "find_declaration",
          "find_implementations",
          "get_diagnostics_for_symbol",
          "activate_project",
          "set_preset",
          "set_profile",
          "get_tool_metrics",
          "export_session_markdown",
          "get_file_diagnostics"
        ],
        "deprecated": false
      },
      {
        "name": "review",
        "tool_count": 20,
        "preferred_namespaces": [
          "reports",
          "graph",
          "symbols",
          "session"
        ],
        "preferred_tiers": [
          "workflow"
        ],
        "preferred_phases": [
          "review",
          "eval"
        ],
        "tools": [
          "review",
          "graph",
          "diagnose",
          "prepare_harness_session",
          "verify_change_readiness",
          "safe_rename_report",
          "impact_report",
          "diff_aware_references",
          "explore_codebase",
          "review_architecture",
          "review_changes",
          "search",
          "overview",
          "refresh_symbol_index",
          "get_symbols_overview",
          "find_symbol",
          "get_ranked_context",
          "find_referencing_symbols",
          "get_capabilities",
          "get_file_diagnostics"
        ],
        "deprecated": false
      }
    ],
    "presets": [
      {
        "name": "minimal",
        "tool_count": 22,
        "preferred_namespaces": [
          "filesystem",
          "graph",
          "lsp",
          "reports",
          "session",
          "symbols"
        ],
        "preferred_tiers": [
          "primitive",
          "analysis"
        ],
        "tools": [
          "read_file",
          "list_dir",
          "find_file",
          "get_file_diagnostics",
          "get_current_config",
          "activate_project",
          "prepare_harness_session",
          "set_preset",
          "set_profile",
          "get_symbols_overview",
          "find_symbol",
          "find_referencing_symbols",
          "search_workspace_symbols",
          "get_ranked_context",
          "get_type_hierarchy",
          "plan_symbol_rename",
          "graph",
          "diagnose",
          "analyze",
          "review",
          "search",
          "overview"
        ]
      },
      {
        "name": "balanced",
        "tool_count": 69,
        "preferred_namespaces": [
          "reports",
          "symbols",
          "graph",
          "filesystem",
          "session"
        ],
        "preferred_tiers": [
          "workflow",
          "analysis"
        ],
        "tools": [
          "overview",
          "search",
          "graph",
          "review",
          "prepare_harness_session",
          "diagnose",
          "analyze",
          "verify_change_readiness",
          "module_boundary_report",
          "mermaid_module_graph",
          "safe_rename_report",
          "unresolved_reference_check",
          "dead_code_report",
          "impact_report",
          "refactor_safety_report",
          "diff_aware_references",
          "start_analysis_job",
          "cancel_analysis_job",
          "explore_codebase",
          "trace_request_path",
          "review_architecture",
          "plan_safe_refactor",
          "cleanup_duplicate_logic",
          "review_changes",
          "diagnose_issues",
          "refresh_symbol_index",
          "onboard_project",
          "analyze_change_request",
          "get_ranked_context",
          "bm25_symbol_search",
          "get_type_hierarchy",
          "plan_symbol_rename",
          "get_callers",
          "get_callees",
          "find_scoped_references",
          "find_misplaced_code",
          "find_similar_code",
          "find_code_duplicates",
          "classify_symbol",
          "resolve_symbol_target",
          "get_capabilities",
          "audit_log_query",
          "audit_tool_surface_consistency",
          "find_phantom_modules",
          "find_redundant_definitions",
          "find_over_visible_apis",
          "audit_memory_consistency",
          "get_analysis_job",
          "get_analysis_section",
          "get_symbols_overview",
          "find_symbol",
          "find_referencing_symbols",
          "search_workspace_symbols",
          "semantic_search",
          "embedding_coverage_report",
          "index_embeddings",
          "get_changed_files",
          "find_annotations",
          "find_tests",
          "get_current_config",
          "find_declaration",
          "find_implementations",
          "get_diagnostics_for_symbol",
          "list_analysis_jobs",
          "list_analysis_artifacts",
          "activate_project",
          "set_preset",
          "set_profile",
          "get_file_diagnostics"
        ]
      },
      {
        "name": "full",
        "tool_count": 95,
        "preferred_namespaces": [
          "filesystem",
          "graph",
          "lsp",
          "memory",
          "reports",
          "session",
          "symbols"
        ],
        "preferred_tiers": [
          "workflow",
          "analysis",
          "primitive"
        ],
        "tools": [
          "overview",
          "search",
          "review",
          "plan_safe_refactor",
          "prepare_harness_session",
          "graph",
          "diagnose",
          "analyze",
          "verify_change_readiness",
          "module_boundary_report",
          "mermaid_module_graph",
          "safe_rename_report",
          "unresolved_reference_check",
          "dead_code_report",
          "impact_report",
          "refactor_safety_report",
          "diff_aware_references",
          "start_analysis_job",
          "cancel_analysis_job",
          "explore_codebase",
          "trace_request_path",
          "review_architecture",
          "cleanup_duplicate_logic",
          "review_changes",
          "diagnose_issues",
          "refresh_symbol_index",
          "onboard_project",
          "analyze_change_request",
          "get_complexity",
          "get_callers",
          "get_callees",
          "find_scoped_references",
          "get_symbol_importance",
          "find_misplaced_code",
          "find_similar_code",
          "find_code_duplicates",
          "classify_symbol",
          "resolve_symbol_target",
          "get_capabilities",
          "audit_builder_session",
          "audit_planner_session",
          "audit_log_query",
          "audit_tool_surface_consistency",
          "find_phantom_modules",
          "find_redundant_definitions",
          "find_over_visible_apis",
          "audit_memory_consistency",
          "get_ranked_context",
          "bm25_symbol_search",
          "search_symbols_fuzzy",
          "get_type_hierarchy",
          "plan_symbol_rename",
          "read_file",
          "list_dir",
          "find_file",
          "find_annotations",
          "find_tests",
          "get_changed_files",
          "get_file_diagnostics",
          "get_lsp_recipe",
          "list_memories",
          "read_memory",
          "write_memory",
          "delete_memory",
          "rename_memory",
          "get_analysis_job",
          "get_analysis_section",
          "get_current_config",
          "find_declaration",
          "find_implementations",
          "get_diagnostics_for_symbol",
          "list_analysis_jobs",
          "list_analysis_artifacts",
          "activate_project",
          "register_agent_work",
          "list_active_agents",
          "claim_files",
          "release_files",
          "get_watch_status",
          "prune_index_failures",
          "set_preset",
          "set_profile",
          "get_tool_metrics",
          "export_session_markdown",
          "archive_memory",
          "restore_memory",
          "list_archived",
          "read_policy",
          "get_symbols_overview",
          "find_symbol",
          "find_referencing_symbols",
          "search_workspace_symbols",
          "semantic_search",
          "embedding_coverage_report",
          "index_embeddings"
        ]
      }
    ]
  },
  "harness_modes": {
    "schema_version": "codelens-harness-modes-v1",
    "communication_policy": {
      "default_pattern": "asymmetric-handoff",
      "live_bidirectional_agent_chat": "discouraged",
      "planner_to_builder_delegation": "recommended",
      "builder_to_planner_escalation": "explicit-only",
      "shared_substrate": "codelens-http-daemon-and-session-audit"
    },
    "modes": [
      {
        "name": "solo-local",
        "purpose": "Single-agent local work without cross-agent coordination overhead.",
        "best_fit": "One editor or terminal session exploring and editing the repository directly.",
        "topology": {
          "transport": "stdio-or-single-http",
          "daemon_shape": "single-session",
          "recommended_ports": []
        },
        "communication_pattern": "single-agent",
        "mutation_policy": "same session can plan and edit; builder still requires verifier evidence before mutation",
        "roles": [
          {
            "role": "solo-agent",
            "can_mutate": false,
            "responsibility": "one session handles both planning and implementation",
            "profiles": [
              {
                "name": "readonly",
                "tool_count": 40
              },
              {
                "name": "builder",
                "tool_count": 40
              }
            ]
          }
        ],
        "recommended_flow": [
          "prepare_harness_session",
          "explore_codebase",
          "trace_request_path or review_changes",
          "plan_safe_refactor before broad edits"
        ],
        "recommended_audits": [
          "audit_builder_session for write-heavy runs",
          "audit_planner_session for read-side review runs"
        ]
      },
      {
        "name": "planner-builder",
        "purpose": "Primary multi-agent pattern: read-only planning/review paired with mutation-enabled implementation.",
        "best_fit": "Read-oriented planning/review paired with a host-owned, write-capable implementation lane.",
        "topology": {
          "transport": "http",
          "daemon_shape": "single-writer",
          "recommended_ports": [
            7838
          ]
        },
        "communication_pattern": "asymmetric-handoff",
        "mutation_policy": "exactly one mutation-enabled agent per worktree; planners stay read-only",
        "roles": [
          {
            "role": "planner-reviewer",
            "can_mutate": false,
            "responsibility": "bootstrap, rank context, and verify change readiness before dispatch",
            "profiles": [
              {
                "name": "readonly",
                "tool_count": 40
              },
              {
                "name": "review",
                "tool_count": 20
              }
            ]
          },
          {
            "role": "builder-refactor",
            "can_mutate": true,
            "responsibility": "execute bounded edits after preflight, diagnostics, and claims",
            "profiles": [
              {
                "name": "builder",
                "tool_count": 40
              },
              {
                "name": "builder",
                "tool_count": 40
              }
            ]
          }
        ],
        "recommended_flow": [
          "prepare_harness_session",
          "get_symbols_overview per target file",
          "get_file_diagnostics per target file",
          "verify_change_readiness",
          "register_agent_work",
          "claim_files",
          "mutation pass",
          "audit_builder_session",
          "release_files"
        ],
        "recommended_audits": [
          "audit_planner_session on the planner session",
          "audit_builder_session on the builder session",
          "export_session_markdown(session_id=...) for human review artifacts"
        ]
      },
      {
        "name": "reviewer-gate",
        "purpose": "Read-only signoff lane that checks builder output before merge or handoff.",
        "best_fit": "PR review, risk signoff, CI-facing structural review, or planner validation after a builder run.",
        "topology": {
          "transport": "http",
          "daemon_shape": "single-writer",
          "recommended_ports": [
            7838
          ]
        },
        "communication_pattern": "review-signoff",
        "mutation_policy": "no content mutation; fail the session audit if mutation traces appear",
        "roles": [
          {
            "role": "reviewer",
            "can_mutate": false,
            "responsibility": "diff-aware review, impact analysis, and audit signoff",
            "profiles": [
              {
                "name": "review",
                "tool_count": 20
              },
              {
                "name": "review",
                "tool_count": 20
              }
            ]
          }
        ],
        "recommended_flow": [
          "prepare_harness_session",
          "review_changes or impact_report",
          "audit_planner_session",
          "audit_builder_session if reviewing a prior builder session",
          "export_session_markdown"
        ],
        "recommended_audits": [
          "audit_planner_session for the reviewer session",
          "audit_builder_session for the session under review"
        ]
      },
      {
        "name": "batch-analysis",
        "purpose": "Asynchronous analysis lane for repo-wide or long-running read-side jobs.",
        "best_fit": "Dead-code sweeps, architecture scans, semantic review queues, and non-interactive evaluation passes.",
        "topology": {
          "transport": "http",
          "daemon_shape": "single-writer",
          "recommended_ports": [
            7838
          ]
        },
        "communication_pattern": "artifact-handoff",
        "mutation_policy": "read-only; use analysis handles and job artifacts rather than direct edits",
        "roles": [
          {
            "role": "analysis-runner",
            "can_mutate": false,
            "responsibility": "start durable jobs and consume bounded sections instead of raw full reports",
            "profiles": [
              {
                "name": "readonly",
                "tool_count": 40
              },
              {
                "name": "readonly",
                "tool_count": 40
              },
              {
                "name": "review",
                "tool_count": 20
              }
            ]
          }
        ],
        "recommended_flow": [
          "prepare_harness_session",
          "start_analysis_job",
          "get_analysis_job",
          "get_analysis_section",
          "codelens://analysis/{id}/summary"
        ],
        "recommended_audits": [
          "audit_planner_session when the run stayed on planner/reviewer surfaces",
          "get_tool_metrics(session_id=...) for job-heavy telemetry"
        ]
      }
    ]
  },
  "harness_spec": {
    "schema_version": "codelens-harness-spec-v1",
    "defaults": {
      "audit_mode": "audit-only",
      "hard_blocks_added_by_spec": false,
      "recommended_transport": "http",
      "preferred_communication_pattern": "asymmetric-handoff",
      "routing_policy": {
        "global_default": "conditional-codelens-first",
        "simple_local_lookup_edit": "native-first",
        "multi_file_review_refactor": "codelens-first-after-bootstrap",
        "long_running_analysis": "codelens-job-first",
        "reason": "CodeLens adds bootstrap and protocol overhead that is not worth paying for trivial point lookups, but wins when bounded workflow evidence, session-scoped audit, or reusable artifacts matter."
      },
      "ttl_policy": {
        "strategy": "expected_duration_x_1_5",
        "default_secs": 600,
        "max_secs": 3600,
        "explicit_release_preferred": true
      }
    },
    "contracts": [
      {
        "name": "planner-builder-handoff",
        "mode": "planner-builder",
        "intent": "Planner/reviewer session prepares bounded evidence, then a mutation-enabled builder session executes the change under explicit coordination.",
        "roles": [
          {
            "role": "planner-reviewer",
            "can_mutate": false,
            "responsibility": "collect structure, diagnostics, and readiness evidence before dispatch",
            "profiles": [
              {
                "name": "readonly",
                "tool_count": 40
              },
              {
                "name": "review",
                "tool_count": 20
              }
            ]
          },
          {
            "role": "builder-refactor",
            "can_mutate": true,
            "responsibility": "perform bounded mutation only after preflight, diagnostics, and coordination",
            "profiles": [
              {
                "name": "builder",
                "tool_count": 40
              },
              {
                "name": "builder",
                "tool_count": 40
              }
            ]
          }
        ],
        "preflight_sequence": [
          {
            "order": 1,
            "tool": "prepare_harness_session",
            "required": true,
            "when": "planner or builder bootstrap",
            "purpose": "establish session-local project view, visible surface, and health summary"
          },
          {
            "order": 2,
            "tool": "get_symbols_overview",
            "required": true,
            "when": "per target file before mutation",
            "purpose": "record structural evidence for the touched files"
          },
          {
            "order": 3,
            "tool": "get_file_diagnostics",
            "required": true,
            "when": "per target file before mutation",
            "purpose": "record baseline diagnostic evidence for the touched files"
          },
          {
            "order": 4,
            "tool": "verify_change_readiness",
            "required": true,
            "when": "once for the full change set before mutation",
            "purpose": "produce readiness status, blockers, and overlapping claim evidence"
          }
        ],
        "coordination_discipline": {
          "ownership": "host-owned",
          "required_for": "optional \u2014 multi-agent coordination is owned by the host harness as of the 2026-07 tool-surface diet step 2, so CodeLens no longer requires register/claim/release evidence and audit_builder_session does not downgrade sessions that omit it",
          "steps": [
            {
              "order": 5,
              "tool": "register_agent_work",
              "required": false,
              "when": "optional, only when the host delegates coordination to CodeLens",
              "purpose": "publish session identity, worktree, branch, and intent"
            },
            {
              "order": 6,
              "tool": "claim_files",
              "required": false,
              "when": "optional, only when the host delegates coordination to CodeLens",
              "purpose": "publish advisory file reservations for the intended change set"
            },
            {
              "order": 10,
              "tool": "release_files",
              "required": false,
              "when": "optional, only when a CodeLens-side claim was taken",
              "purpose": "explicitly release claims instead of waiting for TTL expiry"
            }
          ],
          "ttl_policy": {
            "strategy": "expected_duration_x_1_5",
            "default_secs": 600,
            "max_secs": 3600,
            "same_ttl_for_registration_and_claims": true
          }
        },
        "mutation_execution": {
          "step_order": [
            "mutation pass",
            "get_file_diagnostics",
            "audit_builder_session"
          ],
          "notes": [
            "run post-edit diagnostics after the mutation pass",
            "builder audit stays audit-only and does not add new runtime hard blocks"
          ]
        },
        "gates": [
          {
            "condition": "mutation_ready == blocked",
            "action": "stop",
            "reason": "builder mutation must not start while the verifier reports blockers"
          },
          {
            "condition": "mutation_ready == caution && overlapping_claims > 0",
            "action": "stop-and-escalate",
            "reason": "the orchestrator decides whether to wait, reassign, or continue"
          },
          {
            "condition": "rename-heavy mutation",
            "action": "require-symbol-preflight",
            "required_tools": [
              "safe_rename_report",
              "unresolved_reference_check"
            ],
            "reason": "rename_symbol requires symbol-aware evidence, not only generic readiness"
          }
        ],
        "audits": {
          "planner_session_tool": "audit_planner_session",
          "builder_session_tool": "audit_builder_session",
          "export_tool": "export_session_markdown",
          "session_metrics_tool": "get_tool_metrics"
        },
        "handoff_artifact_template": {
          "name": "planner_builder_dispatch",
          "format": "json",
          "required_fields": [
            "mode",
            "from_session_id",
            "target_profile",
            "task",
            "target_files",
            "preflight.tools_run",
            "preflight.mutation_ready",
            "preflight.overlapping_claims",
            "coordination.ttl_secs",
            "coordination.claimed_paths"
          ],
          "example": {
            "mode": "planner-builder",
            "from_session_id": "<planner-session-id>",
            "target_profile": "builder",
            "task": "Implement the bounded change described by the planner",
            "target_files": [
              "src/example.rs"
            ],
            "preflight": {
              "tools_run": [
                "prepare_harness_session",
                "get_symbols_overview",
                "get_file_diagnostics",
                "verify_change_readiness"
              ],
              "mutation_ready": "ready",
              "overlapping_claims": []
            },
            "coordination": {
              "ttl_secs": 600,
              "claimed_paths": [
                "src/example.rs"
              ]
            }
          }
        }
      },
      {
        "name": "reviewer-signoff",
        "mode": "reviewer-gate",
        "intent": "Read-only reviewer or CI-facing session validates a builder session and exports a human-readable signoff artifact.",
        "roles": [
          {
            "role": "reviewer",
            "can_mutate": false,
            "responsibility": "perform diff-aware review, signoff, and audit validation without content mutation",
            "profiles": [
              {
                "name": "review",
                "tool_count": 20
              },
              {
                "name": "review",
                "tool_count": 20
              }
            ]
          }
        ],
        "read_sequence": [
          {
            "order": 1,
            "tool": "prepare_harness_session",
            "required": true,
            "when": "before the first reviewer workflow",
            "purpose": "bind the reviewer session to the project and bounded read-side surface"
          },
          {
            "order": 2,
            "tool": "review_changes or impact_report",
            "required": true,
            "when": "during signoff",
            "purpose": "collect diff-aware and impact-aware evidence for the change under review"
          },
          {
            "order": 3,
            "tool": "audit_planner_session",
            "required": true,
            "when": "after reviewer workflow",
            "purpose": "validate read-side bootstrap, workflow-first routing, and file evidence discipline"
          },
          {
            "order": 4,
            "tool": "audit_builder_session",
            "required": true,
            "when": "when a builder session exists",
            "purpose": "validate the paired builder/refactor session before merge or handoff"
          },
          {
            "order": 5,
            "tool": "export_session_markdown",
            "required": true,
            "when": "at the end of signoff",
            "purpose": "emit a human-readable reviewer or builder audit summary"
          }
        ],
        "gates": [
          {
            "condition": "planner/reviewer session attempts content mutation",
            "action": "fail-audit",
            "reason": "reviewer-gate is read-side only"
          },
          {
            "condition": "workflow is diff-aware but target paths are missing",
            "action": "warn-audit",
            "reason": "review_changes, impact_report, and related workflows require change evidence"
          }
        ],
        "audits": {
          "primary_tool": "audit_planner_session",
          "paired_builder_tool": "audit_builder_session",
          "export_tool": "export_session_markdown"
        },
        "handoff_artifact_template": {
          "name": "review_signoff_summary",
          "format": "json",
          "required_fields": [
            "mode",
            "reviewer_session_id",
            "reviewed_session_id",
            "status",
            "findings",
            "recommended_next_tools"
          ],
          "example": {
            "mode": "reviewer-gate",
            "reviewer_session_id": "<reviewer-session-id>",
            "reviewed_session_id": "<builder-session-id>",
            "status": "pass",
            "findings": [],
            "recommended_next_tools": [
              "export_session_markdown"
            ]
          }
        }
      },
      {
        "name": "batch-analysis-artifact",
        "mode": "batch-analysis",
        "intent": "Long-running read-only analyses should move through durable jobs and bounded sections rather than raw full-report expansion.",
        "roles": [
          {
            "role": "analysis-runner",
            "can_mutate": false,
            "responsibility": "queue durable read-side jobs and consume bounded sections",
            "profiles": [
              {
                "name": "readonly",
                "tool_count": 40
              },
              {
                "name": "readonly",
                "tool_count": 40
              },
              {
                "name": "review",
                "tool_count": 20
              }
            ]
          }
        ],
        "analysis_sequence": [
          {
            "order": 1,
            "tool": "prepare_harness_session",
            "required": true,
            "when": "before job creation",
            "purpose": "establish the analysis surface and runtime health view"
          },
          {
            "order": 2,
            "tool": "start_analysis_job",
            "required": true,
            "when": "to enqueue the long-running report",
            "purpose": "create a durable analysis job and handle"
          },
          {
            "order": 3,
            "tool": "get_analysis_job",
            "required": true,
            "when": "while polling progress",
            "purpose": "track job state without reopening a raw report"
          },
          {
            "order": 4,
            "tool": "get_analysis_section",
            "required": true,
            "when": "to expand only one section at a time",
            "purpose": "keep the analysis bounded and section-oriented"
          }
        ],
        "resource_handoff": {
          "summary_resource_pattern": "codelens://analysis/{id}/summary",
          "section_access_pattern": "codelens://analysis/{id}/{section}",
          "metrics_tool": "get_tool_metrics"
        },
        "gates": [
          {
            "condition": "analysis requires full raw report expansion before a handle exists",
            "action": "prefer-job-handle",
            "reason": "batch-analysis should stay handle-first and section-oriented"
          }
        ],
        "audits": {
          "primary_tool": "audit_planner_session",
          "metrics_tool": "get_tool_metrics"
        },
        "handoff_artifact_template": {
          "name": "analysis_job_handoff",
          "format": "json",
          "required_fields": [
            "mode",
            "session_id",
            "analysis_id",
            "summary_resource",
            "available_sections"
          ],
          "example": {
            "mode": "batch-analysis",
            "session_id": "<analysis-session-id>",
            "analysis_id": "<analysis-id>",
            "summary_resource": "codelens://analysis/<analysis-id>/summary",
            "available_sections": [
              "summary",
              "risk_hotspots"
            ]
          }
        }
      }
    ]
  },
  "host_adapters": {
    "schema_version": "codelens-host-adapters-v1",
    "runtime_resource": "codelens://harness/host-adapters",
    "doc_path": "docs/host-adaptive-harness.md",
    "goal": "Adapt CodeLens usage to the host's native agent model instead of forcing one universal harness shape everywhere.",
    "root_causes": [
      {
        "code": "memory_only_routing",
        "problem": "Routing decisions live in chat memory, personal habit, or repo-local folklore instead of a portable product contract.",
        "effect": "Other repositories repeat bootstrap overhead, skip useful audits, or misuse CodeLens on trivial point edits."
      },
      {
        "code": "host_capability_blindness",
        "problem": "Claude Code, Codex, Cursor, and similar hosts expose different primitives for subagents, worktrees, rules, background execution, and MCP governance.",
        "effect": "A one-size-fits-all harness either underuses native host strengths or leaks too much surface into the wrong execution path."
      },
      {
        "code": "substrate_orchestrator_conflation",
        "problem": "Shared infrastructure is asked to own host UI behavior, live agent chat, and orchestration policy at the same time.",
        "effect": "Control-plane complexity grows faster than measurable value."
      },
      {
        "code": "eval_free_expansion",
        "problem": "New routing lanes, skills, or adapters are added without ground-truth data or a merge-gating signal.",
        "effect": "The harness bloats while quality remains unproven."
      }
    ],
    "design_principles": [
      "Keep CodeLens as the durable substrate for session state, audit, handoff, and bounded workflow tools.",
      "Treat host-specific behavior as an adapter/compiler concern, not as a reason to fork the substrate.",
      "Prefer asymmetric handoff and role-specialized surfaces over always-on live multi-agent chat.",
      "Escalate from native host tools to CodeLens when the task becomes multi-file, reviewer-heavy, refactor-sensitive, or artifact-worthy.",
      "Ship only evaluation lanes that add new signal beyond existing audits or benchmark gates."
    ],
    "shared_substrate": {
      "owned_by_codelens": [
        "prepare_harness_session bootstrap",
        "role/profile scoped surfaces",
        "deferred tool loading",
        "verify_change_readiness and rename preflight",
        "session metrics and audit_builder_session / audit_planner_session",
        "analysis jobs and section handles",
        "portable handoff schema and runtime resources"
      ],
      "not_owned_by_codelens": [
        "host UI and approval UX",
        "subagent spawning semantics",
        "worktree lifecycle",
        "background execution infrastructure",
        "organization-specific command allowlists",
        "team-specific prompting style"
      ]
    },
    "adapter_contract": {
      "detection_inputs": [
        "host identity",
        "interactive vs background execution",
        "task phase (lookup, plan, review, build, eval)",
        "risk level (single-file vs multi-file / mutation-heavy)",
        "need for durable artifacts or session audit"
      ],
      "routing_outputs": [
        "recommended harness mode",
        "recommended CodeLens profile",
        "recommended agent role",
        "preferred native config targets",
        "whether handoff artifacts are required",
        "whether analysis jobs should replace direct long reports"
      ]
    },
    "host_environment_contract": {
      "prepare_harness_session_fields": [
        "agent_role",
        "host_capabilities",
        "available_mcp_servers",
        "available_mcp_tools",
        "skill_roots",
        "memory_roots",
        "host_setting_keys",
        "harness_profile"
      ],
      "privacy_rule": "Send names, roots, and setting keys only; do not send secret values or full personal config files.",
      "adaptation_rule": "Explicit host-observed snapshots override generic Claude/Codex assumptions for bootstrap hints, skill binding, and token-pressure warnings.",
      "skill_binding_rule": "Codex skill hints scan only SKILL.md metadata under supplied skill_roots, then recommend 1-3 files for the agent to read explicitly."
    },
    "execution_contract": {
      "executor_selection": "host_owned",
      "success_action": "suggested_next_calls",
      "mutation_intent": "tool_annotations_and_direct_call",
      "argument_rule": "preserve concrete suggested arguments and apply normal approval and mutation gates"
    },
    "host_resources": [
      "codelens://host-adapters/claude-code",
      "codelens://host-adapters/codex",
      "codelens://host-adapters/cursor",
      "codelens://host-adapters/cline",
      "codelens://host-adapters/windsurf"
    ],
    "hosts": [
      {
        "name": "claude-code",
        "resource_uri": "codelens://host-adapters/claude-code",
        "best_fit": "planner and reviewer orchestration with isolated research and explicit policy control",
        "recommended_modes": [
          "solo-local",
          "planner-builder",
          "reviewer-gate"
        ],
        "preferred_profiles": [
          "readonly",
          "review"
        ],
        "default_profile": "readonly",
        "default_agent_role": "main",
        "primary_bootstrap_sequence": [
          "prepare_harness_session",
          "analyze_change_request",
          "review_changes",
          "impact_report",
          "explore_codebase",
          "review_architecture",
          "plan_safe_refactor",
          "start_analysis_job",
          "get_analysis_section"
        ],
        "native_primitives": [
          "CLAUDE.md",
          "subagents and agent teams",
          "hooks",
          "managed-mcp.json and .mcp.json",
          "subagent-scoped MCP servers"
        ],
        "preferred_codelens_use": [
          "bootstrap and bounded architecture review",
          "preflight before dispatching a builder",
          "planner-session audit and handoff artifact production"
        ],
        "routing_defaults": {
          "point_lookup": "native-first",
          "multi_file_review": "codelens-after-first-local-step",
          "builder_dispatch": "planner-builder-handoff-required",
          "long_running_eval": "analysis-job-first"
        },
        "avoid": [
          "defaulting to live bidirectional chat between planner and builder",
          "exposing mutation-heavy surfaces to read-side sessions"
        ],
        "compiler_targets": [
          "CLAUDE.md",
          ".mcp.json",
          "managed-mcp.json",
          "subagent definitions"
        ],
        "skill_binding": null
      },
      {
        "name": "codex",
        "resource_uri": "codelens://host-adapters/codex",
        "best_fit": "builder and refactor execution, parallel worktree-based implementation, and automation",
        "recommended_modes": [
          "solo-local",
          "planner-builder",
          "batch-analysis"
        ],
        "preferred_profiles": [
          "builder",
          "review"
        ],
        "default_profile": "builder",
        "default_agent_role": "main",
        "primary_bootstrap_sequence": [
          "prepare_harness_session",
          "explore_codebase",
          "trace_request_path",
          "plan_safe_refactor",
          "verify_change_readiness",
          "get_file_diagnostics",
          "rename_symbol",
          "replace_symbol_body",
          "insert_before_symbol",
          "insert_after_symbol"
        ],
        "native_primitives": [
          "AGENTS.md",
          "skills",
          "worktrees",
          "shared MCP config",
          "CLI, app, and IDE continuity"
        ],
        "preferred_codelens_use": [
          "bounded mutation after verify_change_readiness",
          "session-scoped builder audit",
          "analysis jobs for CI-facing summaries"
        ],
        "routing_defaults": {
          "point_lookup": "native-first",
          "multi_file_build": "builder-after-bootstrap",
          "rename_or_broad_refactor": "builder-after-preflight",
          "ci_summary": "analysis-job-first"
        },
        "avoid": [
          "forcing CodeLens into trivial single-file lookups",
          "copying Claude-specific subagent topology into Codex worktree flows"
        ],
        "compiler_targets": [
          "AGENTS.md",
          "~/.codex/config.toml",
          "repo-local skill files"
        ],
        "skill_binding": {
          "schema_version": "codelens-codex-skill-catalog-v1",
          "resource_uri": "codelens://host-adapters/codex/skill-catalog",
          "target_host": "codex",
          "purpose": "Bind Codex to the user's installed skills without injecting every SKILL.md into the startup prompt.",
          "default_roots": [
            "$HOME/.codex/skills",
            "$HOME/.agents/skills",
            "$HOME/.codex/plugins/cache"
          ],
          "index_policy": {
            "bootstrap": "metadata_only",
            "metadata_fields": [
              "name",
              "description",
              "path",
              "source_root",
              "mtime_epoch_secs",
              "content_hash"
            ],
            "body_loading": "load only the selected SKILL.md after task matching",
            "reference_loading": "follow the selected skill's own progressive-disclosure instructions"
          },
          "binding_policy": [
            "Use the runtime skill catalog to shortlist 1-3 candidate skills for non-trivial Codex tasks.",
            "Prefer repo-local and user-authored skills over broad plugin-cache skills when confidence is similar.",
            "Do not inject full skill bodies into AGENTS.md or prepare_harness_session; emit compact hints and paths.",
            "Treat strict enforcement as opt-in; default Codex binding is advisory."
          ],
          "codex_native_targets": [
            "AGENTS.md",
            "~/.codex/config.toml",
            "repo-local skill files"
          ]
        }
      },
      {
        "name": "cursor",
        "resource_uri": "codelens://host-adapters/cursor",
        "best_fit": "editor-local iteration with scoped rules plus asynchronous remote execution when needed",
        "recommended_modes": [
          "solo-local",
          "reviewer-gate",
          "batch-analysis"
        ],
        "preferred_profiles": [
          "readonly",
          "review"
        ],
        "default_profile": "review",
        "default_agent_role": "main",
        "primary_bootstrap_sequence": [
          "prepare_harness_session",
          "explore_codebase",
          "review_changes",
          "impact_report",
          "diff_aware_references",
          "review_architecture"
        ],
        "native_primitives": [
          ".cursor/rules",
          "AGENTS.md",
          "custom modes",
          "background agents",
          "mcp.json"
        ],
        "preferred_codelens_use": [
          "architecture review and diff-aware signoff",
          "analysis jobs for background-agent queues",
          "minimal surface exposure through mode- or rule-specific routing"
        ],
        "routing_defaults": {
          "foreground_lookup": "native-first",
          "foreground_review": "codelens-after-first-local-step",
          "background_queue": "analysis-job-first",
          "wide_surface": "deferred-loading-required"
        },
        "avoid": [
          "assuming foreground and background agents share the same trust boundary",
          "shipping the full CodeLens surface into every mode"
        ],
        "compiler_targets": [
          ".cursor/rules",
          "AGENTS.md",
          ".cursor/mcp.json",
          "background-agent environment.json"
        ],
        "skill_binding": null
      },
      {
        "name": "cline",
        "resource_uri": "codelens://host-adapters/cline",
        "best_fit": "human-in-the-loop debugging and foreground execution with explicit approvals",
        "recommended_modes": [
          "solo-local",
          "planner-builder"
        ],
        "preferred_profiles": [
          "builder",
          "review"
        ],
        "default_profile": "builder",
        "default_agent_role": "main",
        "primary_bootstrap_sequence": [
          "prepare_harness_session",
          "get_file_diagnostics",
          "verify_change_readiness",
          "trace_request_path",
          "plan_safe_refactor",
          "rename_symbol",
          "replace_symbol_body",
          "insert_before_symbol",
          "insert_after_symbol",
          "explore_codebase"
        ],
        "native_primitives": [
          "interactive permissioned terminal execution",
          "browser loop",
          "workspace checkpoints",
          "MCP integrations"
        ],
        "preferred_codelens_use": [
          "review-heavy exploration before write passes",
          "session audit and handoff artifacts when a change must cross sessions"
        ],
        "routing_defaults": {
          "foreground_debug": "native-first-with-codelens-escalation",
          "write_pass": "builder-after-bootstrap",
          "handoff": "artifact-required"
        },
        "avoid": [
          "treating Cline as a headless CI runner",
          "relying on CodeLens where the foreground checkpoint loop already provides the needed safety"
        ],
        "compiler_targets": [
          "mcp_servers.json",
          ".clinerules",
          "repo instructions"
        ],
        "skill_binding": null
      },
      {
        "name": "windsurf",
        "resource_uri": "codelens://host-adapters/windsurf",
        "best_fit": "editor-local implementation with a hard MCP tool cap and bounded foreground agent flows",
        "recommended_modes": [
          "solo-local",
          "reviewer-gate"
        ],
        "preferred_profiles": [
          "builder",
          "readonly"
        ],
        "default_profile": "builder",
        "default_agent_role": "main",
        "primary_bootstrap_sequence": [
          "prepare_harness_session",
          "explore_codebase",
          "trace_request_path",
          "plan_safe_refactor",
          "verify_change_readiness",
          "get_file_diagnostics",
          "rename_symbol",
          "replace_symbol_body",
          "insert_before_symbol",
          "insert_after_symbol"
        ],
        "native_primitives": [
          "global MCP config",
          "foreground agent loop",
          "workspace-local editing",
          "100-tool cap across MCP servers"
        ],
        "preferred_codelens_use": [
          "bounded builder execution under a small visible surface",
          "compressed planning when the task escapes single-file scope"
        ],
        "routing_defaults": {
          "foreground_lookup": "native-first",
          "multi_file_edit": "builder-after-bootstrap",
          "wide_surface": "deferred-loading-required",
          "tool_cap": "keep-profile-bounded"
        },
        "avoid": [
          "attaching the full CodeLens surface alongside many other MCP servers",
          "using reviewer-heavy profiles as the default editing surface"
        ],
        "compiler_targets": [
          "~/.codeium/windsurf/mcp_config.json"
        ],
        "skill_binding": null
      }
    ]
  },
  "agent_experience": {
    "schema_version": "codelens-agent-experience-v1",
    "runtime_resource": "codelens://design/agent-experience",
    "doc_path": "docs/design/symbiote-ux-flows-v1.md",
    "goal": "Expose a portable product and agent-flow contract that both humans and agent hosts can consume directly.",
    "naming_policy": {
      "public_primary_name": "CodeLens MCP",
      "transition_codename": "Symbiote",
      "runtime_aliases": [
        "symbiote://",
        "SYMBIOTE_*"
      ],
      "public_cutover_status": "blocked_pending_trademark_clearance",
      "reason_codes": [
        "existing_live_symbiote_marks_in_software_adjacent_classes",
        "marvel_dominates_bare_symbiote_search_results",
        "linux_rootkit_search_overlap"
      ],
      "rule": "Keep the product architecture and UX metaphor symbiotic, but do not flip the public primary install/docs/binary name until clearance is complete."
    },
    "information_architecture": {
      "core_surfaces": [
        {
          "id": "attach",
          "audience": [
            "human",
            "host"
          ],
          "purpose": "Install, verify, and attach the MCP server to a host in under one minute."
        },
        {
          "id": "session_overview",
          "audience": [
            "human",
            "agent"
          ],
          "purpose": "Show active profile, visible surface, health, and current session scope."
        },
        {
          "id": "task_router",
          "audience": [
            "agent"
          ],
          "purpose": "Translate task phase and risk into a role profile, execution policy, and next-tool shortlist."
        },
        {
          "id": "audit_timeline",
          "audience": [
            "human",
            "agent",
            "ci"
          ],
          "purpose": "Summarize bootstrap, verifier, mutation, and signoff evidence per session."
        },
        {
          "id": "execution_intent_inspector",
          "audience": [
            "human",
            "agent"
          ],
          "purpose": "Inspect direct follow-up calls, mutation intent, and review artifacts without assigning a model or vendor executor."
        },
        {
          "id": "detach_or_migrate",
          "audience": [
            "human",
            "ops"
          ],
          "purpose": "Remove or migrate the attachment cleanly without residue."
        }
      ]
    },
    "user_flow": {
      "north_star": "under_60_seconds_to_first_compressed_answer",
      "steps": [
        "install_or_verify_binary",
        "attach_to_host",
        "prepare_harness_session",
        "analyze_change_request",
        "optional_audit_and_export"
      ]
    },
    "agent_flow": {
      "bootstrap_sequence": [
        "prepare_harness_session",
        "tools/list",
        "analyze_change_request or get_ranked_context"
      ],
      "role_lattice": [
        "readonly",
        "review",
        "builder"
      ],
      "execution_contract": {
        "executor_selection": "host_owned",
        "success_action": "suggested_next_calls",
        "mutation_intent": "tool_annotations_and_direct_call",
        "argument_rule": "use the concrete suggested tool arguments without adding synthetic delegation actions",
        "safety_rule": "apply normal approval, preflight, and mutation gates before executing a mutation intent"
      }
    },
    "host_guardrails": {
      "execution_intent": [
        "treat suggested_next_calls as advisory callable tool or mutation intents",
        "choose the native executor in the host rather than from model or vendor labels",
        "preserve concrete arguments and enforce the target tool's approval and mutation policy"
      ],
      "session_closeout": [
        "use export_session_markdown(session_id=...) as the canonical per-session artifact source",
        "keep eval_session_audit as a runtime-scoped aggregate operator lane, not a stop-hook replacement"
      ]
    },
    "telemetry_contract": {
      "session_fields": [
        "suggestion_accepted_count",
        "suggestion_diverted_count",
        "suggestion_unresolved_count",
        "suggestion_outcome_success_count",
        "suggestion_outcome_error_count"
      ],
      "purpose": "measure whether a suggestion was accepted or diverted and whether an accepted action succeeded, without treating emission count as value"
    },
    "tool_flow": {
      "discover": [
        "analyze_change_request",
        "get_ranked_context"
      ],
      "investigate": [
        "find_symbol",
        "find_referencing_symbols",
        "get_symbols_overview",
        "semantic_search"
      ],
      "act": [
        "plan_safe_refactor",
        "verify_change_readiness",
        "mutation_tools",
        "review_changes"
      ],
      "verify": [
        "get_file_diagnostics",
        "audit_builder_session",
        "audit_planner_session"
      ],
      "handoff": [
        "export_session_markdown",
        "codelens://schemas/handoff-artifact/v1"
      ]
    },
    "reference_flow": {
      "primary_path": [
        "find_symbol",
        "find_referencing_symbols",
        "get_impact_analysis",
        "get_type_hierarchy"
      ],
      "fallback_ladder": [
        "find_symbol",
        "semantic_search",
        "get_ranked_context",
        "host_native_grep"
      ]
    },
    "harness_flow": {
      "recommended_modes": [
        "solo-local",
        "planner-builder",
        "reviewer-gate",
        "batch-analysis"
      ],
      "runtime_resources": [
        "codelens://harness/modes",
        "codelens://harness/spec",
        "codelens://harness/host-adapters"
      ],
      "host_resources": [
        "codelens://host-adapters/claude-code",
        "codelens://host-adapters/codex",
        "codelens://host-adapters/cursor",
        "codelens://host-adapters/cline",
        "codelens://host-adapters/windsurf"
      ]
    }
  },
  "harness_artifacts": {
    "schemas": [
      {
        "name": "handoff-artifact-v1",
        "title": "CodeLens Harness Handoff Artifact v1",
        "schema_id": "https://codelens.mcp/schemas/handoff-artifact.v1.json",
        "schema_version": "codelens-handoff-artifact-v1",
        "runtime_resource": "codelens://schemas/handoff-artifact/v1",
        "doc_path": "docs/schemas/handoff-artifact.v1.json",
        "kinds": [
          "session_baton",
          "planner_brief",
          "builder_result",
          "reviewer_verdict"
        ]
      }
    ]
  },
  "languages": {
    "language_family_count": 34,
    "extension_count": 56,
    "import_capable_extension_count": 28,
    "families": [
      {
        "canonical": "c",
        "display_name": "C",
        "extensions": [
          "c",
          "h"
        ],
        "language_ids": [
          "c"
        ],
        "supports_imports": true
      },
      {
        "canonical": "clj",
        "display_name": "Clojure/ClojureScript",
        "extensions": [
          "clj",
          "cljs"
        ],
        "language_ids": [
          "clojure",
          "clojurescript"
        ],
        "supports_imports": false
      },
      {
        "canonical": "cpp",
        "display_name": "C++",
        "extensions": [
          "cc",
          "cpp",
          "cxx",
          "hh",
          "hpp",
          "hxx"
        ],
        "language_ids": [
          "cpp"
        ],
        "supports_imports": true
      },
      {
        "canonical": "cs",
        "display_name": "C#",
        "extensions": [
          "cs"
        ],
        "language_ids": [
          "csharp"
        ],
        "supports_imports": true
      },
      {
        "canonical": "css",
        "display_name": "CSS",
        "extensions": [
          "css"
        ],
        "language_ids": [
          "css"
        ],
        "supports_imports": true
      },
      {
        "canonical": "dart",
        "display_name": "Dart",
        "extensions": [
          "dart"
        ],
        "language_ids": [
          "dart"
        ],
        "supports_imports": true
      },
      {
        "canonical": "dockerfile",
        "display_name": "Dockerfile/Containerfile",
        "extensions": [
          "containerfile",
          "dockerfile"
        ],
        "language_ids": [
          "dockerfile"
        ],
        "supports_imports": false
      },
      {
        "canonical": "erl",
        "display_name": "Erlang",
        "extensions": [
          "erl",
          "hrl"
        ],
        "language_ids": [
          "erlang"
        ],
        "supports_imports": false
      },
      {
        "canonical": "ex",
        "display_name": "Elixir",
        "extensions": [
          "ex",
          "exs"
        ],
        "language_ids": [
          "elixir"
        ],
        "supports_imports": false
      },
      {
        "canonical": "fs",
        "display_name": "F#",
        "extensions": [
          "fs",
          "fsx"
        ],
        "language_ids": [
          "fsharp"
        ],
        "supports_imports": false
      },
      {
        "canonical": "go",
        "display_name": "Go",
        "extensions": [
          "go"
        ],
        "language_ids": [
          "go"
        ],
        "supports_imports": true
      },
      {
        "canonical": "hs",
        "display_name": "Haskell",
        "extensions": [
          "hs"
        ],
        "language_ids": [
          "haskell"
        ],
        "supports_imports": false
      },
      {
        "canonical": "html",
        "display_name": "HTML",
        "extensions": [
          "htm",
          "html"
        ],
        "language_ids": [
          "html"
        ],
        "supports_imports": false
      },
      {
        "canonical": "java",
        "display_name": "Java",
        "extensions": [
          "java"
        ],
        "language_ids": [
          "java"
        ],
        "supports_imports": true
      },
      {
        "canonical": "jl",
        "display_name": "Julia",
        "extensions": [
          "jl"
        ],
        "language_ids": [
          "julia"
        ],
        "supports_imports": false
      },
      {
        "canonical": "js",
        "display_name": "JavaScript",
        "extensions": [
          "cjs",
          "js",
          "mjs"
        ],
        "language_ids": [
          "javascript"
        ],
        "supports_imports": true
      },
      {
        "canonical": "kt",
        "display_name": "Kotlin",
        "extensions": [
          "kt",
          "kts"
        ],
        "language_ids": [
          "kotlin"
        ],
        "supports_imports": true
      },
      {
        "canonical": "lua",
        "display_name": "Lua",
        "extensions": [
          "lua"
        ],
        "language_ids": [
          "lua"
        ],
        "supports_imports": false
      },
      {
        "canonical": "mk",
        "display_name": "Make",
        "extensions": [
          "makefile",
          "mk"
        ],
        "language_ids": [
          "makefile"
        ],
        "supports_imports": false
      },
      {
        "canonical": "ml",
        "display_name": "OCaml",
        "extensions": [
          "ml",
          "mli"
        ],
        "language_ids": [
          "ocaml"
        ],
        "supports_imports": false
      },
      {
        "canonical": "php",
        "display_name": "PHP",
        "extensions": [
          "php"
        ],
        "language_ids": [
          "php"
        ],
        "supports_imports": true
      },
      {
        "canonical": "py",
        "display_name": "Python",
        "extensions": [
          "py"
        ],
        "language_ids": [
          "python"
        ],
        "supports_imports": true
      },
      {
        "canonical": "r",
        "display_name": "R",
        "extensions": [
          "R",
          "r"
        ],
        "language_ids": [
          "r"
        ],
        "supports_imports": false
      },
      {
        "canonical": "rb",
        "display_name": "Ruby",
        "extensions": [
          "rb"
        ],
        "language_ids": [
          "ruby"
        ],
        "supports_imports": true
      },
      {
        "canonical": "rs",
        "display_name": "Rust",
        "extensions": [
          "rs"
        ],
        "language_ids": [
          "rust"
        ],
        "supports_imports": true
      },
      {
        "canonical": "scala",
        "display_name": "Scala",
        "extensions": [
          "sc",
          "scala"
        ],
        "language_ids": [
          "scala"
        ],
        "supports_imports": true
      },
      {
        "canonical": "sh",
        "display_name": "Bash/Shell",
        "extensions": [
          "bash",
          "sh"
        ],
        "language_ids": [
          "shellscript"
        ],
        "supports_imports": false
      },
      {
        "canonical": "swift",
        "display_name": "Swift",
        "extensions": [
          "swift"
        ],
        "language_ids": [
          "swift"
        ],
        "supports_imports": true
      },
      {
        "canonical": "toml",
        "display_name": "TOML",
        "extensions": [
          "toml"
        ],
        "language_ids": [
          "toml"
        ],
        "supports_imports": false
      },
      {
        "canonical": "ts",
        "display_name": "TypeScript",
        "extensions": [
          "ts"
        ],
        "language_ids": [
          "typescript"
        ],
        "supports_imports": true
      },
      {
        "canonical": "tsx",
        "display_name": "TSX/JSX",
        "extensions": [
          "jsx",
          "tsx"
        ],
        "language_ids": [
          "javascriptreact",
          "typescriptreact"
        ],
        "supports_imports": true
      },
      {
        "canonical": "vim",
        "display_name": "Vim script",
        "extensions": [
          "vim"
        ],
        "language_ids": [
          "vim"
        ],
        "supports_imports": false
      },
      {
        "canonical": "yaml",
        "display_name": "YAML",
        "extensions": [
          "yaml",
          "yml"
        ],
        "language_ids": [
          "yaml"
        ],
        "supports_imports": false
      },
      {
        "canonical": "zig",
        "display_name": "Zig",
        "extensions": [
          "zig"
        ],
        "language_ids": [
          "zig"
        ],
        "supports_imports": false
      }
    ]
  },
  "runtime": {
    "server_name": "codelens-mcp",
    "version": "1.13.35",
    "transport": [
      "stdio",
      "streamable-http"
    ],
    "active_surface": "preset:balanced",
    "visible_tool_count": 69,
    "daemon_mode": "standard",
    "supports_http": true,
    "supports_semantic": true,
    "supports_scip_backend": true,
    "supports_otel": false,
    "server_card_features": [
      "role-based-tool-surfaces",
      "composite-workflow-tools",
      "analysis-handles-and-sections",
      "durable-analysis-jobs",
      "mutation-audit-log",
      "session-resume",
      "session-client-metadata",
      "deferred-tool-loading",
      "tree-sitter-symbol-parsing",
      "import-graph-analysis",
      "lsp-integration",
      "token-budget-control",
      "surface-manifest",
      "harness-modes",
      "portable-harness-spec",
      "host-adapter-spec",
      "agent-experience-spec",
      "handoff-artifact-schema",
      "semantic-search",
      "streamable-http",
      "scip-precise-backend"
    ]
  },
  "summary": {
    "workspace_version": "1.13.35",
    "workspace_member_count": 2,
    "registered_tool_definitions": 100,
    "tool_output_schemas": {
      "declared": 71,
      "total": 100
    },
    "harness_mode_count": 4,
    "harness_contract_count": 3,
    "host_adapter_count": 5,
    "agent_experience_resource_count": 1,
    "harness_artifact_schema_count": 1,
    "supported_language_families": 34,
    "supported_extensions": 56
  }
}
