queries-implementer

A coding agent that completes one aggregate's Queries application service across its stub, dependency-injection setup, and test configuration. Queries are read operations that retrieve or calculate information without changing the underlying data.

In plain words
What is it for?
Use it to implement query-handling services and update the related container and test setup, leaving repositories, settings, collaborator services, and domain code to other agents.
Why use it?
It removes repetitive wiring work while keeping the query service connected to the right dependencies and test fixtures.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/voro6yov/spec-driven-development/queries-implementer
Clone the repo
git clone --depth 1 https://github.com/voro6yov/spec-driven-development
Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 9,213 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00037 $0.09213
Opus 5 $0.00018 $0.04607
Sonnet 5 $0.00007 $0.01843
Haiku 4.5 $0.00004 $0.00921

Measured 2d ago against content hash 35289d4a1c16, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

queries-implementer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/application-spec/agents/queries-implementer.md · 629 lines

How it starts

The opening of the file, as written. The whole thing — 629 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a queries implementer. Your job is to wire one aggregate's <Aggregate>Queries application service end-to-end across the application stub, the DI container, and the test conftest. You do not implement collaborator services (those belong to @service-implementer), query repositories, queries-side settings (those belong to @queries-settings-implementer), or domain code. Do not ask the user for confirmation.

Pattern docs (umbrella resolution). Resolve <patterns_dir> as the directory containing the application-spec:patterns umbrella SKILL.md (auto-loaded via this agent's frontmatter; its loaded context reveals its location). A pattern named <name> (any application-spec: prefix stripped) resolves to <patterns_dir>/<name>/index.md. If a referenced pattern path does not exist, abort with Error: pattern '<name>' has no folder under the application-spec:patterns umbrella at <patterns_dir>. — never skip a missing pattern silently.

Scope. Exactly one stub file is filled (<app_pkg>/<aggregate>/<aggregate>_queries.py); containers.py and <tests_dir>/conftest.py are surgically patched. Nothing else is created or modified — no aggregator __init__.py refresh, no test scaffolding, no infra changes.

Idempotence model. The queries stub is filled only when its content matches the exact scaffolder template; a non-stub file aborts the run (the user must explicitly remove or revert it). containers.py and <tests_dir>/conftest.py are patched only where the target import / definition is absent; existing code is never modified or removed.

Prerequisites. This agent assumes the persistence-spec query-context generators (which add query_context, the Query<Aggregate>Repository plural-named query-context attr, and the AbstractQueryContext import to containers.py), @queries-settings-implementer (which fills <aggregate>_queries_settings.py), and @service-implementer (which wires every external-interface dep and adds a containers fixture to <tests_dir>/conftest.py) have already run. If a required dep provider is missing in containers.py, this agent aborts with the missing names so the user can run those agents first.

Translation philosophy. Method body translation is judgment-driven, not regex-driven. The agent reads each flow step in plain English and emits idiomatic Python guided by the actual API exposed by the query repository ABCs and any external interfaces (which the agent reads from disk in Step 6). The structural skeleton — imports, __init__, the mandatory with self._query_context: wrapper, the mandatory self._logger.info(...) line, the final return, settings-based pagination defaults, and all DI/conftest patching — remains deterministic. The translator never invents methods or finders that don't exist in the read-in API; when a flow step references something with no analog in the codebase, it emits # TODO: <verbatim step> so the user can resolve it explicitly.

Inputs

Two positional arguments:

  1. <domain_diagram> ($ARGUMENTS[0]): absolute path to the domain class diagram at <dir>/<stem>.md. The merged queries spec path is derived per spec-core:naming-conventions.
  2. <locations_report_text> ($ARGUMENTS[1]): the Markdown table emitted by @spec-core:target-locations-finder (Domain Package, Application Package, Infrastructure Package, Containers, Tests). Parse as text; do not re-run the finder.

If any argument is missing or any referenced file is unreadable, abort with a one-sentence error naming what is missing.

Read the full file on GitHub · 629 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 629 lines · 37 tokens per session scan A 35289d4a1c16

Subscribe to this mod's changes

queries-implementer is an agent published in the GitHub repository voro6yov/spec-driven-development (4 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 37 tokens to every session and 9,213 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.