@tea-agent/loop-agent 0.26.0 → 0.26.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/CHANGELOG.md +1056 -1020
- package/README.md +8 -3
- package/bin/loop-agent.js +21 -21
- package/dist/application/dag/generate-task-dag.js +33 -0
- package/dist/cli/command-definitions.js +25 -10
- package/dist/cli/help.js +4 -3
- package/dist/cli/program.js +43 -17
- package/dist/commands/cursor-prompt.js +6 -6
- package/dist/commands/import-prd.js +7 -2
- package/dist/commands/init.js +7 -5
- package/dist/commands/loop-benchmark.js +11 -11
- package/dist/commands/pi-reuse-benchmark.js +16 -16
- package/dist/commands/task-source-prepare.js +474 -0
- package/dist/executors/dag-pi-executor.js +40 -5
- package/dist/executors/shell-executor.js +111 -0
- package/dist/executors/shell-presets.js +12 -4
- package/dist/executors/shell-write-guard.js +161 -25
- package/dist/sidecars/cursor-prompt/executor.js +1 -1
- package/dist/task/config-types.js +6 -0
- package/dist/task/contract/constants.js +1 -0
- package/dist/task/contract/project.js +8 -0
- package/dist/task/contract/schema.js +1 -0
- package/dist/task/frontend-preflight.js +131 -0
- package/dist/task/runtime.js +2 -4
- package/dist/task/source-prepare/build-draft.js +224 -0
- package/dist/task/source-prepare/completeness.js +195 -0
- package/dist/task/source-prepare/index.js +7 -0
- package/dist/task/source-prepare/parse-intent.js +373 -0
- package/dist/task/source-prepare/path-policy.js +197 -0
- package/dist/task/source-prepare/prepare.js +506 -0
- package/dist/task/source-prepare/reference-integrity.js +274 -0
- package/dist/task/source-prepare/types.js +7 -0
- package/dist/worker/observability/read-model.js +134 -0
- package/dist/worker/observe/static/copy.js +67 -67
- package/dist/worker/observe/static/dag-layout.d.ts +31 -31
- package/dist/worker/observe/static/dag-layout.js +83 -83
- package/dist/worker/observe/static/dom.js +220 -220
- package/dist/worker/observe/static/relations.js +133 -133
- package/dist/worker/observe/static/router.js +93 -93
- package/dist/worker/observe/static/run-processing.js +148 -148
- package/dist/worker/observe/static/state.js +61 -0
- package/dist/worker/observe/static/styles.css +8 -0
- package/dist/worker/observe/static/views/batch.js +227 -227
- package/dist/worker/observe/static/views/dag-graph.js +248 -172
- package/dist/worker/observe/static/views/dag-inspector.js +374 -157
- package/dist/worker/observe/static/views/dag.js +4 -11
- 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/workflows/dag/backend-test-pytest-collection.js +277 -0
- package/dist/workflows/dag/canvas-observer.js +275 -275
- package/dist/workflows/dag/convergence/controller.js +110 -21
- package/dist/workflows/dag/frontend-implementation-contract.js +218 -17
- package/dist/workflows/dag/frontend-review-context.js +7 -1
- package/dist/workflows/dag/frontend-verification-trace.js +14 -3
- package/dist/workflows/dag/frontend-worktree-diff.js +14 -3
- package/dist/workflows/dag/init-hybrid.js +96 -34
- package/dist/workflows/dag/output-protocol.js +180 -7
- package/dist/workflows/dag/runner.js +141 -52
- package/dist/workflows/dag/types.js +4 -0
- package/dist/workflows/dag/validate.js +3 -2
- 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-dag.json +100 -8
- package/docs/templates/backend-test-result.schema.json +99 -99
- 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 +10 -5
- 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/production-readiness-checklist.md +57 -57
- 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/package.json +1 -1
- package/scripts/kb-bootstrap-init-skeleton.sh +0 -0
- package/scripts/kb-graph-incremental-prepare.mjs +386 -386
- 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/ai-engineering-context/SKILL.md +48 -48
- package/skills/analyze-product-dependencies/SKILL.md +67 -67
- package/skills/analyze-product-dependencies/agents/openai.yaml +4 -4
- package/skills/analyze-product-dependencies/references/api-documentation-schema.md +30 -30
- package/skills/analyze-product-dependencies/references/dependency-analysis-schema.md +28 -28
- package/skills/analyze-product-dependencies/references/example.md +76 -76
- package/skills/analyze-product-dependencies/references/forward-test-cases.md +35 -35
- package/skills/analyze-product-dependencies/references/input-contract.md +11 -11
- package/skills/analyze-product-dependencies/references/scouting-rules.md +61 -61
- package/skills/analyze-product-dependencies/scripts/test-validators.mjs +267 -267
- package/skills/analyze-product-dependencies/scripts/validate-api-documentation.mjs +101 -101
- package/skills/analyze-product-dependencies/scripts/validate-dependency-analysis.mjs +142 -142
- package/skills/analyze-product-dependencies/scripts/validate-product-requirement-input.mjs +76 -76
- package/skills/analyze-product-dependencies/scripts/validation-helpers.mjs +146 -146
- package/skills/analyze-product-requirements/SKILL.md +90 -90
- package/skills/analyze-product-requirements/agents/openai.yaml +4 -4
- package/skills/analyze-product-requirements/references/acceptance-criteria.md +91 -91
- package/skills/analyze-product-requirements/references/clarification-and-knowledge.md +56 -56
- package/skills/analyze-product-requirements/references/example.md +86 -86
- package/skills/analyze-product-requirements/references/forward-test-cases.md +66 -66
- package/skills/analyze-product-requirements/references/product-analysis-schema.md +32 -32
- package/skills/analyze-product-requirements/references/product-requirement-schema.md +33 -33
- package/skills/analyze-product-requirements/references/requirement-clarification-schema.md +35 -35
- package/skills/analyze-product-requirements/scripts/test-validators.mjs +193 -193
- package/skills/analyze-product-requirements/scripts/validate-product-analysis.mjs +69 -69
- package/skills/analyze-product-requirements/scripts/validate-product-requirement.mjs +97 -97
- package/skills/analyze-product-requirements/scripts/validate-requirement-clarification.mjs +98 -98
- package/skills/analyze-product-requirements/scripts/validation-helpers.mjs +156 -156
- 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/loop-agent/SKILL.md +5 -2
- package/skills/loop-agent/references/README.md +67 -67
- package/skills/loop-agent/references/command-reference.md +17 -15
- package/skills/loop-agent/references/docs-converge.md +126 -126
- package/skills/loop-agent/references/harness-policy.md +3 -4
- package/skills/loop-agent/references/hybrid-dag.md +1 -1
- package/skills/loop-agent/references/learned/README.md +21 -21
- package/skills/loop-agent/references/long-running-loop.md +57 -57
- package/skills/loop-agent/references/one-shot-runs.md +85 -85
- package/skills/loop-agent/references/pi-prompt.md +23 -23
- package/skills/loop-agent/references/pi-subagent-assisted-mode.md +84 -84
- package/skills/loop-agent/references/post-implementation-and-patterns.md +1 -1
- package/skills/loop-agent/references/source-and-plan-practice.md +3 -2
- package/skills/loop-agent/references/task-workflow.md +7 -5
- package/skills/playwright-cli/SKILL.md +420 -420
- 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/playwright-cli/references/tracing.md +139 -139
- package/skills/playwright-cli/references/video-recording.md +143 -143
- 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
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "browser-tools",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"type": "module",
|
|
5
|
-
"description": "Minimal CDP tools for collaborative site exploration",
|
|
6
|
-
"author": "Mario Zechner",
|
|
7
|
-
"license": "MIT",
|
|
8
|
-
"dependencies": {
|
|
9
|
-
"@mozilla/readability": "^0.6.0",
|
|
10
|
-
"cheerio": "^1.1.2",
|
|
11
|
-
"jsdom": "^27.0.1",
|
|
12
|
-
"puppeteer": "^24.31.0",
|
|
13
|
-
"puppeteer-core": "^23.11.1",
|
|
14
|
-
"puppeteer-extra": "^3.3.6",
|
|
15
|
-
"puppeteer-extra-plugin-stealth": "^2.11.2",
|
|
16
|
-
"turndown": "^7.2.2",
|
|
17
|
-
"turndown-plugin-gfm": "^1.0.2"
|
|
18
|
-
}
|
|
19
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "browser-tools",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Minimal CDP tools for collaborative site exploration",
|
|
6
|
+
"author": "Mario Zechner",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"@mozilla/readability": "^0.6.0",
|
|
10
|
+
"cheerio": "^1.1.2",
|
|
11
|
+
"jsdom": "^27.0.1",
|
|
12
|
+
"puppeteer": "^24.31.0",
|
|
13
|
+
"puppeteer-core": "^23.11.1",
|
|
14
|
+
"puppeteer-extra": "^3.3.6",
|
|
15
|
+
"puppeteer-extra-plugin-stealth": "^2.11.2",
|
|
16
|
+
"turndown": "^7.2.2",
|
|
17
|
+
"turndown-plugin-gfm": "^1.0.2"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: code-review-core
|
|
3
|
-
description: 用于只读 code review 节点,产出带文件与行号引用的优先级 findings。
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Code Review Core
|
|
7
|
-
|
|
8
|
-
本 skill 用于 reviewer 节点。
|
|
9
|
-
|
|
10
|
-
## Review 重点
|
|
11
|
-
|
|
12
|
-
- 优先关注 correctness、行为回归、security、数据丢失与缺失验证。
|
|
13
|
-
- findings 须 grounded 在具体文件与行号。
|
|
14
|
-
- 区分 blocking findings 与次要 maintainability 备注。
|
|
15
|
-
- 检查测试是否证明变更行为,文档是否与面向用户的变更一致。
|
|
16
|
-
- 若无 findings,明确说明,并指出 residual test gap(如有)。
|
|
17
|
-
|
|
18
|
-
## Output
|
|
19
|
-
|
|
20
|
-
按 severity 排序列出 findings。仅当无 blocking findings 时,才写 `VERDICT: pass`。
|
|
1
|
+
---
|
|
2
|
+
name: code-review-core
|
|
3
|
+
description: 用于只读 code review 节点,产出带文件与行号引用的优先级 findings。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Review Core
|
|
7
|
+
|
|
8
|
+
本 skill 用于 reviewer 节点。
|
|
9
|
+
|
|
10
|
+
## Review 重点
|
|
11
|
+
|
|
12
|
+
- 优先关注 correctness、行为回归、security、数据丢失与缺失验证。
|
|
13
|
+
- findings 须 grounded 在具体文件与行号。
|
|
14
|
+
- 区分 blocking findings 与次要 maintainability 备注。
|
|
15
|
+
- 检查测试是否证明变更行为,文档是否与面向用户的变更一致。
|
|
16
|
+
- 若无 findings,明确说明,并指出 residual test gap(如有)。
|
|
17
|
+
|
|
18
|
+
## Output
|
|
19
|
+
|
|
20
|
+
按 severity 排序列出 findings。仅当无 blocking findings 时,才写 `VERDICT: pass`。
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: codebase-scout
|
|
3
|
-
description: 用于只读 scout 节点,在实现前定位现有代码、测试、文档与集成点。
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Codebase Scout
|
|
7
|
-
|
|
8
|
-
本 skill 用于 scout 节点。
|
|
9
|
-
|
|
10
|
-
## 规则
|
|
11
|
-
|
|
12
|
-
- 从 repo 指令、task source 与邻近测试入手。
|
|
13
|
-
- 可用时优先 CodeGraph;否则用 `rg` 与聚焦文件阅读。
|
|
14
|
-
- 在提议新抽象前,识别现有 helper 与 ownership 边界。
|
|
15
|
-
- 只返回事实,不做编辑。
|
|
16
|
-
|
|
17
|
-
## Output
|
|
18
|
-
|
|
19
|
-
列出相关文件、现有模式、风险,以及实现所需的最小 write surface。
|
|
1
|
+
---
|
|
2
|
+
name: codebase-scout
|
|
3
|
+
description: 用于只读 scout 节点,在实现前定位现有代码、测试、文档与集成点。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Codebase Scout
|
|
7
|
+
|
|
8
|
+
本 skill 用于 scout 节点。
|
|
9
|
+
|
|
10
|
+
## 规则
|
|
11
|
+
|
|
12
|
+
- 从 repo 指令、task source 与邻近测试入手。
|
|
13
|
+
- 可用时优先 CodeGraph;否则用 `rg` 与聚焦文件阅读。
|
|
14
|
+
- 在提议新抽象前,识别现有 helper 与 ownership 边界。
|
|
15
|
+
- 只返回事实,不做编辑。
|
|
16
|
+
|
|
17
|
+
## Output
|
|
18
|
+
|
|
19
|
+
列出相关文件、现有模式、风险,以及实现所需的最小 write surface。
|
package/skills/grill-me/SKILL.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: grill-me
|
|
3
|
-
description: Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
|
|
7
|
-
|
|
8
|
-
Ask the questions one at a time.
|
|
9
|
-
|
|
10
|
-
If a question can be answered by exploring the codebase, explore the codebase instead.
|
|
1
|
+
---
|
|
2
|
+
name: grill-me
|
|
3
|
+
description: Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
|
|
7
|
+
|
|
8
|
+
Ask the questions one at a time.
|
|
9
|
+
|
|
10
|
+
If a question can be answered by exploring the codebase, explore the codebase instead.
|
|
@@ -27,8 +27,11 @@ Entry: routing and hard rules. Required details come from frontmatter references
|
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
29
|
loop-agent new-task <task-id> "Title"
|
|
30
|
-
#
|
|
31
|
-
#
|
|
30
|
+
# PRD-first default: detailed PRD → import-prd → task source prepare --apply
|
|
31
|
+
# no hand-written/LLM source by default
|
|
32
|
+
loop-agent import-prd <task-id> --file <prd.md>
|
|
33
|
+
loop-agent task source prepare <task-id> --use-imported-prd --allowed-path "<glob>" --apply --json
|
|
34
|
+
# plan create for non-trivial work (see references/source-and-plan-practice.md)
|
|
32
35
|
loop-agent dag run-task <task-id> --profile auto --strict-models
|
|
33
36
|
# default draft: .harness/tasks/<task-id>/dag.json
|
|
34
37
|
loop-agent dag validate --dag .harness/tasks/<task-id>/dag.json --strict-models --strict-governance
|
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
# loop-agent Skill References
|
|
2
|
-
|
|
3
|
-
本目录是 `../SKILL.md` 的 progressive-disclosure reference layer。`SKILL.md`
|
|
4
|
-
只负责 trigger、入口选择和硬规则;较长的 command details、operational procedures、
|
|
5
|
-
failure handling 与 workflow 细节放在这里,避免主 skill 变成百科。
|
|
6
|
-
|
|
7
|
-
## 使用方式
|
|
8
|
-
|
|
9
|
-
1. 先读 `../SKILL.md`,确认当前任务是否真的需要 `loop-agent`。
|
|
10
|
-
2. 根据任务类型只打开相关 reference,不要一次加载整个目录。
|
|
11
|
-
3. 执行时遵循 Agent DAG 路径;历史顺序式 `run ...` workflow 已移除。
|
|
12
|
-
4. 如果 reference 与 `harness.json` 或 repo-local `ai_workspace/loop-agent/loop-agent-harness.md` / `specs/loop-agent-harness.md` 冲突,以
|
|
13
|
-
`harness.json` 的机器可读 policy 和本目录的 shared policy 为准,并回头修正文档漂移。
|
|
14
|
-
|
|
15
|
-
## 快速路由
|
|
16
|
-
|
|
17
|
-
| 场景 | 优先读取 |
|
|
18
|
-
|---|---|
|
|
19
|
-
| 通用 loop-agent harness workflow policy、跨 repo 共同规则 | `harness-policy.md` |
|
|
20
|
-
| 中大型 autonomous implementation、harness-governed work | `harness-policy.md`、`hybrid-dag.md`、`orchestrator-and-interventions.md`、`verification-and-failure-handling.md` |
|
|
21
|
-
| 需要查精确 CLI 用法、setup、goal、docs helper、stats | `command-reference.md` |
|
|
22
|
-
| 低风险 micro task、旧任务目录兼容、DAG runtime 修复 | `task-workflow.md`、`verification-and-failure-handling.md` |
|
|
23
|
-
| DAG 运行中要判断 main session 是否能手术式补丁、是否需要 sidecar prompt | `orchestrator-and-interventions.md` |
|
|
24
|
-
| 短时 one-shot Pi SDK 调用,不创建 `.harness/tasks/` | `pi-prompt.md` |
|
|
25
|
-
| 解释 `.harness/runs/`、one-shot evidence、active 残留或 promotion | `one-shot-runs.md` |
|
|
26
|
-
| 多 worktree 并行委派、delegate/harvest | `multi-worktree.md` |
|
|
27
|
-
| 模型、provider、profile、fallback routing | `model-routing.md` |
|
|
28
|
-
| Long-running `loop` 命令、action 规则、auto mode、signals、loop closeout | `long-running-loop.md` |
|
|
29
|
-
| Three-pass convergence、repair artifact / spine audit / knowledge curate、SePO-lite prompt evolution | `harness-policy.md` |
|
|
30
|
-
| Cursor bounded write 后的独立复核、verify knobs、failure handling | `verification-and-failure-handling.md` |
|
|
31
|
-
|
|
32
|
-
## Reference 索引
|
|
33
|
-
|
|
34
|
-
| Reference | 使用场景 |
|
|
35
|
-
|---|---|
|
|
36
|
-
| `harness-policy.md` | 通用 loop-agent harness policy:DAG、命令分层、source materials、loop/sidecar 边界、facts/verification/handoff 规则;repo-local harness docs 应引用它而不是复制规则 |
|
|
37
|
-
| `orchestrator-and-interventions.md` | 协调长时间 autonomous DAG work;判断 main session 是否可以 edit;使用 one-shot Pi/Cursor sidecar;恢复 in-flight workflow |
|
|
38
|
-
| `command-reference.md` | 需要 `.` 的精确 CLI 命令、setup、goal lifecycle、docs helper、stats |
|
|
39
|
-
| `task-workflow.md` | 处理 task source material、task config、repo adapter 或 legacy task 目录布局 |
|
|
40
|
-
| `pi-prompt.md` | 运行短时 one-shot Pi SDK task,且不创建 `.harness/tasks/` |
|
|
41
|
-
| `one-shot-runs.md` | 解释 `.harness/runs/{active,completed,failed}` 的创建条件、生命周期、治理清理与 `promote-run` 关系 |
|
|
42
|
-
| `hybrid-dag.md` | 使用 Agent DAG Level 2 `dag validate` / `run-dag`,Level 3 `dag init-hybrid` / `dag run-task`,或查看 write policy、DAG source-of-truth 规则 |
|
|
43
|
-
| `pi-subagent-assisted-mode.md` | 启用 `piSubagentMode`,或在 Pi step 内配置 read-only scout / planner / reviewer subagent |
|
|
44
|
-
| `model-routing.md` | 查看或修改 model/provider 默认、profile、routing 或 fallback 行为 |
|
|
45
|
-
| `post-implementation-and-patterns.md` | 处理 post-verify handoff、PRD item 拆分、fast bounded task、quick status 或 Pi timeout |
|
|
46
|
-
| `multi-worktree.md` | 用 isolated worktree、`delegate` 与 `harvest` 并发执行互不重叠的 independent task |
|
|
47
|
-
| `verification-and-failure-handling.md` | 选择 verify knob、Cursor bounded write 后的独立复核、解释 failure mode、执行 completion audit 与 closeout |
|
|
48
|
-
| `long-running-loop.md` | 使用 experimental long-running `loop` outer state:命令入口、action 规则、auto mode 写入边界、signals 与 loop closeout |
|
|
49
|
-
|
|
50
|
-
## 边界与状态源
|
|
51
|
-
|
|
52
|
-
- `references/harness-policy.md` 是 shared workflow policy source,供多个 repo 的 thin adapter docs 引用。
|
|
53
|
-
- `../SKILL.md` 是 skill trigger 与 routing source,不承载长流程细节。
|
|
54
|
-
- `ai_workspace/loop-agent/loop-agent-harness.md` / repo-local `specs/loop-agent-harness.md` 是本仓库或目标仓库的 adapter 文档:只描述 runtime 位置、governance root、验证入口和本地边界。
|
|
55
|
-
- `harness.json` 是 workflowPolicy、script entrypoints、artifacts 目录与 model routing 的机器可读 source of truth。
|
|
56
|
-
- `.harness/tasks/<task-id>/` 是 task 运行态状态;不要把运行态事实写进本目录。
|
|
57
|
-
- `.harness/runs/completed/<run-id>/` 是 one-shot tool run evidence;reference 文档只能解释如何读取和 promotion,不应复制 run facts。
|
|
58
|
-
- `.harness/dag-runs/completed/<run-id>/` 是单次 DAG run 的不可变 facts;reference 文档只能解释如何读取和收口,不应复制 run facts。
|
|
59
|
-
|
|
60
|
-
## 维护规则
|
|
61
|
-
|
|
62
|
-
- 不要把长段落复制回 `SKILL.md`;需要新增细节时,在本目录新增或更新 reference,并在 `SKILL.md` 添加 routing row。
|
|
63
|
-
- 让 `SKILL.md` 保持 120-180 行以内;reference 文件承担细节。
|
|
64
|
-
- 新 reference 应有清晰标题、触发场景、最小步骤、失败处理和维护边界。
|
|
65
|
-
- 如果某个 reference 变成可独立触发、跨项目通用且不再依赖本仓库上下文,再考虑拆成独立 skill。
|
|
66
|
-
- 更新 command、workflow policy 或 verification 规则时,同步核对 `harness.json`、`references/harness-policy.md`、repo-local harness adapter docs 和 verification matrix。
|
|
67
|
-
- `~/.pi/agent/.agents/skills/loop-agent` 是指向本目录的 symlink,所以仓库内 edits 会直接更新 Pi skill。
|
|
1
|
+
# loop-agent Skill References
|
|
2
|
+
|
|
3
|
+
本目录是 `../SKILL.md` 的 progressive-disclosure reference layer。`SKILL.md`
|
|
4
|
+
只负责 trigger、入口选择和硬规则;较长的 command details、operational procedures、
|
|
5
|
+
failure handling 与 workflow 细节放在这里,避免主 skill 变成百科。
|
|
6
|
+
|
|
7
|
+
## 使用方式
|
|
8
|
+
|
|
9
|
+
1. 先读 `../SKILL.md`,确认当前任务是否真的需要 `loop-agent`。
|
|
10
|
+
2. 根据任务类型只打开相关 reference,不要一次加载整个目录。
|
|
11
|
+
3. 执行时遵循 Agent DAG 路径;历史顺序式 `run ...` workflow 已移除。
|
|
12
|
+
4. 如果 reference 与 `harness.json` 或 repo-local `ai_workspace/loop-agent/loop-agent-harness.md` / `specs/loop-agent-harness.md` 冲突,以
|
|
13
|
+
`harness.json` 的机器可读 policy 和本目录的 shared policy 为准,并回头修正文档漂移。
|
|
14
|
+
|
|
15
|
+
## 快速路由
|
|
16
|
+
|
|
17
|
+
| 场景 | 优先读取 |
|
|
18
|
+
|---|---|
|
|
19
|
+
| 通用 loop-agent harness workflow policy、跨 repo 共同规则 | `harness-policy.md` |
|
|
20
|
+
| 中大型 autonomous implementation、harness-governed work | `harness-policy.md`、`hybrid-dag.md`、`orchestrator-and-interventions.md`、`verification-and-failure-handling.md` |
|
|
21
|
+
| 需要查精确 CLI 用法、setup、goal、docs helper、stats | `command-reference.md` |
|
|
22
|
+
| 低风险 micro task、旧任务目录兼容、DAG runtime 修复 | `task-workflow.md`、`verification-and-failure-handling.md` |
|
|
23
|
+
| DAG 运行中要判断 main session 是否能手术式补丁、是否需要 sidecar prompt | `orchestrator-and-interventions.md` |
|
|
24
|
+
| 短时 one-shot Pi SDK 调用,不创建 `.harness/tasks/` | `pi-prompt.md` |
|
|
25
|
+
| 解释 `.harness/runs/`、one-shot evidence、active 残留或 promotion | `one-shot-runs.md` |
|
|
26
|
+
| 多 worktree 并行委派、delegate/harvest | `multi-worktree.md` |
|
|
27
|
+
| 模型、provider、profile、fallback routing | `model-routing.md` |
|
|
28
|
+
| Long-running `loop` 命令、action 规则、auto mode、signals、loop closeout | `long-running-loop.md` |
|
|
29
|
+
| Three-pass convergence、repair artifact / spine audit / knowledge curate、SePO-lite prompt evolution | `harness-policy.md` |
|
|
30
|
+
| Cursor bounded write 后的独立复核、verify knobs、failure handling | `verification-and-failure-handling.md` |
|
|
31
|
+
|
|
32
|
+
## Reference 索引
|
|
33
|
+
|
|
34
|
+
| Reference | 使用场景 |
|
|
35
|
+
|---|---|
|
|
36
|
+
| `harness-policy.md` | 通用 loop-agent harness policy:DAG、命令分层、source materials、loop/sidecar 边界、facts/verification/handoff 规则;repo-local harness docs 应引用它而不是复制规则 |
|
|
37
|
+
| `orchestrator-and-interventions.md` | 协调长时间 autonomous DAG work;判断 main session 是否可以 edit;使用 one-shot Pi/Cursor sidecar;恢复 in-flight workflow |
|
|
38
|
+
| `command-reference.md` | 需要 `.` 的精确 CLI 命令、setup、goal lifecycle、docs helper、stats |
|
|
39
|
+
| `task-workflow.md` | 处理 task source material、task config、repo adapter 或 legacy task 目录布局 |
|
|
40
|
+
| `pi-prompt.md` | 运行短时 one-shot Pi SDK task,且不创建 `.harness/tasks/` |
|
|
41
|
+
| `one-shot-runs.md` | 解释 `.harness/runs/{active,completed,failed}` 的创建条件、生命周期、治理清理与 `promote-run` 关系 |
|
|
42
|
+
| `hybrid-dag.md` | 使用 Agent DAG Level 2 `dag validate` / `run-dag`,Level 3 `dag init-hybrid` / `dag run-task`,或查看 write policy、DAG source-of-truth 规则 |
|
|
43
|
+
| `pi-subagent-assisted-mode.md` | 启用 `piSubagentMode`,或在 Pi step 内配置 read-only scout / planner / reviewer subagent |
|
|
44
|
+
| `model-routing.md` | 查看或修改 model/provider 默认、profile、routing 或 fallback 行为 |
|
|
45
|
+
| `post-implementation-and-patterns.md` | 处理 post-verify handoff、PRD item 拆分、fast bounded task、quick status 或 Pi timeout |
|
|
46
|
+
| `multi-worktree.md` | 用 isolated worktree、`delegate` 与 `harvest` 并发执行互不重叠的 independent task |
|
|
47
|
+
| `verification-and-failure-handling.md` | 选择 verify knob、Cursor bounded write 后的独立复核、解释 failure mode、执行 completion audit 与 closeout |
|
|
48
|
+
| `long-running-loop.md` | 使用 experimental long-running `loop` outer state:命令入口、action 规则、auto mode 写入边界、signals 与 loop closeout |
|
|
49
|
+
|
|
50
|
+
## 边界与状态源
|
|
51
|
+
|
|
52
|
+
- `references/harness-policy.md` 是 shared workflow policy source,供多个 repo 的 thin adapter docs 引用。
|
|
53
|
+
- `../SKILL.md` 是 skill trigger 与 routing source,不承载长流程细节。
|
|
54
|
+
- `ai_workspace/loop-agent/loop-agent-harness.md` / repo-local `specs/loop-agent-harness.md` 是本仓库或目标仓库的 adapter 文档:只描述 runtime 位置、governance root、验证入口和本地边界。
|
|
55
|
+
- `harness.json` 是 workflowPolicy、script entrypoints、artifacts 目录与 model routing 的机器可读 source of truth。
|
|
56
|
+
- `.harness/tasks/<task-id>/` 是 task 运行态状态;不要把运行态事实写进本目录。
|
|
57
|
+
- `.harness/runs/completed/<run-id>/` 是 one-shot tool run evidence;reference 文档只能解释如何读取和 promotion,不应复制 run facts。
|
|
58
|
+
- `.harness/dag-runs/completed/<run-id>/` 是单次 DAG run 的不可变 facts;reference 文档只能解释如何读取和收口,不应复制 run facts。
|
|
59
|
+
|
|
60
|
+
## 维护规则
|
|
61
|
+
|
|
62
|
+
- 不要把长段落复制回 `SKILL.md`;需要新增细节时,在本目录新增或更新 reference,并在 `SKILL.md` 添加 routing row。
|
|
63
|
+
- 让 `SKILL.md` 保持 120-180 行以内;reference 文件承担细节。
|
|
64
|
+
- 新 reference 应有清晰标题、触发场景、最小步骤、失败处理和维护边界。
|
|
65
|
+
- 如果某个 reference 变成可独立触发、跨项目通用且不再依赖本仓库上下文,再考虑拆成独立 skill。
|
|
66
|
+
- 更新 command、workflow policy 或 verification 规则时,同步核对 `harness.json`、`references/harness-policy.md`、repo-local harness adapter docs 和 verification matrix。
|
|
67
|
+
- `~/.pi/agent/.agents/skills/loop-agent` 是指向本目录的 symlink,所以仓库内 edits 会直接更新 Pi skill。
|
|
@@ -37,9 +37,14 @@ loop-agent doctor
|
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
39
|
loop-agent new-task <task-id> "Task Title"
|
|
40
|
-
#
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
# 推荐默认:详细 PRD → import → prepare(无需手写两 source;默认无 LLM 写 source)
|
|
41
|
+
loop-agent import-prd <task-id> --file <path-to-prd.md>
|
|
42
|
+
loop-agent task source prepare <task-id> \
|
|
43
|
+
--use-imported-prd \
|
|
44
|
+
--allowed-path "<glob>" \
|
|
45
|
+
--forbidden-path ".harness/**" \
|
|
46
|
+
--verify "typecheck:npm run typecheck" \
|
|
47
|
+
--apply --json
|
|
43
48
|
# 非微小 / 跨会话(推荐默认):
|
|
44
49
|
# loop-agent plan create <plan-id> "<title>"
|
|
45
50
|
loop-agent dag run-task <task-id> --profile auto --strict-models
|
|
@@ -168,7 +173,7 @@ loop-agent new-task <task-id> "Task Title"
|
|
|
168
173
|
loop-agent import-prd <task-id> --file ai_workspace/loop-agent/path/to-prd.md [--name requirement] [--json]
|
|
169
174
|
```
|
|
170
175
|
|
|
171
|
-
把用户原始 PRD **原样复制** 到 `.harness/tasks/<task-id>/source/references/`,并写入 `source/source-manifest.json`(含 SHA-256)与 `task.json.referenceDocs
|
|
176
|
+
把用户原始 PRD **原样复制** 到 `.harness/tasks/<task-id>/source/references/`,并写入 `source/source-manifest.json`(含 SHA-256)与 `task.json.referenceDocs`。此步骤不调用模型、不改写内容。随后用 `task source prepare --use-imported-prd --apply` 派生 managed `source/需求.md` / `执行约束.md`;冲突时以 `source/references/*` 为准。
|
|
172
177
|
|
|
173
178
|
`referenceDocs` 是 `{ path, name? }[]` 对象数组,不是路径字符串数组;`import-prd` 会确定性写入正确结构。
|
|
174
179
|
|
|
@@ -213,22 +218,19 @@ one-shot run evidence 位于 `.harness/runs/{active,completed,failed}/<run-id>/`
|
|
|
213
218
|
|
|
214
219
|
### 运行任何 step 前:准备 source materials
|
|
215
220
|
|
|
216
|
-
`new-task` 之后,先归档原始 PRD
|
|
221
|
+
`new-task` 之后,先归档原始 PRD,再 `task source prepare` 派生执行契约:
|
|
217
222
|
|
|
218
223
|
```bash
|
|
219
224
|
loop-agent import-prd <task-id> --file <path-to-original-prd.md>
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
225
|
+
loop-agent task source prepare <task-id> \
|
|
226
|
+
--use-imported-prd \
|
|
227
|
+
--allowed-path "<glob>" \
|
|
228
|
+
--forbidden-path ".harness/**" \
|
|
229
|
+
--verify "typecheck:npm run typecheck" \
|
|
230
|
+
--apply --json
|
|
223
231
|
```
|
|
224
232
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
若 task 有硬约束(仅允许特定文件、禁止改动),另加:
|
|
228
|
-
|
|
229
|
-
```bash
|
|
230
|
-
cat > <repo-root>/.harness/tasks/<task-id>/source/执行约束.md
|
|
231
|
-
```
|
|
233
|
+
默认无 LLM 写 source;工程边界用 flags 显式给出。不要让 AI 直接改写 `source/references/*`。高级用户仍可手工编辑后 `task contract adopt`。
|
|
232
234
|
|
|
233
235
|
### Feature-study workflow(参考代码 → 轻量实现)
|
|
234
236
|
|
|
@@ -1,126 +1,126 @@
|
|
|
1
|
-
# Docs Converge(文档收敛)
|
|
2
|
-
|
|
3
|
-
本 reference 把会话协议中的 **Converge Docs** 落成可执行检查表。
|
|
4
|
-
定位是**收敛 / 同步**,不是「每次重新 invent 文档大纲」。
|
|
5
|
-
|
|
6
|
-
权威规划:`ai_workspace/loop-agent/exec-plans/completed/2026-07-14-website-docs-ia-and-converge.md`。
|
|
7
|
-
站与治理双树边界:`website/README.md`。
|
|
8
|
-
|
|
9
|
-
## 何时触发
|
|
10
|
-
|
|
11
|
-
在以下任一情况**加载本文件并跑检查表**:
|
|
12
|
-
|
|
13
|
-
- 用户可见行为变更(CLI 输出、默认工作流、init 投影、Observe/Worker 主路径)。
|
|
14
|
-
- 新增 / 修改 / 删除 CLI 命令或关键 flags。
|
|
15
|
-
- runtime / 架构边界变更(`ai_workspace/loop-agent/architecture/*`、executor 角色、Worker 边界)。
|
|
16
|
-
- active plan 创建、blocked、完成或归档。
|
|
17
|
-
- 准备发布或写 `CHANGELOG.md` 版本条目。
|
|
18
|
-
- 用户明确要求「文档收敛」「docs converge」「同步 website docs」。
|
|
19
|
-
- handoff 前需要声明「本轮是否更新了站上文档」。
|
|
20
|
-
|
|
21
|
-
**不要**在无关的纯内部重构(无用户可见行为、无命令面变化)上强制大改站上正文;此时 handoff 写明豁免理由即可。
|
|
22
|
-
|
|
23
|
-
## 受众矩阵
|
|
24
|
-
|
|
25
|
-
| 受众 | 主要入口 | 权威细节 |
|
|
26
|
-
| --- | --- | --- |
|
|
27
|
-
| 新贡献者 | `website/docs/intro.md` → `overview/architecture` → `overview/roadmap` → first-run | 根 `ai_workspace/loop-agent/architecture/*`、active plans |
|
|
28
|
-
| 使用者 | `overview/feature-map`、`quick-start/*`、`guides/*`、`reference/*` | CLI help、根 `CHANGELOG.md` |
|
|
29
|
-
| 维护者 / agent | 本检查表 + `AGENTS.md` Converge Docs | `ai_workspace/loop-agent/`、`.agents/skills/`、`scripts/check-*.sh` |
|
|
30
|
-
|
|
31
|
-
## 页面清单(站上活文档)
|
|
32
|
-
|
|
33
|
-
| 页面 | 职责 |
|
|
34
|
-
| --- | --- |
|
|
35
|
-
| `website/docs/intro.md` | 概念地图 + 30 分钟路径;非能力堆砌 |
|
|
36
|
-
| `website/docs/overview/feature-map.md` | 功能导览 → guide/CLI |
|
|
37
|
-
| `website/docs/overview/architecture.md` | 架构导读;链到 `ai_workspace/loop-agent/architecture/` |
|
|
38
|
-
| `website/docs/overview/roadmap.md` | 当前有效规划短索引 |
|
|
39
|
-
| `website/docs/quick-start/*` | 安装 / init / first-run |
|
|
40
|
-
| `website/docs/guides/*` | 主路径操作说明 |
|
|
41
|
-
| `website/docs/reference/cli.md` | 用户向 CLI 参考 |
|
|
42
|
-
| `website/docs/reference/config.md` | 配置参考 |
|
|
43
|
-
| `website/docs/changelog.md` | 读者摘要;完整版本以根 `CHANGELOG.md` 为准 |
|
|
44
|
-
|
|
45
|
-
治理全文、exec-plans、reports **不**搬进 Docusaurus。
|
|
46
|
-
|
|
47
|
-
## 变更 → 文档检查表
|
|
48
|
-
|
|
49
|
-
按本轮实际 diff 勾选(有则必须处理,无则跳过并记豁免):
|
|
50
|
-
|
|
51
|
-
| 若变更了… | 必须检查 / 更新 |
|
|
52
|
-
| --- | --- |
|
|
53
|
-
| 新/改 CLI 命令 | `website/docs/reference/cli.md` + `.agents/skills/loop-agent/references/command-reference.md`(及 agent-worker 相关 reference) |
|
|
54
|
-
| 用户可见行为 | 对应 `guides/*` 或 `quick-start/*`;根 `CHANGELOG.md`;必要时 `overview/feature-map.md` / `intro.md` |
|
|
55
|
-
| runtime / 边界 | 根 `ai_workspace/loop-agent/architecture/*`;站上 `overview/architecture.md` 导语与外链 |
|
|
56
|
-
| 默认工作流 | `intro.md` 流程图 + `guides/agent-dag.md` / `guides/harness-policy.md` |
|
|
57
|
-
| active plan 状态 | `overview/roadmap.md` 短索引 + `ai_workspace/loop-agent/exec-plans/active/README.md` |
|
|
58
|
-
| 发布 | 根 `CHANGELOG.md` 为版本事实源;`website/docs/changelog.md` 只写摘要与链接;roadmap 仅在规划状态变化时更新 |
|
|
59
|
-
| skill / init 投影 | `ai_workspace/loop-agent/init-surface.manifest.json`、相关测试、必要时 `ai_workspace/loop-agent/.agents/skills/*` |
|
|
60
|
-
|
|
61
|
-
跨树链接规则:
|
|
62
|
-
|
|
63
|
-
- 站内页面用 Docusaurus 相对文档链接。
|
|
64
|
-
- 链到根目录 `ai_workspace/loop-agent/`、`AGENTS.md`、`CHANGELOG.md` 等时,使用
|
|
65
|
-
`https://github.com/tea-agent/loop-agent/blob/main/<repo-path>`,
|
|
66
|
-
正文同时写出 repo-relative path;禁止伪造站内 `/ai_workspace/loop-agent/architecture/...` 作为根目录文档路由。
|
|
67
|
-
|
|
68
|
-
## 执行步骤(最小闭环)
|
|
69
|
-
|
|
70
|
-
1. **列出本轮用户可见 diff**(命令、行为、边界、计划状态)。
|
|
71
|
-
2. **对照上表**产出缺口清单(页面路径 + 要改的一句话)。
|
|
72
|
-
3. **最小补丁**:只改清单内页面;禁止顺手重写 practices 或迁移整个 `ai_workspace/loop-agent/`。
|
|
73
|
-
4. **验证**(见下节)。
|
|
74
|
-
5. **Handoff** 二选一:
|
|
75
|
-
- 已更新:列出改动页面与验证命令结果。
|
|
76
|
-
- 无需站上更新:写明「本轮无需站上更新,原因:…」。
|
|
77
|
-
|
|
78
|
-
## 验证命令
|
|
79
|
-
|
|
80
|
-
站上正文、侧栏或 `docusaurus.config.ts` 有改动时:
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
npm run docs:build
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
涉及治理文档、脚本、skill、init surface 时再跑:
|
|
87
|
-
|
|
88
|
-
```bash
|
|
89
|
-
bash scripts/check-repo.sh
|
|
90
|
-
# 或定向:
|
|
91
|
-
bash scripts/check-skill-entry.sh
|
|
92
|
-
bash scripts/check-command-registry-drift.sh
|
|
93
|
-
bash scripts/check-init-surface.sh
|
|
94
|
-
node bin/loop-agent.js docs audit --repo-root .
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
skill / package 投影相关:
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
npx vitest run test/init-command.test.ts test/package-surface.test.ts
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
## 禁止事项
|
|
104
|
-
|
|
105
|
-
- 每次会话从头撰写全新文档大纲或「重新规划整个 docs 树」。
|
|
106
|
-
- 把 `ai_workspace/loop-agent/design/`、exec-plans、reports 全文复制进 `website/docs/`。
|
|
107
|
-
- 在站上建立第二套与 `ai_workspace/loop-agent/architecture/*` 冲突的架构真源。
|
|
108
|
-
- 未读 `website/README.md` 与相关 exec-plan 就扩大 scope。
|
|
109
|
-
- 用删测试、降 `onBrokenMarkdownLinks` 或忽略 `docs:build` 失败制造「完成」。
|
|
110
|
-
- 新增独立公共 skill 目录承载本检查表(应留在 `.agents/skills/loop-agent/references/`)。
|
|
111
|
-
|
|
112
|
-
## 与现有能力的关系
|
|
113
|
-
|
|
114
|
-
| 能力 | 关系 |
|
|
115
|
-
| --- | --- |
|
|
116
|
-
| `loop-agent docs audit` | L0 腐化检查(断链、计划状态等);**不**替代本表内容审计 |
|
|
117
|
-
| `npm run docs:build` | 站上改动硬门禁(含 Markdown 断链 fail-fast) |
|
|
118
|
-
| `grill-with-docs` | ADR / 术语;不替代本 reference |
|
|
119
|
-
| 历史 2026-07-05 docs governance dogfood | 仅经验输入;新 workflow 必须 Pi-only,不复用已退役原生 Cursor DAG |
|
|
120
|
-
|
|
121
|
-
## 快速自检(handoff 前 30 秒)
|
|
122
|
-
|
|
123
|
-
- [ ] 用户可见变更是否对照检查表处理或已豁免?
|
|
124
|
-
- [ ] intro 是否仍是概念地图(而非能力 bullet 堆砌)?
|
|
125
|
-
- [ ] roadmap 是否只含当前有效 active 项?
|
|
126
|
-
- [ ] 需要时 `docs:build` / `check-repo` 是否有新鲜输出?
|
|
1
|
+
# Docs Converge(文档收敛)
|
|
2
|
+
|
|
3
|
+
本 reference 把会话协议中的 **Converge Docs** 落成可执行检查表。
|
|
4
|
+
定位是**收敛 / 同步**,不是「每次重新 invent 文档大纲」。
|
|
5
|
+
|
|
6
|
+
权威规划:`ai_workspace/loop-agent/exec-plans/completed/2026-07-14-website-docs-ia-and-converge.md`。
|
|
7
|
+
站与治理双树边界:`website/README.md`。
|
|
8
|
+
|
|
9
|
+
## 何时触发
|
|
10
|
+
|
|
11
|
+
在以下任一情况**加载本文件并跑检查表**:
|
|
12
|
+
|
|
13
|
+
- 用户可见行为变更(CLI 输出、默认工作流、init 投影、Observe/Worker 主路径)。
|
|
14
|
+
- 新增 / 修改 / 删除 CLI 命令或关键 flags。
|
|
15
|
+
- runtime / 架构边界变更(`ai_workspace/loop-agent/architecture/*`、executor 角色、Worker 边界)。
|
|
16
|
+
- active plan 创建、blocked、完成或归档。
|
|
17
|
+
- 准备发布或写 `CHANGELOG.md` 版本条目。
|
|
18
|
+
- 用户明确要求「文档收敛」「docs converge」「同步 website docs」。
|
|
19
|
+
- handoff 前需要声明「本轮是否更新了站上文档」。
|
|
20
|
+
|
|
21
|
+
**不要**在无关的纯内部重构(无用户可见行为、无命令面变化)上强制大改站上正文;此时 handoff 写明豁免理由即可。
|
|
22
|
+
|
|
23
|
+
## 受众矩阵
|
|
24
|
+
|
|
25
|
+
| 受众 | 主要入口 | 权威细节 |
|
|
26
|
+
| --- | --- | --- |
|
|
27
|
+
| 新贡献者 | `website/docs/intro.md` → `overview/architecture` → `overview/roadmap` → first-run | 根 `ai_workspace/loop-agent/architecture/*`、active plans |
|
|
28
|
+
| 使用者 | `overview/feature-map`、`quick-start/*`、`guides/*`、`reference/*` | CLI help、根 `CHANGELOG.md` |
|
|
29
|
+
| 维护者 / agent | 本检查表 + `AGENTS.md` Converge Docs | `ai_workspace/loop-agent/`、`.agents/skills/`、`scripts/check-*.sh` |
|
|
30
|
+
|
|
31
|
+
## 页面清单(站上活文档)
|
|
32
|
+
|
|
33
|
+
| 页面 | 职责 |
|
|
34
|
+
| --- | --- |
|
|
35
|
+
| `website/docs/intro.md` | 概念地图 + 30 分钟路径;非能力堆砌 |
|
|
36
|
+
| `website/docs/overview/feature-map.md` | 功能导览 → guide/CLI |
|
|
37
|
+
| `website/docs/overview/architecture.md` | 架构导读;链到 `ai_workspace/loop-agent/architecture/` |
|
|
38
|
+
| `website/docs/overview/roadmap.md` | 当前有效规划短索引 |
|
|
39
|
+
| `website/docs/quick-start/*` | 安装 / init / first-run |
|
|
40
|
+
| `website/docs/guides/*` | 主路径操作说明 |
|
|
41
|
+
| `website/docs/reference/cli.md` | 用户向 CLI 参考 |
|
|
42
|
+
| `website/docs/reference/config.md` | 配置参考 |
|
|
43
|
+
| `website/docs/changelog.md` | 读者摘要;完整版本以根 `CHANGELOG.md` 为准 |
|
|
44
|
+
|
|
45
|
+
治理全文、exec-plans、reports **不**搬进 Docusaurus。
|
|
46
|
+
|
|
47
|
+
## 变更 → 文档检查表
|
|
48
|
+
|
|
49
|
+
按本轮实际 diff 勾选(有则必须处理,无则跳过并记豁免):
|
|
50
|
+
|
|
51
|
+
| 若变更了… | 必须检查 / 更新 |
|
|
52
|
+
| --- | --- |
|
|
53
|
+
| 新/改 CLI 命令 | `website/docs/reference/cli.md` + `.agents/skills/loop-agent/references/command-reference.md`(及 agent-worker 相关 reference) |
|
|
54
|
+
| 用户可见行为 | 对应 `guides/*` 或 `quick-start/*`;根 `CHANGELOG.md`;必要时 `overview/feature-map.md` / `intro.md` |
|
|
55
|
+
| runtime / 边界 | 根 `ai_workspace/loop-agent/architecture/*`;站上 `overview/architecture.md` 导语与外链 |
|
|
56
|
+
| 默认工作流 | `intro.md` 流程图 + `guides/agent-dag.md` / `guides/harness-policy.md` |
|
|
57
|
+
| active plan 状态 | `overview/roadmap.md` 短索引 + `ai_workspace/loop-agent/exec-plans/active/README.md` |
|
|
58
|
+
| 发布 | 根 `CHANGELOG.md` 为版本事实源;`website/docs/changelog.md` 只写摘要与链接;roadmap 仅在规划状态变化时更新 |
|
|
59
|
+
| skill / init 投影 | `ai_workspace/loop-agent/init-surface.manifest.json`、相关测试、必要时 `ai_workspace/loop-agent/.agents/skills/*` |
|
|
60
|
+
|
|
61
|
+
跨树链接规则:
|
|
62
|
+
|
|
63
|
+
- 站内页面用 Docusaurus 相对文档链接。
|
|
64
|
+
- 链到根目录 `ai_workspace/loop-agent/`、`AGENTS.md`、`CHANGELOG.md` 等时,使用
|
|
65
|
+
`https://github.com/tea-agent/loop-agent/blob/main/<repo-path>`,
|
|
66
|
+
正文同时写出 repo-relative path;禁止伪造站内 `/ai_workspace/loop-agent/architecture/...` 作为根目录文档路由。
|
|
67
|
+
|
|
68
|
+
## 执行步骤(最小闭环)
|
|
69
|
+
|
|
70
|
+
1. **列出本轮用户可见 diff**(命令、行为、边界、计划状态)。
|
|
71
|
+
2. **对照上表**产出缺口清单(页面路径 + 要改的一句话)。
|
|
72
|
+
3. **最小补丁**:只改清单内页面;禁止顺手重写 practices 或迁移整个 `ai_workspace/loop-agent/`。
|
|
73
|
+
4. **验证**(见下节)。
|
|
74
|
+
5. **Handoff** 二选一:
|
|
75
|
+
- 已更新:列出改动页面与验证命令结果。
|
|
76
|
+
- 无需站上更新:写明「本轮无需站上更新,原因:…」。
|
|
77
|
+
|
|
78
|
+
## 验证命令
|
|
79
|
+
|
|
80
|
+
站上正文、侧栏或 `docusaurus.config.ts` 有改动时:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
npm run docs:build
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
涉及治理文档、脚本、skill、init surface 时再跑:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
bash scripts/check-repo.sh
|
|
90
|
+
# 或定向:
|
|
91
|
+
bash scripts/check-skill-entry.sh
|
|
92
|
+
bash scripts/check-command-registry-drift.sh
|
|
93
|
+
bash scripts/check-init-surface.sh
|
|
94
|
+
node bin/loop-agent.js docs audit --repo-root .
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
skill / package 投影相关:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
npx vitest run test/init-command.test.ts test/package-surface.test.ts
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## 禁止事项
|
|
104
|
+
|
|
105
|
+
- 每次会话从头撰写全新文档大纲或「重新规划整个 docs 树」。
|
|
106
|
+
- 把 `ai_workspace/loop-agent/design/`、exec-plans、reports 全文复制进 `website/docs/`。
|
|
107
|
+
- 在站上建立第二套与 `ai_workspace/loop-agent/architecture/*` 冲突的架构真源。
|
|
108
|
+
- 未读 `website/README.md` 与相关 exec-plan 就扩大 scope。
|
|
109
|
+
- 用删测试、降 `onBrokenMarkdownLinks` 或忽略 `docs:build` 失败制造「完成」。
|
|
110
|
+
- 新增独立公共 skill 目录承载本检查表(应留在 `.agents/skills/loop-agent/references/`)。
|
|
111
|
+
|
|
112
|
+
## 与现有能力的关系
|
|
113
|
+
|
|
114
|
+
| 能力 | 关系 |
|
|
115
|
+
| --- | --- |
|
|
116
|
+
| `loop-agent docs audit` | L0 腐化检查(断链、计划状态等);**不**替代本表内容审计 |
|
|
117
|
+
| `npm run docs:build` | 站上改动硬门禁(含 Markdown 断链 fail-fast) |
|
|
118
|
+
| `grill-with-docs` | ADR / 术语;不替代本 reference |
|
|
119
|
+
| 历史 2026-07-05 docs governance dogfood | 仅经验输入;新 workflow 必须 Pi-only,不复用已退役原生 Cursor DAG |
|
|
120
|
+
|
|
121
|
+
## 快速自检(handoff 前 30 秒)
|
|
122
|
+
|
|
123
|
+
- [ ] 用户可见变更是否对照检查表处理或已豁免?
|
|
124
|
+
- [ ] intro 是否仍是概念地图(而非能力 bullet 堆砌)?
|
|
125
|
+
- [ ] roadmap 是否只含当前有效 active 项?
|
|
126
|
+
- [ ] 需要时 `docs:build` / `check-repo` 是否有新鲜输出?
|
|
@@ -54,10 +54,9 @@ Minimum governed path:
|
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
56
|
loop-agent new-task <task-id> "Task Title" [--repo-root <target-repo>]
|
|
57
|
-
#
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
# write <target-repo>/.harness/tasks/<task-id>/source/执行约束.md
|
|
57
|
+
# PRD-first: import-prd → task source prepare --apply
|
|
58
|
+
loop-agent import-prd <task-id> --file <path-to-original-prd.md> [--repo-root <target-repo>]
|
|
59
|
+
loop-agent task source prepare <task-id> --use-imported-prd --allowed-path "<glob>" --apply --json [--repo-root <target-repo>]
|
|
61
60
|
|
|
62
61
|
loop-agent dag run-task <task-id> \
|
|
63
62
|
--profile auto \
|