@fitlab-ai/agent-infra 0.7.7 → 0.8.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/README.md +2 -0
- package/README.zh-CN.md +2 -0
- package/bin/cli.ts +42 -15
- package/dist/bin/cli.js +46 -16
- package/dist/lib/decide.js +110 -0
- package/dist/lib/run/host.js +39 -0
- package/dist/lib/run/index.js +193 -0
- package/dist/lib/run/prompt.js +2 -0
- package/dist/lib/run/skills.js +29 -0
- package/dist/lib/run/tui.js +35 -0
- package/dist/lib/sandbox/capture.js +158 -0
- package/dist/lib/sandbox/commands/create.js +58 -9
- package/dist/lib/sandbox/commands/enter.js +7 -3
- package/dist/lib/sandbox/credentials.js +42 -3
- package/dist/lib/sandbox/runtimes/base.dockerfile +13 -0
- package/dist/lib/server/adapters/_contract.js +9 -0
- package/dist/lib/server/adapters/feishu/index.js +40 -0
- package/dist/lib/server/adapters/feishu/transport.js +95 -0
- package/dist/lib/server/auth.js +19 -0
- package/dist/lib/server/config.js +183 -0
- package/dist/lib/server/daemon.js +96 -0
- package/dist/lib/server/index.js +47 -0
- package/dist/lib/server/logger.js +34 -0
- package/dist/lib/server/plugin-loader.js +73 -0
- package/dist/lib/server/process-control.js +200 -0
- package/dist/lib/server/protocol.js +69 -0
- package/dist/lib/server/redact.js +12 -0
- package/dist/lib/server/runner.js +75 -0
- package/dist/lib/server/streamer.js +44 -0
- package/dist/lib/task/commands/decisions.js +258 -0
- package/dist/lib/task/commands/log.js +38 -41
- package/dist/lib/task/commands/status.js +144 -45
- package/dist/lib/task/index.js +9 -0
- package/dist/lib/task/ledger.js +66 -0
- package/dist/lib/task/sections.js +30 -1
- package/lib/decide.ts +124 -0
- package/lib/run/host.ts +47 -0
- package/lib/run/index.ts +237 -0
- package/lib/run/prompt.ts +1 -0
- package/lib/run/skills.ts +34 -0
- package/lib/run/tui.ts +40 -0
- package/lib/sandbox/capture.ts +215 -0
- package/lib/sandbox/commands/create.ts +64 -12
- package/lib/sandbox/commands/enter.ts +8 -2
- package/lib/sandbox/credentials.ts +57 -3
- package/lib/sandbox/runtimes/base.dockerfile +13 -0
- package/lib/server/adapters/_contract.ts +42 -0
- package/lib/server/adapters/feishu/index.ts +47 -0
- package/lib/server/adapters/feishu/transport.ts +128 -0
- package/lib/server/auth.ts +28 -0
- package/lib/server/config.ts +228 -0
- package/lib/server/daemon.ts +110 -0
- package/lib/server/index.ts +50 -0
- package/lib/server/logger.ts +48 -0
- package/lib/server/plugin-loader.ts +84 -0
- package/lib/server/process-control.ts +225 -0
- package/lib/server/protocol.ts +79 -0
- package/lib/server/redact.ts +12 -0
- package/lib/server/runner.ts +95 -0
- package/lib/server/server.schema.json +127 -0
- package/lib/server/streamer.ts +57 -0
- package/lib/task/commands/decisions.ts +272 -0
- package/lib/task/commands/log.ts +38 -39
- package/lib/task/commands/status.ts +200 -58
- package/lib/task/index.ts +9 -0
- package/lib/task/ledger.ts +73 -0
- package/lib/task/sections.ts +30 -1
- package/package.json +8 -3
- package/templates/.agents/QUICKSTART.zh-CN.md +2 -2
- package/templates/.agents/rules/issue-fields.github.en.md +1 -1
- package/templates/.agents/rules/issue-fields.github.zh-CN.md +1 -1
- package/templates/.agents/rules/next-step-output.en.md +5 -1
- package/templates/.agents/rules/next-step-output.zh-CN.md +5 -1
- package/templates/.agents/rules/no-mid-flow-questions.en.md +7 -2
- package/templates/.agents/rules/no-mid-flow-questions.zh-CN.md +7 -2
- package/templates/.agents/rules/pr-sync.github.en.md +3 -3
- package/templates/.agents/rules/pr-sync.github.zh-CN.md +3 -3
- package/templates/.agents/rules/review-handshake.en.md +5 -1
- package/templates/.agents/rules/review-handshake.zh-CN.md +5 -1
- package/templates/.agents/rules/task-management.en.md +2 -2
- package/templates/.agents/rules/task-management.zh-CN.md +2 -2
- package/templates/.agents/scripts/lib/post-review-commit.js +15 -18
- package/templates/.agents/scripts/validate-artifact.js +8 -0
- package/templates/.agents/skills/analyze-task/SKILL.en.md +15 -3
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +15 -3
- package/templates/.agents/skills/analyze-task/config/verify.en.json +2 -1
- package/templates/.agents/skills/analyze-task/config/verify.zh-CN.json +2 -1
- package/templates/.agents/skills/code-task/SKILL.en.md +2 -2
- package/templates/.agents/skills/code-task/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/code-task/reference/dual-mode.en.md +1 -1
- package/templates/.agents/skills/code-task/reference/dual-mode.zh-CN.md +1 -1
- package/templates/.agents/skills/code-task/reference/fix-mode.en.md +3 -3
- package/templates/.agents/skills/code-task/reference/fix-mode.zh-CN.md +4 -4
- package/templates/.agents/skills/complete-task/SKILL.en.md +1 -0
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +1 -0
- package/templates/.agents/skills/complete-task/config/verify.en.json +2 -1
- package/templates/.agents/skills/complete-task/config/verify.zh-CN.json +2 -1
- 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/create-task/SKILL.en.md +1 -3
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/import-codescan/SKILL.en.md +0 -3
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +0 -3
- package/templates/.agents/skills/import-dependabot/SKILL.en.md +0 -1
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +0 -1
- package/templates/.agents/skills/import-issue/SKILL.en.md +1 -2
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +1 -2
- package/templates/.agents/skills/plan-task/SKILL.en.md +1 -2
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +1 -2
- package/templates/.agents/skills/review-analysis/SKILL.en.md +2 -2
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/review-analysis/config/verify.en.json +1 -1
- package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +1 -1
- package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +11 -11
- package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +11 -11
- package/templates/.agents/skills/review-analysis/reference/report-template.en.md +4 -4
- package/templates/.agents/skills/review-analysis/reference/report-template.zh-CN.md +4 -4
- package/templates/.agents/skills/review-analysis/reference/review-criteria.en.md +5 -5
- package/templates/.agents/skills/review-analysis/reference/review-criteria.zh-CN.md +5 -5
- package/templates/.agents/skills/review-code/SKILL.en.md +4 -4
- package/templates/.agents/skills/review-code/SKILL.zh-CN.md +4 -4
- package/templates/.agents/skills/review-code/config/verify.en.json +1 -1
- package/templates/.agents/skills/review-code/config/verify.zh-CN.json +1 -1
- package/templates/.agents/skills/review-code/reference/output-templates.en.md +16 -16
- package/templates/.agents/skills/review-code/reference/output-templates.zh-CN.md +12 -12
- package/templates/.agents/skills/review-code/reference/report-template.en.md +4 -4
- package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +4 -4
- package/templates/.agents/skills/review-code/reference/review-criteria.en.md +5 -5
- package/templates/.agents/skills/review-code/reference/review-criteria.zh-CN.md +5 -5
- package/templates/.agents/skills/review-plan/SKILL.en.md +2 -2
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/review-plan/config/verify.en.json +1 -1
- package/templates/.agents/skills/review-plan/config/verify.zh-CN.json +1 -1
- package/templates/.agents/skills/review-plan/reference/output-templates.en.md +11 -11
- package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +11 -11
- package/templates/.agents/skills/review-plan/reference/report-template.en.md +4 -4
- package/templates/.agents/skills/review-plan/reference/report-template.zh-CN.md +4 -4
- package/templates/.agents/skills/review-plan/reference/review-criteria.en.md +5 -5
- package/templates/.agents/skills/review-plan/reference/review-criteria.zh-CN.md +5 -5
- package/templates/.agents/templates/task.en.md +3 -3
- package/templates/.agents/templates/task.zh-CN.md +3 -3
- package/templates/.github/workflows/metadata-sync.yml +0 -18
|
@@ -34,7 +34,7 @@ Aggregation rules:
|
|
|
34
34
|
- if one artifact class is missing, treat it as "no data for this stage" and continue
|
|
35
35
|
- Manual verification section: include only post-code-stage checks that still require a human to execute or judge and that the AI cannot close on its own.
|
|
36
36
|
- **Admission boundary**: the verification result depends on a real environment, permissions, account, external system, or human judgment, and cannot be closed by an agent rerunning tests, adding checks, or continuing the fix loop.
|
|
37
|
-
- **Sources**: `review-code*` "
|
|
37
|
+
- **Sources**: `review-code*` "Manual Validation Items", plus `code*` items that satisfy the boundary above.
|
|
38
38
|
- **Wording**: each retained item must state at least "what to verify + location (file/change/scope) + why only a human can verify it".
|
|
39
39
|
- **Empty rendering**: when there are no retained items, do NOT use the ⚠️ alarm style (it falsely implies a problem). Render the whole block as: heading `### ✅ No Manual Verification Needed` and a single line `No items in this change require manual confirmation.`, with no item list. Only use the `### ⚠️ Manual Verification Required` heading + item list when retained items exist.
|
|
40
40
|
|
|
@@ -51,7 +51,7 @@ Use this canonical comment body template:
|
|
|
51
51
|
|
|
52
52
|
**Updated At**: {current-time}
|
|
53
53
|
|
|
54
|
-
{manual-
|
|
54
|
+
{manual-validation-section}
|
|
55
55
|
|
|
56
56
|
### Key Technical Decisions
|
|
57
57
|
|
|
@@ -72,7 +72,7 @@ Use this canonical comment body template:
|
|
|
72
72
|
*Generated by {agent} · Internal tracking: {task-id}*
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
> Render `{manual-
|
|
75
|
+
> Render `{manual-validation-section}` per the "manual verification section" aggregation rule above: with retained items → `### ⚠️ Manual Verification Required` heading + quote + item list; with none → `### ✅ No Manual Verification Needed` heading + a single line `No items in this change require manual confirmation.` (no ⚠️, no list).
|
|
76
76
|
|
|
77
77
|
## Comment Lookup And Update
|
|
78
78
|
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
- 某一类产物缺失时,按“无该阶段数据”处理并继续生成
|
|
35
35
|
- 需人工校验段落:只收进入 code 阶段后仍需人实际执行或判断、AI 无法自行关闭的校验点。
|
|
36
36
|
- **准入边界**:校验结论依赖真实环境、权限、账号、外部系统或人工判断,且无法通过 agent 重跑测试、补充检查或继续修复自行关闭。
|
|
37
|
-
- **来源**:`review-code*`
|
|
37
|
+
- **来源**:`review-code*` 的「人工校验项」,以及 `code*` 中满足上述边界的校验点。
|
|
38
38
|
- **写法**:每条保留项至少写明「校验什么 + 定位(文件/改动/范围)+ 为什么只能由人校验」。
|
|
39
39
|
- **空集渲染**:无保留项时,不要使用 ⚠️ 告警样式(会让人误以为有问题)。整段降级渲染为:标题 `### ✅ 无需人工校验`,正文一行 `本次改动无需人工确认事项。`,不带条目列表。有保留项时才用 `### ⚠️ 需人工校验` 标题 + 条目列表。
|
|
40
40
|
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
|
|
52
52
|
**更新时间**:{当前时间}
|
|
53
53
|
|
|
54
|
-
{manual-
|
|
54
|
+
{manual-validation-section}
|
|
55
55
|
|
|
56
56
|
### 关键技术决策
|
|
57
57
|
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
*由 {agent} 自动生成 · 内部追踪:{task-id}*
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
> `{manual-
|
|
75
|
+
> `{manual-validation-section}` 按上文「需人工校验段落」聚合规则渲染:有保留项 → `### ⚠️ 需人工校验` 标题 + 引用说明 + 条目列表;无保留项 → `### ✅ 无需人工校验` 标题 + 一行 `本次改动无需人工确认事项。`(不带 ⚠️、不带列表)。
|
|
76
76
|
|
|
77
77
|
## 评论查找与更新
|
|
78
78
|
|
|
@@ -67,18 +67,22 @@ The single source of truth for disagreement state is the fixed `## 审查分歧
|
|
|
67
67
|
|
|
68
68
|
### Executor-raised human-ruling rows
|
|
69
69
|
|
|
70
|
-
When an executor
|
|
70
|
+
When an executor judges an item to be a key design decision that needs human ruling, it must write the detail block (background / options / impact / recommendation) into the artifact's `## 人工裁决待办` (Pending Human Decisions) section with a heading like `### HD-N:<title> [needs-human-decision]`, and upsert the matching `HD-` row in task.md `## Review Disagreement Ledger`:
|
|
71
71
|
|
|
72
72
|
```markdown
|
|
73
73
|
| HD-1 | plan | - | decision | needs-human-decision | plan.md#HD-1 |
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
+
- `id`: the `HD-N` number is **globally unique**. When adding a row, scan every `HD-(\d+)` in the ledger and take max+1 (start at `HD-1` when none exist); it increases monotonically across `analysis` / `plan` / `code` and is **never reused**, so selecting by `HD-id` is unambiguous.
|
|
76
77
|
- `stage` is the stage where the decision arose: `analysis` / `plan` / `code`.
|
|
77
78
|
- `round` is `-` because this is not a review-finding handshake round.
|
|
78
79
|
- `severity` is always `decision`.
|
|
79
80
|
- `status` starts as `needs-human-decision`, so the existing gate blocks it.
|
|
81
|
+
- `evidence` points to the stable anchor `<artifact>#HD-N` (e.g. `plan-r2.md#HD-1`), not a drift-prone line number.
|
|
80
82
|
- After a human records the ruling in task.md `## Human Rulings`, flip the matching `HD-` row to `human-decided` and point `evidence` to that ruling.
|
|
81
83
|
|
|
84
|
+
> View: `ai task decisions <task-ref>` lists all pending decisions; `ai task decisions <task-ref> <ordinal|HD-id>` expands a single item's detail block. This command shares the ledger parser `lib/task/ledger.ts` with `ai task log`; the gate parser in `.agents/scripts/validate-artifact.js` is a separate implementation and the two must be kept semantically in sync by hand.
|
|
85
|
+
|
|
82
86
|
## post-review commit gate (code stage only)
|
|
83
87
|
|
|
84
88
|
- The highest-round `review-code` report records `Review Baseline Commit` (R, `git rev-parse HEAD`) and `Reviewed Diff Fingerprint` (F, full worktree diff fingerprint).
|
|
@@ -67,18 +67,22 @@
|
|
|
67
67
|
|
|
68
68
|
### 执行方自提人工裁决行
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
当执行方判定某项为需人工裁定的关键设计决策时,必须把详情块(背景 / 选项 / 影响 / 推荐)写入产物的 `## 人工裁决待办` 段,标题形如 `### HD-N:<标题> [needs-human-decision]`,并在 task.md `## 审查分歧账本` upsert 对应 `HD-` 行:
|
|
71
71
|
|
|
72
72
|
```markdown
|
|
73
73
|
| HD-1 | plan | - | decision | needs-human-decision | plan.md#HD-1 |
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
+
- `id`:`HD-N` 编号**全局唯一**。新增行时扫描账本中所有 `HD-(\d+)`,取最大值 + 1(账本无 `HD-` 行则从 `HD-1` 起);跨 `analysis` / `plan` / `code` 单调递增,**禁止复用**既有编号,避免按 `HD-id` 定位时歧义。
|
|
76
77
|
- `stage` 填该决策产生的阶段:`analysis` / `plan` / `code`。
|
|
77
78
|
- `round` 填 `-`,因为它不是 review finding 的握手轮次。
|
|
78
79
|
- `severity` 固定填 `decision`。
|
|
79
80
|
- `status` 初始填 `needs-human-decision`,因此会被现有 gate 阻塞。
|
|
81
|
+
- `evidence` 指向稳定锚点 `<artifact>#HD-N`(如 `plan-r2.md#HD-1`),不依赖易漂移的行号。
|
|
80
82
|
- 人工在 task.md `## 人工裁决` 段记录裁定后,把对应 `HD-` 行翻为 `human-decided`,`evidence` 指向该裁定记录。
|
|
81
83
|
|
|
84
|
+
> 查看:`ai task decisions <task-ref>` 列出全部待裁决项;`ai task decisions <task-ref> <序号|HD-id>` 展开单项详情块。该命令的账本解析与 `ai task log` 共用 `lib/task/ledger.ts`;`.agents/scripts/validate-artifact.js` 的 gate 解析器是独立实现,二者语义须手工保持同步。
|
|
85
|
+
|
|
82
86
|
## post-review commit 门禁(仅 code 阶段)
|
|
83
87
|
|
|
84
88
|
- `review-code` 在最高轮报告中记录 `审查基线提交`(R,`git rev-parse HEAD`)和 `审查差异指纹`(F,完整工作区 diff fingerprint)。
|
|
@@ -35,7 +35,7 @@ Map user intent to the corresponding workflow command:
|
|
|
35
35
|
- `create-pr`: update `pr_number`, `updated_at`, `agent_infra_version`
|
|
36
36
|
- `commit`: update `updated_at`, `agent_infra_version`; update `current_step` when needed (see `commit/reference/task-status-update.md`)
|
|
37
37
|
- `complete-task`: update `status`, `current_step`, `completed_at`, `updated_at`, `agent_infra_version`
|
|
38
|
-
- `block-task`: update `status`, `blocked_at`, `
|
|
38
|
+
- `block-task`: update `status`, `blocked_at`, `updated_at`, `agent_infra_version`
|
|
39
39
|
- `cancel-task`: update `status`, `cancelled_at`, `cancel_reason`, `updated_at`, `agent_infra_version`
|
|
40
40
|
|
|
41
41
|
## Activity Log started / done dual-marker convention (single source of truth)
|
|
@@ -52,7 +52,7 @@ Map user intent to the corresponding workflow command:
|
|
|
52
52
|
|
|
53
53
|
**Pairing and rendering** (`ai task log`): a started entry pairs with the next same-`{base}` done entry onto one row (repeated executions of the same base pair FIFO by ascending time). The STARTED column shows the start time, DONE the completion time; started with no done = in progress (DONE shows `(in progress)`); done with no started (legacy logs) = a standalone completed row. All three shapes are valid and never error.
|
|
54
54
|
|
|
55
|
-
**Human counts** (`ai task log`): review step rows fold two human counts into the NOTE verdict text, comma-separated, right after `blockers/major/minor`,
|
|
55
|
+
**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 rows in `## Review Disagreement Ledger` / `## 审查分歧账本` for that stage with `status ∈ {needs-human-decision, 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.
|
|
56
56
|
|
|
57
57
|
**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`.
|
|
58
58
|
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
- `create-pr`:更新 `pr_number`、`updated_at`、`agent_infra_version`
|
|
36
36
|
- `commit`:更新 `updated_at`、`agent_infra_version`;必要时更新 `current_step`(详见 `commit/reference/task-status-update.md`)
|
|
37
37
|
- `complete-task`:更新 `status`、`current_step`、`completed_at`、`updated_at`、`agent_infra_version`
|
|
38
|
-
- `block-task`:更新 `status`、`blocked_at`、`
|
|
38
|
+
- `block-task`:更新 `status`、`blocked_at`、`updated_at`、`agent_infra_version`
|
|
39
39
|
- `cancel-task`:更新 `status`、`cancelled_at`、`cancel_reason`、`updated_at`、`agent_infra_version`
|
|
40
40
|
|
|
41
41
|
## Activity Log started / done 双标记约定(单一事实源)
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
|
|
57
57
|
**配对与渲染**(`ai task log`):按 `{基名}` 把 started 与其后最近的同名 done 配成一行(同基名多次执行按时间升序 FIFO 配对)。STARTED 列显示 started 时间、DONE 列显示 done 时间;只有 started 无 done = 进行中(DONE 显示 `(in progress)`);只有 done 无 started(历史日志)= 单态完成行。三种形态都合法、不报错。
|
|
58
58
|
|
|
59
|
-
**人工计数**(`ai task log`):审查步骤行把两项人工计数并入 NOTE 的 verdict 文本,逗号分隔、紧随 `blockers/major/minor
|
|
59
|
+
**人工计数**(`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`。非审查步骤不附加人工计数。
|
|
60
60
|
|
|
61
61
|
**gate**(`checkActivityLog`):计算「最新 action / freshness」时跳过 `[started]` 行(升序与格式校验仍覆盖全部行),故 started 标记不会污染各 SKILL 的 `expected_action_pattern`。
|
|
62
62
|
|
|
@@ -3,25 +3,22 @@ import path from "node:path";
|
|
|
3
3
|
|
|
4
4
|
import { artifactName, maxRound } from "./review-artifacts.js";
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
];
|
|
16
|
-
|
|
6
|
+
// Paths excluded from the post-review coverage gate. Fail-closed: the gate
|
|
7
|
+
// covers ALL tracked changes by default. This default denylist is EMPTY —
|
|
8
|
+
// projects opt into exclusions explicitly via review.post_review_exclude_globs.
|
|
9
|
+
export const DEFAULT_POST_REVIEW_EXCLUDES = [];
|
|
10
|
+
|
|
11
|
+
// Returns git pathspecs selecting "all tracked changes except project excludes".
|
|
12
|
+
// The leading ":/" makes coverage fail-closed (everything from the repo root);
|
|
13
|
+
// each exclude becomes a top-level negative pathspec. Projects extend the
|
|
14
|
+
// denylist via review.post_review_exclude_globs (union, deduped).
|
|
17
15
|
export function resolvePostReviewGlobs(config = {}, reviewConfig = {}) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
return DEFAULT_POST_REVIEW_GLOBS;
|
|
16
|
+
const projectExcludes = [
|
|
17
|
+
...(Array.isArray(reviewConfig.post_review_exclude_globs) ? reviewConfig.post_review_exclude_globs : []),
|
|
18
|
+
...(Array.isArray(config.post_review_exclude_globs) ? config.post_review_exclude_globs : [])
|
|
19
|
+
];
|
|
20
|
+
const excludes = [...new Set([...DEFAULT_POST_REVIEW_EXCLUDES, ...projectExcludes])];
|
|
21
|
+
return [":/", ...excludes.map((p) => `:(top,exclude)${p}`)];
|
|
25
22
|
}
|
|
26
23
|
|
|
27
24
|
export function findAuthoritativeReviewCodeArtifact(taskDir) {
|
|
@@ -316,6 +316,14 @@ function checkTaskMeta({ taskDir, config }) {
|
|
|
316
316
|
return failResult("task-meta", "Expected cancelled_at to be present");
|
|
317
317
|
}
|
|
318
318
|
|
|
319
|
+
if (config.require_start_date && isBlank(metadata.start_date)) {
|
|
320
|
+
return failResult("task-meta", "Expected start_date to be present");
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
if (config.require_target_date && isBlank(metadata.target_date)) {
|
|
324
|
+
return failResult("task-meta", "Expected target_date to be present");
|
|
325
|
+
}
|
|
326
|
+
|
|
319
327
|
if (config.match_task_dir !== false) {
|
|
320
328
|
const expectedTaskId = path.basename(taskDir);
|
|
321
329
|
if (metadata.id !== expectedTaskId) {
|
|
@@ -112,10 +112,10 @@ Runs after Step 0 state check and Step 3 (questioning is an external-state actio
|
|
|
112
112
|
1. Decide this round's question (consistent with 4.2):
|
|
113
113
|
- if a `pending_question` already exists (the previous question is still unanswered) → restate that `pending_question`, do **not** modify it and do **not** increment `question_count`;
|
|
114
114
|
- 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`.
|
|
115
|
-
2. Update frontmatter: `current_step: requirement-analysis`, `assigned_to`, `updated_at`, `agent_infra_version` (read `.agents/rules/version-stamp.md` first).
|
|
115
|
+
2. Update frontmatter: `current_step: requirement-analysis`, `assigned_to`, `updated_at`, `agent_infra_version` (read `.agents/rules/version-stamp.md` first); if `start_date` is empty, also write today's date (`date +%F`) to satisfy the required `start_date` check at the requirement-analysis stage.
|
|
116
116
|
3. Append to Activity Log: `- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Analyze Task (Brainstorming)** by {agent} — Asked Q{question_count}, awaiting answer`.
|
|
117
117
|
4. Issue sync (when `issue_number` exists, skip on any failure): read `.agents/rules/issue-sync.md` first for upstream / permission detection; update only the **task comment** per the task.md comment sync rule; keep the `status` label at `pending-design-work`; do **not** publish an analysis artifact comment.
|
|
118
|
-
5. Verification (replaces the step 8 artifact gate): `node .agents/scripts/validate-artifact.js check task-meta .agents/workspace/active/{task-id} --skill analyze-task --format text` (the early-exit set `current_step: requirement-analysis`, so it should pass); also keep `rg -n 'Analyze Task \(Brainstorming\)' .agents/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).
|
|
118
|
+
5. Verification (replaces the step 8 artifact gate): `node .agents/scripts/validate-artifact.js check task-meta .agents/workspace/active/{task-id} --skill analyze-task --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\)' .agents/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).
|
|
119
119
|
6. User output: show only the current **single question** plus how to answer/continue (re-trigger `analyze-task {task-ref}` with the answer), and append the `Completed at` line per `.agents/rules/next-step-output.md`.
|
|
120
120
|
7. **STOP** and wait for the answer. The next trigger returns to this step.
|
|
121
121
|
|
|
@@ -184,10 +184,22 @@ Create `.agents/workspace/active/{task-id}/{analysis-artifact}`.
|
|
|
184
184
|
## Open Questions
|
|
185
185
|
|
|
186
186
|
> If there are unresolved questions for human review, list them here; omit this section if there are none.
|
|
187
|
-
>
|
|
187
|
+
> Ordinary open questions go here; for key design decisions (per `.agents/rules/no-mid-flow-questions.md`), put the detail block under `## 人工裁决待办` (Pending Human Decisions) as `### HD-N` instead, and keep only a one-line pointer here.
|
|
188
188
|
|
|
189
189
|
- {open question}
|
|
190
190
|
|
|
191
|
+
## 人工裁决待办
|
|
192
|
+
|
|
193
|
+
> Write this section only when this round upgraded a `[needs-human-decision]` key design decision; omit otherwise.
|
|
194
|
+
> One `### HD-N` block per item (`HD-N` is globally unique, see `.agents/rules/review-handshake.md`), and upsert the matching `HD-` row in task.md `## Review Disagreement Ledger` (evidence pointing to `{analysis-artifact}#HD-N`).
|
|
195
|
+
|
|
196
|
+
### HD-{N}:{title} [needs-human-decision]
|
|
197
|
+
|
|
198
|
+
- **Background**: {why it became a pending decision}
|
|
199
|
+
- **Options**: {A / B / …}
|
|
200
|
+
- **Impact**: {scope / boundaries / precedent}
|
|
201
|
+
- **Recommendation**: {recommended option and rationale}
|
|
202
|
+
|
|
191
203
|
## Effort and Complexity Assessment
|
|
192
204
|
- Complexity: {High/Medium/Low}
|
|
193
205
|
- Risk level: {High/Medium/Low}
|
|
@@ -111,10 +111,10 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
111
111
|
1. 确定本轮要问的问题(与 4.2 保持一致):
|
|
112
112
|
- 若已存在 `pending_question`(上一问尚未得到答案)→ 复述该 `pending_question`,**不**修改它、**不**增加 `question_count`;
|
|
113
113
|
- 否则(无待答问题)→ 选最高价值的一个问题(验收标准 > 范围 > 歧义),写入 `## Brainstorming`:`status: asking`、`pending_question: <问题>`、`question_count += 1`。
|
|
114
|
-
2. 更新 frontmatter:`current_step: requirement-analysis`、`assigned_to`、`updated_at`、`agent_infra_version`(先读 `.agents/rules/version-stamp.md
|
|
114
|
+
2. 更新 frontmatter:`current_step: requirement-analysis`、`assigned_to`、`updated_at`、`agent_infra_version`(先读 `.agents/rules/version-stamp.md`);若 `start_date` 为空,同时写入当日日期(`date +%F`),以满足 requirement-analysis 阶段 `start_date` 必填校验。
|
|
115
115
|
3. 追加 Activity Log:`- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Analyze Task (Brainstorming)** by {agent} — Asked Q{question_count}, awaiting answer`。
|
|
116
116
|
4. Issue 同步(存在 `issue_number` 时,任一失败跳过):先读 `.agents/rules/issue-sync.md` 完成 upstream / 权限检测;仅按 task.md 评论同步规则更新 **task 评论**;`status` label 维持 `pending-design-work`;**不**发布分析产物评论。
|
|
117
|
-
5. 校验(替代步骤 8 的 artifact gate):`node .agents/scripts/validate-artifact.js check task-meta .agents/workspace/active/{task-id} --skill analyze-task --format text`(早退已置 `current_step: requirement-analysis`,预期通过);并保留 `rg -n 'Analyze Task \(Brainstorming\)' .agents/workspace/active/{task-id}/task.md` 与 task 评论同步证据。**不**跑 artifact gate,也不跑 `check activity-log` / `check platform-sync`(二者绑定分析产物路径)。
|
|
117
|
+
5. 校验(替代步骤 8 的 artifact gate):`node .agents/scripts/validate-artifact.js check task-meta .agents/workspace/active/{task-id} --skill analyze-task --format text`(早退已置 `current_step: requirement-analysis` 且已写入 `start_date`,预期通过);并保留 `rg -n 'Analyze Task \(Brainstorming\)' .agents/workspace/active/{task-id}/task.md` 与 task 评论同步证据。**不**跑 artifact gate,也不跑 `check activity-log` / `check platform-sync`(二者绑定分析产物路径)。
|
|
118
118
|
6. 用户输出:只展示当前**单个问题** + 如何回答/继续(再次触发 `analyze-task {task-ref}` 并附答案),并按 `.agents/rules/next-step-output.md` 在末行追加 `Completed at`。
|
|
119
119
|
7. **STOP**,等待回答。下一次触发回到本步骤。
|
|
120
120
|
|
|
@@ -183,10 +183,22 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
183
183
|
## 未决问题
|
|
184
184
|
|
|
185
185
|
> 如有需要人工裁定的未决问题,列在此处;没有则可省略本段。
|
|
186
|
-
>
|
|
186
|
+
> 普通未决问题列在本段;属关键设计决策的(按 `.agents/rules/no-mid-flow-questions.md` 判据),详情块改写入下方 `## 人工裁决待办` 的 `### HD-N`,本段仅保留一行指针。
|
|
187
187
|
|
|
188
188
|
- {未决问题}
|
|
189
189
|
|
|
190
|
+
## 人工裁决待办
|
|
191
|
+
|
|
192
|
+
> 仅当本轮升级了 `[needs-human-decision]` 关键设计决策时写本段;没有则省略。
|
|
193
|
+
> 每项一个 `### HD-N` 块(`HD-N` 全局唯一,见 `.agents/rules/review-handshake.md`),并在 task.md `## 审查分歧账本` upsert 对应 `HD-` 行(evidence 指向 `{analysis-artifact}#HD-N`)。
|
|
194
|
+
|
|
195
|
+
### HD-{N}:{标题} [needs-human-decision]
|
|
196
|
+
|
|
197
|
+
- **背景**:{为何成为待裁决项}
|
|
198
|
+
- **选项**:{A / B / …}
|
|
199
|
+
- **影响**:{范围 / 边界 / 先例}
|
|
200
|
+
- **推荐**:{推荐选项及理由}
|
|
201
|
+
|
|
190
202
|
## 工作量和复杂度评估
|
|
191
203
|
- 复杂度:{高/中/低}
|
|
192
204
|
- 风险等级:{高/中/低}
|
|
@@ -12,8 +12,8 @@ Implement the approved plan and produce `code.md` or `code-r{N}.md`. This skill
|
|
|
12
12
|
## Boundary / Critical Rules
|
|
13
13
|
|
|
14
14
|
- Follow the latest plan artifact: `plan.md` or `plan-r{N}.md`
|
|
15
|
-
- Fix mode verifies each finding of the latest `review-code` one by one: fix it if it holds, or rebut it and record it under unresolved if it is unfounded/hallucinated; do not expand to issues the review did not list;
|
|
16
|
-
- If implementation encounters a key design decision not covered by the plan,
|
|
15
|
+
- Fix mode verifies each finding of the latest `review-code` one by one: fix it if it holds, or rebut it and record it under unresolved if it is unfounded/hallucinated; do not expand to issues the review did not list; manual-validation items are out of scope
|
|
16
|
+
- If implementation encounters a key design decision not covered by the plan, per `.agents/rules/no-mid-flow-questions.md` write its detail block into the implementation report's `## 人工裁决待办` (Pending Human Decisions) section as `### HD-N:<title> [needs-human-decision]` (`HD-N` is globally unique, see `.agents/rules/review-handshake.md`) and write the matching `HD-` ledger row, instead of asking mid-flow or expanding scope silently
|
|
17
17
|
- Never auto-run `git add` or `git commit`
|
|
18
18
|
- Create a new code artifact for each round and never overwrite an older one
|
|
19
19
|
- After executing this skill, you **must** immediately update task.md
|
|
@@ -12,8 +12,8 @@ description: >
|
|
|
12
12
|
## 行为边界 / 关键规则
|
|
13
13
|
|
|
14
14
|
- 严格遵循最新方案产物:`plan.md` 或 `plan-r{N}.md`
|
|
15
|
-
- 修复模式逐条核实最新 `review-code` 的发现:成立则修复,判定为不成立/幻觉则在报告中反驳并记入 unresolved;不擅自扩大到审查未列出的问题;
|
|
16
|
-
- 实现中遇到方案未覆盖的关键设计决策时,按 `.agents/rules/no-mid-flow-questions.md`
|
|
15
|
+
- 修复模式逐条核实最新 `review-code` 的发现:成立则修复,判定为不成立/幻觉则在报告中反驳并记入 unresolved;不擅自扩大到审查未列出的问题;manual-validation 项不在修复范围
|
|
16
|
+
- 实现中遇到方案未覆盖的关键设计决策时,按 `.agents/rules/no-mid-flow-questions.md` 判据,把详情块写入实现报告的 `## 人工裁决待办` 段 `### HD-N:<标题> [needs-human-decision]`(`HD-N` 全局唯一,见 `.agents/rules/review-handshake.md`)并回写 `HD-` 账本行,不中途提问或擅自扩范围
|
|
17
17
|
- 绝不自动执行 `git add` 或 `git commit`
|
|
18
18
|
- 每轮实现都创建新的实现产物,不覆盖旧文件
|
|
19
19
|
- 执行本技能后,你**必须**立即更新 task.md
|
|
@@ -168,7 +168,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
168
168
|
- 记录 Round `{code-round}` 的 `{code-artifact}`
|
|
169
169
|
- 追加:
|
|
170
170
|
- 初次实现:`- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Code Task (Round {N})** by {agent} — Code implemented, {n} files modified, {n} tests passed → {code-artifact}`
|
|
171
|
-
- 修复模式:`- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Code Task (Round {N}, fix for {review-artifact})** by {agent} — Fixed {n} blockers, {n} major, {n} minor issues[, skipped {n}
|
|
171
|
+
- 修复模式:`- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Code Task (Round {N}, fix for {review-artifact})** by {agent} — Fixed {n} blockers, {n} major, {n} minor issues[, skipped {n} manual-validation] → {code-artifact}`
|
|
172
172
|
|
|
173
173
|
如果 task.md 中存在有效的 `issue_number`,执行以下同步操作(任一失败则跳过并继续;执行前先读取 `.agents/rules/issue-sync.md`,完成 upstream 仓库检测和权限检测):
|
|
174
174
|
- 按 issue-sync.md 设置 `status: in-progress`
|
|
@@ -46,7 +46,7 @@ node .agents/skills/code-task/scripts/detect-mode.js .agents/workspace/active/{t
|
|
|
46
46
|
- `需要修改` / `Changes Requested` -> `Changes Requested`
|
|
47
47
|
- `拒绝` / `Rejected` -> `Rejected`
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
manual-validation 计数不参与 mode 判定。
|
|
50
50
|
|
|
51
51
|
## 输出契约
|
|
52
52
|
|
|
@@ -27,9 +27,9 @@ Detailed priority rules:
|
|
|
27
27
|
- Minor issues are optional only after Blockers and Majors are resolved
|
|
28
28
|
- If you disagree with a finding, or judge it hallucinated after verification, do not silently skip it; give a counter-argument in the report's `## Per-Finding Verification` section and record it under unresolved issues
|
|
29
29
|
|
|
30
|
-
### Meta-category:
|
|
30
|
+
### Meta-category: manual-validation
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
manual-validation findings are outside the repair scope. Handling rules:
|
|
33
33
|
- do not write code changes for these findings
|
|
34
34
|
- list them unchanged in the code report's "Environment-Blocked Handling" section and mark them "outside AI repair scope"
|
|
35
35
|
- do not repeat them under unresolved issues, to avoid visually double-counting them
|
|
@@ -66,7 +66,7 @@ Fix status:
|
|
|
66
66
|
- Blockers fixed: {fixed-blockers}/{total-blockers}
|
|
67
67
|
- Major issues fixed: {fixed-majors}/{total-majors}
|
|
68
68
|
- Minor issues fixed: {fixed-minors}/{total-minors}
|
|
69
|
-
- [If
|
|
69
|
+
- [If manual-validation > 0] manual-validation skipped: {count}
|
|
70
70
|
- All tests passing: {yes/no}
|
|
71
71
|
- Review input: {review-artifact}
|
|
72
72
|
- Code artifact: {code-artifact}
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
- 只有在 Blocker 和 Major 都解决后,Minor 才是可选项
|
|
28
28
|
- 如果你不同意某条审查意见,或核实后判定为幻觉,不要静默跳过,而是在报告 `## 对审查发现的逐条核实` 给出反证并记录到 unresolved issues
|
|
29
29
|
|
|
30
|
-
### 元类目:
|
|
30
|
+
### 元类目:manual-validation
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
manual-validation 项不在修复范围。处理规则:
|
|
33
33
|
- 不要为这些项编写代码改动
|
|
34
|
-
- 在 code
|
|
34
|
+
- 在 code 报告的「人工校验项处理」段落原样列出,标注「不在 AI 修复范围」
|
|
35
35
|
- 不要在 unresolved 段落里重复列出(避免视觉计数翻倍)
|
|
36
36
|
- 这些项的去向:维护者在 PR description 中以「待人工验证」清单承接
|
|
37
37
|
|
|
@@ -66,7 +66,7 @@ env-blocked 项不在修复范围。处理规则:
|
|
|
66
66
|
- 阻塞项修复:{数量}/{总数}
|
|
67
67
|
- 主要问题修复:{数量}/{总数}
|
|
68
68
|
- 次要问题修复:{数量}/{总数}
|
|
69
|
-
- [如
|
|
69
|
+
- [如 manual-validation > 0] 人工校验项跳过:{数量}
|
|
70
70
|
- 所有测试通过:{是/否}
|
|
71
71
|
- 审查输入:{review-artifact}
|
|
72
72
|
- 修复产物:{code-artifact}
|
|
@@ -130,6 +130,7 @@ Update `.agents/workspace/active/{task-id}/task.md`:
|
|
|
130
130
|
- `status`: completed
|
|
131
131
|
- `current_step`: completed
|
|
132
132
|
- `completed_at`: {current timestamp}
|
|
133
|
+
- `target_date`: write the date portion (`YYYY-MM-DD`) of `completed_at` only when empty; keep any existing (human-entered) value
|
|
133
134
|
- `updated_at`: {current timestamp}
|
|
134
135
|
- `agent_infra_version`: value from `.agents/rules/version-stamp.md`
|
|
135
136
|
- Add or update the `## State Check` section with the raw Step 0 audit command output, including `$ ` prompt lines, before `## Activity Log`
|
|
@@ -129,6 +129,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
129
129
|
- `status`:completed
|
|
130
130
|
- `current_step`:completed
|
|
131
131
|
- `completed_at`:{当前时间戳}
|
|
132
|
+
- `target_date`:仅当为空时写入 `completed_at` 的日期部分(`YYYY-MM-DD`);已有值(人工填写)则保留
|
|
132
133
|
- `updated_at`:{当前时间戳}
|
|
133
134
|
- `agent_infra_version`:按 `.agents/rules/version-stamp.md` 取值
|
|
134
135
|
- 新增或更新 `## 状态核对` 段,粘贴第 0 步审计命令原文(含 `$ ` 前缀行),放在 `## 活动日志` 之前
|
|
@@ -9,7 +9,7 @@ Read this file before creating or updating the single reviewer-facing PR summary
|
|
|
9
9
|
- Generate or update the `<!-- sync-pr:{task-id}:summary -->` comment with the canonical template from `.agents/rules/pr-sync.md`
|
|
10
10
|
- When a matching summary comment already exists, PATCH only when the body changed; otherwise skip the write
|
|
11
11
|
- In this skill, summary sync failures follow the existing `create-pr` error handling and must not roll back an already-created PR
|
|
12
|
-
- Populate `{manual-
|
|
12
|
+
- Populate `{manual-validation-section}` per the aggregation rules in `.agents/rules/pr-sync.md`: include only post-code-stage checks that the AI cannot close on its own and that require a human to execute or judge; sources are `review-code*` "Manual Validation Items" plus `code*` items that satisfy the admission boundary; each item must state "what to verify + location + why only a human can verify it". Render in two branches: **with retained items** → `### ⚠️ Manual Verification Required` heading + item list; **with none** → `### ✅ No Manual Verification Needed` heading + a single line (no ⚠️, no old list placeholder)
|
|
13
13
|
|
|
14
14
|
## Result Reporting
|
|
15
15
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- 按 `.agents/rules/pr-sync.md` 中的唯一权威模板生成或更新 `<!-- sync-pr:{task-id}:summary -->` 评论
|
|
10
10
|
- PR 已存在同标记评论时,只在正文变化时 PATCH;否则跳过写入
|
|
11
11
|
- 本 skill 中,摘要同步失败沿用 `create-pr` 的现有错误处理,不回滚已经创建的 PR
|
|
12
|
-
- 按 `.agents/rules/pr-sync.md` 的聚合规则填充 `{manual-
|
|
12
|
+
- 按 `.agents/rules/pr-sync.md` 的聚合规则填充 `{manual-validation-section}`:只收进入 code 阶段后 AI 无法自行关闭、需要人实际执行或判断的校验点;来源为 `review-code*` 的「人工校验项」以及 `code*` 中满足准入边界的校验点;每条写明「校验什么 + 定位 + 为什么只能由人校验」。按两分支渲染:**有保留项** → `### ⚠️ 需人工校验` 标题 + 条目列表;**无保留项** → `### ✅ 无需人工校验` 标题 + 单行说明(不带 ⚠️、不写旧的列表占位)
|
|
13
13
|
|
|
14
14
|
## 结果回传
|
|
15
15
|
|
|
@@ -94,7 +94,6 @@ status: active
|
|
|
94
94
|
created_at: {YYYY-MM-DD HH:mm:ss±HH:MM}
|
|
95
95
|
updated_at: {YYYY-MM-DD HH:mm:ss±HH:MM}
|
|
96
96
|
agent_infra_version: {agent_infra_version}
|
|
97
|
-
created_by: human
|
|
98
97
|
priority: # required; inferred by the AI from the title/description; Urgent | High | Medium | Low
|
|
99
98
|
effort: # required; inferred by the AI from the title/description; High | Medium | Low
|
|
100
99
|
start_date: # optional; YYYY-MM-DD
|
|
@@ -103,8 +102,7 @@ current_step: requirement-analysis
|
|
|
103
102
|
assigned_to: {current AI agent}
|
|
104
103
|
```
|
|
105
104
|
|
|
106
|
-
|
|
107
|
-
priority / effort are required: the AI infers them from the task title and description (candidates in `.agents/rules/issue-fields.md`; normalize localized input). Leave start_date / target_date empty at creation - analyze-task / plan-task fill them later; do not invent dates.
|
|
105
|
+
priority / effort are required: the AI infers them from the task title and description (candidates in `.agents/rules/issue-fields.md`; normalize localized input). Leave start_date / target_date empty at creation: `start_date` is written by the analyze stage and `target_date` by the complete stage; do not invent dates.
|
|
108
106
|
|
|
109
107
|
### 3. Update Task Status
|
|
110
108
|
|
|
@@ -93,7 +93,6 @@ status: active
|
|
|
93
93
|
created_at: {YYYY-MM-DD HH:mm:ss±HH:MM}
|
|
94
94
|
updated_at: {YYYY-MM-DD HH:mm:ss±HH:MM}
|
|
95
95
|
agent_infra_version: {agent_infra_version}
|
|
96
|
-
created_by: human
|
|
97
96
|
priority: # 必填;由 AI 从标题/描述推断;Urgent | High | Medium | Low
|
|
98
97
|
effort: # 必填;由 AI 从标题/描述推断;High | Medium | Low
|
|
99
98
|
start_date: # 可选;YYYY-MM-DD
|
|
@@ -102,8 +101,7 @@ current_step: requirement-analysis
|
|
|
102
101
|
assigned_to: {当前 AI 代理}
|
|
103
102
|
```
|
|
104
103
|
|
|
105
|
-
|
|
106
|
-
priority / effort 必填:由 AI 从任务标题与描述推断后填入(候选值见 `.agents/rules/issue-fields.md`;中文输入按本地化映射规范化)。start_date / target_date 创建时保持留空,由 analyze-task / plan-task 阶段填入;不要臆测日期。
|
|
104
|
+
priority / effort 必填:由 AI 从任务标题与描述推断后填入(候选值见 `.agents/rules/issue-fields.md`;中文输入按本地化映射规范化)。start_date / target_date 创建时保持留空:`start_date` 由 analyze 阶段写入、`target_date` 由 complete 阶段写入;不要臆测日期。
|
|
107
105
|
|
|
108
106
|
### 3. 更新任务状态
|
|
109
107
|
|
|
@@ -93,7 +93,7 @@ date +%Y%m%d-%H%M%S
|
|
|
93
93
|
|
|
94
94
|
- Create the directory: `.agents/workspace/active/{task-id}/`
|
|
95
95
|
- Use the `.agents/templates/task.md` template to create `task.md`
|
|
96
|
-
- For Scenario C, prefer `type`, `workflow`, `branch`,
|
|
96
|
+
- For Scenario C, prefer `type`, `workflow`, `branch`, and `milestone` from the remote frontmatter; infer missing or damaged fields from Issue labels and current rules
|
|
97
97
|
- Always write `current_step` as `requirement-analysis`; do not restore the remote original `current_step`
|
|
98
98
|
|
|
99
99
|
Task metadata:
|
|
@@ -107,7 +107,6 @@ status: active
|
|
|
107
107
|
created_at: {YYYY-MM-DD HH:mm:ss±HH:MM}
|
|
108
108
|
updated_at: {YYYY-MM-DD HH:mm:ss±HH:MM}
|
|
109
109
|
agent_infra_version: {agent_infra_version}
|
|
110
|
-
created_by: human
|
|
111
110
|
priority: # optional; preserve source/frontmatter value when available
|
|
112
111
|
effort: # optional; preserve source/frontmatter value when available
|
|
113
112
|
start_date: # optional; preserve explicit YYYY-MM-DD when available
|
|
@@ -93,7 +93,7 @@ date +%Y%m%d-%H%M%S
|
|
|
93
93
|
|
|
94
94
|
- 创建目录:`.agents/workspace/active/{task-id}/`
|
|
95
95
|
- 使用 `.agents/templates/task.md` 模板创建 `task.md`
|
|
96
|
-
- 场景 C 优先沿用远端 frontmatter 中的 `type`、`workflow`、`branch`、`
|
|
96
|
+
- 场景 C 优先沿用远端 frontmatter 中的 `type`、`workflow`、`branch`、`milestone`;缺失或损坏字段按 Issue 标签和当前规则重新推断
|
|
97
97
|
- `current_step` 始终写入 `requirement-analysis`,不要恢复为远端原 `current_step`
|
|
98
98
|
|
|
99
99
|
任务元数据:
|
|
@@ -107,7 +107,6 @@ status: active
|
|
|
107
107
|
created_at: {YYYY-MM-DD HH:mm:ss±HH:MM}
|
|
108
108
|
updated_at: {YYYY-MM-DD HH:mm:ss±HH:MM}
|
|
109
109
|
agent_infra_version: {agent_infra_version}
|
|
110
|
-
created_by: human
|
|
111
110
|
priority: # 可选;有来源/frontmatter 值时保留
|
|
112
111
|
effort: # 可选;有来源/frontmatter 值时保留
|
|
113
112
|
start_date: # 可选;有明确 YYYY-MM-DD 时保留
|