domain

domain is an agent for coding agents from jpka/shopify-operations-mcp. It costs 0 tokens per session (1,039 once invoked), scanned A, original, MIT.

A set of instructions for exploring a repository using its decision records, working rules, and key source files. It explains which documentation and code to read before investigating a change.

In plain words
What is it for?
Use it when exploring this codebase, especially work involving configuration, audit logs, the server entry point, or the safe-write-mcp-core contract.
Why use it?
It gives an agent a consistent way to learn the repository's architecture and conventions. It also says how to proceed when expected files or tickets are missing.

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/jpka/shopify-operations-mcp/domain
Clone the repo
git clone --depth 1 https://github.com/jpka/shopify-operations-mcp

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for domain

README.md
[![agentmods](https://agentmods.dev/badge/agents/jpka/shopify-operations-mcp/domain.svg)](https://agentmods.dev/agents/jpka/shopify-operations-mcp/domain)
Your own site
<a href="https://agentmods.dev/agents/jpka/shopify-operations-mcp/domain"><img src="https://agentmods.dev/badge/agents/jpka/shopify-operations-mcp/domain.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,039 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.00000 $0.01039
Opus 5 $0.00000 $0.00519
Sonnet 5 $0.00000 $0.00208
Haiku 4.5 $0.00000 $0.00104

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

Security

Grade A, and why

domain 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 4d 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.

docs/agents/domain.md · 54 lines

How it starts

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

Domain docs

How an agent should consume this repo's domain documentation when exploring the codebase.

Before exploring, read these

  • DECISIONS.md at the repo root — the decision record (newest first). Read the entries that touch the area you're about to work in. Every architectural decision this repo makes lands here, in the same style sw-postgres-mcp uses.
  • AGENTS.md at the repo root — working conventions and pointers into docs/agents/.
  • The source — this repo is small enough that the code is the ground truth:
    • src/config.ts — the config shape and every default/invariant (plans.*, approvalServer.*, protectedTags, callerId, env overrides).
    • src/auditSink.ts — the hash-chained JSONL audit sink (chain format, PII redaction, failure semantics).
    • src/index.ts — server entry (stub today; the MCP server lands in later tickets).
    • node_modules/safe-write-mcp-core/dist/*.d.ts — the core contract the server builds on: PlanStore, the approval server, PlanError codes, fingerprint, AuditSink/AuditStatus.

If a file is missing or a ticket is unimplemented, proceed silently — don't flag the absence or suggest creating artifacts. The build map (issue #1, labelled wayfinder:map) is the source of truth for what is planned but not yet built.

File structure

Single-context repo:

/
├── AGENTS.md
├── DECISIONS.md
├── config.example.json
├── src/                ← implementation (config, audit sink, MCP server later)
├── tests/              ← vitest unit tests
├── scripts/            ← CLI helpers (e.g. scripts/verify-audit.ts)
└── docs/
    └── agents/         ← agent conventions (this directory)

Use the code's vocabulary

When your output names a domain concept (an issue title, a test name, a DECISIONS entry), use the term as the code defines it. Don't drift to synonyms the codebase avoids. Key terms:

  • plan — a previewed operation's record in PlanStore, bound to a plan token; single-use, expiring (planTtlMs), fingerprint-bound, optionally gated on approval.
  • preview — host-side pure reads that compute a manifest ({ items: [{ ref, before, after }], digest }) with zero mutation calls; there are no transactions on Shopify.
  • execute_plan — consumes the plan token, re-reads current values, refuses on drift (STATE_CHANGED), then runs the executor.
  • fingerprint — sha256 over the canonical payload; the token is bound to it (consume() refuses any mismatch).
  • approval — out-of-band human sign-off via the localhost approval server (127.0.0.1 only); never an agent-reachable MCP tool. Threshold-driven (approvalRequiredAboveItems, hardMaxItems) except for irreversible ops, which force alwaysRequireApproval.
  • reversible / irreversible — reversible ops (prices, inventory, discounts) support rollback; irreversible ops (cancel_order, refund_order) never do (ROLLBACK_UNSUPPORTED) and are always approval-gated.
  • rollback — re-applies snapshot before values as inverse mutations within rollbackTtlMs (ROLLBACK_WINDOW_EXPIRED after); no approval required.
  • partial-failure ledger — per-item success/failure outcomes recorded on every batch execute/rollback; partial failure is reported, never hidden.
  • protectedTags — tags plans may never modify (default ["do-not-touch"]).
  • audit — the hash-chained JSONL trail (seq / prev_hash / hash; tamper-evident, not tamper-proof). Core AuditStatus values: previewed, awaiting_approval, approved, executed, rejected, refused, failed, rolled_back. Core PlanError codes (the core only owns the token lifecycle — hosts extend it with their own domain codes): UNKNOWN_TOKEN, PLAN_EXPIRED, PLAN_USED, PLAN_MISMATCH, AWAITING_APPROVAL, PLAN_REJECTED; this repo's host-side extensions: STATE_CHANGED, ROLLBACK_UNSUPPORTED, ROLLBACK_WINDOW_EXPIRED.
  • PII contract — customer emails and names must never appear in the audit trail; record order/product IDs and amounts instead.

Read the full file on GitHub · 54 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. 4d ago First seen · 54 lines · 0 tokens per session scan A e38c0ffac3b0

Subscribe to this mod's changes

domain is an agent published in the GitHub repository jpka/shopify-operations-mcp (0 stars, last pushed 18d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,039 tokens. 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.