@prestyj/cli 5.16.2 → 5.19.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 (828) hide show
  1. package/README.md +2 -1
  2. package/assets/skills/refactoring/SKILL.md +64 -0
  3. package/assets/skills/refactoring/references/agent-pitfalls.md +43 -0
  4. package/assets/skills/refactoring/references/legacy.md +49 -0
  5. package/assets/skills/refactoring/references/smells.md +71 -0
  6. package/dist/app-sidecar-sessions.d.ts +0 -1
  7. package/dist/app-sidecar.d.ts +0 -1
  8. package/dist/app-sidecar.js +40 -9
  9. package/dist/app-sidecar.js.map +1 -1
  10. package/dist/chat-agents/general.d.ts +0 -1
  11. package/dist/chat-agents/index.d.ts +0 -1
  12. package/dist/chat-agents/jiwa.d.ts +0 -1
  13. package/dist/chat-agents/memory.d.ts +0 -1
  14. package/dist/chat-agents/research.d.ts +0 -1
  15. package/dist/chat-agents/shared.d.ts +0 -1
  16. package/dist/chat-agents/therapist.d.ts +0 -1
  17. package/dist/chat-agents/types.d.ts +0 -1
  18. package/dist/cli/auth.d.ts +0 -1
  19. package/dist/cli/command-routing.d.ts +0 -1
  20. package/dist/cli/mcp.d.ts +0 -1
  21. package/dist/cli/mcp.js.map +1 -1
  22. package/dist/cli/pixel.d.ts +0 -1
  23. package/dist/cli/shared.d.ts +0 -1
  24. package/dist/cli.d.ts +0 -1
  25. package/dist/config.d.ts +0 -1
  26. package/dist/core/agent-notifications.d.ts +0 -1
  27. package/dist/core/agent-session.d.ts +45 -2
  28. package/dist/core/agent-session.js +521 -41
  29. package/dist/core/agent-session.js.map +1 -1
  30. package/dist/core/agents.d.ts +0 -1
  31. package/dist/core/api-benchmark.d.ts +0 -1
  32. package/dist/core/ask-user.d.ts +0 -1
  33. package/dist/core/auth/index.d.ts +0 -1
  34. package/dist/core/auth-providers.d.ts +0 -1
  35. package/dist/core/auth-storage.d.ts +0 -1
  36. package/dist/core/auto-update.d.ts +0 -1
  37. package/dist/core/autopilot-cycle.d.ts +7 -4
  38. package/dist/core/autopilot-cycle.js +43 -6
  39. package/dist/core/autopilot-cycle.js.map +1 -1
  40. package/dist/core/autopilot-gate.d.ts +0 -1
  41. package/dist/core/autopilot-gate.js.map +1 -1
  42. package/dist/core/autopilot-verdict.d.ts +2 -1
  43. package/dist/core/autopilot-verdict.js +25 -0
  44. package/dist/core/autopilot-verdict.js.map +1 -1
  45. package/dist/core/bash-spawn-benchmark.d.ts +0 -1
  46. package/dist/core/bundled-agents.d.ts +0 -1
  47. package/dist/core/cache-warm-benchmark.d.ts +0 -1
  48. package/dist/core/checkpoint-store.d.ts +0 -1
  49. package/dist/core/claude-code-version.d.ts +0 -1
  50. package/dist/core/code-retrieval-chunkers.d.ts +0 -1
  51. package/dist/core/code-retrieval.d.ts +0 -1
  52. package/dist/core/compaction/active-context.d.ts +0 -1
  53. package/dist/core/compaction/compactor.d.ts +34 -1
  54. package/dist/core/compaction/compactor.js +161 -2
  55. package/dist/core/compaction/compactor.js.map +1 -1
  56. package/dist/core/compaction/policy.d.ts +0 -1
  57. package/dist/core/compaction/query-aware-selector.d.ts +0 -1
  58. package/dist/core/compaction/token-estimator.d.ts +0 -1
  59. package/dist/core/compaction/tool-result-pruner.d.ts +0 -1
  60. package/dist/core/context-limits.d.ts +0 -1
  61. package/dist/core/custom-commands.d.ts +0 -1
  62. package/dist/core/encode-cwd.d.ts +0 -1
  63. package/dist/core/env-delta.d.ts +0 -1
  64. package/dist/core/event-bus.d.ts +5 -1
  65. package/dist/core/event-bus.js.map +1 -1
  66. package/dist/core/extensions/loader.d.ts +0 -1
  67. package/dist/core/extensions/plugin-bundles.d.ts +0 -1
  68. package/dist/core/extensions/types.d.ts +0 -1
  69. package/dist/core/fast-apply-benchmark.d.ts +0 -1
  70. package/dist/core/file-lock.d.ts +0 -1
  71. package/dist/core/foreign-session-import.d.ts +0 -1
  72. package/dist/core/foreign-transcript-blocks.d.ts +0 -1
  73. package/dist/core/goal-controller.d.ts +0 -1
  74. package/dist/core/goal-prerequisites.d.ts +0 -1
  75. package/dist/core/goal-store.d.ts +0 -1
  76. package/dist/core/goal-store.js.map +1 -1
  77. package/dist/core/goal-verifier.d.ts +0 -1
  78. package/dist/core/goal-verifier.js.map +1 -1
  79. package/dist/core/goal-worker.d.ts +0 -1
  80. package/dist/core/goal-worker.js.map +1 -1
  81. package/dist/core/hashline-edit-benchmark.d.ts +0 -1
  82. package/dist/core/hashline.d.ts +0 -1
  83. package/dist/core/ideal-review-subagent.d.ts +42 -0
  84. package/dist/core/ideal-review-subagent.js +95 -0
  85. package/dist/core/ideal-review-subagent.js.map +1 -0
  86. package/dist/core/ideal-review.d.ts +0 -1
  87. package/dist/core/ideal-review.js +18 -5
  88. package/dist/core/ideal-review.js.map +1 -1
  89. package/dist/core/index.d.ts +0 -1
  90. package/dist/core/internal-diagnostics.d.ts +142 -0
  91. package/dist/core/internal-diagnostics.js +450 -0
  92. package/dist/core/internal-diagnostics.js.map +1 -0
  93. package/dist/core/language-detector.d.ts +0 -1
  94. package/dist/core/local-endpoint-store.d.ts +0 -1
  95. package/dist/core/logger.d.ts +0 -1
  96. package/dist/core/loop-breaker.d.ts +0 -1
  97. package/dist/core/lsp/client.d.ts +8 -6
  98. package/dist/core/lsp/client.js +68 -18
  99. package/dist/core/lsp/client.js.map +1 -1
  100. package/dist/core/lsp/edit-telemetry.d.ts +0 -1
  101. package/dist/core/lsp/format.d.ts +0 -1
  102. package/dist/core/lsp/jsonrpc.d.ts +0 -1
  103. package/dist/core/lsp/manager.d.ts +16 -2
  104. package/dist/core/lsp/manager.js +170 -9
  105. package/dist/core/lsp/manager.js.map +1 -1
  106. package/dist/core/lsp/pool.d.ts +0 -1
  107. package/dist/core/lsp/pool.js.map +1 -1
  108. package/dist/core/lsp/servers.d.ts +0 -1
  109. package/dist/core/lsp/test-support.d.ts +0 -1
  110. package/dist/core/mcp/catalog-cache.d.ts +0 -1
  111. package/dist/core/mcp/client.d.ts +0 -1
  112. package/dist/core/mcp/content.d.ts +0 -1
  113. package/dist/core/mcp/defaults.d.ts +0 -1
  114. package/dist/core/mcp/deferred-catalog.d.ts +0 -1
  115. package/dist/core/mcp/elicitation-bridge.d.ts +0 -1
  116. package/dist/core/mcp/index.d.ts +0 -1
  117. package/dist/core/mcp/loopback.d.ts +0 -1
  118. package/dist/core/mcp/oauth-provider.d.ts +0 -1
  119. package/dist/core/mcp/oauth-store.d.ts +0 -1
  120. package/dist/core/mcp/parse-add-command.d.ts +0 -1
  121. package/dist/core/mcp/resolve-stdio.d.ts +0 -1
  122. package/dist/core/mcp/shared-pool.d.ts +0 -1
  123. package/dist/core/mcp/store.d.ts +0 -1
  124. package/dist/core/mcp/types.d.ts +0 -1
  125. package/dist/core/message-images.d.ts +0 -1
  126. package/dist/core/model-registry.d.ts +0 -1
  127. package/dist/core/network-guard.d.ts +0 -1
  128. package/dist/core/nolan-context.d.ts +5 -1
  129. package/dist/core/nolan-context.js +9 -2
  130. package/dist/core/nolan-context.js.map +1 -1
  131. package/dist/core/nolan-model.d.ts +0 -1
  132. package/dist/core/nolan-prompt.d.ts +0 -1
  133. package/dist/core/nolan-prompt.js +32 -14
  134. package/dist/core/nolan-prompt.js.map +1 -1
  135. package/dist/core/oauth/anthropic.d.ts +0 -1
  136. package/dist/core/oauth/gemini.d.ts +0 -1
  137. package/dist/core/oauth/kimi.d.ts +0 -1
  138. package/dist/core/oauth/openai.d.ts +0 -1
  139. package/dist/core/oauth/pkce.d.ts +0 -1
  140. package/dist/core/oauth/types.d.ts +0 -1
  141. package/dist/core/oauth/xai.d.ts +0 -1
  142. package/dist/core/parked-requests.d.ts +0 -1
  143. package/dist/core/persistent-shell.d.ts +0 -1
  144. package/dist/core/persistent-shell.js +3 -1
  145. package/dist/core/persistent-shell.js.map +1 -1
  146. package/dist/core/pixel-fix-agent.d.ts +0 -1
  147. package/dist/core/pixel-fix.d.ts +0 -1
  148. package/dist/core/pixel.d.ts +0 -1
  149. package/dist/core/platform-clis.d.ts +0 -1
  150. package/dist/core/process-gate.d.ts +0 -1
  151. package/dist/core/process-manager.d.ts +7 -4
  152. package/dist/core/process-manager.js +23 -7
  153. package/dist/core/process-manager.js.map +1 -1
  154. package/dist/core/progress/engine.d.ts +0 -1
  155. package/dist/core/progress/git-xp.d.ts +0 -1
  156. package/dist/core/progress/ranks.d.ts +0 -1
  157. package/dist/core/progress/rebuild.d.ts +0 -1
  158. package/dist/core/progress/store.d.ts +0 -1
  159. package/dist/core/progress/types.d.ts +0 -1
  160. package/dist/core/project-discovery.d.ts +0 -1
  161. package/dist/core/prompt-commands.d.ts +0 -1
  162. package/dist/core/radio.d.ts +0 -1
  163. package/dist/core/regrounding.d.ts +0 -1
  164. package/dist/core/resolve-start.d.ts +0 -1
  165. package/dist/core/run-claim.d.ts +0 -1
  166. package/dist/core/run-lifecycle.d.ts +0 -1
  167. package/dist/core/runtime-mode.d.ts +0 -1
  168. package/dist/core/sandbox-domains.d.ts +0 -1
  169. package/dist/core/sandbox-feedback.d.ts +0 -1
  170. package/dist/core/sandbox.d.ts +0 -1
  171. package/dist/core/semantic-loop-check.d.ts +58 -0
  172. package/dist/core/semantic-loop-check.js +103 -0
  173. package/dist/core/semantic-loop-check.js.map +1 -0
  174. package/dist/core/semantic-search-benchmark.d.ts +0 -1
  175. package/dist/core/session-compaction.d.ts +0 -1
  176. package/dist/core/session-export.d.ts +0 -1
  177. package/dist/core/session-history.d.ts +0 -1
  178. package/dist/core/session-manager.d.ts +1 -2
  179. package/dist/core/session-preview.d.ts +0 -1
  180. package/dist/core/session-storage.d.ts +0 -1
  181. package/dist/core/settings-manager.d.ts +0 -1
  182. package/dist/core/setup-history.d.ts +0 -1
  183. package/dist/core/shell-path.d.ts +0 -1
  184. package/dist/core/shell.d.ts +0 -1
  185. package/dist/core/shell.js +6 -3
  186. package/dist/core/shell.js.map +1 -1
  187. package/dist/core/shutdown.d.ts +0 -1
  188. package/dist/core/skills.d.ts +0 -1
  189. package/dist/core/slash-commands.d.ts +3 -2
  190. package/dist/core/slash-commands.js +6 -4
  191. package/dist/core/slash-commands.js.map +1 -1
  192. package/dist/core/source-maps.d.ts +0 -1
  193. package/dist/core/speed-benchmark.d.ts +0 -1
  194. package/dist/core/steering.d.ts +0 -1
  195. package/dist/core/steroids.d.ts +0 -1
  196. package/dist/core/style-packs/index.d.ts +0 -1
  197. package/dist/core/style-packs/packs.d.ts +0 -1
  198. package/dist/core/subagent-manager.d.ts +7 -2
  199. package/dist/core/subagent-manager.js +15 -5
  200. package/dist/core/subagent-manager.js.map +1 -1
  201. package/dist/core/subagent-policy.d.ts +0 -1
  202. package/dist/core/subagent-store.d.ts +0 -1
  203. package/dist/core/subagent-turn-record.d.ts +0 -1
  204. package/dist/core/task-store.d.ts +0 -1
  205. package/dist/core/telegram-config.d.ts +0 -1
  206. package/dist/core/telegram.d.ts +0 -1
  207. package/dist/core/thinking-level.d.ts +0 -1
  208. package/dist/core/verification-evidence.d.ts +11 -2
  209. package/dist/core/verification-evidence.js +96 -22
  210. package/dist/core/verification-evidence.js.map +1 -1
  211. package/dist/core/verification-gate.d.ts +75 -36
  212. package/dist/core/verification-gate.js +301 -37
  213. package/dist/core/verification-gate.js.map +1 -1
  214. package/dist/core/verification-snapshot.d.ts +7 -0
  215. package/dist/core/verification-snapshot.js +111 -0
  216. package/dist/core/verification-snapshot.js.map +1 -0
  217. package/dist/core/verify-commands.d.ts +0 -1
  218. package/dist/core/voice-transcriber.d.ts +0 -1
  219. package/dist/core/workspace-guard.d.ts +0 -1
  220. package/dist/hf-pull.d.ts +0 -1
  221. package/dist/index.d.ts +0 -1
  222. package/dist/interactive.d.ts +0 -1
  223. package/dist/modes/acp-mode.d.ts +0 -1
  224. package/dist/modes/agent-home-mode.d.ts +0 -1
  225. package/dist/modes/index.d.ts +0 -1
  226. package/dist/modes/json-mode.d.ts +0 -1
  227. package/dist/modes/print-mode.d.ts +0 -1
  228. package/dist/modes/rpc-mode.d.ts +0 -1
  229. package/dist/modes/serve-mode.d.ts +0 -1
  230. package/dist/modes/subagent-worker-mode.d.ts +0 -1
  231. package/dist/session.d.ts +0 -1
  232. package/dist/system-prompt.d.ts +0 -1
  233. package/dist/system-prompt.js +53 -124
  234. package/dist/system-prompt.js.map +1 -1
  235. package/dist/test-support/fake-home.d.ts +0 -1
  236. package/dist/tools/ask-user.d.ts +0 -1
  237. package/dist/tools/bash.d.ts +0 -1
  238. package/dist/tools/bash.js +9 -4
  239. package/dist/tools/bash.js.map +1 -1
  240. package/dist/tools/code-nav.d.ts +0 -1
  241. package/dist/tools/code-skeleton.d.ts +0 -1
  242. package/dist/tools/compress.d.ts +0 -1
  243. package/dist/tools/edit-diff.d.ts +19 -2
  244. package/dist/tools/edit-diff.js +16 -3
  245. package/dist/tools/edit-diff.js.map +1 -1
  246. package/dist/tools/edit.d.ts +1 -2
  247. package/dist/tools/edit.js +36 -12
  248. package/dist/tools/edit.js.map +1 -1
  249. package/dist/tools/enter-plan.d.ts +0 -1
  250. package/dist/tools/exit-plan.d.ts +0 -1
  251. package/dist/tools/find.d.ts +0 -1
  252. package/dist/tools/generate-image.d.ts +5 -1
  253. package/dist/tools/generate-image.js +25 -7
  254. package/dist/tools/generate-image.js.map +1 -1
  255. package/dist/tools/goals.d.ts +0 -1
  256. package/dist/tools/grep.d.ts +0 -1
  257. package/dist/tools/html-extract.d.ts +0 -1
  258. package/dist/tools/index.d.ts +3 -2
  259. package/dist/tools/index.js +3 -1
  260. package/dist/tools/index.js.map +1 -1
  261. package/dist/tools/ls.d.ts +0 -1
  262. package/dist/tools/operations.d.ts +0 -1
  263. package/dist/tools/overflow.d.ts +0 -1
  264. package/dist/tools/path-utils.d.ts +0 -1
  265. package/dist/tools/pdf-extract.d.ts +0 -1
  266. package/dist/tools/prompt-hints.d.ts +0 -1
  267. package/dist/tools/prompt-hints.js +1 -1
  268. package/dist/tools/prompt-hints.js.map +1 -1
  269. package/dist/tools/read-only-bash.d.ts +0 -1
  270. package/dist/tools/read-tracker.d.ts +0 -1
  271. package/dist/tools/read.d.ts +0 -1
  272. package/dist/tools/safe-env.d.ts +0 -1
  273. package/dist/tools/screenshot.d.ts +0 -1
  274. package/dist/tools/search-code.d.ts +0 -1
  275. package/dist/tools/session-stats.d.ts +26 -0
  276. package/dist/tools/session-stats.js +51 -0
  277. package/dist/tools/session-stats.js.map +1 -0
  278. package/dist/tools/skill.d.ts +0 -1
  279. package/dist/tools/skill.js +3 -5
  280. package/dist/tools/skill.js.map +1 -1
  281. package/dist/tools/source-path.d.ts +0 -1
  282. package/dist/tools/steroids.d.ts +0 -1
  283. package/dist/tools/steroids.js +1 -1
  284. package/dist/tools/subagent-control.d.ts +0 -1
  285. package/dist/tools/subagent-shared.d.ts +0 -1
  286. package/dist/tools/subagent.d.ts +0 -1
  287. package/dist/tools/task-output.d.ts +0 -1
  288. package/dist/tools/task-output.js +13 -6
  289. package/dist/tools/task-output.js.map +1 -1
  290. package/dist/tools/task-send.d.ts +0 -1
  291. package/dist/tools/task-stop.d.ts +0 -1
  292. package/dist/tools/tasks.d.ts +0 -1
  293. package/dist/tools/tool-search.d.ts +0 -1
  294. package/dist/tools/tool-tiers.d.ts +0 -1
  295. package/dist/tools/truncate.d.ts +0 -1
  296. package/dist/tools/web-fetch.d.ts +0 -1
  297. package/dist/tools/web-search.d.ts +0 -1
  298. package/dist/tools/write.d.ts +0 -1
  299. package/dist/types.d.ts +0 -1
  300. package/dist/ui/App.d.ts +0 -1
  301. package/dist/ui/App.js +6 -1
  302. package/dist/ui/App.js.map +1 -1
  303. package/dist/ui/activity-phrases.d.ts +0 -1
  304. package/dist/ui/app-items.d.ts +0 -1
  305. package/dist/ui/components/ActivityIndicator.d.ts +0 -1
  306. package/dist/ui/components/AnimationContext.d.ts +0 -1
  307. package/dist/ui/components/AssistantMessage.d.ts +0 -1
  308. package/dist/ui/components/BackgroundTasksBar.d.ts +0 -1
  309. package/dist/ui/components/Banner.d.ts +0 -1
  310. package/dist/ui/components/ChatFooterPane.d.ts +0 -1
  311. package/dist/ui/components/ChatInputStack.d.ts +0 -1
  312. package/dist/ui/components/ChatLayout.d.ts +0 -1
  313. package/dist/ui/components/ChatLivePane.d.ts +0 -1
  314. package/dist/ui/components/ChatScreen.d.ts +0 -1
  315. package/dist/ui/components/ChatStatusRow.d.ts +0 -1
  316. package/dist/ui/components/CompactionNotice.d.ts +0 -1
  317. package/dist/ui/components/DiffFrame.d.ts +0 -1
  318. package/dist/ui/components/DiffView.d.ts +0 -1
  319. package/dist/ui/components/Footer.d.ts +0 -1
  320. package/dist/ui/components/FooterStatusRow.d.ts +0 -1
  321. package/dist/ui/components/FullScreenOverlayRouter.d.ts +0 -1
  322. package/dist/ui/components/GoalOverlay.d.ts +0 -1
  323. package/dist/ui/components/GoalStatusBar.d.ts +0 -1
  324. package/dist/ui/components/IdealHookMessage.d.ts +0 -1
  325. package/dist/ui/components/InputArea.d.ts +0 -1
  326. package/dist/ui/components/LiveToolPanel.d.ts +0 -1
  327. package/dist/ui/components/Markdown.d.ts +0 -1
  328. package/dist/ui/components/MessageResponse.d.ts +0 -1
  329. package/dist/ui/components/ModelSelector.d.ts +0 -1
  330. package/dist/ui/components/NoSelect.d.ts +0 -1
  331. package/dist/ui/components/Overlay.d.ts +0 -1
  332. package/dist/ui/components/PixelOverlay.d.ts +0 -1
  333. package/dist/ui/components/PlanApproval.d.ts +0 -1
  334. package/dist/ui/components/PlanBanner.d.ts +0 -1
  335. package/dist/ui/components/PlanModeLogo.d.ts +0 -1
  336. package/dist/ui/components/PlanOverlay.d.ts +0 -1
  337. package/dist/ui/components/PlanProgress.d.ts +0 -1
  338. package/dist/ui/components/QueueIndicator.d.ts +0 -1
  339. package/dist/ui/components/Ratchet.d.ts +0 -1
  340. package/dist/ui/components/RewindOverlay.d.ts +0 -1
  341. package/dist/ui/components/SelectList.d.ts +0 -1
  342. package/dist/ui/components/ServerToolExecution.d.ts +0 -1
  343. package/dist/ui/components/SessionSelector.d.ts +0 -1
  344. package/dist/ui/components/SessionSummary.d.ts +0 -1
  345. package/dist/ui/components/SettingsSelector.d.ts +0 -1
  346. package/dist/ui/components/SkillsOverlay.d.ts +0 -1
  347. package/dist/ui/components/SlashCommandMenu.d.ts +0 -1
  348. package/dist/ui/components/SlashStyledSelectList.d.ts +0 -1
  349. package/dist/ui/components/Spinner.d.ts +0 -1
  350. package/dist/ui/components/StreamingArea.d.ts +0 -1
  351. package/dist/ui/components/SubAgentPanel.d.ts +0 -1
  352. package/dist/ui/components/TaskOverlay.d.ts +0 -1
  353. package/dist/ui/components/TaskPickerMenu.d.ts +0 -1
  354. package/dist/ui/components/ThemeSelector.d.ts +0 -1
  355. package/dist/ui/components/ThinkingBlock.d.ts +0 -1
  356. package/dist/ui/components/ToolExecution.d.ts +0 -1
  357. package/dist/ui/components/ToolGroupExecution.d.ts +0 -1
  358. package/dist/ui/components/ToolUseLoader.d.ts +0 -1
  359. package/dist/ui/components/TranscriptViewport.d.ts +0 -1
  360. package/dist/ui/components/UserMessage.d.ts +0 -1
  361. package/dist/ui/components/force-color.d.ts +0 -1
  362. package/dist/ui/components/index.d.ts +0 -1
  363. package/dist/ui/constants/figures.d.ts +0 -1
  364. package/dist/ui/duration-format.d.ts +0 -1
  365. package/dist/ui/duration-summary.d.ts +0 -1
  366. package/dist/ui/error-item.d.ts +0 -1
  367. package/dist/ui/goal-events.d.ts +0 -1
  368. package/dist/ui/goal-events.js.map +1 -1
  369. package/dist/ui/goal-summary.d.ts +0 -1
  370. package/dist/ui/hooks/useAgentLoop.d.ts +0 -1
  371. package/dist/ui/hooks/useBlink.d.ts +0 -1
  372. package/dist/ui/hooks/useChatLayoutMeasurements.d.ts +0 -1
  373. package/dist/ui/hooks/useContextCompaction.d.ts +0 -1
  374. package/dist/ui/hooks/useDoublePress.d.ts +0 -1
  375. package/dist/ui/hooks/useMinDisplayTime.d.ts +0 -1
  376. package/dist/ui/hooks/useModeState.d.ts +0 -1
  377. package/dist/ui/hooks/usePixelFixFlow.d.ts +0 -1
  378. package/dist/ui/hooks/useSessionManager.d.ts +0 -1
  379. package/dist/ui/hooks/useSessionPersistence.d.ts +0 -1
  380. package/dist/ui/hooks/useSlashCommands.d.ts +0 -1
  381. package/dist/ui/hooks/useTaskPickerController.d.ts +0 -1
  382. package/dist/ui/hooks/useTerminalSize.d.ts +0 -1
  383. package/dist/ui/hooks/useTerminalTitle.d.ts +0 -1
  384. package/dist/ui/hooks/useTranscriptHistory.d.ts +0 -1
  385. package/dist/ui/hooks/useTranscriptScroll.d.ts +0 -1
  386. package/dist/ui/item-helpers.d.ts +0 -1
  387. package/dist/ui/layout-decisions.d.ts +0 -1
  388. package/dist/ui/live-area-height.d.ts +0 -1
  389. package/dist/ui/live-item-flush.d.ts +0 -1
  390. package/dist/ui/login.d.ts +0 -1
  391. package/dist/ui/mcp.d.ts +0 -1
  392. package/dist/ui/pixel.d.ts +0 -1
  393. package/dist/ui/prompt-routing.d.ts +0 -1
  394. package/dist/ui/render.d.ts +0 -1
  395. package/dist/ui/session-summary.d.ts +0 -1
  396. package/dist/ui/sessions.d.ts +0 -1
  397. package/dist/ui/spinner-frames.d.ts +0 -1
  398. package/dist/ui/stores/create-store.d.ts +0 -1
  399. package/dist/ui/stores/index.d.ts +0 -1
  400. package/dist/ui/stores/taskbar-store.d.ts +0 -1
  401. package/dist/ui/stores/transcript-scroll-store.d.ts +0 -1
  402. package/dist/ui/submit-prompt-command.d.ts +0 -1
  403. package/dist/ui/submit-slash-commands.d.ts +0 -1
  404. package/dist/ui/terminal-history-format.d.ts +0 -1
  405. package/dist/ui/terminal-history-spacing.d.ts +0 -1
  406. package/dist/ui/terminal-history-status-renderers.d.ts +0 -1
  407. package/dist/ui/terminal-history.d.ts +0 -1
  408. package/dist/ui/testing/screen-recorder.d.ts +0 -1
  409. package/dist/ui/theme/detect-theme.d.ts +0 -1
  410. package/dist/ui/theme/theme.d.ts +0 -1
  411. package/dist/ui/theme/theme.js.map +1 -1
  412. package/dist/ui/thinking-level.d.ts +0 -1
  413. package/dist/ui/tool-group-summary.d.ts +0 -1
  414. package/dist/ui/tool-line-summary.d.ts +0 -1
  415. package/dist/ui/transcript/MiscRows.d.ts +0 -1
  416. package/dist/ui/transcript/StatusRow.d.ts +0 -1
  417. package/dist/ui/transcript/ToolRows.d.ts +0 -1
  418. package/dist/ui/transcript/TranscriptItemFrame.d.ts +0 -1
  419. package/dist/ui/transcript/TranscriptRenderer.d.ts +0 -1
  420. package/dist/ui/transcript/presentation.d.ts +0 -1
  421. package/dist/ui/transcript/spacing.d.ts +0 -1
  422. package/dist/ui/transcript/tool-presentation.d.ts +0 -1
  423. package/dist/ui/transcript/tool-presentation.js.map +1 -1
  424. package/dist/ui/transcript/transcript-lines.d.ts +0 -1
  425. package/dist/ui/utils/assistant-stream-split.d.ts +0 -1
  426. package/dist/ui/utils/highlight.d.ts +0 -1
  427. package/dist/ui/utils/hyperlink.d.ts +0 -1
  428. package/dist/ui/utils/latex-to-unicode.d.ts +0 -1
  429. package/dist/ui/utils/markdown-cache.d.ts +0 -1
  430. package/dist/ui/utils/markdown-renderer.d.ts +0 -1
  431. package/dist/ui/utils/markdown-table.d.ts +0 -1
  432. package/dist/ui/utils/signal.d.ts +0 -1
  433. package/dist/ui/utils/supports-hyperlinks.d.ts +0 -1
  434. package/dist/ui/utils/table-text.d.ts +0 -1
  435. package/dist/ui/utils/terminal-graphics.d.ts +0 -1
  436. package/dist/ui/utils/terminal-input.d.ts +0 -1
  437. package/dist/ui/utils/text-utils.d.ts +0 -1
  438. package/dist/ui/utils/token-to-ansi.d.ts +0 -1
  439. package/dist/ui/utils/user-message-display.d.ts +0 -1
  440. package/dist/ui/utils/word-diff.d.ts +0 -1
  441. package/dist/utils/error-handler.d.ts +0 -1
  442. package/dist/utils/format.d.ts +0 -1
  443. package/dist/utils/git.d.ts +0 -1
  444. package/dist/utils/github-ci.d.ts +18 -0
  445. package/dist/utils/github-ci.js +137 -0
  446. package/dist/utils/github-ci.js.map +1 -0
  447. package/dist/utils/github.d.ts +0 -1
  448. package/dist/utils/http-body.d.ts +0 -1
  449. package/dist/utils/image.d.ts +0 -1
  450. package/dist/utils/open-browser.d.ts +0 -1
  451. package/dist/utils/plan-steps.d.ts +0 -1
  452. package/dist/utils/plan-steps.js.map +1 -1
  453. package/dist/utils/process.d.ts +0 -1
  454. package/dist/utils/prompt-enhancer.d.ts +6 -3
  455. package/dist/utils/prompt-enhancer.js +61 -13
  456. package/dist/utils/prompt-enhancer.js.map +1 -1
  457. package/dist/utils/shell.d.ts +0 -1
  458. package/dist/utils/sound.d.ts +0 -1
  459. package/dist/utils/text.d.ts +0 -1
  460. package/package.json +8 -8
  461. package/dist/app-sidecar-sessions.d.ts.map +0 -1
  462. package/dist/app-sidecar.d.ts.map +0 -1
  463. package/dist/chat-agents/general.d.ts.map +0 -1
  464. package/dist/chat-agents/index.d.ts.map +0 -1
  465. package/dist/chat-agents/jiwa.d.ts.map +0 -1
  466. package/dist/chat-agents/memory.d.ts.map +0 -1
  467. package/dist/chat-agents/research.d.ts.map +0 -1
  468. package/dist/chat-agents/shared.d.ts.map +0 -1
  469. package/dist/chat-agents/therapist.d.ts.map +0 -1
  470. package/dist/chat-agents/types.d.ts.map +0 -1
  471. package/dist/cli/auth.d.ts.map +0 -1
  472. package/dist/cli/command-routing.d.ts.map +0 -1
  473. package/dist/cli/mcp.d.ts.map +0 -1
  474. package/dist/cli/pixel.d.ts.map +0 -1
  475. package/dist/cli/shared.d.ts.map +0 -1
  476. package/dist/cli.d.ts.map +0 -1
  477. package/dist/config.d.ts.map +0 -1
  478. package/dist/core/agent-notifications.d.ts.map +0 -1
  479. package/dist/core/agent-session.d.ts.map +0 -1
  480. package/dist/core/agents.d.ts.map +0 -1
  481. package/dist/core/api-benchmark.d.ts.map +0 -1
  482. package/dist/core/ask-user.d.ts.map +0 -1
  483. package/dist/core/auth/index.d.ts.map +0 -1
  484. package/dist/core/auth-providers.d.ts.map +0 -1
  485. package/dist/core/auth-storage.d.ts.map +0 -1
  486. package/dist/core/auto-update.d.ts.map +0 -1
  487. package/dist/core/autopilot-cycle.d.ts.map +0 -1
  488. package/dist/core/autopilot-gate.d.ts.map +0 -1
  489. package/dist/core/autopilot-verdict.d.ts.map +0 -1
  490. package/dist/core/bash-spawn-benchmark.d.ts.map +0 -1
  491. package/dist/core/bundled-agents.d.ts.map +0 -1
  492. package/dist/core/cache-warm-benchmark.d.ts.map +0 -1
  493. package/dist/core/checkpoint-store.d.ts.map +0 -1
  494. package/dist/core/claude-code-version.d.ts.map +0 -1
  495. package/dist/core/code-retrieval-chunkers.d.ts.map +0 -1
  496. package/dist/core/code-retrieval.d.ts.map +0 -1
  497. package/dist/core/compaction/active-context.d.ts.map +0 -1
  498. package/dist/core/compaction/compactor.d.ts.map +0 -1
  499. package/dist/core/compaction/policy.d.ts.map +0 -1
  500. package/dist/core/compaction/query-aware-selector.d.ts.map +0 -1
  501. package/dist/core/compaction/token-estimator.d.ts.map +0 -1
  502. package/dist/core/compaction/tool-result-pruner.d.ts.map +0 -1
  503. package/dist/core/context-limits.d.ts.map +0 -1
  504. package/dist/core/custom-commands.d.ts.map +0 -1
  505. package/dist/core/encode-cwd.d.ts.map +0 -1
  506. package/dist/core/env-delta.d.ts.map +0 -1
  507. package/dist/core/event-bus.d.ts.map +0 -1
  508. package/dist/core/extensions/loader.d.ts.map +0 -1
  509. package/dist/core/extensions/plugin-bundles.d.ts.map +0 -1
  510. package/dist/core/extensions/types.d.ts.map +0 -1
  511. package/dist/core/fast-apply-benchmark.d.ts.map +0 -1
  512. package/dist/core/file-lock.d.ts.map +0 -1
  513. package/dist/core/foreign-session-import.d.ts.map +0 -1
  514. package/dist/core/foreign-transcript-blocks.d.ts.map +0 -1
  515. package/dist/core/goal-controller.d.ts.map +0 -1
  516. package/dist/core/goal-prerequisites.d.ts.map +0 -1
  517. package/dist/core/goal-store.d.ts.map +0 -1
  518. package/dist/core/goal-verifier.d.ts.map +0 -1
  519. package/dist/core/goal-worker.d.ts.map +0 -1
  520. package/dist/core/hashline-edit-benchmark.d.ts.map +0 -1
  521. package/dist/core/hashline.d.ts.map +0 -1
  522. package/dist/core/ideal-review.d.ts.map +0 -1
  523. package/dist/core/index.d.ts.map +0 -1
  524. package/dist/core/language-detector.d.ts.map +0 -1
  525. package/dist/core/local-endpoint-store.d.ts.map +0 -1
  526. package/dist/core/logger.d.ts.map +0 -1
  527. package/dist/core/loop-breaker.d.ts.map +0 -1
  528. package/dist/core/lsp/client.d.ts.map +0 -1
  529. package/dist/core/lsp/edit-telemetry.d.ts.map +0 -1
  530. package/dist/core/lsp/format.d.ts.map +0 -1
  531. package/dist/core/lsp/jsonrpc.d.ts.map +0 -1
  532. package/dist/core/lsp/manager.d.ts.map +0 -1
  533. package/dist/core/lsp/pool.d.ts.map +0 -1
  534. package/dist/core/lsp/servers.d.ts.map +0 -1
  535. package/dist/core/lsp/test-support.d.ts.map +0 -1
  536. package/dist/core/mcp/catalog-cache.d.ts.map +0 -1
  537. package/dist/core/mcp/client.d.ts.map +0 -1
  538. package/dist/core/mcp/content.d.ts.map +0 -1
  539. package/dist/core/mcp/defaults.d.ts.map +0 -1
  540. package/dist/core/mcp/deferred-catalog.d.ts.map +0 -1
  541. package/dist/core/mcp/elicitation-bridge.d.ts.map +0 -1
  542. package/dist/core/mcp/index.d.ts.map +0 -1
  543. package/dist/core/mcp/loopback.d.ts.map +0 -1
  544. package/dist/core/mcp/oauth-provider.d.ts.map +0 -1
  545. package/dist/core/mcp/oauth-store.d.ts.map +0 -1
  546. package/dist/core/mcp/parse-add-command.d.ts.map +0 -1
  547. package/dist/core/mcp/resolve-stdio.d.ts.map +0 -1
  548. package/dist/core/mcp/shared-pool.d.ts.map +0 -1
  549. package/dist/core/mcp/store.d.ts.map +0 -1
  550. package/dist/core/mcp/types.d.ts.map +0 -1
  551. package/dist/core/message-images.d.ts.map +0 -1
  552. package/dist/core/model-registry.d.ts.map +0 -1
  553. package/dist/core/network-guard.d.ts.map +0 -1
  554. package/dist/core/nolan-context.d.ts.map +0 -1
  555. package/dist/core/nolan-model.d.ts.map +0 -1
  556. package/dist/core/nolan-prompt.d.ts.map +0 -1
  557. package/dist/core/oauth/anthropic.d.ts.map +0 -1
  558. package/dist/core/oauth/gemini.d.ts.map +0 -1
  559. package/dist/core/oauth/kimi.d.ts.map +0 -1
  560. package/dist/core/oauth/openai.d.ts.map +0 -1
  561. package/dist/core/oauth/pkce.d.ts.map +0 -1
  562. package/dist/core/oauth/types.d.ts.map +0 -1
  563. package/dist/core/oauth/xai.d.ts.map +0 -1
  564. package/dist/core/parked-requests.d.ts.map +0 -1
  565. package/dist/core/persistent-shell.d.ts.map +0 -1
  566. package/dist/core/pixel-fix-agent.d.ts.map +0 -1
  567. package/dist/core/pixel-fix.d.ts.map +0 -1
  568. package/dist/core/pixel.d.ts.map +0 -1
  569. package/dist/core/platform-clis.d.ts.map +0 -1
  570. package/dist/core/process-gate.d.ts.map +0 -1
  571. package/dist/core/process-manager.d.ts.map +0 -1
  572. package/dist/core/progress/engine.d.ts.map +0 -1
  573. package/dist/core/progress/git-xp.d.ts.map +0 -1
  574. package/dist/core/progress/ranks.d.ts.map +0 -1
  575. package/dist/core/progress/rebuild.d.ts.map +0 -1
  576. package/dist/core/progress/store.d.ts.map +0 -1
  577. package/dist/core/progress/types.d.ts.map +0 -1
  578. package/dist/core/project-discovery.d.ts.map +0 -1
  579. package/dist/core/prompt-commands.d.ts.map +0 -1
  580. package/dist/core/radio.d.ts.map +0 -1
  581. package/dist/core/regrounding.d.ts.map +0 -1
  582. package/dist/core/resolve-start.d.ts.map +0 -1
  583. package/dist/core/run-claim.d.ts.map +0 -1
  584. package/dist/core/run-lifecycle.d.ts.map +0 -1
  585. package/dist/core/runtime-mode.d.ts.map +0 -1
  586. package/dist/core/sandbox-domains.d.ts.map +0 -1
  587. package/dist/core/sandbox-feedback.d.ts.map +0 -1
  588. package/dist/core/sandbox.d.ts.map +0 -1
  589. package/dist/core/semantic-search-benchmark.d.ts.map +0 -1
  590. package/dist/core/session-compaction.d.ts.map +0 -1
  591. package/dist/core/session-export.d.ts.map +0 -1
  592. package/dist/core/session-history.d.ts.map +0 -1
  593. package/dist/core/session-manager.d.ts.map +0 -1
  594. package/dist/core/session-preview.d.ts.map +0 -1
  595. package/dist/core/session-storage.d.ts.map +0 -1
  596. package/dist/core/settings-manager.d.ts.map +0 -1
  597. package/dist/core/setup-history.d.ts.map +0 -1
  598. package/dist/core/shell-path.d.ts.map +0 -1
  599. package/dist/core/shell.d.ts.map +0 -1
  600. package/dist/core/shutdown.d.ts.map +0 -1
  601. package/dist/core/skills.d.ts.map +0 -1
  602. package/dist/core/slash-commands.d.ts.map +0 -1
  603. package/dist/core/source-maps.d.ts.map +0 -1
  604. package/dist/core/speed-benchmark.d.ts.map +0 -1
  605. package/dist/core/steering.d.ts.map +0 -1
  606. package/dist/core/steroids.d.ts.map +0 -1
  607. package/dist/core/style-packs/index.d.ts.map +0 -1
  608. package/dist/core/style-packs/packs.d.ts.map +0 -1
  609. package/dist/core/subagent-manager.d.ts.map +0 -1
  610. package/dist/core/subagent-policy.d.ts.map +0 -1
  611. package/dist/core/subagent-store.d.ts.map +0 -1
  612. package/dist/core/subagent-turn-record.d.ts.map +0 -1
  613. package/dist/core/task-store.d.ts.map +0 -1
  614. package/dist/core/telegram-config.d.ts.map +0 -1
  615. package/dist/core/telegram.d.ts.map +0 -1
  616. package/dist/core/thinking-level.d.ts.map +0 -1
  617. package/dist/core/verification-evidence.d.ts.map +0 -1
  618. package/dist/core/verification-gate.d.ts.map +0 -1
  619. package/dist/core/verify-commands.d.ts.map +0 -1
  620. package/dist/core/voice-transcriber.d.ts.map +0 -1
  621. package/dist/core/workspace-guard.d.ts.map +0 -1
  622. package/dist/hf-pull.d.ts.map +0 -1
  623. package/dist/index.d.ts.map +0 -1
  624. package/dist/interactive.d.ts.map +0 -1
  625. package/dist/modes/acp-mode.d.ts.map +0 -1
  626. package/dist/modes/agent-home-mode.d.ts.map +0 -1
  627. package/dist/modes/index.d.ts.map +0 -1
  628. package/dist/modes/json-mode.d.ts.map +0 -1
  629. package/dist/modes/print-mode.d.ts.map +0 -1
  630. package/dist/modes/rpc-mode.d.ts.map +0 -1
  631. package/dist/modes/serve-mode.d.ts.map +0 -1
  632. package/dist/modes/subagent-worker-mode.d.ts.map +0 -1
  633. package/dist/session.d.ts.map +0 -1
  634. package/dist/system-prompt.d.ts.map +0 -1
  635. package/dist/test-support/fake-home.d.ts.map +0 -1
  636. package/dist/tools/ask-user.d.ts.map +0 -1
  637. package/dist/tools/bash.d.ts.map +0 -1
  638. package/dist/tools/code-nav.d.ts.map +0 -1
  639. package/dist/tools/code-skeleton.d.ts.map +0 -1
  640. package/dist/tools/compress.d.ts.map +0 -1
  641. package/dist/tools/edit-diff.d.ts.map +0 -1
  642. package/dist/tools/edit.d.ts.map +0 -1
  643. package/dist/tools/enter-plan.d.ts.map +0 -1
  644. package/dist/tools/exit-plan.d.ts.map +0 -1
  645. package/dist/tools/find.d.ts.map +0 -1
  646. package/dist/tools/generate-image.d.ts.map +0 -1
  647. package/dist/tools/goals.d.ts.map +0 -1
  648. package/dist/tools/grep.d.ts.map +0 -1
  649. package/dist/tools/html-extract.d.ts.map +0 -1
  650. package/dist/tools/index.d.ts.map +0 -1
  651. package/dist/tools/ls.d.ts.map +0 -1
  652. package/dist/tools/operations.d.ts.map +0 -1
  653. package/dist/tools/overflow.d.ts.map +0 -1
  654. package/dist/tools/path-utils.d.ts.map +0 -1
  655. package/dist/tools/pdf-extract.d.ts.map +0 -1
  656. package/dist/tools/prompt-hints.d.ts.map +0 -1
  657. package/dist/tools/read-only-bash.d.ts.map +0 -1
  658. package/dist/tools/read-tracker.d.ts.map +0 -1
  659. package/dist/tools/read.d.ts.map +0 -1
  660. package/dist/tools/safe-env.d.ts.map +0 -1
  661. package/dist/tools/screenshot.d.ts.map +0 -1
  662. package/dist/tools/search-code.d.ts.map +0 -1
  663. package/dist/tools/skill.d.ts.map +0 -1
  664. package/dist/tools/source-path.d.ts.map +0 -1
  665. package/dist/tools/steroids.d.ts.map +0 -1
  666. package/dist/tools/subagent-control.d.ts.map +0 -1
  667. package/dist/tools/subagent-shared.d.ts.map +0 -1
  668. package/dist/tools/subagent.d.ts.map +0 -1
  669. package/dist/tools/task-output.d.ts.map +0 -1
  670. package/dist/tools/task-send.d.ts.map +0 -1
  671. package/dist/tools/task-stop.d.ts.map +0 -1
  672. package/dist/tools/tasks.d.ts.map +0 -1
  673. package/dist/tools/tool-search.d.ts.map +0 -1
  674. package/dist/tools/tool-tiers.d.ts.map +0 -1
  675. package/dist/tools/truncate.d.ts.map +0 -1
  676. package/dist/tools/web-fetch.d.ts.map +0 -1
  677. package/dist/tools/web-search.d.ts.map +0 -1
  678. package/dist/tools/write.d.ts.map +0 -1
  679. package/dist/types.d.ts.map +0 -1
  680. package/dist/ui/App.d.ts.map +0 -1
  681. package/dist/ui/activity-phrases.d.ts.map +0 -1
  682. package/dist/ui/app-items.d.ts.map +0 -1
  683. package/dist/ui/components/ActivityIndicator.d.ts.map +0 -1
  684. package/dist/ui/components/AnimationContext.d.ts.map +0 -1
  685. package/dist/ui/components/AssistantMessage.d.ts.map +0 -1
  686. package/dist/ui/components/BackgroundTasksBar.d.ts.map +0 -1
  687. package/dist/ui/components/Banner.d.ts.map +0 -1
  688. package/dist/ui/components/ChatFooterPane.d.ts.map +0 -1
  689. package/dist/ui/components/ChatInputStack.d.ts.map +0 -1
  690. package/dist/ui/components/ChatLayout.d.ts.map +0 -1
  691. package/dist/ui/components/ChatLivePane.d.ts.map +0 -1
  692. package/dist/ui/components/ChatScreen.d.ts.map +0 -1
  693. package/dist/ui/components/ChatStatusRow.d.ts.map +0 -1
  694. package/dist/ui/components/CompactionNotice.d.ts.map +0 -1
  695. package/dist/ui/components/DiffFrame.d.ts.map +0 -1
  696. package/dist/ui/components/DiffView.d.ts.map +0 -1
  697. package/dist/ui/components/Footer.d.ts.map +0 -1
  698. package/dist/ui/components/FooterStatusRow.d.ts.map +0 -1
  699. package/dist/ui/components/FullScreenOverlayRouter.d.ts.map +0 -1
  700. package/dist/ui/components/GoalOverlay.d.ts.map +0 -1
  701. package/dist/ui/components/GoalStatusBar.d.ts.map +0 -1
  702. package/dist/ui/components/IdealHookMessage.d.ts.map +0 -1
  703. package/dist/ui/components/InputArea.d.ts.map +0 -1
  704. package/dist/ui/components/LiveToolPanel.d.ts.map +0 -1
  705. package/dist/ui/components/Markdown.d.ts.map +0 -1
  706. package/dist/ui/components/MessageResponse.d.ts.map +0 -1
  707. package/dist/ui/components/ModelSelector.d.ts.map +0 -1
  708. package/dist/ui/components/NoSelect.d.ts.map +0 -1
  709. package/dist/ui/components/Overlay.d.ts.map +0 -1
  710. package/dist/ui/components/PixelOverlay.d.ts.map +0 -1
  711. package/dist/ui/components/PlanApproval.d.ts.map +0 -1
  712. package/dist/ui/components/PlanBanner.d.ts.map +0 -1
  713. package/dist/ui/components/PlanModeLogo.d.ts.map +0 -1
  714. package/dist/ui/components/PlanOverlay.d.ts.map +0 -1
  715. package/dist/ui/components/PlanProgress.d.ts.map +0 -1
  716. package/dist/ui/components/QueueIndicator.d.ts.map +0 -1
  717. package/dist/ui/components/Ratchet.d.ts.map +0 -1
  718. package/dist/ui/components/RewindOverlay.d.ts.map +0 -1
  719. package/dist/ui/components/SelectList.d.ts.map +0 -1
  720. package/dist/ui/components/ServerToolExecution.d.ts.map +0 -1
  721. package/dist/ui/components/SessionSelector.d.ts.map +0 -1
  722. package/dist/ui/components/SessionSummary.d.ts.map +0 -1
  723. package/dist/ui/components/SettingsSelector.d.ts.map +0 -1
  724. package/dist/ui/components/SkillsOverlay.d.ts.map +0 -1
  725. package/dist/ui/components/SlashCommandMenu.d.ts.map +0 -1
  726. package/dist/ui/components/SlashStyledSelectList.d.ts.map +0 -1
  727. package/dist/ui/components/Spinner.d.ts.map +0 -1
  728. package/dist/ui/components/StreamingArea.d.ts.map +0 -1
  729. package/dist/ui/components/SubAgentPanel.d.ts.map +0 -1
  730. package/dist/ui/components/TaskOverlay.d.ts.map +0 -1
  731. package/dist/ui/components/TaskPickerMenu.d.ts.map +0 -1
  732. package/dist/ui/components/ThemeSelector.d.ts.map +0 -1
  733. package/dist/ui/components/ThinkingBlock.d.ts.map +0 -1
  734. package/dist/ui/components/ToolExecution.d.ts.map +0 -1
  735. package/dist/ui/components/ToolGroupExecution.d.ts.map +0 -1
  736. package/dist/ui/components/ToolUseLoader.d.ts.map +0 -1
  737. package/dist/ui/components/TranscriptViewport.d.ts.map +0 -1
  738. package/dist/ui/components/UserMessage.d.ts.map +0 -1
  739. package/dist/ui/components/force-color.d.ts.map +0 -1
  740. package/dist/ui/components/index.d.ts.map +0 -1
  741. package/dist/ui/constants/figures.d.ts.map +0 -1
  742. package/dist/ui/duration-format.d.ts.map +0 -1
  743. package/dist/ui/duration-summary.d.ts.map +0 -1
  744. package/dist/ui/error-item.d.ts.map +0 -1
  745. package/dist/ui/goal-events.d.ts.map +0 -1
  746. package/dist/ui/goal-summary.d.ts.map +0 -1
  747. package/dist/ui/hooks/useAgentLoop.d.ts.map +0 -1
  748. package/dist/ui/hooks/useBlink.d.ts.map +0 -1
  749. package/dist/ui/hooks/useChatLayoutMeasurements.d.ts.map +0 -1
  750. package/dist/ui/hooks/useContextCompaction.d.ts.map +0 -1
  751. package/dist/ui/hooks/useDoublePress.d.ts.map +0 -1
  752. package/dist/ui/hooks/useMinDisplayTime.d.ts.map +0 -1
  753. package/dist/ui/hooks/useModeState.d.ts.map +0 -1
  754. package/dist/ui/hooks/usePixelFixFlow.d.ts.map +0 -1
  755. package/dist/ui/hooks/useSessionManager.d.ts.map +0 -1
  756. package/dist/ui/hooks/useSessionPersistence.d.ts.map +0 -1
  757. package/dist/ui/hooks/useSlashCommands.d.ts.map +0 -1
  758. package/dist/ui/hooks/useTaskPickerController.d.ts.map +0 -1
  759. package/dist/ui/hooks/useTerminalSize.d.ts.map +0 -1
  760. package/dist/ui/hooks/useTerminalTitle.d.ts.map +0 -1
  761. package/dist/ui/hooks/useTranscriptHistory.d.ts.map +0 -1
  762. package/dist/ui/hooks/useTranscriptScroll.d.ts.map +0 -1
  763. package/dist/ui/item-helpers.d.ts.map +0 -1
  764. package/dist/ui/layout-decisions.d.ts.map +0 -1
  765. package/dist/ui/live-area-height.d.ts.map +0 -1
  766. package/dist/ui/live-item-flush.d.ts.map +0 -1
  767. package/dist/ui/login.d.ts.map +0 -1
  768. package/dist/ui/mcp.d.ts.map +0 -1
  769. package/dist/ui/pixel.d.ts.map +0 -1
  770. package/dist/ui/prompt-routing.d.ts.map +0 -1
  771. package/dist/ui/render.d.ts.map +0 -1
  772. package/dist/ui/session-summary.d.ts.map +0 -1
  773. package/dist/ui/sessions.d.ts.map +0 -1
  774. package/dist/ui/spinner-frames.d.ts.map +0 -1
  775. package/dist/ui/stores/create-store.d.ts.map +0 -1
  776. package/dist/ui/stores/index.d.ts.map +0 -1
  777. package/dist/ui/stores/taskbar-store.d.ts.map +0 -1
  778. package/dist/ui/stores/transcript-scroll-store.d.ts.map +0 -1
  779. package/dist/ui/submit-prompt-command.d.ts.map +0 -1
  780. package/dist/ui/submit-slash-commands.d.ts.map +0 -1
  781. package/dist/ui/terminal-history-format.d.ts.map +0 -1
  782. package/dist/ui/terminal-history-spacing.d.ts.map +0 -1
  783. package/dist/ui/terminal-history-status-renderers.d.ts.map +0 -1
  784. package/dist/ui/terminal-history.d.ts.map +0 -1
  785. package/dist/ui/testing/screen-recorder.d.ts.map +0 -1
  786. package/dist/ui/theme/detect-theme.d.ts.map +0 -1
  787. package/dist/ui/theme/theme.d.ts.map +0 -1
  788. package/dist/ui/thinking-level.d.ts.map +0 -1
  789. package/dist/ui/tool-group-summary.d.ts.map +0 -1
  790. package/dist/ui/tool-line-summary.d.ts.map +0 -1
  791. package/dist/ui/transcript/MiscRows.d.ts.map +0 -1
  792. package/dist/ui/transcript/StatusRow.d.ts.map +0 -1
  793. package/dist/ui/transcript/ToolRows.d.ts.map +0 -1
  794. package/dist/ui/transcript/TranscriptItemFrame.d.ts.map +0 -1
  795. package/dist/ui/transcript/TranscriptRenderer.d.ts.map +0 -1
  796. package/dist/ui/transcript/presentation.d.ts.map +0 -1
  797. package/dist/ui/transcript/spacing.d.ts.map +0 -1
  798. package/dist/ui/transcript/tool-presentation.d.ts.map +0 -1
  799. package/dist/ui/transcript/transcript-lines.d.ts.map +0 -1
  800. package/dist/ui/utils/assistant-stream-split.d.ts.map +0 -1
  801. package/dist/ui/utils/highlight.d.ts.map +0 -1
  802. package/dist/ui/utils/hyperlink.d.ts.map +0 -1
  803. package/dist/ui/utils/latex-to-unicode.d.ts.map +0 -1
  804. package/dist/ui/utils/markdown-cache.d.ts.map +0 -1
  805. package/dist/ui/utils/markdown-renderer.d.ts.map +0 -1
  806. package/dist/ui/utils/markdown-table.d.ts.map +0 -1
  807. package/dist/ui/utils/signal.d.ts.map +0 -1
  808. package/dist/ui/utils/supports-hyperlinks.d.ts.map +0 -1
  809. package/dist/ui/utils/table-text.d.ts.map +0 -1
  810. package/dist/ui/utils/terminal-graphics.d.ts.map +0 -1
  811. package/dist/ui/utils/terminal-input.d.ts.map +0 -1
  812. package/dist/ui/utils/text-utils.d.ts.map +0 -1
  813. package/dist/ui/utils/token-to-ansi.d.ts.map +0 -1
  814. package/dist/ui/utils/user-message-display.d.ts.map +0 -1
  815. package/dist/ui/utils/word-diff.d.ts.map +0 -1
  816. package/dist/utils/error-handler.d.ts.map +0 -1
  817. package/dist/utils/format.d.ts.map +0 -1
  818. package/dist/utils/git.d.ts.map +0 -1
  819. package/dist/utils/github.d.ts.map +0 -1
  820. package/dist/utils/http-body.d.ts.map +0 -1
  821. package/dist/utils/image.d.ts.map +0 -1
  822. package/dist/utils/open-browser.d.ts.map +0 -1
  823. package/dist/utils/plan-steps.d.ts.map +0 -1
  824. package/dist/utils/process.d.ts.map +0 -1
  825. package/dist/utils/prompt-enhancer.d.ts.map +0 -1
  826. package/dist/utils/shell.d.ts.map +0 -1
  827. package/dist/utils/sound.d.ts.map +0 -1
  828. package/dist/utils/text.d.ts.map +0 -1
package/README.md CHANGED
@@ -206,7 +206,7 @@ Reusable behaviors across projects. Drop `.md` files in:
206
206
 
207
207
  They get loaded into the system prompt automatically. The agent knows what it can do without you explaining it each session. <kbd>Ctrl+S</kbd> opens a pane to browse and toggle them.
208
208
 
209
- Ten ship built in, and route themselves when the work matches:
209
+ Eleven ship built in, and route themselves when the work matches:
210
210
 
211
211
  | Skill | Fires on |
212
212
  | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -217,6 +217,7 @@ Ten ship built in, and route themselves when the work matches:
217
217
  | `durable` | User data must not be lost — first database/table, migrations, backfills/imports, destructive operations, backups and recovery; any store (Postgres, MySQL, SQLite, Mongo, serverless). |
218
218
  | `evidence-led-ui` | Broad or design-sensitive UI work — new screens, redesigns, design systems, accessibility passes. |
219
219
  | `lean` | Speed and resource efficiency — slow loading/startup, jank, high CPU, memory leaks and hogging, zombie/orphan processes, bundle bloat, dead code/styles, Core Web Vitals; while building anything that should stay fast, or a perf pass on an existing project. Any stack: web, backend, Electron, Tauri, mobile, native, game, ML. |
220
+ | `refactoring` | Restructuring existing code without changing behavior — "refactor", "clean up", "reduce tech debt", "modernize" or migrate legacy code; test-guarded steps, revert-on-red, characterization tests for untested code. |
220
221
  | `root-cause` | A bug that resists the obvious fix, makes no sense, or keeps coming back — gated diagnosis from red repro to ranked hypotheses to regression test. |
221
222
  | `shared-language` | Fuzzy or drifting domain vocabulary, recurring naming decisions, and hard-to-reverse decisions worth recording (glossary + decision records). |
222
223
  | `tdd` | Test-driven development — red-green-refactor with pre-agreed seams, when the user asks for test-first work. |
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: refactoring
3
+ description: Use when restructuring existing code without changing behavior — "refactor", "clean up this module", "reduce tech debt/duplication", "split this god class/function", "improve code quality", "modernize" or migrate legacy code (strangler fig, framework/dependency upgrades, callback→async), or when planning a refactor before touching code. Two hats, test-guarded steps, revert-on-red. Do NOT use for new feature work, bug fixes with known symptoms (root-cause), styling or copy changes, the refactor step inside a user-requested TDD flow (tdd), or when the user asks to rewrite from scratch.
4
+ license: Behavior-preservation methodology synthesized from public sources (Fowler's Refactoring catalog, Tidy First?, and community agent skills by bienhoang, wondelai, mattpocock, jeffallan, vasilyu1983), audited 2026-09-12.
5
+ ---
6
+
7
+ # Refactoring
8
+
9
+ Change the structure of code without changing what it does. Every observable behavior that exists before the refactoring — including the bugs — must exist after it. This skill exists because agents drift: without hard gates, "refactoring" silently becomes rewriting, and rewriting untested code is how behavior is lost.
10
+
11
+ **Without tests, you're not refactoring — you're editing.**
12
+
13
+ ## Governing rules
14
+
15
+ 1. **Two hats.** You are either adding function or restructuring, never both in the same change. Mixing them makes each unprovable. If new behavior is genuinely required, finish the structural change first, prove it, then change behavior in a separate step.
16
+ 2. **The baseline is a gate, not advice.** Before the first edit: the test suite runs green on unmodified code, or you build a safety net first (see mode 3). Record what you ran and its result. A suite that was already red tells you nothing — fix or quarantine the noise before counting on it.
17
+ 3. **One named transformation per step.** Each step applies exactly one refactoring (Extract Method, Move Function, Introduce Parameter…) and has a name you can state. If you cannot name it, it is not a refactoring — it is a rewrite wearing a costume.
18
+ 4. **Red means revert, not debug.** After each step, run the smallest relevant suite. Green ⇒ commit (when per-step commits were agreed — see the loop's checkpoint), message names the transformation. Red ⇒ revert the step immediately (`git restore`/`git checkout` the touched files). A red intermediate means the step was too big or wrong; debugging a broken step costs more than re-slicing it.
19
+ 5. **Never touch tests to get green.** In a pure refactor, modifying, loosening, or deleting an assertion is the cardinal sin — it destroys the only proof you have. If a test blocks legitimate structural change (asserts private internals), convert it to assert observable behavior *before* the transformation, as its own commit. Any unexplained test change in a refactor diff is a red flag.
20
+ 6. **Smallest suite per step, full suite per finish.** Iterate fast on the touched area, but before declaring done: full test suite + typecheck + lint, on the same commands CI runs.
21
+ 7. **Prove it, don't vibe it.** The closing question is not "is this good code" but "can I prove nothing observable changed?" Answer with evidence: suites run, before/after outputs, mutation spot-checks when the boundary is critical. Say plainly what you could not verify.
22
+ 8. **Make the change easy, then make the easy change** (Beck). Preparatory refactoring — small structural setup that makes the coming feature trivial — is the highest-ROI kind. Do it, then stop.
23
+ 9. **Public API surface is observable behavior.** Renaming or reshaping an exported symbol, endpoint, or file layout preserves runtime behavior but breaks consumers. Inside the module: refactor freely. Across a published boundary: deprecate-and-alias, never hard-break, unless the user chose the break.
24
+ 10. **Edit sources, not generated output.** `dist/`, vendored, or generated files are regenerated by their toolchain — hand-editing them is a change that the next build erases. Change the generator or the source, then regenerate.
25
+
26
+ ## Modes
27
+
28
+ **1. In-the-small** — tidy a module, extract a function, kill duplication while working. The execute loop below, inline, without ceremony. Keep litter-pickup bounded to files you are already touching; a boy-scout sweep across the repo is scope creep.
29
+
30
+ **2. Plan-first** — the user asks for a refactor plan, the change is architectural, or multiple approaches compete. Interview the problem, explore the repo to verify claims, fix scope as in/out lists, check test coverage (thin coverage is a question to the user, not an assumption), then break the work into a plan of tiny commits — each commit leaves the codebase working. File it where the user wants (issue, doc, or just the reply). Do NOT embed file paths or code snippets in the plan — they go stale before the work starts.
31
+
32
+ **3. Legacy / untested** — no tests, unrunnable suite, or a migration too large for one session. Do not proceed with the normal loop. Go to `references/legacy.md`: characterization tests capturing *actual* current behavior (bugs included — log them, don't silently fix them), seams, branch-by-abstraction, parallel change (expand–migrate–contract), strangler fig.
33
+
34
+ ## Execute loop
35
+
36
+ 1. **Baseline.** Run the suite on unmodified code; record green. If red or absent → mode 3. If the project has no VCS or the working tree is dirty with unrelated changes, say so and stop for direction — a dirty baseline destroys the revert safety.
37
+ 2. **Commit checkpoint.** Refactoring is safest with per-step commits on a dedicated branch — ask the user once, up front: "I'll commit each verified step on a branch — good?" If they decline, keep steps small and separable and report the step list for review at the end. Never commit without authorization; without any VCS, or with unrelated uncommitted changes in the tree, say so and stop for direction — a dirty baseline destroys the revert safety.
38
+ 3. **Pick one target.** Ranked by risk-adjusted value, not by how interesting it is: security → correctness → structure → duplication → naming. Hotspots first — files where churn (recent edit frequency) meets complexity. Smell catalog and metrics thresholds: `references/smells.md`.
39
+ 4. **Apply one named transformation.** Full mechanics per transformation live in `references/smells.md`. Prefer language-aware tooling (IDE rename, AST codemods) over regex edits; at scale (>~10 files or >~500 lines), a codemod is the safe path and regex is the wrong one.
40
+ 5. **Verify.** Smallest relevant suite → green ⇒ commit (message = transformation name) → next target. Red ⇒ rule 4 of the governing rules: revert, take a smaller step.
41
+ 6. **Close.** Full suite + typecheck + lint, on the same commands CI runs — including every package that imports the code you touched, not just the one you edited (monorepos: respect build order). Report: transformations applied (named), before/after state, smells left and why, anything deferred. Agent-specific drift modes to check before closing: `references/agent-pitfalls.md`.
42
+
43
+ ## Risk levels set the safety net
44
+
45
+ | Risk | Touching | Minimum net before editing |
46
+ |---|---|---|
47
+ | Low | Pure internals, no I/O | Unit tests + types |
48
+ | Medium | Module boundary, parsing, state | + contract tests at the seam |
49
+ | High | Money, auth, concurrency, migrations, data | + integration tests, a rollback plan, and small phases |
50
+
51
+ When unsure whether behavior could change: **do not apply — ask.**
52
+
53
+ ## When NOT to refactor
54
+
55
+ - No failing demand: nothing to add, nothing hurting. Refactoring without a driver is gold-plating.
56
+ - The code is about to be deleted or replaced. Deleting is cheaper.
57
+ - You cannot run or construct any safety net and the risk is medium+. Report and stop.
58
+ - The rewrite instinct hits ("this is all wrong, let me start fresh"). That is a different conversation with the user, not a refactor — and big-bang rewrites lose the one thing refactoring keeps: working software at every step.
59
+
60
+ ## References
61
+
62
+ - `references/smells.md` — smell catalog, metrics thresholds, prioritization, transformation mechanics
63
+ - `references/legacy.md` — characterization tests, seams, branch-by-abstraction, parallel change, strangler fig, per-phase checkpoints
64
+ - `references/agent-pitfalls.md` — how LLM agents specifically break "behavior-preserving", and the layered proof that catches it
@@ -0,0 +1,43 @@
1
+ # Agent Pitfalls: How Refactors Drift
2
+
3
+ LLM agents fail refactoring in specific, repeated ways. Human seniors watch for these; here is the checklist. Run it over your own diff before closing any refactor.
4
+
5
+ ## Drift modes (check each)
6
+
7
+ - **Error-handling drift** — the old code swallowed or narrowly caught; the rewrite broadens to `catch (e)` "to be safe", or converts errors to exceptions/returns. Observable behavior changed.
8
+ - **Boundary drift** — `>` becomes `>=`, `<` becomes `<=`, off-by-one in slices/loops, `length` vs `length-1`. Classic agent slip, invisible to typecheck.
9
+ - **Rounding and numeric drift** — reordered arithmetic that changes floating-point results; integer division appearing where float was; new formatting on numbers.
10
+ - **Ordering and concurrency drift** — Map/Set/object iteration order assumed where it wasn't guaranteed; sequential awaits parallelized with `Promise.all`; synchronous effects made async (or the reverse).
11
+ - **Null/undefined semantics drift** — old code crashed on null; new code defaults it. Or falsy-checks (`x || y`) "simplified" from explicit `!== undefined` where `0`/`""` are valid values.
12
+ - **Scope and visibility drift** — module-level state introduced where locals were; caching added for performance that changes identity or staleness semantics.
13
+ - **Silent feature addition** — validation, logging, or "improvements" smuggled in because the old code "looked wrong". The old behavior was the spec.
14
+ - **Flaky green** — a test fails, passes on rerun, and gets shrugged off. During a refactor, one flaky red invalidates the whole green: rerun it, and if it flakes, quarantine and fix the flakiness before trusting any suite result.
15
+
16
+ ## Test-healing anti-pattern
17
+
18
+ The agent's tests go red; instead of reverting the code, it loosens the test. Any test-file change in a pure-refactor diff is a red flag requiring an explicit justification of the form: "this test asserted private internals; converted to assert observable behavior, in a separate prior commit." Loosened bounds, deleted assertions, added `.skip`, `any` casts in assertions — all count.
19
+
20
+ ## Chesterton's Fence
21
+
22
+ Before deleting code that looks pointless: `git blame`, read the commit message, check issue/changelog references. Code that survives despite looking wrong often guards an incident. If history is unavailable and the reason is unknowable, flag it to the user instead of deleting.
23
+
24
+ ## Layered verification, cheapest first
25
+
26
+ Escalate only as far as the risk level demands:
27
+
28
+ 1. **Typecheck** — catches signature/shape drift for freer.
29
+ 2. **Lint** — catches dead code, suspicious patterns, unintended scope.
30
+ 3. **Unit + characterization suites** — the core proof; smallest relevant suite per step, full suite at close.
31
+ 4. **Contract test at the changed boundary** — input/output fixtures frozen before the refactor, diffed after.
32
+ 5. **Mutation spot-check** (high-risk boundaries only) — hand-mutate the refactored code (flip a comparison, drop a condition); tests must fail. If they don't, the net has holes: strengthen tests before trusting green.
33
+
34
+ ## Closing self-review
35
+
36
+ Re-read your own full diff and answer, in the report:
37
+
38
+ - Which drift modes above did I check, and how do I know each is absent?
39
+ - Did I modify any test file? If yes, justify per the anti-pattern rule.
40
+ - What did the suites run, exactly (commands), and were they green on unmodified code first?
41
+ - What could I not verify, and what residual risk does the user hold?
42
+
43
+ "Can I prove nothing observable changed" — not "is the code nicer now".
@@ -0,0 +1,49 @@
1
+ # Legacy and Untested Code
2
+
3
+ For codebases or areas where the baseline gate cannot be met: no tests, an unrunnable suite, or a migration too large to land as small commits. The prime directive still holds — observable behavior preserved, bugs included (log them; fixing them is separate work the user must choose).
4
+
5
+ ## Sequence
6
+
7
+ **1. Make the system runnable and observable.** Get it to start locally with realistic data. If you cannot execute it, say so and stop — static-only refactoring of critical legacy paths is a coin flip.
8
+
9
+ **2. Build characterization tests (golden master).** Tests that assert what the code *actually does*, not what it should do:
10
+
11
+ - Call the boundary (public API, CLI, event handler, exported function) with real inputs.
12
+ - Capture the full observable output — return values, written files, emitted events, HTTP responses, log lines.
13
+ - Assert the captured behavior, including wrong-looking output. If output looks like a bug, record the bug and pin the bug.
14
+ - Sufficient coverage: the paths your refactor will touch and their immediate callers. 80% project coverage is not the bar; coverage of the change surface is.
15
+
16
+ Gate: the characterization suite is **green against the unmodified system** before any refactoring. A red baseline proves nothing later.
17
+
18
+ **3. Create seams before structure.** A seam is a place where behavior can be intercepted without editing the logic:
19
+
20
+ - Extract an interface over the dependency, implement it twice (old, new).
21
+ - Dependency injection for clocks, RNGs, IDs, filesystem, network — anything that makes behavior nondeterministic.
22
+ - Adapter wrapping the legacy module so new code consumes the adapter, not the legacy internals.
23
+
24
+ **4. Migrate by one of the incremental strategies below** — never big-bang.
25
+
26
+ **5. Delete last.** The legacy path is removed only after the new path has provably carried the full behavior (characterization suite green against the new path). Before deleting anything old, check why it exists — `git blame` / changelog; code that looks pointless sometimes guards an incident (Chesterton's Fence).
27
+
28
+ ## Incremental migration strategies
29
+
30
+ ### Branch by Abstraction
31
+ For replacing an internal implementation that many callers use. Create an abstraction over the old implementation → migrate callers to it one by one (each a working commit) → implement the new behind the abstraction → flip the default → delete the old. Hybrid states are acceptable and working at every commit.
32
+
33
+ ### Parallel Change (expand–migrate–contract)
34
+ For changing a live contract (API, storage schema, queue message) where old and new consumers coexist:
35
+
36
+ 1. **Expand** — support both old and new forms side by side; write the new form.
37
+ 2. **Migrate** — move every consumer to the new form, one by one.
38
+ 3. **Contract** — after all readers are migrated and nothing reads the old form, remove it.
39
+
40
+ Never skip the migration phase because tests pass — external consumers may exist that tests don't model.
41
+
42
+ ### Strangler Fig
43
+ For replacing a subsystem wholesale. Put a facade in front of the legacy system → route traffic through the facade → intercept one route/slice at a time, implementing it fresh behind the facade (guarded by a feature flag when the slice is risky) → when all slices are intercepted, the legacy core is unused; delete it. Each interception must keep the characterization suite green.
44
+
45
+ ## Per-phase discipline (all strategies)
46
+
47
+ Every phase ends with a **validation checkpoint**: characterization + full suite green, and a stated **rollback trigger** — the condition under which this phase is reverted (a commit, a flag flip, never a re-merge). Keep commits bisectable: one phase-step per commit, `git bisect` must stay usable for finding which step changed behavior.
48
+
49
+ Feature flags guard risky slices, but flags are debt: each one gets a removal issue at creation, and is retired as soon as the new path is proven.
@@ -0,0 +1,71 @@
1
+ # Smells, Metrics, Prioritization
2
+
3
+ Detection and targeting material for the refactoring skill. Thresholds are heuristics for *where to look*, never rules that a file crossing one must be refactored.
4
+
5
+ ## Metrics quick reference
6
+
7
+ Estimate without tooling: cyclomatic complexity ≈ count of decision points (`if`, `while`, `for`, `&&`, `||`, `case`, `catch`, ternary) + 1. Cognitive complexity adds weighting for nesting.
8
+
9
+ | Metric | Comfortable | Refactor signal |
10
+ |---|---|---|
11
+ | Cyclomatic complexity (function) | < 10 | 16+ |
12
+ | Cognitive complexity (function) | < 10 | 15+ |
13
+ | Function length | < 30 lines | 50+ (or one screen) |
14
+ | Class/module length | < 300 lines | 500+ |
15
+ | Parameters | ≤ 3 | 6+ (or booleans that change behavior) |
16
+ | Duplication | — | Same logic 3+ places (Rule of Three) |
17
+
18
+ ## Smell catalog
19
+
20
+ Work top of list first within a risk band. Each entry: signal → usual transformation.
21
+
22
+ ### Bloaters
23
+ - **Long method / function** — exceeds a screen, needs comments to explain sections → Extract Method; conditional blocks each become guard clauses or extracted methods.
24
+ - **God class / module** — knows everything, changes for every reason → Extract Class by responsibility; move features to the module that owns the data (Feature Envy fix).
25
+ - **Long parameter list** — callers pass the same cluster → Introduce Parameter Object; or pass the object the params came from.
26
+ - **Primitive obsession** — coordinates, money, IDs as bare strings/numbers everywhere → Introduce Value Object with validation at creation.
27
+
28
+ ### Change preventers
29
+ - **Divergent change** — one module changed for many unrelated reasons → split by reason (Extract Class).
30
+ - **Shotgun surgery** — one change scattered across many files → Move Function/Field until one module owns the concept.
31
+ - **Parallel inheritance hierarchies** — two hierarchies that must move together → reference one from the other, or unify with a strategy.
32
+
33
+ ### Dispensables
34
+ - **Duplicate code** — same logic 3+ places (Rule of Three: tolerate twice, extract on the third) → Extract Function, share it. Two occurrences with divergence is a bug factory.
35
+ - **Dead code** — unreached branches, unused exports, commented-out blocks → delete. Git history has it.
36
+ - **Speculative generality** — abstraction with one caller, flags always passed the same value, "we might need it" → inline and delete. Treat as aggressively as bloat; agents generate this smell by default.
37
+ - **Magic numbers** — unexplained literals → named constant placed where its meaning lives.
38
+
39
+ ### Couplers
40
+ - **Feature envy** — method mostly reads another module's data → Move Function to the data.
41
+ - **Inappropriate intimacy** — modules poking each other's privates → Move Method/Field, or extract the shared concept.
42
+ - **Message chains** — `a.b().c().d()` → hide the chain behind a method on the object you know.
43
+ - **Middle man** — class that only forwards → remove it, let callers talk directly.
44
+
45
+ ### Conditionals
46
+ - **Deep nesting** — 3+ levels → guard clauses, then Extract Method per branch; Replace Nested Conditional with Guard Clauses.
47
+ - **Complex switch repeated** — same switch on type in multiple places → Replace Conditional with Polymorphism (or a lookup table for the simple data case — do not build a class hierarchy to avoid an object literal).
48
+ - **Boolean-flag parameters** — `doThing(x, true)` → split into two named functions.
49
+
50
+ ## Transformation mechanics (the load-bearing ones)
51
+
52
+ Each must be mechanically checkable — "does everything still compile/tests green" — before the next.
53
+
54
+ - **Extract Method/Function**: create the new function, copy code, pass locals as params, replace body with a call. Pitfall: extraction that captures mutable local state — pass state explicitly or take smaller slices.
55
+ - **Rename**: language-aware rename (LSP/IDE) only at any nontrivial scope; never textual find-replace on names shorter than the unique threshold. Renaming is the highest-value, lowest-risk transformation — do it early and often.
56
+ - **Move Function**: move, fix references, adjust visibility. Best when the function's data lives in the destination (Feature Envy).
57
+ - **Introduce Parameter Object**: group params into a record, migrate callers mechanically.
58
+ - **Replace Conditional with Polymorphism**: only after the switch is duplicated in 2+ places; introduce subtype per branch, migrate case by case, delete the switch last.
59
+ - **Replace Magic Number / Introduce Named Constant**: constant named by *meaning*, not value (`MAX_RETRIES`, not `THREE`).
60
+
61
+ ## Prioritization
62
+
63
+ Order targets by **risk-adjusted value**:
64
+
65
+ 1. **Security** — smells near auth, input handling, crypto.
66
+ 2. **Correctness** — duplication with divergence, boundary-handling drift, shared mutable state.
67
+ 3. **Hotspots** — churn × complexity. `git log --format=%H <path>` / blame frequency identifies churn; complexity from the table above. A moderately messy file nobody touches is not worth your risk budget.
68
+ 4. **Structure** blocking the change the user actually wants (preparatory refactoring).
69
+ 5. **Duplication, naming** — cheapest, do opportunistically in touched files.
70
+
71
+ Defer with a note when: no failing demand, near deletion, or the safety net cannot reach it this session.
@@ -8,4 +8,3 @@ export type SidecarSession = RecentSession & {
8
8
  * `homeDir` lets tests point Claude Code / Codex lookup at a fixture home.
9
9
  */
10
10
  export declare function listSidecarSessions(cwd: string, requestedAgent: string | null, coderSessionsDir: string, homeDir?: string): Promise<SidecarSession[]>;
11
- //# sourceMappingURL=app-sidecar-sessions.d.ts.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=app-sidecar.d.ts.map
@@ -56,6 +56,7 @@ import { getModel, getDefaultThinkingLevel, getContextWindow, getAllModels, clea
56
56
  import { resolveStartOrFallback } from "./core/resolve-start.js";
57
57
  import { getGitBranch, getGitDirtyFileCount, isGitRepo } from "./utils/git.js";
58
58
  import { getGitHubOpenCounts, getGitHubRepoSlug } from "./utils/github.js";
59
+ import { startGitHubCIPoll } from "./utils/github-ci.js";
59
60
  import { extractPlanSteps } from "./utils/plan-steps.js";
60
61
  import { getNextThinkingLevel, getSupportedThinkingLevels, isThinkingLevelSupported, } from "./core/thinking-level.js";
61
62
  import { PROMPT_COMMANDS } from "./core/prompt-commands.js";
@@ -1018,6 +1019,8 @@ function buildNolanContext(buildSession, cwd, gitBranch, question, workflowComma
1018
1019
  cwd,
1019
1020
  gitBranch,
1020
1021
  messages: buildSession.getMessages(),
1022
+ verificationEvidence: buildSession.getVerificationEvidence(),
1023
+ verificationProblem: buildSession.getVerificationProblem(),
1021
1024
  workflowCommands,
1022
1025
  injectedPrompts,
1023
1026
  });
@@ -1683,6 +1686,7 @@ async function createSession(deps, opts) {
1683
1686
  const gitHubSlug = initialGitHubSlug;
1684
1687
  let gitHubIssues = null;
1685
1688
  let gitHubPRs = null;
1689
+ let gitHubCI = null;
1686
1690
  function currentContextWindow() {
1687
1691
  const st = session.getState();
1688
1692
  return getContextWindow(st.model, { provider: st.provider, accountId: st.accountId });
@@ -1697,6 +1701,7 @@ async function createSession(deps, opts) {
1697
1701
  gitDirtyFileCount,
1698
1702
  gitHubIssues,
1699
1703
  gitHubPRs,
1704
+ gitHubCI,
1700
1705
  gitHubRepoUrl: gitHubSlug ? `https://github.com/${gitHubSlug}` : null,
1701
1706
  tasks: session.listBackgroundProcesses(),
1702
1707
  // Roots added with /add-dir — the header shows a badge when non-empty.
@@ -1885,6 +1890,7 @@ async function createSession(deps, opts) {
1885
1890
  });
1886
1891
  session.eventBus.on("model_change", (d) => broadcast("model_change", d));
1887
1892
  session.eventBus.on("hook", (d) => broadcast("hook", d));
1893
+ session.eventBus.on("diagnostics", (d) => broadcast("diagnostics", d));
1888
1894
  // Fires BEFORE the candidate final answer streams. The webview holds assistant
1889
1895
  // text back while armed, so an Ideal review supersedes a draft that was never
1890
1896
  // painted instead of deleting one the user already started reading.
@@ -2201,7 +2207,14 @@ async function createSession(deps, opts) {
2201
2207
  }
2202
2208
  finally {
2203
2209
  const cancelled = runLifecycle.isCancellationRequested(generation);
2210
+ const verificationProblem = cancelled ? null : session.getVerificationProblem();
2211
+ if (runSucceeded && verificationProblem && ownsGeneration) {
2212
+ // Expected control outcome: run_end and the journal already carry Unverified.
2213
+ // Do not format it as a crash or persist a misleading error marker.
2214
+ log("WARN", "app-sidecar", "verification incomplete", { message: verificationProblem });
2215
+ }
2204
2216
  if (runSucceeded &&
2217
+ !verificationProblem &&
2205
2218
  !cancelled &&
2206
2219
  cancelGeneration === cancelGenAtStart &&
2207
2220
  countAssistantMessages(session.getMessages()) > assistantsBeforeRun) {
@@ -2218,12 +2231,14 @@ async function createSession(deps, opts) {
2218
2231
  // A run may have opened/closed issues or PRs — refresh fire-and-forget so
2219
2232
  // teardown isn't delayed by the network. Broadcasts itself on change.
2220
2233
  void refreshGitHubCounts();
2234
+ void ciPoll.refresh();
2221
2235
  // Serialize behind any marker/tool-triggered refresh so the terminal
2222
2236
  // progress snapshot uses the live plan file. Once every canonical step
2223
2237
  // is complete, remove the approved plan from future system prompts and
2224
2238
  // clear the widget before run_end paints the idle activity bar.
2225
2239
  if (runSucceeded &&
2226
2240
  !cancelled &&
2241
+ !verificationProblem &&
2227
2242
  approvedPlanPath !== null &&
2228
2243
  (await queueApprovedPlanProgressSync())) {
2229
2244
  try {
@@ -2240,7 +2255,7 @@ async function createSession(deps, opts) {
2240
2255
  }
2241
2256
  }
2242
2257
  if (ownsGeneration) {
2243
- finishOwnedGeneration(generation, false, runSucceeded ? "completed" : "failed");
2258
+ finishOwnedGeneration(generation, false, verificationProblem ? "unverified" : runSucceeded ? "completed" : "failed");
2244
2259
  }
2245
2260
  // A cancelled injected run is still owned by the surrounding autopilot
2246
2261
  // cycle; its outer finalizer emits the one terminal cancelled run_end.
@@ -2249,6 +2264,7 @@ async function createSession(deps, opts) {
2249
2264
  cancelledRunEndGenerations.add(generation);
2250
2265
  broadcast("run_end", {
2251
2266
  ...(cancelled ? { cancelled: true } : {}),
2267
+ ...(verificationProblem ? { unverified: true } : {}),
2252
2268
  runState: runLifecycle.state,
2253
2269
  });
2254
2270
  }
@@ -2282,6 +2298,8 @@ async function createSession(deps, opts) {
2282
2298
  cwd,
2283
2299
  gitBranch,
2284
2300
  messages: session.getMessages(),
2301
+ verificationEvidence: session.getVerificationEvidence(),
2302
+ verificationProblem: session.getVerificationProblem(),
2285
2303
  originalRequest,
2286
2304
  injectedPrompts: [...injectedAutopilotPrompts],
2287
2305
  workflowCommands: await loadWorkflowCommandSpecs(),
@@ -2325,6 +2343,8 @@ async function createSession(deps, opts) {
2325
2343
  cwd,
2326
2344
  gitBranch,
2327
2345
  messages: session.getMessages(),
2346
+ verificationEvidence: session.getVerificationEvidence(),
2347
+ verificationProblem: session.getVerificationProblem(),
2328
2348
  originalRequest,
2329
2349
  injectedPrompts: [...injectedAutopilotPrompts],
2330
2350
  workflowCommands: await loadWorkflowCommandSpecs(),
@@ -2364,7 +2384,7 @@ async function createSession(deps, opts) {
2364
2384
  // control flow lives in driveAutopilotCycle (core/autopilot-cycle.ts) so
2365
2385
  // every exit path is unit-tested; this only wires the real dependencies.
2366
2386
  async function runAutopilotCycle(originalRequest) {
2367
- if (!autopilot || autopilotCancelled)
2387
+ if (!autopilot || autopilotCancelled || session.getVerificationProblem())
2368
2388
  return;
2369
2389
  const generation = runLifecycle.begin(abortOwnedWork).generation;
2370
2390
  pendingCancelDrain = null;
@@ -2380,6 +2400,7 @@ async function createSession(deps, opts) {
2380
2400
  // round available.
2381
2401
  maxRounds: pendingPlanPath !== null ? MAX_AUTOPILOT_ROUNDS + 2 : MAX_AUTOPILOT_ROUNDS,
2382
2402
  isCancelled: () => autopilotCancelled,
2403
+ verificationProblem: () => session.getVerificationProblem(),
2383
2404
  // An injected run entering plan mode WITHOUT submitting (enter_plan,
2384
2405
  // no exit_plan) halts the cycle — Nolan never prompts into a read-only
2385
2406
  // plan-mode session. A submitted plan takes the planPending branch.
@@ -2392,7 +2413,7 @@ async function createSession(deps, opts) {
2392
2413
  // Auto-accept: the inlined POST /plan/accept body. Returns false when
2393
2414
  // the plan generation moved since the review (user acted) — the cycle
2394
2415
  // exits silently and the user's action stands.
2395
- acceptPlan: async () => {
2416
+ acceptPlan: async (reason) => {
2396
2417
  if (pendingPlanPath === null || planGeneration !== planGenAtReview)
2397
2418
  return false;
2398
2419
  const planPath = pendingPlanPath;
@@ -2409,11 +2430,11 @@ async function createSession(deps, opts) {
2409
2430
  clearPendingPlan();
2410
2431
  // Keep the approval marker ahead of the reset, then seed the reset
2411
2432
  // with the sidecar's canonical count from the actual plan file.
2412
- broadcast("autopilot_plan_accepted", {});
2433
+ broadcast("autopilot_plan_accepted", reason ? { reason } : {});
2413
2434
  broadcast("session_reset", { planTotal });
2414
2435
  broadcast("plan_progress", planProgressPayload());
2415
2436
  // Persisted into the NEW session so a resume shows the marker.
2416
- void session.persistAutopilotMarker("plan_approved");
2437
+ void session.persistAutopilotMarker("plan_approved", { reason });
2417
2438
  return true;
2418
2439
  },
2419
2440
  runImplement: () => {
@@ -2467,9 +2488,10 @@ async function createSession(deps, opts) {
2467
2488
  version: 1,
2468
2489
  phase: "done",
2469
2490
  afterMessageCount: session.getPersistedTranscriptCount(),
2491
+ ...event.data,
2470
2492
  });
2471
2493
  broadcast(event.type, { ...event.data, copySeed: seed });
2472
- void session.persistAutopilotMarker("done");
2494
+ void session.persistAutopilotMarker("done", event.data);
2473
2495
  return;
2474
2496
  }
2475
2497
  broadcast(event.type, event.data);
@@ -2486,7 +2508,7 @@ async function createSession(deps, opts) {
2486
2508
  finally {
2487
2509
  autopilotActive = false;
2488
2510
  session.setIdealReviewSuppressed(autopilot);
2489
- finishOwnedGeneration(generation, true);
2511
+ finishOwnedGeneration(generation, true, session.getVerificationProblem() ? "unverified" : "completed");
2490
2512
  queueMicrotask(() => void runStrandedQueue());
2491
2513
  }
2492
2514
  }
@@ -2754,6 +2776,10 @@ async function createSession(deps, opts) {
2754
2776
  gitHubPoll.unref?.();
2755
2777
  };
2756
2778
  scheduleGitHubPoll(2000);
2779
+ const ciPoll = startGitHubCIPoll(cwd, (next) => {
2780
+ gitHubCI = next;
2781
+ broadcast("extras", footerExtras());
2782
+ });
2757
2783
  function readBody(req, res) {
2758
2784
  return readCappedBody(req, res);
2759
2785
  }
@@ -4162,10 +4188,14 @@ async function createSession(deps, opts) {
4162
4188
  }
4163
4189
  // `false` means it already drained into the run between render and
4164
4190
  // click. That is a race, not an error, so report it as a normal result
4165
- // and let the client reconcile from the fresh list.
4191
+ // and let the client reconcile through the ordered event stream.
4166
4192
  const cancelled = session.cancelQueuedMessage(id);
4167
4193
  const queued = session.listQueuedMessages();
4168
- broadcast("queued", { count: queued.length, messages: queued });
4194
+ broadcast("queued", {
4195
+ count: queued.length,
4196
+ messages: queued,
4197
+ ...(cancelled ? { cancelledId: id } : {}),
4198
+ });
4169
4199
  json(res, 200, { cancelled, queued });
4170
4200
  });
4171
4201
  return;
@@ -5115,6 +5145,7 @@ async function createSession(deps, opts) {
5115
5145
  gitHubPollStopped = true;
5116
5146
  if (gitHubPoll)
5117
5147
  clearTimeout(gitHubPoll);
5148
+ ciPoll.stop();
5118
5149
  // Stop the Telegram serve loop + dispose its per-chat sessions.
5119
5150
  if (serveController)
5120
5151
  await serveController.stop().catch(() => { });