sync

A command that updates a DomainTome graph, a stored map of a codebase, so it matches the current code. It automatically chooses whether to create, expand, or compare the graph.

In plain words
What is it for?
It helps initialize a graph, add newly discovered code modules, or find changes since a Git revision such as a commit, tag, or branch point.
Why use it?
It removes the need to choose separate commands for a first scan, a broader re-scan, or a change comparison.

Command

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 commands/yacb2/domaintome/sync
Clone the repo
git clone --depth 1 https://github.com/yacb2/domaintome
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,201 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.00043 $0.04201
Opus 5 $0.00022 $0.02100
Sonnet 5 $0.00009 $0.00840
Haiku 4.5 $0.00004 $0.00420

Measured yesterday against content hash 37d53b4b51cd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sync 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 yesterday.

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/domaintome/commands/sync.md · 448 lines

How it starts

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

/dt:sync is the single entry point for "make the graph reflect the code". It replaces the old /dt:init + /dt:bootstrap + /dt:sync trio. The mode is auto-detected from repo state and the presence of a $ARGUMENTS git revision.

Mode quick-reference

Repo state Args Mode Section
No .dt/graph.db, or DB with 0 modules (any) INIT §INIT mode
DB has modules no git rev EXTEND §EXTEND mode
DB has modules git rev (HEAD~10, sha, tag) DIFF §DIFF mode

/dt:init is a permanent alias that always lands here in INIT mode (it predates /dt:sync and stays around because external docs and muscle memory rely on it). /dt:bootstrap is a deprecated alias that lands in EXTEND mode and emits a warning.

Step 0 — Detect mode

  1. Check if .dt/graph.db exists. If not → INIT mode.
  2. Otherwise call dt_list(type="module"). If items is empty → INIT mode.
  3. Otherwise, if $ARGUMENTS is non-empty (or contains --since <rev>) → DIFF mode.
  4. Otherwise → EXTEND mode.

Announce the detected mode in one sentence before doing anything, so the user can correct you if the heuristic misfires:

"Detected mode: EXTEND (graph has 12 modules, no git rev passed). Continuing with a fresh sub-agent scan over the codebase."


INIT mode

First-time setup. Replaces the legacy two-step init + bootstrap flow with a single conversation.

I.1 — Ensure the DB file

Run dt init --db .dt/graph.db (no-op if the file is already there from auto-create).

I.2 — Detect layout

Inspect the current directory and its immediate children:

  • Multi-repo workspace: no top-level manifest, but two or more child directories each have their own package.json, pyproject.toml, Cargo.toml, go.mod, or .git/. Also look for obvious workspace markers: backend/ + frontend/, *_ws/ naming, apps/ with per-app manifests.
  • Single repo: one manifest at the root.
  • Unclear: ask the user to confirm.

Read the full file on GitHub · 448 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. yesterday First seen · 448 lines · 43 tokens per session scan A 37d53b4b51cd

Subscribe to this mod's changes

sync is a command published in the GitHub repository yacb2/domaintome (0 stars, last pushed 3mo ago), licensed MIT. It adds 43 tokens to every session and 4,201 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.