Liking cljdoc? Tell your friends :D

com.blockether.vis.ext.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-by-nameclj

(agent-by-name nm)
source

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

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-skillsclj

(discover-skills)

Parse every SKILL.md across skill-dirs, first-name-wins, with each skill's bundled resource paths attached.

Parse every SKILL.md across `skill-dirs`, first-name-wins, with each
skill's bundled resource paths attached.
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). 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).
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

reload!clj

(reload!)

Rescan the source dirs and refresh the cache. Returns {:agents :skills}.

Rescan the source dirs and refresh the cache. Returns `{:agents :skills}`.
sourceraw docstring

skill-by-nameclj

(skill-by-name nm)
source

skill-dirsclj

(skill-dirs)

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

Ordered `[tool ^File dir]` pairs for skills (existing dirs only).
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