<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>How-to guides on ajq — semantic jq</title><link>https://ricardocabral.github.io/ajq/docs/how-to/</link><description>Recent content in How-to guides on ajq — semantic jq</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://ricardocabral.github.io/ajq/docs/how-to/index.xml" rel="self" type="application/rss+xml"/><item><title>Install ajq</title><link>https://ricardocabral.github.io/ajq/docs/how-to/install/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ricardocabral.github.io/ajq/docs/how-to/install/</guid><description>&lt;p&gt;ajq is a single Go binary. Pure jq queries work immediately after the binary is on your
&lt;code&gt;PATH&lt;/code&gt;. Semantic queries need an explicitly selected backend such as &lt;code&gt;mock&lt;/code&gt;, &lt;code&gt;local&lt;/code&gt;,
&lt;code&gt;ollama&lt;/code&gt;, &lt;code&gt;openai&lt;/code&gt;, &lt;code&gt;openrouter&lt;/code&gt;, or &lt;code&gt;--cloud&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="install-with-the-script"&gt;Install with the script&lt;/h2&gt;
&lt;p&gt;The install script downloads the matching release archive for your OS/architecture,
verifies it against &lt;code&gt;checksums.txt&lt;/code&gt;, and installs without sudo into &lt;code&gt;~/.local/bin&lt;/code&gt; (or
&lt;code&gt;$AJQ_INSTALL_DIR&lt;/code&gt;).&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;curl -fsSL https://raw.githubusercontent.com/ricardocabral/ajq/main/scripts/install.sh &lt;span class="p"&gt;|&lt;/span&gt; sh
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Pin a version or install directory if needed:&lt;/p&gt;</description></item><item><title>Make ajq available to a coding agent</title><link>https://ricardocabral.github.io/ajq/docs/how-to/make-ajq-available-to-coding-agents/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ricardocabral.github.io/ajq/docs/how-to/make-ajq-available-to-coding-agents/</guid><description>&lt;p&gt;Use this guide when a team wants its coding agents to consider ajq before writing a
bespoke JSON-processing script. It assumes ajq is installed for the environment where the
agent runs and that the team already has a project-instruction mechanism its agents read.&lt;/p&gt;
&lt;h2 id="1-install-ajq-where-the-agent-can-execute-it"&gt;1. Install ajq where the agent can execute it&lt;/h2&gt;
&lt;p&gt;Install ajq in the same execution environment as the coding agent, then verify that the
binary is visible on that environment&amp;rsquo;s &lt;code&gt;PATH&lt;/code&gt;:&lt;/p&gt;</description></item><item><title>Process an NDJSON stream</title><link>https://ricardocabral.github.io/ajq/docs/how-to/process-ndjson/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ricardocabral.github.io/ajq/docs/how-to/process-ndjson/</guid><description>&lt;p&gt;ajq auto-detects input framing. The common shapes:&lt;/p&gt;
&lt;h2 id="single-json-value"&gt;Single JSON value&lt;/h2&gt;
&lt;p&gt;A single top-level JSON value is processed as one input frame:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;{&amp;#34;a&amp;#34;:1}\n&amp;#39;&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; ajq -c &lt;span class="s1"&gt;&amp;#39;.a + 1&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# 2&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="ndjson--json-lines"&gt;NDJSON / JSON Lines&lt;/h2&gt;
&lt;p&gt;A stream of top-level JSON values (one per line, or concatenated) is processed &lt;strong&gt;one frame
at a time&lt;/strong&gt; — each value flows through the query independently, and results are emitted as
they&amp;rsquo;re produced:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;{&amp;#34;a&amp;#34;:1}\n{&amp;#34;a&amp;#34;:2}\n&amp;#39;&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; ajq -c &lt;span class="s1"&gt;&amp;#39;.a, (.a + 10)&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# 1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# 11&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# 2&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# 12&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;There&amp;rsquo;s no whole-stream buffering in this mode, so it handles inputs larger than memory.&lt;/p&gt;</description></item><item><title>Filter JSON by meaning</title><link>https://ricardocabral.github.io/ajq/docs/how-to/filter-json-by-meaning/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ricardocabral.github.io/ajq/docs/how-to/filter-json-by-meaning/</guid><description>&lt;p&gt;Use this when exact string matching is too brittle: support tickets that say the same
thing in different words, log messages that imply the same failure, or records where the
field name is known but the wording is messy.&lt;/p&gt;
&lt;p&gt;ajq keeps the surrounding jq pipeline deterministic. Only the explicit semantic predicate
(&lt;code&gt;=~&lt;/code&gt;, &lt;code&gt;!~&lt;/code&gt;, or &lt;code&gt;sem_match&lt;/code&gt;) asks a backend for a judgement.&lt;/p&gt;
&lt;h2 id="try-the-query-with-no-network"&gt;Try the query with no network&lt;/h2&gt;
&lt;p&gt;The mock backend is deterministic and in-process, so it needs no model, network, or API
key. It is useful for checking the jq shape before paying for model calls:&lt;/p&gt;</description></item><item><title>Use ajq with other data formats</title><link>https://ricardocabral.github.io/ajq/docs/how-to/use-other-data-formats/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ricardocabral.github.io/ajq/docs/how-to/use-other-data-formats/</guid><description>&lt;p&gt;ajq&amp;rsquo;s core input modes stay small on purpose: JSON, NDJSON, raw strings, and
null input. When the source data is another format, put a format adapter before
ajq and let ajq work on the JSON it emits.&lt;/p&gt;
&lt;p&gt;This keeps pure jq-compatible ajq pipelines deterministic while still letting
you use the existing jq ecosystem around it. Tools such as &lt;code&gt;jc&lt;/code&gt;, &lt;code&gt;yq&lt;/code&gt;/&lt;code&gt;xq&lt;/code&gt;, and
&lt;code&gt;fq&lt;/code&gt; are commonly used alongside jq for this kind of conversion.&lt;/p&gt;</description></item><item><title>Write a semantic filter</title><link>https://ricardocabral.github.io/ajq/docs/how-to/semantic-filter/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ricardocabral.github.io/ajq/docs/how-to/semantic-filter/</guid><description>&lt;p&gt;Use a semantic filter when literal matching with &lt;code&gt;test()&lt;/code&gt; or &lt;code&gt;==&lt;/code&gt; is too brittle. The
examples below use &lt;code&gt;--backend mock&lt;/code&gt; so you can verify the command shape without a model or
API key; switch to &lt;code&gt;--backend local&lt;/code&gt;, &lt;code&gt;--cloud&lt;/code&gt;, or another backend for real judgement.&lt;/p&gt;
&lt;h2 id="fuzzy-match-with-"&gt;Fuzzy match with &lt;code&gt;=~&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;=~&lt;/code&gt; operator asks the backend whether a value matches a description. Use it inside
&lt;code&gt;select&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;[{&amp;#34;id&amp;#34;:1,&amp;#34;feedback&amp;#34;:&amp;#34;urgent&amp;#34;},{&amp;#34;id&amp;#34;:2,&amp;#34;feedback&amp;#34;:&amp;#34;other&amp;#34;}]&amp;#39;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;|&lt;/span&gt; ajq --backend mock -c &lt;span class="s1"&gt;&amp;#39;.[] | select(.feedback =~ &amp;#34;urgent&amp;#34;) | .id&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Output with the mock backend:&lt;/p&gt;</description></item><item><title>Classify JSON and NDJSON streams</title><link>https://ricardocabral.github.io/ajq/docs/how-to/classify-json-streams/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ricardocabral.github.io/ajq/docs/how-to/classify-json-streams/</guid><description>&lt;p&gt;Use &lt;code&gt;sem_classify&lt;/code&gt; when each record needs one label from a small list: support route,
incident type, moderation bucket, or review theme. The output is bounded to the labels you
write in the query, which makes it safer for downstream jq and shell pipelines than free
text generation.&lt;/p&gt;
&lt;h2 id="classify-a-json-array-with-no-network"&gt;Classify a JSON array with no network&lt;/h2&gt;
&lt;p&gt;Start with &lt;code&gt;--backend mock&lt;/code&gt; to validate the jq expression without a model, provider, or
API key:&lt;/p&gt;</description></item><item><title>Estimate model calls before running</title><link>https://ricardocabral.github.io/ajq/docs/how-to/estimate-model-calls/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ricardocabral.github.io/ajq/docs/how-to/estimate-model-calls/</guid><description>&lt;p&gt;Semantic queries cost one backend judgement per &lt;em&gt;distinct&lt;/em&gt; value they judge. Use
&lt;code&gt;--explain&lt;/code&gt; with representative input to estimate that number before you run a paid or
slow backend.&lt;/p&gt;
&lt;h2 id="run---explain-with-real-input"&gt;Run &lt;code&gt;--explain&lt;/code&gt; with real input&lt;/h2&gt;
&lt;p&gt;Pipe a sample of your data into &lt;code&gt;--explain&lt;/code&gt;. ajq runs a deterministic mock harvest over
the input to estimate work — it never contacts a provider or local model:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;[{&amp;#34;msg&amp;#34;:&amp;#34;urgent&amp;#34;},{&amp;#34;msg&amp;#34;:&amp;#34;urgent&amp;#34;},{&amp;#34;msg&amp;#34;:&amp;#34;other&amp;#34;}]&amp;#39;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;|&lt;/span&gt; ajq --explain &lt;span class="s1"&gt;&amp;#39;.[] | select(.msg =~ &amp;#34;urgent&amp;#34;) | .msg&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="read-the-estimate-block"&gt;Read the estimate block&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;estimates:
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; estimate_status: available
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; static_call_sites: 1
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; input_frames: 1
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; harvested_judgements: 3
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; post_dedup_judgements: 2
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; mock_judge_batches: 1
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The fields you&amp;rsquo;ll budget against:&lt;/p&gt;</description></item><item><title>Use ajq safely from coding agents</title><link>https://ricardocabral.github.io/ajq/docs/how-to/agent-safe-semantic-workflow/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ricardocabral.github.io/ajq/docs/how-to/agent-safe-semantic-workflow/</guid><description>&lt;p&gt;Coding agents often discover ajq while trying to answer a concrete data-cleaning
question: &amp;ldquo;find the records that mean X&amp;rdquo; or &amp;ldquo;route these JSON lines into labels&amp;rdquo;. Use
this workflow when an agent, script, or CI job needs semantic matching while keeping the
jq parts deterministic and reviewable.&lt;/p&gt;
&lt;h2 id="1-keep-ordinary-jq-deterministic"&gt;1. Keep ordinary jq deterministic&lt;/h2&gt;
&lt;p&gt;First write the structural jq pipeline without semantic calls. This step should not need a
backend:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;[{&amp;#34;id&amp;#34;:1,&amp;#34;msg&amp;#34;:&amp;#34;refund requested&amp;#34;},{&amp;#34;id&amp;#34;:2,&amp;#34;msg&amp;#34;:&amp;#34;profile updated&amp;#34;}]&amp;#39;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;|&lt;/span&gt; ajq -c &lt;span class="s1"&gt;&amp;#39;.[] | {id, msg}&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Only add semantic operators once the field selection and output shape are correct.&lt;/p&gt;</description></item><item><title>Use cloud backends</title><link>https://ricardocabral.github.io/ajq/docs/how-to/use-cloud-backends/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ricardocabral.github.io/ajq/docs/how-to/use-cloud-backends/</guid><description>&lt;p&gt;Use a cloud backend when you want hosted inference instead of the local
&lt;code&gt;llama-server&lt;/code&gt; backend. Each provider needs an API key in the environment; ajq does not
read API keys from &lt;code&gt;config.toml&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="use-anthropic-claude"&gt;Use Anthropic Claude&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Export an Anthropic API key:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;ANTHROPIC_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;sk-ant-...&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run a semantic query with &lt;code&gt;--cloud&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;{&amp;#34;msg&amp;#34;:&amp;#34;urgent billing issue&amp;#34;}&amp;#39;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;|&lt;/span&gt; ajq --cloud --model haiku &lt;span class="s1"&gt;&amp;#39;.msg =~ &amp;#34;urgent&amp;#34;&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;--cloud&lt;/code&gt; is the same as &lt;code&gt;--backend anthropic&lt;/code&gt;. If you omit &lt;code&gt;--model&lt;/code&gt;, ajq uses
&lt;code&gt;claude-haiku-4-5&lt;/code&gt;. The shipped aliases are &lt;code&gt;haiku&lt;/code&gt;, &lt;code&gt;sonnet&lt;/code&gt;, and &lt;code&gt;opus&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Control semantic costs</title><link>https://ricardocabral.github.io/ajq/docs/how-to/control-costs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ricardocabral.github.io/ajq/docs/how-to/control-costs/</guid><description>&lt;p&gt;Use this workflow before running semantic queries on a paid backend.&lt;/p&gt;
&lt;h2 id="1-estimate-calls-with---explain"&gt;1. Estimate calls with &lt;code&gt;--explain&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;Run the query with representative input and &lt;code&gt;--explain&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;[{&amp;#34;msg&amp;#34;:&amp;#34;urgent&amp;#34;},{&amp;#34;msg&amp;#34;:&amp;#34;other&amp;#34;}]&amp;#39;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;|&lt;/span&gt; ajq --explain &lt;span class="s1"&gt;&amp;#39;.[] | select(.msg =~ &amp;#34;urgent&amp;#34;) | .msg&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Read &lt;code&gt;post_dedup_judgements&lt;/code&gt; in the estimate block:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;estimates:
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; estimate_status: available
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; static_call_sites: 1
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; input_frames: 1
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; harvested_judgements: 2
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; post_dedup_judgements: 2
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That number is the count to budget against. Repeated values are deduplicated before the
backend is called.&lt;/p&gt;</description></item><item><title>Install the ajq coding-agent skill</title><link>https://ricardocabral.github.io/ajq/docs/how-to/install-agent-plugin/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ricardocabral.github.io/ajq/docs/how-to/install-agent-plugin/</guid><description>&lt;p&gt;Install the ajq skill when an agent should route semantic JSON or NDJSON
filtering and bounded classification work to ajq. Install &lt;code&gt;ajq&lt;/code&gt; itself first so
the skill can run its safe discovery and mock checks.&lt;/p&gt;
&lt;h2 id="install-for-codex"&gt;Install for Codex&lt;/h2&gt;
&lt;p&gt;Add the public ajq marketplace and install its plugin:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;codex plugin marketplace add ricardocabral/ajq
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;codex plugin add ajq@ajq
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For a reproducible environment, pin the marketplace to an ajq release tag that
contains this plugin. Replace &lt;code&gt;vX.Y.Z&lt;/code&gt; with that release tag:&lt;/p&gt;</description></item><item><title>Manage the judgement cache</title><link>https://ricardocabral.github.io/ajq/docs/how-to/manage-the-cache/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ricardocabral.github.io/ajq/docs/how-to/manage-the-cache/</guid><description>&lt;p&gt;ajq stores successful semantic judgements on disk so repeated runs over the same
op/spec/model/value identity can skip backend calls.&lt;/p&gt;
&lt;h2 id="see-where-the-cache-lives"&gt;See where the cache lives&lt;/h2&gt;
&lt;p&gt;Run:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ajq cache status
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Example output:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;location: /Users/you/Library/Caches/ajq/judgements
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;entries: 0
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bytes: 0
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Set &lt;code&gt;AJQ_CACHE_DIR&lt;/code&gt; when you want an isolated cache for a project or test:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;AJQ_CACHE_DIR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$PWD&lt;/span&gt;&lt;span class="s2"&gt;/.ajq-cache&amp;#34;&lt;/span&gt; ajq cache status
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="inspect-cache-state-from-an-agent"&gt;Inspect cache state from an agent&lt;/h3&gt;
&lt;p&gt;Use the versioned JSON probe instead of parsing the human table-like output:&lt;/p&gt;</description></item><item><title>Configure defaults</title><link>https://ricardocabral.github.io/ajq/docs/how-to/configure-defaults/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ricardocabral.github.io/ajq/docs/how-to/configure-defaults/</guid><description>&lt;p&gt;Use a config file when you do not want to repeat the same semantic-backend flags on every
command.&lt;/p&gt;
&lt;h2 id="1-create-the-config-file"&gt;1. Create the config file&lt;/h2&gt;
&lt;p&gt;ajq reads this path by default:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;${XDG_CONFIG_HOME:-~/.config}/ajq/config.toml
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Create the directory and file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;mkdir -p &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;XDG_CONFIG_HOME&lt;/span&gt;&lt;span class="k"&gt;:-&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;&lt;span class="p"&gt;/.config&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/ajq&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;cat &amp;gt; &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;XDG_CONFIG_HOME&lt;/span&gt;&lt;span class="k"&gt;:-&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;&lt;span class="p"&gt;/.config&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/ajq/config.toml&amp;#34;&lt;/span&gt; &lt;span class="s"&gt;&amp;lt;&amp;lt;&amp;#39;EOF&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;backend = &amp;#34;mock&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;max_calls = 25
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;no_cache = false
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;EOF&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For a one-off location, set &lt;code&gt;AJQ_CONFIG&lt;/code&gt; to an explicit file path.&lt;/p&gt;
&lt;h2 id="2-add-semantic-defaults"&gt;2. Add semantic defaults&lt;/h2&gt;
&lt;p&gt;Recognized keys are:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-toml" data-lang="toml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;backend&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;local&amp;#34;&lt;/span&gt; &lt;span class="c"&gt;# mock, local, ollama, openai, openrouter, anthropic&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;model&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;qwen2.5-1.5b&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;base_url&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;http://127.0.0.1:8081&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;max_calls&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt; &lt;span class="c"&gt;# 0 = unlimited&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;no_cache&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For example, to default to the deterministic mock backend with a small call cap:&lt;/p&gt;</description></item><item><title>Use a larger local model</title><link>https://ricardocabral.github.io/ajq/docs/how-to/use-a-larger-model/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ricardocabral.github.io/ajq/docs/how-to/use-a-larger-model/</guid><description>&lt;p&gt;The local backend defaults to &lt;code&gt;qwen2.5-1.5b&lt;/code&gt;. Use &lt;code&gt;ajq models&lt;/code&gt; when you want one of the
larger shipped catalog models.&lt;/p&gt;
&lt;h2 id="1-list-catalog-models"&gt;1. List catalog models&lt;/h2&gt;
&lt;p&gt;Run:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ajq models list
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Example output before any downloads:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;NAME ACTIVE INSTALLED SIZE RAM
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;qwen2.5-1.5b * no 1.2GiB ~4 GiB RAM
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;qwen2.5-3b no 2.0GiB ~6 GiB RAM
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;qwen3-4b no 2.3GiB ~8 GiB RAM
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;ACTIVE&lt;/code&gt; shows the model selected by config/env/defaults. &lt;code&gt;INSTALLED&lt;/code&gt; shows whether the
GGUF file exists in the ajq cache.&lt;/p&gt;</description></item></channel></rss>