@fitlab-ai/agent-infra 0.11.15 → 0.12.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/bin/cli.ts +1 -1
- package/dist/bin/cli.js +1 -1
- package/dist/bin/internal-cli.js +6 -1
- package/dist/lib/agent-clients/adapters/codex-lifecycle/recovery.js +6 -6
- package/dist/lib/agent-clients/adapters/codex-lifecycle/store.js +8 -18
- package/dist/lib/agent-clients/adapters/codex-orchestration.js +1 -1
- package/dist/lib/decide.js +2 -7
- package/dist/lib/internal/cli-route-inventory.js +3 -0
- package/dist/lib/internal/manual-validation.js +19 -33
- package/dist/lib/internal/platform-comment.js +59 -9
- package/dist/lib/internal/task-activity.js +1 -12
- package/dist/lib/internal/task-event.js +1 -12
- package/dist/lib/internal/task-ledger.js +1 -12
- package/dist/lib/internal/task-operation-registry.js +2 -1
- package/dist/lib/internal/task-qualification.js +6 -15
- package/dist/lib/internal/task-review.js +3 -16
- package/dist/lib/internal/task-short-id.js +2 -1
- package/dist/lib/internal/task-verify.js +1 -11
- package/dist/lib/internal/task-warning.js +1 -12
- package/dist/lib/internal/task-workspace.js +43 -0
- package/dist/lib/merge.js +4 -3
- package/dist/lib/platform/issue-comments.js +373 -267
- package/dist/lib/platform/issue-summary-content.js +112 -0
- package/dist/lib/platform/pr-change-report.js +175 -26
- package/dist/lib/platform/pr-summary-content.js +54 -0
- package/dist/lib/platform/pr-summary.js +321 -296
- package/dist/lib/platform/pull-requests.js +3 -15
- package/dist/lib/platform/summary-content-pipeline.js +18 -0
- package/dist/lib/pr-review/evidence-grading.js +3 -2
- package/dist/lib/process-data/index.js +5 -4
- package/dist/lib/process-data/sources.js +6 -0
- package/dist/lib/run/index.js +3 -2
- package/dist/lib/sandbox/commands/create.js +5 -1
- package/dist/lib/sandbox/commands/enter.js +1 -1
- package/dist/lib/sandbox/commands/list-running.js +2 -1
- package/dist/lib/sandbox/control/client.js +8 -13
- package/dist/lib/sandbox/control/completed-reentry.js +2 -1
- package/dist/lib/sandbox/control/task-view.js +4 -2
- package/dist/lib/sandbox/mounts.js +4 -4
- package/dist/lib/sandbox/recovery.js +26 -16
- package/dist/lib/sandbox/removal.js +62 -12
- package/dist/lib/sandbox/task-resolver.js +9 -6
- package/dist/lib/sandbox/workspace-identity.js +6 -5
- package/dist/lib/sandbox/workspace-view.js +29 -22
- package/dist/lib/task/activity-intent.js +2 -12
- package/dist/lib/task/artifact-lifecycle.js +17 -11
- package/dist/lib/task/artifact-operations.js +41 -49
- package/dist/lib/task/capabilities.js +2 -2
- package/dist/lib/task/commands/ls.js +4 -3
- package/dist/lib/task/commands/status.js +1 -1
- package/dist/lib/task/commit-operation.js +6 -6
- package/dist/lib/task/control-authority.js +32 -32
- package/dist/lib/task/create-service.js +2 -4
- package/dist/lib/task/create.js +12 -65
- package/dist/lib/task/delegation-receipts.js +1 -1
- package/dist/lib/task/delivery.js +2 -8
- package/dist/lib/task/events.js +5 -31
- package/dist/lib/task/finalization.js +33 -29
- package/dist/lib/task/lifecycle.js +9 -48
- package/dist/lib/task/local-artifact-finalization.js +1 -2
- package/dist/lib/task/orchestration.js +24 -57
- package/dist/lib/task/platform-operation-recovery.js +87 -88
- package/dist/lib/task/resolve-ref.js +17 -12
- package/dist/lib/task/review-finalization.js +2 -35
- package/dist/lib/task/review-identity.js +3 -1
- package/dist/lib/task/short-id.js +10 -8
- package/dist/lib/task/verification-engine.js +19 -58
- package/dist/lib/task/workspace-root.js +59 -0
- package/dist/lib/task/workspace-snapshot.js +4 -3
- package/dist/lifecycle-build-manifest.json +3 -3
- package/lib/agent-clients/adapters/codex-lifecycle/recovery.ts +6 -6
- package/lib/agent-clients/adapters/codex-lifecycle/store.ts +8 -34
- package/lib/agent-clients/adapters/codex-orchestration.ts +1 -1
- package/lib/decide.ts +2 -7
- package/lib/internal/cli-route-inventory.ts +2 -0
- package/lib/internal/manual-validation.ts +20 -37
- package/lib/internal/platform-comment.ts +49 -6
- package/lib/internal/task-activity.ts +1 -10
- package/lib/internal/task-event.ts +1 -10
- package/lib/internal/task-ledger.ts +1 -10
- package/lib/internal/task-operation-registry.ts +2 -1
- package/lib/internal/task-qualification.ts +5 -11
- package/lib/internal/task-review.ts +3 -14
- package/lib/internal/task-short-id.ts +2 -1
- package/lib/internal/task-verify.ts +1 -9
- package/lib/internal/task-warning.ts +1 -10
- package/lib/internal/task-workspace.ts +39 -0
- package/lib/merge.ts +4 -3
- package/lib/platform/issue-comments.ts +478 -280
- package/lib/platform/issue-summary-content.ts +132 -0
- package/lib/platform/pr-change-report.ts +165 -20
- package/lib/platform/pr-summary-content.ts +60 -0
- package/lib/platform/pr-summary.ts +367 -269
- package/lib/platform/pull-requests.ts +3 -24
- package/lib/platform/summary-content-pipeline.ts +23 -0
- package/lib/pr-review/evidence-grading.ts +3 -2
- package/lib/process-data/index.ts +4 -3
- package/lib/process-data/sources.ts +6 -0
- package/lib/run/index.ts +3 -2
- package/lib/sandbox/commands/create.ts +5 -1
- package/lib/sandbox/commands/enter.ts +1 -1
- package/lib/sandbox/commands/list-running.ts +2 -1
- package/lib/sandbox/control/client.ts +7 -12
- package/lib/sandbox/control/completed-reentry.ts +2 -1
- package/lib/sandbox/control/task-view.ts +4 -2
- package/lib/sandbox/mounts.ts +4 -4
- package/lib/sandbox/recovery.ts +26 -18
- package/lib/sandbox/removal.ts +60 -27
- package/lib/sandbox/task-resolver.ts +9 -6
- package/lib/sandbox/workspace-identity.ts +6 -5
- package/lib/sandbox/workspace-view.ts +28 -20
- package/lib/task/activity-intent.ts +3 -17
- package/lib/task/artifact-lifecycle.ts +39 -11
- package/lib/task/artifact-operations.ts +28 -35
- package/lib/task/capabilities.ts +2 -2
- package/lib/task/commands/ls.ts +4 -3
- package/lib/task/commands/status.ts +1 -1
- package/lib/task/commit-operation.ts +5 -6
- package/lib/task/control-authority.ts +29 -35
- package/lib/task/create-service.ts +2 -4
- package/lib/task/create.ts +10 -51
- package/lib/task/delegation-receipts.ts +1 -1
- package/lib/task/delivery.ts +2 -10
- package/lib/task/events.ts +5 -32
- package/lib/task/finalization.ts +27 -30
- package/lib/task/lifecycle.ts +9 -50
- package/lib/task/local-artifact-finalization.ts +1 -4
- package/lib/task/orchestration.ts +31 -80
- package/lib/task/platform-operation-recovery.ts +70 -82
- package/lib/task/resolve-ref.ts +18 -12
- package/lib/task/review-finalization.ts +2 -52
- package/lib/task/review-identity.ts +3 -1
- package/lib/task/short-id.ts +10 -8
- package/lib/task/verification-engine.ts +20 -62
- package/lib/task/workspace-root.ts +78 -0
- package/lib/task/workspace-snapshot.ts +4 -3
- package/package.json +1 -1
- package/templates/.agents/QUICKSTART.en.md +19 -8
- package/templates/.agents/QUICKSTART.zh-CN.md +19 -8
- package/templates/.agents/README.en.md +10 -15
- package/templates/.agents/README.zh-CN.md +9 -13
- package/templates/.agents/rules/issue-sync.en.md +1 -1
- package/templates/.agents/rules/issue-sync.zh-CN.md +1 -1
- package/templates/.agents/rules/lifecycle-orchestration.en.md +1 -1
- package/templates/.agents/rules/lifecycle-orchestration.zh-CN.md +1 -1
- package/templates/.agents/rules/next-step-output.en.md +2 -2
- package/templates/.agents/rules/next-step-output.zh-CN.md +2 -2
- package/templates/.agents/rules/pr-sync.en.md +5 -3
- package/templates/.agents/rules/pr-sync.zh-CN.md +7 -10
- package/templates/.agents/rules/release-commands.en.md +3 -0
- package/templates/.agents/rules/release-commands.zh-CN.md +3 -0
- package/templates/.agents/rules/task-management.en.md +0 -2
- package/templates/.agents/rules/task-management.zh-CN.md +0 -2
- package/templates/.agents/rules/task-short-id.en.md +2 -2
- package/templates/.agents/rules/task-short-id.zh-CN.md +2 -2
- package/templates/.agents/scripts/task-short-id.js +2 -8
- package/templates/.agents/skills/analyze-task/SKILL.en.md +6 -6
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +6 -6
- package/templates/.agents/skills/analyze-task/config/verify.en.json +0 -1
- package/templates/.agents/skills/analyze-task/config/verify.zh-CN.json +0 -1
- package/templates/.agents/skills/archive-tasks/SKILL.en.md +5 -5
- package/templates/.agents/skills/archive-tasks/SKILL.zh-CN.md +5 -5
- package/templates/.agents/skills/archive-tasks/scripts/archive-tasks.sh +10 -2
- package/templates/.agents/skills/block-task/SKILL.en.md +4 -4
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +5 -5
- package/templates/.agents/skills/block-task/config/verify.json +0 -1
- package/templates/.agents/skills/cancel-task/SKILL.en.md +7 -7
- package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +7 -7
- package/templates/.agents/skills/cancel-task/config/verify.json +0 -1
- package/templates/.agents/skills/code-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/code-task/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/code-task/config/verify.en.json +0 -1
- package/templates/.agents/skills/code-task/config/verify.zh-CN.json +0 -1
- package/templates/.agents/skills/code-task/reference/output-template.en.md +1 -1
- package/templates/.agents/skills/code-task/reference/output-template.zh-CN.md +1 -1
- package/templates/.agents/skills/commit/SKILL.en.md +1 -1
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/commit/config/verify.json +0 -1
- package/templates/.agents/skills/commit/reference/commit-orchestration.en.md +2 -2
- package/templates/.agents/skills/commit/reference/commit-orchestration.zh-CN.md +2 -2
- package/templates/.agents/skills/commit/reference/pr-summary-sync.en.md +2 -2
- package/templates/.agents/skills/commit/reference/pr-summary-sync.zh-CN.md +2 -2
- package/templates/.agents/skills/complete-manual-validation/SKILL.en.md +2 -2
- package/templates/.agents/skills/complete-manual-validation/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/complete-manual-validation/config/verify.en.json +0 -1
- package/templates/.agents/skills/complete-manual-validation/config/verify.zh-CN.json +0 -1
- package/templates/.agents/skills/complete-manual-validation/reference/summary-update.en.md +3 -3
- package/templates/.agents/skills/complete-manual-validation/reference/summary-update.zh-CN.md +3 -3
- package/templates/.agents/skills/complete-task/SKILL.en.md +15 -30
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +17 -32
- package/templates/.agents/skills/complete-task/config/verify.en.json +0 -1
- package/templates/.agents/skills/complete-task/config/verify.zh-CN.json +0 -1
- package/templates/.agents/skills/create-pr/SKILL.en.md +3 -3
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/create-pr/config/verify.json +0 -1
- package/templates/.agents/skills/create-pr/reference/change-report.en.md +10 -3
- package/templates/.agents/skills/create-pr/reference/change-report.zh-CN.md +10 -3
- package/templates/.agents/skills/create-pr/reference/comment-publish.en.md +3 -3
- package/templates/.agents/skills/create-pr/reference/comment-publish.zh-CN.md +3 -3
- package/templates/.agents/skills/create-release-note/SKILL.en.md +2 -2
- package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/create-task/SKILL.en.md +4 -22
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +4 -22
- package/templates/.agents/skills/create-task/config/verify.json +0 -1
- package/templates/.agents/skills/import-codescan/SKILL.en.md +1 -1
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/import-codescan/config/verify.json +0 -1
- package/templates/.agents/skills/import-dependabot/SKILL.en.md +3 -3
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/import-dependabot/config/verify.json +0 -1
- package/templates/.agents/skills/import-issue/SKILL.en.md +5 -5
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +5 -5
- package/templates/.agents/skills/import-issue/config/verify.json +0 -1
- package/templates/.agents/skills/plan-task/SKILL.en.md +5 -5
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +5 -5
- package/templates/.agents/skills/plan-task/config/verify.en.json +0 -1
- package/templates/.agents/skills/plan-task/config/verify.zh-CN.json +0 -1
- package/templates/.agents/skills/restore-task/SKILL.en.md +2 -2
- package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/restore-task/config/verify.json +0 -1
- package/templates/.agents/skills/review-analysis/SKILL.en.md +1 -1
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/review-analysis/config/verify.en.json +0 -1
- package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +0 -1
- package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +5 -5
- package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +5 -5
- package/templates/.agents/skills/review-code/SKILL.en.md +2 -2
- package/templates/.agents/skills/review-code/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/review-code/reference/output-templates.en.md +4 -4
- package/templates/.agents/skills/review-code/reference/output-templates.zh-CN.md +4 -4
- package/templates/.agents/skills/review-plan/SKILL.en.md +1 -1
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/review-plan/config/verify.en.json +0 -1
- package/templates/.agents/skills/review-plan/config/verify.zh-CN.json +0 -1
- package/templates/.agents/skills/review-plan/reference/output-templates.en.md +5 -5
- package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +5 -5
- package/templates/.agents/skills/review-pr/SKILL.en.md +2 -2
- package/templates/.agents/skills/review-pr/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/review-pr/config/verify.en.json +0 -1
- package/templates/.agents/skills/review-pr/config/verify.zh-CN.json +0 -1
- package/templates/.agents/skills/review-pr/reference/output-guidance.en.md +1 -1
- package/templates/.agents/skills/review-pr/reference/output-guidance.zh-CN.md +1 -1
- package/templates/.agents/skills/run-manual-validation/config/verify.en.json +0 -1
- package/templates/.agents/skills/run-manual-validation/config/verify.zh-CN.json +0 -1
- package/templates/.agents/skills/run-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/run-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/test/SKILL.en.md +0 -3
- package/templates/.agents/skills/test/SKILL.zh-CN.md +0 -3
- package/templates/.agents/skills/test-integration/SKILL.en.md +0 -3
- package/templates/.agents/skills/test-integration/SKILL.zh-CN.md +0 -3
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +13 -6
- package/templates/.agents/skills/upgrade-dependency/SKILL.en.md +0 -3
- package/templates/.agents/skills/upgrade-dependency/SKILL.zh-CN.md +0 -3
- package/templates/.agents/skills/watch-pr/SKILL.en.md +4 -4
- package/templates/.agents/skills/watch-pr/SKILL.zh-CN.md +4 -4
- package/templates/.agents/skills/watch-pr/config/verify.json +0 -1
- package/templates/.agents/skills/watch-pr/reference/monitor-and-heal.en.md +3 -3
- package/templates/.agents/skills/watch-pr/reference/monitor-and-heal.zh-CN.md +3 -3
- package/templates/.agents/templates/handoff.en.md +1 -1
- package/templates/.agents/templates/handoff.zh-CN.md +1 -1
- package/templates/.agents/workflows/bug-fix.en.yaml +1 -1
- package/templates/.agents/workflows/feature-development.en.yaml +1 -1
- package/templates/.agents/workflows/refactoring.en.yaml +1 -1
- package/dist/lib/task/task-execution-lock.js +0 -250
- package/lib/task/task-execution-lock.ts +0 -320
|
@@ -53,16 +53,23 @@ node -p "'v' + require('./package.json').version"
|
|
|
53
53
|
|
|
54
54
|
## 创建第一个任务
|
|
55
55
|
|
|
56
|
+
先通过统一 resolver 取得宿主任务根,供以下示例使用:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
TASK_WORKSPACE_ROOT=$(agent-infra-internal task-workspace resolve --boundary host | node -e 'let input="";process.stdin.setEncoding("utf8");process.stdin.on("data",chunk=>input+=chunk);process.stdin.on("end",()=>process.stdout.write(JSON.parse(input).root));')
|
|
60
|
+
```
|
|
61
|
+
|
|
56
62
|
1. 将任务模板复制到活跃工作区:
|
|
57
63
|
|
|
58
64
|
```bash
|
|
59
|
-
|
|
65
|
+
mkdir -p "$TASK_WORKSPACE_ROOT/active/TASK-20260101-120000"
|
|
66
|
+
cp .agents/templates/task.md "$TASK_WORKSPACE_ROOT/active/TASK-20260101-120000/task.md"
|
|
60
67
|
```
|
|
61
68
|
|
|
62
69
|
2. 填写任务元数据:
|
|
63
70
|
|
|
64
71
|
```yaml
|
|
65
|
-
id:
|
|
72
|
+
id: TASK-20260101-120000
|
|
66
73
|
type: feature # feature | bugfix | refactor | docs | chore
|
|
67
74
|
status: active # active | blocked | completed
|
|
68
75
|
assigned_to: claude # claude | codex | antigravity | opencode | human
|
|
@@ -92,7 +99,7 @@ Claude Code 擅长代码库探索和理解文件间的复杂关系。
|
|
|
92
99
|
agy
|
|
93
100
|
|
|
94
101
|
# 示例提示:
|
|
95
|
-
# "基于
|
|
102
|
+
# "基于 $TASK_WORKSPACE_ROOT/active/TASK-20260101-120000/task.md 中的分析结果,
|
|
96
103
|
# 创建技术设计方案。定义接口并概述实现思路。"
|
|
97
104
|
```
|
|
98
105
|
|
|
@@ -103,7 +110,7 @@ agy
|
|
|
103
110
|
codex
|
|
104
111
|
|
|
105
112
|
# 示例提示:
|
|
106
|
-
# "实现
|
|
113
|
+
# "实现 $TASK_WORKSPACE_ROOT/active/TASK-20260101-120000/task.md 中描述的变更。
|
|
107
114
|
# 遵循设计部分。为此工作创建新分支。"
|
|
108
115
|
```
|
|
109
116
|
|
|
@@ -130,7 +137,8 @@ claude
|
|
|
130
137
|
|
|
131
138
|
```bash
|
|
132
139
|
# 快速缺陷修复工作流
|
|
133
|
-
|
|
140
|
+
mkdir -p "$TASK_WORKSPACE_ROOT/active/TASK-20260101-120000"
|
|
141
|
+
cp .agents/templates/task.md "$TASK_WORKSPACE_ROOT/active/TASK-20260101-120000/task.md"
|
|
134
142
|
# 编辑任务,然后:
|
|
135
143
|
# 1. 使用 Claude Code 分析
|
|
136
144
|
# 2. 使用 Codex/OpenCode 修复
|
|
@@ -144,7 +152,8 @@ cp .agents/templates/task.md .agents/workspace/active/bugfix-001.md
|
|
|
144
152
|
3. **报告**:从模板生成审查报告。
|
|
145
153
|
|
|
146
154
|
```bash
|
|
147
|
-
|
|
155
|
+
mkdir -p "$TASK_WORKSPACE_ROOT/active/TASK-20260101-120001"
|
|
156
|
+
cp .agents/templates/review-report.md "$TASK_WORKSPACE_ROOT/active/TASK-20260101-120001/review-report.md"
|
|
148
157
|
# 使用 Claude Code 填写审查内容
|
|
149
158
|
```
|
|
150
159
|
|
|
@@ -156,7 +165,8 @@ cp .agents/templates/review-report.md .agents/workspace/active/review-pr-42.md
|
|
|
156
165
|
4. **验证**(Claude Code):确保没有回归问题,运行测试。
|
|
157
166
|
|
|
158
167
|
```bash
|
|
159
|
-
|
|
168
|
+
mkdir -p "$TASK_WORKSPACE_ROOT/active/TASK-20260101-120002"
|
|
169
|
+
cp .agents/templates/task.md "$TASK_WORKSPACE_ROOT/active/TASK-20260101-120002/task.md"
|
|
160
170
|
# 按照 .agents/workflows/refactoring.yaml 中的重构工作流执行
|
|
161
171
|
```
|
|
162
172
|
|
|
@@ -165,7 +175,8 @@ cp .agents/templates/task.md .agents/workspace/active/refactor-001.md
|
|
|
165
175
|
在 AI 工具之间切换时,创建交接文档:
|
|
166
176
|
|
|
167
177
|
```bash
|
|
168
|
-
|
|
178
|
+
mkdir -p "$TASK_WORKSPACE_ROOT/active/TASK-20260101-120003"
|
|
179
|
+
cp .agents/templates/handoff.md "$TASK_WORKSPACE_ROOT/active/TASK-20260101-120003/handoff.md"
|
|
169
180
|
```
|
|
170
181
|
|
|
171
182
|
填写:
|
|
@@ -35,24 +35,19 @@ This dual-config approach ensures every AI tool receives appropriate project con
|
|
|
35
35
|
code-review.yaml # Code review workflow
|
|
36
36
|
refactoring.yaml # Refactoring workflow
|
|
37
37
|
rules/ # Collaboration rule index (see rules/README.md)
|
|
38
|
-
workspace/ # Runtime workspace (git-ignored)
|
|
39
|
-
active/ # Currently active tasks
|
|
40
|
-
blocked/ # Blocked tasks
|
|
41
|
-
completed/ # Completed tasks
|
|
42
|
-
logs/ # Collaboration logs
|
|
43
|
-
|
|
44
38
|
.claude/ # Claude Code specific config
|
|
45
39
|
CLAUDE.md # Project instructions for Claude
|
|
46
40
|
commands/ # Slash commands
|
|
47
41
|
settings.json # Claude settings
|
|
48
42
|
```
|
|
49
43
|
|
|
50
|
-
The
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
44
|
+
The host task workspace root is `~/.agent-infra/task-workspaces/<project-key>`;
|
|
45
|
+
the container root is `/task-workspace`. Resolve the current host root with
|
|
46
|
+
`agent-infra-internal task-workspace resolve --boundary host` and a task's exact
|
|
47
|
+
directory with `agent-infra-internal task-context resolve --task <task-id>`.
|
|
48
|
+
`active/`, `blocked/`, `completed/`, `archive/`, and `active/.short-ids.json` live
|
|
49
|
+
under that root and contain runtime data. The `<task-workspace>` placeholder used
|
|
50
|
+
in these guides means the resolver's returned root; it is not a repository path.
|
|
56
51
|
|
|
57
52
|
## Collaboration Model
|
|
58
53
|
|
|
@@ -101,7 +96,7 @@ Each AI tool has different strengths. Use them accordingly:
|
|
|
101
96
|
## Quick Start
|
|
102
97
|
|
|
103
98
|
1. **Read the quick start guide**: See `QUICKSTART.md` for step-by-step instructions.
|
|
104
|
-
2. **Create a task**:
|
|
99
|
+
2. **Create a task**: Use the `create-task` workflow; the host writes task data to the project task root.
|
|
105
100
|
3. **Assign to an AI**: Update the `assigned_to` field in the task metadata.
|
|
106
101
|
4. **Run the workflow**: Follow the appropriate workflow in `.agents/workflows/`.
|
|
107
102
|
5. **Hand off**: When switching AIs, create a handoff document from the template.
|
|
@@ -386,7 +381,7 @@ No. Claude Code reads from `.claude/CLAUDE.md`, and all other tools read from `A
|
|
|
386
381
|
|
|
387
382
|
### Q: How do tasks get passed between AI tools?
|
|
388
383
|
|
|
389
|
-
Through handoff documents stored in
|
|
384
|
+
Through handoff documents stored in `<task-workspace>/`. Each handoff includes context, progress, and next steps so the receiving AI can continue seamlessly.
|
|
390
385
|
|
|
391
386
|
### Q: What if an AI tool doesn't support AGENTS.md?
|
|
392
387
|
|
|
@@ -398,4 +393,4 @@ It's not recommended. The workflow model is sequential -- one AI per phase. Para
|
|
|
398
393
|
|
|
399
394
|
### Q: Where are runtime files stored?
|
|
400
395
|
|
|
401
|
-
In
|
|
396
|
+
In `<task-workspace>/`, which is git-ignored. Only templates and workflow definitions in `.agents/` are version-controlled.
|
|
@@ -35,22 +35,18 @@
|
|
|
35
35
|
code-review.yaml # 代码审查工作流
|
|
36
36
|
refactoring.yaml # 重构工作流
|
|
37
37
|
rules/ # 协作规则索引(见 rules/README.md)
|
|
38
|
-
workspace/ # 运行时工作区(已被 git ignore)
|
|
39
|
-
active/ # 当前活跃任务
|
|
40
|
-
blocked/ # 被阻塞的任务
|
|
41
|
-
completed/ # 已完成的任务
|
|
42
|
-
logs/ # 协作日志
|
|
43
|
-
|
|
44
38
|
.claude/ # Claude Code 专属配置
|
|
45
39
|
CLAUDE.md # Claude 项目指令
|
|
46
40
|
commands/ # 斜杠命令
|
|
47
41
|
settings.json # Claude 设置
|
|
48
42
|
```
|
|
49
43
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
44
|
+
宿主任务根为 `~/.agent-infra/task-workspaces/<project-key>`,容器任务根为
|
|
45
|
+
`/task-workspace`。使用 `agent-infra-internal task-workspace resolve --boundary host`
|
|
46
|
+
取得当前项目的宿主根,使用 `agent-infra-internal task-context resolve --task <task-id>`
|
|
47
|
+
取得某个任务的精确目录。`active/`、`blocked/`、`completed/`、`archive/` 和
|
|
48
|
+
`active/.short-ids.json` 都位于任务根中;这些路径只保存运行时数据,不通过 Git
|
|
49
|
+
共享。文中的 `<task-workspace>` 表示由上述 resolver 返回的根,不是仓库内目录。
|
|
54
50
|
|
|
55
51
|
## 协作模型
|
|
56
52
|
|
|
@@ -99,7 +95,7 @@
|
|
|
99
95
|
## 快速入门
|
|
100
96
|
|
|
101
97
|
1. **阅读快速入门指南**:参见 `QUICKSTART.md` 获取分步说明。
|
|
102
|
-
2.
|
|
98
|
+
2. **创建任务**:通过 `create-task` 工作流创建任务;任务数据由宿主写入项目任务根。
|
|
103
99
|
3. **分配给 AI**:更新任务元数据中的 `assigned_to` 字段。
|
|
104
100
|
4. **执行工作流**:按照 `.agents/workflows/` 中相应的工作流执行。
|
|
105
101
|
5. **交接**:切换 AI 时,从模板创建交接文档。
|
|
@@ -384,7 +380,7 @@ agent-infra-internal task-verify {task-id} <verification-event> [--artifact <art
|
|
|
384
380
|
|
|
385
381
|
### Q:任务如何在 AI 工具之间传递?
|
|
386
382
|
|
|
387
|
-
通过存储在
|
|
383
|
+
通过存储在 `<task-workspace>/` 中的交接文档。每份交接文档包含上下文、进度和后续步骤,让接收方 AI 能无缝接续。
|
|
388
384
|
|
|
389
385
|
### Q:如果某个 AI 工具不支持 AGENTS.md 怎么办?
|
|
390
386
|
|
|
@@ -396,4 +392,4 @@ agent-infra-internal task-verify {task-id} <verification-event> [--artifact <art
|
|
|
396
392
|
|
|
397
393
|
### Q:运行时文件存储在哪里?
|
|
398
394
|
|
|
399
|
-
在
|
|
395
|
+
在 `<task-workspace>/` 中,该目录已被 git ignore。只有 `.agents/` 中的模板和工作流定义受版本控制。
|
|
@@ -22,7 +22,7 @@ Comments use `platform-comment`; Issue resources use `platform-issue`:
|
|
|
22
22
|
```bash
|
|
23
23
|
agent-infra-internal platform-comment list --issue <issue-token> [--cwd <path>]
|
|
24
24
|
agent-infra-internal platform-comment recover --issue <issue-token> --task-id <TASK-id> \
|
|
25
|
-
--output
|
|
25
|
+
--output <<task-workspace>/.restore-staging-*/task.md> [--cwd <path>]
|
|
26
26
|
agent-infra-internal platform-issue inspect {task-id}
|
|
27
27
|
agent-infra-internal platform-issue create {task-id} --agent {standard-agent-token}
|
|
28
28
|
agent-infra-internal platform-issue bind {task-id} --issue {issue-token} --agent {standard-agent-token}
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
agent-infra-internal platform-context resolve [--cwd <path>]
|
|
27
27
|
agent-infra-internal platform-comment list --issue <issue-token> [--cwd <path>]
|
|
28
28
|
agent-infra-internal platform-comment recover --issue <issue-token> --task-id <TASK-id> \
|
|
29
|
-
--output
|
|
29
|
+
--output <<task-workspace>/.restore-staging-*/task.md> [--cwd <path>]
|
|
30
30
|
agent-infra-internal platform-comment owner <task-ref>
|
|
31
31
|
agent-infra-internal platform-comment sync <task-ref> \
|
|
32
32
|
--kind task|artifact|summary|cancel --agent {standard-agent-token} \
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
## Current Execution Records
|
|
12
12
|
|
|
13
|
-
`orchestration.json` records stages, model policy, child identity, and actual outcomes. Records use the current structure; trusted local operators may correct them and rerun validation.
|
|
13
|
+
`orchestration.json` records stages, model policy, child identity, and actual outcomes. Records use the current structure; trusted local operators may correct them and rerun validation. Stages for one task run sequentially; atomic writes and identity/state validation continue to protect state updates.
|
|
14
14
|
|
|
15
15
|
## Current Host
|
|
16
16
|
|
|
@@ -17,7 +17,7 @@ This file defines three **independent** rules for a skill's "notify-user / Next
|
|
|
17
17
|
|
|
18
18
|
- **Next-step TUI commands** (`/analyze-task`, `/{{project}}:review-code`, `$create-pr`, etc., including commands inside Markdown table cells) → always use `{task-ref}` (short id).
|
|
19
19
|
- **"Task info" / "Task status" structured field lines** → show full id and short id together: `- Task ID: {task-id} (short id {task-ref})`.
|
|
20
|
-
- **Report titles** (`Task {task-id} ... completed`) and **artifact paths** (
|
|
20
|
+
- **Report titles** (`Task {task-id} ... completed`) and **artifact paths** (`<task-workspace>/active/{task-id}/...`) → keep the full `{task-id}` (physical path and archive key, must not change).
|
|
21
21
|
|
|
22
22
|
## Unified Client Command Rendering
|
|
23
23
|
|
|
@@ -39,7 +39,7 @@ agent-infra-internal agent-client next-steps \
|
|
|
39
39
|
|
|
40
40
|
## Obtaining the short id (`{task-ref}`)
|
|
41
41
|
|
|
42
|
-
The single source of truth for short ids is the registry
|
|
42
|
+
The single source of truth for short ids is the registry `<task-workspace>/active/.short-ids.json` (via `task-short-id.js`). **Never** read the `short_id` field from task.md frontmatter (that field is not authoritative).
|
|
43
43
|
|
|
44
44
|
Once the full `$task_id` is resolved, use the snippet below to look up the short id; it returns bare `NN` on hit and falls back to the full `TASK-id` on miss:
|
|
45
45
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
- **下一步 TUI 命令**(`/analyze-task`、`/{{project}}:review-code`、`$create-pr` 等,含 Markdown 表格单元格内的命令)→ 一律用 `{task-ref}`(短号)。
|
|
19
19
|
- **「任务信息」/「任务状态」结构化字段行** → 完整 ID 与短号同显:`- 任务 ID:{task-id}(短号 {task-ref})`。
|
|
20
|
-
- **报告标题**(`任务 {task-id} ...
|
|
20
|
+
- **报告标题**(`任务 {task-id} ... 完成`)与**产出文件路径**(`<task-workspace>/active/{task-id}/...`)→ 保持完整 `{task-id}`(物理路径与归档键,不可改)。
|
|
21
21
|
|
|
22
22
|
## 统一客户端命令渲染
|
|
23
23
|
|
|
@@ -39,7 +39,7 @@ agent-infra-internal agent-client next-steps \
|
|
|
39
39
|
|
|
40
40
|
## 取短号(`{task-ref}`)
|
|
41
41
|
|
|
42
|
-
短号唯一真源是注册表
|
|
42
|
+
短号唯一真源是注册表 `<task-workspace>/active/.short-ids.json`(经 `task-short-id.js`)。**禁止**读取 task.md frontmatter 的 `short_id` 字段(该字段不可信)。
|
|
43
43
|
|
|
44
44
|
在已解析出完整 `$task_id` 后,用以下片段反查短号;命中返回裸数字 `NN`,未命中自动回退完整 `TASK-id`:
|
|
45
45
|
|
|
@@ -21,11 +21,11 @@ agent-infra-internal platform-pr change-report {task-id} \
|
|
|
21
21
|
|
|
22
22
|
agent-infra-internal platform-pr summary-sync {task-id} \
|
|
23
23
|
--agent {standard-agent-token} --body-file {summary-body-file} \
|
|
24
|
-
--change-report-file
|
|
24
|
+
--change-report-file <task-workspace>/active/{task-id}/pr-change-report.json \
|
|
25
25
|
--result {primary-result}
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
Use only canonical inputs returned by the context command. The precheck must contain file evidence for six fixed checks; `formalReview` is always false and `needs-review` routes to `review-code`.
|
|
28
|
+
Use only canonical inputs returned by the context command. The precheck must contain file evidence for six fixed checks; `formalReview` is always false and `needs-review` routes to `review-code`. Generate a typed JSON payload with `overview:string`, `tests:{state,detail}`, `review:{state,detail}`, `manualValidation:{state,detail}`, `humanDecisions:{open,resolved,detail}`, and `risks:string`. Detail fields are non-empty, counts are non-negative integers, and structure checks do not assess semantic quality. Use `not-started`/`pending` for tests that have not started, `none`/`not-observed`/`not-published` for absent or unobserved remote Reviews, and `pending` for manual validation that has not run. Human-decision counts come from the task ledger. The renderer supplies fixed sections and the canonical report placeholder. The core validates the task-intent digest, bound PR identity, complete patch SHA, and mechanical totals before rendering the report, then owns markers, HEAD metadata, and create/update/no-op behavior.
|
|
29
29
|
|
|
30
30
|
The canonical comment envelope produced by the core is:
|
|
31
31
|
|
|
@@ -40,7 +40,9 @@ The canonical comment envelope produced by the core is:
|
|
|
40
40
|
### PR Code Changes
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
Canonical inputs include `manual-validation.md`. The manual-validation
|
|
43
|
+
Canonical inputs include `manual-validation.md`. The manual-validation `state` can be `required`, `pending`, `passed`, `none`/`not-required`, or `not-observed`. English headings such as `### ⚠️ Manual Verification Required`, `### ✅ Manual Validation Passed`, and `### ✅ No Manual Verification Needed` are documentation labels; the current renderer emits Chinese headings. `complete-manual-validation` refreshes the same summary in place. The PR code-change section uses authoritative base/head facts from `platform-pr inspect` and the complete `git diff --find-renames --numstat base...head`, reconciles runtime, test, skill/rule, template, documentation, and other categories, and explains renames, mechanical mirrors, and potentially unnecessary changes. The core renderer supplies the canonical `### PR Code Changes` section. After publishing, the core reads comments back and requires one summary marker with a body that exactly matches the canonical rendered body; mismatch or read failure uses the existing coordinator/recovery path.
|
|
44
|
+
|
|
45
|
+
Examples include `required`, `pending`, `passed`, `none`/`not-required`, and `not-observed`; this list is illustrative, not exhaustive. The renderer also accepts `unavailable` and other non-empty states through its existing fallback. English headings below are documentation labels; the current renderer emits the stated Chinese headings. `required` retains each item, location, and reason under `### ⚠️ 需人工校验`. `pending` means validation has not started or remains incomplete and renders as `### ⏳ 人工验证待收尾`. `passed` (`### ✅ Manual Validation Passed` in this documentation; `### ✅ 人工验证已通过` from the renderer) is publishable only through the final `complete-manual-validation` coordinator after it writes a valid receipt. Preserve the receipt marker bound to the transaction, receipt, evidence, and current PR head; never infer passed status from summary text or another state. `none`/`not-required` renders as `### ✅ 无需人工校验` only when no manual item is required and carries no passed receipt. `not-observed` means the state has not been read and renders as `### ℹ️ 尚未读取人工校验状态`.
|
|
44
46
|
|
|
45
47
|
```bash
|
|
46
48
|
agent-infra-internal task-warning {task-id} add --step {step} --severity WARNING \
|
|
@@ -18,17 +18,14 @@ PR 摘要的语义聚合由模型完成;任务意图 digest、完整三点 dif
|
|
|
18
18
|
agent-infra-internal platform-pr summary-context {task-id}
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
只使用返回的 canonical latest `plan*`、`review-plan*`、`code*`、`review-code*`、`manual-validation*`(包括 `manual-validation.md
|
|
21
|
+
只使用返回的 canonical latest `plan*`、`review-plan*`、`code*`、`review-code*`、`manual-validation*`(包括 `manual-validation.md`)。模型生成 PR 专属 JSON payload:`overview:string`、`tests:{state,detail}`、`review:{state,detail}`、`manualValidation:{state,detail}`、`humanDecisions:{open,resolved,detail}`、`risks:string`。说明字段为非空字符串,计数为非负整数;结构校验不评价内容语义。
|
|
22
22
|
|
|
23
|
-
-
|
|
24
|
-
- 测试结果
|
|
25
|
-
- 审查历程与当前结论
|
|
26
|
-
- 人工校验三态:`### ⚠️ 需人工校验`、`### ✅ 人工验证已通过` 或 `### ✅ 无需人工校验`
|
|
27
|
-
- 变更摘要、实现范围、测试结果、审查历程和人工校验三态
|
|
28
|
-
- 一个 `<!-- canonical-pr-change-report -->` 占位符;`### PR 代码增减` 由 core renderer 基于权威 diff 生成,调用方不自行写标题或统计
|
|
23
|
+
测试尚未启动用 `not-started`/`pending`,暂无远端 Review 用 `none`/`not-observed`/`not-published`,待人工校验用 `pending`,不得渲染为通过或零值。决策计数来自当前任务账本。renderer 固定生成完整章节并加入一个 canonical 报告占位符;代码增减仍由现有 report renderer 输出。
|
|
29
24
|
|
|
30
25
|
保留人工校验项时,每条写明校验内容、定位和只能人工完成的原因。
|
|
31
26
|
|
|
27
|
+
例如可见状态包括 `required`、`pending`、`passed`、`none`/`not-required` 和 `not-observed`;这些是示例而非穷举。renderer 也接受 `unavailable` 及其他非空状态,并按现有 fallback 渲染。英文标题是文档标签;当前 renderer 输出下列中文标题:`required` 使用 `### ⚠️ 需人工校验` 并保留每项内容、定位和原因;`pending` 使用 `### ⏳ 人工验证待收尾`;`passed` 使用 `### ✅ 人工验证已通过`,但仅允许 `complete-manual-validation` 的 final coordinator 写入有效 receipt 后发布,并保留绑定 transaction、receipt、evidence 和当前 PR head 的凭据标记;不得根据摘要文字或其他状态推断通过。`none`/`not-required` 仅在无需人工校验时使用 `### ✅ 无需人工校验`,不附加通过凭据;`not-observed` 使用 `### ℹ️ 尚未读取人工校验状态`。
|
|
28
|
+
|
|
32
29
|
core 最终包装出的 canonical 评论结构为:
|
|
33
30
|
|
|
34
31
|
```markdown
|
|
@@ -54,16 +51,16 @@ precheck 必须覆盖六项固定检查并提供文件证据;`formalReview`
|
|
|
54
51
|
|
|
55
52
|
## 发布
|
|
56
53
|
|
|
57
|
-
|
|
54
|
+
把聚合后的 JSON payload 写入 `{summary-body-file}`,不要自行添加 marker 或 commit SHA:
|
|
58
55
|
|
|
59
56
|
```bash
|
|
60
57
|
agent-infra-internal platform-pr summary-sync {task-id} \
|
|
61
58
|
--agent {standard-agent-token} --body-file {summary-body-file} \
|
|
62
|
-
--change-report-file
|
|
59
|
+
--change-report-file <task-workspace>/active/{task-id}/pr-change-report.json \
|
|
63
60
|
--result {primary-result}
|
|
64
61
|
```
|
|
65
62
|
|
|
66
|
-
|
|
63
|
+
core 校验结构后插入报告占位符,重新校验任务意图 digest、PR identity、完整 patch SHA 和机械统计,生成报告段,再包装 marker 与权威 HEAD。发布后使用 `comments.list` 回读并要求唯一 marker 和正文完全匹配;不符或读取失败沿用现有 coordinator/recovery。payload 通过文件输入,调用方不得拼 shell/heredoc。
|
|
67
64
|
|
|
68
65
|
## 结果回传
|
|
69
66
|
|
|
@@ -19,6 +19,9 @@ The result contains `history`, `pullRequests`, `closingIssues`, and commit `auth
|
|
|
19
19
|
- Render an identity as `@login` only when `resolution` is `platform-user` or `platform-noreply` and `login` is non-empty.
|
|
20
20
|
- Exclude `resolution: unresolved` identities from the release-note contributor list. Never infer a login from a name, email address, domain, brand, or same-named platform account, and never substitute a guessed personal or organization account.
|
|
21
21
|
- Do not publish unresolved identity emails or identity-verification TODOs in Release notes. Record any required investigation outside the release workflow without creating a platform mention.
|
|
22
|
+
- Use plain-text `@login` mentions in Release notes; do not wrap mentions in Markdown links.
|
|
23
|
+
- **Dependabot-specific normalization**: Typed context may return the same Dependabot automation account as `app/dependabot` or `dependabot[bot]`. For these resolved identities, render release-note items and Contributors as plain-text `@dependabot`, and merge counts under the normalized `@dependabot`. Do not output `@app/dependabot` or `@dependabot[bot]`, and do not turn `@dependabot` into a Markdown link.
|
|
24
|
+
- This Dependabot mapping is an explicit exception for this project's Release notes. Use the typed `login` for all other identities; do not infer mappings from brands or similar names.
|
|
22
25
|
|
|
23
26
|
## Stage Release Notes
|
|
24
27
|
|
|
@@ -19,6 +19,9 @@ agent-infra-internal platform-release-notes context \
|
|
|
19
19
|
- 只有 `resolution` 为 `platform-user` 或 `platform-noreply` 且 `login` 非空的身份可以渲染为 `@login`。
|
|
20
20
|
- `resolution: unresolved` 的身份不得进入发布说明的贡献者列表;不得从 Name、邮箱、域名、品牌或同名平台账号推断 login,也不得替换成推测的个人或组织账号。
|
|
21
21
|
- 不得把未解析身份的邮箱或身份确认 TODO 写入可发布的 Release notes。需要调查时仅在发布流程外记录,不得产生平台 mention。
|
|
22
|
+
- Release notes 中的 mention 使用纯文本 `@login`,不要用 Markdown 链接包装 mention。
|
|
23
|
+
- **Dependabot 专用规范化**:typed context 可能将同一 Dependabot 自动化账号返回为 `app/dependabot` 或 `dependabot[bot]`。对于 `resolution` 已解析的这些身份,发布说明条目和 Contributors 统一使用纯文本 `@dependabot`;按规范化后的 `@dependabot` 合并计数。不要输出 `@app/dependabot` 或 `@dependabot[bot]`,也不要把 `@dependabot` 改成 Markdown 链接。
|
|
24
|
+
- 该 Dependabot 映射是本项目发布说明的明确例外;其他身份继续使用 typed `login`,不得按品牌或相似名称类推。
|
|
22
25
|
|
|
23
26
|
## Stage Release notes
|
|
24
27
|
|
|
@@ -86,8 +86,6 @@ Other skills continue past deferrable writes according to their local delivery g
|
|
|
86
86
|
|
|
87
87
|
**Human counts** (`ai task log`): review step rows fold two human counts into the NOTE verdict text, comma-separated, right after `blockers/major/minor`, with fixed English labels `Manual-validation: {e}, Human-decision: {h}`. `Human-decision` (`{h}`) maps canonical step prefixes (`Review Analysis` / `Review Plan` / `Review Code`) to `analysis` / `plan` / `code`, then counts current pending rows in `## Review Disagreement Ledger` / `## 审查分歧账本` for that stage with `status = needs-human-decision`, excluding rows already marked `human-decided`. `Manual-validation` (`{e}`) parses the `Manual-validation: {n}` source field from the review done note (normalized to the same field when displayed), defaulting to `0`. Non-review rows carry no human counts.
|
|
88
88
|
|
|
89
|
-
**Gate** (`checkActivityLog`): when computing the "latest action / freshness" it skips `[started]` lines (ascending-order and format checks still cover every line), so a started marker never satisfies a skill's `expected_action_pattern`.
|
|
90
|
-
|
|
91
89
|
**Skills that write started**: every workflow skill that **appends entries to a task's `## Activity Log`** writes started, so the STARTED column stays uniformly complete across the whole `ai task log` table. Two forms, depending on whether task.md already exists:
|
|
92
90
|
|
|
93
91
|
- **Standard form (task.md already exists)** — append the started line when that round's real work begins (after prerequisites, before the first artifact action) and the done line on completion:
|
|
@@ -89,8 +89,6 @@
|
|
|
89
89
|
|
|
90
90
|
**人工计数**(`ai task log`):审查步骤行把两项人工计数并入 NOTE 的 verdict 文本,逗号分隔、紧随 `blockers/major/minor`,固定英文标签 `Manual-validation: {e}, Human-decision: {h}`。`Human-decision`(`{h}`)按 canonical 步骤名前缀(`Review Analysis` / `Review Plan` / `Review Code`)映射到 `analysis` / `plan` / `code`,统计 `## 审查分歧账本` 中对应阶段 `status = needs-human-decision` 的当前待裁决数量,不包含已 `human-decided` 的行;`Manual-validation`(`{e}`)解析 review done note 中的 `Manual-validation: {n}` 源字段(展示时归一化为同一字段),缺失为 `0`。非审查步骤不附加人工计数。
|
|
91
91
|
|
|
92
|
-
**gate**(`checkActivityLog`):计算「最新 action / freshness」时跳过 `[started]` 行(升序与格式校验仍覆盖全部行),故 started 标记不会污染各 SKILL 的 `expected_action_pattern`。
|
|
93
|
-
|
|
94
92
|
**写 started 的 SKILL**:所有**会向某个任务的 `## 活动日志` 追加条目**的工作流 SKILL 都写 started,保证 `ai task log` 整张表的 STARTED 列一致完整。两种写法按技能是否已有 task.md 区分:
|
|
95
93
|
|
|
96
94
|
- **常规写法(task.md 已存在)**——在「该轮实质工作开始时」(前置条件确认后、第一个产出动作前)追加 started 行,完成时写 done 行:
|
|
@@ -87,9 +87,9 @@ fi
|
|
|
87
87
|
## Storage
|
|
88
88
|
|
|
89
89
|
Short ids are pure local state, persisted only in the registry
|
|
90
|
-
|
|
90
|
+
`<task-workspace>/active/.short-ids.json`; task.md does not hold the short id:
|
|
91
91
|
|
|
92
|
-
- Path: `<
|
|
92
|
+
- Path: `<task-workspace>/active/.short-ids.json`
|
|
93
93
|
- Schema: `{ "version": 1, "ids": { "01": "TASK-20260609-192644", "02": "TASK-…" } }`
|
|
94
94
|
- Keys are zero-padded decimal strings of `task.shortIdLength` digits; values are
|
|
95
95
|
full `TASK-…` task ids.
|
|
@@ -75,9 +75,9 @@ fi
|
|
|
75
75
|
|
|
76
76
|
## 存储位置
|
|
77
77
|
|
|
78
|
-
短号是纯本地状态,唯一持久化在注册表
|
|
78
|
+
短号是纯本地状态,唯一持久化在注册表 `<task-workspace>/active/.short-ids.json`,task.md 不持有短号:
|
|
79
79
|
|
|
80
|
-
- 路径:`<
|
|
80
|
+
- 路径:`<task-workspace>/active/.short-ids.json`
|
|
81
81
|
- Schema:`{ "version": 1, "ids": { "01": "TASK-20260609-192644", "02": "TASK-…" } }`
|
|
82
82
|
- key 是零填充到 `task.shortIdLength` 位的字符串,value 是完整 `TASK-…` task id
|
|
83
83
|
- 自动 git ignore(active 工作区整体 ignore;无需新增 ignore 条目)
|
|
@@ -57,22 +57,16 @@ if (args.includes("--help") || args.includes("-h")) {
|
|
|
57
57
|
}
|
|
58
58
|
const repoRoot = findRepoRoot(process.cwd());
|
|
59
59
|
const forwarded = [...args];
|
|
60
|
-
if (!forwarded.includes("--active-dir")) {
|
|
61
|
-
if (!repoRoot) {
|
|
62
|
-
fs.writeSync(2, "Error: cannot determine active task directory\n");
|
|
63
|
-
process.exit(1);
|
|
64
|
-
}
|
|
65
|
-
forwarded.push("--active-dir", path.join(repoRoot, ".agents", "workspace", "active"));
|
|
66
|
-
}
|
|
67
60
|
if (!forwarded.includes("--short-id-length")) {
|
|
68
61
|
forwarded.push("--short-id-length", String(configuredWidth(repoRoot)));
|
|
69
62
|
}
|
|
70
63
|
const sourceCli = findSourceCli();
|
|
71
64
|
const installedCli = resolveCommand("agent-infra-internal");
|
|
72
65
|
const child = sourceCli
|
|
73
|
-
? spawnSync(process.execPath, ["--experimental-strip-types", sourceCli, "task-short-id", ...forwarded], { encoding: "utf8" })
|
|
66
|
+
? spawnSync(process.execPath, ["--experimental-strip-types", sourceCli, "task-short-id", ...forwarded], { cwd: repoRoot || process.cwd(), encoding: "utf8" })
|
|
74
67
|
: spawnSync(installedCli, ["task-short-id", ...forwarded], {
|
|
75
68
|
encoding: "utf8",
|
|
69
|
+
cwd: repoRoot || process.cwd(),
|
|
76
70
|
shell: process.platform === "win32" && /\.(?:bat|cmd)$/i.test(installedCli)
|
|
77
71
|
});
|
|
78
72
|
if (child.error) {
|
|
@@ -57,7 +57,7 @@ After resolving the artifact context and before this round's first artifact acti
|
|
|
57
57
|
### 1. Verify Prerequisites
|
|
58
58
|
|
|
59
59
|
Check required files:
|
|
60
|
-
-
|
|
60
|
+
- `<task-workspace>/active/{task-id}/task.md` - Task file
|
|
61
61
|
|
|
62
62
|
Note: `{task-id}` format is `TASK-{yyyyMMdd-HHmmss}`, for example `TASK-20260306-143022`
|
|
63
63
|
|
|
@@ -119,7 +119,7 @@ Runs after Step 0 state check and Step 3 (questioning is an external-state actio
|
|
|
119
119
|
- otherwise (no pending question) → pick the single highest-value question (acceptance criteria > scope > ambiguity) and write `## Brainstorming`: `status: asking`, `pending_question: <question>`, `question_count += 1`.
|
|
120
120
|
2. If `start_date` is empty, write today (`date +%F`), then run `agent-infra-internal task-event {task-id} analyze.awaiting-input --agent {standard-agent-token} --question {question_count}` so the core updates base metadata and Activity Log.
|
|
121
121
|
3. Issue sync (when a valid `platform_issue_identity` exists, skip on any failure): run `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}` to update only the **task comment**; keep the `status` label at `pending-design-work`; do **not** publish an analysis artifact comment.
|
|
122
|
-
4. Verification (replaces the step 8 artifact gate): `agent-infra-internal task-verify {task-id} analyze.awaiting-input --format text` (the early-exit set `current_step: requirement-analysis` and wrote `start_date`, so it should pass); also keep `rg -n 'Analyze Task \(Brainstorming\)'
|
|
122
|
+
4. Verification (replaces the step 8 artifact gate): `agent-infra-internal task-verify {task-id} analyze.awaiting-input --format text` (the early-exit set `current_step: requirement-analysis` and wrote `start_date`, so it should pass); also keep `rg -n 'Analyze Task \(Brainstorming\)' <task-workspace>/active/{task-id}/task.md` and the task-comment sync evidence. Do **not** run the artifact gate, nor `check activity-log` / `check platform-sync` (both bind to the analysis artifact path).
|
|
123
123
|
5. User output: show only the current **single question** plus how to answer/continue (re-trigger `analyze-task {task-ref}` with the answer).
|
|
124
124
|
6. **STOP** and wait for the answer. The next trigger returns to this step.
|
|
125
125
|
|
|
@@ -148,7 +148,7 @@ The skeleton contains identity metadata, stable section markers, and required he
|
|
|
148
148
|
|
|
149
149
|
> Steps 6–9 are the **Scenario A (normal output)** path. **Scenario B (ask and early-exit)** already finished its state update, task-comment sync, and verification inside step 4 and STOPped, so it does not enter these steps.
|
|
150
150
|
|
|
151
|
-
Create
|
|
151
|
+
Create `<task-workspace>/active/{task-id}/{analysis-artifact}`.
|
|
152
152
|
|
|
153
153
|
## Output Template
|
|
154
154
|
|
|
@@ -221,7 +221,7 @@ Create `.agents/workspace/active/{task-id}/{analysis-artifact}`.
|
|
|
221
221
|
|
|
222
222
|
### 7. Update Task Status
|
|
223
223
|
|
|
224
|
-
Update
|
|
224
|
+
Update `<task-workspace>/active/{task-id}/task.md`:
|
|
225
225
|
- Record the analysis artifact for this round: `{analysis-artifact}` (Round `{analysis-round}`)
|
|
226
226
|
- If the task template contains a `## Analysis` section, update it to link to `{analysis-artifact}`
|
|
227
227
|
- Mark requirement-analysis as complete in workflow progress and include the actual round when the task template supports it
|
|
@@ -290,7 +290,7 @@ Summary:
|
|
|
290
290
|
- Risk level: {assessment}
|
|
291
291
|
|
|
292
292
|
Output file:
|
|
293
|
-
- Analysis report:
|
|
293
|
+
- Analysis report: <task-workspace>/active/{task-id}/{analysis-artifact}
|
|
294
294
|
|
|
295
295
|
Next step - continue on the selected path:
|
|
296
296
|
{next-step-commands}
|
|
@@ -299,7 +299,7 @@ Next step - continue on the selected path:
|
|
|
299
299
|
## Completion Checklist
|
|
300
300
|
|
|
301
301
|
- [ ] Read and understood the task file and source information
|
|
302
|
-
- [ ] Created analysis document
|
|
302
|
+
- [ ] Created analysis document `<task-workspace>/active/{task-id}/{analysis-artifact}`
|
|
303
303
|
- [ ] Updated `current_step` to requirement-analysis in task.md
|
|
304
304
|
- [ ] Updated `updated_at` to the current time in task.md
|
|
305
305
|
- [ ] Updated `assigned_to` in task.md
|
|
@@ -60,7 +60,7 @@ agent-infra-internal task-event {task-id} analyze.started --agent {standard-agen
|
|
|
60
60
|
### 1. 验证前置条件
|
|
61
61
|
|
|
62
62
|
检查必要文件:
|
|
63
|
-
-
|
|
63
|
+
- `<task-workspace>/active/{task-id}/task.md` - 任务文件
|
|
64
64
|
|
|
65
65
|
注意:`{task-id}` 格式为 `TASK-{yyyyMMdd-HHmmss}`,例如 `TASK-20260306-143022`
|
|
66
66
|
|
|
@@ -122,7 +122,7 @@ agent-infra-internal task-event {task-id} analyze.started --agent {standard-agen
|
|
|
122
122
|
- 否则(无待答问题)→ 选最高价值的一个问题(验收标准 > 范围 > 歧义),写入 `## Brainstorming`:`status: asking`、`pending_question: <问题>`、`question_count += 1`。
|
|
123
123
|
2. 若 `start_date` 为空,写入当日日期(`date +%F`);随后执行 `agent-infra-internal task-event {task-id} analyze.awaiting-input --agent {standard-agent-token} --question {question_count}`,由核心统一更新基础 frontmatter 和 Activity Log。
|
|
124
124
|
3. Issue 同步(存在有效 `platform_issue_identity` 时,任一失败跳过):调用 `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}` 更新 **task 评论**;`status` label 维持 `pending-design-work`;**不**发布分析产物评论。
|
|
125
|
-
4. 校验(替代步骤 8 的 artifact gate):`agent-infra-internal task-verify {task-id} analyze.awaiting-input --format text`(早退已置 `current_step: requirement-analysis` 且已写入 `start_date`,预期通过);并保留 `rg -n 'Analyze Task \(Brainstorming\)'
|
|
125
|
+
4. 校验(替代步骤 8 的 artifact gate):`agent-infra-internal task-verify {task-id} analyze.awaiting-input --format text`(早退已置 `current_step: requirement-analysis` 且已写入 `start_date`,预期通过);并保留 `rg -n 'Analyze Task \(Brainstorming\)' <task-workspace>/active/{task-id}/task.md` 与 task 评论同步证据。**不**跑 artifact gate,也不跑 `check activity-log` / `check platform-sync`(二者绑定分析产物路径)。
|
|
126
126
|
5. 用户输出:只展示当前**单个问题** + 如何回答/继续(再次触发 `analyze-task {task-ref}` 并附答案)。
|
|
127
127
|
6. **STOP**,等待回答。下一次触发回到本步骤。
|
|
128
128
|
|
|
@@ -151,7 +151,7 @@ agent-infra-internal task-artifact {task-id} init --family analysis --artifact {
|
|
|
151
151
|
|
|
152
152
|
> 步骤 6–9 属**场景 A(正常产出)**路径。**场景 B(提问早退)**已在步骤 4 内完成状态更新、task 评论同步与校验并 STOP,不进入这些步骤。
|
|
153
153
|
|
|
154
|
-
创建
|
|
154
|
+
创建 `<task-workspace>/active/{task-id}/{analysis-artifact}`。
|
|
155
155
|
|
|
156
156
|
## 输出模板
|
|
157
157
|
|
|
@@ -228,7 +228,7 @@ agent-infra-internal task-artifact {task-id} init --family analysis --artifact {
|
|
|
228
228
|
|
|
229
229
|
### 7. 更新任务状态
|
|
230
230
|
|
|
231
|
-
更新
|
|
231
|
+
更新 `<task-workspace>/active/{task-id}/task.md`:
|
|
232
232
|
- 仅更新优先级、Brainstorming、审查响应等本技能拥有的业务内容;产物链接、阶段与完成日志由 completed 事件统一登记
|
|
233
233
|
- 在追加工作流 Activity Log 条目之前,基于分析结果(业务影响、风险、依赖、阻塞条件)重估 `priority`。若重估值与 `task.md` 当前值不一致:
|
|
234
234
|
- 用新值覆盖 frontmatter 的 `priority` 字段
|
|
@@ -288,7 +288,7 @@ agent-infra-internal task-verify {task-id} analyze.completed --artifact {analysi
|
|
|
288
288
|
- 风险等级:{评估}
|
|
289
289
|
|
|
290
290
|
产出文件:
|
|
291
|
-
-
|
|
291
|
+
- 分析报告:<task-workspace>/active/{task-id}/{analysis-artifact}
|
|
292
292
|
|
|
293
293
|
下一步 - 按所选路径继续:
|
|
294
294
|
{next-step-commands}
|
|
@@ -297,7 +297,7 @@ agent-infra-internal task-verify {task-id} analyze.completed --artifact {analysi
|
|
|
297
297
|
## 完成检查清单
|
|
298
298
|
|
|
299
299
|
- [ ] 阅读并理解了任务文件和来源信息
|
|
300
|
-
- [ ] 创建了分析文档
|
|
300
|
+
- [ ] 创建了分析文档 `<task-workspace>/active/{task-id}/{analysis-artifact}`
|
|
301
301
|
- [ ] 更新了 task.md 中的 `current_step` 为 requirement-analysis
|
|
302
302
|
- [ ] 更新了 task.md 中的 `updated_at` 为当前时间
|
|
303
303
|
- [ ] 更新了 task.md 中的 `assigned_to`
|
|
@@ -7,16 +7,16 @@ description: >
|
|
|
7
7
|
|
|
8
8
|
# Archive Completed Tasks
|
|
9
9
|
|
|
10
|
-
Archive completed tasks from
|
|
11
|
-
- root manifest:
|
|
12
|
-
- yearly manifest:
|
|
13
|
-
- monthly manifest:
|
|
10
|
+
Archive completed tasks from `<task-workspace>/completed/` into `<task-workspace>/archive/YYYY/MM/DD/TASK-xxx/local/` and rebuild a three-level archive index. Local task materials live in `local/` with a path-sorted `contents.sha256`; the TASK root contains no ordinary files.
|
|
11
|
+
- root manifest: `<task-workspace>/archive/manifest.md`
|
|
12
|
+
- yearly manifest: `<task-workspace>/archive/YYYY/manifest.md`
|
|
13
|
+
- monthly manifest: `<task-workspace>/archive/YYYY/MM/manifest.md`
|
|
14
14
|
|
|
15
15
|
## Execution Flow
|
|
16
16
|
|
|
17
17
|
### 1. Verify the environment
|
|
18
18
|
|
|
19
|
-
Confirm that
|
|
19
|
+
Confirm that `<task-workspace>/completed/` exists, then choose one of these four invocation modes:
|
|
20
20
|
- no arguments: archive every completed task
|
|
21
21
|
- `--days N`: keep the most recent `N` days and archive older tasks
|
|
22
22
|
- `--before YYYY-MM-DD`: archive only tasks completed before the given date
|