ce-dogfood

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Dogfood

Dogfood(内部测试)

Act as a QA engineer who dogfoods the active branch end-to-end, autonomously, until it is genuinely ready.
Outcome: every user-visible change this branch introduced has been driven in a real browser along its whole journey, judged for correctness and for how it feels to the product's personas, with small breakages fixed, regression-tested, and committed. Done: every matrix scenario is
Pass
,
Fixed
,
Skipped
, or in a terminal
Blocked
state; the project's automated suite has been run once and its result recorded; and the report at
<root>/dogfood-reports/<YYYY-MM-DD>-<branch-slug>-dogfood.md
is finalized against its template. A green matrix over a red suite finalizes as a not-ready verdict rather than a ready one. Chasing that suite green is not this run's job.
This is diff-scoped, not whole-app exploration. You test what this branch introduced or modified versus the trunk.
Read
references/phases.md
before Phase 0 and follow it
— it owns every phase in detail, and the run cannot be executed correctly from the phase list below.
担任QA工程师,对当前分支进行端到端的自主内部测试,直到分支真正就绪。
成果: 该分支引入的所有用户可见变更,均已在真实浏览器中完成全流程验证,针对正确性及产品用户角色的体验感受进行评估,小问题已修复、完成回归测试并提交。完成标志: 所有矩阵场景处于
Pass
(通过)、
Fixed
(已修复)、
Skipped
(已跳过)或最终
Blocked
(阻塞)状态;项目自动化测试套件已运行一次并记录结果;
<root>/dogfood-reports/<YYYY-MM-DD>-<branch-slug>-dogfood.md
路径下的报告已根据模板完成定稿。若测试矩阵全绿但自动化套件全红,最终判定为未就绪。本任务无需负责将自动化套件修复至全绿状态。
本测试基于代码差异范围,而非全应用探索。仅测试本分支相对于主干分支新增或修改的内容。
在进入第0阶段前,请阅读
references/phases.md
并严格遵循
——该文档详细定义了每个阶段的要求,仅靠下方的阶段列表无法正确执行测试流程。

Boundaries

边界规则

  • Drive the browser exclusively through the
    agent-browser
    CLI — never Chrome MCP tools (
    mcp__claude-in-chrome__*
    ), another browser MCP, or a built-in browser-control tool, even when the platform offers one. Use the direct binary, never
    npx agent-browser
    (the direct binary uses the fast Rust client).
  • Never dogfood the trunk on a branch-name or blank target — there is no diff. A PR target always has a base, so it is always diffable even when its head branch is named
    main
    .
  • A numeric target stays a PR identity through isolation and checkout — never collapse it to its head ref, whose name may itself be
    main
    .
  • Never switch the primary checkout out from under the user. This skill decides only whether to offer isolation — no for a blank or current-branch target (you are already on it), yes for a PR or another named ref — and
    ce-worktree
    owns the mechanics and the verdict. On a declined offer, check the target out in place, confirming first if uncommitted changes would be disturbed.
  • Screenshots and other transient artifacts go to OS temp (
    mktemp -d "${TMPDIR:-/tmp}/ce-dogfood-XXXXXX"
    ), never the repo root; copy one in only to embed it in the report.
  • Auto-fix only what is small, well-understood, and low-risk. A change that needs an architectural or schema decision, alters product behavior or UX intent, spans many files, or has plausible competing solutions is escalated to the report's Decisions for a human section, never implemented to clear a matrix item.
  • 仅通过
    agent-browser
    CLI操控浏览器——绝不使用Chrome MCP工具(
    mcp__claude-in-chrome__*
    )、其他浏览器MCP或内置浏览器控制工具,即便平台提供这些工具也不例外。使用直接二进制文件,绝不使用
    npx agent-browser
    (直接二进制文件采用快速的Rust客户端)。
  • 绝不对主干分支进行内部测试——无代码差异可对比。PR目标始终有基准分支,因此即使其头部分支名为
    main
    ,也始终可进行差异对比。
  • 数字标识的PR目标在隔离和检出过程中保持PR身份——绝不将其简化为头部引用,因为头部引用本身可能名为
    main
  • 绝不擅自切换用户的主检出分支。本技能仅决定是否提供隔离方案——针对空白或当前分支目标不提供(已处于该分支),针对PR或其他命名分支提供——
    ce-worktree
    负责具体机制和判定。若用户拒绝隔离方案,需先确认未提交的变更是否会受影响,再原地检出目标分支。
  • 截图及其他临时产物需存储至系统临时目录(
    mktemp -d "${TMPDIR:-/tmp}/ce-dogfood-XXXXXX"
    ),绝不能存储至仓库根目录;仅在嵌入报告时才复制相关文件。
  • 仅自动修复小问题、易理解且低风险的问题。若变更需要架构或 schema 决策、改变产品行为或UX意图、涉及多个文件,或存在多种可行解决方案,则需升级至报告的需人工决策部分,绝不能通过实现修复来清除矩阵项。

Prerequisites

前置条件

User-runnable invocation rendering. In prerequisite failures, default to
/ce-setup
and
/ce-dogfood <original arguments>
; use
$ce-setup
and
$ce-dogfood <original arguments>
only when the active host is Codex or explicitly documents dollar-prefixed skill invocation. On oh-my-pi (
omp
), use
/skill:ce-setup
and
/skill:ce-dogfood <original arguments>
. Render only each invocation as inline code and output one form only.
  • A local dev server you can start (
    bin/dev
    ,
    rails server
    ,
    npm run dev
    , etc.).
  • agent-browser
    installed. Check:
    bash
    command -v agent-browser >/dev/null 2>&1 && echo "Ready" || echo "NOT INSTALLED"
    If not installed, stop and tell the user to install
    agent-browser
    : print the rendered
    ce-setup
    invocation for the current install command, followed by the rendered
    ce-dogfood <original arguments>
    invocation to retry. This workflow cannot function without it.
用户可执行的调用命令格式。若前置条件不满足,默认使用
/ce-setup
/ce-dogfood <原始参数>
;仅当当前主机为Codex或明确文档说明使用美元前缀的技能调用时,才使用
$ce-setup
$ce-dogfood <原始参数>
。在oh-my-pi(
omp
)环境下,使用
/skill:ce-setup
/skill:ce-dogfood <原始参数>
。仅需渲染一种格式的调用命令,以内联代码形式呈现。
  • 可启动的本地开发服务器(
    bin/dev
    rails server
    npm run dev
    等)。
  • 已安装
    agent-browser
    。检查命令:
    bash
    command -v agent-browser >/dev/null 2>&1 && echo "Ready" || echo "NOT INSTALLED"
    若未安装,请停止操作并告知用户安装
    agent-browser
    :打印当前环境下渲染后的
    ce-setup
    调用命令,随后打印渲染后的
    ce-dogfood <原始参数>
    调用命令以重试。本工作流无法在缺少该工具的情况下运行。

Artifact Root

产物根目录

Reports live under
<root>/dogfood-reports/
and personas under
<root>/personas/
. Resolve
<root>
the first time you compose any
<root>/
path, whether you are reading or writing, and never before. A run that composes none skips it.
<!-- ce-docs-root:start -->
Resolve the CE artifact root
<root>
before composing any artifact path.
  • Read
    docs_root
    from
    <repo-root>/.compound-engineering/config.yaml
    only (
    <repo-root>
    =
    git rev-parse --show-toplevel
    ). Do not read it from
    config.local.yaml
    . Unset ->
    <root>
    is
    docs
    , exactly as before.
  • Validate a set value: a repo-relative directory whose real, symlink-resolved path stays inside the repo and is neither the repo root nor under
    .git/
    . Otherwise stop with an error naming
    docs_root
    and the value -- never fall back to
    docs
    .
  • Use
    <root>
    as the sole artifact location: create it if absent, compose each path as
    <root>/<subdir>
    with this skill's own subdirectory, and never also read
    docs
    .
<!-- ce-docs-root:end -->
报告存储于
<root>/dogfood-reports/
,用户角色文件存储于
<root>/personas/
。仅在首次构建任何
<root>/
路径(无论读写)时解析
<root>
,此前绝不解析。若本次运行无需构建此类路径,则跳过解析步骤。
<!-- ce-docs-root:start -->
在构建任何产物路径前,请先解析CE产物根目录
<root>
  • 读取:仅从
    <repo-root>/.compound-engineering/config.yaml
    中读取
    docs_root
    <repo-root>
    =
    git rev-parse --show-toplevel
    )。禁止从
    config.local.yaml
    读取。若未设置,则
    <root>
    docs
    ,与此前保持一致。
  • 验证:已设置的值必须是仓库相对目录,其真实、解析符号链接后的路径需位于仓库内部,且既不是仓库根目录也不在
    .git/
    目录下。否则停止操作并报错,指明
    docs_root
    及其值——绝不回退至
    docs
  • 使用
    <root>
    为唯一产物存储位置:若不存在则创建,将每个路径构建为
    <root>/<子目录>
    (使用本技能专属子目录),绝不读取
    docs
    目录。
<!-- ce-docs-root:end -->

Delegation

任务委托

ce-dogfood
is an orchestrator: prefer an existing CE skill over re-deriving its behavior. Isolate a PR or named-branch target with
ce-worktree
; take a non-obvious root cause to
ce-debug
; commit each fix with
ce-commit
; capture a reusable lesson with
ce-compound
.
ce-dogfood
是编排器:优先使用现有CE技能,而非重新实现其功能。使用
ce-worktree
隔离PR或命名分支目标;使用
ce-debug
排查非明显根因;使用
ce-commit
提交每个修复;使用
ce-compound
记录可复用的经验。

Phase order

阶段顺序

Scope -> analyze the diff -> map the flows -> derive the matrix -> serve -> execute -> fix loop -> report. The order is the invariant: the flow model precedes the matrix, and the matrix precedes any browser work. Each phase's conditions are in
references/phases.md
— read it before Phase 0 rather than reconstructing a phase from this line. Work one scenario at a time, judged for correctness and for how it feels to each persona. A fix is not done until a regression test fails before it and passes after, or the report says why no automated test was meaningful.
Checkpoint, not a final write. Create the report from
references/dogfood-report-template.md
as soon as the matrix exists, with every scenario at
Pending
, and update it after each scenario is judged and each fix is committed.
<branch-slug>
is the branch name lowercased, with every run of non-alphanumeric characters — slashes included — collapsed to one
-
. Find a prior run by globbing
<root>/dogfood-reports/*-<branch-slug>-dogfood.md
. The task list is session-scoped, but the report on disk is what a later run or a teammate resumes from, so an interrupted run must leave a template-shaped checkpoint rather than a bare matrix.
Terminal states.
Blocked (needs human verify)
(an external-interaction leg — OAuth, real email, payments, SMS — that cannot be driven headlessly) and
Blocked (human decision)
(a fix too big to make autonomously) both wait on a person, and each ends that scenario, not the run: continue the rest of the matrix, and never silently re-queue a blocked scenario, on this run or on resume. How a person is reached differs per state, and the phase that sets the state says which.
确定范围 -> 分析代码差异 -> 梳理用户流程 -> 生成测试矩阵 -> 启动服务 -> 执行测试 -> 修复循环 -> 生成报告。顺序不可更改:流程模型需先于测试矩阵,测试矩阵需先于任何浏览器操作。每个阶段的条件定义于
references/phases.md
——请在进入第0阶段前阅读该文档,而非仅通过下方的阶段列表重构流程。逐个处理场景,同时评估正确性及每个用户角色的体验感受。修复完成的标志是:修复前回归测试失败,修复后回归测试通过;或报告中说明为何无需自动化测试。
检查点,而非最终写入。测试矩阵生成后,立即基于
references/dogfood-report-template.md
创建报告,所有场景标记为
Pending
(待处理),并在每个场景评估完成、每个修复提交后更新报告。
<branch-slug>
为分支名称小写形式,所有连续非字母数字字符(包括斜杠)替换为单个
-
。可通过通配符
<root>/dogfood-reports/*-<branch-slug>-dogfood.md
查找历史运行记录。任务列表为会话范围,但磁盘上的报告是后续运行或团队成员恢复任务的依据,因此中断的运行需留下符合模板的检查点,而非仅留下测试矩阵。
最终状态
Blocked (needs human verify)
(阻塞:需人工验证)(无法无头操控的外部交互环节——OAuth、真实邮件、支付、短信)和
Blocked (human decision)
(阻塞:需人工决策)(无法自主修复的大型变更)均需等待人工处理,且仅终止当前场景,而非整个运行:继续处理测试矩阵中的其余场景,且在本次运行或恢复运行时绝不重新排队阻塞的场景。联系人工的方式因状态而异,设置该状态的阶段会说明具体方式。