@tea-agent/loop-agent 0.35.1-beta.0 → 0.35.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +110 -108
- package/CHANGELOG.md +24 -26
- package/README.md +165 -165
- package/bin/agent-worker.js +0 -0
- package/bin/loop-agent.js +57 -21
- package/dist/application/task-lifecycle/advance.js +0 -1
- package/dist/build-stamp.json +6 -0
- package/dist/cli/program.js +2 -2
- package/dist/commands/cursor-prompt.js +6 -6
- package/dist/commands/init-upgrade.js +19 -351
- package/dist/commands/init.js +67 -14
- package/dist/commands/loop-benchmark.js +11 -11
- package/dist/commands/pi-reuse-benchmark.js +16 -16
- package/dist/commands/run-dag-progress.js +0 -14
- package/dist/commands/task-advance.js +3 -33
- package/dist/executors/dag-pi-executor.js +44 -0
- package/dist/shared/operator/capabilities.js +1 -38
- package/dist/shared/package-metadata.js +42 -0
- package/dist/sidecars/cursor-prompt/executor.js +1 -1
- package/dist/worker/console/chat/pi-runtime.js +25 -41
- package/dist/worker/console/chat/routes.js +4 -27
- package/dist/worker/console/operation-runner.js +0 -24
- package/dist/worker/console/operator-actions.js +0 -58
- package/dist/worker/console/static/assets/index-CvsQgALl.js +56 -0
- package/dist/worker/console/static/assets/{index-Dups4sSM.css → index-hJqCPs_g.css} +1 -1
- package/dist/worker/console/static/index.html +2 -2
- package/dist/worker/console/static-src/app/useRecoveryConsole.js +5 -0
- package/dist/worker/console/static-src/operator-chat/useChatSessions.js +2 -13
- package/dist/worker/console/static-src/operator-chat/useComposer.js +7 -30
- package/dist/worker/loop-agent/loop-agent-client.js +17 -3
- package/dist/worker/observability/read-model.js +20 -0
- package/dist/worker/observe/static/copy.js +67 -67
- package/dist/worker/observe/static/dag-layout.d.ts +36 -36
- package/dist/worker/observe/static/dom.js +220 -220
- package/dist/worker/observe/static/relations.js +133 -133
- package/dist/worker/observe/static/run-processing.js +148 -148
- package/dist/worker/observe/static/views/batch.js +227 -227
- package/dist/worker/observe/static/views/failures.js +143 -143
- package/dist/worker/observe/static/views/feature.js +492 -492
- package/dist/worker/observe/static/views/run.js +453 -453
- package/dist/worker/observe/static/views/shell.js +7 -7
- package/dist/worker/observe/static/views/timeline.js +163 -163
- package/dist/worker/preflight.js +2 -1
- package/dist/workflows/dag/backend-test-scenario-param.js +33 -23
- package/dist/workflows/dag/canvas-observer.js +275 -275
- package/dist/workflows/dag/contract-output-registry.js +14 -0
- package/dist/workflows/dag/contract-validator-registrations.js +8 -0
- package/dist/workflows/dag/dynamic-runtime/shared.js +9 -1
- package/dist/workflows/dag/frontend-implementation-contract.js +233 -39
- package/dist/workflows/dag/frontend-prewrite-gate.js +364 -61
- package/dist/workflows/dag/frontend-recovery-plan.js +73 -0
- package/dist/workflows/dag/frontend-recovery-root-manifest.js +123 -0
- package/dist/workflows/dag/frontend-recovery-run.js +539 -0
- package/dist/workflows/dag/frontend-repair.js +219 -18
- package/dist/workflows/dag/frontend-verification-trace.js +47 -32
- package/dist/workflows/dag/frontend-writer-recovery.js +106 -0
- package/dist/workflows/dag/frontend-writer-rollback.js +821 -0
- package/dist/workflows/dag/init-hybrid.js +41 -24
- package/dist/workflows/dag/node-execution.js +89 -0
- package/dist/workflows/dag/recovery-recommendation.js +58 -0
- package/dist/workflows/dag/runner.js +245 -11
- package/dist/workflows/dag/scheduler.js +257 -3
- package/dist/workflows/dag/types.js +130 -2
- package/docs/architecture/evolution.md +73 -73
- package/docs/architecture/system-overview.md +100 -100
- package/docs/architecture/worker-and-feature.md +122 -122
- package/docs/skills/README.md +7 -7
- package/docs/templates/adr.md +60 -60
- package/docs/templates/agent-dag-authority-surface-audit.prompt.md +94 -94
- package/docs/templates/agent-dag-decision-envelope.schema.json +213 -213
- package/docs/templates/agent-dag-decision-gate.prompt.md +246 -246
- package/docs/templates/agent-dag-process-supervisor.prompt.md +98 -98
- package/docs/templates/agent-dag-report.schema.json +473 -473
- package/docs/templates/agent-dag-review-verdict.prompt.md +68 -68
- package/docs/templates/backend-test-result.schema.json +99 -99
- package/docs/templates/evaluation/agents-map-slim-v1.md +87 -87
- package/docs/templates/evaluation/agents-map-verbose-v0.md +153 -153
- package/docs/templates/feature-spec.md +53 -53
- package/docs/templates/frontend-design-contract.md +42 -42
- package/docs/templates/frontend-eval/fixtures/failures/01-type-build-error.md +17 -17
- package/docs/templates/frontend-eval/fixtures/failures/02-unit-component-test-fail.md +16 -16
- package/docs/templates/frontend-eval/fixtures/failures/03-fixture-schema-drift.md +16 -16
- package/docs/templates/frontend-eval/fixtures/failures/04-missing-loading-empty-error-state.md +16 -16
- package/docs/templates/frontend-eval/fixtures/failures/05-forbidden-write-writeset-expansion.md +16 -16
- package/docs/templates/frontend-eval/fixtures/failures/06-unapproved-dependency-add.md +16 -16
- package/docs/templates/frontend-eval/fixtures/failures/07-mock-production-on.md +21 -21
- package/docs/templates/frontend-eval/fixtures/functional/01-simple-component-style.md +29 -29
- package/docs/templates/frontend-eval/fixtures/functional/02-form-validation.md +28 -28
- package/docs/templates/frontend-eval/fixtures/functional/03-list-detail-page.md +28 -28
- package/docs/templates/frontend-eval/fixtures/functional/04-api-mock.md +29 -29
- package/docs/templates/frontend-eval/fixtures/functional/05-permission-auth-gated-ui.md +27 -27
- package/docs/templates/frontend-eval/fixtures/functional/06-ssr-server-client-boundary.md +28 -28
- package/docs/templates/frontend-eval/fixtures/functional/07-shared-public-component-api.md +28 -28
- package/docs/templates/frontend-eval/fixtures/functional/08-pure-local-no-remote.md +27 -27
- package/docs/templates/frontend-eval/metrics.md +138 -138
- package/docs/templates/frontend-eval/smoke-targets.md +53 -53
- package/docs/templates/frontend-task-constraints.md +35 -35
- package/docs/templates/frontend-task-requirement.md +70 -70
- package/docs/templates/init-evolution-review.md +35 -35
- package/docs/templates/init-managed-agents.md +154 -156
- package/docs/templates/interactive-ui-round2-experiment.md +66 -66
- package/docs/templates/knowledge-graph-bootstrap-dag.json +118 -118
- package/docs/templates/knowledge-sync-dag.json +178 -178
- package/docs/templates/knowledge-sync-draft.schema.json +71 -71
- package/docs/templates/product-line/closeout.yaml +9 -9
- package/docs/templates/product-line/design.md +13 -13
- package/docs/templates/product-line/links.md +10 -10
- package/docs/templates/product-line/requirement.md +17 -17
- package/docs/templates/product-line/test-plan.md +7 -7
- package/docs/templates/project-start-checklist.md +9 -9
- package/docs/templates/qa-report.md +48 -48
- package/docs/templates/sprint-contract.md +29 -29
- package/docs/templates/worker-dogfood-evidence.md +80 -80
- package/docs/templates/worker-dogfood-setup.md +68 -68
- package/harness.json +2 -5
- package/package.json +2 -2
- package/scripts/kb-bootstrap-init-skeleton.sh +0 -0
- package/scripts/kb-graph-incremental-prepare.mjs +0 -0
- package/scripts/kb-graph-materialize.mjs +105 -105
- package/scripts/kb-graph-promote.mjs +164 -164
- package/scripts/kb-query.mjs +554 -554
- package/skills/agent-worker/SKILL.md +48 -48
- package/skills/agent-worker/references/agent-worker-operator.md +159 -159
- package/skills/ai-engineering-context/SKILL.md +48 -48
- package/skills/analyze-product-dependencies/scripts/test-validators.mjs +0 -0
- package/skills/analyze-product-dependencies/scripts/validate-api-documentation.mjs +0 -0
- package/skills/analyze-product-dependencies/scripts/validate-dependency-analysis.mjs +0 -0
- package/skills/analyze-product-dependencies/scripts/validate-product-requirement-input.mjs +0 -0
- package/skills/analyze-product-requirements/scripts/compute-source-identity.mjs +0 -0
- package/skills/analyze-product-requirements/scripts/test-validators.mjs +0 -0
- package/skills/analyze-product-requirements/scripts/validate-product-analysis.mjs +0 -0
- package/skills/analyze-product-requirements/scripts/validate-product-requirement.mjs +0 -0
- package/skills/analyze-product-requirements/scripts/validate-requirement-clarification.mjs +0 -0
- package/skills/browser-tools/browser-content.js +103 -103
- package/skills/browser-tools/browser-cookies.js +35 -35
- package/skills/browser-tools/browser-eval.js +53 -53
- package/skills/browser-tools/browser-hn-scraper.js +108 -108
- package/skills/browser-tools/browser-nav.js +44 -44
- package/skills/browser-tools/browser-pick.js +162 -162
- package/skills/browser-tools/browser-screenshot.js +34 -34
- package/skills/browser-tools/browser-start.js +86 -86
- package/skills/browser-tools/package-lock.json +2556 -2556
- package/skills/browser-tools/package.json +19 -19
- package/skills/code-review-core/SKILL.md +20 -20
- package/skills/codebase-scout/SKILL.md +19 -19
- package/skills/grill-me/SKILL.md +10 -10
- package/skills/local-jacoco-coverage/scripts/run-coverage-analysis.sh +0 -0
- package/skills/local-jacoco-coverage/scripts/start-jacoco-agent.sh +0 -0
- package/skills/loop-agent/SKILL.md +0 -1
- package/skills/loop-agent/references/command-reference.md +639 -641
- package/skills/loop-agent/references/docs-converge.md +126 -126
- package/skills/loop-agent/references/learned/README.md +21 -21
- package/skills/loop-agent/references/pi-prompt.md +23 -23
- package/skills/loop-agent/references/pi-subagent-assisted-mode.md +84 -84
- package/skills/playwright-cli/references/element-attributes.md +23 -23
- package/skills/playwright-cli/references/playwright-tests.md +39 -39
- package/skills/playwright-cli/references/request-mocking.md +87 -87
- package/skills/playwright-cli/references/running-code.md +241 -241
- package/skills/playwright-cli/references/session-management.md +225 -225
- package/skills/playwright-cli/references/storage-state.md +275 -275
- package/skills/playwright-cli/references/test-generation.md +433 -433
- package/skills/requesting-code-review/SKILL.md +101 -101
- package/skills/requesting-code-review/code-reviewer.md +168 -168
- package/skills/systematic-debugging/CREATION-LOG.md +119 -119
- package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -158
- package/skills/systematic-debugging/condition-based-waiting.md +115 -115
- package/skills/systematic-debugging/defense-in-depth.md +122 -122
- package/skills/systematic-debugging/find-polluter.sh +63 -63
- package/skills/systematic-debugging/root-cause-tracing.md +169 -169
- package/skills/systematic-debugging/test-academic.md +14 -14
- package/skills/systematic-debugging/test-pressure-1.md +58 -58
- package/skills/systematic-debugging/test-pressure-2.md +68 -68
- package/skills/systematic-debugging/test-pressure-3.md +69 -69
- package/skills/using-git-worktrees/SKILL.md +215 -215
- package/skills/verification-before-completion/SKILL.md +154 -154
- package/skills/webapp-testing/SKILL.md +19 -19
- package/dist/worker/console/operation-wait.js +0 -241
- package/dist/worker/console/static/assets/index-SjjjZnV3.js +0 -56
- package/dist/worker/console/static-src/operator-chat/slash-palette-nav.js +0 -141
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: agent-worker
|
|
3
|
-
description: Use when work involves agent-worker, Feature Packet, TaskSpec, Task Pool, Feature or batch orchestration, controller pinning, versioned self-hosting (自举) release trains, candidate takeover canaries (候选接棒验证), or worker failure recovery; use loop-agent instead for a single DAG implementation or DAG runtime/kernel repair.
|
|
4
|
-
references:
|
|
5
|
-
- path: references/agent-worker-operator.md
|
|
6
|
-
required: true
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Agent Worker Operator
|
|
10
|
-
|
|
11
|
-
当工作起点是 Feature Packet、TaskSpec、Task Pool、Worker batch 或 versioned self-hosting release train 时使用本 skill。它负责在单次 loop-agent DAG run 之外选择并监督工作。
|
|
12
|
-
|
|
13
|
-
## Compatibility / Operator Assist
|
|
14
|
-
|
|
15
|
-
- 主会话对本 skill 的定位是 **outer-loop operator**,不是实现 agent。
|
|
16
|
-
- **允许**:`agent-worker` / `loop-agent` CLI;只读 `pool doctor`、`observe`、status/report;冻结 controller identity;选择 Ready 工作与 recovery 命令。
|
|
17
|
-
- **禁止**:绕过 CLI 直接 Edit 业务实现;Worker/DAG 失败后主会话「救火改文件」。
|
|
18
|
-
- **失败时只允许**:保留 evidence → `task retry` / `task reconcile` / `pool mark-failed` / human gate → 再经 CLI 重跑;实现写入仍只经 published `loop-agent` DAG。
|
|
19
|
-
- **Official vs Compatibility**:`agent-worker console` 是 Official 本地控制面唯一启动入口(默认 repo=当前目录、port=8790;本地图形环境 listen 后默认打开系统浏览器,`--no-open` 禁止)。同进程提供 Operate + Inspect,Inspect 路径 `/inspect/#/...`;openCode 等主会话仍是 Compatibility Assist,二者**不是**同等保证。`observe serve` 已硬下线(`OBSERVE_SERVE_REMOVED` + exit 2,不监听端口);只读检视请用 Console `/inspect/`;`observe snapshot` 仍输出 GlobalSnapshot JSON。
|
|
20
|
-
|
|
21
|
-
## Route the Work
|
|
22
|
-
|
|
23
|
-
- 用 `agent-worker` 做 Feature validation 与 lifecycle 决策、Ready-task 选择、batch 推进、controller identity freeze、candidate takeover canary,以及失败 Worker run 的恢复。
|
|
24
|
-
- 对单个有界 DAG task、DAG diagnostics、node implementation,或 DAG runtime/kernel 修复,用 `loop-agent` CLI(仍禁止主会话直接写实现)。
|
|
25
|
-
- 不要让 DAG leaf node 递归启动 `agent-worker`;Worker 是 outer loop,不是另一个 node executor。
|
|
26
|
-
|
|
27
|
-
## Boundaries
|
|
28
|
-
|
|
29
|
-
- `agent-worker` 读取 Feature Packet 与 Task Pool facts,选择任务,冻结 controller identity,启动 Feature/batch lifecycle 命令,并收集 evidence。
|
|
30
|
-
- `loop-agent` 仍是 DAG executor,负责 Pi-only implementation nodes、write-set governance、skill snapshots 与 run facts。
|
|
31
|
-
- Controller identity 冻结驱动 batch 的 published package;loop-agent skill snapshot 则单独冻结注入单次 DAG run 的 instructions。
|
|
32
|
-
- 本 skill 不复制 command catalog。精确 flags 见 CLI help 与同级 `../loop-agent/references/command-reference.md`。
|
|
33
|
-
- 不要把本 skill 加入默认 DAG role skills;仅对 outer-loop operator 工作显式路由。
|
|
34
|
-
- 主会话 skills 文本**不能**替代 writeSet / controller identity 执法。
|
|
35
|
-
|
|
36
|
-
## Operator Flow
|
|
37
|
-
|
|
38
|
-
1. 校验 Feature Packet 与 TaskSpecs,再从 Task Pool facts 选择 Ready 工作,而不是从 chat state。Task Pool 身份是 `{ featureId, taskId }`,不是裸 taskId。
|
|
39
|
-
2. 在写入前解析并冻结目标 published controller;在 batch、task 与 run evidence 中保留 controller identity。
|
|
40
|
-
3. 将仓库**实现写入**委托给受治理的 loop-agent DAG nodes(子进程 CLI),并审查 task boundaries 与 write sets;主会话不手写实现。
|
|
41
|
-
4. 自举时保持 published version N 固定,由它维护 candidate N+1,再通过 deterministic isolated canary 证明 candidate takeover。
|
|
42
|
-
5. 失败时先保留原始 run record、evidence 与 failure handoff,再 CLI 重试或创建后续工作——**禁止**主会话直接改业务树收尾。
|
|
43
|
-
6. Failed task 重试使用 `agent-worker task retry <task-id> --feature-id <feature-id> --repo <repo> --reason <reason>`;跨 Feature 同名时禁止省略 `--feature-id`。
|
|
44
|
-
7. 升级或发现 legacy state 时先 `pool doctor`,再用 `pool migrate-state`(默认 dry-run;apply 需 `--owner` + `--reason`)。Observe 保持只读。
|
|
45
|
-
|
|
46
|
-
## References
|
|
47
|
-
|
|
48
|
-
- `references/agent-worker-operator.md`
|
|
1
|
+
---
|
|
2
|
+
name: agent-worker
|
|
3
|
+
description: Use when work involves agent-worker, Feature Packet, TaskSpec, Task Pool, Feature or batch orchestration, controller pinning, versioned self-hosting (自举) release trains, candidate takeover canaries (候选接棒验证), or worker failure recovery; use loop-agent instead for a single DAG implementation or DAG runtime/kernel repair.
|
|
4
|
+
references:
|
|
5
|
+
- path: references/agent-worker-operator.md
|
|
6
|
+
required: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Agent Worker Operator
|
|
10
|
+
|
|
11
|
+
当工作起点是 Feature Packet、TaskSpec、Task Pool、Worker batch 或 versioned self-hosting release train 时使用本 skill。它负责在单次 loop-agent DAG run 之外选择并监督工作。
|
|
12
|
+
|
|
13
|
+
## Compatibility / Operator Assist
|
|
14
|
+
|
|
15
|
+
- 主会话对本 skill 的定位是 **outer-loop operator**,不是实现 agent。
|
|
16
|
+
- **允许**:`agent-worker` / `loop-agent` CLI;只读 `pool doctor`、`observe`、status/report;冻结 controller identity;选择 Ready 工作与 recovery 命令。
|
|
17
|
+
- **禁止**:绕过 CLI 直接 Edit 业务实现;Worker/DAG 失败后主会话「救火改文件」。
|
|
18
|
+
- **失败时只允许**:保留 evidence → `task retry` / `task reconcile` / `pool mark-failed` / human gate → 再经 CLI 重跑;实现写入仍只经 published `loop-agent` DAG。
|
|
19
|
+
- **Official vs Compatibility**:`agent-worker console` 是 Official 本地控制面唯一启动入口(默认 repo=当前目录、port=8790;本地图形环境 listen 后默认打开系统浏览器,`--no-open` 禁止)。同进程提供 Operate + Inspect,Inspect 路径 `/inspect/#/...`;openCode 等主会话仍是 Compatibility Assist,二者**不是**同等保证。`observe serve` 已硬下线(`OBSERVE_SERVE_REMOVED` + exit 2,不监听端口);只读检视请用 Console `/inspect/`;`observe snapshot` 仍输出 GlobalSnapshot JSON。
|
|
20
|
+
|
|
21
|
+
## Route the Work
|
|
22
|
+
|
|
23
|
+
- 用 `agent-worker` 做 Feature validation 与 lifecycle 决策、Ready-task 选择、batch 推进、controller identity freeze、candidate takeover canary,以及失败 Worker run 的恢复。
|
|
24
|
+
- 对单个有界 DAG task、DAG diagnostics、node implementation,或 DAG runtime/kernel 修复,用 `loop-agent` CLI(仍禁止主会话直接写实现)。
|
|
25
|
+
- 不要让 DAG leaf node 递归启动 `agent-worker`;Worker 是 outer loop,不是另一个 node executor。
|
|
26
|
+
|
|
27
|
+
## Boundaries
|
|
28
|
+
|
|
29
|
+
- `agent-worker` 读取 Feature Packet 与 Task Pool facts,选择任务,冻结 controller identity,启动 Feature/batch lifecycle 命令,并收集 evidence。
|
|
30
|
+
- `loop-agent` 仍是 DAG executor,负责 Pi-only implementation nodes、write-set governance、skill snapshots 与 run facts。
|
|
31
|
+
- Controller identity 冻结驱动 batch 的 published package;loop-agent skill snapshot 则单独冻结注入单次 DAG run 的 instructions。
|
|
32
|
+
- 本 skill 不复制 command catalog。精确 flags 见 CLI help 与同级 `../loop-agent/references/command-reference.md`。
|
|
33
|
+
- 不要把本 skill 加入默认 DAG role skills;仅对 outer-loop operator 工作显式路由。
|
|
34
|
+
- 主会话 skills 文本**不能**替代 writeSet / controller identity 执法。
|
|
35
|
+
|
|
36
|
+
## Operator Flow
|
|
37
|
+
|
|
38
|
+
1. 校验 Feature Packet 与 TaskSpecs,再从 Task Pool facts 选择 Ready 工作,而不是从 chat state。Task Pool 身份是 `{ featureId, taskId }`,不是裸 taskId。
|
|
39
|
+
2. 在写入前解析并冻结目标 published controller;在 batch、task 与 run evidence 中保留 controller identity。
|
|
40
|
+
3. 将仓库**实现写入**委托给受治理的 loop-agent DAG nodes(子进程 CLI),并审查 task boundaries 与 write sets;主会话不手写实现。
|
|
41
|
+
4. 自举时保持 published version N 固定,由它维护 candidate N+1,再通过 deterministic isolated canary 证明 candidate takeover。
|
|
42
|
+
5. 失败时先保留原始 run record、evidence 与 failure handoff,再 CLI 重试或创建后续工作——**禁止**主会话直接改业务树收尾。
|
|
43
|
+
6. Failed task 重试使用 `agent-worker task retry <task-id> --feature-id <feature-id> --repo <repo> --reason <reason>`;跨 Feature 同名时禁止省略 `--feature-id`。
|
|
44
|
+
7. 升级或发现 legacy state 时先 `pool doctor`,再用 `pool migrate-state`(默认 dry-run;apply 需 `--owner` + `--reason`)。Observe 保持只读。
|
|
45
|
+
|
|
46
|
+
## References
|
|
47
|
+
|
|
48
|
+
- `references/agent-worker-operator.md`
|
|
@@ -1,159 +1,159 @@
|
|
|
1
|
-
# Agent Worker Operator Reference
|
|
2
|
-
|
|
3
|
-
`agent-worker` 是 Feature Packet、TaskSpec、Task Pool 与 self-hosting release-train 操作的 outer-loop adapter。它不是 DAG executor。
|
|
4
|
-
|
|
5
|
-
## Compatibility / Operator Assist
|
|
6
|
-
|
|
7
|
-
主会话使用本 reference 时是 **operator**,不是 implementer:
|
|
8
|
-
|
|
9
|
-
| 允许 | 禁止 |
|
|
10
|
-
| --- | --- |
|
|
11
|
-
| `agent-worker` / `loop-agent` CLI | 宿主 Edit/Write 直接改业务实现 |
|
|
12
|
-
| 只读 doctor / observe / report / status | Worker 或 DAG 失败后「救火改文件」 |
|
|
13
|
-
| 冻结 controller identity、选 Ready、retry/reconcile | 跳过 published controller 手写实现收尾 |
|
|
14
|
-
| human gate 记录 | 用聊天完成声明代替 shell / harness 证据 |
|
|
15
|
-
|
|
16
|
-
实现写入只通过 Worker spawn 的已发布 `loop-agent` DAG。skills 不能替代 writeSet 或 controller identity。
|
|
17
|
-
|
|
18
|
-
## Routing Boundary
|
|
19
|
-
|
|
20
|
-
当工作单元是 Feature lifecycle、一组 TaskSpecs、Ready queue、Worker batch 或 candidate takeover 时,选 `agent-worker`。当工作单元是单次受治理 DAG run、node implementation、DAG diagnosis 或 DAG runtime repair 时,选 `loop-agent` CLI。
|
|
21
|
-
|
|
22
|
-
Leaf DAG nodes 不得递归启动 `agent-worker`。Worker 负责 DAG 之外的 selection 与 lifecycle state;loop-agent 负责 DAG 内的 execution facts。主会话不得绕过二者直接实现。
|
|
23
|
-
|
|
24
|
-
## Responsibilities
|
|
25
|
-
|
|
26
|
-
- 在选工前校验 Feature Packet 与 TaskSpec 关系。
|
|
27
|
-
- 从 Task Pool facts 选择 Ready 工作,定义 batch scope,并选择 recovery actions。
|
|
28
|
-
- 在可写执行前解析并冻结 controller launch identity。
|
|
29
|
-
- 用 pinned controller identity 启动 loop-agent 命令。
|
|
30
|
-
- 收集 canonical run records、reports、closeout drafts 与 failure handoff evidence。
|
|
31
|
-
|
|
32
|
-
## Feature and Task Pool Flow
|
|
33
|
-
|
|
34
|
-
0. **新建 Packet(确定性脚手架,无模型)** — 包内自洽说明见下节 *Feature Packet Scaffold*;不依赖 website 文档站。
|
|
35
|
-
|
|
36
|
-
1. 阅读 Feature Packet,校验其 TaskSpecs 与 dependency graph。
|
|
37
|
-
2. 从持久化的 Task Pool state 推导下一步动作;不要从 chat history 重建 lifecycle state。canonical state 键是 `{ featureId, taskId }`(路径 `.harness/task-pool/states/<featureId>/<taskId>.json`)。
|
|
38
|
-
3. 对可写 batch 只冻结一次 controller,并将其 identity 传播到下游 evidence。
|
|
39
|
-
4. 将每个选中的 TaskSpec **经 CLI** 委托给 loop-agent,使用其结构化的 allowed / forbidden paths;主会话不代替 writer。
|
|
40
|
-
5. 根据 canonical run facts 刷新 Feature review、reports 与 Task Pool state。
|
|
41
|
-
6. 重试 Failed task(CLI only;禁止主会话手改实现):
|
|
42
|
-
|
|
43
|
-
```text
|
|
44
|
-
agent-worker task retry <task-id> --feature-id <feature-id> --repo <repo> --reason <reason>
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
跨 Feature 同名 Task 时省略 `--feature-id` 必须 fail-closed。
|
|
48
|
-
7. 诊断 / 迁移 legacy 扁平 state:
|
|
49
|
-
|
|
50
|
-
```text
|
|
51
|
-
agent-worker pool doctor --repo <repo> --json
|
|
52
|
-
agent-worker pool migrate-state --repo <repo> # dry-run
|
|
53
|
-
agent-worker pool migrate-state --repo <repo> --apply --owner <owner> --reason <reason>
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
doctor 只读;migrate 默认零写入,apply 失败全回滚且不改 JSONL。
|
|
57
|
-
8. Inspect(原 Observe)只读:仅推荐 `agent-worker console` 的 `/inspect/#/...`;`observe snapshot` 仍可用。`observe serve` 已下线(REMOVED / exit 2)。canonical Task 路由为 `/api/features/:featureId/tasks/:taskId` 与 `#/feature/:featureId/task/:taskId`。8790 `/api/health` 为 `OperatorSurfaceHealthV1`。
|
|
58
|
-
9. Official Console:`agent-worker console|doctor`(默认 loopback;可 `--host 0.0.0.0` / `--debug` / `--no-open`)。Recovery CTA 为 report/doctor/decision/resume/reconcile/regenerate/打开检视;无 Cancel、无主 CTA「直接改代码」。主会话 Compatibility Assist 不得替代 Console/CLI 执法。
|
|
59
|
-
|
|
60
|
-
## Feature Packet Scaffold
|
|
61
|
-
|
|
62
|
-
确定性入口:一个纯 BE/FE 需求 → 一个 `features/F-YYYY-NNN/` Packet → Task Pool 串行掘进。主会话只跑 CLI,不手写 TaskGraph。
|
|
63
|
-
|
|
64
|
-
### 边界(v1)
|
|
65
|
-
|
|
66
|
-
| 做 | 不做 |
|
|
67
|
-
| --- | --- |
|
|
68
|
-
| 模板 + 槽位确定性生成 | 一键 LLM 生成完整合同 |
|
|
69
|
-
| `profile: generic` 短图 | 默认 `fullstack-v1` / 复制 `F-2026-005` 全图 |
|
|
70
|
-
| 显式 `--verify-command` | 猜测项目测试命令 |
|
|
71
|
-
| 一需求一 Feature 目录 | 跨 Feature 自动 depends / 并行 Pool |
|
|
72
|
-
| 写盘前同源 `task validate-feature` | 读/写 `.harness/**` 或构造 `LoopAgentClient` |
|
|
73
|
-
|
|
74
|
-
### 三模板
|
|
75
|
-
|
|
76
|
-
| 模板 | 最小图 |
|
|
77
|
-
| --- | --- |
|
|
78
|
-
| `backend-only` | `BE-IMPL-001`(需 ≥1 `--be-path`) |
|
|
79
|
-
| `frontend-only` | `FE-IMPL-001`(需 ≥1 `--fe-path`) |
|
|
80
|
-
| `fe-with-api` | `CONTRACT-001` → `BE-IMPL-001` + `FE-IMPL-001`(consumers 仅实现节点;两端 path 都要) |
|
|
81
|
-
|
|
82
|
-
v1 **不**生成 `BE-TEST` / `FE-TEST` / `FINAL-VERIFY`。`feature_id` 强制 `F-YYYY-NNN`(≥3 位序号)。输出固定 `<repo>/features/<feature-id>`;无 `--force` / `--out`;已存在目录(含空目录)一律拒绝。
|
|
83
|
-
|
|
84
|
-
### 日常命令
|
|
85
|
-
|
|
86
|
-
```text
|
|
87
|
-
# 可选 dry-run:完整 parse/render/validate,零写入
|
|
88
|
-
agent-worker feature scaffold --repo <repo> --template backend-only \
|
|
89
|
-
--feature-id F-2026-010 --title "..." \
|
|
90
|
-
--be-path services/example/** \
|
|
91
|
-
--verify-command "npm run typecheck" --verify-command "npm test" \
|
|
92
|
-
--dry-run --json
|
|
93
|
-
|
|
94
|
-
agent-worker feature scaffold --repo <repo> --template frontend-only \
|
|
95
|
-
--feature-id F-2026-011 --title "..." \
|
|
96
|
-
--fe-path apps/web/src/settings/** \
|
|
97
|
-
--verify-command "npm test" --json
|
|
98
|
-
|
|
99
|
-
agent-worker feature scaffold --repo <repo> --template fe-with-api \
|
|
100
|
-
--feature-id F-2026-012 --title "..." \
|
|
101
|
-
--be-path services/api/** --fe-path apps/web/src/api/** \
|
|
102
|
-
[--contract-path docs/contracts/F-2026-012/api.md] \
|
|
103
|
-
--verify-command "npm test" --json
|
|
104
|
-
|
|
105
|
-
# 机器门禁 → 只读决策 → 串行掘进(固定 published controller)
|
|
106
|
-
agent-worker task validate-feature features/F-2026-010
|
|
107
|
-
agent-worker feature review --feature-dir features/F-2026-010 --repo <repo> --json
|
|
108
|
-
agent-worker feature run --feature-dir features/F-2026-010 --repo <repo> \
|
|
109
|
-
--loop-agent-bin <published> \
|
|
110
|
-
--expected-controller-version <version> \
|
|
111
|
-
--expected-controller-fingerprint sha256:<hex> \
|
|
112
|
-
--git-mode checkpoint --limit 1 --json
|
|
113
|
-
|
|
114
|
-
# Failed 只走官方恢复
|
|
115
|
-
agent-worker task retry <taskId> --feature-id F-2026-010 --repo <repo> --reason "..."
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
### Batch
|
|
119
|
-
|
|
120
|
-
```text
|
|
121
|
-
agent-worker feature scaffold --repo <repo> --batch <yaml-or-json> [--dry-run] [--json]
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
- 与单条 flags 互斥;每条必须显式 `feature_id` / `title` / `template` / `verify_commands`。
|
|
125
|
-
- 任一非法、冲突、目标已存在或写盘失败 → **整批零写入**(已提交目录回滚)。
|
|
126
|
-
- 示例形状(包内模板若存在):`docs/templates/product-line/feature-scaffold-batch.example.yaml`。
|
|
127
|
-
- 三模板生成快照(只读、防漂移,非 live Feature):`docs/templates/product-line/scaffold-samples/{backend-only,frontend-only,fe-with-api}/`。
|
|
128
|
-
|
|
129
|
-
### 多需求策略
|
|
130
|
-
|
|
131
|
-
1. 一个需求条目 → 一个 Feature 目录。
|
|
132
|
-
2. 多个 FE/BE 需求:batch scaffold 后 **串行** `feature run --limit 1`(先完 F-010 再 F-011)。
|
|
133
|
-
3. 后端可独立交付时:先 `backend-only`,再 `frontend-only`(跨 Feature 依赖只写文档,不做自动 depends_on)。
|
|
134
|
-
4. 同 Feature 内 BE+FE 原子交付用 `fe-with-api`。
|
|
135
|
-
|
|
136
|
-
### 内容与完成定义
|
|
137
|
-
|
|
138
|
-
- scaffold 只给骨架;`requirement.md` / AC 文案由人或后续「只填槽、不改 graph」skill 填充。
|
|
139
|
-
- v1 完成 = Packet 可 scaffold 且 Pool 可掘进到图内 Task **Done**;`verify-final` / Delivery / Closeout 为 v1.5(ADR 0007),非 scaffold 必经。
|
|
140
|
-
- 已知恢复限制:mid-run `SIGKILL` 可能导致 Pool `Running` 且 `runs.jsonl` 缺失时 reconcile 失败(FC-B);勿对 worker 随意 SIGKILL;Failed 后用 `task retry`。
|
|
141
|
-
|
|
142
|
-
## Versioned Self-Hosting
|
|
143
|
-
|
|
144
|
-
- Published version N 是整个 maintenance batch 的 controller;不要在任务中途切换。
|
|
145
|
-
- Candidate N+1 在 takeover verification 前先构建并安装到 isolated slot。
|
|
146
|
-
- Candidate 命令使用绝对 package entry identities,绝不使用新解析的 global PATH 命令。
|
|
147
|
-
- Controller identity 与 DAG skill snapshot 应对不同漂移风险:前者钉住 runtime/package content,后者钉住单次 run 的 resolved instructions。
|
|
148
|
-
- 失败的 canary 或 Worker run 仍是不可变 evidence。将 retries 与后续工作链接到它,而不是覆盖失败记录。
|
|
149
|
-
|
|
150
|
-
## Non Responsibilities
|
|
151
|
-
|
|
152
|
-
- 不要在此实现 node scheduling、write-set enforcement 或 model prompts。
|
|
153
|
-
- 不要在本 skill 中维护一份独立的精确 CLI flags 列表;以 CLI help 与 `../../loop-agent/references/command-reference.md` 为准。
|
|
154
|
-
- 不要把本 skill 路由为 DAG nodes 的默认 role skill。
|
|
155
|
-
- 不要把主会话定位成 Worker/DAG 失败后的实现后备通道。
|
|
156
|
-
|
|
157
|
-
## Candidate Canary Boundary
|
|
158
|
-
|
|
159
|
-
Deterministic candidate canary 将 candidate package 安装到 isolated temporary slot,通过该 slot 内的绝对 Node script paths 调用 package bins,避免 model calls,并输出 machine-readable evidence,覆盖 package-root containment、entry hashes、checks 与 verdict。
|
|
1
|
+
# Agent Worker Operator Reference
|
|
2
|
+
|
|
3
|
+
`agent-worker` 是 Feature Packet、TaskSpec、Task Pool 与 self-hosting release-train 操作的 outer-loop adapter。它不是 DAG executor。
|
|
4
|
+
|
|
5
|
+
## Compatibility / Operator Assist
|
|
6
|
+
|
|
7
|
+
主会话使用本 reference 时是 **operator**,不是 implementer:
|
|
8
|
+
|
|
9
|
+
| 允许 | 禁止 |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| `agent-worker` / `loop-agent` CLI | 宿主 Edit/Write 直接改业务实现 |
|
|
12
|
+
| 只读 doctor / observe / report / status | Worker 或 DAG 失败后「救火改文件」 |
|
|
13
|
+
| 冻结 controller identity、选 Ready、retry/reconcile | 跳过 published controller 手写实现收尾 |
|
|
14
|
+
| human gate 记录 | 用聊天完成声明代替 shell / harness 证据 |
|
|
15
|
+
|
|
16
|
+
实现写入只通过 Worker spawn 的已发布 `loop-agent` DAG。skills 不能替代 writeSet 或 controller identity。
|
|
17
|
+
|
|
18
|
+
## Routing Boundary
|
|
19
|
+
|
|
20
|
+
当工作单元是 Feature lifecycle、一组 TaskSpecs、Ready queue、Worker batch 或 candidate takeover 时,选 `agent-worker`。当工作单元是单次受治理 DAG run、node implementation、DAG diagnosis 或 DAG runtime repair 时,选 `loop-agent` CLI。
|
|
21
|
+
|
|
22
|
+
Leaf DAG nodes 不得递归启动 `agent-worker`。Worker 负责 DAG 之外的 selection 与 lifecycle state;loop-agent 负责 DAG 内的 execution facts。主会话不得绕过二者直接实现。
|
|
23
|
+
|
|
24
|
+
## Responsibilities
|
|
25
|
+
|
|
26
|
+
- 在选工前校验 Feature Packet 与 TaskSpec 关系。
|
|
27
|
+
- 从 Task Pool facts 选择 Ready 工作,定义 batch scope,并选择 recovery actions。
|
|
28
|
+
- 在可写执行前解析并冻结 controller launch identity。
|
|
29
|
+
- 用 pinned controller identity 启动 loop-agent 命令。
|
|
30
|
+
- 收集 canonical run records、reports、closeout drafts 与 failure handoff evidence。
|
|
31
|
+
|
|
32
|
+
## Feature and Task Pool Flow
|
|
33
|
+
|
|
34
|
+
0. **新建 Packet(确定性脚手架,无模型)** — 包内自洽说明见下节 *Feature Packet Scaffold*;不依赖 website 文档站。
|
|
35
|
+
|
|
36
|
+
1. 阅读 Feature Packet,校验其 TaskSpecs 与 dependency graph。
|
|
37
|
+
2. 从持久化的 Task Pool state 推导下一步动作;不要从 chat history 重建 lifecycle state。canonical state 键是 `{ featureId, taskId }`(路径 `.harness/task-pool/states/<featureId>/<taskId>.json`)。
|
|
38
|
+
3. 对可写 batch 只冻结一次 controller,并将其 identity 传播到下游 evidence。
|
|
39
|
+
4. 将每个选中的 TaskSpec **经 CLI** 委托给 loop-agent,使用其结构化的 allowed / forbidden paths;主会话不代替 writer。
|
|
40
|
+
5. 根据 canonical run facts 刷新 Feature review、reports 与 Task Pool state。
|
|
41
|
+
6. 重试 Failed task(CLI only;禁止主会话手改实现):
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
agent-worker task retry <task-id> --feature-id <feature-id> --repo <repo> --reason <reason>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
跨 Feature 同名 Task 时省略 `--feature-id` 必须 fail-closed。
|
|
48
|
+
7. 诊断 / 迁移 legacy 扁平 state:
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
agent-worker pool doctor --repo <repo> --json
|
|
52
|
+
agent-worker pool migrate-state --repo <repo> # dry-run
|
|
53
|
+
agent-worker pool migrate-state --repo <repo> --apply --owner <owner> --reason <reason>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
doctor 只读;migrate 默认零写入,apply 失败全回滚且不改 JSONL。
|
|
57
|
+
8. Inspect(原 Observe)只读:仅推荐 `agent-worker console` 的 `/inspect/#/...`;`observe snapshot` 仍可用。`observe serve` 已下线(REMOVED / exit 2)。canonical Task 路由为 `/api/features/:featureId/tasks/:taskId` 与 `#/feature/:featureId/task/:taskId`。8790 `/api/health` 为 `OperatorSurfaceHealthV1`。
|
|
58
|
+
9. Official Console:`agent-worker console|doctor`(默认 loopback;可 `--host 0.0.0.0` / `--debug` / `--no-open`)。Recovery CTA 为 report/doctor/decision/resume/reconcile/regenerate/打开检视;无 Cancel、无主 CTA「直接改代码」。主会话 Compatibility Assist 不得替代 Console/CLI 执法。
|
|
59
|
+
|
|
60
|
+
## Feature Packet Scaffold
|
|
61
|
+
|
|
62
|
+
确定性入口:一个纯 BE/FE 需求 → 一个 `features/F-YYYY-NNN/` Packet → Task Pool 串行掘进。主会话只跑 CLI,不手写 TaskGraph。
|
|
63
|
+
|
|
64
|
+
### 边界(v1)
|
|
65
|
+
|
|
66
|
+
| 做 | 不做 |
|
|
67
|
+
| --- | --- |
|
|
68
|
+
| 模板 + 槽位确定性生成 | 一键 LLM 生成完整合同 |
|
|
69
|
+
| `profile: generic` 短图 | 默认 `fullstack-v1` / 复制 `F-2026-005` 全图 |
|
|
70
|
+
| 显式 `--verify-command` | 猜测项目测试命令 |
|
|
71
|
+
| 一需求一 Feature 目录 | 跨 Feature 自动 depends / 并行 Pool |
|
|
72
|
+
| 写盘前同源 `task validate-feature` | 读/写 `.harness/**` 或构造 `LoopAgentClient` |
|
|
73
|
+
|
|
74
|
+
### 三模板
|
|
75
|
+
|
|
76
|
+
| 模板 | 最小图 |
|
|
77
|
+
| --- | --- |
|
|
78
|
+
| `backend-only` | `BE-IMPL-001`(需 ≥1 `--be-path`) |
|
|
79
|
+
| `frontend-only` | `FE-IMPL-001`(需 ≥1 `--fe-path`) |
|
|
80
|
+
| `fe-with-api` | `CONTRACT-001` → `BE-IMPL-001` + `FE-IMPL-001`(consumers 仅实现节点;两端 path 都要) |
|
|
81
|
+
|
|
82
|
+
v1 **不**生成 `BE-TEST` / `FE-TEST` / `FINAL-VERIFY`。`feature_id` 强制 `F-YYYY-NNN`(≥3 位序号)。输出固定 `<repo>/features/<feature-id>`;无 `--force` / `--out`;已存在目录(含空目录)一律拒绝。
|
|
83
|
+
|
|
84
|
+
### 日常命令
|
|
85
|
+
|
|
86
|
+
```text
|
|
87
|
+
# 可选 dry-run:完整 parse/render/validate,零写入
|
|
88
|
+
agent-worker feature scaffold --repo <repo> --template backend-only \
|
|
89
|
+
--feature-id F-2026-010 --title "..." \
|
|
90
|
+
--be-path services/example/** \
|
|
91
|
+
--verify-command "npm run typecheck" --verify-command "npm test" \
|
|
92
|
+
--dry-run --json
|
|
93
|
+
|
|
94
|
+
agent-worker feature scaffold --repo <repo> --template frontend-only \
|
|
95
|
+
--feature-id F-2026-011 --title "..." \
|
|
96
|
+
--fe-path apps/web/src/settings/** \
|
|
97
|
+
--verify-command "npm test" --json
|
|
98
|
+
|
|
99
|
+
agent-worker feature scaffold --repo <repo> --template fe-with-api \
|
|
100
|
+
--feature-id F-2026-012 --title "..." \
|
|
101
|
+
--be-path services/api/** --fe-path apps/web/src/api/** \
|
|
102
|
+
[--contract-path docs/contracts/F-2026-012/api.md] \
|
|
103
|
+
--verify-command "npm test" --json
|
|
104
|
+
|
|
105
|
+
# 机器门禁 → 只读决策 → 串行掘进(固定 published controller)
|
|
106
|
+
agent-worker task validate-feature features/F-2026-010
|
|
107
|
+
agent-worker feature review --feature-dir features/F-2026-010 --repo <repo> --json
|
|
108
|
+
agent-worker feature run --feature-dir features/F-2026-010 --repo <repo> \
|
|
109
|
+
--loop-agent-bin <published> \
|
|
110
|
+
--expected-controller-version <version> \
|
|
111
|
+
--expected-controller-fingerprint sha256:<hex> \
|
|
112
|
+
--git-mode checkpoint --limit 1 --json
|
|
113
|
+
|
|
114
|
+
# Failed 只走官方恢复
|
|
115
|
+
agent-worker task retry <taskId> --feature-id F-2026-010 --repo <repo> --reason "..."
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Batch
|
|
119
|
+
|
|
120
|
+
```text
|
|
121
|
+
agent-worker feature scaffold --repo <repo> --batch <yaml-or-json> [--dry-run] [--json]
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
- 与单条 flags 互斥;每条必须显式 `feature_id` / `title` / `template` / `verify_commands`。
|
|
125
|
+
- 任一非法、冲突、目标已存在或写盘失败 → **整批零写入**(已提交目录回滚)。
|
|
126
|
+
- 示例形状(包内模板若存在):`docs/templates/product-line/feature-scaffold-batch.example.yaml`。
|
|
127
|
+
- 三模板生成快照(只读、防漂移,非 live Feature):`docs/templates/product-line/scaffold-samples/{backend-only,frontend-only,fe-with-api}/`。
|
|
128
|
+
|
|
129
|
+
### 多需求策略
|
|
130
|
+
|
|
131
|
+
1. 一个需求条目 → 一个 Feature 目录。
|
|
132
|
+
2. 多个 FE/BE 需求:batch scaffold 后 **串行** `feature run --limit 1`(先完 F-010 再 F-011)。
|
|
133
|
+
3. 后端可独立交付时:先 `backend-only`,再 `frontend-only`(跨 Feature 依赖只写文档,不做自动 depends_on)。
|
|
134
|
+
4. 同 Feature 内 BE+FE 原子交付用 `fe-with-api`。
|
|
135
|
+
|
|
136
|
+
### 内容与完成定义
|
|
137
|
+
|
|
138
|
+
- scaffold 只给骨架;`requirement.md` / AC 文案由人或后续「只填槽、不改 graph」skill 填充。
|
|
139
|
+
- v1 完成 = Packet 可 scaffold 且 Pool 可掘进到图内 Task **Done**;`verify-final` / Delivery / Closeout 为 v1.5(ADR 0007),非 scaffold 必经。
|
|
140
|
+
- 已知恢复限制:mid-run `SIGKILL` 可能导致 Pool `Running` 且 `runs.jsonl` 缺失时 reconcile 失败(FC-B);勿对 worker 随意 SIGKILL;Failed 后用 `task retry`。
|
|
141
|
+
|
|
142
|
+
## Versioned Self-Hosting
|
|
143
|
+
|
|
144
|
+
- Published version N 是整个 maintenance batch 的 controller;不要在任务中途切换。
|
|
145
|
+
- Candidate N+1 在 takeover verification 前先构建并安装到 isolated slot。
|
|
146
|
+
- Candidate 命令使用绝对 package entry identities,绝不使用新解析的 global PATH 命令。
|
|
147
|
+
- Controller identity 与 DAG skill snapshot 应对不同漂移风险:前者钉住 runtime/package content,后者钉住单次 run 的 resolved instructions。
|
|
148
|
+
- 失败的 canary 或 Worker run 仍是不可变 evidence。将 retries 与后续工作链接到它,而不是覆盖失败记录。
|
|
149
|
+
|
|
150
|
+
## Non Responsibilities
|
|
151
|
+
|
|
152
|
+
- 不要在此实现 node scheduling、write-set enforcement 或 model prompts。
|
|
153
|
+
- 不要在本 skill 中维护一份独立的精确 CLI flags 列表;以 CLI help 与 `../../loop-agent/references/command-reference.md` 为准。
|
|
154
|
+
- 不要把本 skill 路由为 DAG nodes 的默认 role skill。
|
|
155
|
+
- 不要把主会话定位成 Worker/DAG 失败后的实现后备通道。
|
|
156
|
+
|
|
157
|
+
## Candidate Canary Boundary
|
|
158
|
+
|
|
159
|
+
Deterministic candidate canary 将 candidate package 安装到 isolated temporary slot,通过该 slot 内的绝对 Node script paths 调用 package bins,避免 model calls,并输出 machine-readable evidence,覆盖 package-root containment、entry hashes、checks 与 verdict。
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ai-engineering-context
|
|
3
|
-
description: 当 AI coding agent 启动 loop-agent 工作、准备 DAG 或 Loop context、委派 role-specific 节点,或决定 requirements、facts、evidence、handoff notes 应落何处时使用。
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# AI Engineering Context
|
|
7
|
-
|
|
8
|
-
Context 是工程 artifact,不是 chat 残留。须显式保留 requirements、role 边界、write authority、evidence 与 handoff facts。
|
|
9
|
-
|
|
10
|
-
## When to Use
|
|
11
|
-
|
|
12
|
-
在启动 task、DAG、workflow 或 Loop round;准备 role prompt;委派给 Cursor/Pi/shell/static executor;或处理 stale plan、冲突 requirements、缺失 evidence 时使用。
|
|
13
|
-
|
|
14
|
-
不要用于 private platform paths、personal memory、Google Drive 规则,或替代 task skills。
|
|
15
|
-
|
|
16
|
-
## Context Priority
|
|
17
|
-
|
|
18
|
-
按以下顺序优先采信 facts:最新 user instruction;task source/contract;DAG/Loop artifacts;ai_workspace/loop-agent/plans/ADRs;code/tests;chat history 仅作 hint。
|
|
19
|
-
|
|
20
|
-
若 sources 冲突,停止并点明冲突。
|
|
21
|
-
|
|
22
|
-
## Role Boundaries
|
|
23
|
-
|
|
24
|
-
- Planner:contract、DAG shape、write boundary、verification plan;不做 implementation edits。
|
|
25
|
-
- Scout:code/test/doc/artifact facts;不写 repo。
|
|
26
|
-
- Implementer:在 writeSet 内做 bounded changes;不扩大 scope 或宣称完成。
|
|
27
|
-
- Reviewer:bugs、regressions、missing tests、risk;除非被指派,否则不重写。
|
|
28
|
-
- Verifier:command evidence、reproduction、failure category;model judgment 不是 proof。
|
|
29
|
-
- Supervisor:gates、escalation、repair scope;不绕过 write-guard 或 human-gate。
|
|
30
|
-
- Closeout:evidence、risks、next steps;不隐藏 failures。
|
|
31
|
-
|
|
32
|
-
## Prompt Contract
|
|
33
|
-
|
|
34
|
-
每个 delegated node prompt 应包含:objective、task id、role、executor、allowed paths、forbidden paths、writeSet、upstream artifact refs、concise excerpts、output contract、expected evidence、non-goals、stop conditions。
|
|
35
|
-
|
|
36
|
-
read-only node 只能在 node output 返回 findings。不得在 repo 中创建 scratch files。
|
|
37
|
-
|
|
38
|
-
## Persistence Rules
|
|
39
|
-
|
|
40
|
-
Requirements 与 constraints 写入 task `source/`。Execution state 与 node artifacts 写入 `.harness/`。Durable plans、reports、decisions 写入 `ai_workspace/loop-agent/`。可复用 process guidance 写入 `.agents/skills/`。Chat 仅 transient。
|
|
41
|
-
|
|
42
|
-
## Failure Handling
|
|
43
|
-
|
|
44
|
-
- Missing context:运行 scout 或读取 durable source。
|
|
45
|
-
- Ambiguous requirement:implementation 前更新 contract。
|
|
46
|
-
- Verification failure:改 code 前先 diagnose cause。
|
|
47
|
-
- Missing skill instructions:视为 context defect;不要假设 hidden behavior。
|
|
48
|
-
- Missing fresh verification:不要 close out。
|
|
1
|
+
---
|
|
2
|
+
name: ai-engineering-context
|
|
3
|
+
description: 当 AI coding agent 启动 loop-agent 工作、准备 DAG 或 Loop context、委派 role-specific 节点,或决定 requirements、facts、evidence、handoff notes 应落何处时使用。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# AI Engineering Context
|
|
7
|
+
|
|
8
|
+
Context 是工程 artifact,不是 chat 残留。须显式保留 requirements、role 边界、write authority、evidence 与 handoff facts。
|
|
9
|
+
|
|
10
|
+
## When to Use
|
|
11
|
+
|
|
12
|
+
在启动 task、DAG、workflow 或 Loop round;准备 role prompt;委派给 Cursor/Pi/shell/static executor;或处理 stale plan、冲突 requirements、缺失 evidence 时使用。
|
|
13
|
+
|
|
14
|
+
不要用于 private platform paths、personal memory、Google Drive 规则,或替代 task skills。
|
|
15
|
+
|
|
16
|
+
## Context Priority
|
|
17
|
+
|
|
18
|
+
按以下顺序优先采信 facts:最新 user instruction;task source/contract;DAG/Loop artifacts;ai_workspace/loop-agent/plans/ADRs;code/tests;chat history 仅作 hint。
|
|
19
|
+
|
|
20
|
+
若 sources 冲突,停止并点明冲突。
|
|
21
|
+
|
|
22
|
+
## Role Boundaries
|
|
23
|
+
|
|
24
|
+
- Planner:contract、DAG shape、write boundary、verification plan;不做 implementation edits。
|
|
25
|
+
- Scout:code/test/doc/artifact facts;不写 repo。
|
|
26
|
+
- Implementer:在 writeSet 内做 bounded changes;不扩大 scope 或宣称完成。
|
|
27
|
+
- Reviewer:bugs、regressions、missing tests、risk;除非被指派,否则不重写。
|
|
28
|
+
- Verifier:command evidence、reproduction、failure category;model judgment 不是 proof。
|
|
29
|
+
- Supervisor:gates、escalation、repair scope;不绕过 write-guard 或 human-gate。
|
|
30
|
+
- Closeout:evidence、risks、next steps;不隐藏 failures。
|
|
31
|
+
|
|
32
|
+
## Prompt Contract
|
|
33
|
+
|
|
34
|
+
每个 delegated node prompt 应包含:objective、task id、role、executor、allowed paths、forbidden paths、writeSet、upstream artifact refs、concise excerpts、output contract、expected evidence、non-goals、stop conditions。
|
|
35
|
+
|
|
36
|
+
read-only node 只能在 node output 返回 findings。不得在 repo 中创建 scratch files。
|
|
37
|
+
|
|
38
|
+
## Persistence Rules
|
|
39
|
+
|
|
40
|
+
Requirements 与 constraints 写入 task `source/`。Execution state 与 node artifacts 写入 `.harness/`。Durable plans、reports、decisions 写入 `ai_workspace/loop-agent/`。可复用 process guidance 写入 `.agents/skills/`。Chat 仅 transient。
|
|
41
|
+
|
|
42
|
+
## Failure Handling
|
|
43
|
+
|
|
44
|
+
- Missing context:运行 scout 或读取 durable source。
|
|
45
|
+
- Ambiguous requirement:implementation 前更新 contract。
|
|
46
|
+
- Verification failure:改 code 前先 diagnose cause。
|
|
47
|
+
- Missing skill instructions:视为 context defect;不要假设 hidden behavior。
|
|
48
|
+
- Missing fresh verification:不要 close out。
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|