@ifrankwang/openspec-agents 0.130.0 → 0.132.0

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.
@@ -717,6 +717,11 @@ function renderAnalyzeBlockers(item: WorkItem): string[] {
717
717
  /** implement step:developer 待修复 children(仅 todo 态:review 态由对应 reviewer 复核、豁免申请走待裁定区块)。 */
718
718
  function renderDeveloperChildren(item: WorkItem, ctxAgent: string, exemptionCtx?: ExemptionHintCtx): string[] {
719
719
  const lines: string[] = []
720
+ // 已处理 blocker 的用户确认留痕:dev 凭该记录将人工执行/环境不可验证任务重新列入
721
+ // completed_task_ids 申报(full 模式下 architect 代为 resolve 后,dev 在 implement 视图
722
+ // 读取用户确认内容——凭留痕申报的依据链在此闭合)。置于待修复清单早退之前,无待修复
723
+ // issue 时留痕仍渲染。
724
+ lines.push(...renderBlockerTrail(item, BLOCKER_TRAIL_TITLE_DEV))
720
725
  // 仅 issue child 进入修复清单(task child 不得混入 issue 渲染)
721
726
  const toFix = issueChildrenOf(item).filter((c) => isAgentOwnedIssue(c, ctxAgent))
722
727
  if (toFix.length === 0) return lines
@@ -928,6 +933,29 @@ function renderToolAdjudicateOnly(item: WorkItem, rec: EngineRecommendation, ctx
928
933
  return lines.join("\n")
929
934
  }
930
935
 
936
+ /** blocker 留痕区块标题(审查者视角):任务验证视图的申报核验依据口径。 */
937
+ const BLOCKER_TRAIL_TITLE_REVIEW = "## Blocker 留痕(人工/不可验证任务的申报依据)"
938
+ /** blocker 留痕区块标题(开发者视角):已处理 blocker 的用户确认记录,dev 凭记录重新申报完成。 */
939
+ const BLOCKER_TRAIL_TITLE_DEV = "## Blocker 留痕(已处理 blocker 的用户确认,凭记录申报完成)"
940
+
941
+ /** blocker 留痕区块(任务验证视图 verify_task / quality_review 与 developer implement 视图共用同一实现):
942
+ * 渲染已 resolved 且带用户答复留痕的 blocker 摘要(task_id / 描述 / 用户确认)——「人工执行/
943
+ * 环境不可验证」任务经 blocker 上报、用户确认留痕后由开发者凭记录重新申报,审查者核验该留痕
944
+ * 后方可经 verified_tasks 确认(人工任务协议的申报依据)。复用 readBlockers 读取,无留痕不渲染;
945
+ * 经 title 参数区分视角措辞(审查者核验申报 / 开发者凭记录申报)。 */
946
+ function renderBlockerTrail(item: WorkItem, title: string): string[] {
947
+ const resolved = readBlockers(item).filter((b) => b.status === "resolved" && b.userResponse)
948
+ if (resolved.length === 0) return []
949
+ const lines = [title, ""]
950
+ for (const b of resolved) {
951
+ lines.push(`- Blocker #${b.id}${b.taskId ? ` | Task #${b.taskId}` : ""} | ${b.category}`)
952
+ lines.push(` - 描述:${b.description}`)
953
+ lines.push(` - 用户确认:${b.userResponse}`)
954
+ }
955
+ lines.push("")
956
+ return lines
957
+ }
958
+
931
959
  /** verify_task step:task children 待验证列表 + task 层 issue 主区块 + 调用者可裁定的豁免申请(待裁定)。 */
932
960
  function renderTaskChildren(item: WorkItem, ctxAgent: string, exemptionCtx?: ExemptionHintCtx): string[] {
933
961
  const lines: string[] = []
@@ -937,6 +965,7 @@ function renderTaskChildren(item: WorkItem, ctxAgent: string, exemptionCtx?: Exe
937
965
  for (const t of pendingTasks) lines.push(renderTaskItem(t))
938
966
  lines.push("")
939
967
  }
968
+ lines.push(...renderBlockerTrail(item, BLOCKER_TRAIL_TITLE_REVIEW))
940
969
  const issues = issueChildrenOf(item)
941
970
  const own = issues.filter((c) => isAgentOwnedIssue(c, ctxAgent))
942
971
  lines.push(...renderChildrenSection("Issue (待复核)", own, exemptionCtx))
@@ -971,6 +1000,7 @@ function renderMergedChildren(item: WorkItem, ctxAgent: string, exemptionCtx?: E
971
1000
  for (const t of pendingTasks) lines.push(renderTaskItem(t))
972
1001
  lines.push("")
973
1002
  }
1003
+ lines.push(...renderBlockerTrail(item, BLOCKER_TRAIL_TITLE_REVIEW))
974
1004
  const issues = issueChildrenOf(item)
975
1005
  const own = issues.filter((c) => isAgentOwnedIssue(c, ctxAgent))
976
1006
  lines.push(...renderChildrenSection("Issue (待复核)", own, exemptionCtx))