@ghyper9023/pi-dev-workflow 0.5.1 → 0.6.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.
@@ -399,7 +399,7 @@ const FEAT_WORKFLOW_STEPS: WorkflowStepDef[] = [
399
399
  label: "📝 更新文档",
400
400
  type: "confirm",
401
401
  agentName: "docWriter",
402
- timeoutMs: 300_000,
402
+ timeoutMs: 600_000,
403
403
  },
404
404
  ];
405
405
 
@@ -426,7 +426,7 @@ const FIX_WORKFLOW_STEPS: WorkflowStepDef[] = [
426
426
  label: "📝 更新文档",
427
427
  type: "confirm",
428
428
  agentName: "docWriter",
429
- timeoutMs: 300_000,
429
+ timeoutMs: 600_000,
430
430
  },
431
431
  ];
432
432
 
@@ -513,7 +513,7 @@ const DOC_WORKFLOW_STEPS: WorkflowStepDef[] = [
513
513
  label: "📝 撰写文档",
514
514
  type: "auto",
515
515
  agentName: "docWriter",
516
- timeoutMs: 300_000,
516
+ timeoutMs: 600_000,
517
517
  },
518
518
  ];
519
519
 
@@ -536,7 +536,7 @@ const SECURITY_WORKFLOW_STEPS: WorkflowStepDef[] = [
536
536
  label: "🔒 安全审查",
537
537
  type: "auto",
538
538
  agentName: "reviewer",
539
- timeoutMs: 300_000,
539
+ timeoutMs: 900_000,
540
540
  },
541
541
  ];
542
542
 
@@ -857,7 +857,7 @@ const COMPARE_QUESTIONS = [
857
857
  export default function (pi: ExtensionAPI) {
858
858
  // ── /dev-feat ──────────────────────────────────────────────
859
859
  pi.registerCommand("dev-feat", {
860
- description: "(prompt wizard) 新功能/创意生成 — 支持设计评审 (Grill) + 自动化工作流",
860
+ description: "(prompt wizard) 新功能/创意生成 — 支持设计方案追问完善 (Grill) + 自动化工作流",
861
861
  handler: async (_args, ctx) => {
862
862
  const answers: Record<string, string> = {};
863
863
  let featIdx = 0;
@@ -911,17 +911,17 @@ export default function (pi: ExtensionAPI) {
911
911
 
912
912
  // ── /dev-fix ───────────────────────────────────────────────
913
913
  pi.registerCommand("dev-fix", {
914
- description: "(prompt wizard) 问题排查/错误修正 — 支持根因分析评审 (Grill)",
914
+ description: "(prompt wizard) 问题排查/错误修正 — 支持 Bug 根因追问 (Grill)",
915
915
  handler: async (_args, ctx) => {
916
916
  await runWizardWithGrill(
917
917
  ctx, pi, "fix", "问题排查/错误修正",
918
918
  FIX_QUESTIONS, assembleFixPrompt,
919
919
  {
920
920
  agentDef: _fixGrillAgent,
921
- title: "🐛 Bug 根因分析评审",
922
- description: "AI 会从复现条件、根因推理、修复方案、回归风险等维度挑战你的理解。",
921
+ title: "🐛 Bug 根因追问",
922
+ description: "AI 会通过一步步追问帮你精准定位根因:从复现条件到根本原因推理,再到修复方案验证和回归风险评估。",
923
923
  questionTitle: "Bug 根因分析",
924
- loaderLabel: "🧠 AI 正在分析代码并生成根因评审问题...",
924
+ loaderLabel: "🧠 AI 正在分析代码并生成根因追问问题...",
925
925
  },
926
926
  { steps: FIX_WORKFLOW_STEPS },
927
927
  );
@@ -930,17 +930,17 @@ export default function (pi: ExtensionAPI) {
930
930
 
931
931
  // ── /dev-doc ───────────────────────────────────────────────
932
932
  pi.registerCommand("dev-doc", {
933
- description: "(prompt wizard) 文档生成/总结 — 支持大纲评审 (Grill)",
933
+ description: "(prompt wizard) 文档生成/总结 — 支持文档大纲追问完善 (Grill)",
934
934
  handler: async (_args, ctx) => {
935
935
  await runWizardWithGrill(
936
936
  ctx, pi, "doc", "文档生成/总结",
937
937
  DOC_QUESTIONS, assembleDocPrompt,
938
938
  {
939
939
  agentDef: _docGrillAgent,
940
- title: "📄 文档大纲评审",
941
- description: "AI 会从受众定位、结构安排、示例选择等维度审视你的文档计划。",
942
- questionTitle: "文档大纲评审",
943
- loaderLabel: "🧠 AI 正在分析并生成文档大纲评审问题...",
940
+ title: "📄 文档大纲追问完善",
941
+ description: "AI 会通过追问帮你完善文档大纲:从受众定位到结构安排,确认术语一致性和示例覆盖范围。",
942
+ questionTitle: "文档大纲追问完善",
943
+ loaderLabel: "🧠 AI 正在分析并生成文档大纲追问问题...",
944
944
  },
945
945
  { steps: DOC_WORKFLOW_STEPS },
946
946
  );
@@ -949,17 +949,17 @@ export default function (pi: ExtensionAPI) {
949
949
 
950
950
  // ── /dev-refactor ──────────────────────────────────────────
951
951
  pi.registerCommand("dev-refactor", {
952
- description: "(prompt wizard) 重构/优化现有结构 — 支持重构计划评审 (Grill)",
952
+ description: "(prompt wizard) 重构/优化现有结构 — 支持重构方案追问 (Grill)",
953
953
  handler: async (_args, ctx) => {
954
954
  await runWizardWithGrill(
955
955
  ctx, pi, "refactor", "重构/优化",
956
956
  REFACTOR_QUESTIONS, assembleRefactorPrompt,
957
957
  {
958
958
  agentDef: _refactorGrillAgent,
959
- title: "🔧 重构方案评审",
960
- description: "AI 会从模块边界、API 兼容性、测试策略、迁移风险等维度审视你的重构计划。",
961
- questionTitle: "重构方案评审",
962
- loaderLabel: "🧠 AI 正在分析代码并生成重构评审问题...",
959
+ title: "🔧 重构方案追问",
960
+ description: "AI 会通过追问帮你识别隐藏耦合风险:从模块边界到 API 兼容性,验证行为保持和迁移路径安全性。",
961
+ questionTitle: "重构方案追问",
962
+ loaderLabel: "🧠 AI 正在分析代码并生成重构追问问题...",
963
963
  },
964
964
  { steps: REFACTOR_WORKFLOW_STEPS },
965
965
  );
@@ -968,17 +968,17 @@ export default function (pi: ExtensionAPI) {
968
968
 
969
969
  // ── /dev-test ──────────────────────────────────────────────
970
970
  pi.registerCommand("dev-test", {
971
- description: "(prompt wizard) 测试用例生成 — 支持测试计划评审 (Grill)",
971
+ description: "(prompt wizard) 测试用例生成 — 支持测试策略追问 (Grill)",
972
972
  handler: async (_args, ctx) => {
973
973
  await runWizardWithGrill(
974
974
  ctx, pi, "test", "测试用例/评估",
975
975
  TEST_QUESTIONS, assembleTestPrompt,
976
976
  {
977
977
  agentDef: _testGrillAgent,
978
- title: "🧪 测试计划评审",
979
- description: "AI 会从覆盖维度、边界条件、模拟策略等角度审视你的测试方案。",
980
- questionTitle: "测试计划评审",
981
- loaderLabel: "🧠 AI 正在分析并生成测试评审问题...",
978
+ title: "🧪 测试策略追问",
979
+ description: "AI 会通过追问帮你发现测试缺口:从覆盖维度到边界条件,验证模拟策略和测试隔离是否到位。",
980
+ questionTitle: "测试策略追问",
981
+ loaderLabel: "🧠 AI 正在分析并生成测试追问问题...",
982
982
  },
983
983
  { steps: TEST_WORKFLOW_STEPS },
984
984
  );
@@ -995,17 +995,17 @@ export default function (pi: ExtensionAPI) {
995
995
 
996
996
  // ── /dev-perf ──────────────────────────────────────────────
997
997
  pi.registerCommand("dev-perf", {
998
- description: "(prompt wizard) 性能优化 — 支持优化方案评审 (Grill)",
998
+ description: "(prompt wizard) 性能优化 — 支持性能优化方案追问 (Grill)",
999
999
  handler: async (_args, ctx) => {
1000
1000
  await runWizardWithGrill(
1001
1001
  ctx, pi, "perf", "性能优化",
1002
1002
  PERF_QUESTIONS, assemblePerfPrompt,
1003
1003
  {
1004
1004
  agentDef: _perfGrillAgent,
1005
- title: "⚡ 性能优化方案评审",
1006
- description: "AI 会从基准测试方法、优化方向、回归风险等维度审视你的方案。",
1007
- questionTitle: "性能优化方案评审",
1008
- loaderLabel: "🧠 AI 正在分析并生成性能优化评审问题...",
1005
+ title: "⚡ 性能优化方案追问",
1006
+ description: "AI 会通过追问帮你验证瓶颈判断和优化方向:从基准测试方法到潜在回归风险,确保方案合理性。",
1007
+ questionTitle: "性能优化方案追问",
1008
+ loaderLabel: "🧠 AI 正在分析并生成性能优化追问问题...",
1009
1009
  },
1010
1010
  { steps: PERF_WORKFLOW_STEPS },
1011
1011
  );
@@ -1,5 +1,5 @@
1
1
  /**
2
- * grill-me-agent.ts — 设计评审 (Grill) 和 PRD 生成的独立管理器
2
+ * grill-me-agent.ts — 设计 (Grill) 和 PRD 生成的独立管理器
3
3
  *
4
4
  * 职责:
5
5
  * 1. runGrillPhase() — 启动 sub-agent 生成评审问题,TUI 逐题呈现(选项 + 自定义输入)
@@ -372,10 +372,10 @@ export async function runGrillPhase(
372
372
  };
373
373
 
374
374
  const agentDef = options?.agentDef ?? _defaultGrillAgent;
375
- const confirmTitle = options?.title ?? "🔍 设计方案评审";
376
- const confirmDesc = options?.description ?? "AI 会从架构、数据流、边界条件、安全等多个维度挑战你的设计。";
377
- const qTitlePrefix = options?.questionTitle ?? "设计方案评审";
378
- const loaderLabel = options?.loaderLabel ?? "🧠 AI 子代理正在分析代码并生成评审问题...";
375
+ const confirmTitle = options?.title ?? "🔍 设计方案追问完善";
376
+ const confirmDesc = options?.description ?? "AI 会通过系统性追问帮你打磨方案:从术语精确化到边界条件验证,确保架构决策的每个分支都经过推敲。";
377
+ const qTitlePrefix = options?.questionTitle ?? "设计方案追问完善";
378
+ const loaderLabel = options?.loaderLabel ?? "🧠 AI 子代理正在分析代码并生成追问问题...";
379
379
 
380
380
  // ── Step 1: Confirm entering grill mode ──────────────────
381
381
  const enterGrill = await uiConfirm(ctx, confirmTitle, confirmDesc);
@@ -438,16 +438,16 @@ export async function runGrillPhase(
438
438
 
439
439
  const choice = await uiSelect(
440
440
  ctx,
441
- "⚠️ AI 未能成功生成评审问题",
441
+ "⚠️ AI 未能成功生成追问问题",
442
442
  [
443
- "🔄 重新尝试生成评审问题",
443
+ "🔄 重新尝试生成追问问题",
444
444
  "⏭️ 跳过 Grill,直接发送 Prompt",
445
445
  "❌ 取消 (Esc)",
446
446
  ],
447
447
  );
448
448
 
449
449
  switch (choice) {
450
- case "🔄 重新尝试生成评审问题": {
450
+ case "🔄 重新尝试生成追问问题": {
451
451
  const retryPath = grillOutputPath(ctx.cwd);
452
452
  const errorFeedback = parseErrorMsg
453
453
  ? [
@@ -513,13 +513,13 @@ export async function runGrillPhase(
513
513
  rIdx++;
514
514
  }
515
515
  const qaBlock = pairs
516
- .map((p, i) => `[评审问题 ${i + 1}]\n问题: ${p.question}\n回答: ${p.answer}`)
516
+ .map((p, i) => `[追问问题 ${i + 1}]\n问题: ${p.question}\n回答: ${p.answer}`)
517
517
  .join("\n\n");
518
518
  const finalEnhancedPrompt = [
519
519
  assembledPrompt,
520
520
  "",
521
521
  "---",
522
- "## 设计评审记录",
522
+ "## 设计追问记录",
523
523
  "",
524
524
  "以下是在开发前进行的设计评审问答,所有决策已确认:",
525
525
  "",
@@ -572,16 +572,16 @@ export async function runGrillPhase(
572
572
 
573
573
  // ── Step 6: Assemble enhanced prompt ─────────────────────
574
574
  const qaBlock = pairs
575
- .map((p, i) => `[评审问题 ${i + 1}]\n问题: ${p.question}\n回答: ${p.answer}`)
575
+ .map((p, i) => `[追问问题 ${i + 1}]\n问题: ${p.question}\n回答: ${p.answer}`)
576
576
  .join("\n\n");
577
577
 
578
578
  const finalEnhancedPrompt = [
579
579
  assembledPrompt,
580
580
  "",
581
581
  "---",
582
- "## 设计评审记录",
582
+ "## 方案追问记录",
583
583
  "",
584
- "以下是在开发前进行的设计评审问答,所有决策已确认:",
584
+ "以下是在开发前进行的追问式方案打磨记录,所有决策已确认:",
585
585
  "",
586
586
  qaBlock,
587
587
  ].join("\n");
@@ -615,7 +615,7 @@ async function showQuestionTUI(
615
615
  q: GrillQuestion,
616
616
  currentIndex: number,
617
617
  totalCount: number,
618
- titlePrefix = "设计方案评审",
618
+ titlePrefix = "设计方案追问完善",
619
619
  backable = false,
620
620
  previousAnswer?: string,
621
621
  ): Promise<string | null> {
@@ -707,8 +707,8 @@ async function showQuestionTUI(
707
707
 
708
708
  container.addChild(new Spacer(1));
709
709
  const hint = backable && currentIndex > 1
710
- ? " ↑↓ 导航 • Enter 选择 • Ctrl+Shift+← 返回上一题 • Esc 取消全部评审"
711
- : " ↑↓ 导航 • Enter 选择 • Esc 取消全部评审";
710
+ ? " ↑↓ 导航 • Enter 选择 • Ctrl+Shift+← 返回上一题 • Esc 取消全部追问"
711
+ : " ↑↓ 导航 • Enter 选择 • Esc 取消全部追问";
712
712
  container.addChild(
713
713
  new Text(theme.fg("dim", hint), 0, 0),
714
714
  );