AI service orchestration.
Public API entry points for all AI features. Combines context extraction (shell I/O) with pure core functions and delegates to the configured IAIProvider.
FC/IS: this namespace is in the shell layer — file reads happen here.
AI service orchestration. Public API entry points for all AI features. Combines context extraction (shell I/O) with pure core functions and delegates to the configured IAIProvider. FC/IS: this namespace is in the shell layer — file reads happen here.
(explain-error service stacktrace project-root)(explain-error service stacktrace project-root opts)Explain a Clojure/Wagoe stack trace and suggest a fix.
Args: service - AIService map stacktrace - stack trace string project-root - project root path string (for source file lookup) opts - optional completion opts
Returns: {:text str :tokens int :provider kw :model str} or {:error str} on failure.
Explain a Clojure/Wagoe stack trace and suggest a fix.
Args:
service - AIService map
stacktrace - stack trace string
project-root - project root path string (for source file lookup)
opts - optional completion opts
Returns:
{:text str :tokens int :provider kw :model str}
or {:error str} on failure.(generate-admin-entity service description project-root)(generate-admin-entity service description project-root opts)Generate an admin entity EDN configuration from a NL description.
Args: service - AIService map description - NL entity description string project-root - project root path string (for discovering existing entities) opts - optional completion opts
Returns: {:text str :entity-name str} where :text is the generated EDN string, or {:error str} on failure.
Generate an admin entity EDN configuration from a NL description.
Args:
service - AIService map
description - NL entity description string
project-root - project root path string (for discovering existing entities)
opts - optional completion opts
Returns:
{:text str :entity-name str}
where :text is the generated EDN string,
or {:error str} on failure.(generate-docs service module-path doc-type)(generate-docs service module-path doc-type opts)Generate documentation for a Wagoe module.
Args: service - AIService map module-path - path string to the module root (e.g. "libs/user") doc-type - :agents, :openapi, or :readme opts - optional completion opts
Returns: {:text str :tokens int :provider kw :model str} where :text is the generated documentation markdown/YAML, or {:error str} on failure.
Generate documentation for a Wagoe module.
Args:
service - AIService map
module-path - path string to the module root (e.g. "libs/user")
doc-type - :agents, :openapi, or :readme
opts - optional completion opts
Returns:
{:text str :tokens int :provider kw :model str}
where :text is the generated documentation markdown/YAML,
or {:error str} on failure.(generate-tests service source-path)(generate-tests service source-path opts)Generate a test namespace for a source file.
Args: service - AIService map source-path - path string to the source file opts - optional completion opts
Returns: {:text str :tokens int :provider kw :model str :test-type kw :test-path str} where :text is the generated test namespace source, :test-type the Kaocha metadata applied, and :test-path where the file belongs (nil when the source path follows no recognised layout), or {:error str} on failure.
Generate a test namespace for a source file.
Args:
service - AIService map
source-path - path string to the source file
opts - optional completion opts
Returns:
{:text str :tokens int :provider kw :model str
:test-type kw :test-path str}
where :text is the generated test namespace source, :test-type the Kaocha
metadata applied, and :test-path where the file belongs (nil when the
source path follows no recognised layout),
or {:error str} on failure.(parse-setup-description service description)(parse-setup-description service description opts)Parse a NL setup description into a structured setup spec.
Args: service - AIService map description - NL setup description string opts - optional completion opts
Returns: {:data map} with the parsed setup spec as JSON-like data, or {:error str} on failure.
Parse a NL setup description into a structured setup spec.
Args:
service - AIService map
description - NL setup description string
opts - optional completion opts
Returns:
{:data map} with the parsed setup spec as JSON-like data,
or {:error str} on failure.(refactor-fcis service ns-name source-code violations)(refactor-fcis service ns-name source-code violations opts)AI-guided FC/IS violation refactoring.
AI-guided FC/IS violation refactoring.
(review-code service ns-name source-code)(review-code service ns-name source-code opts)AI code review of a namespace.
AI code review of a namespace.
(scaffold-from-description service description project-root)(scaffold-from-description service description project-root opts)Parse a natural language module description into a scaffolder spec.
Args: service - AIService map {:provider IAIProvider :fallback IAIProvider?} description - NL description string project-root - project root path string (for module discovery) opts - optional map (e.g. {:model "..."}
Returns: {:module-name str :entity str :fields [...] :http bool :web bool} or {:error str} on failure.
Parse a natural language module description into a scaffolder spec.
Args:
service - AIService map {:provider IAIProvider :fallback IAIProvider?}
description - NL description string
project-root - project root path string (for module discovery)
opts - optional map (e.g. {:model "..."}
Returns:
{:module-name str :entity str :fields [...] :http bool :web bool}
or {:error str} on failure.(sql-from-description service description project-root)(sql-from-description service description project-root opts)Generate a HoneySQL query from a natural language description.
Args: service - AIService map description - NL description string project-root - project root path string (for schema discovery) opts - optional completion opts
Returns: {:honeysql str :explanation str :raw-sql str} or {:error str} on failure.
Generate a HoneySQL query from a natural language description.
Args:
service - AIService map
description - NL description string
project-root - project root path string (for schema discovery)
opts - optional completion opts
Returns:
{:honeysql str :explanation str :raw-sql str}
or {:error str} on failure.(suggest-tests service ns-name source-code existing-tests)(suggest-tests service ns-name source-code existing-tests opts)Suggest missing test cases for a namespace.
Suggest missing test cases for a namespace.
Output budget for a generated test namespace.
The providers default to 4096 or to whatever the model does; a test namespace for a 250-line source ran past that and came back cut off mid-form. Generous rather than tuned — the cost of a too-small budget is an unusable answer, and the cost of a too-large one is nothing, since models stop when they are done.
Output budget for a generated test namespace. The providers default to 4096 or to whatever the model does; a test namespace for a 250-line source ran past that and came back cut off mid-form. Generous rather than tuned — the cost of a too-small budget is an unusable answer, and the cost of a too-large one is nothing, since models stop when they are done.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |