@fitlab-ai/agent-infra 0.7.5 → 0.7.7

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.
Files changed (123) hide show
  1. package/bin/cli.ts +11 -3
  2. package/dist/bin/cli.js +10 -3
  3. package/dist/lib/sandbox/commands/create.js +26 -4
  4. package/dist/lib/sandbox/commands/ls.js +4 -33
  5. package/dist/lib/sandbox/commands/show.js +67 -0
  6. package/dist/lib/sandbox/index.js +7 -0
  7. package/dist/lib/sandbox/tools.js +20 -1
  8. package/dist/lib/task/commands/issue-body.js +94 -0
  9. package/dist/lib/task/commands/log.js +139 -6
  10. package/dist/lib/task/index.js +8 -0
  11. package/dist/lib/task/issue-form.js +66 -0
  12. package/dist/lib/task/sections.js +44 -0
  13. package/lib/sandbox/commands/create.ts +33 -4
  14. package/lib/sandbox/commands/ls.ts +4 -36
  15. package/lib/sandbox/commands/show.ts +80 -0
  16. package/lib/sandbox/index.ts +7 -0
  17. package/lib/sandbox/tools.ts +28 -1
  18. package/lib/task/commands/issue-body.ts +102 -0
  19. package/lib/task/commands/log.ts +146 -6
  20. package/lib/task/index.ts +8 -0
  21. package/lib/task/issue-form.ts +77 -0
  22. package/lib/task/sections.ts +44 -0
  23. package/package.json +3 -2
  24. package/templates/.agents/README.en.md +3 -1
  25. package/templates/.agents/README.zh-CN.md +3 -1
  26. package/templates/.agents/rules/create-issue.github.en.md +20 -29
  27. package/templates/.agents/rules/create-issue.github.zh-CN.md +20 -29
  28. package/templates/.agents/rules/issue-pr-commands.github.en.md +6 -0
  29. package/templates/.agents/rules/issue-pr-commands.github.zh-CN.md +6 -0
  30. package/templates/.agents/rules/next-step-output.en.md +26 -1
  31. package/templates/.agents/rules/next-step-output.zh-CN.md +26 -1
  32. package/templates/.agents/rules/no-mid-flow-questions.en.md +11 -0
  33. package/templates/.agents/rules/no-mid-flow-questions.zh-CN.md +11 -0
  34. package/templates/.agents/rules/review-handshake.en.md +15 -1
  35. package/templates/.agents/rules/review-handshake.zh-CN.md +15 -1
  36. package/templates/.agents/rules/task-management.en.md +27 -0
  37. package/templates/.agents/rules/task-management.zh-CN.md +31 -0
  38. package/templates/.agents/scripts/validate-artifact.js +11 -2
  39. package/templates/.agents/skills/analyze-task/SKILL.en.md +14 -1
  40. package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +14 -1
  41. package/templates/.agents/skills/archive-tasks/SKILL.en.md +3 -1
  42. package/templates/.agents/skills/archive-tasks/SKILL.zh-CN.md +3 -1
  43. package/templates/.agents/skills/block-task/SKILL.en.md +13 -1
  44. package/templates/.agents/skills/block-task/SKILL.zh-CN.md +13 -1
  45. package/templates/.agents/skills/cancel-task/SKILL.en.md +13 -1
  46. package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +14 -2
  47. package/templates/.agents/skills/check-task/SKILL.en.md +30 -81
  48. package/templates/.agents/skills/check-task/SKILL.zh-CN.md +30 -80
  49. package/templates/.agents/skills/close-codescan/SKILL.en.md +13 -1
  50. package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +13 -1
  51. package/templates/.agents/skills/close-dependabot/SKILL.en.md +13 -1
  52. package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +13 -1
  53. package/templates/.agents/skills/code-task/SKILL.en.md +14 -1
  54. package/templates/.agents/skills/code-task/SKILL.zh-CN.md +14 -1
  55. package/templates/.agents/skills/code-task/reference/dual-mode.en.md +7 -2
  56. package/templates/.agents/skills/code-task/reference/dual-mode.zh-CN.md +7 -2
  57. package/templates/.agents/skills/code-task/scripts/detect-mode.js +6 -14
  58. package/templates/.agents/skills/commit/SKILL.en.md +37 -5
  59. package/templates/.agents/skills/commit/SKILL.zh-CN.md +37 -5
  60. package/templates/.agents/skills/complete-task/SKILL.en.md +13 -1
  61. package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +13 -1
  62. package/templates/.agents/skills/create-pr/SKILL.en.md +23 -2
  63. package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +23 -2
  64. package/templates/.agents/skills/create-release-note/SKILL.en.md +19 -2
  65. package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +19 -2
  66. package/templates/.agents/skills/create-task/SKILL.en.md +14 -1
  67. package/templates/.agents/skills/create-task/SKILL.zh-CN.md +17 -4
  68. package/templates/.agents/skills/import-codescan/SKILL.en.md +14 -1
  69. package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +14 -1
  70. package/templates/.agents/skills/import-dependabot/SKILL.en.md +14 -1
  71. package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +14 -1
  72. package/templates/.agents/skills/import-issue/SKILL.en.md +35 -2
  73. package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +35 -2
  74. package/templates/.agents/skills/init-labels/SKILL.en.md +3 -1
  75. package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +3 -1
  76. package/templates/.agents/skills/init-milestones/SKILL.en.md +3 -1
  77. package/templates/.agents/skills/init-milestones/SKILL.zh-CN.md +3 -1
  78. package/templates/.agents/skills/plan-task/SKILL.en.md +15 -1
  79. package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +15 -1
  80. package/templates/.agents/skills/post-release/SKILL.en.md +3 -1
  81. package/templates/.agents/skills/post-release/SKILL.zh-CN.md +3 -1
  82. package/templates/.agents/skills/refine-title/SKILL.en.md +3 -1
  83. package/templates/.agents/skills/refine-title/SKILL.zh-CN.md +3 -1
  84. package/templates/.agents/skills/release/SKILL.en.md +3 -1
  85. package/templates/.agents/skills/release/SKILL.zh-CN.md +3 -1
  86. package/templates/.agents/skills/restore-task/SKILL.en.md +13 -1
  87. package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +13 -1
  88. package/templates/.agents/skills/review-analysis/SKILL.en.md +16 -2
  89. package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +16 -2
  90. package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +1 -1
  91. package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +1 -1
  92. package/templates/.agents/skills/review-analysis/reference/report-template.en.md +1 -1
  93. package/templates/.agents/skills/review-analysis/reference/report-template.zh-CN.md +1 -2
  94. package/templates/.agents/skills/review-analysis/reference/review-criteria.en.md +1 -0
  95. package/templates/.agents/skills/review-analysis/reference/review-criteria.zh-CN.md +1 -0
  96. package/templates/.agents/skills/review-code/SKILL.en.md +15 -2
  97. package/templates/.agents/skills/review-code/SKILL.zh-CN.md +15 -2
  98. package/templates/.agents/skills/review-code/reference/output-templates.en.md +1 -1
  99. package/templates/.agents/skills/review-code/reference/output-templates.zh-CN.md +1 -1
  100. package/templates/.agents/skills/review-code/reference/report-template.en.md +1 -1
  101. package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +1 -2
  102. package/templates/.agents/skills/review-code/reference/review-criteria.en.md +1 -0
  103. package/templates/.agents/skills/review-code/reference/review-criteria.zh-CN.md +1 -0
  104. package/templates/.agents/skills/review-plan/SKILL.en.md +16 -2
  105. package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +16 -2
  106. package/templates/.agents/skills/review-plan/reference/output-templates.en.md +1 -1
  107. package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +1 -1
  108. package/templates/.agents/skills/review-plan/reference/report-template.en.md +1 -1
  109. package/templates/.agents/skills/review-plan/reference/report-template.zh-CN.md +1 -2
  110. package/templates/.agents/skills/review-plan/reference/review-criteria.en.md +1 -0
  111. package/templates/.agents/skills/review-plan/reference/review-criteria.zh-CN.md +1 -0
  112. package/templates/.agents/skills/test/SKILL.en.md +3 -1
  113. package/templates/.agents/skills/test/SKILL.zh-CN.md +1 -1
  114. package/templates/.agents/skills/test-integration/SKILL.en.md +3 -1
  115. package/templates/.agents/skills/test-integration/SKILL.zh-CN.md +3 -1
  116. package/templates/.agents/skills/update-agent-infra/SKILL.en.md +3 -1
  117. package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +3 -1
  118. package/templates/.agents/skills/upgrade-dependency/SKILL.en.md +3 -1
  119. package/templates/.agents/skills/upgrade-dependency/SKILL.zh-CN.md +3 -1
  120. package/templates/.agents/skills/watch-pr/SKILL.en.md +13 -1
  121. package/templates/.agents/skills/watch-pr/SKILL.zh-CN.md +13 -1
  122. package/templates/.agents/templates/task.en.md +5 -0
  123. package/templates/.agents/templates/task.zh-CN.md +5 -0
@@ -1,9 +1,10 @@
1
1
  # 下一步输出规则
2
2
 
3
- 本文件定义 skill「告知用户 / 下一步」输出的两类**相互独立**的规则;渲染最终输出前先读取本文件并同时落实两者:
3
+ 本文件定义 skill「告知用户 / 下一步」输出的三类**相互独立**的规则(第 3 类仅 review-* 适用);渲染最终输出前先读取本文件并落实其中适用的规则:
4
4
 
5
5
  1. **下一步输出结构**:「下一步」命令与「任务信息」段如何呈现任务 ID 形态(占位符 / 取短号 / 回退)。
6
6
  2. **Agent 输出收尾行(Completed at)**:面向用户输出的**绝对最后一行**,**独立于「下一步」块**,正常 / 错误 / 早退路径都适用。
7
+ 3. **人工裁决待办前置块**:仅 `review-analysis` / `review-plan` / `review-code`,且本阶段存在待裁决项(`{h} > 0`)时适用——在「下一步」命令前展开待裁决项并提示先完成裁决。
7
8
 
8
9
  ## 占位符语义
9
10
 
@@ -60,3 +61,27 @@ Completed at: YYYY-MM-DD HH:mm:ss
60
61
  - 取值命令(本地时区、不带偏移):`date "+%Y-%m-%d %H:%M:%S"`
61
62
  - 位置:必须是整段面向用户输出的最后一行,排在所有「下一步」命令之后。若某场景在命令之后还有条件性提醒行(如 env-blocked 提醒),收尾行排在该提醒行之后。
62
63
  - 该行只用于终端扫视,不写入任何产物文件或 Issue/PR 评论;完成时刻的单一事实源仍是 task.md 的 Activity Log。
64
+
65
+ ## 人工裁决待办前置块(review-* 专用,{h} > 0 时)
66
+
67
+ 本节是与上面两类规则**并列的第三类独立规则**,仅 `review-analysis` / `review-plan` / `review-code` 的「向用户汇报结论」步骤使用。
68
+
69
+ `{h}` 含义与各 review 技能 `reference/output-templates.md` 计数行一致:task.md `## 审查分歧账本` 中**本阶段**(`stage ∈ {analysis|plan|code}`)`status = needs-human-decision` 的行数——**只含待裁决项,不含已 `human-decided`**。
70
+
71
+ - **`{h} = 0`**:不输出本块,「下一步」按 output-templates 选定场景原样渲染。
72
+ - **`{h} > 0`**:在选定场景的「下一步 - <阶段>」命令**之前**插入下面的块;下一阶段命令仍照常列在块之后。
73
+
74
+ ```text
75
+ ⚠️ 待人工裁决({h} 项)—— 请先逐项裁决,再继续下一阶段:
76
+ - {ledger-id}({stage}/{severity}):{摘要}
77
+ 位置:task.md `## 审查分歧账本` 对应行 · 证据:{evidence}
78
+ …(task.md `## 审查分歧账本` 中本阶段每个 status=needs-human-decision 行一条)
79
+
80
+ 完成裁决:
81
+ 1. 在 task.md `## 人工裁决` 段,逐项记录你对上述裁决项的裁定与理由。
82
+ 2. 把 `## 审查分歧账本` 中对应行的 status 由 `needs-human-decision` 翻为 `human-decided`。
83
+
84
+ 说明:在上述行全部翻为 `human-decided` 之前,直接执行下一阶段命令会被 complete-task 等 gate 拦截(`needs-human-decision` 为非终态)。下一阶段命令仍列在下方,供裁决完成后使用。
85
+ ```
86
+
87
+ 字段取值:`{ledger-id}` / `{stage}` / `{severity}` / `{evidence}` 直接取自 `## 审查分歧账本` 对应行的同名列;`{摘要}` 取自 `{evidence}` 指向的产物锚点条目(如 `plan.md#HD-1` 的决策标题),无锚点标题时用该 finding 的一句话概述。
@@ -53,6 +53,17 @@ For every SKILL execution context not covered by any exemption above, the defaul
53
53
  - Meaning: the assumptions section records assumptions used for this run that may be revisited later; the open questions section records unresolved questions for human review
54
54
  - If the artifact template does not reserve these sections, append them as needed. If there are no assumptions or open questions, do not force empty sections.
55
55
 
56
+ ## Key Design Decision Marking And Ledgering
57
+
58
+ When an open question is a key design decision that needs human judgment, the executor must mark the item with `[needs-human-decision]` and write the matching `HD-` row to task.md `## Review Disagreement Ledger` according to `.agents/rules/review-handshake.md`.
59
+
60
+ Use these checks together:
61
+
62
+ - **Source test**: can the conclusion be uniquely derived from the task description, existing requirements, code conventions, or an approved plan? If not, and multiple reasonable options exist, it is a choice.
63
+ - **Impact test**: does the choice change scope, boundaries, defaults, thresholds, become irreversible / costly, or set precedent for later tasks? Any hit upgrades it to a key design decision.
64
+ - **Small-impact exemption**: if it is only a local, reversible, low-cost execution detail, record it under `## Assumptions` instead of upgrading it to a human ruling.
65
+ - **Fallback**: when unsure whether it is key, treat it as key; `review-*` must check whether the executor missed any `[needs-human-decision]` markings that should have been upgraded.
66
+
56
67
  ## Human Review Checkpoint Semantics
57
68
 
58
69
  A mandatory human review checkpoint means:
@@ -53,6 +53,17 @@
53
53
  - 含义:`假设` 段记录本次按某假设推进、未来若假设不成立可推翻;`未决问题` 段记录本次未决、需要人工审查时裁定的问题
54
54
  - 产物模板未预留这两段时,按需追加;没有假设或未决问题时不必强行写空段。
55
55
 
56
+ ## 关键设计决策标记与落账
57
+
58
+ 当未决问题属于需要人工裁定的关键设计决策时,执行方必须在该条目前标记 `[needs-human-decision]`,并按 `.agents/rules/review-handshake.md` 在 task.md `## 审查分歧账本` 写入 `HD-` 行。
59
+
60
+ 判定时同时使用以下检查:
61
+
62
+ - **来源测试**:结论是否能从任务描述、既有需求、代码约定或已批准方案中唯一推出?若不能,且存在多个合理选项,则它是选择题。
63
+ - **影响测试**:该选择是否改变范围、边界、默认值、阈值,是否不可逆 / 成本较高,或是否会扩散成后续任务先例?任一命中即升级为关键设计决策。
64
+ - **小影响豁免**:若它只是局部、可逆、低成本的执行细节,写入 `## 假设` 即可,不升级为人工裁决。
65
+ - **兜底**:无法判断是否关键时按关键处理;`review-*` 需要复核执行方是否漏标应升级的 `[needs-human-decision]`。
66
+
56
67
  ## 人工审查检查点语义
57
68
 
58
69
  「强制性人工审查检查点」(mandatory human review checkpoint)的语义是:
@@ -58,13 +58,27 @@ The single source of truth for disagreement state is the fixed `## 审查分歧
58
58
  | CD-1 | code | 1 | blocker | open | review-code.md#1 |
59
59
  ```
60
60
 
61
- - `id`: stage prefix + ordinal — analysis→`AN-`, plan→`PL-`, code→`CD-`.
61
+ - `id`: stage prefix + ordinal — analysis→`AN-`, plan→`PL-`, code→`CD-`; executor-raised human-ruling rows use `HD-`.
62
62
  - `stage` ∈ `{analysis, plan, code}` (plus the reserved value `post-review-commit`, used only for post-review exemption rows).
63
63
  - `status` legal enum: `open` / `accepted` / `adjusted` / `refuted` / `cannot-judge` / `confirmed` / `needs-human-decision` / `closed` / `human-decided`.
64
64
  - **Terminal set (gate passes)**: `{confirmed, closed, human-decided}`; everything else is blocking.
65
65
  - **Write responsibility**: `review-*` raises a finding → upsert an `open` row; `*-task` responds → set four-state and fill `evidence`, `round` +1; next `review-*` → `confirmed` / back to `open` / `needs-human-decision`; an executor fix verified by the next review → `closed`; a human ruling → `human-decided`.
66
66
  - **Backward compatible**: when task.md has no such section the gate treats it as no open disagreements and passes.
67
67
 
68
+ ### Executor-raised human-ruling rows
69
+
70
+ When an executor marks an item in the artifact `## Open Questions` section as `[needs-human-decision]`, it must upsert the matching `HD-` row in task.md `## Review Disagreement Ledger`:
71
+
72
+ ```markdown
73
+ | HD-1 | plan | - | decision | needs-human-decision | plan.md#HD-1 |
74
+ ```
75
+
76
+ - `stage` is the stage where the decision arose: `analysis` / `plan` / `code`.
77
+ - `round` is `-` because this is not a review-finding handshake round.
78
+ - `severity` is always `decision`.
79
+ - `status` starts as `needs-human-decision`, so the existing gate blocks it.
80
+ - 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
+
68
82
  ## post-review commit gate (code stage only)
69
83
 
70
84
  - The highest-round `review-code` report records `Review Baseline Commit` (R, `git rev-parse HEAD`) and `Reviewed Diff Fingerprint` (F, full worktree diff fingerprint).
@@ -58,13 +58,27 @@
58
58
  | CD-1 | code | 1 | blocker | open | review-code.md#1 |
59
59
  ```
60
60
 
61
- - `id`:阶段前缀 + 序号——analysis→`AN-`、plan→`PL-`、code→`CD-`。
61
+ - `id`:阶段前缀 + 序号——analysis→`AN-`、plan→`PL-`、code→`CD-`;执行方自提的人工裁决行使用 `HD-`。
62
62
  - `stage` ∈ `{analysis, plan, code}`(外加保留值 `post-review-commit`,仅用于 post-review 豁免行)。
63
63
  - `status` 合法枚举:`open` / `accepted` / `adjusted` / `refuted` / `cannot-judge` / `confirmed` / `needs-human-decision` / `closed` / `human-decided`。
64
64
  - **终态集合(gate 放行)**:`{confirmed, closed, human-decided}`;其余为阻塞态。
65
65
  - **写入责任**:`review-*` 提 finding → upsert `open` 行;`*-task` 响应 → 改四态并填 `evidence`、`round` +1;下一轮 `review-*` → `confirmed` / 置回 `open` / `needs-human-decision`;执行方修复经下一轮 review 验证通过 → `closed`;人工裁决 → `human-decided`。
66
66
  - **向后兼容**:task.md 无此段时,gate 视为无未决分歧而放行。
67
67
 
68
+ ### 执行方自提人工裁决行
69
+
70
+ 当执行方在产物 `## 未决问题` 中标记 `[needs-human-decision]` 时,必须在 task.md `## 审查分歧账本` upsert 对应 `HD-` 行:
71
+
72
+ ```markdown
73
+ | HD-1 | plan | - | decision | needs-human-decision | plan.md#HD-1 |
74
+ ```
75
+
76
+ - `stage` 填该决策产生的阶段:`analysis` / `plan` / `code`。
77
+ - `round` 填 `-`,因为它不是 review finding 的握手轮次。
78
+ - `severity` 固定填 `decision`。
79
+ - `status` 初始填 `needs-human-decision`,因此会被现有 gate 阻塞。
80
+ - 人工在 task.md `## 人工裁决` 段记录裁定后,把对应 `HD-` 行翻为 `human-decided`,`evidence` 指向该裁定记录。
81
+
68
82
  ## post-review commit 门禁(仅 code 阶段)
69
83
 
70
84
  - `review-code` 在最高轮报告中记录 `审查基线提交`(R,`git rev-parse HEAD`)和 `审查差异指纹`(F,完整工作区 diff fingerprint)。
@@ -37,3 +37,30 @@ Map user intent to the corresponding workflow command:
37
37
  - `complete-task`: update `status`, `current_step`, `completed_at`, `updated_at`, `agent_infra_version`
38
38
  - `block-task`: update `status`, `blocked_at`, `blocked_reason`, `updated_at`, `agent_infra_version`
39
39
  - `cancel-task`: update `status`, `cancelled_at`, `cancel_reason`, `updated_at`, `agent_infra_version`
40
+
41
+ ## Activity Log started / done dual-marker convention (single source of truth)
42
+
43
+ > This section is the sole authoritative definition of the started/done dual marker. The skills, the renderer (`lib/task/commands/log.ts`), and the validator (`.agents/scripts/validate-artifact.js`) all defer to it; keep this section in sync when changing any of them.
44
+
45
+ **Line grammar is unchanged**: both started and done use the existing entry grammar `- {YYYY-MM-DD HH:mm:ss±HH:MM} — **{action}** by {agent} — {note}`, so the parsing regexes (`log.ts:ENTRY_RE` and `validate-artifact.js:ACTIVITY_LOG_PATTERN`) need no change.
46
+
47
+ - **started line** (written when the step begins): the action suffixes the existing base with ` [started]`, note is `started`:
48
+ `- {time} — **{base} [started]** by {agent} — started`
49
+ - **done line** (written when the step completes, unchanged from today): the action is the base itself:
50
+ `- {time} — **{base}** by {agent} — {completion summary}`
51
+ - `{base}` is that skill's existing done action text, including `(Round {N})` (e.g. `Plan Task (Round 1)`). started and done must share the same `{base}` to pair.
52
+
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
+
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`, localized to the task language (English `Manual-verify: {e}, Human-decision: {h}`; Chinese `人工校验点:{e}, 人工裁决:{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-verify` (`{e}`) parses `(+ {n} env-blocked)` from the review done note (de-duplicated from the display), defaulting to `0`. Non-review rows carry no human counts.
56
+
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
+
59
+ **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:
60
+
61
+ - **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:
62
+ `analyze-task`, `plan-task`, `code-task`, `review-analysis`, `review-plan`, `review-code`, `commit`, `complete-task`, `create-pr`, `watch-pr`, `block-task`, `cancel-task`, `restore-task`, `close-codescan`, `close-dependabot`.
63
+ - **Deferred form (the skill creates task.md, so there is no file to write to at the start)** — capture `started_at` in memory before running, then when writing the Activity Log at the end, **append both lines at once** (started line uses `started_at`, done line uses the completion time):
64
+ `create-task`, `import-issue`, `import-codescan`, `import-dependabot`.
65
+
66
+ **Exceptions**: read-only inspection skills that do not represent real progress (e.g. `check-task`) do not write started. A bare operation with no task.md context (e.g. a `commit` not tied to a task) likewise skips it.
@@ -37,3 +37,34 @@
37
37
  - `complete-task`:更新 `status`、`current_step`、`completed_at`、`updated_at`、`agent_infra_version`
38
38
  - `block-task`:更新 `status`、`blocked_at`、`blocked_reason`、`updated_at`、`agent_infra_version`
39
39
  - `cancel-task`:更新 `status`、`cancelled_at`、`cancel_reason`、`updated_at`、`agent_infra_version`
40
+
41
+ ## Activity Log started / done 双标记约定(单一事实源)
42
+
43
+ > 本节是 started/done 双标记的唯一权威定义。各 SKILL、渲染器(`lib/task/commands/log.ts`)、
44
+ > 校验脚本(`.agents/scripts/validate-artifact.js`)的相关行为都以本节为准;改动任一端时同步本节。
45
+
46
+ **行语法不变**:started 与 done 都沿用既有条目语法
47
+ `- {YYYY-MM-DD HH:mm:ss±HH:MM} — **{action}** by {agent} — {note}`,因此解析正则
48
+ (`log.ts:ENTRY_RE` 与 `validate-artifact.js:ACTIVITY_LOG_PATTERN`)无需改动。
49
+
50
+ - **started 行**(步骤开始时写):action 在既有基名末尾加后缀 ` [started]`,note 用 `started`:
51
+ `- {time} — **{基名} [started]** by {agent} — started`
52
+ - **done 行**(步骤完成时写,与现状一致):action 即基名本身:
53
+ `- {time} — **{基名}** by {agent} — {完成说明}`
54
+ - `{基名}` 指该 SKILL 既有 done 条目的 action 文本,含 `(Round {N})`(如 `Plan Task (Round 1)`)。
55
+ started 与 done 共用同一 `{基名}` 才能配对。
56
+
57
+ **配对与渲染**(`ai task log`):按 `{基名}` 把 started 与其后最近的同名 done 配成一行(同基名多次执行按时间升序 FIFO 配对)。STARTED 列显示 started 时间、DONE 列显示 done 时间;只有 started 无 done = 进行中(DONE 显示 `(in progress)`);只有 done 无 started(历史日志)= 单态完成行。三种形态都合法、不报错。
58
+
59
+ **人工计数**(`ai task log`):审查步骤行把两项人工计数并入 NOTE 的 verdict 文本,逗号分隔、紧随 `blockers/major/minor`,按 task 语言本地化(中文 `人工校验点:{e}, 人工裁决:{h}`;英文 `Manual-verify: {e}, Human-decision: {h}`)。`人工裁决`(`{h}`)按 canonical 步骤名前缀(`Review Analysis` / `Review Plan` / `Review Code`)映射到 `analysis` / `plan` / `code`,统计 `## 审查分歧账本` 中对应阶段 `status ∈ {needs-human-decision, human-decided}` 的当前累计数量;`人工校验点`(`{e}`)解析 review done note 中的 `(+ {n} env-blocked)`(解析后从展示中去重),缺失为 `0`。非审查步骤不附加人工计数。
60
+
61
+ **gate**(`checkActivityLog`):计算「最新 action / freshness」时跳过 `[started]` 行(升序与格式校验仍覆盖全部行),故 started 标记不会污染各 SKILL 的 `expected_action_pattern`。
62
+
63
+ **写 started 的 SKILL**:所有**会向某个任务的 `## 活动日志` 追加条目**的工作流 SKILL 都写 started,保证 `ai task log` 整张表的 STARTED 列一致完整。两种写法按技能是否已有 task.md 区分:
64
+
65
+ - **常规写法(task.md 已存在)**——在「该轮实质工作开始时」(前置条件确认后、第一个产出动作前)追加 started 行,完成时写 done 行:
66
+ `analyze-task`、`plan-task`、`code-task`、`review-analysis`、`review-plan`、`review-code`、`commit`、`complete-task`、`create-pr`、`watch-pr`、`block-task`、`cancel-task`、`restore-task`、`close-codescan`、`close-dependabot`。
67
+ - **延迟补写(本技能创建 task.md,开始时无文件可写)**——开始执行前先在内存记录 `started_at`,最后写活动日志时**一次性补两条**(started 行用 `started_at`、done 行用完成时间):
68
+ `create-task`、`import-issue`、`import-codescan`、`import-dependabot`。
69
+
70
+ **例外**:`check-task` 等只读巡检类、不代表实质工作推进的技能不写 started。无 task.md 上下文的纯操作(如无关联任务的 `commit`)同样跳过。
@@ -38,6 +38,10 @@ const DEFAULT_FRESHNESS_MINUTES = 30;
38
38
  const DATE_TIME_PATTERN = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}:\d{2}(?:[+-]\d{2}:\d{2})?$/;
39
39
  const AGENT_INFRA_VERSION_PATTERN = /^v\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/;
40
40
  const ACTIVITY_LOG_PATTERN = /^- (\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}:\d{2}(?:[+-]\d{2}:\d{2})?) — \*\*(.+?)\*\* by (.+?) — (.+)$/;
41
+ // Start markers (action suffixed with ` [started]`) are excluded from the
42
+ // "latest action" / freshness computation so a step's in-flight marker never
43
+ // satisfies a skill's expected_action_pattern; the matching done entry does.
44
+ const ACTIVITY_LOG_STARTED_RE = /\s*\[started\]\s*$/;
41
45
  const BRANCH_SLUG_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
42
46
 
43
47
  // Review disagreement ledger (see .agents/rules/review-handshake.md).
@@ -462,8 +466,13 @@ function checkActivityLog({ taskDir, config }) {
462
466
  }
463
467
 
464
468
  previousTimestamp = timestamp;
465
- latestTimestamp = timestamp;
466
- latestAction = action;
469
+ // Ascending order is checked over every entry, but a `[started]` marker is
470
+ // not a terminal action: keep latestAction/latestTimestamp on the most
471
+ // recent done entry so expected_action_pattern and freshness see it.
472
+ if (!ACTIVITY_LOG_STARTED_RE.test(action)) {
473
+ latestTimestamp = timestamp;
474
+ latestAction = action;
475
+ }
467
476
  }
468
477
 
469
478
  if (config.expected_action_pattern && !new RegExp(config.expected_action_pattern).test(latestAction)) {
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  name: analyze-task
3
- description: "Analyze a task and produce a requirements document"
3
+ description: >
4
+ Analyze a task and produce a requirements document.
5
+ Use when you need to understand a task's requirements, scope, and risks before designing a solution.
4
6
  ---
5
7
 
6
8
  # Analyze Task
@@ -31,6 +33,16 @@ Before the state check is complete, do not make external-state assertions such a
31
33
 
32
34
  > If `{task-id}` matches `^[#]?[0-9]+$` (bare numeric or `#`-prefixed), follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
33
35
 
36
+ ## Step Start: Write the started Marker
37
+
38
+ After prerequisites pass and before this round's first artifact action, append a started marker to task.md `## Activity Log` (same base action as this round's done entry plus a ` [started]` suffix, note `started`):
39
+
40
+ ```
41
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Analyze Task (Round {N}) [started]** by {agent} — started
42
+ ```
43
+
44
+ `ai task log` pairs it with the done entry written on completion (step 7) onto one row (in progress → done). Format and pairing rules: see the "Activity Log started / done dual-marker convention" in `.agents/rules/task-management.md`.
45
+
34
46
  ## Steps
35
47
 
36
48
  ### 1. Verify Prerequisites
@@ -172,6 +184,7 @@ Create `.agents/workspace/active/{task-id}/{analysis-artifact}`.
172
184
  ## Open Questions
173
185
 
174
186
  > If there are unresolved questions for human review, list them here; omit this section if there are none.
187
+ > Mark key design decisions with `[needs-human-decision]` and write `HD-` ledger rows according to `.agents/rules/no-mid-flow-questions.md`.
175
188
 
176
189
  - {open question}
177
190
 
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  name: analyze-task
3
- description: "分析任务并输出需求分析文档"
3
+ description: >
4
+ 分析任务并输出需求分析文档。
5
+ 当需要在动手设计前厘清某个任务的需求、影响范围与风险时使用。
4
6
  ---
5
7
 
6
8
  # 分析任务
@@ -31,6 +33,16 @@ tail .agents/workspace/active/{task-id}/task.md
31
33
 
32
34
  > 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
33
35
 
36
+ ## 步骤开始:写入 started 标记
37
+
38
+ 确认前置条件后、本轮第一个产出动作之前,向 task.md `## 活动日志` 追加一条 started 标记(与本轮 done 条目同基名 + ` [started]` 后缀,note 用 `started`):
39
+
40
+ ```
41
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Analyze Task (Round {N}) [started]** by {agent} — started
42
+ ```
43
+
44
+ `ai task log` 会把它与步骤完成时(步骤 7)写入的 done 条目配对成一行(进行中 → 已完成)。格式与配对规则见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。
45
+
34
46
  ## 执行步骤
35
47
  ### 1. 验证前置条件
36
48
 
@@ -171,6 +183,7 @@ tail .agents/workspace/active/{task-id}/task.md
171
183
  ## 未决问题
172
184
 
173
185
  > 如有需要人工裁定的未决问题,列在此处;没有则可省略本段。
186
+ > 关键设计决策按 `.agents/rules/no-mid-flow-questions.md` 的判据标记 `[needs-human-decision]` 并回写 `HD-` 账本行。
174
187
 
175
188
  - {未决问题}
176
189
 
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  name: archive-tasks
3
- description: "Archive completed tasks into a date-organized workspace directory"
3
+ description: >
4
+ Archive completed tasks into a date-organized workspace directory.
5
+ Use when completed tasks have accumulated and you want to tidy them into the date-organized archive.
4
6
  ---
5
7
 
6
8
  # Archive Completed Tasks
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  name: archive-tasks
3
- description: "归档已完成任务到按日期组织的目录"
3
+ description: >
4
+ 归档已完成任务到按日期组织的目录。
5
+ 当已完成任务在 completed 目录堆积、需要整理归档时使用。
4
6
  ---
5
7
 
6
8
  # 归档已完成任务
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  name: block-task
3
- description: "Mark a task as blocked and record the reason"
3
+ description: >
4
+ Mark a task as blocked and record the reason.
5
+ Use when a task cannot proceed because of an external blocker and you need to park it with a reason.
4
6
  ---
5
7
 
6
8
  # Block Task
@@ -23,6 +25,16 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
23
25
 
24
26
  > If `{task-id}` matches `^[#]?[0-9]+$` (bare numeric or `#`-prefixed), follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
25
27
 
28
+ ## Step Start: Write the started Marker
29
+
30
+ After prerequisites pass and before this step's first artifact action, append a started marker to task.md `## Activity Log` (same base action as this step's done entry plus a ` [started]` suffix, note `started`):
31
+
32
+ ```
33
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Block Task [started]** by {agent} — started
34
+ ```
35
+
36
+ `ai task log` pairs it with the done entry written on completion onto one row (in progress → done). See the "Activity Log started / done dual-marker convention" in `.agents/rules/task-management.md`.
37
+
26
38
  ## Steps
27
39
 
28
40
  ### 1. Verify Task Exists
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  name: block-task
3
- description: "标记任务为阻塞状态并记录原因"
3
+ description: >
4
+ 标记任务为阻塞状态并记录原因。
5
+ 当任务因外部阻塞无法推进、需要挂起并记录原因时使用。
4
6
  ---
5
7
 
6
8
  # 标记任务阻塞
@@ -23,6 +25,16 @@ description: "标记任务为阻塞状态并记录原因"
23
25
 
24
26
  > 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
25
27
 
28
+ ## 步骤开始:写入 started 标记
29
+
30
+ 确认前置条件后、本步骤第一个产出动作之前,向 task.md `## 活动日志` 追加一条 started 标记(与本步骤 done 条目同基名 + ` [started]` 后缀,note 用 `started`):
31
+
32
+ ```
33
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Block Task [started]** by {agent} — started
34
+ ```
35
+
36
+ `ai task log` 会把它与完成时写入的 done 条目配对成一行(进行中 → 已完成)。约定见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。
37
+
26
38
  ## 执行步骤
27
39
  ### 1. 验证任务存在
28
40
 
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  name: cancel-task
3
- description: "Cancel an unneeded task and move it"
3
+ description: >
4
+ Cancel an unneeded task and move it.
5
+ Use when a task is no longer needed and should be dropped from active work.
4
6
  ---
5
7
 
6
8
  # Cancel Task
@@ -17,6 +19,16 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
17
19
 
18
20
  > If `{task-id}` matches `^[#]?[0-9]+$` (bare numeric or `#`-prefixed), follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
19
21
 
22
+ ## Step Start: Write the started Marker
23
+
24
+ After prerequisites pass and before this step's first artifact action, append a started marker to task.md `## Activity Log` (same base action as this step's done entry plus a ` [started]` suffix, note `started`):
25
+
26
+ ```
27
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Cancel Task [started]** by {agent} — started
28
+ ```
29
+
30
+ `ai task log` pairs it with the done entry written on completion onto one row (in progress → done). See the "Activity Log started / done dual-marker convention" in `.agents/rules/task-management.md`.
31
+
20
32
  ## Steps
21
33
 
22
34
  ### 1. Verify Task Exists
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  name: cancel-task
3
- description: "取消不再需要的任务并转移"
3
+ description: >
4
+ 取消不再需要的任务并转移。
5
+ 当某个任务不再需要、应从 active 工作中撤下时使用。
4
6
  ---
5
7
 
6
8
  # 取消任务
@@ -17,6 +19,16 @@ description: "取消不再需要的任务并转移"
17
19
 
18
20
  > 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
19
21
 
22
+ ## 步骤开始:写入 started 标记
23
+
24
+ 确认前置条件后、本步骤第一个产出动作之前,向 task.md `## 活动日志` 追加一条 started 标记(与本步骤 done 条目同基名 + ` [started]` 后缀,note 用 `started`):
25
+
26
+ ```
27
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Cancel Task [started]** by {agent} — started
28
+ ```
29
+
30
+ `ai task log` 会把它与完成时写入的 done 条目配对成一行(进行中 → 已完成)。约定见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。
31
+
20
32
  ## 执行步骤
21
33
  ### 1. 验证任务存在
22
34
 
@@ -137,7 +149,7 @@ ai sandbox rm {branch}
137
149
 
138
150
  下一步 - 查看已转移任务:
139
151
  - Claude Code / OpenCode:/check-task {task-ref}
140
- - Gemini CLI:/{{project}}:check-task {task-ref}
152
+ - Gemini CLI:/agent-infra:check-task {task-ref}
141
153
  - Codex CLI:$check-task {task-ref}
142
154
  ```
143
155
 
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  name: check-task
3
- description: "Check a task's current status and progress"
3
+ description: >
4
+ Check a task's current status and progress.
5
+ Use when you want a quick view of a task's current status and progress.
4
6
  ---
5
7
 
6
8
  # Check Task Status
@@ -8,7 +10,7 @@ description: "Check a task's current status and progress"
8
10
  ## Boundary / Critical Rules
9
11
 
10
12
  - This skill is **read-only** -- do not modify any files
11
- - Always check the active, blocked, and completed directories
13
+ - Mechanical facts (frontmatter metadata, artifact grouping, git/platform state, and locating the task across the active, blocked, and completed directories) are delegated to the deterministic `ai task status` command. This skill only adds the semantic layer the CLI cannot produce: workflow-stage interpretation, review-verdict parsing, and the next-step recommendation.
12
14
 
13
15
  ## Task id short ref
14
16
 
@@ -16,96 +18,43 @@ description: "Check a task's current status and progress"
16
18
 
17
19
  ## Steps
18
20
 
19
- ### 1. Locate Task
21
+ ### 1. Gather Facts via `ai task status`
20
22
 
21
- Search for the task in this priority order:
22
- 1. `.agents/workspace/active/{task-id}/task.md`
23
- 2. `.agents/workspace/blocked/{task-id}/task.md`
24
- 3. `.agents/workspace/completed/{task-id}/task.md`
23
+ Run the deterministic CLI to collect every mechanical fact, and use its stdout as the factual base of your report:
25
24
 
26
- Note: `{task-id}` format is `TASK-{yyyyMMdd-HHmmss}`, for example `TASK-20260306-143022`
27
-
28
- If the task is not found in any directory, prompt "Task {task-id} not found".
29
-
30
- ### 2. Read Task Metadata
25
+ ```bash
26
+ ai task status {task-id}
27
+ ```
31
28
 
32
- Extract from `task.md`:
33
- - `id`, `title`, `type`, `status`, `workflow`
34
- - `current_step`, `assigned_to`
35
- - `created_at`, `updated_at`
36
- - `issue_number`, `pr_number` (if applicable)
29
+ The command resolves the task across the active, blocked, and completed directories and prints five sections: the task header (`id`, short id, title), `Metadata` (frontmatter fields), `Artifacts` (files grouped by workflow stage), `Git` (branch match, uncommitted count, ahead/behind), and `Platform` (Issue/PR state). Treat that output as authoritative -- do not re-derive any of it by hand.
37
30
 
38
- ### 3. Inspect Context Files
31
+ Fallbacks:
32
+ - If the command is unavailable (e.g. `ai` is not on PATH or `dist/` is not built) or exits non-zero, fall back to a degraded read: show the `task.md` frontmatter and `ls` the task directory, and tell the user the output is degraded (suggest building or installing the CLI, e.g. `ai init`).
33
+ - If the task is not found in any directory, prompt "Task {task-id} not found".
39
34
 
40
- Scan and record the existence, round, and status of these artifact types:
41
- - `analysis.md`, `analysis-r{N}.md` - Requirement analysis
42
- - `plan.md`, `plan-r{N}.md` - Technical plan
43
- - `code.md`, `code-r2.md`, ... - Code reports
44
- - `review-analysis.md`, `review-analysis-r{N}.md` - Requirement analysis review reports
45
- - `review-plan.md`, `review-plan-r{N}.md` - Technical plan review reports
46
- - `review-code.md`, `review-code-r{N}.md` - Code review reports
35
+ ### 2. Interpret Workflow Stage & Review Verdicts
47
36
 
48
- For versioned artifacts (`analysis`, `review-analysis`, `plan`, `review-plan`, `code`, `review-code`):
49
- - Scan all versioned files of the same artifact type in the task directory
50
- - Record the latest round, latest file path, and total number of rounds for each artifact type
51
- - If the latest round is recorded in `task.md` Activity Log, cross-check it against the actual file when possible
37
+ This is the semantic layer the CLI does not produce. Using the `Artifacts` groups from step 1 and the Activity Log in `task.md`:
52
38
 
53
- ### 4. Output Status Report
39
+ - Map each workflow stage to a status indicator plus its latest artifact and round:
40
+ - `[done]` - step completed
41
+ - `[current]` - currently in progress
42
+ - `[pending]` - not started yet
43
+ - `[blocked]` - blocked
44
+ - `[skipped]` - skipped
45
+ - For the latest review artifact of each stage (`review-analysis`, `review-plan`, `review-code`), read the report body and parse its conclusion: the overall verdict (Approved / Changes Requested / Rejected) and the blocker / major / minor counts. The CLI does not parse review bodies, so this reading is required to choose the next action in step 3.
54
46
 
55
- Format the status report with a clear structure and status indicators:
47
+ Present the workflow progress as an overlay on top of the CLI output, marking the latest round and the parsed review verdict, for example:
56
48
 
57
49
  ```
58
- Task status: {task-id} (short id {task-ref})
59
- =======================
60
-
61
- Basic info:
62
- - Title: {title}
63
- - Type: {type}
64
- - Status: {status}
65
- - Workflow: {workflow}
66
- - Assigned to: {assigned_to}
67
- - Created at: {created_at}
68
- - Updated at: {updated_at}
69
-
70
50
  Workflow progress:
71
- [done] Requirement Analysis analysis-r2.md (Round 2, latest)
72
- [done] Analysis Review review-analysis.md (Round 1, latest)
73
- [done] Technical Design plan.md (Round 1)
74
- [done] Plan Review review-plan.md (Round 1, latest)
75
- [current] Code code.md (Round 1)
76
- [pending] Code Review review-code.md (Round 1 will be created next)
77
- [pending] Final Commit
78
-
79
- Context files:
80
- - analysis.md: Exists (Round 1)
81
- - analysis-r2.md: Exists (Round 2, latest)
82
- - review-analysis.md: Exists (Round 1, latest)
83
- - plan.md: Exists (Round 1, latest)
84
- - review-plan.md: Exists (Round 1, latest)
85
- - code.md: Exists (Round 1, latest)
86
- - review-code.md: Not started
87
-
88
- If multiple rounds exist, show all rounds and mark the latest, for example:
89
- - plan.md: Exists (Round 1)
90
- - plan-r2.md: Exists (Round 2, latest)
91
- - review-plan.md: Exists (Round 1)
92
- - code.md: Exists (Round 1)
93
- - code-r2.md: Exists (Round 2, latest)
94
- - review-code.md: Exists (Round 1)
95
- - review-code-r2.md: Exists (Round 2, latest)
96
-
97
- Next step:
98
- Complete implementation, then run code review
51
+ [done] Requirement Analysis analysis.md (Round 1, latest)
52
+ [done] Analysis Review review-analysis.md (Round 1, latest, Approved)
53
+ [current] Technical Design plan.md (Round 1)
54
+ [pending] Plan Review
99
55
  ```
100
56
 
101
- **Status indicators**:
102
- - `[done]` - Step completed
103
- - `[current]` - Currently in progress
104
- - `[pending]` - Not started yet
105
- - `[blocked]` - Blocked
106
- - `[skipped]` - Skipped
107
-
108
- ### 5. Recommend Next Action
57
+ ### 3. Recommend Next Action
109
58
 
110
59
  Recommend the appropriate next skill based on the current workflow state. You must show command formats for all TUI columns in the table below, not just the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name).
111
60
 
@@ -144,6 +93,6 @@ Recommend the appropriate next skill based on the current workflow state. You mu
144
93
  ## Notes
145
94
 
146
95
  1. **Read-only**: This skill only reads and reports -- it does not modify files
147
- 2. **Multi-directory search**: Always check active, blocked, and completed
96
+ 2. **CLI delegation**: mechanical facts (metadata, artifact grouping, git/platform state, multi-directory location) come from `ai task status`; this skill adds the semantic interpretation on top
148
97
  3. **Quick reference**: Use this skill any time you need to see where a task is in the workflow
149
- 4. **Versioned artifacts**: `analysis`, `review-analysis`, `plan`, `review-plan`, `code`, and `review-code` must all report the actual round, not only the base filename
98
+ 4. **Versioned artifacts**: `ai task status` groups the actual artifact rounds; the semantic layer must still report the latest review verdict for `review-analysis`, `review-plan`, and `review-code`