open-dictionary AGENTS.md

Design rules for rebuilding a dictionary production system from Wiktionary data processed by Wiktextract, a tool that extracts structured dictionary information. The system creates learner-friendly Chinese entries through staged data processing.

In plain words
What is it for?
Importing snapshots into PostgreSQL, curating dictionary tables, enriching entries with language-model output, and exporting JSONL or SQLite files.
Why use it?
They keep source data, editorial decisions, processing stages, and exported files clearly separated and reproducible.

Instructions file for CodexOpenCode

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 instructions/ahpxex/open-dictionary/agents-md
Clone the repo
git clone --depth 1 https://github.com/ahpxex/open-dictionary

Made for: Codex, OpenCode.

Per session 1,906 This file is loaded in full into every session.
When invoked 1,906 The same file — it is already loaded in full.
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.01906 $0.01906
Opus 5 $0.00953 $0.00953
Sonnet 5 $0.00381 $0.00381
Haiku 4.5 $0.00191 $0.00191

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

Security

Grade A, and why

open-dictionary AGENTS.md 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 3d 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.

AGENTS.md · 251 lines

How it starts

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

Open Dictionary Rewrite Charter

This repository is not a generic "dictionary scripts" project. It is the rewrite line for a reproducible dictionary production system built on top of Wiktionary / Wiktextract data.

The system must be designed as a staged data pipeline with explicit schemas, explicit run metadata, and deterministic handoff points between stages.

Product Framing

  • Source of truth: Wiktionary / Wiktextract data, not Wikidata.
  • Canonical unit: one headword equals one entry.
  • Entry model: word-centric, not "word plus part-of-speech" as the top-level unit.
  • LLM goal: produce structured, Chinese learner-friendly dictionary entries from curated source data.
  • Human editorial authority: when the pipeline hits ambiguous curation questions, the user decides the editorial rule. The agent must not invent permanent curation policy without explicit approval.

Core Workflow

The intended end-state workflow is:

  1. Download a Wiktionary / Wiktextract snapshot.
  2. Ingest the raw snapshot into PostgreSQL.
  3. Build curated tables from raw tables.
  4. Run LLM enrichment on curated entries.
  5. Export stable distributable artifacts such as JSONL and SQLite.

Expressed as data layers:

  • raw: source-faithful imported data.
  • curated: normalized, cleaned, word-centric entries.
  • llm: structured generated outputs plus generation metadata.
  • exports: packaged read-only outputs for downstream distribution.
  • meta: run tracking, versions, prompts, and operational audit data.

No stage may skip over the previous stage's contract. For example, LLM enrichment must consume curated entries, not raw imported blobs.

Technical Framework

1. Raw Ingestion Layer

Responsibilities:

  • Download source snapshots.
  • Record source identity, origin URL, timestamps, and hashes.
  • Load raw payloads into PostgreSQL with minimal semantic mutation.
  • Preserve source payloads well enough to re-run downstream stages.

Requirements:

  • Raw ingestion must be idempotent at the run level.
  • Every ingestion run must have a run_id.
  • Every raw row must be traceable to a source snapshot and ingestion run.
  • The code must not mix download logic, parsing logic, and curation logic in the same stage module.

Read the full file on GitHub · 251 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. 3d ago First seen · 251 lines · 1,906 tokens per session scan A 4109442a09ba

Subscribe to this mod's changes

open-dictionary AGENTS.md is an instructions file published in the GitHub repository ahpxex/open-dictionary (134 stars, last pushed 23d ago), licensed MIT. It adds 1,906 tokens to every session, about $0.0095 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-30.

Related

Other instructions, from other repositories