{
  "version" : "1.0",
  "compilerVersion" : "0.0.1-0",
  "fullCatalogue" : "toolingForAi-openai.json",
  "tools" : [ {
    "name" : "ek9_version",
    "category" : "enquiry",
    "description" : "Returns the EK9 compiler toolchain version string, e.g.",
    "schemaRef" : "toolingForAi-openai.json#ek9_version"
  }, {
    "name" : "ek9_help",
    "category" : "enquiry",
    "description" : "Returns the reference page for one keyword, built-in type or topic - hover summary, the full type API for a built-in type, usage examples - or the keyword index when no keyword is given.",
    "schemaRef" : "toolingForAi-openai.json#ek9_help"
  }, {
    "name" : "ek9_explain_error",
    "category" : "enquiry",
    "description" : "Returns the curated rich explanation for one EK9 error code - [DIAGNOSIS], [EXAMPLES] (as ek9_ask 'Q<id>' routes), the first example's source inlined as [WORKED EXAMPLE Q<id>], [ACTION], [SEE ALSO] and, when tooling is mapped, [REMEDIATION].",
    "schemaRef" : "toolingForAi-openai.json#ek9_explain_error"
  }, {
    "name" : "ek9_paradigm",
    "category" : "enquiry",
    "description" : "Returns the constant EK9 paradigm summary (syntax that is NOT C/Java/Python, first-attempt traps, concepts with no analogue elsewhere) and working rules - the smallest priming context for an AI about to write EK9 code - and with withExamples:true the compiled inline examples after it.",
    "schemaRef" : "toolingForAi-openai.json#ek9_paradigm"
  }, {
    "name" : "ek9_ask",
    "category" : "enquiry",
    "description" : "Returns the best-matching curated Q&A entries: 'match: strong|weak|id' first, then per entry the id, question, category, Oracle tool, the answer and last the compiled EK9 example (capped by default).",
    "schemaRef" : "toolingForAi-openai.json#ek9_ask"
  }, {
    "name" : "ek9_query_tool_catalogue",
    "category" : "enquiry",
    "description" : "Returns the whole EK9 tool inventory grouped by category - toolCount and toolNames per category plus workflowNames by default; verbosity:'summary' adds each tool's description, rules and IDE precedent, 'full' the JSON schemas.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_tool_catalogue"
  }, {
    "name" : "ek9_query_tool_detail",
    "category" : "enquiry",
    "description" : "Returns one tool's entry - status, match (exact|single|ambiguous|none), then whenToUse, whenNotToUse, description, examples and inputSchema - by name, intent phrase or the error code it remediates.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_tool_detail"
  }, {
    "name" : "ek9_query_workflow",
    "category" : "enquiry",
    "description" : "Returns one named multi-tool workflow's ordered steps (tool + one-line reason each), or with no name every workflow with workflowNames first.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_workflow"
  }, {
    "name" : "ek9_list_workflows",
    "category" : "enquiry",
    "description" : "Returns every named multi-tool workflow - workflowCount, workflowNames, then each workflow's summary and full step sequence.",
    "schemaRef" : "toolingForAi-openai.json#ek9_list_workflows"
  }, {
    "name" : "ek9_query_metric_limits",
    "category" : "enquiry",
    "description" : "Returns EK9's ENFORCED quality-metric limits (coupling, cohesion, complexity, DI, size) - limitCount and limits[] with ruleCode, metricKey, limitKind, comparator, limit and usableMax - from the single source the checkers fire on.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_metric_limits"
  }, {
    "name" : "ek9_read_construct",
    "category" : "enquiry",
    "description" : "Answers first: source.text with source.file/startLine/endLine from the compiled symbol-table boundaries (no line guessing), construct {name, fullyQualifiedName, kind}, members[{name, kind, signature, startLine, endLine, compilerMade?}] (a program has none) and source.contentHash.",
    "schemaRef" : "toolingForAi-openai.json#ek9_read_construct"
  }, {
    "name" : "ek9_read_file",
    "category" : "enquiry",
    "description" : "Answers first: content (numbered 'N| ' when lineNumbers:true), contentHash for expectedContentHash, and for .ek9 the structure outline {module, constructs[{kind,name,startLine,endLine,signature}]} - whole file up to 2,000 lines, truncated:true first when cut.",
    "schemaRef" : "toolingForAi-openai.json#ek9_read_file"
  }, {
    "name" : "ek9_search_text",
    "category" : "enquiry",
    "description" : "Answers first: matchCount, files[], sites['file.ek9:LINE'] (truncated:true first when cut), then matches[{file,line,column,snippet}] - a literal or regex grep across the workspace with EK9-aware exclusions (build outputs, .ek9-cache/, dot-directories).",
    "schemaRef" : "toolingForAi-openai.json#ek9_search_text"
  }, {
    "name" : "ek9_list_files",
    "category" : "enquiry",
    "description" : "Answers first: entryCount and paths[] (workspace-relative, the value ek9_read_file takes), then entries[{path, name, kind, size, lastModified}] - never content; direct children unless pathPattern recurses.",
    "schemaRef" : "toolingForAi-openai.json#ek9_list_files"
  }, {
    "name" : "ek9_check_requirements",
    "category" : "enquiry",
    "description" : "Answers status (healthy | violations | dangling-anchors) and healthy first, then requirementCount, developedCount, outstandingCount, violations[] (the store is broken), danglingAnchors[] (a @Test names a requirement that does not exist), outstanding[] (the backlog) and unanchoredTests[] (the authoring work-list) - the whole graph, nothing to verify.",
    "schemaRef" : "toolingForAi-openai.json#ek9_check_requirements"
  }, {
    "name" : "ek9_query_requirement",
    "category" : "enquiry",
    "description" : "Answers status (ok | not-found) and requirementId first, then the node(s): each carries authored{title, body, retired, meta} and derived{developed, anchoringTests, parentChain, children} so a computed rollup is never mistaken for a person's assertion; list and outstanding return requirementCount + requirements[], footprint the anchoringTests and reachedSymbols.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_requirement"
  }, {
    "name" : "ek9_render_specification",
    "category" : "enquiry",
    "description" : "Answers status (ok | not-found), requirementId and markdown - the specification document generated from the requirement graph with every section marked authored or derived - plus anchorsResolved saying whether a compile backed the derived sections.",
    "schemaRef" : "toolingForAi-openai.json#ek9_render_specification"
  }, {
    "name" : "ek9_find_unused_code",
    "category" : "enquiry",
    "description" : "Answers first: deadNames and deadByOwner (owner -> its dead members), complete workspace-wide - then each finding classified.",
    "schemaRef" : "toolingForAi-openai.json#ek9_find_unused_code"
  }, {
    "name" : "ek9_find_inline_candidates",
    "category" : "enquiry",
    "description" : "Answers candidates[] (file, line, name, tier worth-inlining | safe, useCount) ranked slop-first, with counts{} - every local '<-' declaration in scope examined.",
    "schemaRef" : "toolingForAi-openai.json#ek9_find_inline_candidates"
  }, {
    "name" : "ek9_query_translation_completeness",
    "category" : "enquiry",
    "description" : "Answers status, translationDebtCount and translationDebt[] (every {textType, locale, method} still needing translation) first, then the per-(text type, locale, method) status grid (translated | stubbed | missing-error) and summary totals - the whole module, nothing to verify.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_translation_completeness"
  }, {
    "name" : "ek9_git_status",
    "category" : "enquiry",
    "description" : "Answers first: summary, branch, ahead/behind, isClean, then stagedFiles / modifiedFiles / untrackedFiles / deletedFiles / conflictFiles names and changedFileCount, then the per-file records with change words.",
    "schemaRef" : "toolingForAi-openai.json#ek9_git_status"
  }, {
    "name" : "ek9_git_diff",
    "category" : "enquiry",
    "description" : "Answers first: summary, fileCount, additions/deletions and changedFiles names, then per-file hunks with fromLine/toLine and the unified-diff text (dropped at verbosity:'summary').",
    "schemaRef" : "toolingForAi-openai.json#ek9_git_diff"
  }, {
    "name" : "ek9_git_log",
    "category" : "enquiry",
    "description" : "Answers first: commitCount and commitTotal with a truncation note, then commits (sha, author, date, subject, body, parents; files with includeFileList:true).",
    "schemaRef" : "toolingForAi-openai.json#ek9_git_log"
  }, {
    "name" : "ek9_git_blame",
    "category" : "enquiry",
    "description" : "Answers first: lineCount and the range, then one record per line (line, sha, author, email, date, subject, text); verbosity:'summary' collapses them to same-commit runs.",
    "schemaRef" : "toolingForAi-openai.json#ek9_git_blame"
  }, {
    "name" : "ek9_git_branch",
    "category" : "enquiry",
    "description" : "Answers first: current, branchCount and branchNames, then per-branch records (name, current, upstream, ahead/behind, gone, sha).",
    "schemaRef" : "toolingForAi-openai.json#ek9_git_branch"
  }, {
    "name" : "ek9_check_package_dependency_cycles",
    "category" : "enquiry",
    "description" : "Answers with hasCycles, cycleCount and the cycles (closed package paths with their edges) across every package declared in the workspace, plus packagesAnalysed and sccCount.",
    "schemaRef" : "toolingForAi-openai.json#ek9_check_package_dependency_cycles"
  }, {
    "name" : "ek9_query_package_version",
    "category" : "enquiry",
    "description" : "Answers with version (the 'defines package' literal) and the line it is on for one .ek9 file; null with an error when the file declares no package.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_package_version"
  }, {
    "name" : "ek9_query_package",
    "category" : "enquiry",
    "description" : "Answers first: status, packageCount, then packages[] {name, version, description, license, tags, publishable, deps, devDeps, excludeDeps, capabilities, sourceLocation} - declared, not resolved.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_package"
  }, {
    "name" : "ek9_query_name_clashes",
    "category" : "enquiry",
    "description" : "Answers first: status, name, fullyQualifiedName, clashFree, donorLocals, renames (one globally-safe fresh name per clashing local), callSiteCount, then callSites[] with per-site clashes and the summary line.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_name_clashes"
  }, {
    "name" : "ek9_inspect_symbol_at_cursor",
    "category" : "enquiry",
    "description" : "Answers first: name, fullyQualifiedName, kind, type, state, declaredAt, then the modifiers, flags, scope, purityContext and the type's operators - one symbol, cursor-precise.",
    "schemaRef" : "toolingForAi-openai.json#ek9_inspect_symbol_at_cursor"
  }, {
    "name" : "ek9_list_visible_symbols",
    "category" : "enquiry",
    "description" : "Answers first: scopeChain[] innermost to outermost, each scope with its symbols (name, kind, type, state, roles), then activeGuards and purityConstraint.",
    "schemaRef" : "toolingForAi-openai.json#ek9_list_visible_symbols"
  }, {
    "name" : "ek9_query_complexity",
    "category" : "enquiry",
    "description" : "Answers first: in view 'totals' the workspace-wide methodCount, averages, maxima and methodsAboveCyclomaticThreshold / methodsAboveCognitiveThreshold; in 'hotspots' hotspotNames[] then hotspots[]; in 'inputVariety' per-callable floor/ceiling (display-only).",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_complexity"
  }, {
    "name" : "ek9_query_construct",
    "category" : "enquiry",
    "description" : "Answers first: fieldNames, methodNames, operatorNames, defaultedOperatorNames, superName, traitNames, then construct{name, fullyQualifiedName, module, genus, isOpen, extends, traits, modifiers} and the full fields/methods/operators/constructors/metrics.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_construct"
  }, {
    "name" : "ek9_query_flow",
    "category" : "enquiry",
    "description" : "Answers first: status, branchCount, loopCount, guardCount, deadBranchCount, then method{name, fullyQualifiedName, signature, declaredAt}, isPure, metrics (cyclomatic/cognitive), flowNodes (the guard-tracked branch/loop tree) and deepAnalysis (provably dead branches, redundant tri-state checks).",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_flow"
  }, {
    "name" : "ek9_advise_loop",
    "category" : "enquiry",
    "description" : "Answers first: directions[] (each with summary such as 'candidate-stream-aggregation' or 'keep-as-loop', candidateShape, confidence), then the loop{} facts, outputs[], resources[] and unknowns[] - read-only.",
    "schemaRef" : "toolingForAi-openai.json#ek9_advise_loop"
  }, {
    "name" : "ek9_verify_method",
    "category" : "enquiry",
    "description" : "Answers first: status, name, verified, then counterexampleCount, counterexamples[] {obligation, witness, suggestedTest, suggestedFix}, provedSafe, deadBranches and nextStep.",
    "schemaRef" : "toolingForAi-openai.json#ek9_verify_method"
  }, {
    "name" : "ek9_query_module",
    "category" : "enquiry",
    "description" : "Answers first: status, module, constructCount, constructNames, then constructs[] with kind, member counts and quality metrics (complexity, coupling, cohesion).",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_module"
  }, {
    "name" : "ek9_query_pipeline",
    "category" : "enquiry",
    "description" : "Answers first: status, stageCount, then stages[] in order {operator, kind, consumes, produces}, sourceType, resultType and summary.transformations.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_pipeline"
  }, {
    "name" : "ek9_query_workspace",
    "category" : "enquiry",
    "description" : "Answers first: status, moduleCount, moduleNames, constructCount, then modules[] {name, constructCount, constructs[] {name, category, genus}}; verbosity:'none' lists modules only, 'full' adds per-construct detail.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_workspace"
  }, {
    "name" : "ek9_query_classes",
    "category" : "enquiry",
    "description" : "Answers first: classNames[], then classes[] (name, module, file, line, extends, traits, isOpen, isAbstract, keyMethods, methodCount) and summary counts - workspace-wide or the filtered subset.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_classes"
  }, {
    "name" : "ek9_query_records",
    "category" : "enquiry",
    "description" : "Answers first: status, recordCount, recordNames - complete for the workspace or the filters given - then records[] {name, module, file, line, fields, extends, traits, isOpen}.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_records"
  }, {
    "name" : "ek9_query_traits",
    "category" : "enquiry",
    "description" : "Answers first: status, implementedByAll (when asked), traitCount, traitNames - complete for the workspace or the filters given - then traits[] {name, module, file, line, traitOf, implementedBy, implementedByCount, methods, methodCount}.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_traits"
  }, {
    "name" : "ek9_query_components",
    "category" : "enquiry",
    "description" : "Answers first: componentNames[], then components[] (name, module, file, line, extends, isOpen, isAbstract, keyMethods, methodCount) and summary counts - the DI-injectable constructs, workspace-wide or the filtered subset.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_components"
  }, {
    "name" : "ek9_query_constrained_types",
    "category" : "enquiry",
    "description" : "Answers first: constrainedTypeNames[], then constrainedTypes[] (name, module, file, line, constrains, constraint, admissibleWindow, suffix) and summary counts.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_constrained_types"
  }, {
    "name" : "ek9_query_functions",
    "category" : "enquiry",
    "description" : "Answers first: status, functionCount, functionNames - complete for the workspace or the filters given - then functions[] {name, module, file, line, signature, parameters, returnType, isPure, isAbstract}.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_functions"
  }, {
    "name" : "ek9_query_programs",
    "category" : "enquiry",
    "description" : "Answers first: status, programCount, programNames - complete for the workspace or the filters given - then programs[] {name, module, file, line, signature, parameters}.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_programs"
  }, {
    "name" : "ek9_query_enumerations",
    "category" : "enquiry",
    "description" : "Answers first: enumerationNames[], then enumerations[] (name, module, file, line, values in declaration order, valueCount) and summary counts.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_enumerations"
  }, {
    "name" : "ek9_query_localisations",
    "category" : "enquiry",
    "description" : "Answers first: status, moduleCount, inconsistencyCount, workspaceLocales, then modules[] {name, locales, percentTranslated, methodCount} and inconsistencies[] {locale, supportedIn, missingIn}.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_localisations"
  }, {
    "name" : "ek9_query_env_vars",
    "category" : "enquiry",
    "description" : "Answers first: names[] (every env-var read), then envVars[] per call site (site, name, accessMethod, sanitization, inConstruct), dynamicAccesses[] and summary counts - type-resolved EnvVars calls, never text matches.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_env_vars"
  }, {
    "name" : "ek9_query_capability_usage",
    "category" : "enquiry",
    "description" : "Answers first: consistent, underDeclared, overDeclared, usedCapabilities, declaredCapabilities and findings, then actualUsage with every call site - the workspace-wide gated-type audit against the package block.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_capability_usage"
  }, {
    "name" : "ek9_query_sensitive_reveals",
    "category" : "enquiry",
    "description" : "Answers first: status, revealCount, violationCount, privilegedCount, violationSites as file.ek9:LINE, then reveals[] {file, line, column, module, inConstruct, inConstructFqn, privilege}.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_sensitive_reveals"
  }, {
    "name" : "ek9_query_service_routes",
    "category" : "enquiry",
    "description" : "Answers first: status, programState, routeCount, byService, then routes[] {verb, uri, fullPath, parameters with binding + sanitized, securityGate, cors, auditWarnings} and summary counts.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_service_routes"
  }, {
    "name" : "ek9_query_diagnostics",
    "category" : "enquiry",
    "description" : "Answers first: diagnosticCount, errorCount, warningCount, errorCodes[] and sites[] ('file.ek9:LINE CODE message'), then diagnostics[] in full, byCode and byFile - the Problems View of the last compile.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_diagnostics"
  }, {
    "name" : "ek9_query_effective_api",
    "category" : "enquiry",
    "description" : "Answers first: declaredMethodNames, inheritedMethodNames, overrides as 'method:Trait', operatorNames, traitNames - then every member in full with its source and file/line.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_effective_api"
  }, {
    "name" : "ek9_query_type_hierarchy",
    "category" : "enquiry",
    "description" : "Answers first: subtypeNames (implementedBy on a trait), superNames, traitNames, allowedSubtypes for a sealed trait - complete workspace-wide - then the full graph.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_type_hierarchy"
  }, {
    "name" : "ek9_query_references",
    "category" : "enquiry",
    "description" : "Answers first: useSiteCount, usedByConstructs, useSites as file.ek9:LINE - then each reference with its source line (omitted above 50 sites unless verbosity:'full').",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_references"
  }, {
    "name" : "ek9_query_dispatchers",
    "category" : "enquiry",
    "description" : "Answers first: routing[] - per dispatcher method its dispatchOn type, typesWithOwnHandler, typesUsingInheritedHandler (served by a supertype's handler) and typesFallingBack (to the dispatchOn entry point's own body), with routingCovers when the lists are whole - then the full dispatcherMethods[] with resolutionTable; on a sealed type, allowedSubtypes[].",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_dispatchers"
  }, {
    "name" : "ek9_query_build_status",
    "category" : "enquiry",
    "description" : "Answers first: programState, queriesReliable with its reason, buildOutcome, lastPhaseReached, then sourceCount/sourcesClean/sourcesWithErrors and sources[] with per-file error and warning counts.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_build_status"
  }, {
    "name" : "ek9_query_call_graph",
    "category" : "enquiry",
    "description" : "Answers first: callerNames / calleeNames and callerSites / calleeSites ('file.ek9:LINE') - then the chain to the requested depth.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_call_graph"
  }, {
    "name" : "ek9_find_constructs_by_name",
    "category" : "enquiry",
    "description" : "Answers first: matchCount, then matches[] (name, fullyQualifiedName, module, genus, file, line, column) - workspace-wide; matches:[] when no top-level construct has that name.",
    "schemaRef" : "toolingForAi-openai.json#ek9_find_constructs_by_name"
  }, {
    "name" : "ek9_find_symbols",
    "category" : "enquiry",
    "description" : "Answers first: symbolCount, symbolNames, withinNames (Type.method each belongs to), siteCount, byKind, byUse, sites as file.ek9:LINE - then each symbol (kind, within, declaredAt, renameable, counts) with its declared/read/written sites.",
    "schemaRef" : "toolingForAi-openai.json#ek9_find_symbols"
  }, {
    "name" : "ek9_query_dependency_injection",
    "category" : "enquiry",
    "description" : "Answers first: applicationCount and applications[] (registrations, injectionSites, boundPrograms, health incl.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_dependency_injection"
  }, {
    "name" : "ek9_query_module_dependencies",
    "category" : "enquiry",
    "description" : "Answers first: status, moduleCount, edgeCount, hasCycles, then modules[] {name, files, constructCount}, dependencies[] {from, to, referenceCount, kinds} and metrics (fan-in/out, cycles).",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_module_dependencies"
  }, {
    "name" : "ek9_query_module_landscape",
    "category" : "enquiry",
    "description" : "Answers first: status, programState, moduleCount, moduleNames, then modules[] {name, band, types, metrics as headroom {rule, limit, value, band, enforced}, cycles} ranked worst-first and summary.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_module_landscape"
  }, {
    "name" : "ek9_query_module_coupling",
    "category" : "enquiry",
    "description" : "Answers first: status, programState, edgeCount, then edges[] {from, to, types, weight, shape, sites, inCycle, proposals} ranked worst-first, audit (adHocCoupling, overDeclaredReferences candidates) and summary.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_module_coupling"
  }, {
    "name" : "ek9_query_module_cohesion",
    "category" : "enquiry",
    "description" : "Answers first: status, programState, moduleCount, then modules[] {name, moduleCohesion (E11017 disconnected groups), cohesionRatio, lcom4 (E11014 over-limit constructs)}; symbol:'Type' drills to one construct's LCOM4.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_module_cohesion"
  }, {
    "name" : "ek9_query_construct_neighbourhood",
    "category" : "enquiry",
    "description" : "Answers first: nodeCount, nodes[] (name, fullyQualifiedName, module, genus, file, line, distance), edges[] (from, to, kind) and edgesByKind - the N-hop typed ego graph merging inheritance, calls, composition, references and DI.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_construct_neighbourhood"
  }, {
    "name" : "ek9_query_purity_impact",
    "category" : "enquiry",
    "description" : "Answers first: status, change, availableChanges, verdict (ready / would-fail / cascade-too-large / blocked-refuse-to-root), callerNames, calleeNames, then anchor, contract, afferent, efferent axes - the same closure ek9_fix_purity_contract applies.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_purity_impact"
  }, {
    "name" : "ek9_query_data_touch",
    "category" : "enquiry",
    "description" : "Answers first: anchor and verdicts (parameter → untouched | mutates | escapes | ...",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_data_touch"
  }, {
    "name" : "ek9_query_mutex_payload",
    "category" : "enquiry",
    "description" : "Answers first: status, summary {bodies, contained, mayEscape, unknown}, findingCount, then findings[] {file, line, inConstruct, payloadType, locks, escape, sites[] with via chain and origin}.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_mutex_payload"
  }, {
    "name" : "ek9_query_signature_impact",
    "category" : "enquiry",
    "description" : "Answers first: status, direction (the mutation kind), verdict (ready / would-fail), callerSites, then anchor, contract (root + overrides the change cascades to) and afferent (the call sites ek9_change_signature would rewrite, each fixable or breaks).",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_signature_impact"
  }, {
    "name" : "ek9_check_module_cycles",
    "category" : "enquiry",
    "description" : "Answers first: hasCycles and cycleCount, then cycles[] (each a closed module path with edges[].via naming the source files) and moduleCount - the whole workspace module graph.",
    "schemaRef" : "toolingForAi-openai.json#ek9_check_module_cycles"
  }, {
    "name" : "ek9_query_dependency_tree",
    "category" : "enquiry",
    "description" : "Answers first: direction, rootPackage, rootVersion, then tree{} (dependsOn) or deduplicated[] with broughtInBy (broughtInBy), selections[] and summary - the transitive package dependency tree across the workspace.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_dependency_tree"
  }, {
    "name" : "ek9_query_lock_analysis",
    "category" : "enquiry",
    "description" : "Answers first: status, then deadlockCount, lockIdentityCount, enterSiteCount, keyBodyCount, crossThreadEdgeCount and nextStep (the one drill-down worth calling); lockIdentityCount 0 = no MutexLock anywhere, deadlock structurally impossible.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_lock_analysis"
  }, {
    "name" : "ek9_query_deadlock_chain",
    "category" : "enquiry",
    "description" : "Answers first: chains[] - per detected lock risk its errorCode, path, outerLock/innerLock and ordered steps[] with file/line/column - chains:[] when nothing is at risk.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_deadlock_chain"
  }, {
    "name" : "ek9_query_enter_sites",
    "category" : "enquiry",
    "description" : "Answers first: siteCount, then sites[] (stableId, kind, receiver, lockIdentityIds, location, enclosingFunction) - every lock acquisition, workspace-wide.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_enter_sites"
  }, {
    "name" : "ek9_query_lock_identity",
    "category" : "enquiry",
    "description" : "Answers first: status, identityCount, then identities[] {stableId, origin, displayName, originSymbol, originLocation, payload}; stableId joins ek9_query_enter_sites and ek9_query_deadlock_chain.",
    "schemaRef" : "toolingForAi-openai.json#ek9_query_lock_identity"
  }, {
    "name" : "ek9_write_file",
    "category" : "editor",
    "description" : "Answers first: status (applied | ready | would-fail | conflicts), written, edits[{file, type:create|overwrite, bytesWritten}] and contentHash; a .ek9 write carries wouldBeDiagnostics from the verifying compile, any other file is written as-is.",
    "schemaRef" : "toolingForAi-openai.json#ek9_write_file"
  }, {
    "name" : "ek9_delete_file",
    "category" : "editor",
    "description" : "Answers first: status (applied | ready | conflicts | would-fail), written and, on a refusal, referenceCount + referencingFiles[] before the per-site conflicts[]; edits[{file, type:delete, disposition}].",
    "schemaRef" : "toolingForAi-openai.json#ek9_delete_file"
  }, {
    "name" : "ek9_delete_directory",
    "category" : "editor",
    "description" : "Answers first: status (applied | ready | conflicts), written and edits[{file, type:delete, kind:directory}] - removes an EMPTY workspace directory, never a populated tree.",
    "schemaRef" : "toolingForAi-openai.json#ek9_delete_directory"
  }, {
    "name" : "ek9_move_file",
    "category" : "editor",
    "description" : "Answers first: status (applied | ready | conflicts), written and edits[{file, newFile, type:move}] - a pure file-system relocation of any workspace file, contents untouched.",
    "schemaRef" : "toolingForAi-openai.json#ek9_move_file"
  }, {
    "name" : "ek9_rename_file",
    "category" : "editor",
    "description" : "Answers first: status (applied | ready | conflicts), written and edits[{file, newFile, type:move}] - a pure file-system rename of a .ek9 source, contents and module identity untouched.",
    "schemaRef" : "toolingForAi-openai.json#ek9_rename_file"
  }, {
    "name" : "ek9_edit_file",
    "category" : "editor",
    "description" : "Answers first: status (applied | ready | would-fail | conflicts), written, edits[{file, startLine, endLine, before, after}], wouldBeDiagnostics from the verifying compile and contentHash on an applied edit - an atomic batch of text edits to one file, or to several as one apply.",
    "schemaRef" : "toolingForAi-openai.json#ek9_edit_file"
  }, {
    "name" : "ek9_new_construct",
    "category" : "editor",
    "description" : "Scaffolds one top-level construct (class/record/trait/component/function/type/constant/service) into an EXISTING module file, or a new package.ek9 for mode:'package'; answers status, edits[] (one INSERT, or one CREATE for a package), stubs[] to fill with ek9_insert_statements, added[] and nextStep.",
    "schemaRef" : "toolingForAi-openai.json#ek9_new_construct"
  }, {
    "name" : "ek9_remove_statements",
    "category" : "editor",
    "description" : "Deletes a contiguous statement range from one method/function/operator body; answers status and edits[] (one DELETE per line), or conflicts[] (range-straddles-method-boundary, range-not-on-statement-boundary, removed-statement-declares-used-local, removal-is-a-replacement, range-empties-body).",
    "schemaRef" : "toolingForAi-openai.json#ek9_remove_statements"
  }, {
    "name" : "ek9_remove_comments",
    "category" : "editor",
    "description" : "Deletes one whole-line comment block (//, <!- -!>, <!-- --> or <?- -?>) in full; answers status and edits[] (one DELETE per line), or conflicts[] (kind 'comment-shares-line-with-code') when a boundary line also carries code.",
    "schemaRef" : "toolingForAi-openai.json#ek9_remove_comments"
  }, {
    "name" : "ek9_insert_statements",
    "category" : "editor",
    "description" : "Splices EK9 statement(s) into a named method/function/operator body at anchor top, bottom, replace or a body line, re-indented by the tool; answers status, edits[] (one INSERT), insertedLineRange and resultingBodySnippet, or error.problems[] naming the entry that does not parse.",
    "schemaRef" : "toolingForAi-openai.json#ek9_insert_statements"
  }, {
    "name" : "ek9_create_dynamic_function",
    "category" : "editor",
    "description" : "Inserts `variableName <- (captures) is|extends Base as [pure] function` with its body (or an inline `(expr)`, or an //AI: stub) after the line; answers status, edits[] and summary, with a would-fail carrying the compiler's own diagnostics.",
    "schemaRef" : "toolingForAi-openai.json#ek9_create_dynamic_function"
  }, {
    "name" : "ek9_create_dynamic_class",
    "category" : "editor",
    "description" : "Inserts `variableName <- (captures) trait of T as class` (or the tuple / generic form) with its members after the line, auto-adding `default operator ?` for captures; answers status, edits[] and summary, with a would-fail carrying the compiler's own diagnostics (unimplemented abstract methods named).",
    "schemaRef" : "toolingForAi-openai.json#ek9_create_dynamic_class"
  }, {
    "name" : "ek9_add_field",
    "category" : "editor",
    "description" : "Inserts the field declaration at the construct's canonical field position; answers status, edits[] and summary, a clashing name as conflicts[] (name-collision).",
    "schemaRef" : "toolingForAi-openai.json#ek9_add_field"
  }, {
    "name" : "ek9_rename_field",
    "category" : "editor",
    "description" : "Renames a private field and every use inside its owning construct body in one atomic edit; answers status and edits[] (one REPLACE per rewritten line).",
    "schemaRef" : "toolingForAi-openai.json#ek9_rename_field"
  }, {
    "name" : "ek9_remove_field",
    "category" : "editor",
    "description" : "Deletes a field from a class/record/component; answers status and edits[] (one DELETE), or conflicts[] with every in-body reference classified by 'kind' and a suggestedRepair for the mechanical ones.",
    "schemaRef" : "toolingForAi-openai.json#ek9_remove_field"
  }, {
    "name" : "ek9_introduce_field",
    "category" : "editor",
    "description" : "Lifts a local and its initialiser to a same-named field of the enclosing class/record/component and deletes the local (adding `default operator ?` when it is the first field); answers status, edits[] and conflicts[] (no-promotable-declaration, not-inside-fielded-aggregate, field-name-collision).",
    "schemaRef" : "toolingForAi-openai.json#ek9_introduce_field"
  }, {
    "name" : "ek9_introduce_parameter",
    "category" : "editor",
    "description" : "Appends a new parameter to the enclosing method/function, replaces the selected in-body expression with it and passes the ORIGINAL expression at every call site (Fowler \"Introduce Parameter\"); answers status, edits[] and conflicts[] (value-expression-not-a-single-expression, type-not-inferable, ...).",
    "schemaRef" : "toolingForAi-openai.json#ek9_introduce_parameter"
  }, {
    "name" : "ek9_safe_delete",
    "category" : "editor",
    "description" : "Deletes a top-level construct or a class/record/component member - or several as one change - after a workspace-wide reference check; answers status and edits[] (one DELETE per line), or conflicts[] with one 'construct-still-referenced' entry per citing site.",
    "schemaRef" : "toolingForAi-openai.json#ek9_safe_delete"
  }, {
    "name" : "ek9_extract_method",
    "category" : "editor",
    "description" : "Inserts the new method (parameters and return inferred from variable data-flow) and replaces the block with a call to it; answers status, edits[] and summary, an ambiguous or boundary-crossing block as conflicts[].",
    "schemaRef" : "toolingForAi-openai.json#ek9_extract_method"
  }, {
    "name" : "ek9_extract_variable",
    "category" : "editor",
    "description" : "Inserts `name <- expression` before the first occurrence and replaces every matching occurrence in the enclosing block with the name; answers status, edits[] and summary, a side-effecting multi-occurrence expression as conflicts[].",
    "schemaRef" : "toolingForAi-openai.json#ek9_extract_variable"
  }, {
    "name" : "ek9_extract_constant",
    "category" : "editor",
    "description" : "Appends `name <- literal` to the module's `defines constant` block (created if absent) and replaces every occurrence of the literal in the file with the name; answers status, edits[] and summary with the occurrence count, a clashing name as conflicts[] (constant-name-collision).",
    "schemaRef" : "toolingForAi-openai.json#ek9_extract_constant"
  }, {
    "name" : "ek9_promote_to_constant",
    "category" : "editor",
    "description" : "Moves a `name <- literal` declaration into the module's `defines constant` block (same name, original deleted); answers status, edits[] and conflicts[] (no-promotable-declaration, initialiser-not-a-literal, constant-name-collision).",
    "schemaRef" : "toolingForAi-openai.json#ek9_promote_to_constant"
  }, {
    "name" : "ek9_organize_constants",
    "category" : "editor",
    "description" : "Moves every `defines constant` declaration of one module into one block in one file (created when targetFile is new); answers status, edits[] (one INSERT + one DELETE per moved declaration) and conflicts[] (comments-in-block, module-ambiguous, target-file-ambiguous, pre-existing-duplicate-constant).",
    "schemaRef" : "toolingForAi-openai.json#ek9_organize_constants"
  }, {
    "name" : "ek9_create_requirement",
    "category" : "editor",
    "description" : "Writes the requirement nodes as flat markdown files under .ek9-ai/requirements/ (one atomic batch, each keyed by its frozen slug) and answers the editor envelope: status (applied | ready | conflicts), written, edits[] and summary naming the ids created.",
    "schemaRef" : "toolingForAi-openai.json#ek9_create_requirement"
  }, {
    "name" : "ek9_update_requirement",
    "category" : "editor",
    "description" : "Rewrites one existing requirement node's markdown file (body, title, meta, position, retirement) or deletes it, and answers the editor envelope: status (applied | ready | conflicts), written, edits[] and summary naming the mode applied.",
    "schemaRef" : "toolingForAi-openai.json#ek9_update_requirement"
  }, {
    "name" : "ek9_inline_variable",
    "category" : "editor",
    "description" : "Deletes a single-assignment local's declaration and substitutes its initialiser at every use site (including `${...}` holes); answers status, edits[] and conflicts[] (variable-reassigned, impure-initialiser-multi-use, ...).",
    "schemaRef" : "toolingForAi-openai.json#ek9_inline_variable"
  }, {
    "name" : "ek9_inline_function",
    "category" : "editor",
    "description" : "Replaces every call to a FUNCTION or METHOD with its parameter-substituted body and deletes the declaration; answers status, edits[] (one REPLACE per call site + the DELETE) and conflicts[] (kind 'variable-clash' with {name, suggestedName}).",
    "schemaRef" : "toolingForAi-openai.json#ek9_inline_function"
  }, {
    "name" : "ek9_rename_symbol",
    "category" : "editor",
    "description" : "Renames a symbol and every workspace reference to it atomically across all files (references blocks and `${...}` holes included); answers status, edits[] per site and conflicts[] (name-collision-in-target-scope, convention-mismatch, symbol-not-renameable).",
    "schemaRef" : "toolingForAi-openai.json#ek9_rename_symbol"
  }, {
    "name" : "ek9_change_signature",
    "category" : "editor",
    "description" : "Rewrites the declaration and EVERY call site atomically (add / remove / reorder parameters, change the return type, toggle 'as pure'); answers status, edits[] and summary with the call-site count, a blocking call site as conflicts[] (callsite-incompatible-with-new-signature).",
    "schemaRef" : "toolingForAi-openai.json#ek9_change_signature"
  }, {
    "name" : "ek9_fix_purity_contract",
    "category" : "editor",
    "description" : "Adds or removes 'as pure' on the callable the diagnostic names, with the override cascade applied; answers status, edits[] and summary, the horizontal cascade as advisories[] and a mode/diagnosis mismatch as conflicts[].",
    "schemaRef" : "toolingForAi-openai.json#ek9_fix_purity_contract"
  }, {
    "name" : "ek9_change_visibility",
    "category" : "editor",
    "description" : "Rewrites the method's declaration line with the new access modifier (public = none); answers status, edits[] and summary, an unchanged method as conflicts[] (already-<visibility>).",
    "schemaRef" : "toolingForAi-openai.json#ek9_change_visibility"
  }, {
    "name" : "ek9_make_open",
    "category" : "editor",
    "description" : "Appends 'as open' to the declaration so the construct can be extended; answers status and edits[] (one REPLACE on the declaration line), or conflicts[] when it is already open.",
    "schemaRef" : "toolingForAi-openai.json#ek9_make_open"
  }, {
    "name" : "ek9_make_closed",
    "category" : "editor",
    "description" : "Strips 'as open' from the declaration so the construct can no longer be extended; answers status, edits[] and conflicts[] naming every subtype (kind 'subtype') that would break with E05030.",
    "schemaRef" : "toolingForAi-openai.json#ek9_make_closed"
  }, {
    "name" : "ek9_make_abstract",
    "category" : "editor",
    "description" : "Rewrites the declaration to 'as abstract' (replacing any 'as open') so the construct can no longer be instantiated; answers status, edits[] and wouldBeDiagnostics with every direct construction site (E10030).",
    "schemaRef" : "toolingForAi-openai.json#ek9_make_abstract"
  }, {
    "name" : "ek9_make_concrete",
    "category" : "editor",
    "description" : "Removes 'as abstract' from the declaration (keeping 'as open' unless keepOpen:false) so the construct can be instantiated; answers status, edits[] and conflicts[] listing every remaining abstract member (kind 'abstract-method').",
    "schemaRef" : "toolingForAi-openai.json#ek9_make_concrete"
  }, {
    "name" : "ek9_seal_type",
    "category" : "editor",
    "description" : "Adds 'allow only A, B, C' to a class or trait declaration (plus 'as open' on a class that has no extensibility modifier); answers status, edits[] and conflicts[] naming any entry that does not extend the target or any existing subtype left off the list.",
    "schemaRef" : "toolingForAi-openai.json#ek9_seal_type"
  }, {
    "name" : "ek9_unseal_type",
    "category" : "editor",
    "description" : "Removes the 'allow only A, B, C' clause from a sealed class or trait, keeping its 'as open' / 'as abstract'; answers status and edits[] (one REPLACE on the declaration line), or conflicts[] (kind 'already-unsealed') when there is no clause.",
    "schemaRef" : "toolingForAi-openai.json#ek9_unseal_type"
  }, {
    "name" : "ek9_add_to_sealed_allowlist",
    "category" : "editor",
    "description" : "Rewrites the sealed type's 'allow only' line with the new subtypes appended; answers status, edits[] and summary, each bad entry as conflicts[] (target-not-sealed, entry-does-not-extend-target, entry-already-in-allowlist).",
    "schemaRef" : "toolingForAi-openai.json#ek9_add_to_sealed_allowlist"
  }, {
    "name" : "ek9_add_method",
    "category" : "editor",
    "description" : "Inserts the method (signature, a require-guarded stub body and the return) at the construct's canonical member position; answers status, edits[] and summary, a same-signature method as conflicts[] (signature-collision).",
    "schemaRef" : "toolingForAi-openai.json#ek9_add_method"
  }, {
    "name" : "ek9_add_route",
    "category" : "editor",
    "description" : "Inserts the web operation (`byId() as GET for :/{id}` or `operator += for :/`) with a compiling stub body into the service; answers status, edits[] and summary, a duplicate route as conflicts[] (route-collision).",
    "schemaRef" : "toolingForAi-openai.json#ek9_add_route"
  }, {
    "name" : "ek9_add_application",
    "category" : "editor",
    "description" : "Appends the application to the file's 'defines application' block (created if absent), one 'register Component() as Interface' line per registration; answers status, edits[] and summary, with a would-fail carrying the compiler's own diagnostics.",
    "schemaRef" : "toolingForAi-openai.json#ek9_add_application"
  }, {
    "name" : "ek9_add_program",
    "category" : "editor",
    "description" : "Appends the program (or @Test program) to the file's 'defines program' block, created if absent, with a stub body that references every parameter and injection; answers status, edits[] and summary.",
    "schemaRef" : "toolingForAi-openai.json#ek9_add_program"
  }, {
    "name" : "ek9_anchor_test",
    "category" : "editor",
    "description" : "Rewrites the @Test directive line above the program to '@Test: \"REQ:x\"' (the execution group kept); answers status, edits[] and summary, an unchanged directive as conflicts[] (already-anchored).",
    "schemaRef" : "toolingForAi-openai.json#ek9_anchor_test"
  }, {
    "name" : "ek9_apply_symbolic_fix",
    "category" : "editor",
    "description" : "Inserts the 'require <divisor> <> 0' line guard-first (an inline-initialised return becomes '<- rtn as T?' + ':=?'), re-finding the counterexample server-side, and migrates a pinning @Test to assertPanic in the same changeset; answers status, edits[] and summary.",
    "schemaRef" : "toolingForAi-openai.json#ek9_apply_symbolic_fix"
  }, {
    "name" : "ek9_apply_guard_pattern",
    "category" : "editor",
    "description" : "Rewrites the construct's head to 'if x <- f()' (or ':=?', or ':=' with an explicit 'then x?', as the source assignment dictates) and deletes the standalone assignment and the redundant 'x?' check; answers status, edits[] and summary, an unsafe or unsupported shape as conflicts[].",
    "schemaRef" : "toolingForAi-openai.json#ek9_apply_guard_pattern"
  }, {
    "name" : "ek9_add_constructor",
    "category" : "editor",
    "description" : "Inserts one constructor at the construct's canonical member position; answers status, edits[] and summary, a same-shape constructor as conflicts[] (constructor-already-exists, with its line).",
    "schemaRef" : "toolingForAi-openai.json#ek9_add_constructor"
  }, {
    "name" : "ek9_convert_constructor",
    "category" : "editor",
    "description" : "Replaces the no-arg constructor with its other spelling - 'default Name()' ↔ an explicit 'this.field :=?",
    "schemaRef" : "toolingForAi-openai.json#ek9_convert_constructor"
  }, {
    "name" : "ek9_add_operator",
    "category" : "editor",
    "description" : "Inserts the operator declaration (or the bare 'default operator' block) at the construct's canonical operator position; answers status, edits[] and summary - 'unchanged', naming where it is, for a default operator the construct already declares; statements[] for an operator already written by hand replace its body, and body:'explicit' over one names the insert route in conflicts[].",
    "schemaRef" : "toolingForAi-openai.json#ek9_add_operator"
  }, {
    "name" : "ek9_collapse_to_default_operator",
    "category" : "editor",
    "description" : "Replaces the operator's declaration and body with the one-line 'default operator <sym>' form (the inverse of ek9_expand_default_operator); answers status, edits[] and summary.",
    "schemaRef" : "toolingForAi-openai.json#ek9_collapse_to_default_operator"
  }, {
    "name" : "ek9_expand_default_operator",
    "category" : "editor",
    "description" : "Replaces the 'default operator' declaration with the explicit body the compiler would synthesise from the fields, ready to customise; answers status, edits[] and summary, a missing default line as conflicts[] (target-not-a-default-operator).",
    "schemaRef" : "toolingForAi-openai.json#ek9_expand_default_operator"
  }, {
    "name" : "ek9_adopt_trait",
    "category" : "editor",
    "description" : "Appends 'with trait of <Trait>' (or '… by <field>') to the construct's declaration and, when implementing, one override stub per abstract trait method; answers status, edits[] and summary, an already-adopted trait as conflicts[] (trait-already-adopted).",
    "schemaRef" : "toolingForAi-openai.json#ek9_adopt_trait"
  }, {
    "name" : "ek9_implement_methods",
    "category" : "editor",
    "description" : "Inserts an 'override' stub for every abstract trait method the class has not implemented; answers status and edits[] (one INSERT block), or an error carrying the resolutions[] a concrete-diamond collision needs.",
    "schemaRef" : "toolingForAi-openai.json#ek9_implement_methods"
  }, {
    "name" : "ek9_generate_delegation",
    "category" : "editor",
    "description" : "Rewrites the class header's 'with trait of <Trait>' clause to '...",
    "schemaRef" : "toolingForAi-openai.json#ek9_generate_delegation"
  }, {
    "name" : "ek9_generate_dispatcher",
    "category" : "editor",
    "description" : "Inserts the '<name>() as dispatcher' entry with its fallback body plus one same-named handler overload per subtype of the base type; answers status, edits[] and summary naming any existing handlers kept.",
    "schemaRef" : "toolingForAi-openai.json#ek9_generate_dispatcher"
  }, {
    "name" : "ek9_prune_empty_sources",
    "category" : "editor",
    "description" : "Deletes every .ek9 file that is a bare zero-construct module stub (shebang + 'defines module' + //EOF, line comments allowed); answers status, edits[] (one DELETE per file) and skipped[] with a reason per retained candidate.",
    "schemaRef" : "toolingForAi-openai.json#ek9_prune_empty_sources"
  }, {
    "name" : "ek9_rewrite_string_concat",
    "category" : "editor",
    "description" : "Replaces a selected `\"a\" + var + \"b\"` concat with the equivalent backtick interpolation, escaping backtick and `$` in literal segments; answers status and edits[] (one REPLACE), conflicts[] (selection-not-a-string-expression, operand-has-no-string-operator with a suggestedRepair), or status:unchanged when the selection is already a backtick literal.",
    "schemaRef" : "toolingForAi-openai.json#ek9_rewrite_string_concat"
  }, {
    "name" : "ek9_insert_coalescing",
    "category" : "editor",
    "description" : "Splices `LEFT <op> RIGHT` in place of a selected single-line left operand using one of the EK9 coalescing / elvis operators; answers status, edits[] (one REPLACE) and conflicts[] (kind 'selection-not-an-expression'), with a type-incompatible pairing surfacing as would-fail.",
    "schemaRef" : "toolingForAi-openai.json#ek9_insert_coalescing"
  }, {
    "name" : "ek9_surround_with",
    "category" : "editor",
    "description" : "Folds a contiguous line range under an if / if-else / try-catch / try-catch-finally / for-range / while / switch head, re-indenting the block per EK9's brace-free rules; answers status and edits[] (one REPLACE carrying the head + the re-indented lines, one DELETE per absorbed line).",
    "schemaRef" : "toolingForAi-openai.json#ek9_surround_with"
  }, {
    "name" : "ek9_move_construct",
    "category" : "editor",
    "description" : "Relocates one top-level construct to another .ek9 file, rewriting every workspace 'references' entry when the move changes module; answers status, edits[] (source DELETE, target INSERT, one rewrite per referring file) and conflicts[].",
    "schemaRef" : "toolingForAi-openai.json#ek9_move_construct"
  }, {
    "name" : "ek9_pull_up",
    "category" : "editor",
    "description" : "Moves the named methods/operators from a subclass into its superclass, dropping 'override' on the moved declarations; answers status and edits[] (one DELETE per member + one INSERT on the superclass).",
    "schemaRef" : "toolingForAi-openai.json#ek9_pull_up"
  }, {
    "name" : "ek9_push_down",
    "category" : "editor",
    "description" : "Removes the named methods/operators from a superclass and copies them into each named direct subclass; answers status, edits[] (one DELETE + one INSERT per subclass) and conflicts[] (subclass-not-direct, target-is-only-source-class).",
    "schemaRef" : "toolingForAi-openai.json#ek9_push_down"
  }, {
    "name" : "ek9_extract_trait",
    "category" : "editor",
    "description" : "Appends a new 'defines trait' block declaring the chosen methods as abstract, adds 'with trait of <Name>' to the class header and 'override' to each method; answers status, edits[] and summary, a non-extractable member as conflicts[] (member-not-extractable-to-trait).",
    "schemaRef" : "toolingForAi-openai.json#ek9_extract_trait"
  }, {
    "name" : "ek9_toggle_block_comment",
    "category" : "editor",
    "description" : "Wraps a whole-line range in EK9 block-comment markers (<!- ...",
    "schemaRef" : "toolingForAi-openai.json#ek9_toggle_block_comment"
  }, {
    "name" : "ek9_format",
    "category" : "editor",
    "description" : "Rewrites the file in canonical EK9 style (indentation, spacing, blank-line and line-break conventions); answers status, edits[] (one per changed line) and summary, an unparseable file as conflicts[] (source-not-parseable).",
    "schemaRef" : "toolingForAi-openai.json#ek9_format"
  }, {
    "name" : "ek9_edit_localized_text",
    "category" : "editor",
    "description" : "Rewrites the `defines text for \"<locale>\"` blocks of one text type in every locale that defines it (one atomic edit, so E07150 locale-completeness holds) and answers the editor envelope: status (applied | ready | would-fail | conflicts | error), written, edits[], summary, and translationDebt[] naming each {textType, locale, method} left placeholder-stubbed.",
    "schemaRef" : "toolingForAi-openai.json#ek9_edit_localized_text"
  }, {
    "name" : "ek9_extract_to_localized_text",
    "category" : "editor",
    "description" : "Replaces the selected string literal with `<localeAccessor>.<name>(args)` and adds the text method to every locale of the i18n file in one atomic changeset, answering the editor envelope: status (applied | ready | would-fail | conflicts | error), written, edits[], summary and translationDebt[] naming the locales left placeholder-stubbed.",
    "schemaRef" : "toolingForAi-openai.json#ek9_extract_to_localized_text"
  }, {
    "name" : "ek9_organize_localized_text",
    "category" : "editor",
    "description" : "Moves the `defines text for \"<locale>\"` blocks between files to the chosen layout - block content preserved verbatim, donors kept as residual stubs, never deleted - and answers the editor envelope: status (applied | ready | conflicts | error), written, edits[] and summary; an already-canonical layout is applied with empty edits[].",
    "schemaRef" : "toolingForAi-openai.json#ek9_organize_localized_text"
  }, {
    "name" : "ek9_organize_references",
    "category" : "editor",
    "description" : "Deletes the unused entries of one file's 'references' block (usage judged by a scratch compile, so functions, types and name-collisions are all right) and answers the editor envelope: status (applied | ready | error), written, edits[] - one delete per unused line - and summary; an already-clean file is applied with empty edits[].",
    "schemaRef" : "toolingForAi-openai.json#ek9_organize_references"
  }, {
    "name" : "ek9_sync_references",
    "category" : "editor",
    "description" : "Rewrites one file's 'references' block - adding the module::Name entry for each cross-module symbol the file uses but has not declared (E50001/E50010) and deleting each entry nothing uses - and answers the editor envelope: status (applied | ready | conflicts | error), written, edits[] and summary ('Added N and removed M reference(s)').",
    "schemaRef" : "toolingForAi-openai.json#ek9_sync_references"
  }, {
    "name" : "ek9_add_dependency",
    "category" : "editor",
    "description" : "Answers with the edit that appends one runtime or dev dependency to the deps/devDeps Dict of a 'defines package' block - source only, nothing is fetched.",
    "schemaRef" : "toolingForAi-openai.json#ek9_add_dependency"
  }, {
    "name" : "ek9_remove_dependency",
    "category" : "editor",
    "description" : "Answers with the edit that deletes one entry from the deps or devDeps Dict of a 'defines package' block (the whole Dict when it was the last entry).",
    "schemaRef" : "toolingForAi-openai.json#ek9_remove_dependency"
  }, {
    "name" : "ek9_exclude_transitive_dependency",
    "category" : "editor",
    "description" : "Answers with the edit that adds an excludeDeps entry (module -> viaModule) to a 'defines package' block, blocking a transitive dependency a parent pulls in.",
    "schemaRef" : "toolingForAi-openai.json#ek9_exclude_transitive_dependency"
  }, {
    "name" : "ek9_remove_transitive_exclusion",
    "category" : "editor",
    "description" : "Answers with the edit that deletes one excludeDeps entry from a 'defines package' block, re-allowing a previously-blocked transitive dependency.",
    "schemaRef" : "toolingForAi-openai.json#ek9_remove_transitive_exclusion"
  }, {
    "name" : "ek9_add_capability",
    "category" : "editor",
    "description" : "Answers with the edit that declares one gated-type capability in the 'capabilities <- [...]' List of a 'defines package' block, plus the resolved capability name.",
    "schemaRef" : "toolingForAi-openai.json#ek9_add_capability"
  }, {
    "name" : "ek9_remove_capability",
    "category" : "editor",
    "description" : "Answers with the edit that revokes one gated-type capability from the 'capabilities <- [...]' List of a 'defines package' block, plus the resolved capability name.",
    "schemaRef" : "toolingForAi-openai.json#ek9_remove_capability"
  }, {
    "name" : "ek9_compile",
    "category" : "execution",
    "description" : "Compiles the workspace and answers status (ok | failed | found-no-sources | blocked), sourceCount, errorCount, warningCount and diagnostics[] - each with file, line, column, severity, errorCode and message, the ek9_query_diagnostics record - for every discovered .ek9 file.",
    "schemaRef" : "toolingForAi-openai.json#ek9_compile"
  }, {
    "name" : "ek9_clean",
    "category" : "execution",
    "description" : "Wipes the on-disk .ek9/ artefacts the scope names and resets the server JVM's in-memory coverage/profiling runtimes; answers status:ok with cleanedSources[] listing what was wiped or reset, in order.",
    "schemaRef" : "toolingForAi-openai.json#ek9_clean"
  }, {
    "name" : "ek9_run_tests",
    "category" : "execution",
    "description" : "Compiles and runs the project's @Test programs (auto-forcing -Cd -O0 so coverage probes map to source) and answers status (ok | compile-failed | no-tests-found | tests-failed | coverage-low), tests:{passed, failed}, overallCoverage, results[] per test, plus the inputVariety and hex change-risk blocks.",
    "schemaRef" : "toolingForAi-openai.json#ek9_run_tests"
  }, {
    "name" : "ek9_run_quality_checks",
    "category" : "execution",
    "description" : "Compiles, runs the tests and answers status (ok | compile-failed | no-tests-found | tests-failed | coverage-low) with tests:{passed, failed}, coverage (overall, methods, lines, branches, byModule), complexity.hotspots[], readability, injections, uncoveredMethods[] and the advisory lockPayloads - every quality metric in one call, extracted in-process.",
    "schemaRef" : "toolingForAi-openai.json#ek9_run_quality_checks"
  }, {
    "name" : "ek9_generate_edge_case_tests",
    "category" : "execution",
    "description" : "Writes a compile-checked edge-case @Test program file for one .ek9 source and answers status (applied | ready | unchanged | blocked | error), written, testCount, the echoed seed and modifiedFiles[] - every harvested constructor, method, operator and function gets the tri-state UNSET value among its inputs.",
    "schemaRef" : "toolingForAi-openai.json#ek9_generate_edge_case_tests"
  }, {
    "name" : "ek9_git_init",
    "category" : "execution",
    "description" : "Reports branch and gitignoreCreated (a .gitignore for the generated .ek9/ directory is scaffolded when absent); refuses when already a repository.",
    "schemaRef" : "toolingForAi-openai.json#ek9_git_init"
  }, {
    "name" : "ek9_git_add",
    "category" : "execution",
    "description" : "Reports stagedPaths and stagedPathCount (what this call staged), then indexAfter and indexAfterCount (everything now staged) and a summary line.",
    "schemaRef" : "toolingForAi-openai.json#ek9_git_add"
  }, {
    "name" : "ek9_git_commit",
    "category" : "execution",
    "description" : "Reports newSha and previousSha, branch, subject, changedFiles and changedFileCount; local history only, nothing is published until ek9_git_push.",
    "schemaRef" : "toolingForAi-openai.json#ek9_git_commit"
  }, {
    "name" : "ek9_git_push",
    "category" : "execution",
    "description" : "Reports remote, branch, upstream, upToDate and a summary line, with git's own report under gitReport; outward-facing and not trivially reversible, so confirm intent first.",
    "schemaRef" : "toolingForAi-openai.json#ek9_git_push"
  }, {
    "name" : "ek9_git_switch",
    "category" : "execution",
    "description" : "Reports status (switched or created), branch and previousBranch; a dirty tree that would be overwritten is refused with the route (commit, stash or restore first), never auto-stashed.",
    "schemaRef" : "toolingForAi-openai.json#ek9_git_switch"
  }, {
    "name" : "ek9_git_merge",
    "category" : "execution",
    "description" : "Reports status and outcome (already-up-to-date, fast-forward, clean-merge or conflict), newSha/previousSha, commitsMerged, changedFiles and conflictFiles; a conflicting merge aborts with the tree restored.",
    "schemaRef" : "toolingForAi-openai.json#ek9_git_merge"
  }, {
    "name" : "ek9_git_restore",
    "category" : "execution",
    "description" : "Reports mode, paths and pathCount and a summary line; ref restores content from that commit instead of the index or HEAD.",
    "schemaRef" : "toolingForAi-openai.json#ek9_git_restore"
  }, {
    "name" : "ek9_git_revert",
    "category" : "execution",
    "description" : "Reports newSha, revertedSha, previousSha, branch, subject, changedFiles and changedFileCount; a conflicting revert aborts with the tree restored.",
    "schemaRef" : "toolingForAi-openai.json#ek9_git_revert"
  }, {
    "name" : "ek9_git_fetch",
    "category" : "execution",
    "description" : "Reports updated, upstream, behind and ahead, a summary line and a nextStep when behind; git's own report under gitReport.",
    "schemaRef" : "toolingForAi-openai.json#ek9_git_fetch"
  }, {
    "name" : "ek9_git_pull",
    "category" : "execution",
    "description" : "Reports commitsPulled, newSha and previousSha, changedFiles and changedFileCount; a dirty tree is refused and a rebase/merge conflict is aborted with the tree restored.",
    "schemaRef" : "toolingForAi-openai.json#ek9_git_pull"
  }, {
    "name" : "ek9_git_stash",
    "category" : "execution",
    "description" : "Reports status (stashed, popped, applied, dropped or nothing-to-stash) and the stash ref; mode:'list' returns stashCount and stashes; a conflicting pop keeps the entry (stashPreserved:true).",
    "schemaRef" : "toolingForAi-openai.json#ek9_git_stash"
  }, {
    "name" : "ek9_package",
    "category" : "execution",
    "description" : "Answers with bundlePath and checksumPath after assembling the publishable SOURCE bundle (.ek9 files + manifest + capabilities, not bytecode) of one package.",
    "schemaRef" : "toolingForAi-openai.json#ek9_package"
  }, {
    "name" : "ek9_install_package",
    "category" : "execution",
    "description" : "Answers with installedTo (under ~/.ek9/lib) and bundlePath after packaging one package and installing its SOURCE bundle into the LOCAL library cache - not a remote registry push.",
    "schemaRef" : "toolingForAi-openai.json#ek9_install_package"
  }, {
    "name" : "ek9_deploy_package",
    "category" : "execution",
    "description" : "Answers with status and bundlePath after packaging one package's SOURCE bundle, generating missing signing keys, and signing it locally; there is no remote repository to push to yet, so nothing leaves this machine.",
    "schemaRef" : "toolingForAi-openai.json#ek9_deploy_package"
  }, {
    "name" : "ek9_generate_signing_keys",
    "category" : "execution",
    "description" : "Answers with keysGenerated and publicKeyPath after ensuring the user-global signing keypair (~/.ek9/private.pem + public.pem) that ek9_deploy_package signs with exists; an existing pair is never overwritten.",
    "schemaRef" : "toolingForAi-openai.json#ek9_generate_signing_keys"
  }, {
    "name" : "ek9_set_version",
    "category" : "execution",
    "description" : "Answers with the new version and previousVersion after setting the 'defines package' version literal to an explicit MAJOR.MINOR.PATCH (build restarts at 0), plus written and line.",
    "schemaRef" : "toolingForAi-openai.json#ek9_set_version"
  }, {
    "name" : "ek9_set_feature_version",
    "category" : "execution",
    "description" : "Answers with the new version and previousVersion after setting the 'defines package' version literal to MAJOR.MINOR.PATCH-feature (build restarts at 0), plus written and line.",
    "schemaRef" : "toolingForAi-openai.json#ek9_set_feature_version"
  }, {
    "name" : "ek9_increment_version",
    "category" : "execution",
    "description" : "Answers with the new version and previousVersion after bumping one component of the 'defines package' version literal, plus written and line.",
    "schemaRef" : "toolingForAi-openai.json#ek9_increment_version"
  }, {
    "name" : "ek9_resolve_dependencies",
    "category" : "execution",
    "description" : "Answers with status after resolving one package's declared dependency tree (ek9 -Dp), which cleans all build artefacts and the project's dependency copy (.ek9/deps/) first, then rewrites ek9.lock.",
    "schemaRef" : "toolingForAi-openai.json#ek9_resolve_dependencies"
  }, {
    "name" : "ek9_run_program",
    "category" : "execution",
    "description" : "Answers with programStdout, programStderr and programExitCode after compiling one .ek9 file and running the program it declares, with string args auto-parsed into the program's typed parameters; exitedBy says whether an exit code is the program's own or the EK9 CLI's.",
    "schemaRef" : "toolingForAi-openai.json#ek9_run_program"
  }, {
    "name" : "ek9_debug_session",
    "category" : "execution",
    "description" : "Runs a program under the debugger - several inputs at once with a change journal (sweep), one run to its end, or step by step - and reports, waits on or ends THE debug session (one per server); answers status, runState, sequence, the stops, breakpoints and nextStep.",
    "schemaRef" : "toolingForAi-openai.json#ek9_debug_session"
  }, {
    "name" : "ek9_debug_control",
    "category" : "execution",
    "description" : "Continues, pauses, steps or sets breakpoints in the current debug session; answers its new runState, sequence and stops.",
    "schemaRef" : "toolingForAi-openai.json#ek9_debug_control"
  }, {
    "name" : "ek9_debug_inspect",
    "category" : "execution",
    "description" : "Reads what runs recorded - a failure's account, where a value first went wrong, failing and passing runs compared, a report to share - and the current debug session by field (the recorded stop, a frame's locals, path values, the threads), never running the debuggee.",
    "schemaRef" : "toolingForAi-openai.json#ek9_debug_inspect"
  }, {
    "name" : "ek9_debug_observe",
    "category" : "execution",
    "description" : "Runs the current debug session until a condition holds or the budget bites, reading the watched paths at every hit of the given lines; answers stoppedBecause, exact hits and the rows.",
    "schemaRef" : "toolingForAi-openai.json#ek9_debug_observe"
  } ],
  "workflowCount" : 4
}