@tea-agent/loop-agent 0.24.11-beta.0 → 0.25.1
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 +53 -4
- package/README.md +4 -4
- package/dist/application/dag/generate-task-dag.js +25 -8
- package/dist/commands/dag-init-hybrid.js +3 -2
- package/dist/commands/delegate.js +11 -11
- package/dist/commands/init.js +29 -14
- package/dist/commands/instructions.js +1 -2
- package/dist/executors/dag-pi-executor.js +74 -13
- package/dist/executors/pi-executor.js +25 -7
- package/dist/executors/pi-prompt-transport.js +198 -0
- package/dist/executors/pi-sdk-executor.js +1 -1
- package/dist/executors/process-tree.js +33 -0
- package/dist/executors/shell-executor.js +362 -24
- package/dist/executors/shell-verification.js +4 -2
- package/dist/infrastructure/harness/task-store.js +31 -0
- package/dist/shared/operator/capabilities.js +6 -0
- package/dist/task/read-model.js +3 -7
- package/dist/task/runtime.js +12 -3
- package/dist/verification/maven/cache.js +142 -0
- package/dist/verification/maven/index.js +120 -0
- package/dist/verification/maven/plan-commands.js +421 -0
- package/dist/verification/maven/pom-static.js +136 -0
- package/dist/verification/maven/scope-resolve.js +153 -0
- package/dist/verification/maven/stale.js +130 -0
- package/dist/verification/maven/types.js +23 -0
- package/dist/verification/maven/workspace-graph.js +322 -0
- package/dist/worker/cli.js +236 -21
- package/dist/worker/delivery/final-verification.js +12 -0
- package/dist/worker/delivery/git-transaction.js +32 -7
- package/dist/worker/delivery/package.js +9 -5
- package/dist/worker/delivery/verification-bundle.js +26 -5
- package/dist/worker/feature/advance.js +301 -0
- package/dist/worker/feature/doctor.js +223 -0
- package/dist/worker/feature/next-action.js +11 -3
- package/dist/worker/feature/scaffold.js +798 -0
- package/dist/worker/observe/dag-run-artifacts.js +90 -0
- package/dist/worker/observe/node-input.js +444 -0
- package/dist/worker/observe/routes.js +17 -0
- package/dist/worker/observe/static/api.js +9 -0
- package/dist/worker/observe/static/constants.js +9 -0
- package/dist/worker/observe/static/state.js +14 -0
- package/dist/worker/observe/static/styles.css +74 -0
- package/dist/worker/observe/static/views/dag-inspector.js +371 -15
- package/dist/worker/outcomes/projector.js +5 -1
- package/dist/worker/run-task/run-task.js +18 -2
- package/dist/worker/runner/run-ready.js +41 -1
- package/dist/workflows/dag/backend-test-markdown-workflow.js +300 -9
- package/dist/workflows/dag/backend-test-result-contract.js +103 -0
- package/dist/workflows/dag/failure-category.js +5 -1
- package/dist/workflows/dag/frontend-implementation-contract.js +4 -0
- package/dist/workflows/dag/frontend-prewrite-gate.js +0 -17
- package/dist/workflows/dag/frontend-test-result-contract.js +106 -41
- package/dist/workflows/dag/init-hybrid.js +224 -39
- package/dist/workflows/dag/node-execution.js +3 -2
- package/dist/workflows/dag/reconcile-run.js +24 -0
- package/dist/workflows/dag/types.js +57 -0
- package/dist/workflows/dag/validate.js +19 -2
- package/dist/workflows/loop/actions/dag-action.js +2 -1
- package/docs/architecture/dag-execution.md +5 -1
- package/docs/architecture/runtime-boundaries.md +11 -1
- package/docs/architecture/worker-and-feature.md +2 -0
- package/docs/init-surface.manifest.json +3 -0
- package/docs/templates/backend-test-dag.json +3 -3
- package/docs/templates/product-line/README.md +17 -1
- package/docs/templates/product-line/feature-scaffold-batch.example.yaml +31 -0
- package/docs/templates/product-line/scaffold-samples/README.md +36 -0
- package/docs/templates/product-line/scaffold-samples/backend-only/acceptance.yaml +13 -0
- package/docs/templates/product-line/scaffold-samples/backend-only/design.md +14 -0
- package/docs/templates/product-line/scaffold-samples/backend-only/feature.yaml +3 -0
- package/docs/templates/product-line/scaffold-samples/backend-only/requirement.md +6 -0
- package/docs/templates/product-line/scaffold-samples/backend-only/tasks/BE-IMPL-001.yaml +83 -0
- package/docs/templates/product-line/scaffold-samples/backend-only/tasks/task-graph.yaml +14 -0
- package/docs/templates/product-line/scaffold-samples/fe-with-api/acceptance.yaml +15 -0
- package/docs/templates/product-line/scaffold-samples/fe-with-api/design.md +18 -0
- package/docs/templates/product-line/scaffold-samples/fe-with-api/feature.yaml +3 -0
- package/docs/templates/product-line/scaffold-samples/fe-with-api/requirement.md +6 -0
- package/docs/templates/product-line/scaffold-samples/fe-with-api/tasks/BE-IMPL-001.yaml +84 -0
- package/docs/templates/product-line/scaffold-samples/fe-with-api/tasks/CONTRACT-001.yaml +84 -0
- package/docs/templates/product-line/scaffold-samples/fe-with-api/tasks/FE-IMPL-001.yaml +86 -0
- package/docs/templates/product-line/scaffold-samples/fe-with-api/tasks/task-graph.yaml +40 -0
- package/docs/templates/product-line/scaffold-samples/frontend-only/acceptance.yaml +13 -0
- package/docs/templates/product-line/scaffold-samples/frontend-only/design.md +14 -0
- package/docs/templates/product-line/scaffold-samples/frontend-only/feature.yaml +3 -0
- package/docs/templates/product-line/scaffold-samples/frontend-only/requirement.md +6 -0
- package/docs/templates/product-line/scaffold-samples/frontend-only/tasks/FE-IMPL-001.yaml +85 -0
- package/docs/templates/product-line/scaffold-samples/frontend-only/tasks/task-graph.yaml +14 -0
- package/examples/l5-report-coms-process-definition.html +322 -0
- package/package.json +1 -1
- package/skills/agent-worker/references/agent-worker-operator.md +84 -0
- package/skills/frontend-implementation/references/node-contracts.md +2 -2
- package/skills/loop-agent/SKILL.md +14 -16
- package/skills/loop-agent/references/command-reference.md +33 -12
- package/skills/loop-agent/references/harness-policy.md +28 -6
- package/skills/loop-agent/references/hybrid-dag.md +8 -7
- package/skills/loop-agent/references/post-implementation-and-patterns.md +19 -9
- package/skills/loop-agent/references/source-and-plan-practice.md +161 -0
- package/skills/loop-agent/references/task-workflow.md +13 -5
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
schema_version: 1
|
|
2
|
+
id: CONTRACT-001
|
|
3
|
+
feature_id: F-2099-903
|
|
4
|
+
title: Scaffold sample — fe-with-api — API 契约
|
|
5
|
+
description: 冻结 docs/contracts/F-2099-903/api.md;正式 consumers 仅为 BE-IMPL-001 与 FE-IMPL-001。
|
|
6
|
+
repo:
|
|
7
|
+
name: loop-agent
|
|
8
|
+
path_ref: .
|
|
9
|
+
default_branch: main
|
|
10
|
+
type: architecture
|
|
11
|
+
priority: P1
|
|
12
|
+
risk_level: low
|
|
13
|
+
depends_on: []
|
|
14
|
+
source_docs:
|
|
15
|
+
requirement: ../requirement.md
|
|
16
|
+
acceptance: ../acceptance.yaml
|
|
17
|
+
design: ../design.md
|
|
18
|
+
acceptance_refs:
|
|
19
|
+
- AC-001
|
|
20
|
+
scope:
|
|
21
|
+
goals:
|
|
22
|
+
- 冻结 API 契约文档
|
|
23
|
+
- 声明正式 consumers 仅为 BE-IMPL / FE-IMPL
|
|
24
|
+
non_goals:
|
|
25
|
+
- 不扩展到模板外的 Task 节点(无 BE-TEST/FE-TEST/FINAL-VERIFY)
|
|
26
|
+
assumptions:
|
|
27
|
+
- verify.commands 由 scaffold 调用方显式提供
|
|
28
|
+
open_questions: []
|
|
29
|
+
constraints:
|
|
30
|
+
allowed_paths:
|
|
31
|
+
- docs/contracts/F-2099-903/api.md
|
|
32
|
+
- docs/progress/F-2099-903/contract/status.md
|
|
33
|
+
- docs/progress/F-2099-903/contract/**
|
|
34
|
+
forbidden_paths:
|
|
35
|
+
- config/prod/**
|
|
36
|
+
- .env
|
|
37
|
+
- .env.*
|
|
38
|
+
- secrets/**
|
|
39
|
+
- services/**
|
|
40
|
+
- apps/**
|
|
41
|
+
hard_constraints:
|
|
42
|
+
- 不读取生产密钥
|
|
43
|
+
- 不绕过 scaffold 冻结的 depends/produces/consumes
|
|
44
|
+
execution:
|
|
45
|
+
workflow: agent-dag
|
|
46
|
+
verify:
|
|
47
|
+
preset: standard
|
|
48
|
+
mode: serial
|
|
49
|
+
quota: full
|
|
50
|
+
commands:
|
|
51
|
+
- id: verify-1
|
|
52
|
+
label: npm run typecheck
|
|
53
|
+
command: npm run typecheck
|
|
54
|
+
required: true
|
|
55
|
+
timeout_ms: 300000
|
|
56
|
+
- id: verify-2
|
|
57
|
+
label: npm test
|
|
58
|
+
command: npm test
|
|
59
|
+
required: true
|
|
60
|
+
timeout_ms: 300000
|
|
61
|
+
worker:
|
|
62
|
+
execution_mode: generate-validate-run
|
|
63
|
+
max_attempts: 1
|
|
64
|
+
timeout_ms: 7200000
|
|
65
|
+
require_clean_worktree: true
|
|
66
|
+
require_human_review: true
|
|
67
|
+
create_worktree: false
|
|
68
|
+
loop_agent:
|
|
69
|
+
profile_policy: mapped
|
|
70
|
+
strict_models: true
|
|
71
|
+
strict_governance: true
|
|
72
|
+
max_concurrent: 1
|
|
73
|
+
outputs:
|
|
74
|
+
required:
|
|
75
|
+
- dag_json
|
|
76
|
+
- dag_validate_json
|
|
77
|
+
- run_record
|
|
78
|
+
- dag_report_json
|
|
79
|
+
- shell_verification
|
|
80
|
+
- closeout_or_failure_handoff
|
|
81
|
+
failure_policy:
|
|
82
|
+
failed_run_promote: false
|
|
83
|
+
generate_closeout_draft: true
|
|
84
|
+
create_followup_task: true
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
schema_version: 1
|
|
2
|
+
id: FE-IMPL-001
|
|
3
|
+
feature_id: F-2099-903
|
|
4
|
+
title: Scaffold sample — fe-with-api — 前端实现
|
|
5
|
+
description: Generated snapshot for
|
|
6
|
+
docs/templates/product-line/scaffold-samples. Not a live dogfood Feature.
|
|
7
|
+
repo:
|
|
8
|
+
name: loop-agent
|
|
9
|
+
path_ref: .
|
|
10
|
+
default_branch: main
|
|
11
|
+
type: frontend-feature
|
|
12
|
+
priority: P2
|
|
13
|
+
risk_level: medium
|
|
14
|
+
capabilities:
|
|
15
|
+
- interactive-ui
|
|
16
|
+
depends_on:
|
|
17
|
+
- CONTRACT-001
|
|
18
|
+
source_docs:
|
|
19
|
+
requirement: ../requirement.md
|
|
20
|
+
acceptance: ../acceptance.yaml
|
|
21
|
+
design: ../design.md
|
|
22
|
+
acceptance_refs:
|
|
23
|
+
- AC-001
|
|
24
|
+
scope:
|
|
25
|
+
goals:
|
|
26
|
+
- 按契约实现前端
|
|
27
|
+
non_goals:
|
|
28
|
+
- 不扩展到模板外的 Task 节点(无 BE-TEST/FE-TEST/FINAL-VERIFY)
|
|
29
|
+
assumptions:
|
|
30
|
+
- verify.commands 由 scaffold 调用方显式提供
|
|
31
|
+
open_questions: []
|
|
32
|
+
constraints:
|
|
33
|
+
allowed_paths:
|
|
34
|
+
- apps/web/src/sample-api/**
|
|
35
|
+
- docs/progress/F-2099-903/fe/status.md
|
|
36
|
+
- docs/progress/F-2099-903/fe/**
|
|
37
|
+
forbidden_paths:
|
|
38
|
+
- config/prod/**
|
|
39
|
+
- .env
|
|
40
|
+
- .env.*
|
|
41
|
+
- secrets/**
|
|
42
|
+
- services/**
|
|
43
|
+
hard_constraints:
|
|
44
|
+
- 不读取生产密钥
|
|
45
|
+
- 不绕过 scaffold 冻结的 depends/produces/consumes
|
|
46
|
+
execution:
|
|
47
|
+
workflow: frontend-implementation
|
|
48
|
+
verify:
|
|
49
|
+
preset: standard
|
|
50
|
+
mode: serial
|
|
51
|
+
quota: full
|
|
52
|
+
commands:
|
|
53
|
+
- id: verify-1
|
|
54
|
+
label: npm run typecheck
|
|
55
|
+
command: npm run typecheck
|
|
56
|
+
required: true
|
|
57
|
+
timeout_ms: 300000
|
|
58
|
+
- id: verify-2
|
|
59
|
+
label: npm test
|
|
60
|
+
command: npm test
|
|
61
|
+
required: true
|
|
62
|
+
timeout_ms: 300000
|
|
63
|
+
worker:
|
|
64
|
+
execution_mode: generate-validate-run
|
|
65
|
+
max_attempts: 1
|
|
66
|
+
timeout_ms: 7200000
|
|
67
|
+
require_clean_worktree: true
|
|
68
|
+
require_human_review: true
|
|
69
|
+
create_worktree: false
|
|
70
|
+
loop_agent:
|
|
71
|
+
profile_policy: mapped
|
|
72
|
+
strict_models: true
|
|
73
|
+
strict_governance: true
|
|
74
|
+
max_concurrent: 1
|
|
75
|
+
outputs:
|
|
76
|
+
required:
|
|
77
|
+
- dag_json
|
|
78
|
+
- dag_validate_json
|
|
79
|
+
- run_record
|
|
80
|
+
- dag_report_json
|
|
81
|
+
- shell_verification
|
|
82
|
+
- closeout_or_failure_handoff
|
|
83
|
+
failure_policy:
|
|
84
|
+
failed_run_promote: false
|
|
85
|
+
generate_closeout_draft: true
|
|
86
|
+
create_followup_task: true
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
schema_version: 1
|
|
2
|
+
feature_id: F-2099-903
|
|
3
|
+
nodes:
|
|
4
|
+
- id: CONTRACT-001
|
|
5
|
+
task: CONTRACT-001.yaml
|
|
6
|
+
type: architecture
|
|
7
|
+
depends_on: []
|
|
8
|
+
produces:
|
|
9
|
+
- kind: api-contract
|
|
10
|
+
schemaId: api-contract-v1
|
|
11
|
+
path: docs/contracts/F-2099-903/api.md
|
|
12
|
+
- id: BE-IMPL-001
|
|
13
|
+
task: BE-IMPL-001.yaml
|
|
14
|
+
type: backend-feature
|
|
15
|
+
depends_on:
|
|
16
|
+
- CONTRACT-001
|
|
17
|
+
consumes:
|
|
18
|
+
- kind: api-contract
|
|
19
|
+
schemaId: api-contract-v1
|
|
20
|
+
producerTaskId: CONTRACT-001
|
|
21
|
+
produces:
|
|
22
|
+
- kind: backend-impl
|
|
23
|
+
schemaId: backend-impl-v1
|
|
24
|
+
path: services/sample-api
|
|
25
|
+
- id: FE-IMPL-001
|
|
26
|
+
task: FE-IMPL-001.yaml
|
|
27
|
+
type: frontend-feature
|
|
28
|
+
depends_on:
|
|
29
|
+
- CONTRACT-001
|
|
30
|
+
consumes:
|
|
31
|
+
- kind: api-contract
|
|
32
|
+
schemaId: api-contract-v1
|
|
33
|
+
producerTaskId: CONTRACT-001
|
|
34
|
+
produces:
|
|
35
|
+
- kind: frontend-impl
|
|
36
|
+
schemaId: frontend-impl-v1
|
|
37
|
+
path: apps/web/src/sample-api
|
|
38
|
+
parallel_policy:
|
|
39
|
+
max_parallel_tasks: 1
|
|
40
|
+
disallow_same_file_parallel_writes: true
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
schema_version: 1
|
|
2
|
+
feature_id: F-2099-902
|
|
3
|
+
acceptance:
|
|
4
|
+
- id: AC-001
|
|
5
|
+
title: Scaffold sample — frontend-only
|
|
6
|
+
priority: must
|
|
7
|
+
type: behavior
|
|
8
|
+
given: 需求与路径边界已冻结
|
|
9
|
+
when: Feature Packet 内实现任务完成
|
|
10
|
+
then: 验收目标达成且 verify.commands 通过
|
|
11
|
+
verification:
|
|
12
|
+
expected_task_refs:
|
|
13
|
+
- FE-IMPL-001
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Design — Scaffold sample — frontend-only
|
|
2
|
+
|
|
3
|
+
## Goals
|
|
4
|
+
|
|
5
|
+
Generated snapshot for docs/templates/product-line/scaffold-samples. Not a live dogfood Feature.
|
|
6
|
+
|
|
7
|
+
## Paths
|
|
8
|
+
|
|
9
|
+
- Frontend allowed paths:
|
|
10
|
+
- `apps/web/src/sample-frontend/**`
|
|
11
|
+
|
|
12
|
+
## Artifacts
|
|
13
|
+
|
|
14
|
+
- `FE-IMPL-001` produces `frontend-impl`
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
schema_version: 1
|
|
2
|
+
id: FE-IMPL-001
|
|
3
|
+
feature_id: F-2099-902
|
|
4
|
+
title: Scaffold sample — frontend-only — 前端实现
|
|
5
|
+
description: Generated snapshot for
|
|
6
|
+
docs/templates/product-line/scaffold-samples. Not a live dogfood Feature.
|
|
7
|
+
repo:
|
|
8
|
+
name: loop-agent
|
|
9
|
+
path_ref: .
|
|
10
|
+
default_branch: main
|
|
11
|
+
type: frontend-feature
|
|
12
|
+
priority: P2
|
|
13
|
+
risk_level: medium
|
|
14
|
+
capabilities:
|
|
15
|
+
- interactive-ui
|
|
16
|
+
depends_on: []
|
|
17
|
+
source_docs:
|
|
18
|
+
requirement: ../requirement.md
|
|
19
|
+
acceptance: ../acceptance.yaml
|
|
20
|
+
design: ../design.md
|
|
21
|
+
acceptance_refs:
|
|
22
|
+
- AC-001
|
|
23
|
+
scope:
|
|
24
|
+
goals:
|
|
25
|
+
- 实现前端变更并满足验收
|
|
26
|
+
non_goals:
|
|
27
|
+
- 不扩展到模板外的 Task 节点(无 BE-TEST/FE-TEST/FINAL-VERIFY)
|
|
28
|
+
assumptions:
|
|
29
|
+
- verify.commands 由 scaffold 调用方显式提供
|
|
30
|
+
open_questions: []
|
|
31
|
+
constraints:
|
|
32
|
+
allowed_paths:
|
|
33
|
+
- apps/web/src/sample-frontend/**
|
|
34
|
+
- docs/progress/F-2099-902/fe/status.md
|
|
35
|
+
- docs/progress/F-2099-902/fe/**
|
|
36
|
+
forbidden_paths:
|
|
37
|
+
- config/prod/**
|
|
38
|
+
- .env
|
|
39
|
+
- .env.*
|
|
40
|
+
- secrets/**
|
|
41
|
+
- services/**
|
|
42
|
+
hard_constraints:
|
|
43
|
+
- 不读取生产密钥
|
|
44
|
+
- 不绕过 scaffold 冻结的 depends/produces/consumes
|
|
45
|
+
execution:
|
|
46
|
+
workflow: frontend-implementation
|
|
47
|
+
verify:
|
|
48
|
+
preset: standard
|
|
49
|
+
mode: serial
|
|
50
|
+
quota: full
|
|
51
|
+
commands:
|
|
52
|
+
- id: verify-1
|
|
53
|
+
label: npm run typecheck
|
|
54
|
+
command: npm run typecheck
|
|
55
|
+
required: true
|
|
56
|
+
timeout_ms: 300000
|
|
57
|
+
- id: verify-2
|
|
58
|
+
label: npm test
|
|
59
|
+
command: npm test
|
|
60
|
+
required: true
|
|
61
|
+
timeout_ms: 300000
|
|
62
|
+
worker:
|
|
63
|
+
execution_mode: generate-validate-run
|
|
64
|
+
max_attempts: 1
|
|
65
|
+
timeout_ms: 7200000
|
|
66
|
+
require_clean_worktree: true
|
|
67
|
+
require_human_review: true
|
|
68
|
+
create_worktree: false
|
|
69
|
+
loop_agent:
|
|
70
|
+
profile_policy: mapped
|
|
71
|
+
strict_models: true
|
|
72
|
+
strict_governance: true
|
|
73
|
+
max_concurrent: 1
|
|
74
|
+
outputs:
|
|
75
|
+
required:
|
|
76
|
+
- dag_json
|
|
77
|
+
- dag_validate_json
|
|
78
|
+
- run_record
|
|
79
|
+
- dag_report_json
|
|
80
|
+
- shell_verification
|
|
81
|
+
- closeout_or_failure_handoff
|
|
82
|
+
failure_policy:
|
|
83
|
+
failed_run_promote: false
|
|
84
|
+
generate_closeout_draft: true
|
|
85
|
+
create_followup_task: true
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
schema_version: 1
|
|
2
|
+
feature_id: F-2099-902
|
|
3
|
+
nodes:
|
|
4
|
+
- id: FE-IMPL-001
|
|
5
|
+
task: FE-IMPL-001.yaml
|
|
6
|
+
type: frontend-feature
|
|
7
|
+
depends_on: []
|
|
8
|
+
produces:
|
|
9
|
+
- kind: frontend-impl
|
|
10
|
+
schemaId: frontend-impl-v1
|
|
11
|
+
path: apps/web/src/sample-frontend
|
|
12
|
+
parallel_policy:
|
|
13
|
+
max_parallel_tasks: 1
|
|
14
|
+
disallow_same_file_parallel_writes: true
|