mirror of
https://github.com/shareAI-lab/analysis_claude_code.git
synced 2026-05-06 16:26:16 +08:00
Optimize Chinese translations: preserve English proper nouns (Skills, Agent, Subagent, Context Compact, etc.)
Co-authored-by: wbxl2000 <57169560+wbxl2000@users.noreply.github.com>
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
"description": "When the agent invokes the Skill tool, the skill's content (a SKILL.md file) is returned as a tool_result in a user message, not injected into the system prompt. This is a deliberate caching optimization: the system prompt remains static across turns, which means API providers can cache it (Anthropic's prompt caching, OpenAI's system message caching). If skill content were in the system prompt, it would change every time a new skill is loaded, invalidating the cache. By putting dynamic content in tool_result, we keep the expensive system prompt cacheable while still getting skill knowledge into context.",
|
||||
"alternatives": "Injecting skills into the system prompt is simpler and gives skills higher priority in the model's attention. But it breaks prompt caching (every skill load creates a new system prompt variant) and bloats the system prompt over time as skills accumulate. The tool_result approach keeps things cache-friendly at the cost of slightly lower attention priority.",
|
||||
"zh": {
|
||||
"title": "技能通过 tool_result 注入,而非系统提示词",
|
||||
"description": "当 agent 调用 Skill 工具时,技能内容(SKILL.md 文件)作为 tool_result 在用户消息中返回,而非注入系统提示词。这是一个刻意的缓存优化:系统提示词在各轮次间保持静态,API 提供商可以缓存它(Anthropic 的 prompt caching、OpenAI 的 system message caching)。如果技能内容在系统提示词中,每次加载新技能都会使缓存失效。将动态内容放在 tool_result 中,既保持了昂贵的系统提示词可缓存,又让技能知识进入了上下文。"
|
||||
"title": "Skill 通过 tool_result 注入,而非系统提示词",
|
||||
"description": "当 agent 调用 Skill 工具时,Skill 内容(SKILL.md 文件)作为 tool_result 在用户消息中返回,而非注入系统提示词。这是一个刻意的缓存优化:系统提示词在各轮次间保持静态,API 提供商可以缓存它(Anthropic 的 prompt caching、OpenAI 的 system message caching)。如果 Skill 内容在系统提示词中,每次加载新 Skill 都会使缓存失效。将动态内容放在 tool_result 中,既保持了昂贵的系统提示词可缓存,又让 Skill 知识进入了上下文。"
|
||||
},
|
||||
"ja": {
|
||||
"title": "スキルはシステムプロンプトではなく tool_result で注入",
|
||||
@@ -21,8 +21,8 @@
|
||||
"description": "Skills are not loaded at startup. The agent starts with only the skill names and descriptions (from frontmatter). When the agent decides it needs a specific skill, it calls the Skill tool, which loads the full SKILL.md body into context. This keeps the initial prompt small and focused. An agent solving a Python bug doesn't need the Kubernetes deployment skill loaded -- that would waste context window space and potentially confuse the model with irrelevant instructions.",
|
||||
"alternatives": "Loading all skills upfront guarantees the model always has all knowledge available, but wastes tokens on irrelevant skills and may hit context limits. A recommendation system (model suggests skills, human approves) adds latency. Lazy loading lets the model self-serve the knowledge it needs, when it needs it.",
|
||||
"zh": {
|
||||
"title": "按需加载技能而非预加载",
|
||||
"description": "技能不会在启动时加载。Agent 初始只拥有技能名称和描述(来自 frontmatter)。当 agent 判断需要特定技能时,调用 Skill 工具将完整的 SKILL.md 内容加载到上下文中。这保持了初始提示词的精简。一个正在修复 Python bug 的 agent 不需要加载 Kubernetes 部署技能——那会浪费上下文窗口空间,还可能用无关指令干扰模型。"
|
||||
"title": "按需加载 Skill 而非预加载",
|
||||
"description": "Skill 不会在启动时加载。Agent 初始只拥有 Skill 名称和描述(来自 frontmatter)。当 agent 判断需要特定 Skill 时,调用 Skill 工具将完整的 SKILL.md 内容加载到上下文中。这保持了初始提示词的精简。一个正在修复 Python bug 的 agent 不需要加载 Kubernetes 部署 Skill——那会浪费上下文窗口空间,还可能用无关指令干扰模型。"
|
||||
},
|
||||
"ja": {
|
||||
"title": "起動時ではなくオンデマンドでスキルを読み込み",
|
||||
@@ -36,7 +36,7 @@
|
||||
"alternatives": "A separate metadata file (skill.yaml + skill.md) would work but doubles the number of files. Embedding metadata in the markdown (as headings or comments) requires parsing the full file to extract metadata. Frontmatter is a well-established convention (Jekyll, Hugo, Astro) that keeps metadata and content co-located but separately parseable.",
|
||||
"zh": {
|
||||
"title": "SKILL.md 采用 YAML Frontmatter + Markdown 正文",
|
||||
"description": "每个 SKILL.md 文件有两部分:YAML frontmatter(名称、描述、globs)和 markdown 正文(实际指令)。Frontmatter 作为技能注册表的元数据——当 agent 问'有哪些可用技能'时,展示的就是这些信息。正文是按需加载的有效负载。这种分离意味着可以列出 100 个技能(每个只读几字节的 frontmatter)而不必加载 100 套完整指令集(每套可能数千 token)。"
|
||||
"description": "每个 SKILL.md 文件有两部分:YAML frontmatter(名称、描述、globs)和 markdown 正文(实际指令)。Frontmatter 作为 Skill 注册表的元数据——当 agent 问'有哪些可用 Skill'时,展示的就是这些信息。正文是按需加载的有效负载。这种分离意味着可以列出 100 个 Skill(每个只读几字节的 frontmatter)而不必加载 100 套完整指令集(每套可能数千 token)。"
|
||||
},
|
||||
"ja": {
|
||||
"title": "SKILL.md で YAML フロントマター + Markdown 本文",
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
"description": "In s04, subagents are ephemeral: spawn, do one task, return result, die. Their knowledge dies with them. In s09, teammates are persistent threads with identity (name, role) and config files. A teammate can complete task A, then be assigned task B, carrying forward everything it learned. Persistent teammates accumulate project knowledge, understand established patterns, and don't need to re-read the same files for every task.",
|
||||
"alternatives": "One-shot subagents (s04 style) are simpler and provide perfect context isolation -- no risk of one task's context polluting another. But the re-learning cost is high: every new task starts from zero. A middle ground (subagents with shared memory/knowledge base) was considered but adds complexity without the full benefit of persistent identity and state.",
|
||||
"zh": {
|
||||
"title": "持久化队友 vs 一次性子智能体",
|
||||
"description": "在 s04 中,子智能体是临时的:创建、执行一个任务、返回结果、销毁。它们的知识随之消亡。在 s09 中,队友是具有身份(名称、角色)和配置文件的持久化线程。队友可以完成任务 A,然后被分配任务 B,并携带之前学到的所有知识。持久化队友积累项目知识,理解已建立的模式,不需要为每个任务重新阅读相同的文件。"
|
||||
"title": "持久化队友 vs 一次性 Subagent",
|
||||
"description": "在 s04 中,Subagent 是临时的:创建、执行一个任务、返回结果、销毁。它们的知识随之消亡。在 s09 中,队友是具有身份(名称、角色)和配置文件的持久化线程。队友可以完成任务 A,然后被分配任务 B,并携带之前学到的所有知识。持久化队友积累项目知识,理解已建立的模式,不需要为每个任务重新阅读相同的文件。"
|
||||
},
|
||||
"ja": {
|
||||
"title": "永続的なチームメイト vs 使い捨てサブエージェント",
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -39,18 +39,18 @@
|
||||
"loc_delta": "代码量差异"
|
||||
},
|
||||
"sessions": {
|
||||
"s01": "Agent 循环",
|
||||
"s02": "工具",
|
||||
"s01": "Agent Loop",
|
||||
"s02": "Tool Use",
|
||||
"s03": "TodoWrite",
|
||||
"s04": "子 Agent",
|
||||
"s05": "技能",
|
||||
"s06": "上下文压缩",
|
||||
"s07": "任务系统",
|
||||
"s08": "后台任务",
|
||||
"s09": "Agent 团队",
|
||||
"s10": "团队协议",
|
||||
"s11": "自主 Agent",
|
||||
"s12": "Worktree + 任务隔离"
|
||||
"s04": "Subagent",
|
||||
"s05": "Skills",
|
||||
"s06": "Context Compact",
|
||||
"s07": "Task System",
|
||||
"s08": "Background Tasks",
|
||||
"s09": "Agent Teams",
|
||||
"s10": "Team Protocols",
|
||||
"s11": "Autonomous Agents",
|
||||
"s12": "Worktree + Task Isolation"
|
||||
},
|
||||
"layer_labels": {
|
||||
"tools": "工具与执行",
|
||||
@@ -60,17 +60,17 @@
|
||||
"collaboration": "协作"
|
||||
},
|
||||
"viz": {
|
||||
"s01": "Agent While 循环",
|
||||
"s02": "工具分发映射",
|
||||
"s03": "TodoWrite 提醒系统",
|
||||
"s04": "子 Agent 上下文隔离",
|
||||
"s05": "按需技能加载",
|
||||
"s06": "三层上下文压缩",
|
||||
"s07": "任务依赖图",
|
||||
"s08": "后台任务通道",
|
||||
"s09": "Agent 团队邮箱",
|
||||
"s10": "FSM 团队协议",
|
||||
"s11": "自主 Agent 循环",
|
||||
"s12": "Worktree 任务隔离"
|
||||
"s01": "Agent While-Loop",
|
||||
"s02": "Tool Dispatch Map",
|
||||
"s03": "TodoWrite Nag System",
|
||||
"s04": "Subagent Context Isolation",
|
||||
"s05": "On-Demand Skill Loading",
|
||||
"s06": "Three-Layer Context Compact",
|
||||
"s07": "Task Dependency Graph",
|
||||
"s08": "Background Task Lanes",
|
||||
"s09": "Agent Team Mailboxes",
|
||||
"s10": "FSM Team Protocols",
|
||||
"s11": "Autonomous Agent Cycle",
|
||||
"s12": "Worktree Task Isolation"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user