@fitlab-ai/agent-infra 0.7.4 → 0.7.5
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 +13 -11
- package/dist/bin/cli.js +13 -11
- package/dist/lib/init.js +1 -1
- package/dist/lib/merge.js +1 -1
- package/dist/lib/sandbox/index.js +21 -21
- package/dist/lib/task/index.js +13 -13
- package/dist/lib/update.js +1 -1
- package/lib/init.ts +1 -1
- package/lib/merge.ts +1 -1
- package/lib/sandbox/index.ts +21 -21
- package/lib/task/index.ts +13 -13
- package/lib/update.ts +1 -1
- package/package.json +1 -1
- package/templates/.agents/rules/README.en.md +7 -3
- package/templates/.agents/rules/README.zh-CN.md +7 -3
- package/templates/.agents/rules/cli-help-format.en.md +49 -0
- package/templates/.agents/rules/cli-help-format.zh-CN.md +49 -0
- package/templates/.agents/rules/no-mid-flow-questions.en.md +14 -2
- package/templates/.agents/rules/no-mid-flow-questions.zh-CN.md +14 -2
- package/templates/.agents/rules/pr-sync.github.en.md +8 -6
- package/templates/.agents/rules/pr-sync.github.zh-CN.md +8 -6
- package/templates/.agents/rules/review-handshake.en.md +83 -0
- package/templates/.agents/rules/review-handshake.zh-CN.md +83 -0
- package/templates/.agents/scripts/lib/post-review-commit.js +56 -0
- package/templates/.agents/scripts/lib/review-artifacts.js +117 -0
- package/templates/.agents/scripts/review-diff-fingerprint.js +99 -0
- package/templates/.agents/scripts/validate-artifact.js +240 -0
- package/templates/.agents/skills/analyze-task/SKILL.en.md +52 -6
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +52 -6
- package/templates/.agents/skills/code-task/config/verify.en.json +3 -0
- package/templates/.agents/skills/code-task/config/verify.zh-CN.json +3 -0
- package/templates/.agents/skills/code-task/reference/fix-mode.en.md +5 -3
- package/templates/.agents/skills/code-task/reference/fix-mode.zh-CN.md +5 -3
- package/templates/.agents/skills/code-task/reference/report-template.en.md +4 -4
- package/templates/.agents/skills/code-task/reference/report-template.zh-CN.md +4 -4
- package/templates/.agents/skills/code-task/scripts/detect-mode.js +2 -107
- package/templates/.agents/skills/commit/SKILL.en.md +6 -0
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +6 -0
- package/templates/.agents/skills/commit/reference/task-status-update.en.md +8 -0
- package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +8 -0
- package/templates/.agents/skills/complete-task/SKILL.en.md +10 -0
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +10 -0
- package/templates/.agents/skills/complete-task/config/verify.en.json +2 -0
- package/templates/.agents/skills/complete-task/config/verify.zh-CN.json +2 -0
- package/templates/.agents/skills/create-pr/reference/comment-publish.en.md +1 -1
- package/templates/.agents/skills/create-pr/reference/comment-publish.zh-CN.md +1 -1
- package/templates/.agents/skills/plan-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/plan-task/config/verify.en.json +3 -0
- package/templates/.agents/skills/plan-task/config/verify.zh-CN.json +3 -0
- package/templates/.agents/skills/review-analysis/config/verify.en.json +2 -1
- package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +2 -1
- package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +5 -4
- package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +5 -4
- package/templates/.agents/skills/review-analysis/reference/report-template.en.md +4 -0
- package/templates/.agents/skills/review-analysis/reference/report-template.zh-CN.md +4 -0
- package/templates/.agents/skills/review-code/SKILL.en.md +4 -1
- package/templates/.agents/skills/review-code/SKILL.zh-CN.md +4 -1
- package/templates/.agents/skills/review-code/config/verify.en.json +5 -2
- package/templates/.agents/skills/review-code/config/verify.zh-CN.json +5 -2
- package/templates/.agents/skills/review-code/reference/output-templates.en.md +5 -4
- package/templates/.agents/skills/review-code/reference/output-templates.zh-CN.md +5 -4
- package/templates/.agents/skills/review-code/reference/report-template.en.md +6 -0
- package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +6 -0
- package/templates/.agents/skills/review-plan/config/verify.en.json +2 -1
- package/templates/.agents/skills/review-plan/config/verify.zh-CN.json +2 -1
- package/templates/.agents/skills/review-plan/reference/output-templates.en.md +5 -4
- package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +5 -4
- package/templates/.agents/skills/review-plan/reference/report-template.en.md +4 -0
- package/templates/.agents/skills/review-plan/reference/report-template.zh-CN.md +4 -0
- package/templates/.agents/templates/task.en.md +7 -0
- package/templates/.agents/templates/task.zh-CN.md +7 -0
- package/templates/.github/workflows/metadata-sync.yml +1 -1
- package/templates/.github/workflows/pr-label.yml +1 -1
- package/templates/.github/workflows/status-label.yml +1 -1
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
- **审查者**:{reviewer-name}
|
|
23
23
|
- **审查时间**:{timestamp}
|
|
24
24
|
- **审查范围**:{file-count and major modules}
|
|
25
|
+
- **审查基线提交**:{git rev-parse HEAD 原文}(complete-task 的 post-review commit 门禁基线;详见 `.agents/rules/review-handshake.md`)
|
|
26
|
+
- **审查差异指纹**:{node .agents/scripts/review-diff-fingerprint.js worktree HEAD 原文}
|
|
25
27
|
- **总体结论**:{通过 / 需要修改 / 拒绝}(恰取一个;禁止写组合短语,否则 verify gate 失败)
|
|
26
28
|
- **发现(AI 可处理)**:0 阻塞项,0 主要,0 次要 / **env-blocked**:0
|
|
27
29
|
|
|
@@ -60,6 +62,10 @@
|
|
|
60
62
|
> 如本轮无 env-blocked 项,保留段落标题并写「(无)」。
|
|
61
63
|
|
|
62
64
|
|
|
65
|
+
## 审查分歧账本回写
|
|
66
|
+
|
|
67
|
+
> 把本轮每条 finding upsert 到 task.md `## 审查分歧账本`:新 finding 追加 `open` 行(id 前缀 `CD-`,stage=code),对执行方上一轮响应按回交义务改 `confirmed` / 置回 `open` / `needs-human-decision`。状态机与证据规则见 `.agents/rules/review-handshake.md`。
|
|
68
|
+
|
|
63
69
|
## 证据原文
|
|
64
70
|
|
|
65
71
|
> 每条“我验证了 X”断言都要配对对应 tool output 原文;gate 仅校验本段存在和至少一行 `$ `。每条 Blocker 必须配可复现命令(rg/grep/sed/nl)及其原文;无法复现的判断须降级或移入「自我质疑」。
|
|
@@ -16,12 +16,13 @@ Rules:
|
|
|
16
16
|
- If `Blocker > 0`, never use an approved template
|
|
17
17
|
- Never count env-blocked items as blocker / major / minor or use them to trigger Scenario B/C/D
|
|
18
18
|
- The selected scenario must include all TUI command formats
|
|
19
|
+
- The count line always shows 4 numbers: the first three (Blockers / Major / Minor) must be 0 to proceed; the fourth, `Human-decision` (`{h}`), is the number of rows in task.md `## 审查分歧账本` with `stage=plan` and `status=needs-human-decision` — a "pending human ruling" item that need not be zero and does not participate in scenario selection
|
|
19
20
|
|
|
20
21
|
### Scenario A: Approved with no findings
|
|
21
22
|
|
|
22
23
|
```text
|
|
23
24
|
Task {task-id} technical plan review completed. Verdict: approved.
|
|
24
|
-
- Blockers: 0 | Major issues: 0 | Minor issues: 0
|
|
25
|
+
- Blockers: 0 | Major issues: 0 | Minor issues: 0 | Human-decision: {h}
|
|
25
26
|
[- Review report: .agents/workspace/active/{task-id}/{review-artifact}]
|
|
26
27
|
|
|
27
28
|
Next step - write code:
|
|
@@ -37,7 +38,7 @@ Reminder: env-blocked items belong in the PR description manual verification che
|
|
|
37
38
|
|
|
38
39
|
```text
|
|
39
40
|
Task {task-id} technical plan review completed. Verdict: approved.
|
|
40
|
-
- Blockers: 0 | Major issues: {n} | Minor issues: {n}
|
|
41
|
+
- Blockers: 0 | Major issues: {n} | Minor issues: {n} | Human-decision: {h}
|
|
41
42
|
- Review report: .agents/workspace/active/{task-id}/{review-artifact}
|
|
42
43
|
|
|
43
44
|
Next step - revise plan before coding (recommended):
|
|
@@ -58,7 +59,7 @@ Reminder: env-blocked items belong in the PR description manual verification che
|
|
|
58
59
|
|
|
59
60
|
```text
|
|
60
61
|
Task {task-id} technical plan review completed. Verdict: changes requested.
|
|
61
|
-
- Blockers: {n} | Major issues: {n} | Minor issues: {n}
|
|
62
|
+
- Blockers: {n} | Major issues: {n} | Minor issues: {n} | Human-decision: {h}
|
|
62
63
|
- Review report: .agents/workspace/active/{task-id}/{review-artifact}
|
|
63
64
|
|
|
64
65
|
Next step - revise technical plan:
|
|
@@ -74,7 +75,7 @@ Reminder: env-blocked items belong in the PR description manual verification che
|
|
|
74
75
|
|
|
75
76
|
```text
|
|
76
77
|
Task {task-id} technical plan review completed. Verdict: rejected, redesign required.
|
|
77
|
-
- Blockers: {n} | Major issues: {n} | Minor issues: {n}
|
|
78
|
+
- Blockers: {n} | Major issues: {n} | Minor issues: {n} | Human-decision: {h}
|
|
78
79
|
- Review report: .agents/workspace/active/{task-id}/{review-artifact}
|
|
79
80
|
|
|
80
81
|
Next step - redesign:
|
|
@@ -16,12 +16,13 @@
|
|
|
16
16
|
- 只要 `Blocker > 0`,就绝对不能输出通过模板
|
|
17
17
|
- env-blocked 项绝对不能被计入 blocker / major / minor 计数,也不能用作触发场景 B/C/D 的依据
|
|
18
18
|
- 所选场景中必须包含所有 TUI 命令格式
|
|
19
|
+
- 计数行固定显示 4 个数字:前三项(阻塞 / 主要 / 次要)必须为 0 才进下一步;第四项 `人工裁决`(`{h}`)= task.md `## 审查分歧账本` 中 `stage=plan` 且 `status=needs-human-decision` 的行数,是「待人裁」项、不要求归零,也不参与场景判断
|
|
19
20
|
|
|
20
21
|
### 场景 A:通过且无问题
|
|
21
22
|
|
|
22
23
|
```text
|
|
23
24
|
任务 {task-id} 技术方案审查完成。结论:通过。
|
|
24
|
-
- 阻塞项:0 | 主要问题:0 | 次要问题:0
|
|
25
|
+
- 阻塞项:0 | 主要问题:0 | 次要问题:0 | 人工裁决:{h}
|
|
25
26
|
[- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}]
|
|
26
27
|
|
|
27
28
|
下一步 - 编写代码:
|
|
@@ -37,7 +38,7 @@
|
|
|
37
38
|
|
|
38
39
|
```text
|
|
39
40
|
任务 {task-id} 技术方案审查完成。结论:通过。
|
|
40
|
-
- 阻塞项:0 | 主要问题:{n} | 次要问题:{n}
|
|
41
|
+
- 阻塞项:0 | 主要问题:{n} | 次要问题:{n} | 人工裁决:{h}
|
|
41
42
|
- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
|
|
42
43
|
|
|
43
44
|
下一步 - 修订方案后编码(推荐):
|
|
@@ -58,7 +59,7 @@
|
|
|
58
59
|
|
|
59
60
|
```text
|
|
60
61
|
任务 {task-id} 技术方案审查完成。结论:需要修改。
|
|
61
|
-
- 阻塞项:{n} | 主要问题:{n} | 次要问题:{n}
|
|
62
|
+
- 阻塞项:{n} | 主要问题:{n} | 次要问题:{n} | 人工裁决:{h}
|
|
62
63
|
- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
|
|
63
64
|
|
|
64
65
|
下一步 - 修订技术方案:
|
|
@@ -74,7 +75,7 @@
|
|
|
74
75
|
|
|
75
76
|
```text
|
|
76
77
|
任务 {task-id} 技术方案审查完成。结论:拒绝,需要重新设计。
|
|
77
|
-
- 阻塞项:{n} | 主要问题:{n} | 次要问题:{n}
|
|
78
|
+
- 阻塞项:{n} | 主要问题:{n} | 次要问题:{n} | 人工裁决:{h}
|
|
78
79
|
- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
|
|
79
80
|
|
|
80
81
|
下一步 - 重新设计:
|
|
@@ -59,6 +59,10 @@ Use this template when writing `review-plan.md` or `review-plan-r{N}.md`.
|
|
|
59
59
|
> If this round has no env-blocked findings, keep the section heading and write "None".
|
|
60
60
|
|
|
61
61
|
|
|
62
|
+
## Review Disagreement Ledger Writeback
|
|
63
|
+
|
|
64
|
+
> Upsert each finding this round into the task.md disagreement ledger: append an `open` row for new findings (id prefix `PL-`, stage=plan); per the hand-back duty set the executor's prior-round responses to `confirmed` / back to `open` / `needs-human-decision`. State machine and evidence rules: `.agents/rules/review-handshake.md`.
|
|
65
|
+
|
|
62
66
|
## Evidence
|
|
63
67
|
|
|
64
68
|
> Pair each "I verified X" claim with the corresponding raw tool output; the gate only checks that this section exists and at least one `$ ` line is present. Every Blocker must be backed by a reproducible command (rg/grep/sed/nl) and its raw output; a judgment that cannot be reproduced must be downgraded or moved to Self-Doubt.
|
|
@@ -60,6 +60,10 @@
|
|
|
60
60
|
> 如本轮无 env-blocked 项,保留段落标题并写「(无)」。
|
|
61
61
|
|
|
62
62
|
|
|
63
|
+
## 审查分歧账本回写
|
|
64
|
+
|
|
65
|
+
> 把本轮每条 finding upsert 到 task.md `## 审查分歧账本`:新 finding 追加 `open` 行(id 前缀 `PL-`,stage=plan),对执行方上一轮响应按回交义务改 `confirmed` / 置回 `open` / `needs-human-decision`。状态机与证据规则见 `.agents/rules/review-handshake.md`。
|
|
66
|
+
|
|
63
67
|
## 证据原文
|
|
64
68
|
|
|
65
69
|
> 每条“我验证了 X”断言都要配对对应 tool output 原文;gate 仅校验本段存在和至少一行 `$ `。每条 Blocker 必须配可复现命令(rg/grep/sed/nl)及其原文;无法复现的判断须降级或移入「自我质疑」。
|
|
@@ -53,6 +53,13 @@ pr_status: pending # PR status: pending (default) | created (PR crea
|
|
|
53
53
|
|
|
54
54
|
<!-- Populated by review-* -->
|
|
55
55
|
|
|
56
|
+
## Review Disagreement Ledger
|
|
57
|
+
|
|
58
|
+
<!-- One row per review finding; state machine / evidence rules in .agents/rules/review-handshake.md. The phase-advance and complete-task gates read this section. Keep the header when there are no disagreements. -->
|
|
59
|
+
|
|
60
|
+
| id | stage | round | severity | status | evidence |
|
|
61
|
+
|----|-------|-------|----------|--------|----------|
|
|
62
|
+
|
|
56
63
|
## Activity Log
|
|
57
64
|
|
|
58
65
|
<!-- Append a new entry for each workflow step. Do NOT overwrite previous entries. -->
|
|
@@ -53,6 +53,13 @@ pr_status: pending # PR 状态:pending(默认)| created(已
|
|
|
53
53
|
|
|
54
54
|
<!-- 由 review-* 填写 -->
|
|
55
55
|
|
|
56
|
+
## 审查分歧账本
|
|
57
|
+
|
|
58
|
+
<!-- 每条 review finding 一行;状态机/证据规则见 .agents/rules/review-handshake.md。阶段推进与 complete-task gate 读取本段。无分歧时保留表头即可。 -->
|
|
59
|
+
|
|
60
|
+
| id | stage | round | severity | status | evidence |
|
|
61
|
+
|----|-------|-------|----------|--------|----------|
|
|
62
|
+
|
|
56
63
|
## 活动日志
|
|
57
64
|
|
|
58
65
|
<!-- 每个工作流步骤追加一条新记录,不要覆盖之前的记录。 -->
|
|
@@ -56,7 +56,7 @@ jobs:
|
|
|
56
56
|
|
|
57
57
|
- name: Checkout shared scripts
|
|
58
58
|
if: steps.metadata.outputs.is_task_comment == 'true' && steps.metadata.outputs.type != ''
|
|
59
|
-
uses: actions/checkout@
|
|
59
|
+
uses: actions/checkout@v7
|
|
60
60
|
with:
|
|
61
61
|
sparse-checkout: .github/scripts
|
|
62
62
|
sparse-checkout-cone-mode: false
|
|
@@ -19,7 +19,7 @@ jobs:
|
|
|
19
19
|
(github.event_name == 'issues' && github.event.action == 'closed' && github.event.issue.state_reason == 'completed') ||
|
|
20
20
|
(github.event_name == 'issues' && github.event.action == 'reopened') ||
|
|
21
21
|
(github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request.merged == true)
|
|
22
|
-
uses: actions/checkout@
|
|
22
|
+
uses: actions/checkout@v7
|
|
23
23
|
with:
|
|
24
24
|
sparse-checkout: .github/scripts
|
|
25
25
|
sparse-checkout-cone-mode: false
|