workbench-token-context-discipline

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Workbench Token Context Discipline

Workbench 令牌上下文规范

Use this skill when a task may pull large docs, long issue histories, many skills, big logs, or expensive model context.
当任务可能涉及调取大型文档、冗长的问题历史、大量技能、庞大日志或高成本模型上下文时,使用本技能。

Context Budget Rules

上下文预算规则

  • Start with indexes, file lists, IDs, summaries, and targeted searches.
  • Read the smallest slice that can answer the current question.
  • Prefer
    rg
    ,
    jq
    , concise table output, and explicit IDs over dumping entire histories.
  • Summarize large sources before passing them to another agent.
  • Attach only role-relevant skills; more skills are not automatically better.
  • Stop and report if two consecutive reads are too large or mostly irrelevant.
  • 从索引、文件列表、ID、摘要和定向搜索开始。
  • 读取能够回答当前问题的最小内容片段。
  • 优先使用
    rg
    jq
    、简洁表格输出和明确ID,而非导出完整历史记录。
  • 在将大型数据源传递给其他Agent之前先进行摘要处理。
  • 仅关联与角色相关的技能;并非技能越多越好。
  • 如果连续两次读取的内容过大或大多无关,应停止操作并上报。

SDD Handoff Compact Mode

SDD 交接精简模式

When entering an SDD-gated issue:
  1. Check whether the prior stage comment includes
    HANDOFF_SUMMARY
    .
  2. If it exists, read the summary header and the listed
    SCOPED_EVIDENCE
    before reading any wider history.
  3. If no handoff exists, read at most the latest three relevant comments, request or create a compact handoff, then stop broad scanning.
  4. Never read full issue lists, full agent rosters, or unrelated repo docs for a single-stage task unless the stage explains why.
  5. Output must fit in one reviewable comment. If it does not, compress rather than split.
进入SDD管控的问题时:
  1. 检查前一阶段的评论是否包含
    HANDOFF_SUMMARY
  2. 如果存在,先读取摘要标题和列出的
    SCOPED_EVIDENCE
    ,再读取更广泛的历史记录。
  3. 如果没有交接内容,最多读取最新的三条相关评论,请求或创建精简交接内容,然后停止大范围扫描。
  4. 除非阶段说明原因,否则不要为单阶段任务读取完整问题列表、完整Agent名单或无关的仓库文档。
  5. 输出内容必须能放入一条可审核的评论中。如果无法容纳,应进行压缩而非拆分。

Cache And Quota Awareness

缓存与配额感知

  • Distinguish fresh input, output, cache read, and cache write when usage is under investigation.
  • Do not assume dashboard usage is wrong without local/request-level evidence.
  • Avoid repeated full-context reruns when a comment ID, file path, or artifact can be cited instead.
  • Keep Workbench Max and existing private agents out of broad binding changes unless explicitly assigned.
  • 当调查使用情况时,区分新鲜输入、输出、缓存读取和缓存写入。
  • 不要在没有本地/请求级证据的情况下假设仪表板使用数据有误。
  • 当可以引用评论ID、文件路径或工件时,避免重复进行全上下文重新运行。
  • 除非明确分配,否则不要将Workbench Max和现有私有Agent纳入广泛的绑定变更中。

Output Contract

输出约定

Return:
  • CONTEXT_USED
    : exact files, comments, commands, or IDs read.
  • SKIPPED
    : intentionally avoided broad reads and why.
  • SUMMARY
    : compact facts needed for the next step.
  • NEXT_SMALL_READ
    : the next targeted evidence query, if any.
  • TOKEN_RISK
    : normal / elevated / blocked.
返回:
  • CONTEXT_USED
    :读取的确切文件、评论、命令或ID。
  • SKIPPED
    :有意避免的大范围读取及其原因。
  • SUMMARY
    :下一步所需的精简事实。
  • NEXT_SMALL_READ
    :(如有)下一个定向证据查询。
  • TOKEN_RISK
    :正常 / 升高 / 受阻。