brainrot-cli 0.1.0 → 0.2.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.
Files changed (180) hide show
  1. package/dist/AchievementNotification.d.ts.map +1 -1
  2. package/dist/AchievementNotification.js.map +1 -1
  3. package/dist/AppNew.d.ts +11 -0
  4. package/dist/AppNew.d.ts.map +1 -0
  5. package/dist/AppNew.js +437 -0
  6. package/dist/AppNew.js.map +1 -0
  7. package/dist/AttentionOverlay.d.ts +28 -0
  8. package/dist/AttentionOverlay.d.ts.map +1 -0
  9. package/dist/AttentionOverlay.js +92 -0
  10. package/dist/AttentionOverlay.js.map +1 -0
  11. package/dist/ClaudeChat.d.ts +38 -0
  12. package/dist/ClaudeChat.d.ts.map +1 -0
  13. package/dist/ClaudeChat.js +81 -0
  14. package/dist/ClaudeChat.js.map +1 -0
  15. package/dist/DynamicInterviewFlow.d.ts +66 -0
  16. package/dist/DynamicInterviewFlow.d.ts.map +1 -0
  17. package/dist/DynamicInterviewFlow.js +352 -0
  18. package/dist/DynamicInterviewFlow.js.map +1 -0
  19. package/dist/FeatureInput.d.ts +20 -0
  20. package/dist/FeatureInput.d.ts.map +1 -0
  21. package/dist/FeatureInput.js +66 -0
  22. package/dist/FeatureInput.js.map +1 -0
  23. package/dist/FeaturePromptScreen.d.ts +24 -0
  24. package/dist/FeaturePromptScreen.d.ts.map +1 -0
  25. package/dist/FeaturePromptScreen.js +117 -0
  26. package/dist/FeaturePromptScreen.js.map +1 -0
  27. package/dist/GameSelectScreen.d.ts +24 -0
  28. package/dist/GameSelectScreen.d.ts.map +1 -0
  29. package/dist/GameSelectScreen.js +78 -0
  30. package/dist/GameSelectScreen.js.map +1 -0
  31. package/dist/GameSelector.d.ts +9 -1
  32. package/dist/GameSelector.d.ts.map +1 -1
  33. package/dist/GameSelector.js +116 -19
  34. package/dist/GameSelector.js.map +1 -1
  35. package/dist/GameSelectorOverlay.d.ts +21 -0
  36. package/dist/GameSelectorOverlay.d.ts.map +1 -0
  37. package/dist/GameSelectorOverlay.js +98 -0
  38. package/dist/GameSelectorOverlay.js.map +1 -0
  39. package/dist/HelpOverlay.d.ts.map +1 -1
  40. package/dist/HelpOverlay.js +5 -2
  41. package/dist/HelpOverlay.js.map +1 -1
  42. package/dist/InterviewQuestion.d.ts +36 -0
  43. package/dist/InterviewQuestion.d.ts.map +1 -0
  44. package/dist/InterviewQuestion.js +148 -0
  45. package/dist/InterviewQuestion.js.map +1 -0
  46. package/dist/Layout.d.ts +1 -1
  47. package/dist/Layout.d.ts.map +1 -1
  48. package/dist/Layout.js +4 -4
  49. package/dist/Layout.js.map +1 -1
  50. package/dist/LogViewer.d.ts.map +1 -1
  51. package/dist/LogViewer.js +2 -2
  52. package/dist/LogViewer.js.map +1 -1
  53. package/dist/LoopAlertOverlay.d.ts +1 -1
  54. package/dist/LoopAlertOverlay.d.ts.map +1 -1
  55. package/dist/LoopAlertOverlay.js +1 -1
  56. package/dist/LoopAlertOverlay.js.map +1 -1
  57. package/dist/LoopComplete.d.ts +42 -0
  58. package/dist/LoopComplete.d.ts.map +1 -0
  59. package/dist/LoopComplete.js +69 -0
  60. package/dist/LoopComplete.js.map +1 -0
  61. package/dist/LoopManagementPanel.d.ts.map +1 -1
  62. package/dist/LoopManagementPanel.js.map +1 -1
  63. package/dist/OnboardingTutorial.d.ts +23 -0
  64. package/dist/OnboardingTutorial.d.ts.map +1 -0
  65. package/dist/OnboardingTutorial.js +165 -0
  66. package/dist/OnboardingTutorial.js.map +1 -0
  67. package/dist/PrdGenerationScreen.d.ts +43 -0
  68. package/dist/PrdGenerationScreen.d.ts.map +1 -0
  69. package/dist/PrdGenerationScreen.js +411 -0
  70. package/dist/PrdGenerationScreen.js.map +1 -0
  71. package/dist/PrdOverlay.d.ts +29 -0
  72. package/dist/PrdOverlay.d.ts.map +1 -0
  73. package/dist/PrdOverlay.js +174 -0
  74. package/dist/PrdOverlay.js.map +1 -0
  75. package/dist/PreStartReviewScreen.d.ts +29 -0
  76. package/dist/PreStartReviewScreen.d.ts.map +1 -0
  77. package/dist/PreStartReviewScreen.js +161 -0
  78. package/dist/PreStartReviewScreen.js.map +1 -0
  79. package/dist/ResumeOverlay.d.ts +26 -0
  80. package/dist/ResumeOverlay.d.ts.map +1 -0
  81. package/dist/ResumeOverlay.js +163 -0
  82. package/dist/ResumeOverlay.js.map +1 -0
  83. package/dist/ResumePrompt.d.ts +32 -0
  84. package/dist/ResumePrompt.d.ts.map +1 -0
  85. package/dist/ResumePrompt.js +65 -0
  86. package/dist/ResumePrompt.js.map +1 -0
  87. package/dist/SettingsMenu.d.ts.map +1 -1
  88. package/dist/SettingsMenu.js +14 -7
  89. package/dist/SettingsMenu.js.map +1 -1
  90. package/dist/SetupWizard.d.ts +41 -0
  91. package/dist/SetupWizard.d.ts.map +1 -0
  92. package/dist/SetupWizard.js +167 -0
  93. package/dist/SetupWizard.js.map +1 -0
  94. package/dist/SidePanel.d.ts +26 -0
  95. package/dist/SidePanel.d.ts.map +1 -0
  96. package/dist/SidePanel.js +90 -0
  97. package/dist/SidePanel.js.map +1 -0
  98. package/dist/SplitPane.d.ts.map +1 -1
  99. package/dist/SplitPane.js +6 -2
  100. package/dist/SplitPane.js.map +1 -1
  101. package/dist/StatsMenu.d.ts.map +1 -1
  102. package/dist/StatsMenu.js +24 -6
  103. package/dist/StatsMenu.js.map +1 -1
  104. package/dist/StatusBar.d.ts +45 -2
  105. package/dist/StatusBar.d.ts.map +1 -1
  106. package/dist/StatusBar.js +193 -23
  107. package/dist/StatusBar.js.map +1 -1
  108. package/dist/StatusBarMinimal.d.ts +26 -0
  109. package/dist/StatusBarMinimal.d.ts.map +1 -0
  110. package/dist/StatusBarMinimal.js +111 -0
  111. package/dist/StatusBarMinimal.js.map +1 -0
  112. package/dist/TaskBreakdownScreen.d.ts +27 -0
  113. package/dist/TaskBreakdownScreen.d.ts.map +1 -0
  114. package/dist/TaskBreakdownScreen.js +96 -0
  115. package/dist/TaskBreakdownScreen.js.map +1 -0
  116. package/dist/cli.d.ts.map +1 -1
  117. package/dist/cli.js +3 -1
  118. package/dist/cli.js.map +1 -1
  119. package/dist/config.d.ts +11 -0
  120. package/dist/config.d.ts.map +1 -1
  121. package/dist/config.js +12 -0
  122. package/dist/config.js.map +1 -1
  123. package/dist/games/MinesweeperGame.d.ts +1 -1
  124. package/dist/games/MinesweeperGame.d.ts.map +1 -1
  125. package/dist/games/MinesweeperGame.js +30 -10
  126. package/dist/games/MinesweeperGame.js.map +1 -1
  127. package/dist/games/PongGame.d.ts +1 -1
  128. package/dist/games/PongGame.d.ts.map +1 -1
  129. package/dist/games/PongGame.js +7 -2
  130. package/dist/games/PongGame.js.map +1 -1
  131. package/dist/games/SnakeGame.d.ts +1 -1
  132. package/dist/games/SnakeGame.d.ts.map +1 -1
  133. package/dist/games/SnakeGame.js +12 -4
  134. package/dist/games/SnakeGame.js.map +1 -1
  135. package/dist/games/TetrisGame.d.ts +1 -1
  136. package/dist/games/TetrisGame.d.ts.map +1 -1
  137. package/dist/games/TetrisGame.js +22 -5
  138. package/dist/games/TetrisGame.js.map +1 -1
  139. package/dist/high-scores.d.ts.map +1 -1
  140. package/dist/high-scores.js.map +1 -1
  141. package/dist/index.d.ts +6 -0
  142. package/dist/index.d.ts.map +1 -1
  143. package/dist/index.js +10 -236
  144. package/dist/index.js.map +1 -1
  145. package/dist/loop-state.d.ts +137 -0
  146. package/dist/loop-state.d.ts.map +1 -0
  147. package/dist/loop-state.js +228 -0
  148. package/dist/loop-state.js.map +1 -0
  149. package/dist/ralph-loop-parser.d.ts.map +1 -1
  150. package/dist/ralph-loop-parser.js +4 -2
  151. package/dist/ralph-loop-parser.js.map +1 -1
  152. package/dist/stats.d.ts.map +1 -1
  153. package/dist/stats.js.map +1 -1
  154. package/dist/styled-components.d.ts +1 -1
  155. package/dist/styled-components.d.ts.map +1 -1
  156. package/dist/styled-components.js +5 -3
  157. package/dist/styled-components.js.map +1 -1
  158. package/dist/theme.d.ts.map +1 -1
  159. package/dist/theme.js +15 -2
  160. package/dist/theme.js.map +1 -1
  161. package/dist/themes.d.ts.map +1 -1
  162. package/dist/themes.js.map +1 -1
  163. package/dist/use-claude-code.d.ts.map +1 -1
  164. package/dist/use-claude-code.js +7 -1
  165. package/dist/use-claude-code.js.map +1 -1
  166. package/dist/use-config.d.ts.map +1 -1
  167. package/dist/use-config.js.map +1 -1
  168. package/dist/use-loop-state.d.ts +55 -0
  169. package/dist/use-loop-state.d.ts.map +1 -0
  170. package/dist/use-loop-state.js +208 -0
  171. package/dist/use-loop-state.js.map +1 -0
  172. package/dist/use-stats.d.ts.map +1 -1
  173. package/dist/use-stats.js.map +1 -1
  174. package/dist/useTheme.d.ts.map +1 -1
  175. package/dist/useTheme.js.map +1 -1
  176. package/package.json +3 -2
  177. package/dist/__tests__/ralph-loop-parser.test.d.ts +0 -2
  178. package/dist/__tests__/ralph-loop-parser.test.d.ts.map +0 -1
  179. package/dist/__tests__/ralph-loop-parser.test.js +0 -143
  180. package/dist/__tests__/ralph-loop-parser.test.js.map +0 -1
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Claude Chat Component
3
+ *
4
+ * Displays Claude's planning questions and captures user answers.
5
+ * Used during the "plan mode" phase where Claude asks clarifying questions.
6
+ */
7
+ export interface ChatMessage {
8
+ /** Message role */
9
+ role: "assistant" | "user";
10
+ /** Message content */
11
+ content: string;
12
+ /** Whether this message is waiting for user input */
13
+ isWaitingForInput?: boolean;
14
+ }
15
+ export interface ClaudeChatProps {
16
+ /** Feature being planned */
17
+ featureDescription: string;
18
+ /** Chat messages */
19
+ messages: ChatMessage[];
20
+ /** Whether Claude is currently thinking */
21
+ isThinking: boolean;
22
+ /** Progress percentage (0-100) */
23
+ progress: number;
24
+ /** Callback when user submits an answer */
25
+ onSubmitAnswer: (answer: string) => void;
26
+ /** Callback to cancel planning */
27
+ onCancel: () => void;
28
+ /** Whether the component has focus */
29
+ hasFocus: boolean;
30
+ /** Terminal dimensions */
31
+ dimensions: {
32
+ width: number;
33
+ height: number;
34
+ };
35
+ }
36
+ export declare function ClaudeChat({ featureDescription, messages, isThinking, progress, onSubmitAnswer, onCancel, hasFocus, dimensions, }: ClaudeChatProps): import("react/jsx-runtime").JSX.Element;
37
+ export default ClaudeChat;
38
+ //# sourceMappingURL=ClaudeChat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClaudeChat.d.ts","sourceRoot":"","sources":["../src/ClaudeChat.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH,MAAM,WAAW,WAAW;IAC1B,mBAAmB;IACnB,IAAI,EAAE,WAAW,GAAG,MAAM,CAAC;IAC3B,sBAAsB;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,eAAe;IAC9B,4BAA4B;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,oBAAoB;IACpB,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,2CAA2C;IAC3C,UAAU,EAAE,OAAO,CAAC;IACpB,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,2CAA2C;IAC3C,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,kCAAkC;IAClC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,sCAAsC;IACtC,QAAQ,EAAE,OAAO,CAAC;IAClB,0BAA0B;IAC1B,UAAU,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/C;AAMD,wBAAgB,UAAU,CAAC,EACzB,kBAAkB,EAClB,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,UAAU,GACX,EAAE,eAAe,2CAkMjB;AAED,eAAe,UAAU,CAAC"}
@@ -0,0 +1,81 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /**
3
+ * Claude Chat Component
4
+ *
5
+ * Displays Claude's planning questions and captures user answers.
6
+ * Used during the "plan mode" phase where Claude asks clarifying questions.
7
+ */
8
+ import { Box, Text, useInput } from "ink";
9
+ import { useState, useCallback, useMemo, useEffect } from "react";
10
+ import { useThemeColors } from "./useTheme.js";
11
+ import { Spinner, ProgressBar } from "./styled-components.js";
12
+ // ============================================================================
13
+ // COMPONENT
14
+ // ============================================================================
15
+ export function ClaudeChat({ featureDescription, messages, isThinking, progress, onSubmitAnswer, onCancel, hasFocus, dimensions, }) {
16
+ const [inputValue, setInputValue] = useState("");
17
+ const [elapsedMs, setElapsedMs] = useState(0);
18
+ const colors = useThemeColors();
19
+ // Animate spinner
20
+ useEffect(() => {
21
+ if (!isThinking)
22
+ return;
23
+ const interval = setInterval(() => {
24
+ setElapsedMs((prev) => prev + 100);
25
+ }, 100);
26
+ return () => clearInterval(interval);
27
+ }, [isThinking]);
28
+ // Check if we're waiting for user input
29
+ const isWaitingForInput = useMemo(() => {
30
+ const lastMessage = messages[messages.length - 1];
31
+ return lastMessage?.role === "assistant" && lastMessage?.isWaitingForInput;
32
+ }, [messages]);
33
+ const handleSubmit = useCallback(() => {
34
+ if (inputValue.trim() && isWaitingForInput) {
35
+ onSubmitAnswer(inputValue.trim());
36
+ setInputValue("");
37
+ }
38
+ }, [inputValue, isWaitingForInput, onSubmitAnswer]);
39
+ // Handle keyboard input
40
+ useInput((input, key) => {
41
+ if (!hasFocus)
42
+ return;
43
+ // Escape to cancel
44
+ if (key.escape) {
45
+ onCancel();
46
+ return;
47
+ }
48
+ // Only handle input when waiting for user response
49
+ if (!isWaitingForInput)
50
+ return;
51
+ // Enter to submit
52
+ if (key.return) {
53
+ handleSubmit();
54
+ return;
55
+ }
56
+ // Backspace/Delete to remove characters
57
+ if (key.backspace || key.delete) {
58
+ setInputValue((prev) => prev.slice(0, -1));
59
+ return;
60
+ }
61
+ // Printable characters (ignore control keys)
62
+ if (input && !key.ctrl && !key.meta) {
63
+ setInputValue((prev) => prev + input);
64
+ }
65
+ }, { isActive: hasFocus });
66
+ // Calculate content width
67
+ const contentWidth = useMemo(() => {
68
+ return Math.min(70, dimensions.width - 4);
69
+ }, [dimensions.width]);
70
+ // Calculate available height for messages
71
+ const messagesHeight = useMemo(() => {
72
+ // Header (3) + Progress (2) + Input (4) + Footer (2) + margins
73
+ return Math.max(dimensions.height - 14, 5);
74
+ }, [dimensions.height]);
75
+ const cursorChar = "\u258c";
76
+ return (_jsxs(Box, { flexDirection: "column", width: "100%", height: "100%", paddingX: 1, children: [_jsxs(Box, { borderStyle: "single", borderColor: colors.primary, paddingX: 2, marginBottom: 1, children: [_jsx(Text, { bold: true, color: colors.primary, children: "BRAINROT" }), _jsx(Text, { children: " | Planning: " }), _jsx(Text, { color: colors.text, children: featureDescription.length > 40
77
+ ? featureDescription.slice(0, 40) + "..."
78
+ : featureDescription })] }), _jsx(Box, { flexDirection: "column", borderStyle: "round", borderColor: colors.border, paddingX: 2, paddingY: 1, height: messagesHeight, width: contentWidth, overflow: "hidden", children: isThinking && messages.length === 0 ? (_jsx(Box, { flexDirection: "column", alignItems: "center", justifyContent: "center", height: "100%", children: _jsx(Spinner, { elapsedMs: elapsedMs, label: "Claude is analyzing your request..." }) })) : (_jsxs(Box, { flexDirection: "column", children: [messages.map((msg, idx) => (_jsx(Box, { flexDirection: "column", marginBottom: 1, children: msg.role === "assistant" ? (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: colors.info, children: "Claude:" }), _jsx(Box, { paddingLeft: 2, children: _jsx(Text, { color: colors.text, children: msg.content }) })] })) : (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: colors.success, children: "You:" }), _jsx(Box, { paddingLeft: 2, children: _jsx(Text, { dimColor: true, children: msg.content }) })] })) }, idx))), isThinking && messages.length > 0 && (_jsx(Box, { marginTop: 1, children: _jsx(Spinner, { elapsedMs: elapsedMs, label: "Thinking..." }) }))] })) }), isWaitingForInput && (_jsx(Box, { flexDirection: "column", marginTop: 1, width: contentWidth, children: _jsx(Box, { borderStyle: "single", borderColor: hasFocus ? colors.borderFocus : colors.border, paddingX: 1, children: _jsxs(Text, { color: colors.text, children: [inputValue, _jsx(Text, { color: colors.primary, children: cursorChar })] }) }) })), _jsxs(Box, { marginTop: 1, width: contentWidth, children: [_jsx(ProgressBar, { percentage: progress, width: contentWidth - 10, showLabel: true }), _jsx(Text, { dimColor: true, children: " Planning..." })] }), _jsx(Box, { position: "absolute", marginTop: dimensions.height - 2, borderStyle: "single", borderColor: colors.border, paddingX: 2, width: dimensions.width - 4, children: _jsxs(Text, { dimColor: true, children: [isWaitingForInput ? (_jsxs(_Fragment, { children: [_jsx(Text, { color: colors.primary, children: "Enter" }), ": Submit answer |", " "] })) : null, _jsx(Text, { color: colors.primary, children: "Ctrl+C" }), ": Cancel |", " ", _jsx(Text, { color: colors.primary, children: "?" }), ": Help"] }) })] }));
79
+ }
80
+ export default ClaudeChat;
81
+ //# sourceMappingURL=ClaudeChat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClaudeChat.js","sourceRoot":"","sources":["../src/ClaudeChat.tsx"],"names":[],"mappings":";AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAkC9D,+EAA+E;AAC/E,YAAY;AACZ,+EAA+E;AAE/E,MAAM,UAAU,UAAU,CAAC,EACzB,kBAAkB,EAClB,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,UAAU,GACM;IAChB,MAAM,C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AAS,EAAE,CAAC,EAAE,KAAK,EAAE,YAAY,aACpC,KAAC,WAAW,IAAC,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,GAAG,EAAE,EAAE,SAAS,SAAG,EACzE,KAAC,IAAI,IAAC,QAAQ,mCAAoB,IAC9B,EAGN,KAAC,GAAG,IACF,QAAQ,EAAC,UAAU,EACnB,SAAS,EAAE,UAAU,CAAC,MAAM,GAAG,CAAC,EAChC,WAAW,EAAC,QAAQ,EACpB,WAAW,EAAE,MAAM,CAAC,MAAM,EAC1B,QAAQ,EAAE,CAAC,EACX,KAAK,EAAE,UAAU,CAAC,KAAK,GAAG,CAAC,YAE3B,MAAC,IAAI,IAAC,QAAQ,mBACX,iBAAiB,CAAC,CAAC,CAAC,CACnB,8BACE,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO,sBAAc,uBAAkB,GAAG,IAC7D,CACJ,CAAC,CAAC,CAAC,IAAI,EACR,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO,uBAAe,gBAAW,GAAG,EACxD,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO,kBAAU,cAChC,GACH,IACF,CACP,CAAC;AACJ,CAAC;AAED,eAAe,UAAU,CAAC"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Dynamic Interview Flow Component
3
+ *
4
+ * Manages a multi-question interview flow with dynamic question generation.
5
+ * Questions cover: scope, users, technical constraints, integration, success criteria, edge cases, priorities.
6
+ * Progress indicator shows 'Question X of ~Y' (approximate since questions may be added/removed).
7
+ */
8
+ import { type InterviewOption } from "./InterviewQuestion.js";
9
+ /** Question category for organizing interview flow */
10
+ export type QuestionCategory = "scope" | "users" | "technical" | "integration" | "success" | "edge_cases" | "priorities";
11
+ /** A single interview question definition */
12
+ export interface InterviewQuestionDef {
13
+ /** Unique question identifier */
14
+ id: string;
15
+ /** Question category */
16
+ category: QuestionCategory;
17
+ /** The question text */
18
+ question: string;
19
+ /** Header displayed above the question */
20
+ header: string;
21
+ /** Pre-defined answer options (A-D) */
22
+ options: InterviewOption[];
23
+ /** Whether this question can trigger follow-up questions */
24
+ canTriggerFollowUp?: boolean;
25
+ /** Condition for showing this question (based on previous answers) */
26
+ showIf?: (answers: InterviewAnswers) => boolean;
27
+ }
28
+ /** User's answer to a question */
29
+ export interface InterviewAnswer {
30
+ questionId: string;
31
+ answer: string;
32
+ timestamp: string;
33
+ }
34
+ /** Map of all collected answers */
35
+ export type InterviewAnswers = Record<string, string>;
36
+ /** Complete interview result */
37
+ export interface InterviewResult {
38
+ /** All answers collected */
39
+ answers: InterviewAnswers;
40
+ /** Original feature description */
41
+ featureDescription: string;
42
+ /** Estimated complexity */
43
+ complexity: "small" | "medium" | "large";
44
+ /** Summary generated from answers */
45
+ summary: string;
46
+ }
47
+ export interface DynamicInterviewFlowProps {
48
+ /** Whether the component is visible */
49
+ isVisible: boolean;
50
+ /** The feature description entered by user */
51
+ featureDescription: string;
52
+ /** Callback when interview is complete */
53
+ onComplete: (result: InterviewResult) => void;
54
+ /** Callback when user wants to go back */
55
+ onBack?: () => void;
56
+ /** Whether the component has focus */
57
+ hasFocus: boolean;
58
+ /** Terminal dimensions for centering */
59
+ dimensions?: {
60
+ width: number;
61
+ height: number;
62
+ };
63
+ }
64
+ export declare function DynamicInterviewFlow({ isVisible, featureDescription, onComplete, onBack, hasFocus, dimensions, }: DynamicInterviewFlowProps): import("react/jsx-runtime").JSX.Element | null;
65
+ export default DynamicInterviewFlow;
66
+ //# sourceMappingURL=DynamicInterviewFlow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DynamicInterviewFlow.d.ts","sourceRoot":"","sources":["../src/DynamicInterviewFlow.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,wBAAwB,CAAC;AAMhC,sDAAsD;AACtD,MAAM,MAAM,gBAAgB,GACxB,OAAO,GACP,OAAO,GACP,W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,QAAQ,EAAE,OAAO,CAAC;IAClB,wCAAwC;IACxC,UAAU,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAChD;AAiUD,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,kBAAkB,EAClB,UAAU,EACV,MAAM,EACN,QAAQ,EACR,UAAU,GACX,EAAE,yBAAyB,kDA2I3B;AAED,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,352 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * Dynamic Interview Flow Component
4
+ *
5
+ * Manages a multi-question interview flow with dynamic question generation.
6
+ * Questions cover: scope, users, technical constraints, integration, success criteria, edge cases, priorities.
7
+ * Progress indicator shows 'Question X of ~Y' (approximate since questions may be added/removed).
8
+ */
9
+ import { Box, Text } from "ink";
10
+ import { useState, useCallback, useMemo, useEffect } from "react";
11
+ import { useThemeColors } from "./useTheme.js";
12
+ import { navIcons } from "./theme.js";
13
+ import { InterviewQuestion, } from "./InterviewQuestion.js";
14
+ // ============================================================================
15
+ // QUESTION TEMPLATES
16
+ // ============================================================================
17
+ /**
18
+ * Core interview questions covering all required topics.
19
+ * Questions are ordered by priority and may be conditionally shown.
20
+ */
21
+ const CORE_QUESTIONS = [
22
+ // Scope questions
23
+ {
24
+ id: "scope_type",
25
+ category: "scope",
26
+ question: "What type of project is this?",
27
+ header: "Project Scope",
28
+ options: [
29
+ { label: "Web application (frontend/fullstack)", value: "web" },
30
+ { label: "Backend API or service", value: "backend" },
31
+ { label: "CLI tool or script", value: "cli" },
32
+ { label: "Mobile app", value: "mobile" },
33
+ ],
34
+ },
35
+ {
36
+ id: "scope_size",
37
+ category: "scope",
38
+ question: "How would you describe the scope of this feature?",
39
+ header: "Feature Size",
40
+ options: [
41
+ { label: "Small - single file or function", value: "small" },
42
+ { label: "Medium - multiple files/components", value: "medium" },
43
+ { label: "Large - new system or major changes", value: "large" },
44
+ { label: "Unclear - need to explore first", value: "unclear" },
45
+ ],
46
+ canTriggerFollowUp: true,
47
+ },
48
+ // User questions
49
+ {
50
+ id: "users_primary",
51
+ category: "users",
52
+ question: "Who is the primary user of this feature?",
53
+ header: "Target Users",
54
+ options: [
55
+ { label: "End users (customers)", value: "end_users" },
56
+ { label: "Developers (internal/external)", value: "developers" },
57
+ { label: "Admins or operators", value: "admins" },
58
+ { label: "Automated systems/services", value: "automated" },
59
+ ],
60
+ },
61
+ // Technical constraints
62
+ {
63
+ id: "tech_constraints",
64
+ category: "technical",
65
+ question: "Are there specific technical constraints to consider?",
66
+ header: "Technical Constraints",
67
+ options: [
68
+ {
69
+ label: "Must use existing codebase patterns",
70
+ value: "existing_patterns",
71
+ },
72
+ { label: "Performance is critical", value: "performance" },
73
+ { label: "Security/authentication required", value: "security" },
74
+ { label: "No specific constraints", value: "none" },
75
+ ],
76
+ },
77
+ {
78
+ id: "tech_testing",
79
+ category: "technical",
80
+ question: "What testing approach should be used?",
81
+ header: "Testing Strategy",
82
+ options: [
83
+ { label: "Unit tests for core logic", value: "unit" },
84
+ { label: "Integration/E2E tests", value: "integration" },
85
+ { label: "Both unit and integration", value: "both" },
86
+ { label: "Manual testing only", value: "manual" },
87
+ ],
88
+ showIf: (answers) => answers.scope_size !== "small",
89
+ },
90
+ // Integration
91
+ {
92
+ id: "integration_external",
93
+ category: "integration",
94
+ question: "Does this feature need to integrate with external services?",
95
+ header: "External Integration",
96
+ options: [
97
+ { label: "Yes - APIs/third-party services", value: "external_api" },
98
+ { label: "Yes - database/storage", value: "database" },
99
+ { label: "Yes - authentication provider", value: "auth" },
100
+ { label: "No external integrations needed", value: "none" },
101
+ ],
102
+ showIf: (answers) => answers.scope_type !== "cli",
103
+ },
104
+ // Success criteria
105
+ {
106
+ id: "success_criteria",
107
+ category: "success",
108
+ question: "How will you know when this feature is complete?",
109
+ header: "Success Criteria",
110
+ options: [
111
+ { label: "All tests pass", value: "tests" },
112
+ { label: "Feature works as specified", value: "functional" },
113
+ { label: "Code reviewed and merged", value: "merged" },
114
+ { label: "Deployed to production", value: "deployed" },
115
+ ],
116
+ },
117
+ // Edge cases
118
+ {
119
+ id: "edge_cases",
120
+ category: "edge_cases",
121
+ question: "What edge cases should be handled?",
122
+ header: "Edge Cases",
123
+ options: [
124
+ { label: "Error handling and recovery", value: "errors" },
125
+ { label: "Empty/null input handling", value: "empty_input" },
126
+ { label: "Performance under load", value: "load" },
127
+ { label: "All of the above", value: "all" },
128
+ ],
129
+ showIf: (answers) => answers.scope_size !== "small",
130
+ },
131
+ // Priorities
132
+ {
133
+ id: "priority_focus",
134
+ category: "priorities",
135
+ question: "What should Claude prioritize?",
136
+ header: "Priority Focus",
137
+ options: [
138
+ { label: "Code quality and maintainability", value: "quality" },
139
+ { label: "Speed of implementation", value: "speed" },
140
+ { label: "Comprehensive documentation", value: "docs" },
141
+ { label: "Balance all aspects equally", value: "balanced" },
142
+ ],
143
+ },
144
+ ];
145
+ /**
146
+ * Follow-up questions that may be added based on answers
147
+ */
148
+ const FOLLOWUP_QUESTIONS = [
149
+ {
150
+ id: "scope_clarify",
151
+ category: "scope",
152
+ question: "Can you be more specific about the scope?",
153
+ header: "Scope Clarification",
154
+ options: [
155
+ { label: "It's a new feature from scratch", value: "new" },
156
+ { label: "Extending existing functionality", value: "extend" },
157
+ { label: "Refactoring/improving existing code", value: "refactor" },
158
+ { label: "Fixing a bug or issue", value: "bugfix" },
159
+ ],
160
+ showIf: (answers) => answers.scope_size === "unclear",
161
+ },
162
+ {
163
+ id: "security_details",
164
+ category: "technical",
165
+ question: "What security considerations are important?",
166
+ header: "Security Details",
167
+ options: [
168
+ { label: "User authentication/authorization", value: "auth" },
169
+ { label: "Data encryption/privacy", value: "encryption" },
170
+ { label: "Input validation/sanitization", value: "validation" },
171
+ { label: "All security best practices", value: "all" },
172
+ ],
173
+ showIf: (answers) => answers.tech_constraints === "security",
174
+ },
175
+ {
176
+ id: "performance_targets",
177
+ category: "technical",
178
+ question: "What performance targets should be met?",
179
+ header: "Performance Goals",
180
+ options: [
181
+ { label: "Sub-second response times", value: "fast" },
182
+ { label: "Handle high concurrent load", value: "scalable" },
183
+ { label: "Minimize memory usage", value: "memory" },
184
+ { label: "General optimization", value: "general" },
185
+ ],
186
+ showIf: (answers) => answers.tech_constraints === "performance",
187
+ },
188
+ ];
189
+ // ============================================================================
190
+ // HELPER FUNCTIONS
191
+ // ============================================================================
192
+ /**
193
+ * Calculate interview complexity based on feature description
194
+ */
195
+ function estimateComplexity(featureDescription) {
196
+ const words = featureDescription.split(/\s+/).length;
197
+ const hasComplexKeywords = /system|integration|auth|api|database|migration/i.test(featureDescription);
198
+ if (words > 50 || hasComplexKeywords) {
199
+ return "large";
200
+ }
201
+ else if (words > 20) {
202
+ return "medium";
203
+ }
204
+ return "small";
205
+ }
206
+ /**
207
+ * Determine which questions to show based on answers and complexity
208
+ */
209
+ function getActiveQuestions(answers, complexity) {
210
+ // Start with core questions
211
+ let questions = [...CORE_QUESTIONS];
212
+ // Add follow-up questions based on answers
213
+ for (const followUp of FOLLOWUP_QUESTIONS) {
214
+ if (followUp.showIf && followUp.showIf(answers)) {
215
+ // Insert follow-up after related question
216
+ const relatedIdx = questions.findIndex((q) => q.category === followUp.category);
217
+ if (relatedIdx >= 0) {
218
+ questions.splice(relatedIdx + 1, 0, followUp);
219
+ }
220
+ else {
221
+ questions.push(followUp);
222
+ }
223
+ }
224
+ }
225
+ // Filter out questions that shouldn't be shown
226
+ questions = questions.filter((q) => {
227
+ if (q.showIf) {
228
+ return q.showIf(answers);
229
+ }
230
+ return true;
231
+ });
232
+ // For small complexity, reduce questions
233
+ if (complexity === "small") {
234
+ // Keep only essential questions for small features
235
+ const essentialIds = [
236
+ "scope_type",
237
+ "scope_size",
238
+ "users_primary",
239
+ "success_criteria",
240
+ "priority_focus",
241
+ ];
242
+ questions = questions.filter((q) => essentialIds.includes(q.id) || q.showIf?.(answers));
243
+ }
244
+ return questions;
245
+ }
246
+ /**
247
+ * Generate a summary from interview answers
248
+ */
249
+ function generateSummary(answers) {
250
+ const parts = [];
251
+ if (answers.scope_type) {
252
+ parts.push(`Project type: ${answers.scope_type}`);
253
+ }
254
+ if (answers.scope_size) {
255
+ parts.push(`Scope: ${answers.scope_size}`);
256
+ }
257
+ if (answers.users_primary) {
258
+ parts.push(`Target users: ${answers.users_primary}`);
259
+ }
260
+ if (answers.priority_focus) {
261
+ parts.push(`Priority: ${answers.priority_focus}`);
262
+ }
263
+ return parts.join(" | ");
264
+ }
265
+ function ProgressIndicator({ current, estimated, colors, }) {
266
+ // Show approximate with ~ since questions may change
267
+ const progressText = `Question ${current} of ~${estimated}`;
268
+ const percentage = Math.round((current / estimated) * 100);
269
+ // Visual progress bar
270
+ const barWidth = 20;
271
+ const filled = Math.round((current / estimated) * barWidth);
272
+ const empty = barWidth - filled;
273
+ const bar = `${"█".repeat(filled)}${"░".repeat(empty)}`;
274
+ return (_jsxs(Box, { flexDirection: "column", alignItems: "center", marginBottom: 1, children: [_jsx(Text, { color: colors.secondary, children: progressText }), _jsxs(Box, { marginTop: 1, children: [_jsx(Text, { color: colors.primary, children: bar }), _jsxs(Text, { color: colors.textMuted, children: [" ", percentage, "%"] })] })] }));
275
+ }
276
+ // ============================================================================
277
+ // MAIN COMPONENT
278
+ // ============================================================================
279
+ export function DynamicInterviewFlow({ isVisible, featureDescription, onComplete, onBack, hasFocus, dimensions, }) {
280
+ const colors = useThemeColors();
281
+ // Track current question index and answers
282
+ const [currentIndex, setCurrentIndex] = useState(0);
283
+ const [answers, setAnswers] = useState({});
284
+ // Calculate complexity from feature description
285
+ const complexity = useMemo(() => estimateComplexity(featureDescription), [featureDescription]);
286
+ // Get active questions based on current answers and complexity
287
+ const activeQuestions = useMemo(() => getActiveQuestions(answers, complexity), [answers, complexity]);
288
+ // Current question
289
+ const currentQuestion = activeQuestions[currentIndex];
290
+ // Estimated total (may change as answers are given)
291
+ const estimatedTotal = activeQuestions.length;
292
+ // Handle answer submission
293
+ const handleAnswer = useCallback((answer) => {
294
+ if (!currentQuestion)
295
+ return;
296
+ // Store answer
297
+ const newAnswers = {
298
+ ...answers,
299
+ [currentQuestion.id]: answer,
300
+ };
301
+ setAnswers(newAnswers);
302
+ // Check if this is the last question
303
+ const updatedQuestions = getActiveQuestions(newAnswers, complexity);
304
+ const nextIndex = currentIndex + 1;
305
+ if (nextIndex >= updatedQuestions.length) {
306
+ // Interview complete
307
+ const result = {
308
+ answers: newAnswers,
309
+ featureDescription,
310
+ complexity: newAnswers.scope_size ||
311
+ complexity,
312
+ summary: generateSummary(newAnswers),
313
+ };
314
+ onComplete(result);
315
+ }
316
+ else {
317
+ // Move to next question
318
+ setCurrentIndex(nextIndex);
319
+ }
320
+ }, [
321
+ currentQuestion,
322
+ answers,
323
+ currentIndex,
324
+ complexity,
325
+ featureDescription,
326
+ onComplete,
327
+ ]);
328
+ // Handle going back to previous question
329
+ const handleBack = useCallback(() => {
330
+ if (currentIndex > 0) {
331
+ setCurrentIndex(currentIndex - 1);
332
+ }
333
+ else if (onBack) {
334
+ onBack();
335
+ }
336
+ }, [currentIndex, onBack]);
337
+ // Reset when interview starts
338
+ useEffect(() => {
339
+ if (isVisible) {
340
+ setCurrentIndex(0);
341
+ setAnswers({});
342
+ }
343
+ }, [isVisible, featureDescription]);
344
+ if (!isVisible || !currentQuestion) {
345
+ return null;
346
+ }
347
+ return (_jsxs(Box, { flexDirection: "column", alignItems: "center", justifyContent: "center", width: "100%", height: "100%", children: [_jsx(ProgressIndicator, { current: currentIndex + 1, estimated: estimatedTotal, colors: colors }), _jsx(Box, { marginBottom: 1, children: _jsxs(Text, { dimColor: true, children: [navIcons.bullet, " ", currentQuestion.category.toUpperCase().replace("_", " "), " ", navIcons.bullet] }) }), _jsx(InterviewQuestion, { isVisible: true, question: currentQuestion.question, header: currentQuestion.header, options: currentQuestion.options, onAnswer: handleAnswer, onBack: handleBack, hasFocus: hasFocus, dimensions: dimensions }), _jsx(Box, { marginTop: 2, paddingX: 2, width: Math.min(70, (dimensions?.width ?? 80) - 4), children: _jsxs(Text, { dimColor: true, italic: true, children: ["Building:", " ", featureDescription.length > 50
348
+ ? featureDescription.slice(0, 50) + "..."
349
+ : featureDescription] }) })] }));
350
+ }
351
+ export default DynamicInterviewFlow;
352
+ //# sourceMappingURL=DynamicInterviewFlow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DynamicInterviewFlow.js","sourceRoot":"","sources":["../src/DynamicInterviewFlow.tsx"],"names":[],"mappings":";AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EACL,iBAAiB,GAElB,MAAM,wBAAwB,CAAC;AAuEhC,+EAA+E;AAC/E,qBAAqB;AACrB,+EAA+E;AAE/E;;;GAGG;AACH,MAAM,cAAc,GAA2B;IAC7C,kBAAkB;IAClB;QACE,EAAE,EAAE,YAAY;QAChB,QAAQ,EAAE,OAAO;QACjB,QAAQ,EAAE,+BAA+B;QACzC,MAAM,EAAE,eAAe;QACvB,OAAO,EAAE;YACP,EAAE,KAAK,EAAE,sCAAsC,EAAE,KAAK,EAAE,KAAK,EAAE;YAC/D,EAAE,KAAK,EAAE,wBAAwB,EAAE,KAAK,EAAE,SAAS,EAAE;YACrD,EAAE,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,KAAK,EAAE;YAC7C,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE;SACzC;KACF;IACD;QACE,EAAE,EAAE,YAAY;QAChB,QAAQ,EAAE,OAAO;QACjB,QAAQ,EAAE,mDAAmD;QAC7D,MAAM,EAAE,cAAc;QACtB,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e,CAAC,MAAM,EAC9B,OAAO,EAAE,eAAe,CAAC,OAAO,EAChC,QAAQ,EAAE,YAAY,EACtB,MAAM,EAAE,UAAU,EAClB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,GACtB,EAGF,KAAC,GAAG,IACF,SAAS,EAAE,CAAC,EACZ,QAAQ,EAAE,CAAC,EACX,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,YAElD,MAAC,IAAI,IAAC,QAAQ,QAAC,MAAM,gCACT,GAAG,EACZ,kBAAkB,CAAC,MAAM,GAAG,EAAE;4BAC7B,CAAC,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK;4BACzC,CAAC,CAAC,kBAAkB,IACjB,GACH,IACF,CACP,CAAC;AACJ,CAAC;AAED,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Feature Input Screen
3
+ *
4
+ * Clean, minimal first screen that asks the user for a feature description.
5
+ * This is the entry point for the new simplified UI flow.
6
+ */
7
+ export interface FeatureInputProps {
8
+ /** Callback when feature is submitted */
9
+ onSubmit: (feature: string) => void;
10
+ /** Whether the component has focus */
11
+ hasFocus: boolean;
12
+ /** Terminal dimensions */
13
+ dimensions: {
14
+ width: number;
15
+ height: number;
16
+ };
17
+ }
18
+ export declare function FeatureInput({ onSubmit, hasFocus, dimensions, }: FeatureInputProps): import("react/jsx-runtime").JSX.Element;
19
+ export default FeatureInput;
20
+ //# sourceMappingURL=FeatureInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FeatureInput.d.ts","sourceRoot":"","sources":["../src/FeatureInput.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH,MAAM,WAAW,iBAAiB;IAChC,yCAAyC;IACzC,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,sCAAsC;IACtC,QAAQ,EAAE,OAAO,CAAC;IAClB,0BAA0B;IAC1B,UAAU,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/C;AAkBD,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,QAAQ,EACR,UAAU,GACX,EAAE,iBAAiB,2CA2InB;AAED,eAAe,YAAY,CAAC"}