250 lines
13 KiB
Markdown
250 lines
13 KiB
Markdown
# Continuous Task Handoff
|
||
|
||
This file is the bounded continuation entrypoint for the Blender Web execution
|
||
queue. It is a procedure, not a second task pointer. The only authoritative
|
||
pointer is `docs/EXECUTION_QUEUE.md` plus the parent manifest named there.
|
||
|
||
The phrase below starts continuous mode. Continuous mode is a loop of bounded
|
||
task iterations: one task is completed and handed off at a time, then the next
|
||
iteration starts from a fresh compact context without waiting for another user
|
||
message. The loop stops only at an explicit stop condition described below.
|
||
|
||
## Copyable Resume Prompt
|
||
|
||
Use the following prompt when continuous execution is needed. It is the
|
||
copyable, end-to-end command for bounded implementation, verification, handoff,
|
||
and (when authorized) repository push:
|
||
|
||
```text
|
||
按 nextTask.md 接续执行。
|
||
|
||
这是执行命令,不是计划或状态咨询。进入 CONTINUOUS 模式,每次只完成一个有边界的任务,成功交接后立即从新 parent manifest 继续,直到全部任务完成、队列闭合或遇到真实停止条件。
|
||
|
||
1. 先读取 `AGENTS.md` 和 `docs/EXECUTION_QUEUE.md`,然后运行:
|
||
`node tools/web/print-task-context.mjs`
|
||
`node tools/web/check-task-context.mjs`
|
||
2. 当前任务必须等于队列中 parent manifest 的 `nextTask`。只读取当前任务卡、parent manifest/status 和 task-context 列出的最小输入;禁止默认读取完整历史计划、全部 `docs/status` 或完整 6900 条目详情。
|
||
3. 每次只执行当前任务卡规定的一个行为或一个独立证据变化。`M*-GAP-*` 只作回归覆盖,`WBV2-*` 才负责生产能力;只使用 Chromium,禁止 Firefox/WebKit。
|
||
4. 绝不重复工作:
|
||
- 先比较 source hash、behavior hash、dedupe key 和已有 manifest;相同证据直接复用;
|
||
- 已有相同行为的 Blender/WASM/Chromium 运行不得再次执行;
|
||
- 6900 条目按 capability family 和唯一行为批次推进,不逐条重复验证;
|
||
- 已完成条目只作回归引用;代表性回执不能升级为全家族完成。
|
||
5. 新行为必须有真实源码或 WebEngine Main 路径、Chromium 生产测试、malformed/unsupported 失败边界、事务或 undo/redo、save/reopen,以及第二次相同运行的确定性证据。
|
||
6. 只有一对一且 hash-bound 的完整证据才能写入 completion overlay。原始 P0 inventory 和历史 provenance 保持只读;`effective completed/pending` 只能由 overlay 计算,不能篡改原始 6900/6618 基线。
|
||
7. 长输出写入 `tests/golden/<task>/command.log`,交互只报告退出码、短尾部、构件路径和 SHA-256。
|
||
8. 任务成功后运行:
|
||
`node tools/web/check-task-context.mjs --task <task-id> --write`
|
||
`node tools/web/check-context-governance.mjs`
|
||
`node tools/web/check-execution-control-plane.mjs`
|
||
`node tools/web/check-v2-task-index.mjs`
|
||
`node tools/web/check-v2-handoff.mjs`
|
||
`npm --prefix web run test:context-governance`
|
||
`npm --prefix web run test:task-context`
|
||
`npm --prefix web run typecheck`
|
||
`npm --prefix web run lint`
|
||
`git diff --check`
|
||
9. 只有所有门禁、构件 hash 和 manifest 引用通过后,才使用仓库生成器更新 index/catalog/card、提交并推送现有 `origin/main`。凭据只能交互输入,不能写入文件、URL、日志或提示词;推送后核对 `HEAD == origin/main`。
|
||
10. 成功交接后丢弃旧任务上下文,重新运行 `print-task-context`,只携带新的 parent manifest/status,不能等待下一条用户消息。
|
||
11. 任一命令失败、输入缺失、预算超限、hash 漂移、治理失败、队列不一致、环境不可用或状态不明时,保持 `in_progress`/`blocked`,不得推进 `nextTask`,不得伪造完成或重试未知的状态改变命令,并报告精确阻塞证据。
|
||
12. 每轮结束报告:已完成任务、当前任务、`nextTask`、验证退出码、effective inventory、原始 inventory、构件 hash、提交/推送状态和剩余阻塞。
|
||
```
|
||
|
||
## Resume Command
|
||
|
||
When the user says:
|
||
|
||
```text
|
||
按 nextTask.md 接续执行
|
||
```
|
||
|
||
the phrase is an execution command, not a request for a plan or status report.
|
||
Resume implementation autonomously from the repository checkpoint. Do not
|
||
ask for confirmation, wait for a second message, or stop at a proposal while
|
||
the queue and parent manifest are valid. A wording variant that quotes the
|
||
same exact phrase has the same meaning; unrelated requests for explanation,
|
||
review, or diagnosis do not activate this procedure.
|
||
|
||
“连续” means:
|
||
|
||
1. Start the task named by the current `docs/EXECUTION_QUEUE.md` pointer.
|
||
2. Finish or safely checkpoint that one task.
|
||
3. Write its manifest/status/task-context handoff and generate the next task
|
||
pointer through repository tools.
|
||
4. If the handoff is successful, immediately start the next iteration from the
|
||
new pointer and a fresh compact context package. No additional user message
|
||
is required.
|
||
|
||
There is no intentional idle step between valid handoffs. Each iteration still
|
||
has exactly one numbered task and must not carry the previous task's full
|
||
transcript, logs, or source context. A continuous run may contain many such
|
||
iterations, but it must stop at the first failed gate or explicit stop request.
|
||
|
||
## Activation Contract
|
||
|
||
The phrase activates implementation only when the queue is internally
|
||
consistent. Before editing, the agent must prove all of the following:
|
||
|
||
- `print-task-context` reports the queue's current task and its parent
|
||
manifest.
|
||
- `check-task-context` passes without `--write`.
|
||
- The queue task exactly equals the parent manifest's `nextTask`.
|
||
- The task card, production entrypoint, and focused test entrypoint exist.
|
||
|
||
If any proof fails, preserve the queue and report the checkpoint blocker. Do
|
||
not infer a task number from `nextTask.md`, historical status files, or a
|
||
previous conversation.
|
||
|
||
## Fresh-Context Boundary
|
||
|
||
The boundary is per task iteration, not per user message. At the end of a task,
|
||
the machine handoff is the checkpoint; the next iteration must begin from a
|
||
fresh compact context package instead of carrying the previous transcript,
|
||
logs, or source files forward. This keeps remote compact/reconnect payloads
|
||
bounded while allowing a continuous run to advance through multiple tasks.
|
||
|
||
The handoff is durable only after the manifest, status, task-context, artifact
|
||
hashes, and governance checks agree. A task that fails, is cancelled, exceeds
|
||
budget, lacks its environment, or has hash drift remains `in_progress` or
|
||
`blocked`; the next invocation resumes that same task instead of advancing.
|
||
|
||
## Stop Conditions
|
||
|
||
Continuous mode must stop immediately when any of these conditions occurs:
|
||
|
||
- a focused command, exit criterion, governance check, or hash check fails;
|
||
- the queue, parent manifest, task card, task index, or `nextTask` pointer is
|
||
inconsistent;
|
||
- the environment is missing, the task is cancelled, or a context/size budget
|
||
would be exceeded;
|
||
- a stream disconnect, remote compact error, or other transport error makes the
|
||
result of a state-changing command unknown;
|
||
- the queue has no next task or reaches its declared closure gate;
|
||
- the user explicitly asks to stop or pause.
|
||
|
||
On a stop, preserve the current checkpoint, do not start another task, and
|
||
report the exact task, state, failed gate or stop reason, and evidence paths.
|
||
Only a successful handoff starts another iteration. There is no retry loop for
|
||
an unknown or failed result.
|
||
|
||
For every task, run this exact order:
|
||
|
||
1. Read `docs/EXECUTION_QUEUE.md`.
|
||
2. Run `node tools/web/print-task-context.mjs` and read only its required files,
|
||
task-card inputs, and named production/test entrypoints.
|
||
3. Run `node tools/web/check-task-context.mjs` before any edit. Stop if the
|
||
queue task is not exactly the parent manifest's `nextTask`.
|
||
4. Implement and verify only that task card's one behavior/evidence slice.
|
||
5. Keep command output out of the conversation. For output that may be long,
|
||
write `> tests/golden/<task>/command.log 2>&1`, record the exit code, and
|
||
report only a short tail plus the artifact paths and SHA-256 values.
|
||
6. Only after all exit criteria pass, run:
|
||
|
||
```bash
|
||
node tools/web/check-task-context.mjs --task <task-id> --write
|
||
```
|
||
|
||
7. Write the report, status, manifest, and task context. A failed command,
|
||
missing environment, or hash drift keeps the task `in_progress`/`blocked`;
|
||
never advance the queue in that state.
|
||
8. Re-run the governance checks. If they pass, continue with the next
|
||
iteration from a fresh context package; do not start the next task if any
|
||
gate fails.
|
||
|
||
The normal post-handoff checks are:
|
||
|
||
```bash
|
||
node tools/web/check-blender-next-task-plan.mjs
|
||
node tools/web/check-task-index.mjs
|
||
npm --prefix web run test:task-context
|
||
npm --prefix web run test:context-governance
|
||
node tools/web/check-context-governance.mjs
|
||
git diff --check
|
||
```
|
||
|
||
Do not manually edit `nextTask`, task-index offsets, catalog lines, or parent
|
||
evidence. Generate them through the repository tools and update the queue only
|
||
to the newly completed manifest pointer.
|
||
|
||
## Transport/Compaction Recovery
|
||
|
||
`stream disconnected`, `error decoding response body`, or a remote compact
|
||
failure means that the request outcome is unknown. It is not evidence that the
|
||
task failed or succeeded. Do not blindly repeat a generator, build, save, or
|
||
queue-writing command.
|
||
|
||
Recover with read-only checks first:
|
||
|
||
```bash
|
||
node tools/web/print-task-context.mjs
|
||
node tools/web/check-task-context.mjs
|
||
git status --short
|
||
```
|
||
|
||
Then compare the current task's manifest, status, task-context, and artifact
|
||
hashes. Continue from the first missing handoff step; if every criterion is
|
||
already recorded, run only the missing governance/check command. The failed
|
||
request's outcome is unknown, so do not claim success from the error message.
|
||
Resume the request at most once. If the resumed request disconnects again,
|
||
leave the task `in_progress`/`blocked`, preserve all files, and report the exact
|
||
command and checkpoint state rather than starting a retry loop.
|
||
|
||
If the client supplies a session id, `codex resume <session-id>` may be used,
|
||
but the resumed turn must still reread the queue and print a fresh context. Do
|
||
not paste the old transcript or full logs into the new request. Without a
|
||
session id, start a new turn with this file and the repository checkpoint.
|
||
The user does not need to repeat the failed command: the next invocation of
|
||
the exact resume phrase performs the read-only recovery checks first and
|
||
continues from the first missing handoff step.
|
||
|
||
The recovery request must not include the old transcript or full command logs.
|
||
It re-enters continuous mode only after the read-only checkpoint proves which
|
||
handoff step is missing:
|
||
|
||
```text
|
||
按 nextTask.md 接续执行。
|
||
|
||
上一请求发生 stream disconnected / remote compact failure。先只读运行
|
||
node tools/web/print-task-context.mjs、node tools/web/check-task-context.mjs
|
||
和 git status --short;比较当前 task 的 manifest、status、task-context 与
|
||
artifact SHA-256,只从第一个缺失的交接步骤继续。不要重复任何未知结果的
|
||
生成、构建、保存或队列写入命令;恢复当前 task 后进入 CONTINUOUS mode,
|
||
仅在完整 handoff 成功时自动开始下一个 iteration;再次发生同类错误时
|
||
立即停止并报告 checkpoint,不要继续重试。
|
||
```
|
||
|
||
## Current Handoff Snapshot
|
||
|
||
Recorded: 2026-08-22 America/New_York
|
||
|
||
| Field | Value |
|
||
| --- | --- |
|
||
| Current task when this file was written | `WBV2-P24-001` |
|
||
| Current task state | `in_progress` |
|
||
| Parent manifest | `tests/golden/WBV2-P24-000/manifest.json` |
|
||
| Current task card | `docs/tasks/WBV2-P24-001.md` |
|
||
| Current task-context nextTask | `WBV2-P24-002` |
|
||
| Focused command | `node tools/web/generate-wbv2-move-selection.mjs --write` |
|
||
|
||
The snapshot is informational and may become stale. On every resume, the queue,
|
||
parent manifest, and fresh `print-task-context` output win. Never infer a task
|
||
number from this table or from historical status files.
|
||
|
||
## Non-Negotiable Boundaries
|
||
|
||
- Chromium is the only permitted browser runtime; never run Firefox or WebKit.
|
||
- Do not read full historical plans, all status logs, or the full gap plan by
|
||
default.
|
||
- Keep unrelated user changes. Never use `git reset --hard` or `git checkout --`.
|
||
- Keep long-running sessions alive and poll them to completion.
|
||
- If the same blocker persists through three safe investigation attempts, leave
|
||
the task unadvanced and report the blocker, exit codes, evidence state, and
|
||
required user decision.
|
||
|
||
## Completion Report
|
||
|
||
Report completed task IDs, the current queue pointer, parent manifest, focused
|
||
commands and exit codes, generated evidence paths, SHA-256/governance results,
|
||
remaining uncommitted task files, and any blocker. Do not include full command
|
||
logs or the previous conversation transcript.
|