name: build-vocabulary-csv
description: Build, adapt, translate, migrate, or validate vocabulary CSV files for language-learning projects without depending on a specific app or repository. Use when Codex is asked to generate a new vocabulary CSV from a topic, mirror an existing CSV pattern in another language, add multilingual definition or annotation columns, preserve concept order across counterpart CSVs, or validate language-learning CSV files.
Build Vocabulary CSV
Core Workflow
Identify the requested CSV mode.
- Standalone mode: Build a new vocabulary list from a topic, such as plant names, airport vocabulary, verbs, occupations, or weather.
- Mirror mode: Use one or more existing CSVs as the concept/order/source pattern.
- Migration mode: Convert a legacy CSV into a richer schema while preserving rows and existing fields.
Determine the schema.
- If the user provides a header, use it exactly.
- If an existing CSV is being mirrored, match its header unless the user asks for a new schema.
- If no schema is provided, propose or use a simple multilingual schema:
word,definition.en,definition.ja,definition.zh-TW,pos,annotation.en,annotation.ja,annotation.zh-TW,photoURL
Adjust locales to the user’s requested languages. Keep photoURL empty unless URLs are provided.
Build the vocabulary list.
- Use the target language term in
word.
- Use common learner-facing terms before obscure or technical terms.
- If no row count is provided, choose a conservative category size, usually 30-50 rows.
- Keep one row per concept.
- Use stable ordering: broad/common terms first, then related subgroups, then less common but useful terms.
- Avoid scientific, regional, slang, or overly specialized terms unless requested.
Write short definitions and useful annotations.
- Definitions should be concise glosses.
- Annotations should explain usage, register, ambiguity, grammar, irregularity, or memorable examples.
- Use the requested writing system and locale. For Traditional Chinese, use Traditional characters.
- For verbs/adjectives, use canonical dictionary forms unless the user requests conjugated forms.
Validate the CSV.
- Use a structured CSV parser, not manual line splitting.
- Confirm every row has the same number of fields as the header.
- Confirm required fields are non-empty.
- Confirm row count matches the user’s request or the mirrored source.
- Confirm quoted commas and quotes parse correctly.
pos Field Guidance
If the schema includes a pos column, use it for part of speech or expression type. Use the project’s accepted values if one exists. If not, prefer simple lowercase labels:
noun
verb
adjective
adverb
pronoun
preposition
conjunction
interjection
particle
phrase
unknown
If the schema does not include pos, do not add it unless the user asks for it. If mirroring an existing schema that uses another name, such as form or partOfSpeech, preserve that existing column name. Do not invent specialized labels unless the user’s project already uses them.
Standalone CSV Guidance
For a new topic without counterpart files:
- Ask only if the missing decision materially changes the output, such as target language, target locales, or row count.
- Otherwise choose sensible defaults and proceed.
- For plant CSVs, prefer common plant names; avoid Latin scientific names unless requested.
- For travel CSVs, prioritize phrases and nouns a beginner would encounter.
- For job CSVs, prefer common occupations and standard terms.
- For grammar CSVs, include particles, auxiliary verbs, or set phrases only if the schema supports them.
Migration Guidance
When converting a legacy CSV:
- Preserve the original row order.
- Preserve existing definitions and annotations.
- Add new locale columns beside existing locale columns.
- Do not discard columns unless the user explicitly asks.
- Keep the final CSV parseable by standard CSV tooling.
Validation Examples
Use any available CSV parser. Examples:
ruby -rcsv -e 'rows=CSV.read("vocabulary.csv", headers:true); puts rows.length; puts rows.headers.join("|")'
node --input-type=module -e "import { parse } from 'csv-parse/sync'; import { readFileSync } from 'fs'; const rows = parse(readFileSync('vocabulary.csv'), { columns: true, skip_empty_lines: true }); console.log(rows.length);"
Output Principles
- Prefer editing or creating the actual CSV file when working in a shared workspace.
- Mention assumptions briefly in the final response.
- Report validation commands and results.
- If the CSV is generated from scratch, mention that there was no counterpart source and that the list is newly curated.
1---2name: build-vocabulary-csv3description: Build, adapt, translate, migrate, or validate vocabulary CSV files for language-learning projects without depending on a specific app or repository. Use when Co4---5---6name: build-vocabulary-csv7description: Build, adapt, translate, migrate, or validate vocabulary CSV files for language-learning projects without depending on a specific app or repository. Use when Codex is asked to generate a new vocabulary CSV from a topic, mirror an existing CSV pattern in another language, add multilingual definition or annotation columns, preserve concept order across counterpart CSVs, or validate language-learning CSV files.8---910# Build Vocabulary CSV1112## Core Workflow13141. Identify the requested CSV mode.15 - **Standalone mode**: Build a new vocabulary list from a topic, such as plant names, airport vocabulary, verbs, occupations, or weather.16 - **Mirror mode**: Use one or more existing CSVs as the concept/order/source pattern.17 - **Migration mode**: Convert a legacy CSV into a richer schema while preserving rows and existing fields.18192. Determine the schema.20 - If the user provides a header, use it exactly.21 - If an existing CSV is being mirrored, match its header unless the user asks for a new schema.22 - If no schema is provided, propose or use a simple multilingual schema:2324 ```csv25 word,definition.en,definition.ja,definition.zh-TW,pos,annotation.en,annotation.ja,annotation.zh-TW,photoURL26 ```2728 Adjust locales to the user’s requested languages. Keep `photoURL` empty unless URLs are provided.29303. Build the vocabulary list.31 - Use the target language term in `word`.32 - Use common learner-facing terms before obscure or technical terms.33 - If no row count is provided, choose a conservative category size, usually 30-50 rows.34 - Keep one row per concept.35 - Use stable ordering: broad/common terms first, then related subgroups, then less common but useful terms.36 - Avoid scientific, regional, slang, or overly specialized terms unless requested.37384. Write short definitions and useful annotations.39 - Definitions should be concise glosses.40 - Annotations should explain usage, register, ambiguity, grammar, irregularity, or memorable examples.41 - Use the requested writing system and locale. For Traditional Chinese, use Traditional characters.42 - For verbs/adjectives, use canonical dictionary forms unless the user requests conjugated forms.43445. Validate the CSV.45 - Use a structured CSV parser, not manual line splitting.46 - Confirm every row has the same number of fields as the header.47 - Confirm required fields are non-empty.48 - Confirm row count matches the user’s request or the mirrored source.49 - Confirm quoted commas and quotes parse correctly.5051## `pos` Field Guidance5253If the schema includes a `pos` column, use it for part of speech or expression type. Use the project’s accepted values if one exists. If not, prefer simple lowercase labels:5455- `noun`56- `verb`57- `adjective`58- `adverb`59- `pronoun`60- `preposition`61- `conjunction`62- `interjection`63- `particle`64- `phrase`65- `unknown`6667If the schema does not include `pos`, do not add it unless the user asks for it. If mirroring an existing schema that uses another name, such as `form` or `partOfSpeech`, preserve that existing column name. Do not invent specialized labels unless the user’s project already uses them.6869## Standalone CSV Guidance7071For a new topic without counterpart files:7273- Ask only if the missing decision materially changes the output, such as target language, target locales, or row count.74- Otherwise choose sensible defaults and proceed.75- For plant CSVs, prefer common plant names; avoid Latin scientific names unless requested.76- For travel CSVs, prioritize phrases and nouns a beginner would encounter.77- For job CSVs, prefer common occupations and standard terms.78- For grammar CSVs, include particles, auxiliary verbs, or set phrases only if the schema supports them.7980## Migration Guidance8182When converting a legacy CSV:8384- Preserve the original row order.85- Preserve existing definitions and annotations.86- Add new locale columns beside existing locale columns.87- Do not discard columns unless the user explicitly asks.88- Keep the final CSV parseable by standard CSV tooling.8990## Validation Examples9192Use any available CSV parser. Examples:9394```bash95ruby -rcsv -e 'rows=CSV.read("vocabulary.csv", headers:true); puts rows.length; puts rows.headers.join("|")'96```9798```bash99node --input-type=module -e "import { parse } from 'csv-parse/sync'; import { readFileSync } from 'fs'; const rows = parse(readFileSync('vocabulary.csv'), { columns: true, skip_empty_lines: true }); console.log(rows.length);"100```101102## Output Principles103104- Prefer editing or creating the actual CSV file when working in a shared workspace.105- Mention assumptions briefly in the final response.106- Report validation commands and results.107- If the CSV is generated from scratch, mention that there was no counterpart source and that the list is newly curated.