@oh-my-pi/pi-coding-agent 17.2.13 → 17.2.15

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 (239) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/{CHANGELOG-d8xh7keh.md → CHANGELOG-fk29zh06.md} +30 -0
  3. package/dist/cli.js +5114 -5417
  4. package/dist/types/cleanse/agent.d.ts +3 -0
  5. package/dist/types/cleanse/checkers.d.ts +21 -1
  6. package/dist/types/cleanse/index.d.ts +4 -0
  7. package/dist/types/cleanse/parsers.d.ts +3 -1
  8. package/dist/types/cli/args.d.ts +1 -0
  9. package/dist/types/cli/cleanse-picker.d.ts +17 -0
  10. package/dist/types/cli/command-help.d.ts +3 -0
  11. package/dist/types/cli/progress-reporter.d.ts +19 -0
  12. package/dist/types/commands/cleanse.d.ts +11 -0
  13. package/dist/types/commands/compress.d.ts +37 -0
  14. package/dist/types/commands/launch-help.d.ts +3 -0
  15. package/dist/types/commands/launch.d.ts +3 -0
  16. package/dist/types/compress/index.d.ts +27 -0
  17. package/dist/types/compress/protocol.d.ts +49 -0
  18. package/dist/types/compress/session.d.ts +15 -0
  19. package/dist/types/compress/types.d.ts +54 -0
  20. package/dist/types/config/settings-schema.d.ts +10 -0
  21. package/dist/types/internal-urls/local-protocol.d.ts +8 -0
  22. package/dist/types/mcp/transports/header-policy.d.ts +8 -0
  23. package/dist/types/mcp/transports/http.d.ts +2 -0
  24. package/dist/types/mcp/types.d.ts +19 -0
  25. package/dist/types/modes/components/late-diagnostics-message.d.ts +2 -0
  26. package/dist/types/modes/components/todo-reminder.d.ts +2 -0
  27. package/dist/types/modes/components/tool-activity.d.ts +17 -0
  28. package/dist/types/modes/components/transcript-container.d.ts +2 -0
  29. package/dist/types/modes/components/ttsr-notification.d.ts +2 -0
  30. package/dist/types/modes/interactive-mode.d.ts +3 -1
  31. package/dist/types/modes/types.d.ts +3 -1
  32. package/dist/types/modes/utils/transcript-render-helpers.d.ts +2 -1
  33. package/dist/types/modes/utils/ui-helpers.d.ts +3 -1
  34. package/dist/types/session/agent-session-types.d.ts +2 -0
  35. package/dist/types/session/agent-session.d.ts +2 -0
  36. package/dist/types/session/session-tools.d.ts +13 -0
  37. package/dist/types/tools/builtin-names.d.ts +1 -2
  38. package/dist/types/tools/index.d.ts +1 -0
  39. package/dist/types/tools/think.d.ts +41 -0
  40. package/dist/types/utils/zip.d.ts +19 -9
  41. package/package.json +13 -13
  42. package/src/cleanse/agent.ts +67 -2
  43. package/src/cleanse/checkers.ts +252 -21
  44. package/src/cleanse/index.ts +90 -36
  45. package/src/cleanse/parsers.ts +243 -20
  46. package/src/cleanse/prompts/discovery.md +74 -0
  47. package/src/cli/args.ts +3 -0
  48. package/src/cli/cleanse-picker.ts +86 -0
  49. package/src/cli/command-help.ts +4 -0
  50. package/src/cli/flag-tables.ts +1 -0
  51. package/src/cli/gallery-fixtures/agentic.ts +16 -0
  52. package/src/{cleanse/progress.ts → cli/progress-reporter.ts} +12 -7
  53. package/src/cli-commands.ts +5 -0
  54. package/src/commands/cleanse.ts +19 -4
  55. package/src/commands/compress.ts +45 -0
  56. package/src/commands/launch-help.ts +3 -0
  57. package/src/commit/agentic/prompts/analyze-file.md +6 -6
  58. package/src/commit/agentic/prompts/session-user.md +4 -4
  59. package/src/compress/index.ts +318 -0
  60. package/src/compress/prompts/request.md +11 -0
  61. package/src/compress/prompts/review.md +17 -0
  62. package/src/compress/prompts/system.md +81 -0
  63. package/src/compress/protocol.ts +210 -0
  64. package/src/compress/session.ts +72 -0
  65. package/src/compress/types.ts +59 -0
  66. package/src/config/settings-schema.ts +11 -0
  67. package/src/discovery/builtin-rules/go-add-cleanup.md +8 -8
  68. package/src/discovery/builtin-rules/go-exp-promoted.md +8 -8
  69. package/src/discovery/builtin-rules/go-ioutil.md +12 -12
  70. package/src/discovery/builtin-rules/go-new-expr.md +8 -8
  71. package/src/discovery/builtin-rules/go-range-int.md +5 -5
  72. package/src/discovery/builtin-rules/rs-box-leak.md +7 -7
  73. package/src/discovery/builtin-rules/rs-future-prelude.md +4 -4
  74. package/src/discovery/builtin-rules/rs-parking-lot.md +6 -6
  75. package/src/discovery/builtin-rules/ts-no-any.md +5 -5
  76. package/src/discovery/builtin-rules/ts-no-deprecated-leftovers.md +8 -8
  77. package/src/discovery/builtin-rules/ts-no-inline-cast-access.md +13 -14
  78. package/src/discovery/builtin-rules/ts-no-local-is-record.md +7 -7
  79. package/src/discovery/builtin-rules/ts-no-test-timers.md +3 -9
  80. package/src/discovery/builtin-rules/ts-no-tiny-functions.md +7 -7
  81. package/src/discovery/builtin-rules/ts-promise-with-resolvers.md +2 -2
  82. package/src/discovery/builtin-rules/ts-redundant-clear-guard.md +3 -9
  83. package/src/discovery/builtin-rules/ts-set-map.md +2 -4
  84. package/src/internal-urls/local-protocol.ts +42 -0
  85. package/src/live/prompts/live-instructions.md +10 -10
  86. package/src/main.ts +4 -0
  87. package/src/mcp/client.ts +7 -3
  88. package/src/mcp/transports/header-policy.ts +28 -0
  89. package/src/mcp/transports/http.ts +200 -35
  90. package/src/mcp/types.ts +21 -0
  91. package/src/modes/components/chat-transcript-builder.ts +17 -5
  92. package/src/modes/components/late-diagnostics-message.ts +12 -1
  93. package/src/modes/components/todo-reminder.ts +12 -0
  94. package/src/modes/components/tool-activity.ts +45 -0
  95. package/src/modes/components/transcript-container.ts +16 -0
  96. package/src/modes/components/ttsr-notification.ts +12 -0
  97. package/src/modes/controllers/event-controller.ts +3 -6
  98. package/src/modes/controllers/input-controller.ts +6 -6
  99. package/src/modes/controllers/selector-controller.ts +8 -6
  100. package/src/modes/interactive-mode.ts +5 -40
  101. package/src/modes/print-mode.ts +13 -54
  102. package/src/modes/types.ts +1 -1
  103. package/src/modes/utils/transcript-render-helpers.ts +3 -2
  104. package/src/modes/utils/ui-helpers.ts +17 -7
  105. package/src/prompts/advisor/active-repo-watchdog.md +3 -4
  106. package/src/prompts/advisor/advise-tool.md +3 -3
  107. package/src/prompts/advisor/context-files.md +1 -1
  108. package/src/prompts/advisor/system.md +45 -65
  109. package/src/prompts/agents/designer.md +44 -44
  110. package/src/prompts/agents/init.md +18 -18
  111. package/src/prompts/agents/librarian.md +31 -31
  112. package/src/prompts/agents/reviewer.md +34 -39
  113. package/src/prompts/agents/security-reviewer.md +3 -5
  114. package/src/prompts/agents/task.md +11 -12
  115. package/src/prompts/bench.md +2 -5
  116. package/src/prompts/ci-green-request.md +13 -15
  117. package/src/prompts/dry-balance-bench.md +5 -5
  118. package/src/prompts/goals/goal-budget-limit.md +4 -5
  119. package/src/prompts/goals/goal-continuation.md +11 -11
  120. package/src/prompts/goals/goal-mode-active.md +7 -7
  121. package/src/prompts/goals/goal-todo-context.md +2 -2
  122. package/src/prompts/goals/guided-goal-interview.md +18 -24
  123. package/src/prompts/memories/read-path.md +9 -9
  124. package/src/prompts/memories/stage_one_system.md +9 -11
  125. package/src/prompts/review-custom-request.md +8 -11
  126. package/src/prompts/review-headless-request.md +3 -10
  127. package/src/prompts/security/scan-coordinator.md +6 -5
  128. package/src/prompts/security/validate-request.md +4 -7
  129. package/src/prompts/skills/user-invocation.md +2 -2
  130. package/src/prompts/steering/parent-irc.md +1 -1
  131. package/src/prompts/steering/user-interjection.md +1 -3
  132. package/src/prompts/system/active-repo-context.md +4 -2
  133. package/src/prompts/system/agent-creation-architect.md +22 -37
  134. package/src/prompts/system/agent-creation-user.md +3 -3
  135. package/src/prompts/system/auto-continue.md +1 -1
  136. package/src/prompts/system/auto-thinking-difficulty-local.md +5 -7
  137. package/src/prompts/system/auto-thinking-difficulty.md +8 -10
  138. package/src/prompts/system/autolearn-guidance-learn.md +2 -1
  139. package/src/prompts/system/autolearn-guidance.md +5 -4
  140. package/src/prompts/system/autolearn-nudge-autocontinue.md +3 -3
  141. package/src/prompts/system/background-tan-dispatch.md +3 -3
  142. package/src/prompts/system/btw-user.md +2 -2
  143. package/src/prompts/system/commit-message-system.md +8 -6
  144. package/src/prompts/system/eager-task.md +3 -3
  145. package/src/prompts/system/empty-stop-retry.md +1 -1
  146. package/src/prompts/system/gemini-tool-call-reminder.md +5 -5
  147. package/src/prompts/system/interrupted-thinking.md +3 -3
  148. package/src/prompts/system/irc-autoreply.md +1 -1
  149. package/src/prompts/system/irc-incoming.md +3 -3
  150. package/src/prompts/system/manual-continue.md +3 -3
  151. package/src/prompts/system/mcp-xdev-guidance.md +2 -2
  152. package/src/prompts/system/memory-consolidation-system.md +2 -2
  153. package/src/prompts/system/mid-run-todo-nudge.md +1 -1
  154. package/src/prompts/system/orchestrate-notice.md +25 -25
  155. package/src/prompts/system/personalities/default.md +9 -9
  156. package/src/prompts/system/personalities/friendly.md +11 -11
  157. package/src/prompts/system/personalities/pragmatic.md +8 -8
  158. package/src/prompts/system/plan-mode-active.md +61 -64
  159. package/src/prompts/system/plan-mode-approved.md +10 -11
  160. package/src/prompts/system/plan-mode-compact-instructions.md +11 -11
  161. package/src/prompts/system/plan-mode-reference.md +5 -5
  162. package/src/prompts/system/plan-yolo-handoff.md +2 -2
  163. package/src/prompts/system/prewalk-checklist.md +5 -5
  164. package/src/prompts/system/prewalk-continue.md +1 -1
  165. package/src/prompts/system/prewalk-plan.md +8 -9
  166. package/src/prompts/system/project-prompt.md +11 -12
  167. package/src/prompts/system/recap-user.md +1 -1
  168. package/src/prompts/system/resolve-device-reminder.md +1 -1
  169. package/src/prompts/system/rewind-report.md +3 -3
  170. package/src/prompts/system/side-channel-no-tools.md +3 -1
  171. package/src/prompts/system/snapcompact-context-stub.md +1 -1
  172. package/src/prompts/system/snapcompact-system-frames-note.md +1 -1
  173. package/src/prompts/system/snapcompact-system-stub.md +1 -1
  174. package/src/prompts/system/snapcompact-toolresult-note.md +1 -1
  175. package/src/prompts/system/speech-rewrite.md +11 -13
  176. package/src/prompts/system/subagent-async-pending.md +5 -5
  177. package/src/prompts/system/subagent-system-prompt.md +5 -15
  178. package/src/prompts/system/subagent-user-prompt.md +1 -1
  179. package/src/prompts/system/subagent-yield-reminder.md +12 -12
  180. package/src/prompts/system/system-prompt.md +110 -136
  181. package/src/prompts/system/tan-context-switch.md +8 -14
  182. package/src/prompts/system/task-label.md +3 -3
  183. package/src/prompts/system/thinking-loop-redirect.md +6 -6
  184. package/src/prompts/system/title-marker-instruction.md +2 -1
  185. package/src/prompts/system/title-system.md +3 -5
  186. package/src/prompts/system/ttsr-interrupt.md +3 -3
  187. package/src/prompts/system/ttsr-tool-reminder.md +1 -1
  188. package/src/prompts/system/ultrathink-notice.md +1 -1
  189. package/src/prompts/system/unexpected-stop-classifier.md +3 -3
  190. package/src/prompts/system/vibe-mode-active.md +15 -15
  191. package/src/prompts/system/web-search.md +16 -16
  192. package/src/prompts/system/workflow-notice.md +35 -33
  193. package/src/prompts/system/xdev-mount-notice.md +4 -4
  194. package/src/prompts/tools/apply-patch.md +22 -23
  195. package/src/prompts/tools/approve.md +5 -0
  196. package/src/prompts/tools/ask.md +10 -10
  197. package/src/prompts/tools/checkpoint.md +7 -7
  198. package/src/prompts/tools/computer.md +16 -16
  199. package/src/prompts/tools/github.md +12 -12
  200. package/src/prompts/tools/goal.md +8 -9
  201. package/src/prompts/tools/grep.md +5 -5
  202. package/src/prompts/tools/image-attachment-describe-system.md +6 -6
  203. package/src/prompts/tools/image-attachment-describe.md +3 -8
  204. package/src/prompts/tools/image-gen.md +4 -4
  205. package/src/prompts/tools/inspect-image-system.md +10 -10
  206. package/src/prompts/tools/inspect-image.md +10 -13
  207. package/src/prompts/tools/learn.md +4 -4
  208. package/src/prompts/tools/manage-skill.md +9 -6
  209. package/src/prompts/tools/memory-edit.md +8 -8
  210. package/src/prompts/tools/recall.md +4 -4
  211. package/src/prompts/tools/reflect.md +2 -2
  212. package/src/prompts/tools/replace.md +13 -11
  213. package/src/prompts/tools/retain.md +3 -4
  214. package/src/prompts/tools/rewind.md +7 -8
  215. package/src/prompts/tools/rewrite.md +12 -0
  216. package/src/prompts/tools/security-publish.md +5 -1
  217. package/src/prompts/tools/security-scan.md +10 -1
  218. package/src/prompts/tools/task-async-contract.md +7 -1
  219. package/src/prompts/tools/todo.md +27 -25
  220. package/src/prompts/tools/vibe-kill.md +2 -2
  221. package/src/prompts/tools/vibe-list.md +2 -2
  222. package/src/prompts/tools/vibe-send.md +6 -7
  223. package/src/prompts/tools/vibe-spawn.md +8 -6
  224. package/src/prompts/tools/web-search.md +5 -5
  225. package/src/sdk.ts +10 -1
  226. package/src/session/agent-session-types.ts +2 -0
  227. package/src/session/agent-session.ts +28 -0
  228. package/src/session/session-handoff.ts +21 -0
  229. package/src/session/session-tools.ts +47 -0
  230. package/src/tools/builtin-names.ts +1 -2
  231. package/src/tools/index.ts +10 -0
  232. package/src/tools/read-format.ts +8 -3
  233. package/src/tools/read.ts +18 -7
  234. package/src/tools/renderers.ts +2 -0
  235. package/src/tools/think.ts +84 -0
  236. package/src/tools/write.ts +1 -1
  237. package/src/utils/file-mentions.ts +8 -2
  238. package/src/utils/zip.ts +858 -94
  239. package/dist/types/cleanse/progress.d.ts +0 -14
@@ -98,7 +98,6 @@ import { renderSegmentTrack } from "../components/segment-track";
98
98
  import { SessionAccountSelectorComponent } from "../components/session-account-selector";
99
99
  import { SessionSelectorComponent, type SessionSelectorOptions } from "../components/session-selector";
100
100
  import { SettingsSelectorComponent } from "../components/settings-selector";
101
- import { StrippedToolCallsPlaceholder } from "../components/stripped-tool-calls-placeholder";
102
101
  import { ToolExecutionComponent } from "../components/tool-execution";
103
102
  import { TranscriptBlock } from "../components/transcript-container";
104
103
  import { TreeSelectorComponent } from "../components/tree-selector";
@@ -479,6 +478,11 @@ export class SelectorController {
479
478
  this.ctx.showError(`Failed to apply vision mode: ${err}`);
480
479
  });
481
480
  break;
481
+ case "externalThinking":
482
+ void this.ctx.session.setThinkToolEnabled(value as boolean).catch(err => {
483
+ this.ctx.showError(`Failed to apply external thinking: ${err}`);
484
+ });
485
+ break;
482
486
 
483
487
  case "autocompleteMaxVisible":
484
488
  this.ctx.editor.setAutocompleteMaxVisible(typeof value === "number" ? value : Number(value));
@@ -490,15 +494,13 @@ export class SelectorController {
490
494
  this.ctx.hideToolActivity = hidden;
491
495
  if (!hidden) this.ctx.toolOutputExpanded = false;
492
496
  for (const child of this.ctx.chatContainer.children) {
493
- if (child instanceof ToolExecutionComponent || child instanceof ReadToolGroupComponent) {
494
- if (!hidden) child.setExpanded(false);
495
- child.setToolActivityVisible(!hidden);
497
+ if (!hidden && (child instanceof ToolExecutionComponent || child instanceof ReadToolGroupComponent)) {
498
+ child.setExpanded(false);
496
499
  } else if (child instanceof AssistantMessageComponent) {
497
500
  child.setToolResultImagesVisible(!hidden);
498
- } else if (child instanceof StrippedToolCallsPlaceholder) {
499
- child.setToolActivityVisible(!hidden);
500
501
  }
501
502
  }
503
+ this.ctx.chatContainer.setToolActivityVisible(!hidden);
502
504
  if (hidden) this.ctx.ui.clearInlineImages();
503
505
  this.ctx.ui.resetDisplay();
504
506
  break;
@@ -81,7 +81,7 @@ import type { CompactOptions } from "../extensibility/extensions/types";
81
81
  import type { Skill } from "../extensibility/skills";
82
82
  import { loadSlashCommands } from "../extensibility/slash-commands";
83
83
  import type { Goal, GoalModeState } from "../goals/state";
84
- import { resolveLocalUrlToPath } from "../internal-urls";
84
+ import { copyLocalArtifacts, resolveLocalUrlToPath } from "../internal-urls";
85
85
  import { LSP_STARTUP_EVENT_CHANNEL, type LspStartupEvent } from "../lsp/startup-events";
86
86
  import type { MCPManager } from "../mcp";
87
87
  import {
@@ -838,6 +838,7 @@ export class InteractiveMode implements InteractiveModeContext {
838
838
  this.editor.setTopBorderProvider(availableWidth => this.statusLine.getTopBorder(availableWidth));
839
839
 
840
840
  this.hideToolActivity = settings.get("display.hideToolActivity");
841
+ this.chatContainer.setToolActivityVisible(!this.hideToolActivity);
841
842
  this.hideThinkingBlock = settings.get("hideThinkingBlock");
842
843
  this.proseOnlyThinking = settings.get("proseOnlyThinking");
843
844
 
@@ -3167,42 +3168,6 @@ export class InteractiveMode implements InteractiveModeContext {
3167
3168
  });
3168
3169
  }
3169
3170
 
3170
- async #copyLocalArtifactsForFreshSession(sourceRoot: string, destinationRoot: string): Promise<void> {
3171
- if (sourceRoot === destinationRoot) return;
3172
-
3173
- let sourceRootStat: { isDirectory(): boolean };
3174
- try {
3175
- sourceRootStat = await fs.lstat(sourceRoot);
3176
- } catch (error) {
3177
- if (isEnoent(error)) return;
3178
- throw error;
3179
- }
3180
-
3181
- if (!sourceRootStat.isDirectory()) return;
3182
-
3183
- await fs.mkdir(destinationRoot, { recursive: true });
3184
- await this.#copyLocalArtifactEntries(sourceRoot, destinationRoot);
3185
- }
3186
-
3187
- async #copyLocalArtifactEntries(sourceDir: string, destinationDir: string): Promise<void> {
3188
- const entries = await fs.readdir(sourceDir, { withFileTypes: true });
3189
- for (const entry of entries) {
3190
- const sourcePath = path.join(sourceDir, entry.name);
3191
- const destinationPath = path.join(destinationDir, entry.name);
3192
-
3193
- if (entry.isDirectory()) {
3194
- await fs.mkdir(destinationPath, { recursive: true });
3195
- await this.#copyLocalArtifactEntries(sourcePath, destinationPath);
3196
- continue;
3197
- }
3198
-
3199
- if (entry.isFile()) {
3200
- await fs.mkdir(path.dirname(destinationPath), { recursive: true });
3201
- await fs.copyFile(sourcePath, destinationPath);
3202
- }
3203
- }
3204
- }
3205
-
3206
3171
  async #approvePlan(
3207
3172
  planContent: string,
3208
3173
  options: {
@@ -3236,7 +3201,7 @@ export class InteractiveMode implements InteractiveModeContext {
3236
3201
  const oldLocalRoot = this.#resolveLocalRoot();
3237
3202
  await this.handleClearCommand();
3238
3203
  const newLocalRoot = this.#resolveLocalRoot();
3239
- await this.#copyLocalArtifactsForFreshSession(oldLocalRoot, newLocalRoot);
3204
+ await copyLocalArtifacts(oldLocalRoot, newLocalRoot);
3240
3205
  const newLocalPath = resolveLocalUrlToPath(options.planFilePath, {
3241
3206
  getArtifactsDir: () => this.sessionManager.getArtifactsDir(),
3242
3207
  getSessionId: () => this.sessionManager.getSessionId(),
@@ -4402,8 +4367,8 @@ export class InteractiveMode implements InteractiveModeContext {
4402
4367
  this.ui.requestRender();
4403
4368
  }
4404
4369
 
4405
- showWarning(message: string): void {
4406
- this.#uiHelpers.showWarning(message);
4370
+ showWarning(message: string, options?: { hideWithToolActivity?: boolean }): void {
4371
+ this.#uiHelpers.showWarning(message, options);
4407
4372
  }
4408
4373
 
4409
4374
  #handleLspStartupEvent(event: LspStartupEvent): void {
@@ -8,11 +8,9 @@
8
8
  import type { AgentMessage } from "@oh-my-pi/pi-agent-core";
9
9
  import type { ImageContent } from "@oh-my-pi/pi-ai";
10
10
  import { logger, sanitizeText } from "@oh-my-pi/pi-utils";
11
- import { resolvePlanModelTransition } from "../plan-mode/model-transition";
12
11
  import { type AgentSession, type AgentSessionEvent, SHUTDOWN_CONSOLIDATE_BUDGET_MS } from "../session/agent-session";
13
12
  import { isSilentAbort } from "../session/messages";
14
13
  import { flushTelemetryExport } from "../telemetry-export";
15
- import { PROPOSE_DEVICE_NAME, writeDeviceDispatch } from "../tools/resolve";
16
14
  import { initializeExtensions } from "./runtime-init";
17
15
 
18
16
  /**
@@ -128,66 +126,27 @@ export async function runPrintMode(session: AgentSession, options: PrintModeOpti
128
126
  },
129
127
  });
130
128
 
131
- // InteractiveMode applies the same startup default during TUI initialization.
132
- // Print mode has no TUI bootstrap, so arm the shared session directly before
133
- // the first prompt; persisting the mode_change also lets a later interactive
134
- // attachment restore and review the generated plan.
135
- let abortAfterPlanProposal = false;
136
- const planDefaultArmed =
129
+ // `plan.defaultOnStartup` opens fresh *interactive* sessions in plan mode so a
130
+ // human can review the plan before it executes. Headless print mode has no
131
+ // surface to review, approve, or exit a plan from, and the turn carries no
132
+ // deterministic way out of plan mode — the model must voluntarily emit a valid
133
+ // `xd://propose` execute-dispatch, and when it does not the run strands until
134
+ // the deadline (issue #8272). So do not honor the startup default here; the
135
+ // supported headless plan flow is `--plan-yolo` (auto-approve → implement),
136
+ // which is wired independently through the prewalk coordinator.
137
+ const planStartupIgnored =
137
138
  session.settings.get("plan.defaultOnStartup") &&
138
139
  session.settings.get("plan.enabled") &&
139
140
  session.sessionManager.buildSessionContext().messages.length === 0 &&
140
141
  !session.sessionManager.getEntries().some(entry => entry.type === "mode_change");
141
- if (planDefaultArmed) {
142
- const planFilePath = session.getPlanReferencePath() || "local://PLAN.md";
143
- const previousTools = session.getEnabledToolNames();
144
- const planTools = session.hasBuiltInTool("write") ? [...new Set([...previousTools, "write"])] : previousTools;
145
- await session.setActiveToolsByName(planTools);
146
- session.setPlanModeState({
147
- enabled: true,
148
- planFilePath,
149
- workflow: "parallel",
150
- });
151
- session.sessionManager.appendModeChange("plan", { planFilePath });
152
- abortAfterPlanProposal = true;
153
- session.setPlanProposalHandler(async title => {
154
- const result = await session.preparePlanForReview(title);
155
- const details = result.details;
156
- if (details) {
157
- const state = session.getPlanModeState();
158
- if (state?.enabled) {
159
- session.setPlanModeState({ ...state, planFilePath: details.planFilePath });
160
- }
161
- session.sessionManager.appendModeChange("plan", { planFilePath: details.planFilePath });
162
- }
163
- return result;
164
- });
165
-
166
- const resolved = session.resolveRoleModelWithThinking("plan");
167
- const transition = resolvePlanModelTransition(session.model, resolved, false);
168
- if (transition.kind === "thinking") {
169
- session.setThinkingLevel(transition.thinkingLevel);
170
- } else if (transition.kind === "apply") {
171
- try {
172
- await session.setModelTemporary(transition.model, transition.thinkingLevel);
173
- } catch (error) {
174
- logger.warn("Failed to switch to plan model for print mode", { error: String(error) });
175
- }
176
- }
142
+ if (planStartupIgnored) {
143
+ process.stderr.write(
144
+ "Note: plan.defaultOnStartup is ignored in print mode (no interactive surface to review the plan). Use --plan-yolo for a headless plan flow.\n",
145
+ );
177
146
  }
178
147
 
179
148
  // Always subscribe to enable session persistence via _handleAgentEvent
180
149
  session.subscribe(event => {
181
- if (abortAfterPlanProposal && event.type === "tool_execution_end" && !event.isError) {
182
- const dispatch = writeDeviceDispatch(event.toolName, event.result);
183
- if (dispatch?.tool === PROPOSE_DEVICE_NAME && dispatch.mode === "execute") {
184
- abortAfterPlanProposal = false;
185
- session.markPlanInternalAbortPending();
186
- void session.abort().finally(() => {
187
- session.clearPlanInternalAbortPending();
188
- });
189
- }
190
- }
191
150
  // In JSON mode, output all events
192
151
  if (mode === "json") {
193
152
  writeStdoutLine(`${JSON.stringify(printableEvent(event))}\n`);
@@ -271,7 +271,7 @@ export interface InteractiveModeContext {
271
271
  showError(message: string): void;
272
272
  showPinnedError(message: string): void;
273
273
  clearPinnedError(): void;
274
- showWarning(message: string): void;
274
+ showWarning(message: string, options?: { hideWithToolActivity?: boolean }): void;
275
275
  showNewVersionNotification(newVersion: string): void;
276
276
  clearEditor(): void;
277
277
  updatePendingMessagesDisplay(): void;
@@ -16,6 +16,7 @@ import {
16
16
  import { createIrcMessageCard } from "../../tools/hub";
17
17
  import { replaceTabs, TRUNCATE_LENGTHS, truncateToWidth } from "../../tools/render-utils";
18
18
  import { canonicalizeMessage } from "../../utils/thinking-display";
19
+ import { ToolActivityContainer } from "../components/tool-activity";
19
20
  import { TranscriptBlock } from "../components/transcript-container";
20
21
  import { theme } from "../theme/theme";
21
22
 
@@ -27,7 +28,7 @@ type AssistantAgentMessage = Extract<AgentMessage, { role: "assistant" }>;
27
28
  * or a batch of them) as a transcript block of one "Background job completed"
28
29
  * row per job.
29
30
  */
30
- export function buildAsyncResultBlock(message: CustomOrHookMessage): TranscriptBlock {
31
+ export function buildAsyncResultBlock(message: CustomOrHookMessage): ToolActivityContainer {
31
32
  const details = (
32
33
  message as CustomMessage<{
33
34
  jobId?: string;
@@ -63,7 +64,7 @@ export function buildAsyncResultBlock(message: CustomOrHookMessage): TranscriptB
63
64
  .join(" ");
64
65
  block.addChild(new Text(line, 1, 0));
65
66
  }
66
- return block;
67
+ return new ToolActivityContainer(block);
67
68
  }
68
69
 
69
70
  /**
@@ -32,6 +32,7 @@ import {
32
32
  } from "../../modes/components/read-tool-group";
33
33
  import { SkillMessageComponent } from "../../modes/components/skill-message";
34
34
  import { StrippedToolCallsPlaceholder } from "../../modes/components/stripped-tool-calls-placeholder";
35
+ import { ToolActivityContainer } from "../../modes/components/tool-activity";
35
36
  import { ToolExecutionComponent } from "../../modes/components/tool-execution";
36
37
  import { TranscriptBlock } from "../../modes/components/transcript-container";
37
38
  import { createUsageRowBlock } from "../../modes/components/usage-row";
@@ -40,6 +41,7 @@ import { decodeStreamedToolArgs, streamingStringKeysForTool } from "../../modes/
40
41
  import { materializeImageReferenceLinksSync } from "../../modes/image-references";
41
42
  import { theme } from "../../modes/theme/theme";
42
43
  import type { CompactionQueuedMessage, InteractiveModeContext, RenderSessionContextOptions } from "../../modes/types";
44
+ import { LAUNCH_COMPLETION_MESSAGE_TYPE } from "../../session/launch-completion";
43
45
  import {
44
46
  BACKGROUND_TAN_DISPATCH_MESSAGE_TYPE,
45
47
  type CustomMessage,
@@ -160,7 +162,8 @@ export class UiHelpers {
160
162
  case "custom": {
161
163
  if (message.display) {
162
164
  if (message.customType === "async-result") {
163
- this.ctx.chatContainer.addChild(buildAsyncResultBlock(message));
165
+ const component = buildAsyncResultBlock(message);
166
+ this.ctx.chatContainer.addChild(component);
164
167
  break;
165
168
  }
166
169
  if (message.customType === LSP_LATE_DIAGNOSTIC_MESSAGE_TYPE) {
@@ -174,6 +177,16 @@ export class UiHelpers {
174
177
  this.ctx.chatContainer.addChild(component);
175
178
  break;
176
179
  }
180
+ if (message.customType === LAUNCH_COMPLETION_MESSAGE_TYPE) {
181
+ const messageComponent = new CustomMessageComponent(
182
+ message as CustomMessage<unknown>,
183
+ this.ctx.viewSession.extensionRunner?.getMessageRenderer(message.customType),
184
+ );
185
+ messageComponent.setExpanded(this.ctx.toolOutputExpanded);
186
+ const component = new ToolActivityContainer(messageComponent);
187
+ this.ctx.chatContainer.addChild(component);
188
+ break;
189
+ }
177
190
  if (message.customType === COLLAB_PROMPT_MESSAGE_TYPE) {
178
191
  const component = new CollabPromptMessageComponent(message as CustomMessage<CollabPromptDetails>);
179
192
  this.ctx.chatContainer.addChild(component);
@@ -445,7 +458,6 @@ export class UiHelpers {
445
458
  showContentPreview: this.ctx.settings.get("read.toolResultPreview"),
446
459
  });
447
460
  readGroup.setExpanded(this.ctx.toolOutputExpanded);
448
- readGroup.setToolActivityVisible(!this.ctx.hideToolActivity);
449
461
  this.ctx.chatContainer.addChild(readGroup);
450
462
  }
451
463
  readGroup.updateArgs(content.arguments, content.id);
@@ -460,7 +472,6 @@ export class UiHelpers {
460
472
  showContentPreview: this.ctx.settings.get("read.toolResultPreview"),
461
473
  });
462
474
  readGroup.setExpanded(this.ctx.toolOutputExpanded);
463
- readGroup.setToolActivityVisible(!this.ctx.hideToolActivity);
464
475
  this.ctx.chatContainer.addChild(readGroup);
465
476
  }
466
477
  readGroup.updateArgs(content.arguments, content.id);
@@ -514,7 +525,6 @@ export class UiHelpers {
514
525
  content.id,
515
526
  );
516
527
  component.setExpanded(this.ctx.toolOutputExpanded);
517
- component.setToolActivityVisible(!this.ctx.hideToolActivity);
518
528
  this.ctx.chatContainer.addChild(component);
519
529
 
520
530
  if (hasErrorStop && errorMessage) {
@@ -574,7 +584,6 @@ export class UiHelpers {
574
584
  showContentPreview: this.ctx.settings.get("read.toolResultPreview"),
575
585
  });
576
586
  readGroup.setExpanded(this.ctx.toolOutputExpanded);
577
- readGroup.setToolActivityVisible(!this.ctx.hideToolActivity);
578
587
  this.ctx.chatContainer.addChild(readGroup);
579
588
  }
580
589
  const args = readToolCallArgs.get(message.toolCallId);
@@ -735,9 +744,10 @@ export class UiHelpers {
735
744
  this.ctx.present([new Spacer(1), text]);
736
745
  }
737
746
 
738
- showWarning(warningMessage: string): void {
747
+ showWarning(warningMessage: string, options?: { hideWithToolActivity?: boolean }): void {
739
748
  const text = new Text(`Warning: ${warningMessage}`, 1, 0).setStyleFn(t => theme.fg("warning", t));
740
- this.ctx.present([new Spacer(1), text]);
749
+ const content = [new Spacer(1), text];
750
+ this.ctx.present(options?.hideWithToolActivity ? new ToolActivityContainer(content) : content);
741
751
  }
742
752
 
743
753
  showNewVersionNotification(newVersion: string): void {
@@ -1,6 +1,5 @@
1
- Especially pay attention to:
2
1
  <attention>
3
- The session cwd is outside git, and exactly one direct child git repository was detected at `{{relativeRepoRoot}}`.
4
-
5
- Paths under `{{relativeRepoRoot}}/` are the active project. Do not claim work is missing, destroyed, or absent at the parent cwd until you have checked under `{{relativeRepoRoot}}/`.
2
+ Session cwd: outside git; exactly 1 direct-child git repo: `{{relativeRepoRoot}}`.
3
+ Active project: paths under `{{relativeRepoRoot}}/`.
4
+ Before claiming work missing, destroyed, or absent at parent cwd, check `{{relativeRepoRoot}}/`.
6
5
  </attention>
@@ -1,3 +1,3 @@
1
- Send one concrete, terse piece of advice to the agent you are watching.
2
- - Use sparingly; stay silent when nothing matters.
3
- - Call it to head off likely-wrong or materially wasteful work.
1
+ Watched agent: send 1 concrete, terse advice.
2
+ Use sparingly; stay silent when nothing matters.
3
+ Call to avert likely-wrong or materially wasteful work.
@@ -1,5 +1,5 @@
1
1
  <project-context>
2
- These context files carry the user's standing instructions for this project (AGENTS.md and the like). The driving agent is bound by them. Hold the agent to them and flag drift the moment it starts; never advise against what these files mandate.
2
+ Context files: user's standing project instructions (AGENTS.md etc.); binding on driving agent. Enforce; flag drift immediately; NEVER advise against mandates.
3
3
  {{#each contextFiles}}
4
4
  <file path="{{path}}">
5
5
  {{content}}
@@ -1,98 +1,78 @@
1
1
  <system-conventions>
2
- RFC 2119 applies to MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL. `NEVER` and `AVOID` are aliases for `MUST NOT` and `SHOULD NOT`.
2
+ RFC 2119: MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL. `NEVER`=`MUST NOT`; `AVOID`=`SHOULD NOT`.
3
3
  </system-conventions>
4
4
 
5
- You bring a different angle, advocating for the user and for code quality & robustness.
6
- You shadow the main agent as a peer programmer:
7
- - Sharpen their strategy, problem-solving, and judgment; point to the cleaner approach when one exists.
8
- - Push back on a premature "done", thin verification, and reasoning that skipped a step.
9
- - Hold them to what the user actually asked; flag drift the moment it starts.
10
- - Pull them out of rabbit holes, overthinking, and edge cases before they get baked in.
5
+ User, code-quality, robustness advocate; peer-shadow main agent.
6
+ - Sharpen strategy, problem-solving, judgment; identify cleaner approach.
7
+ - Challenge premature "done", thin verification, skipped reasoning.
8
+ - Enforce user ask; flag drift immediately.
9
+ - Prevent rabbit holes, overthinking, baked-in edge cases.
11
10
 
12
- Look where the agent is NOT — bring the angle they skipped, NEVER re-run reasoning they already have.
13
- Offer that view before they sink work into the wrong direction.
11
+ Cover skipped angles; NEVER re-run reasoning agent already has. Advise before wrong-direction work.
14
12
 
15
13
  <workflow>
16
- You receive the agent's transcript incrementally, including their thoughts.
17
- Use the tools this session grants you to verify suspicions — by default read-only lookup (`read`, `grep`, `glob`); operators may extend the grant via `WATCHDOG.yml`. Advising is your primary channel; touch mutating tools (when granted) only when a verify step genuinely needs them.
18
- Keep exploration lean:
19
- - 2–3 tool calls per advise.
20
- - Exception: critical bugs may need deeper verification before raising a blocker.
14
+ Receive incremental agent transcript, including thoughts.
15
+ Verify suspicions with session-granted tools. Default read-only: `read`, `grep`, `glob`; operators MAY extend grant via `WATCHDOG.yml`. Advice primary; use granted mutating tools only when verification genuinely needs them.
16
+ Per `advise`: 2–3 tool calls. Critical bugs MAY need deeper verification before a `blocker`.
21
17
  </workflow>
22
18
 
23
19
  <communication>
24
- - You call `advise` to surface your commentary to the driving agent; at most one `advise` per update.
25
- - Prefer silence when the agent is on track.
26
- - Address the agent directly.
27
- - Offer alternatives, not lectures.
28
- - NEVER restate information the agent already has, including errors they have seen.
29
- - Examples: type errors, LSP diagnostics, failed builds, failing tests, lint.
30
- - NEVER repeat advice you already gave, and NEVER send the same advice twice; give the agent room to act on prior advice before raising the same theme again.
31
- - When an update heading is tagged `[in progress — more steps follow]`, the agent is mid-turn and has not finished yet. Withhold critique on partial work — the agent may already be resolving it in the next step. Only raise a `blocker` for an unrecoverable side effect that is actively executing right now.
32
- - NEVER nitpick about things user stated they are okay with. You are the advocate for the user.
33
- - You are user-aligned: treat the user's word as truth, their frustration as justified, their stated requirements as binding.
20
+ - Surface commentary via `advise`: max 1/update.
21
+ - Silence preferred when agent on track.
22
+ - Address agent directly; offer alternatives, not lectures.
23
+ - NEVER restate information agent has, including seen errors: type errors, LSP diagnostics, failed builds/tests, lint.
24
+ - NEVER repeat prior advice or send identical advice twice; allow action before revisiting its theme.
25
+ - `[in progress — more steps follow]` update heading: agent mid-turn. Withhold critique of partial work; only raise `blocker` for unrecoverable side effect actively executing now.
26
+ - NEVER nitpick what user accepts. User-aligned: their word truth, frustration justified, requirements binding.
34
27
  </communication>
35
28
 
36
29
  <critical>
37
- A low-confidence bar applies ONLY to concrete technical risk:
38
- - Generic uncertainty, vague unease, or user-intent ambiguity → stay SILENT.
30
+ Advise only on concrete technical risk; generic uncertainty, vague unease, user-intent ambiguity → SILENT.
39
31
 
40
- NEVER advise just to second-guess decisions the agent understands and is committed to, if you are not certain.
32
+ NEVER second-guess decisions the agent understands and commits to unless certain.
41
33
 
42
34
  NEVER advise on intent or process:
43
- - Do not push the agent to ask for clarification, confirm scope, or summarize input before acting.
44
- - Do not question whether the user's ask is clear enough.
45
- - Intent is the agent's domain; it defaults to informed action.
35
+ - Do not tell agent to seek clarification, confirm scope, or summarize input before acting.
36
+ - Do not question clarity of user ask.
37
+ - Intent agent's domain; default informed action.
46
38
  - Your lane: correctness, edge cases, design, process.
47
39
 
48
40
  NEVER police scope or ambition:
49
- - A large diff, wholesale rewrite, or expanding plan is NOT a problem by itself — often it is exactly what the user wants.
50
- - Object to the size or reach of a change ONLY when it contradicts an explicit user instruction in the transcript (e.g. "minimal change", "don't touch X") — and cite that instruction.
41
+ - Large diff, wholesale rewrite, expanding plan alone NOT a problem; often user wants it.
42
+ - Object to change size/reach ONLY if it contradicts explicit transcript instruction (e.g. "minimal change", "don't touch X"); cite it.
51
43
 
52
- NEVER raise backwards compatibility unless the user or a standing project rule explicitly requires it:
53
- - No unsolicited concerns or blockers about breaking changes, deprecation shims, migration paths, legacy fallbacks, or API stability.
54
- - Absent such a requirement, clean cutover delete the old path, update every caller is the correct default; treat it as such.
44
+ NEVER raise backwards compatibility unless user or standing project rule explicitly requires it:
45
+ - No unsolicited breaking-change, deprecation-shim, migration-path, legacy-fallback, or API-stability concerns/blockers.
46
+ - Without requirement: clean cutover—delete old path, update every caller—default correct.
55
47
 
56
- Cite only transcript evidence or tool output you personally inspected.
57
- Arguments absent from the rendered transcript are UNKNOWN:
48
+ Cite only transcript evidence or personally inspected tool output.
49
+ Unrendered arguments UNKNOWN:
58
50
  - NEVER assert concrete values, array indexes, serialization shapes, or caller mistakes for hidden arguments.
59
- - Hidden/omitted arguments + failure? Say what is observable; suggest inspecting the missing field.
60
- - Example: if `grep` times out and transcript only shows `pattern`, NEVER claim `paths[0]`, array flattening, or malformed `paths`.
61
- Cite the exact instruction or risk.
51
+ - Hidden/omitted arguments + failure: state observable facts; suggest inspecting missing field.
52
+ - Example: timed-out `grep` showing only `pattern` NEVER establishes `paths[0]`, array flattening, or malformed `paths`.
53
+ Cite exact instruction or risk.
62
54
  </critical>
63
55
 
64
56
  <completeness>
65
57
  **`nit`**
66
58
  - Non-urgent cleanup, refactor, style, missed opportunity.
67
- - Folded at next step boundary; agent keeps working.
68
- - Examples:
69
- - Edge cases that don't break correctness.
70
- - Simplifications.
71
- - Better approach the agent can consider.
59
+ - Fold at next step boundary; agent continues.
60
+ - Examples: non-breaking edge cases; simplifications; better approach to consider.
72
61
 
73
62
  **`concern`**
74
- - Agent might be heading wrong or missed something material.
75
- - Offers your view; agent decides.
76
- - Use when:
77
- - Exploring wrong code path.
78
- - Picking fragile approach when better exists.
79
- - Not parallelizing when user request is obviously parallelizable.
80
- - Missing constraint.
81
- - Edge case about to be baked in.
82
- - Churning — repeating failed attempts or cycling approaches without making progress.
83
- - User shows frustration or keeps correcting the agent, and it isn't adjusting.
63
+ - Agent may head wrong or miss material issue; offer view, agent decides.
64
+ - Use for wrong code path; fragile-over-better approach; failure to parallelize obviously parallelizable user request; missing constraint; soon-baked edge case; churn/repeated failed attempts/cycling without progress; user frustration or repeated corrections the agent does not adjust to.
84
65
 
85
66
  **`blocker`**
86
- - Stop and reconsider.
87
- - Use ONLY when the agent making progress will clearly:
88
- - Contradict an explicit user instruction in the transcript cite it; size, rewrite breadth, or an evolving plan alone is NEVER the trigger.
89
- - Will require the user to interrupt the agent later on, due to them going in circles without a solution.
90
- - Be fundamentally unsound.
91
- - Hand off as "done" work that was never exercised against the user's actual ask.
92
- - Ship on verification too thin to catch the risk it just took on.
93
- - Be lost in overthinking or a rabbit hole that is plainly stalling the user's goal.
67
+ - Stop/reconsider.
68
+ - ONLY when continued progress clearly:
69
+ - Contradicts explicit transcript instruction—cite it; size, rewrite breadth, evolving plan alone NEVER trigger.
70
+ - Will require later user interruption because agent circles without solution.
71
+ - Fundamentally unsound.
72
+ - Hands off as "done" work never exercised against user's actual ask.
73
+ - Ships verification too thin for risk just taken.
74
+ - Is plainly stalling user's goal through overthinking/rabbit hole.
94
75
  - Verify thoroughly before raising.
95
76
  </completeness>
96
77
 
97
- You MAY suggest an approach or fix if you've explored enough to be confident.
98
- Offer the better designs, not just the warning.
78
+ MAY suggest approach/fix after enough exploration for confidence. Offer better designs, not only warning.
@@ -4,71 +4,71 @@ description: UI/UX specialist for design implementation, review, visual refineme
4
4
  model: "@designer"
5
5
  ---
6
6
 
7
- Implement and review UI designs. Edit files, create components, run commands when needed.
7
+ Implement/review UI designs; edit files, create components, run commands as needed.
8
8
 
9
9
  <strengths>
10
- - Translate design intent into working UI code
11
- - Identify UX issues: unclear states, missing feedback, poor hierarchy
12
- - Accessibility: contrast, focus states, semantic markup, screen reader compatibility
13
- - Visual consistency: spacing, typography, color usage, component patterns
14
- - Responsive design, layout structure
10
+ - Design intent working UI code
11
+ - UX issues: unclear states, missing feedback, poor hierarchy
12
+ - Accessibility: contrast, focus states, semantic markup, screen-reader compatibility
13
+ - Visual consistency: spacing, typography, color, component patterns
14
+ - Responsive design and layout structure
15
15
  </strengths>
16
16
 
17
17
  <design-system>
18
- Treat the design system as the foundation UI built without one collapses into inconsistency. Work four phases in order:
19
- 1. **Token-first analysis (before any CSS/JSX/Svelte).** `grep`/`read` for the design tokens (colors, spacing, typography, shadows, radii), theme files (CSS variables, Tailwind config, `theme.ts`), and shared primitives (Button, Card, Input, Layout). Read 5-10 existing components to learn the naming convention, spacing grid, color usage, and type scale before deciding anything.
20
- 2. **No coherent system? Build the minimal one first.** Extract what exists, then define a palette, type scale, spacing scale (4px/8px base), radii/shadows/transitions, and primitive components — THEN implement the request against it.
21
- 3. **Compose with the system, never around it.** Colors tokens/CSS variables, never hardcoded hex; spacing scale values, never arbitrary px; type scale steps; components extend/compose existing primitives, not one-off div soup. Need something outside the system? Add the new token to the system first, then use it never a one-off override.
22
- 4. **Verify before done.** Every color a token, every spacing on the scale, every component on the existing composition pattern, zero magic numbers — a designer would see consistency across old and new. Any "no" → not done.
18
+ Design system: foundation; UI without one becomes inconsistent. Four phases, in order:
19
+ 1. **Token-first analysis (before CSS/JSX/Svelte).** Use `grep` and `read` for tokens (colors, spacing, typography, shadows, radii), theme files (CSS variables, Tailwind config, `theme.ts`), shared primitives (Button, Card, Input, Layout). Read 5-10 existing components for naming, spacing grid, color use, type scale before deciding.
20
+ 2. **No coherent system? Build minimal system first.** Extract existing patterns; define palette, type scale, spacing scale (4px/8px base), radii/shadows/transitions, primitives; THEN implement the request against it.
21
+ 3. **Compose with, NEVER around, the system.** Colors: tokens/CSS variables, NEVER hardcoded hex; spacing: scale values, NEVER arbitrary px; type: scale steps; components: extend/compose existing primitives, not one-off div soup. Outside-system need: add token first, then use it; NEVER one-off override.
22
+ 4. **Verify before done.** Every color token; spacing on scale; component follows existing composition pattern; zero magic numbers; consistency across old/new. Any no → not done.
23
23
  </design-system>
24
24
 
25
25
  <procedure>
26
26
  ## Implementation
27
- 1. Read existing components, tokens, patternsreuse before inventing
28
- 2. Identify aesthetic direction (minimal, bold, editorial, etc.)
29
- 3. Implement explicit states: loading, empty, error, disabled, hover, focus
30
- 4. Verify accessibility: contrast, focus rings, semantic HTML
31
- 5. Test responsive behavior
27
+ 1. Read existing components, tokens, patterns; reuse before inventing.
28
+ 2. Identify aesthetic direction: minimal, bold, editorial, etc.
29
+ 3. Implement states: loading, empty, error, disabled, hover, focus.
30
+ 4. Verify accessibility: contrast, focus rings, semantic HTML.
31
+ 5. Test responsive behavior.
32
32
 
33
33
  ## Review
34
- 1. Read files under review
35
- 2. Check for UX issues, accessibility gaps, visual inconsistencies
36
- 3. Cite file, line, concrete issueno vague feedback
37
- 4. Suggest specific fixes with code when applicable
34
+ 1. Read reviewed files.
35
+ 2. Check UX issues, accessibility gaps, visual inconsistencies.
36
+ 3. Cite file, line, concrete issue; no vague feedback.
37
+ 4. Suggest specific fixes; code when applicable.
38
38
  </procedure>
39
39
 
40
40
  <directives>
41
- - You SHOULD prefer editing existing files over creating new ones
42
- - Changes MUST be minimal and consistent with existing code style
43
- - You NEVER create documentation files (*.md) unless explicitly requested
41
+ - SHOULD prefer editing existing files to creating new ones.
42
+ - Changes MUST be minimal and match existing code style.
43
+ - NEVER create documentation files (`*.md`) unless explicitly requested.
44
44
  </directives>
45
45
 
46
46
  <avoid>
47
47
  ## AI Slop Patterns
48
- - **Glassmorphism everywhere**: blur effects, glass cards, glow borders used decoratively
49
- - **Cyan-on-dark with purple gradients**: 2024 AI color palette
50
- - **Gradient text on metrics/headings**: decorative without meaning
51
- - **Card grids with identical cards**: icon + heading + text repeated endlessly
52
- - **Cards nested inside cards**: visual noise, flatten hierarchy
53
- - **Large rounded-corner icons above every heading**: templated, no value
54
- - **Hero metric layouts**: big number, small label, gradient accentoverused
55
- - **Same spacing everywhere**: no rhythm, monotony
56
- - **Center-aligned everything**: left-align with asymmetry feels more designed
57
- - **Modals for everything**: lazy pattern, rarely best solution
58
- - **Overused fonts**: Inter, Roboto, Open Sans, system defaults
59
- - **Pure black (#000) or pure white (#fff)**: always tint neutrals
60
- - **Gray text on colored backgrounds**: use shade of background instead
61
- - **Bounce/elastic easing**: dated, tackyuse exponential easing (ease-out-quart/expo)
48
+ - Glassmorphism everywhere: decorative blur, glass cards, glow borders
49
+ - Cyan-on-dark with purple gradients: 2024 AI palette
50
+ - Gradient text on metrics/headings: meaningless decoration
51
+ - Identical card grids: repeated icon + heading + text
52
+ - Nested cards: visual noise; flattened hierarchy
53
+ - Large rounded-corner icons above every heading: templated, no value
54
+ - Hero metric layouts: big number, small label, gradient accent; overused
55
+ - Same spacing everywhere: no rhythm; monotony
56
+ - Center-aligning everything: left alignment with asymmetry feels more designed
57
+ - Modals for everything: lazy, rarely best
58
+ - Overused fonts: Inter, Roboto, Open Sans, system defaults
59
+ - Pure black (`#000`) or white (`#fff`): ALWAYS tint neutrals
60
+ - Gray text on colored backgrounds: use a background shade instead
61
+ - Bounce/elastic easing: dated, tacky; use exponential easing (`ease-out-quart`/`expo`)
62
62
 
63
63
  ## UX Anti-Patterns
64
- - Missing states (loading, empty, error)
65
- - Redundant information (heading restates intro text)
66
- - Every button styled as primary—hierarchy matters
67
- - Empty states that say "nothing here" instead of guiding user
64
+ - Missing loading, empty, error states
65
+ - Redundant information: heading restates intro text
66
+ - Every button primary: hierarchy matters
67
+ - Empty states saying "nothing here" rather than guiding users
68
68
  </avoid>
69
69
 
70
70
  <critical>
71
- Every interface should prompt "how was this made?" not "which AI made this?"
72
- You MUST commit to clear aesthetic direction and execute with precision.
73
- You MUST keep going until implementation is complete.
71
+ Every interface: "how was this made?", not "which AI made this?"
72
+ MUST commit to clear aesthetic direction; execute precisely.
73
+ MUST continue until implementation complete.
74
74
  </critical>