git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 2/5] docs(l10n): add AGENTS.md with optimized update-pot instructions

From
Jiang Xin <worldhello.net@gmail.com>
Date
Mar 3, 2026, 15:33 UTC
Message-ID
<5e23a45964fa86bf710d5e04396a574dc8882ef3.1772551123.git.worldhello.net@gmail.com>
In-Reply-To
<cover.1772551123.git.worldhello.net@gmail.com>

Add a new documentation file po/AGENTS.md that provides agent-specific instructions for generating or updating po/git.pot, separating them from the general po/README.md. This separation allows for more targeted optimization of AI agent workflows.

Performance evaluation using the qwen model:
    # Before: add the instruction to po/README.md; the prompt references
    # po/README.md for execution
    git-po-helper agent-test --runs=5 --agent=qwen update-pot \
	--prompt="Update po/git.pot according to po/README.md"
    # After: add the instruction to po/AGENTS.md; use builtin prompt
    # that references po/AGENTS.md for execution
    git-po-helper agent-test --runs=5 --agent=qwen update-pot
Benchmark results (5-run average):
Phase 1 - Optimizing po/README.md:
    | Metric      | Before  | After  | Improvement |
    |-------------|---------|--------|-------------|
    | Turns:      | 17      | 5      | -71%        |
    | Exec time   | 34s     | 14s    | -59%        |
    | Turn range  | 3-36    | 3-7    |             |
    | Time range  | 10s-59s | 9s-19s |             |
Phase 2 - Adding po/AGENTS.md (further optimization):
    | Metric      | Before  | After  | Improvement |
    |-------------|---------|--------|-------------|
    | Turns       | 17      | 3      | -82%        |
    | Exec time   | 34s     | 8s     | -76%        |
    | Turn range  | 3-36    | 3-3    |             |
    | Time range  | 10s-59s | 6s-9s  |             |
Separating agent-specific instructions into AGENTS.md provides:
- More focused and concise instructions for AI agents
- Cleaner README.md for human readers
- Additional 11% reduction in turns and 17% in execution time
- More consistent behavior (turn range reduced from 3-7 to 3-3)

This change makes agent workflows more efficient and reduces API costs by minimizing redundant LLM interactions.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
---
 po/AGENTS.md | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 92 insertions(+)
 create mode 100644 po/AGENTS.md
diff --git a/po/AGENTS.md b/po/AGENTS.md
new file mode 100644
index 0000000000..1fcef9119a
--- /dev/null
+++ b/po/AGENTS.md
@@ -0,0 +1,92 @@
+# Instructions for AI Agents
+
+This file gives specific instructions for AI agents that perform
+housekeeping tasks for Git l10n. Use of AI is optional; many successful
+l10n teams work well without it.
+
+The section "Housekeeping tasks for localization workflows" documents the
+most commonly used housekeeping tasks.
+
+
+## Background knowledge for localization workflows
+
+Essential background for the workflows below; understand these concepts before
+performing any housekeeping tasks in this document.
+
+### Language code and notation (XX, ll, ll\_CC)
+
+XX is a placeholder for the language code. The code is either `ll` (ISO 639)
+or `ll_CC` (e.g. `de`, `zh_CN` for Simplified Chinese). It appears in the PO
+file's header entry metadata (e.g. `"Language: zh_CN\n"`) and is typically used
+as the filename: `po/XX.po`.
+
+
+### Header Entry
+
+Every PO file (`po/XX.po`) contains a special entry called the "header entry"
+at the beginning of the file. This entry has an empty `msgid` and contains
+metadata about the translation in its `msgstr`:
+
+```po
+msgid ""
+msgstr ""
+"Project-Id-Version: Git\n"
+"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
+"POT-Creation-Date: 2026-02-14 13:38+0800\n"
+"PO-Revision-Date: 2026-02-14 11:41+0800\n"
+"Last-Translator: Teng Long <dyroneteng@gmail.com>\n"
+"Language-Team: GitHub <https://github.com/dyrone/git/>\n"
+"Language: zh_CN\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Gtranslator 42.0\n"
+```
+
+**CRITICAL**: Do not modify the header's `msgstr` during translation. Extracted
+files (e.g. `po/l10n-pending.po`) include this header; preserve it exactly.
+
+The header provides: translation metadata (translator, language, dates);
+pluralization rules (`Plural-Forms`); encoding and MIME type; project/version.
+
+
+## Housekeeping tasks for localization workflows
+
+This section describes housekeeping tasks listed in the introduction. Read
+"Background knowledge for localization workflows" above before performing
+any task.
+
+
+### Task 1: Generating or updating po/git.pot
+
+When asked to "update po/git.pot" or similar requests:
+
+1. **Directly execute** the command `make po/git.pot` without checking
+   if the file exists beforehand.
+
+2. **Do not verify** the generated file after execution. Simply run the
+   command and consider the task complete.
+
+The command will handle all necessary steps including file creation or
+update automatically.
+
+
+## Human translators remain in control
+
+Git translation is human-driven; language team leaders and contributors are
+responsible for:
+
+- Understanding technical context of Git commands and messages
+- Making linguistic and cultural decisions for the target language
+- Maintaining translation quality and consistency
+- Ensuring translations follow Git l10n conventions and standards
+- Building and maintaining language glossaries
+- Reviewing and approving all changes before submission
+
+AI tools, if used, only accelerate routine tasks.
+
+AI-generated output should always be treated as rough drafts requiring human
+review, editing, and approval by someone who understands both the technical
+context and the target language.  The best results come from combining AI
+efficiency with human judgment, cultural insight, and community engagement.
-- 
2.53.0.rc2.20.g532543fa46
Previous: Jiang XinNext: Jiang Xin
Message 18 of 45 in “[RFC] Introducing AI Agents to Git Localization”
  1. Jiang XinFeb 4, 2026
  2. Peter KreftingFeb 4, 2026
  3. Michal SuchánekFeb 4, 2026
  4. 依云Feb 4, 2026
  5. Jiang XinFeb 5, 2026
  6. Michal SuchánekFeb 5, 2026
  7. Jiang XinFeb 5, 2026
  8. Michal SuchánekFeb 5, 2026
  9. Jiang XinFeb 5, 2026
  10. brian m. carlsonFeb 5, 2026
  11. 1/2 l10n: add .gitattributes to simplify location filteringJiang Xin, Feb 5, 2026
  12. Junio C HamanoFeb 5, 2026
  13. 2/2 l10n: README: document AI assistant guidelinesJiang Xin, Feb 5, 2026
  14. Junio C HamanoFeb 5, 2026
  15. Jiang XinFeb 6, 2026
  16. 0/5 docs(l10n): AI agent instructions and workflow improvementsJiang Xin, Mar 3, 2026
  17. 1/5 l10n: add .gitattributes to simplify location filteringJiang Xin, Mar 3, 2026
  18. 2/5 docs(l10n): add AGENTS.md with optimized update-pot instructionsJiang Xin, Mar 3, 2026
  19. Jiang XinMar 12, 2026
  20. 3/5 docs(l10n): add AI agent instructions for updating po/XX.po filesJiang Xin, Mar 3, 2026
  21. 4/5 docs(l10n): add AI agent instructions for translating PO filesJiang Xin, Mar 3, 2026
  22. Jiang XinMar 12, 2026
  23. 5/5 docs(l10n): add AI agent instructions to review translationsJiang Xin, Mar 3, 2026
  24. Jiang XinMar 12, 2026
  25. 0/5 docs(l10n): AI agent instructions and workflow improvementsJiang Xin, Mar 14, 2026
  26. 1/5 l10n: add .gitattributes to simplify location filteringJiang Xin, Mar 14, 2026
  27. Johannes SixtMar 15, 2026
  28. Junio C HamanoMar 15, 2026
  29. Jiang XinMar 16, 2026
  30. Jiang XinMar 16, 2026
  31. Johannes SixtMar 16, 2026
  32. 2/5 docs(l10n): add AGENTS.md with optimized update-pot instructionsJiang Xin, Mar 14, 2026
  33. 3/5 docs(l10n): add AI agent instructions for updating po/XX.po filesJiang Xin, Mar 14, 2026
  34. 4/5 docs(l10n): add AI agent instructions for translating PO filesJiang Xin, Mar 14, 2026
  35. 5/5 docs(l10n): add AI agent instructions to review translationsJiang Xin, Mar 14, 2026
  36. 0/5 docs(l10n): AI agent instructions and workflow improvementsJiang Xin, Mar 16, 2026
  37. 1/5 l10n: add .gitattributes to simplify location filteringJiang Xin, Mar 16, 2026
  38. 2/5 docs(l10n): add AGENTS.md with optimized update-pot instructionsJiang Xin, Mar 16, 2026
  39. 3/5 docs(l10n): add AI agent instructions for updating po/XX.po filesJiang Xin, Mar 16, 2026
  40. 4/5 docs(l10n): add AI agent instructions for translating PO filesJiang Xin, Mar 16, 2026
  41. 5/5 docs(l10n): add AI agent instructions to review translationsJiang Xin, Mar 16, 2026
  42. Jiang XinMar 31, 2026
  43. Junio C HamanoMar 31, 2026
  44. Jiang XinMar 31, 2026
  45. Jiang XinFeb 5, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.