@shepai/cli 1.121.0-pr375.de718bc → 1.121.0-pr381.1f06300

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 (156) hide show
  1. package/dist/packages/core/src/infrastructure/services/agents/common/agent-executor-factory.service.js +1 -1
  2. package/dist/packages/core/src/infrastructure/services/agents/common/executors/cursor-executor.service.d.ts +28 -8
  3. package/dist/packages/core/src/infrastructure/services/agents/common/executors/cursor-executor.service.d.ts.map +1 -1
  4. package/dist/packages/core/src/infrastructure/services/agents/common/executors/cursor-executor.service.js +187 -29
  5. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts.map +1 -1
  6. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.js +9 -0
  7. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/evidence-output-parser.d.ts +21 -0
  8. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/evidence-output-parser.d.ts.map +1 -1
  9. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/evidence-output-parser.js +71 -0
  10. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/evidence.node.d.ts.map +1 -1
  11. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/evidence.node.js +11 -1
  12. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/fast-implement.node.d.ts.map +1 -1
  13. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/fast-implement.node.js +21 -0
  14. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.d.ts +5 -0
  15. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.d.ts.map +1 -1
  16. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.js +82 -54
  17. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/evidence-prompts.d.ts.map +1 -1
  18. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/evidence-prompts.js +18 -6
  19. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/fast-implement.prompt.d.ts.map +1 -1
  20. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/fast-implement.prompt.js +4 -1
  21. package/dist/src/presentation/tui/prompts/prd-review-question.prompt.d.ts +1 -1
  22. package/dist/src/presentation/tui/prompts/prd-review-question.prompt.d.ts.map +1 -1
  23. package/dist/src/presentation/tui/prompts/prd-review-question.prompt.js +5 -2
  24. package/dist/src/presentation/tui/wizards/prd-review.wizard.d.ts.map +1 -1
  25. package/dist/src/presentation/tui/wizards/prd-review.wizard.js +4 -2
  26. package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire.js +1 -1
  27. package/dist/tsconfig.build.tsbuildinfo +1 -1
  28. package/package.json +1 -1
  29. package/web/.next/BUILD_ID +1 -1
  30. package/web/.next/build-manifest.json +2 -2
  31. package/web/.next/fallback-build-manifest.json +2 -2
  32. package/web/.next/prerender-manifest.json +3 -3
  33. package/web/.next/required-server-files.js +1 -1
  34. package/web/.next/required-server-files.json +1 -1
  35. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +22 -22
  36. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  37. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  38. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +28 -28
  39. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  40. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  41. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +28 -28
  42. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  43. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  44. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +20 -20
  45. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  46. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  47. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +22 -22
  48. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  49. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  50. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +28 -28
  51. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  52. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  53. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +28 -28
  54. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  55. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  56. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +20 -20
  57. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  58. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  59. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +20 -20
  60. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  61. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  62. package/web/.next/server/app/_global-error.html +2 -2
  63. package/web/.next/server/app/_global-error.rsc +1 -1
  64. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  65. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  66. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  67. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  68. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  69. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  70. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  71. package/web/.next/server/app/settings/page/server-reference-manifest.json +6 -6
  72. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  73. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  74. package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
  75. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  76. package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
  77. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  78. package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  79. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  80. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  81. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  82. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  83. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_f30d0343.js +1 -1
  84. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_f30d0343.js.map +1 -1
  85. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_9f1775bb.js +1 -1
  86. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_9f1775bb.js.map +1 -1
  87. package/web/.next/server/chunks/ssr/[root-of-the-server]__06fef644._.js +1 -1
  88. package/web/.next/server/chunks/ssr/[root-of-the-server]__2698e9f4._.js +1 -1
  89. package/web/.next/server/chunks/ssr/[root-of-the-server]__2698e9f4._.js.map +1 -1
  90. package/web/.next/server/chunks/ssr/[root-of-the-server]__545792ab._.js +1 -1
  91. package/web/.next/server/chunks/ssr/[root-of-the-server]__545792ab._.js.map +1 -1
  92. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js +1 -1
  93. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js.map +1 -1
  94. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js +2 -2
  95. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js.map +1 -1
  96. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js +1 -1
  97. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js.map +1 -1
  98. package/web/.next/server/chunks/ssr/[root-of-the-server]__8c553503._.js +2 -2
  99. package/web/.next/server/chunks/ssr/[root-of-the-server]__8e3bf5d7._.js +1 -1
  100. package/web/.next/server/chunks/ssr/[root-of-the-server]__8e3bf5d7._.js.map +1 -1
  101. package/web/.next/server/chunks/ssr/[root-of-the-server]__a022445f._.js +2 -2
  102. package/web/.next/server/chunks/ssr/[root-of-the-server]__a7de2711._.js +2 -2
  103. package/web/.next/server/chunks/ssr/[root-of-the-server]__c07f9f79._.js +1 -1
  104. package/web/.next/server/chunks/ssr/[root-of-the-server]__c07f9f79._.js.map +1 -1
  105. package/web/.next/server/chunks/ssr/[root-of-the-server]__c605a375._.js +1 -1
  106. package/web/.next/server/chunks/ssr/[root-of-the-server]__c605a375._.js.map +1 -1
  107. package/web/.next/server/chunks/ssr/{_0e2fa803._.js → _04993166._.js} +2 -2
  108. package/web/.next/server/chunks/ssr/{_0e2fa803._.js.map → _04993166._.js.map} +1 -1
  109. package/web/.next/server/chunks/ssr/_0dc2cfd3._.js +1 -1
  110. package/web/.next/server/chunks/ssr/_0dc2cfd3._.js.map +1 -1
  111. package/web/.next/server/chunks/ssr/_135edb9c._.js +1 -1
  112. package/web/.next/server/chunks/ssr/_135edb9c._.js.map +1 -1
  113. package/web/.next/server/chunks/ssr/_2f6f48b8._.js +1 -1
  114. package/web/.next/server/chunks/ssr/_2f6f48b8._.js.map +1 -1
  115. package/web/.next/server/chunks/ssr/{_86bcd0cb._.js → _5d41171e._.js} +2 -2
  116. package/web/.next/server/chunks/ssr/{_86bcd0cb._.js.map → _5d41171e._.js.map} +1 -1
  117. package/web/.next/server/chunks/ssr/_69dc750a._.js +3 -0
  118. package/web/.next/server/chunks/ssr/{_9cdb9131._.js.map → _69dc750a._.js.map} +1 -1
  119. package/web/.next/server/chunks/ssr/_cc77a143._.js +1 -1
  120. package/web/.next/server/chunks/ssr/_cc77a143._.js.map +1 -1
  121. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  122. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  123. package/web/.next/server/chunks/ssr/src_presentation_web_5f039db1._.js +2 -2
  124. package/web/.next/server/chunks/ssr/src_presentation_web_5f039db1._.js.map +1 -1
  125. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_2a52b697.js +1 -1
  126. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_2a52b697.js.map +1 -1
  127. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
  128. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
  129. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
  130. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
  131. package/web/.next/server/chunks/ssr/src_presentation_web_c4337169._.js +2 -2
  132. package/web/.next/server/chunks/ssr/src_presentation_web_c4337169._.js.map +1 -1
  133. package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +1 -1
  134. package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js.map +1 -1
  135. package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +1 -1
  136. package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js.map +1 -1
  137. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  138. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  139. package/web/.next/server/pages/500.html +2 -2
  140. package/web/.next/server/server-reference-manifest.js +1 -1
  141. package/web/.next/server/server-reference-manifest.json +34 -34
  142. package/web/.next/static/chunks/{e4b05f1dc8974236.js → 0eaf379033745f9c.js} +1 -1
  143. package/web/.next/static/chunks/{78227a8fa0b0a44f.js → 2528a3010d234c85.js} +1 -1
  144. package/web/.next/static/chunks/{7c121b87cbc3a987.js → 3b45a9fd85ccc9de.js} +1 -1
  145. package/web/.next/static/chunks/{d1e8c0959d9e7e38.js → 4d8b73025fca6999.js} +1 -1
  146. package/web/.next/static/chunks/{d3ea72cbb1d42172.js → 6e3d9db5c7d9b80b.js} +2 -2
  147. package/web/.next/static/chunks/7da26e804dae0d6a.js +2 -0
  148. package/web/.next/static/chunks/{f62c2cfe34d12a8d.js → a5e7de2b72a15936.js} +1 -1
  149. package/web/.next/static/chunks/{f4ae633779d5324c.js → a8e6be49f9a6d368.js} +1 -1
  150. package/web/.next/static/chunks/{ff286f5ef499d263.js → cdd60fdf49856b6a.js} +1 -1
  151. package/web/.next/static/chunks/{87e9e13dd05907a3.js → d39d7f90ec5eab68.js} +1 -1
  152. package/web/.next/server/chunks/ssr/_9cdb9131._.js +0 -3
  153. package/web/.next/static/chunks/f357d403bf61ec3c.js +0 -2
  154. /package/web/.next/static/{FKhXOv4YGg6YioBqvMlGR → jG0b50Z0kTH3IRhQEH3lJ}/_buildManifest.js +0 -0
  155. /package/web/.next/static/{FKhXOv4YGg6YioBqvMlGR → jG0b50Z0kTH3IRhQEH3lJ}/_clientMiddlewareManifest.json +0 -0
  156. /package/web/.next/static/{FKhXOv4YGg6YioBqvMlGR → jG0b50Z0kTH3IRhQEH3lJ}/_ssgManifest.js +0 -0
@@ -22,7 +22,7 @@ import { reportNodeStart } from '../heartbeat.js';
22
22
  import { recordPhaseStart, recordPhaseEnd } from '../phase-timing-context.js';
23
23
  import { updateNodeLifecycle } from '../lifecycle-context.js';
24
24
  import { buildEvidencePrompt } from './prompts/evidence-prompts.js';
25
- import { parseEvidenceRecords } from './evidence-output-parser.js';
25
+ import { parseEvidenceRecords, validateUiEvidenceHasAppProof } from './evidence-output-parser.js';
26
26
  import { hasSettings, getSettings } from '../../../settings.service.js';
27
27
  /**
28
28
  * Factory that creates the evidence collection node function.
@@ -70,6 +70,15 @@ export function createEvidenceNode(executor) {
70
70
  log.error(`Warning: evidence parsing failed: ${msg} — continuing with empty evidence`);
71
71
  evidence = [];
72
72
  }
73
+ // --- Validate UI evidence includes app-level proof ---
74
+ const validationResult = validateUiEvidenceHasAppProof(evidence);
75
+ const validationMessages = [];
76
+ if (validationResult.warnings.length > 0) {
77
+ for (const warning of validationResult.warnings) {
78
+ log.error(`Evidence validation: ${warning}`);
79
+ validationMessages.push(`[evidence] Warning: ${warning}`);
80
+ }
81
+ }
73
82
  await recordPhaseEnd(timingId, durationMs);
74
83
  markPhaseComplete(state.specDir, 'evidence', log);
75
84
  return {
@@ -80,6 +89,7 @@ export function createEvidenceNode(executor) {
80
89
  ...(evidence.length === 0
81
90
  ? ['[evidence] Warning: no evidence records parsed from agent output']
82
91
  : []),
92
+ ...validationMessages,
83
93
  ],
84
94
  _needsReexecution: false,
85
95
  };
@@ -1 +1 @@
1
- {"version":3,"file":"fast-implement.node.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/fast-implement.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AAEpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAgBrD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,cAAc,IAGhD,OAAO,iBAAiB,KAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAkE7E"}
1
+ {"version":3,"file":"fast-implement.node.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/fast-implement.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AAEpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAgBrD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,cAAc,IAGhD,OAAO,iBAAiB,KAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CA0E7E"}
@@ -9,6 +9,7 @@
9
9
  * Follows the same factory pattern as other nodes: takes executor
10
10
  * dependency, returns async (state) => Partial<FeatureAgentState>.
11
11
  */
12
+ import { execSync } from 'node:child_process';
12
13
  import { mkdirSync, writeFileSync } from 'node:fs';
13
14
  import { join, dirname } from 'node:path';
14
15
  import { isGraphBubbleUp } from '@langchain/langgraph';
@@ -54,6 +55,11 @@ export function createFastImplementNode(executor) {
54
55
  const durationMs = Date.now() - startTime;
55
56
  const elapsed = (durationMs / 1000).toFixed(1);
56
57
  log.info(`Complete (${result.result.length} chars, ${elapsed}s)`);
58
+ // Validate that the executor actually produced file changes
59
+ const cwd = state.worktreePath || state.repositoryPath;
60
+ if (!hasWorktreeChanges(cwd)) {
61
+ throw new Error('[fast-implement] Agent produced no file changes — it may have entered plan mode or asked questions instead of implementing. Retrying.');
62
+ }
57
63
  // --- Evidence sub-agent: capture proof of completion (settings-gated) ---
58
64
  const evidenceEnabled = hasSettings() && getSettings().workflow.enableEvidence;
59
65
  const evidence = evidenceEnabled ? await collectEvidence(executor, state, log) : [];
@@ -119,6 +125,21 @@ async function collectEvidence(executor, state, log) {
119
125
  return [];
120
126
  }
121
127
  }
128
+ /**
129
+ * Check whether the worktree has any uncommitted changes (new, modified, or deleted files).
130
+ * Uses `git status --porcelain` which outputs one line per changed file, or empty if clean.
131
+ * Returns false if the git command fails (e.g. not a git repo).
132
+ */
133
+ function hasWorktreeChanges(cwd) {
134
+ try {
135
+ const output = execSync('git status --porcelain', { cwd, encoding: 'utf-8' });
136
+ return output.trim().length > 0;
137
+ }
138
+ catch {
139
+ // If git command fails, assume no changes (conservative — will trigger the error)
140
+ return false;
141
+ }
142
+ }
122
143
  /**
123
144
  * Save evidence manifest to the shep home evidence folder so the
124
145
  * merge review UI can read it without accessing graph state.
@@ -36,6 +36,11 @@ export interface MergeNodeDeps {
36
36
  * Resolve a branch ref to its current SHA.
37
37
  */
38
38
  revParse: (cwd: string, ref: string) => Promise<string>;
39
+ /**
40
+ * Stage all changes and commit in the given directory.
41
+ * Returns the commit hash, or undefined if there was nothing to commit.
42
+ */
43
+ commitAll: (cwd: string, message: string) => Promise<string | undefined>;
39
44
  gitPrService: IGitPrService;
40
45
  cleanupFeatureWorktreeUseCase: Pick<CleanupFeatureWorktreeUseCase, 'execute'>;
41
46
  }
@@ -1 +1 @@
1
- {"version":3,"file":"merge.node.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AACpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yEAAyE,CAAC;AAClH,OAAO,KAAK,EACV,WAAW,EACX,aAAa,EACd,MAAM,iEAAiE,CAAC;AAmBzE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uEAAuE,CAAC;AAE3H,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,cAAc,CAAC;IACzB,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;IAC1E,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7C,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACnD,iBAAiB,EAAE,IAAI,CAAC,kBAAkB,EAAE,UAAU,GAAG,QAAQ,CAAC,CAAC;IACnE;;OAEG;IACH,gBAAgB,EAAE,CAChB,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,SAAS,CAAC,EAAE,OAAO,KAChB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB;;;OAGG;IACH,WAAW,EAAE,CACX,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,eAAe,CAAC,EAAE,MAAM,KACrB,OAAO,CAAC,OAAO,CAAC,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACxD,YAAY,EAAE,aAAa,CAAC;IAC5B,6BAA6B,EAAE,IAAI,CAAC,6BAA6B,EAAE,SAAS,CAAC,CAAC;CAC/E;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,IAGnC,OAAO,iBAAiB,KAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CA+T7E"}
1
+ {"version":3,"file":"merge.node.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AACpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yEAAyE,CAAC;AAClH,OAAO,KAAK,EACV,WAAW,EACX,aAAa,EACd,MAAM,iEAAiE,CAAC;AAmBzE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uEAAuE,CAAC;AAE3H,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,cAAc,CAAC;IACzB,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;IAC1E,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7C,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACnD,iBAAiB,EAAE,IAAI,CAAC,kBAAkB,EAAE,UAAU,GAAG,QAAQ,CAAC,CAAC;IACnE;;OAEG;IACH,gBAAgB,EAAE,CAChB,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,SAAS,CAAC,EAAE,OAAO,KAChB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB;;;OAGG;IACH,WAAW,EAAE,CACX,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,eAAe,CAAC,EAAE,MAAM,KACrB,OAAO,CAAC,OAAO,CAAC,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACxD;;;OAGG;IACH,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACzE,YAAY,EAAE,aAAa,CAAC;IAC5B,6BAA6B,EAAE,IAAI,CAAC,6BAA6B,EAAE,SAAS,CAAC,CAAC;CAC/E;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,IAGnC,OAAO,iBAAiB,KAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CA0V7E"}
@@ -98,66 +98,94 @@ export function createMergeNode(deps) {
98
98
  : undefined;
99
99
  // --- Agent Call 1: Commit + Push + PR (skip on approval resume) ---
100
100
  if (!isResumeAfterInterrupt) {
101
- if (!remoteAvailable) {
102
- log.info('No git remote configured — skipping push and PR, will merge locally');
103
- }
104
101
  const effectiveState = remoteAvailable ? state : { ...state, push: false, openPr: false };
105
- log.info('Agent call 1: commit + push + PR');
106
- const commitPushPrPrompt = buildCommitPushPrPrompt(effectiveState, branch, baseBranch, repoUrl);
107
- const commitResult = await retryExecute(executor, commitPushPrPrompt, options, {
108
- logger: log,
109
- });
110
- totalInputTokens += commitResult.usage?.inputTokens ?? 0;
111
- totalOutputTokens += commitResult.usage?.outputTokens ?? 0;
112
- totalCostUsd += commitResult.usage?.costUsd ?? 0;
113
- totalNumTurns += commitResult.usage?.numTurns ?? 0;
114
- totalDurationApiMs += commitResult.usage?.durationApiMs ?? 0;
115
- commitHash = parseCommitHash(commitResult.result) ?? state.commitHash;
116
- messages.push(`[merge] Agent completed commit/push/PR operations`);
117
- if (effectiveState.openPr) {
118
- const prResult = parsePrUrl(commitResult.result);
119
- if (prResult) {
120
- prUrl = prResult.url;
121
- prNumber = prResult.number;
122
- // Cross-validate agent-parsed PR URL against authoritative source.
123
- // The agent may hallucinate the repo URL or PR number, so we look up
124
- // the real PR for this branch via the GitHub API.
125
- try {
126
- const prStatuses = await deps.gitPrService.listPrStatuses(cwd);
127
- const matchingPr = prStatuses.find((pr) => pr.headRefName === branch);
128
- if (matchingPr) {
129
- prUrl = matchingPr.url;
130
- prNumber = matchingPr.number;
131
- }
102
+ const needsAgentCall = effectiveState.push || effectiveState.openPr;
103
+ if (!needsAgentCall) {
104
+ // Local-only: commit programmatically in worktree, no agent needed.
105
+ // This avoids calling the agent executor just to run git commit,
106
+ // which is slow/unreliable on some platforms (e.g. cursor on Windows hangs).
107
+ log.info('Local-only mode — committing in worktree programmatically (no agent)');
108
+ const worktreeCwd = state.worktreePath ?? cwd;
109
+ try {
110
+ const msg = `feat: ${branch}`;
111
+ const hash = await deps.commitAll(worktreeCwd, msg);
112
+ if (hash) {
113
+ commitHash = hash;
114
+ log.info(`Committed changes in worktree: ${commitHash}`);
115
+ messages.push(`[merge] Programmatic commit: ${commitHash}`);
132
116
  }
133
- catch {
134
- // gh CLI unavailable or API failure — fall back to agent-parsed URL
117
+ else {
118
+ log.info('No changes to commit in worktree');
119
+ messages.push(`[merge] No changes to commit`);
135
120
  }
136
- messages.push(`[merge] PR created: ${prUrl}`);
121
+ }
122
+ catch (commitErr) {
123
+ const errMsg = commitErr instanceof Error ? commitErr.message : String(commitErr);
124
+ log.info(`Programmatic commit failed: ${errMsg} — falling back to agent`);
125
+ messages.push(`[merge] Programmatic commit failed, falling back to agent`);
126
+ // Fall through — needsAgentCall stays false so agent won't run either.
127
+ // The localMergeSquash will handle uncommitted changes via --squash.
137
128
  }
138
129
  }
139
- // --- CI watch/fix loop (when push or openPr is enabled and CI watch is not disabled) ---
140
- const ciWatchEnabled = getSettings().workflow?.ciWatchEnabled !== false;
141
- if (ciWatchEnabled && (effectiveState.push || effectiveState.openPr)) {
142
- const ciResult = await runCiWatchFixLoop({
143
- executor,
144
- gitPrService: deps.gitPrService,
145
- featureRepository: deps.featureRepository,
146
- }, {
147
- cwd,
148
- branch,
149
- options,
150
- feature,
151
- prUrl,
152
- prNumber,
153
- existingAttempts: ciFixAttempts,
154
- messages,
155
- log,
130
+ if (needsAgentCall) {
131
+ if (!remoteAvailable) {
132
+ log.info('No git remote configured — skipping push and PR, will merge locally');
133
+ }
134
+ log.info('Agent call 1: commit + push + PR');
135
+ const commitPushPrPrompt = buildCommitPushPrPrompt(effectiveState, branch, baseBranch, repoUrl);
136
+ const commitResult = await retryExecute(executor, commitPushPrPrompt, options, {
137
+ logger: log,
156
138
  });
157
- ciStatus = ciResult.ciStatus;
158
- ciFixAttempts = ciResult.ciFixAttempts;
159
- ciFixHistory = ciResult.ciFixHistory;
160
- ciFixStatus = ciResult.ciFixStatus;
139
+ totalInputTokens += commitResult.usage?.inputTokens ?? 0;
140
+ totalOutputTokens += commitResult.usage?.outputTokens ?? 0;
141
+ totalCostUsd += commitResult.usage?.costUsd ?? 0;
142
+ totalNumTurns += commitResult.usage?.numTurns ?? 0;
143
+ totalDurationApiMs += commitResult.usage?.durationApiMs ?? 0;
144
+ commitHash = parseCommitHash(commitResult.result) ?? state.commitHash;
145
+ messages.push(`[merge] Agent completed commit/push/PR operations`);
146
+ if (effectiveState.openPr) {
147
+ const prResult = parsePrUrl(commitResult.result);
148
+ if (prResult) {
149
+ prUrl = prResult.url;
150
+ prNumber = prResult.number;
151
+ // Cross-validate agent-parsed PR URL against authoritative source.
152
+ try {
153
+ const prStatuses = await deps.gitPrService.listPrStatuses(cwd);
154
+ const matchingPr = prStatuses.find((pr) => pr.headRefName === branch);
155
+ if (matchingPr) {
156
+ prUrl = matchingPr.url;
157
+ prNumber = matchingPr.number;
158
+ }
159
+ }
160
+ catch {
161
+ // gh CLI unavailable or API failure — fall back to agent-parsed URL
162
+ }
163
+ messages.push(`[merge] PR created: ${prUrl}`);
164
+ }
165
+ }
166
+ // --- CI watch/fix loop (when push or openPr is enabled and CI watch is not disabled) ---
167
+ const ciWatchEnabled = getSettings().workflow?.ciWatchEnabled !== false;
168
+ if (ciWatchEnabled && (effectiveState.push || effectiveState.openPr)) {
169
+ const ciResult = await runCiWatchFixLoop({
170
+ executor,
171
+ gitPrService: deps.gitPrService,
172
+ featureRepository: deps.featureRepository,
173
+ }, {
174
+ cwd,
175
+ branch,
176
+ options,
177
+ feature,
178
+ prUrl,
179
+ prNumber,
180
+ existingAttempts: ciFixAttempts,
181
+ messages,
182
+ log,
183
+ });
184
+ ciStatus = ciResult.ciStatus;
185
+ ciFixAttempts = ciResult.ciFixAttempts;
186
+ ciFixHistory = ciResult.ciFixHistory;
187
+ ciFixStatus = ciResult.ciFixStatus;
188
+ }
161
189
  }
162
190
  // --- Persist lifecycle + PR data before approval gate ---
163
191
  // Setting lifecycle to Review serves as the resume detection marker
@@ -1 +1 @@
1
- {"version":3,"file":"evidence-prompts.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/evidence-prompts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,MAAM,WAAW,qBAAqB;IACpC,kEAAkE;IAClE,cAAc,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,iBAAiB,EACxB,OAAO,GAAE,qBAAiD,GACzD,MAAM,CA8LR"}
1
+ {"version":3,"file":"evidence-prompts.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/evidence-prompts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,MAAM,WAAW,qBAAqB;IACpC,kEAAkE;IAClE,cAAc,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,iBAAiB,EACxB,OAAO,GAAE,qBAAiD,GACzD,MAAM,CA0MR"}
@@ -90,11 +90,17 @@ ${cwd}
90
90
 
91
91
  Review the completed tasks above and capture evidence for each.
92
92
 
93
- ### MANDATORY Screenshot Rule
93
+ ### MANDATORY Screenshot Rule — App-Level Proof Required
94
94
 
95
- **If ANY task touches UI code (components, pages, views, styles, layouts, templates, JSX/TSX, HTML, CSS), you MUST capture at least one Screenshot.** This is non-negotiable. Changing a heading, button label, color, layout, or any visible element requires a screenshot proving the change renders correctly.
95
+ **If ANY task touches UI code (components, pages, views, styles, layouts, templates, JSX/TSX, HTML, CSS), you MUST capture at least one Screenshot from the ACTUAL RUNNING APPLICATION (dev server).** This is non-negotiable. Changing a heading, button label, color, layout, or any visible element requires a screenshot proving the change renders correctly in the real app context.
96
96
 
97
- To capture screenshots:
97
+ **CRITICAL: Storybook-only evidence is NOT sufficient for UI features.** Storybook screenshots may be included as supplementary evidence, but they do NOT replace app-level screenshots. You MUST capture screenshots from the actual running application (via the dev server) to prove the feature works in its real context with actual data, routing, and integration.
98
+
99
+ For each UI change you MUST capture:
100
+ 1. **App screenshot (REQUIRED)**: A screenshot from the running dev server showing the feature in its actual app context. Include "app" or the actual page/route name in the screenshot file name (e.g., \`app-dashboard-new-toggle.png\`, \`app-settings-page.png\`).
101
+ 2. **Storybook screenshot (OPTIONAL, supplementary)**: If the component has a Storybook story, you may also capture a Storybook screenshot as supplementary evidence. Include "storybook" in the file name (e.g., \`storybook-toggle-component.png\`).
102
+
103
+ To capture app-level screenshots:
98
104
  1. Install Playwright if not already available: \`npx playwright install chromium --with-deps 2>/dev/null || npx playwright install chromium\`
99
105
  2. Start the dev server in the background (e.g., \`npm run dev &\` or \`pnpm dev &\`)
100
106
  3. Wait for the server to be ready
@@ -114,11 +120,16 @@ To capture screenshots:
114
120
  \`\`\`
115
121
  5. Stop the dev server after capturing
116
122
 
123
+ To capture Storybook screenshots (supplementary only):
124
+ 1. Start Storybook: \`npx storybook dev -p 6006 &\` or \`pnpm dev:storybook &\`
125
+ 2. Navigate to the relevant story and capture a screenshot
126
+ 3. Stop Storybook after capturing
127
+
117
128
  If Playwright installation fails, try alternative approaches (e.g., \`npx puppeteer\`, \`curl\` for API responses). Only skip screenshots if ALL browser automation approaches fail — and in that case, explicitly note the failure reason in the evidence description.
118
129
 
119
130
  ### Evidence by Task Type
120
131
 
121
- - **UI/Web tasks**: You MUST take screenshots (see mandatory rule above). Also run and capture test output.
132
+ - **UI/Web tasks**: You MUST take screenshots FROM THE RUNNING APP (see mandatory rule above). Storybook-only screenshots are NOT acceptable as primary evidence. Also run and capture test output.
122
133
  - **Backend/API tasks**: Run the relevant test suite and capture test output showing passing tests.
123
134
  - **CLI tasks**: Run the CLI commands and capture terminal output demonstrating correct behavior.
124
135
  - **Refactoring/Infrastructure tasks**: Capture test output or build output confirming no regressions.
@@ -133,9 +144,10 @@ If Playwright installation fails, try alternative approaches (e.g., \`npx puppet
133
144
  ### Minimum Evidence Requirements
134
145
 
135
146
  Your output MUST include:
136
- 1. At least one **Screenshot** if any task modifies UI/visual code (components, styles, templates, markup)
147
+ 1. At least one **Screenshot from the running app** (NOT Storybook) if any task modifies UI/visual code (components, styles, templates, markup). The screenshot description MUST clearly indicate it was captured from the actual application (e.g., "App: dashboard page showing new toggle", "App: settings page with updated layout"). Do NOT use descriptions that suggest Storybook-only proof.
137
148
  2. At least one **TestOutput** if the project has a test suite
138
- 3. Do NOT output only TestOutput/TerminalRecording when the feature involves visible UI changes — screenshots are mandatory in that case
149
+ 3. Do NOT output only TestOutput/TerminalRecording when the feature involves visible UI changes — app-level screenshots are mandatory in that case
150
+ 4. Do NOT submit only Storybook screenshots for UI features — each UI screenshot MUST have a corresponding app-level screenshot proving the feature works in its real context
139
151
 
140
152
  ${storageSection}
141
153
 
@@ -1 +1 @@
1
- {"version":3,"file":"fast-implement.prompt.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/fast-implement.prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAwIxD;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAoEzE"}
1
+ {"version":3,"file":"fast-implement.prompt.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/fast-implement.prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAwIxD;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAuEzE"}
@@ -211,6 +211,9 @@ ${dirListing}
211
211
  - Follow existing codebase conventions and patterns
212
212
  - Do NOT commit, push, or create pull requests
213
213
  - Do NOT modify any spec YAML files
214
- - Keep changes focused and minimal`);
214
+ - Keep changes focused and minimal
215
+ - Do NOT enter plan mode — implement directly without planning phases
216
+ - Do NOT ask the user questions or use AskUserQuestion — make reasonable decisions and proceed
217
+ - You MUST create or modify actual code files — a plan or summary alone is not acceptable output`);
215
218
  return sections.join('\n\n');
216
219
  }
@@ -8,7 +8,7 @@ import type { QuestionOption } from '../../../../packages/core/src/domain/genera
8
8
  /**
9
9
  * Creates the @inquirer/select configuration for a single open question.
10
10
  */
11
- export declare function createQuestionSelectConfig(question: string, options: QuestionOption[], currentAnswer?: string): {
11
+ export declare function createQuestionSelectConfig(question: string, options: QuestionOption[], currentAnswer?: string, questionNumber?: number, totalQuestions?: number): {
12
12
  message: string;
13
13
  choices: {
14
14
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"prd-review-question.prompt.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/tui/prompts/prd-review-question.prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,cAAc,EAAE,EACzB,aAAa,CAAC,EAAE,MAAM;;;;;;;;;;;;;;;;;;EAcvB"}
1
+ {"version":3,"file":"prd-review-question.prompt.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/tui/prompts/prd-review-question.prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,cAAc,EAAE,EACzB,aAAa,CAAC,EAAE,MAAM,EACtB,cAAc,CAAC,EAAE,MAAM,EACvB,cAAc,CAAC,EAAE,MAAM;;;;;;;;;;;;;;;;;;EAmBxB"}
@@ -8,14 +8,17 @@ import { shepTheme } from '../themes/shep.theme.js';
8
8
  /**
9
9
  * Creates the @inquirer/select configuration for a single open question.
10
10
  */
11
- export function createQuestionSelectConfig(question, options, currentAnswer) {
11
+ export function createQuestionSelectConfig(question, options, currentAnswer, questionNumber, totalQuestions) {
12
12
  const choices = options.map((opt) => ({
13
13
  name: opt.option,
14
14
  value: opt.option,
15
15
  description: opt.description,
16
16
  }));
17
+ const prefix = questionNumber != null && totalQuestions != null
18
+ ? `[${questionNumber}/${totalQuestions}] `
19
+ : '';
17
20
  return {
18
- message: question,
21
+ message: `${prefix}${question}`,
19
22
  choices,
20
23
  default: currentAnswer,
21
24
  theme: shepTheme,
@@ -1 +1 @@
1
- {"version":3,"file":"prd-review.wizard.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/tui/wizards/prd-review.wizard.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,yCAAyC,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2DAA2D,CAAC;AAC9F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAG5E,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,YAAY,CAAC;IACrB,iBAAiB,EAAE,uBAAuB,EAAE,CAAC;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CAAC,SAAS,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA4B/F"}
1
+ {"version":3,"file":"prd-review.wizard.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/tui/wizards/prd-review.wizard.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,yCAAyC,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2DAA2D,CAAC;AAC9F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAG5E,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,YAAY,CAAC;IACrB,iBAAiB,EAAE,uBAAuB,EAAE,CAAC;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CAAC,SAAS,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA8B/F"}
@@ -20,8 +20,10 @@ import { shepTheme } from '../themes/shep.theme.js';
20
20
  */
21
21
  export async function prdReviewWizard(questions) {
22
22
  const changedSelections = [];
23
- for (const q of questions) {
24
- const selected = await select(createQuestionSelectConfig(q.question, q.options, q.selectedOption));
23
+ const total = questions.length;
24
+ for (let i = 0; i < total; i++) {
25
+ const q = questions[i];
26
+ const selected = await select(createQuestionSelectConfig(q.question, q.options, q.selectedOption, i + 1, total));
25
27
  if (selected !== q.selectedOption) {
26
28
  changedSelections.push({
27
29
  questionId: q.question,
@@ -27,7 +27,7 @@ export function PrdQuestionnaire({ data, selections, onSelect, onApprove, onReje
27
27
  }, [onSelect, isLastStep, selectSound]);
28
28
  if (total === 0)
29
29
  return null;
30
- return (_jsxs("div", { className: "flex min-h-0 flex-1 flex-col", children: [_jsxs("div", { className: "flex-1 space-y-4 overflow-y-auto p-4", children: [showHeader ? (_jsxs("div", { className: "border-border flex items-start gap-3 border-b pb-3", children: [_jsx("div", { className: "mt-1.5 h-2 w-2 shrink-0 rounded-full bg-amber-500" }), _jsxs("div", { className: "flex-1", children: [_jsx("h3", { className: "text-foreground mb-1.5 text-sm font-bold", children: question }), _jsx("p", { className: "text-muted-foreground text-xs leading-relaxed", children: context })] })] })) : null, _jsxs("div", { className: "space-y-3", children: [_jsxs("div", { className: "flex items-start gap-3", children: [_jsx("label", { className: "text-foreground min-w-0 flex-1 text-sm font-semibold", children: currentQuestion.question }), _jsx("div", { className: "mt-1.5 flex shrink-0 gap-1", children: questions.map((q, idx) => (_jsx("button", { type: "button", "aria-label": `Go to question ${idx + 1}`, className: cn('h-1.5 rounded-full transition-all duration-200', idx === currentStep ? 'bg-primary w-4' : 'w-1.5', idx !== currentStep && selections[q.id] ? 'bg-primary/50' : '', idx !== currentStep && !selections[q.id] ? 'bg-muted-foreground/25' : ''), onClick: () => {
30
+ return (_jsxs("div", { className: "flex min-h-0 flex-1 flex-col", children: [_jsxs("div", { className: "flex-1 space-y-4 overflow-y-auto p-4", children: [showHeader ? (_jsxs("div", { className: "border-border flex items-start gap-3 border-b pb-3", children: [_jsx("div", { className: "mt-1.5 h-2 w-2 shrink-0 rounded-full bg-amber-500" }), _jsxs("div", { className: "flex-1", children: [_jsx("h3", { className: "text-foreground mb-1.5 text-sm font-bold", children: question }), _jsx("p", { className: "text-muted-foreground text-xs leading-relaxed", children: context })] })] })) : null, _jsxs("div", { className: "space-y-3", children: [_jsxs("div", { className: "flex items-start gap-3", children: [_jsxs("label", { className: "text-foreground min-w-0 flex-1 text-sm font-semibold", children: [currentStep + 1, ". ", currentQuestion.question] }), _jsx("div", { className: "mt-1.5 flex shrink-0 gap-1", children: questions.map((q, idx) => (_jsx("button", { type: "button", "aria-label": `Go to question ${idx + 1}`, className: cn('h-1.5 rounded-full transition-all duration-200', idx === currentStep ? 'bg-primary w-4' : 'w-1.5', idx !== currentStep && selections[q.id] ? 'bg-primary/50' : '', idx !== currentStep && !selections[q.id] ? 'bg-muted-foreground/25' : ''), onClick: () => {
31
31
  navigateSound.play();
32
32
  setCurrentStep(idx);
33
33
  } }, q.id))) })] }), _jsx("div", { className: "space-y-2", children: currentQuestion.options.map((opt, optIdx) => {