Liking cljdoc? Tell your friends :D

com.blockether.vis.internal.foundation.harness.discovery

Cross-HARNESS discovery of agents + skills — the sibling of the shell layer's POSIX compat, for the agent/skill definitions vis' OWN project dir and OTHER AI coding harnesses (Claude Code, pi, opencode, the agents standard, …) leave on disk.

An AGENT is a markdown file with YAML-ish --- frontmatter (name, description, model, tools) + a body that IS a system prompt. A SKILL is a SKILL.md (same frontmatter, name+description) in its own directory, alongside bundled resource files.

Discovery is PURE except for the directory scan: parse-frontmatter, parse-agent, parse-skill-meta, and dedup-by-name take strings and are unit-tested without the filesystem; the discover-* fns walk the known source roots. Precedence is source ORDER, first-name-wins (vis project-local > other harnesses' project > user > plugin; Vis and Claude before pi/agents/opencode).

Cross-HARNESS discovery of agents + skills — the sibling of the shell
layer's POSIX compat, for the agent/skill definitions vis' OWN project dir
and OTHER AI coding harnesses (Claude Code, pi, opencode, the agents
standard, …) leave on disk.

An AGENT is a markdown file with YAML-ish `---` frontmatter
(`name`, `description`, `model`, `tools`) + a body that IS a system
prompt. A SKILL is a `SKILL.md` (same frontmatter, name+description) in
its own directory, alongside bundled resource files.

Discovery is PURE except for the directory scan: `parse-frontmatter`,
`parse-agent`, `parse-skill-meta`, and `dedup-by-name` take strings and
are unit-tested without the filesystem; the `discover-*` fns walk the
known source roots. Precedence is source ORDER, first-name-wins
(vis project-local > other harnesses' project > user > plugin; Vis and
Claude before pi/agents/opencode).
raw docstring

agent-dirsclj

(agent-dirs)

Ordered [tool ^File dir] pairs for agents (existing dirs only).

Ordered `[tool ^File dir]` pairs for agents (existing dirs only).
sourceraw docstring

agent-sourcesclj

source

agentsclj

(agents)
source

command-dirsclj

(command-dirs)

Ordered [tool ^File dir] pairs for commands (existing dirs only).

Ordered `[tool ^File dir]` pairs for commands (existing dirs only).
sourceraw docstring

command-sourcesclj

Cross-HARNESS COMMAND (prompt-template) dirs — markdown prompts a user invokes as /<name> [args], $ARGUMENTS-substituted. Vis' OWN commands are the .vis/prompts FILE templates (prompt-templates ns, highest precedence); these rows add the OTHER harnesses' command dirs. Precedence = ORDER.

Cross-HARNESS COMMAND (prompt-template) dirs — markdown prompts a user
invokes as `/<name> [args]`, `$ARGUMENTS`-substituted. Vis' OWN commands are
the `.vis/prompts` FILE templates (prompt-templates ns, highest precedence);
these rows add the OTHER harnesses' command dirs. Precedence = ORDER.
sourceraw docstring

commandsclj

(commands)
source

dedup-by-nameclj

(dedup-by-name entries)

First occurrence of each :name wins (precedence = input order).

First occurrence of each `:name` wins (precedence = input order).
sourceraw docstring

discover-agentsclj

(discover-agents)

Parse every agent file across agent-dirs, first-name-wins, tagged by tool.

Parse every agent file across `agent-dirs`, first-name-wins, tagged by tool.
sourceraw docstring

discover-commandsclj

(discover-commands)

Parse every command markdown across command-dirs, first-name-wins, tagged by tool. Each entry's :body IS the prompt template ($ARGUMENTS-aware at expand time); :model/:tools frontmatter is carried through but currently unused.

Parse every command markdown across `command-dirs`, first-name-wins, tagged by
tool. Each entry's `:body` IS the prompt template (`$ARGUMENTS`-aware at expand
time); `:model`/`:tools` frontmatter is carried through but currently unused.
sourceraw docstring

discover-skillsclj

(discover-skills)

Parse every project, nested-project, user, and plugin SKILL.md in precedence order, then registered package skills. First name wins, including explicit local overrides of qualified package/skill names. Repository-local skills carry :project-root, which makes their slash-expanded turn execute from the project that owns the skill.

Parse every project, nested-project, user, and plugin SKILL.md in precedence
order, then registered package skills. First name wins, including explicit
local overrides of qualified package/skill names. Repository-local skills carry
`:project-root`, which
makes their slash-expanded turn execute from the project that owns the skill.
sourceraw docstring

generationclj

(generation)

How many times THIS workspace's agents, skills and commands have actually been re-read. A cheap freshness token — it costs the stat pass ensure! already pays and changes exactly when the discovered set would, which is what lets the doc corpus memoize entries built from skills.

How many times THIS workspace's agents, skills and commands have actually
been re-read. A cheap freshness token — it costs the stat pass `ensure!`
already pays and changes exactly when the discovered set would, which is
what lets the doc corpus memoize entries built from `skills`.
sourceraw docstring

known-toolsclj

Every harness tag a source row can carry — the closed set discovery emits.

Every harness tag a source row can carry — the closed set discovery emits.
sourceraw docstring

parse-agentclj

(parse-agent content {:keys [name-default tool path]})

Build an agent entry from raw markdown content. name-default (the filename stem) backs a missing frontmatter name. Returns nil when there is no usable name. tool/path are provenance, carried through verbatim.

Build an agent entry from raw markdown `content`. `name-default` (the
filename stem) backs a missing frontmatter `name`. Returns nil when there
is no usable name. `tool`/`path` are provenance, carried through verbatim.
sourceraw docstring

parse-frontmatterclj

(parse-frontmatter content)

Split a markdown doc into {:meta {kw str} :body str}. A leading ----fenced block is parsed as key: value lines; a line with no key: head CONTINUES the previous value (folded multi-line description). Values pass through fold-value. No frontmatter → {:meta {} :body <whole>}. Keys are lower-cased keywords.

Split a markdown doc into `{:meta {kw str} :body str}`. A leading
`---`-fenced block is parsed as `key: value` lines; a line with no
`key:` head CONTINUES the previous value (folded multi-line description).
Values pass through `fold-value`. No frontmatter → `{:meta {} :body
<whole>}`. Keys are lower-cased keywords.
sourceraw docstring

parse-skill-metaclj

(parse-skill-meta content {:keys [name-default tool dir path]})

Build a skill entry (sans :resources) from a SKILL.md content. name-default is the skill directory name. dir/tool/path are provenance. Returns nil when there is no usable name.

Build a skill entry (sans `:resources`) from a SKILL.md `content`.
`name-default` is the skill directory name. `dir`/`tool`/`path` are
provenance. Returns nil when there is no usable name.
sourceraw docstring

read-package-skillsclj

(read-package-skills snapshot metadata)

Read the explicitly declared skills from an admitted package snapshot. Names are package/skill; duplicate names fail the entire load. Resource files remain beside SKILL.md. No project-root: a procedure never changes the workspace.

Read the explicitly declared skills from an admitted package snapshot.
Names are package/skill; duplicate names fail the entire load. Resource files
remain beside SKILL.md. No project-root: a procedure never changes the workspace.
sourceraw docstring

reload!clj

(reload!)

Rescan every workspace-root cache on its next access, then return the active workspace's {:agents :skills :commands} discovery result.

Rescan every workspace-root cache on its next access, then return the active
workspace's `{:agents :skills :commands}` discovery result.
sourceraw docstring

skill-sourcesclj

source

skillsclj

(skills)
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