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.
Output budget for a generated config. A parent with its children runs to a few thousand tokens; the providers' own defaults cut that off (BOU-567).
Output budget for a generated config. A parent with its children runs to a few thousand tokens; the providers' own defaults cut that off (BOU-567).
(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 admin entity EDN configurations from a NL description.
Args: service - AIService map description - NL entity description string project-root - project root path string (existing entities, migrations) opts - optional completion opts
Returns: {:text str :entity-name str :entities [{:entity-name :text :type-source :corrections}] :provider :model}, where :text is all of the EDN and each entity's :text is its own file, or {:error str} on failure.
Generate admin entity EDN configurations from a NL description.
Args:
service - AIService map
description - NL entity description string
project-root - project root path string (existing entities, migrations)
opts - optional completion opts
Returns:
{:text str :entity-name str :entities [{:entity-name :text :type-source
:corrections}] :provider :model}, where :text is all of the EDN and each
entity's :text is its own file, 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.
The model is shown the real API of every namespace the source requires.
With (:check opts), a fn of the generated text returning errors or nil,
a failing answer is sent back once with its errors (BOU-572).
Returns: {:text str :tokens int :provider kw :model str :test-tags #{kw} :test-path str :check-errors [str]} where :test-path is where the file belongs (nil when the source path follows no recognised layout) and :check-errors is present when the last answer still failed :check, or {:error str} on failure.
Generate a test namespace for a source file.
The model is shown the real API of every namespace the source requires.
With `(:check opts)`, a fn of the generated text returning errors or nil,
a failing answer is sent back once with its errors (BOU-572).
Returns:
{:text str :tokens int :provider kw :model str :test-tags #{kw}
:test-path str :check-errors [str]}
where :test-path is where the file belongs (nil when the source path
follows no recognised layout) and :check-errors is present when the last
answer still failed :check, 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 |