Liking cljdoc? Tell your friends :D

hyperphor.alzabo.generate.schema-gen

Domain description -> generated Alzabo schema. Ported from the hyperphor.alzabo.schema-gen-llm prototype (hyperphor/alzabo repo) -- the two-phase kinds-then-fields shape is the point of that design, kept as-is here. Differs from the prototype in two ways: calls hyperphor.ellum.core's current query/complete API (the prototype predates it and parsed raw OpenAI-shaped responses), and loads its example schema off the classpath instead of a repo-relative path that only resolved inside alzabo itself.

Domain description -> generated Alzabo schema. Ported from the
hyperphor.alzabo.schema-gen-llm prototype (hyperphor/alzabo repo) -- the
two-phase kinds-then-fields shape is the point of that design, kept as-is
here. Differs from the prototype in two ways: calls hyperphor.ellum.core's
current query/complete API (the prototype predates it and parsed raw
OpenAI-shaped responses), and loads its example schema off the classpath
instead of a repo-relative path that only resolved inside alzabo itself.
raw docstring

add-categoriesclj

(add-categories domain
                schema
                &
                {:keys [n provider model]
                 :or {n "2-5" provider default-provider}})

Propose 2-5 (or :n) categories for schema's kinds via LLM and merge them in, with colors.

Propose 2-5 (or `:n`) categories for schema's kinds via LLM and merge them in, with colors.
sourceraw docstring

add-docclj

(add-doc domain
         schema
         &
         {:keys [provider model] :or {provider default-provider}})

Given an existing schema and a domain description, ask the LLM to add documentation to each kind/attribute/enum value that doesn't already have one. Returns raw LLM text (see note above) for manual review, not a schema.

Given an existing schema and a domain description, ask the LLM to add
documentation to each kind/attribute/enum value that doesn't already have
one. Returns raw LLM text (see note above) for manual review, not a schema.
sourceraw docstring

add-iconsclj

(add-icons domain
           schema
           &
           {:keys [provider model] :or {provider default-provider}})

Given an existing schema and a domain description, propose and merge :icon values (single emoji) for kinds that lack one, conservatively -- not every kind gets one. Standalone step, like add-doc; not part of sgen's pipeline.

Given an existing schema and a domain description, propose and merge :icon
values (single emoji) for kinds that lack one, conservatively -- not every
kind gets one. Standalone step, like add-doc; not part of sgen's pipeline.
sourceraw docstring

category-paletteclj

source

default-providerclj

source

delete-keysclj

(delete-keys map f)
source

delete-keys-matchingclj

(delete-keys-matching map regex)
source

extract-clojureclj

(extract-clojure s)
source

extract-clojure-codeclj

(extract-clojure-code s)
source

improve-docclj

(improve-doc domain
             schema
             &
             {:keys [provider model] :or {provider default-provider}})

Given an existing schema and a domain description, ask the LLM to rewrite each kind/attribute/enum value's documentation to be more human-readable. Returns raw LLM text (see add-doc's note) for manual review, not a schema.

Given an existing schema and a domain description, ask the LLM to rewrite
each kind/attribute/enum value's documentation to be more human-readable.
Returns raw LLM text (see add-doc's note) for manual review, not a schema.
sourceraw docstring

merge-categoriesclj

(merge-categories schema {:keys [categories assignments]})

Merge proposed {:categories :assignments} into schema, coloring categories from category-palette. Kinds that already have a :category are left alone. Pure, no LLM call.

Merge proposed {:categories :assignments} into schema, coloring categories from
category-palette. Kinds that already have a :category are left alone. Pure, no LLM call.
sourceraw docstring

merge-iconsclj

(merge-icons schema icons)

Merge a {kind icon} map into schema's :kinds, skipping kinds that don't exist, already have an :icon, or whose proposed icon isn't a short string. Pure, no LLM call -- the reliable half of add-icons, kept separately testable.

Merge a {kind icon} map into schema's :kinds, skipping kinds that don't exist,
already have an :icon, or whose proposed icon isn't a short string. Pure, no
LLM call -- the reliable half of add-icons, kept separately testable.
sourceraw docstring

sgenclj

(sgen domain
      &
      {:keys [extra provider model icons? categories?]
       :or {extra "" provider default-provider icons? true categories? true}})

Generate an Alzabo schema (a Clojure map, not written to disk) for domain, a short domain-description string. :extra is optional additional instruction text appended to both LLM calls; :provider defaults to :anthropic; :model defaults to the provider's default. :icons? and :categories? (both default true) run add-icons / add-categories. Known gap: doesn't generate subtype/extends relations.

Generate an Alzabo schema (a Clojure map, not written to disk) for
`domain`, a short domain-description string. `:extra` is optional
additional instruction text appended to both LLM calls; `:provider`
defaults to :anthropic; `:model` defaults to the provider's default.
`:icons?` and `:categories?` (both default true) run add-icons / add-categories.
Known gap: doesn't generate subtype/extends relations.
sourceraw docstring

system-promptclj

source

trim-fieldsclj

(trim-fields schema)
source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close